Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
0cefc48
Markdown component: cutOff property
fiorsaoirse May 21, 2026
06f91c6
Merge branch 'develop' into feature/markdownCutOff-CMEM-7659
haschek Jun 3, 2026
4923a84
split the default config for allowed html elements between inline and…
haschek Jun 3, 2026
8b97c59
use MArkdown cutOff to improve preview when MArkdown is allowed
haschek Jun 3, 2026
903e613
update changelog
haschek Jun 3, 2026
da04846
add helper function to iterate over Markdown rendering to improve the…
haschek Jun 4, 2026
43a9a69
update toggler component, use new truncateMarkdownDisplay helper
haschek Jun 4, 2026
d51c677
Merge pull request #397 from eccenca/feature/improveContentToggler-CM…
fiorsaoirse Jun 5, 2026
4e96644
Adjust Markdown truncate
fiorsaoirse Jun 5, 2026
59f4596
Merge branch 'develop' into feature/markdownCutOff-CMEM-7659
haschek Jun 8, 2026
d4ac0a2
Adjust Markdown tests
fiorsaoirse Jun 8, 2026
814f3e8
Update logic for lists and code fences
fiorsaoirse Jun 11, 2026
8c8387b
Changed regexp for fences
fiorsaoirse Jun 22, 2026
a329e3d
Update changelog section to 26.1.0
haschek Aug 20, 2026
07597b6
Merge pull request #412 from eccenca/maintain/mergeReleaseTag-v26.1.0
haschek Aug 20, 2026
248bac0
Merge remote-tracking branch 'origin/develop' into feature/markdownCu…
haschek Aug 24, 2026
ed3b6d6
use horzintal ellipsis html character as default suffix
haschek Aug 24, 2026
6d57713
fix parameter description
haschek Aug 24, 2026
e31fa52
adjust changelog
haschek Aug 24, 2026
784a672
Add nodrag class to Switch component by default
andreas-schultz Aug 25, 2026
3c04fed
Webpack 5 related changes
andreas-schultz Aug 26, 2026
c6c878c
Merge branch 'develop' into feature/webpackUpgrade-CMEM-6650
andreas-schultz Aug 26, 2026
6d0cc7d
add story, improve docs
haschek Aug 26, 2026
31073be
use variables for react flow opt-out class names
haschek Aug 27, 2026
bfb2708
Merge pull request #413 from eccenca/feature/noDragSwitch
haschek Aug 27, 2026
d3e76d3
fix description and story regarding the usage of PropertyValueList
haschek Aug 27, 2026
25998b7
Merge pull request #415 from eccenca/bugfix/propertyValueStory-CMEM-7819
haschek Aug 27, 2026
b0c5c2d
upgrade storybook libs
haschek Aug 27, 2026
cbf9bd8
upgrade jest related libs
haschek Aug 27, 2026
f75709e
upgrade eslint related libs
haschek Aug 27, 2026
32b9406
upgrade stylelint related libs
haschek Aug 27, 2026
5fee271
upgrade sass library
haschek Aug 27, 2026
1b6ef91
upgrade yargs library
haschek Aug 27, 2026
90ec3b0
upgrade babel libraries, remove unnessecary parts of it
haschek Aug 27, 2026
3c706b2
upgrade prettier library
haschek Aug 27, 2026
3ab137c
upgrade other dev libs
haschek Aug 27, 2026
585dc56
upgrade carbon libraries
haschek Aug 27, 2026
1368fd2
upgrade codemirror libs
haschek Aug 27, 2026
564379b
upgrade other dependencies
haschek Aug 27, 2026
8d60c41
update resolutions configuration after library upgrades
haschek Aug 27, 2026
0802ae0
update changelog
haschek Aug 31, 2026
fef75bd
add workaround for problem of BOM selector within compressed styöesheets
haschek Aug 31, 2026
60002e8
update changelog
haschek Aug 31, 2026
9529b63
Merge pull request #421 from eccenca/bugfix/workaroundBomSelector-CME…
haschek Aug 31, 2026
0b1e16a
Merge branch 'develop' into feature/webpackUpgrade-CMEM-6650
haschek Sep 1, 2026
f358d19
switch engines info back to former value because it is meant for cons…
haschek Sep 1, 2026
65db322
fix Storybook implication with existing /dist filder, and cirrect the…
haschek Sep 1, 2026
a654149
update changelog re assert inclusion
haschek Sep 1, 2026
d3a06fc
fix includePaths, so it works also if they would not have the same
haschek Sep 1, 2026
0110fac
Fixed bold cutoffs
fiorsaoirse Sep 2, 2026
b7e1776
set engines.node to 18.19
haschek Sep 2, 2026
d00253a
improve error handling
haschek Sep 2, 2026
d8a8498
fix import detection
haschek Sep 2, 2026
0474b1b
harden the includePaths resolver
haschek Sep 2, 2026
9f78af8
istall explitely util along assert
haschek Sep 2, 2026
b29a84c
Merge pull request #422 from eccenca/feature/maintainLibraries-CMEM-8066
haschek Sep 3, 2026
eedcb79
Merge remote-tracking branch 'origin/develop' into feature/webpackUpg…
haschek Sep 3, 2026
2e1dbc2
Merge pull request #414 from eccenca/feature/webpackUpgrade-CMEM-6650
haschek Sep 3, 2026
5e2f7f9
Merge remote-tracking branch 'origin/develop' into feature/markdownCu…
haschek Sep 3, 2026
af49730
fix issues with markers on the very start and single Markdown markers
haschek Sep 3, 2026
7796cd0
Merge pull request #395 from eccenca/feature/markdownCutOff-CMEM-7659
haschek Sep 3, 2026
6ea8cfc
add canonical toggle icons for tree nodes
haschek Sep 7, 2026
345d585
Merge pull request #424 from eccenca/feature/iconsTreeNode-CMEM-8102
haschek Sep 7, 2026
3d9d5b0
extend tests to check styles rgarding media queries and if elements a…
haschek Sep 8, 2026
cfd5df3
fix access for screenreaders for elements hidden on screen
haschek Sep 8, 2026
a11a944
update changelog
haschek Sep 8, 2026
d89d08a
Merge pull request #425 from eccenca/bugfix/hiddenApplicationViewabil…
fiorsaoirse Sep 8, 2026
87b1226
allow hidden Label elements, accessible for screenreaders
haschek Sep 8, 2026
f234a3e
fix keyboard access for label tooltips
haschek Sep 8, 2026
0df69d8
add tests and update changleog
haschek Sep 8, 2026
3e421ad
Merge remote-tracking branch 'origin/develop' into feature/supportHid…
haschek Sep 8, 2026
0b254a7
Merge pull request #426 from eccenca/feature/supportHiddenFieldItemLa…
fiorsaoirse Sep 9, 2026
1fd8bf2
conncet FieldSet parts via aria attributes to improve accessibility
haschek Sep 10, 2026
f938df1
update changelog and add tests
haschek Sep 10, 2026
feb6693
fix import paths in tests
haschek Sep 10, 2026
21d6770
remove aria connections when elements were removed from the FieldSet
haschek Sep 14, 2026
7858f44
manage already given for attribute on label better
haschek Sep 14, 2026
ff92d4f
fix margin for inputfields after hidden label
haschek Sep 14, 2026
4652603
auto-connect CodeEditor element via aria attributes
haschek Sep 14, 2026
1d17f89
Merge pull request #427 from eccenca/feature/fielditemAutoAria-CMEM-7789
andreas-schultz Sep 14, 2026
e62b99e
Add shortcut to leave the code editor and a hint explaining it (CMEM-…
fiorsaoirse Sep 10, 2026
10f13fc
Added screen reader hint, added the native editor panel as notificati…
fiorsaoirse Sep 10, 2026
04b5dcb
Set the default key binding to CodeEditor to leave the focused field
fiorsaoirse Sep 14, 2026
0670547
Add CodeEditor actions and improve Escape-Tab handling
fiorsaoirse Sep 14, 2026
da18fd9
add tests for dialog components
haschek Sep 16, 2026
3626232
add aria roles and attributes to dialog components
haschek Sep 16, 2026
bcc281f
update chnagelog
haschek Sep 16, 2026
4b1fc72
synchronize ModalContext updates to all modals in the chain, and set …
haschek Sep 16, 2026
3b16b7b
update changelog
haschek Sep 16, 2026
f62415e
update modal context story using SimpleDialog components
haschek Sep 16, 2026
267f7a5
if no modal context is known all modals (with a role) are set to aria…
haschek Sep 16, 2026
558d47e
fix missing tye export
haschek Sep 16, 2026
26e8889
git add is not necessary for lint-staged since v10
haschek Sep 16, 2026
b291964
remove unused components
haschek Sep 16, 2026
97bc02f
fix dialog title in story
haschek Sep 16, 2026
b8a00d5
Fixed comments issues
fiorsaoirse Sep 16, 2026
a4e5d86
Adjust style issues
fiorsaoirse Sep 16, 2026
410b4f8
Fix css issue
fiorsaoirse Sep 22, 2026
64fe28b
Set the footer always visible
fiorsaoirse Sep 22, 2026
aa807c6
Fix tests
fiorsaoirse Sep 22, 2026
54f8078
prevent code editor footer from overlaying the border shadow
haschek Sep 22, 2026
93995c5
ignore aria-label if aria-labelledby is given, remove role if no labe…
haschek Sep 22, 2026
b5cd2f4
allow string as localized blur info
haschek Sep 22, 2026
2dab8e7
Merge pull request #428 from eccenca/bugfix/codeEdiorTrap-CMEM-7687
haschek Sep 22, 2026
33ad681
fixed waring message
haschek Sep 22, 2026
120b103
move the fallback label creation to SimpleDialog to make this check i…
haschek Sep 22, 2026
b786ad9
Merge remote-tracking branch 'origin/develop' into feature/dialogAria…
haschek Sep 22, 2026
89fe2c4
use alert dialog in story
haschek Sep 28, 2026
1c75a9e
fix forgotton primary color usage to accent color
haschek Sep 28, 2026
fdd27ab
fix meaning of useTabForCompletions, need to be set true for tab usag…
haschek Sep 29, 2026
9dcf143
fix the default value of enableTab, so that it not permanently turn t…
haschek Sep 29, 2026
d07ed6f
Merge pull request #430 from eccenca/feature/dialogAriaRoles-CMEM-7690
andreas-schultz Sep 30, 2026
01e1ba5
Prepare release v26.2.0
haschek Sep 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/krypton
50 changes: 31 additions & 19 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const sass = require("sass");
const path = require("path");
const sass = require("sass");
const sassRenderSyncConfig = require("./../scripts/sassConfig");
const { silenceDeprecations } = require("../scripts/sassDeprecationConfig");

Expand All @@ -9,15 +9,6 @@ module.exports = {
"@storybook/addon-links",
"@storybook/addon-docs",
"@storybook/addon-a11y",
{
name: "@storybook/preset-scss",
options: {
sassLoaderOptions: {
implementation: sass,
sassOptions: {...sassRenderSyncConfig, silenceDeprecations},
},
},
},
"@storybook/addon-webpack5-compiler-babel",
],
framework: {
Expand Down Expand Up @@ -64,6 +55,16 @@ module.exports = {
},
},
webpackFinal: async (config, { configType }) => {
// never let the compiled package output take part in the Storybook build,
// stories always have to use the sources
// a directory import like `"./../../../../"` is resolved by the `exports` field of our
// own package.json and would silently pull `dist/esm/` into the preview bundle,
// this restriction removes it from the candidates so that the root `index.ts` is used
const distPath = path.resolve(__dirname, "..", "dist");
config.resolve.restrictions = [
...(config.resolve.restrictions ?? []),
new RegExp(`^(?!${distPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}[/\\\\])`),
];
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
if (configType === "PRODUCTION") {
// remove source maps from production storybook
Expand All @@ -72,13 +73,29 @@ module.exports = {
config.devtool = false;
}
config.module.rules = [
{
test: /\.s[ac]ss$/i,
use: [
require.resolve("style-loader"),
{
loader: require.resolve("css-loader"),
options: {
importLoaders: 1,
},
},
{
loader: require.resolve("sass-loader"),
options: {
implementation: sass,
sassOptions: { ...sassRenderSyncConfig, silenceDeprecations },
},
},
],
},
{
test: /\.(png|jpg|gif|svg)(\\?.*)?$/,
include: /\.tobase64\./,
loader: "url-loader",
options: {
limit: true,
},
type: "asset/inline",
},
...config.module.rules.map((rule) => {
if (
Expand All @@ -92,11 +109,6 @@ module.exports = {
return rule;
}),
];
config.resolve.alias = {
...config.resolve.alias,
// Fix nasty bug with importing from this package, Storybook webpack cannot resolve it otherwise
"@codemirror/legacy-modes": path.resolve(__dirname, "../node_modules/@codemirror/legacy-modes"),
};
return config;
},
};
2 changes: 1 addition & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const parameters = {
const preview = {
// Enables auto-generated documentation for all stories
// @see https://storybook.js.org/docs/writing-docs/autodocs
tags: ['autodocs'],
tags: ["autodocs"],
parameters,
};

Expand Down
97 changes: 97 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,103 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

### Added

- `<CodeEditor />`
- documents the built-in Escape then Tab sequence for moving focus out of the editor when Tab is configured to indent
- shows a compact keyboard navigation hint in a bottom CodeMirror panel when Tab is configured to indent
- `keyboardHint` accepts a custom string or element for localized instructions, the default instruction is marked as English
- `<Switch />`
- `noDrag` parameter: Add the `nodrag` class to the Switch element. Default: `true`
- `<Markdown />`
- Added `cutOff` property to set maximum number of raw Markdown characters to render
- `<Label />`
- `hidden` property: label is not displayed but stays accessible for screen readers and keyboard navigation
- `<FieldItem />`
- label, input element, helper text and message are connected to each other automatically now
- each part without an own `id` gets one based on a unique ID of the field item
- the label refers to the input element via `for`, or via `aria-labelledby` on the input element if the label is not displayed as `label` element
- an already set `for` is only kept if it refers to the ID of the input element of the field item
- helper text and message are referred by the input element via `aria-describedby`
- `input`, `textarea`, `select`, the toggle button of `<Select />` and the editable area of `<CodeEditor />` are supported as input element
- input elements that cannot be referenced by `for`, e.g. the editable area of the code editor, are connected via `aria-labelledby`
- parts that are created after the field item was mounted, e.g. by the code editor, are connected as soon as they exist
- already set `id` values and connections are never overwritten
- ID references created by the field item are removed again if their part is removed from the field item
- `preventAriaAttribution` property: prevents this automatic connection of the field item parts
- `<Modal />`
- `role`, `aria-label`, `aria-labelledby` and `aria-describedby` properties: they are set on the dialog element inside the modal overlay
- `role` is `dialog` by default, but it is removed again if neither a label nor a description is available; a console warning points this out when the modal is opened
- `aria-modal` is set together with the `role`, so it is left out as well if the `role` was removed
- it is `true` for the modal that was opened last according to the `ModalContext`, otherwise it is `false`
- if no `ModalContext` is provided, then the modals cannot know about each other, so each of them claims modality
- `<SimpleDialog />`
- `role` and the aria attributes are set automatically now if they are not given
- `role` is `alertdialog` if an `intent` state is set that describes an alert (`success`, `warning`, `danger` or `info`), otherwise it is `dialog`
- for those alert intent states the content area gets an `id` and is referred by the dialog via `aria-describedby`
- explicitly given values are never overwritten
- if neither `title`, `aria-label` nor `aria-labelledby` is given for an alert, then the `intent` level is used as fallback for `aria-label`, so the alert dialog always has an accessible name
- new `utils` methods:
- `truncateMarkdownDisplay`: helper function to iterate over `Markdown` renderings to improve the experienced `cutOff` value
- new icons:
- `toggler-treenode-closed`
- `toggler-treenode-expanded`

### Changed

- Upgrading base libraries
- Carbon, Codemirror, React-Flow
- minimum node version (`engines.node`) is `18.19.0` now
- the build of the ESM distribution needs a synchronous `import.meta.resolve`, which is only available since this version
- `<FieldItem />`
- the used `Label` element gets the `eccgui-fielditem__label` class now
- `<AlertDialog />`
- always uses `role="alertdialog"` now
- the `role` property is not accepted anymore
- `ModalContext`
- a change of the stack of open modals re-renders the consumers of the context now, this way modals can react on modals that are opened on top of them, e.g. to hand over `aria-modal`
- before only an internal reference was updated, which never triggered any re-render
- the component that provides the context via `useModalContext` is re-rendered on every change of the stack, but not if a change does not affect it, e.g. when a modal is closed that was never registered as open
- `openModalStack()` still returns the current stack synchronously, also directly after `setModalOpen()` was called
- `<CodeEditor />`
- `enableTab` overrides the Tab behaviour derived from `mode` and `tabIntentStyle` now, if it is set
- `enableTab={false}` lets Tab always move the focus, even for modes with tab indentation
- if it is not set, Tab is still handled as indentation for modes with `tabIntentStyle="tab"`
- `<AutoSuggestion />`
- Tab is only handled in the editor if `useTabForCompletions` is enabled, as side effect it currently also enables tab indentation
- `<StringPreviewContentBlobToggler />`
- `allowedHtmlElementsInPreview` option is set to inline elements on default
- uses now the `Markdown.cutOff` property
- this enables Markdown rendering even if the preview need to be shortened
- this may lead to slightly different preview lengths

### Fixed

- `<PropertyValuePair />`
- fix description and story to point out that `PropertyValueList` need always to be used as wrapper
- `<ApplicationViewability />`
- `show={"print"}` and `hide={"screen"}` content is still accessible by screen readers
- `<Label />`
- `tooltip` content is accessible via keyboard navigation
- `<Card />`
- fix color of first action button in info card
- BOM issue on compressed stylesheet
- first rule `selector` becomes `BOM:selector` that is valid but will never apply
- we fixed this problem by adding a dummy rule as first rule
- ESM distribution
- the imports of the `@codemirror/legacy-modes` modes were written with an additional `.js` suffix, but the `exports` map of this package only provides the extension-less sub paths, so they were expanded to unresolvable paths like `mode/jinja2.js.js`
- Storybook
- the `<Tab />` story imported the package root directory, this way the `exports` field of our own `package.json` pulled the built `dist/esm/` output into the preview bundle instead of the sources, and the Storybook build failed as soon as `dist/` existed
- the webpack configuration excludes `dist/` from module resolution now, so the sources are always used even if a story references the package root
- Added explicitly `assert` dependency
- the linter of `<CodeEditor />` uses `jshint`, which imports `console-browserify`, and this package requires the node core modules `assert` and `util` without declaring them; bundlers based on webpack 5 do not provide shims for node core modules anymore, so the polyfill (and `util` together with it) is part of the delivery now

### Deprecated

- `preventReactFlowActionsClasses`: use `ClassNames.ReactFlow.preventAllActions`

## [26.1.0] - 2026-08-20

### Added

- `utils`
- `useComputedStyleFallback` option for `CssCustomProperties`: if the CSSOM does not provide any property name for the used selector, e.g. because the declarations are part of a constructed and adopted stylesheet, then the names are read from the computed style of the matching element; disabled by default because the computed style also contains all inherited custom properties

Expand Down
7 changes: 1 addition & 6 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript", "@babel/preset-flow"],
"plugins": [
["@babel/plugin-transform-private-methods", { "loose": true }],
["@babel/plugin-transform-private-property-in-object", { "loose": true }],
["@babel/plugin-transform-class-properties", { "loose": true }]
]
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"]
}
Loading
Loading