Skip to content

Commit b23d03f

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/extendActivityControl-CMEM-7150
2 parents 631e8af + e0b0e11 commit b23d03f

9 files changed

Lines changed: 202 additions & 18 deletions

File tree

.storybook/preview.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@ export const decorators = [
1919
];
2020

2121
export const parameters = {
22-
actions: { argTypesRegex: "^on[A-Z].*" },
22+
options: {
23+
storySort: {
24+
order: ["Configuration", "Components", "Forms", "Extensions", "CMEM", "*"],
25+
},
26+
},
27+
actions: {
28+
argTypesRegex: "^on[A-Z].*",
29+
},
2330
controls: {
2431
matchers: {
2532
color: /(background|color)$/i,

CHANGELOG.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
88

99
### Added
1010

11+
- `<ActivityControlWidget />`
12+
- Add parameter `active` to activity control action to set the `active` state of its button.
13+
- action now can have a `active` and `notification` property
1114
- `<ApplicationViewability />`
1215
- component for hiding elements in specific media
1316
- `<InlineText />`
1417
- force children to get displayed as inline content
15-
- `<DecoupledOverlay />`
18+
- `<DecoupledOverlay />`
1619
- similar to `ContextOverlay` component but not directly linked to a React element, it specifies the target in the DOM to get connected lazy
1720
- `<StringPreviewContentBlobToggler />`
1821
- `useOnly` property: specify if only parts of the content should be used for the shortened preview, this property replaces `firstNonEmptyLineOnly`
19-
- `<ActivityControlWidget />`
20-
- action now can have a `active` and `notification` property
2122
- `<ContextOverlay />`
2223
- `paddingSize` property to add easily some white space
24+
- CSS custom properties
25+
- beside the color palette we now mirror the most important layout configuration variables as CSS custom properties
2326
- new icons:
2427
- `state-confirmed-all`
2528
- `state-declined-all`
@@ -35,9 +38,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
3538
- fix `disabled` property update
3639
- `<VisualTour />`
3740
- fix color of buttons to move to previous/next step
41+
- take Markdown rendering into account before testing the maximum preview length
42+
- `<NodeContent />`
43+
- header-menu items are vertically centered now
44+
- `Typography`
45+
- adjust displaying fallback symbols in different browsers
3846

3947
### Changed
4048

49+
- `<MultiSelect />`:
50+
- Change default filter predicate to match multi-word queries.
51+
- `<EdgeDefault />`
52+
- reduce stroke width to only 1px
4153
- automatically hide user interaction elements in print view
4254
- all application header components except `<WorkspaceHeader />`
4355
- `<CardActions />` and `<CardOptions />`
@@ -48,8 +60,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
4860
- `<FlexibleLayoutItem />`
4961
- `<GridColumn />`
5062
- `<PropertyName />` and `<PropertyValue />`
51-
- `<EdgeDefault />`
52-
- reduce stroke width to only 1px
5363

5464
### Deprecated
5565

@@ -60,16 +70,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
6070

6171
This is a major release, and it might be not compatible with your current usage of our library. Please read about the necessary changes in the section about how to migrate.
6272

63-
### Added
64-
65-
- `<ActivityControlWidget />`
66-
- Add parameter `active` to activity control action to set the `active` state of its button.
67-
68-
### Changed
69-
70-
- `<MultiSelect />`:
71-
- Change default filter predicate to match multi-word queries.
72-
7373
### Migration from v24 to v25
7474

7575
- remove deprecated components, properties and imports from your project, if the info cannot be found here then it was already mentioned in **Deprecated** sections of the past changelogs

src/components/Application/_colors.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@use "sass:list";
33

44
:root {
5+
// creating css custom properties from palette colors
56
@each $palette-group-name, $palette-group-tints in $eccgui-color-palette-light {
67
@each $palette-tint-name, $palette-tint-colors in $palette-group-tints {
78
@for $i from 1 through list.length($palette-tint-colors) {
@@ -12,4 +13,18 @@
1213
}
1314
}
1415
}
16+
17+
// set aliases for base colors
18+
--#{$eccgui}-color-primary: #{$eccgui-color-primary};
19+
--#{$eccgui}-color-primary-contrast: #{$eccgui-color-primary-contrast};
20+
--#{$eccgui}-color-accent: #{$eccgui-color-accent};
21+
--#{$eccgui}-color-accent-contrast: #{$eccgui-color-accent-contrast};
22+
--#{$eccgui}-color-success-foreground: #{$eccgui-color-success-text};
23+
--#{$eccgui}-color-success-background: #{$eccgui-color-success-background};
24+
--#{$eccgui}-color-info-foreground: #{$eccgui-color-info-text};
25+
--#{$eccgui}-color-info-background: #{$eccgui-color-info-background};
26+
--#{$eccgui}-color-warning-foreground: #{$eccgui-color-warning-text};
27+
--#{$eccgui}-color-warning-background: #{$eccgui-color-warning-background};
28+
--#{$eccgui}-color-danger-foreground: #{$eccgui-color-danger-text};
29+
--#{$eccgui}-color-danger-background: #{$eccgui-color-danger-background};
1530
}

src/components/Tabs/stories/TabTitle.stories.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import React from "react";
22
import { Meta, StoryFn } from "@storybook/react";
33

4-
import { Tabs, TabTitle as TabTitleOrg } from "./../../../";
4+
import { Tabs, TabTitle as TabTitleOrg, TabTitleProps } from "./../../../";
55

66
export default {
77
title: "Components/Tabs/TabTitle",
88
component: TabTitleOrg,
99
argTypes: {},
1010
} as Meta<typeof TabTitleOrg>;
1111

12-
const TabTitle = (args) => {
12+
const TabTitle = (args: React.JSX.IntrinsicAttributes & TabTitleProps) => {
1313
return (
1414
<Tabs
1515
id="titledemo"
@@ -31,3 +31,8 @@ TabTitleElement.args = {
3131
titlePrefix: "[",
3232
titleSuffix: <span>]</span>,
3333
};
34+
35+
export const TabTitleSymbolElement = TemplateFull.bind({});
36+
TabTitleSymbolElement.args = {
37+
text: "★",
38+
};

src/components/Typography/_reset.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ select,
77
input,
88
textarea {
99
font-family: inherit;
10+
font-size-adjust: inherit;
1011
border-radius: 0;
1112
}
1213

src/components/Typography/typography.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ body {
1717
text-rendering: optimizelegibility;
1818
-webkit-font-smoothing: antialiased;
1919
-moz-osx-font-smoothing: grayscale;
20+
// User-facing text may contain Unicode symbols (e.g. "★") that fall outside the primary font stack.
21+
// Browsers pick different system fallback fonts for such characters, causing glyphs to render at
22+
// different optical sizes (smaller in Firefox). font-size-adjust normalises the fallback font size
23+
// by matching the primary font's x-height, reducing the visual size discrepancy across browsers.
24+
font-size-adjust: from-font;
2025
}
2126

2227
code {
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* We mirror our SCSS variables here to improve availability in inline styles
3+
* and module styles without included SCSS config stack.
4+
* Colors are set in `src/components/Application/_colors.scss`.
5+
*/
6+
7+
:root {
8+
--#{$eccgui}-size-typo-caption: #{$eccgui-size-typo-caption};
9+
--#{$eccgui}-size-typo-caption-lineheight: #{$eccgui-size-typo-caption-lineheight};
10+
--#{$eccgui}-size-typo-text: #{$eccgui-size-typo-text};
11+
--#{$eccgui}-size-typo-text-lineheight: #{$eccgui-size-typo-text-lineheight};
12+
--#{$eccgui}-size-typo-subtitle: #{$eccgui-size-typo-subtitle};
13+
--#{$eccgui}-size-typo-subtitle-lineheight: #{$eccgui-size-typo-subtitle-lineheight};
14+
--#{$eccgui}-size-typo-title: #{$eccgui-size-typo-title};
15+
--#{$eccgui}-size-typo-title-lineheight: #{$eccgui-size-typo-title-lineheight};
16+
--#{$eccgui}-size-typo-headline: #{$eccgui-size-typo-headline};
17+
--#{$eccgui}-size-typo-headline-lineheight: #{$eccgui-size-typo-headline-lineheight};
18+
--#{$eccgui}-font-weight-light: #{$eccgui-font-weight-light};
19+
--#{$eccgui}-font-weight-regular: #{$eccgui-font-weight-regular};
20+
--#{$eccgui}-font-weight-bold: #{$eccgui-font-weight-bold};
21+
--#{$eccgui}-font-spacing-condensed: #{$eccgui-font-spacing-condensed};
22+
--#{$eccgui}-font-spacing-regular: #{$eccgui-font-spacing-regular};
23+
--#{$eccgui}-font-spacing-wide: #{$eccgui-font-spacing-wide};
24+
--#{$eccgui}-size-block-whitespace: #{$eccgui-size-block-whitespace};
25+
--#{$eccgui}-size-inline-whitespace: #{$eccgui-size-inline-whitespace};
26+
--#{$eccgui}-opacity-regular: #{$eccgui-opacity-regular};
27+
--#{$eccgui}-opacity-narrow: #{$eccgui-opacity-narrow};
28+
--#{$eccgui}-opacity-muted: #{$eccgui-opacity-muted};
29+
--#{$eccgui}-opacity-disabled: #{$eccgui-opacity-disabled};
30+
--#{$eccgui}-opacity-ghostly: #{$eccgui-opacity-ghostly};
31+
--#{$eccgui}-opacity-invisible: #{$eccgui-opacity-invisible};
32+
}
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
import React from "react";
2+
import { Meta, StoryFn } from "@storybook/react";
3+
4+
import CssCustomProperties from "../../common/utils/CssCustomProperties";
5+
import {
6+
Section,
7+
SectionHeader,
8+
Spacing,
9+
Table,
10+
TableBody,
11+
TableCell,
12+
TableContainer,
13+
TableHead,
14+
TableHeader,
15+
TableRow,
16+
TitleSubsection,
17+
} from "../../components";
18+
import { CLASSPREFIX as eccgui } from "../../index";
19+
20+
const groups: { title: string; filterName: (name: string) => boolean }[] = [
21+
{
22+
title: "Typography",
23+
filterName: (name) => name.startsWith(`--${eccgui}-size-typo`),
24+
},
25+
{
26+
title: "Font weights and spacing",
27+
filterName: (name) => name.startsWith(`--${eccgui}-font`),
28+
},
29+
{
30+
title: "Whitespace",
31+
filterName: (name) => name.startsWith(`--${eccgui}-size-block`) || name.startsWith(`--${eccgui}-size-inline`),
32+
},
33+
{
34+
title: "Color aliases",
35+
filterName: (name) => name.startsWith(`--${eccgui}-color`) && !name.startsWith(`--${eccgui}-color-palette`),
36+
},
37+
{
38+
title: "Opacity",
39+
filterName: (name) => name.startsWith(`--${eccgui}-opacity`),
40+
},
41+
{
42+
title: "Palette colors",
43+
filterName: (name) => name.startsWith(`--${eccgui}-color-palette`),
44+
},
45+
];
46+
47+
const CssCustomPropertiesOverview = () => {
48+
return (
49+
<>
50+
{groups.map(({ title, filterName }) => {
51+
const properties = new CssCustomProperties({
52+
selectorText: ":root",
53+
filterName,
54+
removeDashPrefix: false,
55+
returnObject: false,
56+
}).customProperties() as string[][];
57+
58+
return (
59+
<React.Fragment key={title}>
60+
<Section>
61+
<SectionHeader>
62+
<TitleSubsection>{title}</TitleSubsection>
63+
</SectionHeader>
64+
<Spacing size="tiny" />
65+
<TableContainer>
66+
<Table columnWidths={["60%", "40%"]}>
67+
<TableHead>
68+
<TableRow>
69+
<TableHeader>CSS custom property</TableHeader>
70+
<TableHeader>Current value</TableHeader>
71+
</TableRow>
72+
</TableHead>
73+
<TableBody>
74+
{properties.map(([name, value]) => (
75+
<TableRow key={name}>
76+
<TableCell>
77+
<code>{name}</code>
78+
</TableCell>
79+
<TableCell>
80+
{name.startsWith(`--${eccgui}-color`) && (
81+
<span
82+
style={{
83+
display: "inline-block",
84+
width: `var(--${eccgui}-size-block-whitespace)`,
85+
height: `var(--${eccgui}-size-block-whitespace)`,
86+
backgroundColor: value,
87+
verticalAlign: "middle",
88+
marginRight: `var(--${eccgui}-size-inline-whitespace)`,
89+
border: "1px solid currentColor",
90+
}}
91+
/>
92+
)}
93+
<code>{value}</code>
94+
</TableCell>
95+
</TableRow>
96+
))}
97+
</TableBody>
98+
</Table>
99+
</TableContainer>
100+
</Section>
101+
<Spacing size="large" />
102+
</React.Fragment>
103+
);
104+
})}
105+
</>
106+
);
107+
};
108+
109+
/**
110+
* We mirror our SCSS configuration variables as CSS custom vars.
111+
* This way they can be easily used for inline styles or in CSS modules without SCSS includes.
112+
*/
113+
export default {
114+
title: "Configuration/CSS Custom Properties",
115+
component: CssCustomPropertiesOverview,
116+
} as Meta<typeof CssCustomPropertiesOverview>;
117+
118+
export const Default: StoryFn = () => <CssCustomPropertiesOverview />;

src/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// == load default configuration ===============================================
1010

1111
@import "./configuration/variables";
12+
@import "./configuration/customproperties"; // mirror config as custom properties
1213

1314
// == Necessary imports from libraries =========================================
1415

0 commit comments

Comments
 (0)