@boostdev/design-system-components 2.12.1 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +23 -1
- package/README.md +6 -0
- package/dist/client.cjs +52 -52
- package/dist/client.css +600 -601
- package/dist/client.js +52 -52
- package/dist/index.cjs +52 -52
- package/dist/index.css +600 -601
- package/dist/index.js +52 -52
- package/dist/web-components/{chunk-SFZ6Q4BP.js → chunk-5HUAFCU6.js} +1 -1
- package/dist/web-components/{chunk-YFAXGRPR.js → chunk-6ZNQPSQJ.js} +1 -1
- package/dist/web-components/{chunk-JMCXAAFK.js → chunk-HBLJ4SLY.js} +2 -2
- package/dist/web-components/{chunk-FUQEFHRC.js → chunk-SOYAOLKR.js} +1 -1
- package/dist/web-components/{chunk-F3ZDNHZZ.js → chunk-Z3BPJNEL.js} +1 -1
- package/dist/web-components/index.js +5 -5
- package/dist/web-components/interaction/bds-accordion-item.js +1 -1
- package/dist/web-components/interaction/bds-drawer.js +1 -1
- package/dist/web-components/interaction/bds-tabs.js +1 -1
- package/dist/web-components/ui/bds-separator.js +1 -1
- package/dist/web-components/ui/bds-table.js +1 -1
- package/package.json +2 -2
- package/src/components/interaction/Drawer/Drawer.mdx +1 -0
- package/src/components/interaction/Drawer/Drawer.module.css +1 -1
- package/src/components/interaction/DropdownMenu/DropdownMenu.mdx +1 -0
- package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +1 -2
- package/src/components/ui/Accordion/Accordion.mdx +1 -0
- package/src/components/ui/Accordion/Accordion.module.css +1 -1
- package/src/components/ui/Separator/Separator.mdx +1 -1
- package/src/components/ui/Separator/Separator.module.css +1 -1
- package/src/components/ui/Table/Table.mdx +1 -0
- package/src/components/ui/Table/Table.module.css +2 -2
- package/src/components/ui/Tabs/Tabs.mdx +1 -0
- package/src/components/ui/Tabs/Tabs.module.css +1 -1
- package/src/stories/DesignSystem/Colors.mdx +14 -0
- package/src/stories/DesignSystem/Overview.mdx +3 -0
- package/src/stories/DesignSystem/TokenSets.mdx +291 -0
- package/src/test/token-contract.spec.ts +71 -0
- package/src/web-components/interaction/BdsAccordion.mdx +1 -0
- package/src/web-components/interaction/BdsDrawer.mdx +10 -0
- package/src/web-components/interaction/BdsTabs.mdx +1 -0
- package/src/web-components/interaction/bds-accordion-item.ts +1 -1
- package/src/web-components/interaction/bds-drawer.spec.ts +7 -0
- package/src/web-components/interaction/bds-drawer.ts +1 -1
- package/src/web-components/interaction/bds-tabs.ts +1 -1
- package/src/web-components/ui/BdsSeparator.mdx +1 -1
- package/src/web-components/ui/BdsTable.mdx +1 -0
- package/src/web-components/ui/bds-separator.spec.ts +7 -0
- package/src/web-components/ui/bds-separator.ts +1 -1
- package/src/web-components/ui/bds-table.ts +2 -2
|
@@ -87,6 +87,16 @@ Open or close the drawer declaratively using the Invoker Commands API. `<bds-dra
|
|
|
87
87
|
<button commandfor="my-drawer" command="--close">Close</button>
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
+
## CSS Custom Properties
|
|
91
|
+
|
|
92
|
+
| Property | Default | Description |
|
|
93
|
+
|----------|---------|-------------|
|
|
94
|
+
| `--drawer_color` | `--bds-color_bg--strong` (falls back to `--bds-color_bg`) | Panel background colour |
|
|
95
|
+
| `--drawer_on-color` | `--bds-color_on-bg` | Panel text colour |
|
|
96
|
+
| `--drawer_border-color` | `--bds-color_on-bg--as-surface` | Header rule colour — the non-text member of the colour set, so 3:1 rather than the 4.5:1 the text colour carries |
|
|
97
|
+
| `--drawer_close-radius` | `--bds-border_radius--circle` | Close button corner radius |
|
|
98
|
+
| `--drawer_close-bg--hover` | `--bds-color_bg--subtle` | Close button background on hover |
|
|
99
|
+
|
|
90
100
|
## Usage in plain HTML
|
|
91
101
|
|
|
92
102
|
```html
|
|
@@ -96,6 +96,7 @@ across every state; set `--tab_color--active` to theme only the selected tab.
|
|
|
96
96
|
|
|
97
97
|
| Property | Description |
|
|
98
98
|
|----------|-------------|
|
|
99
|
+
| `--tabs_divider-color` | Colour of the rail under the tablist (default: `--bds-color_on-bg--as-surface`, the non-text member of the set — ≥ 3:1, not a ground colour) |
|
|
99
100
|
| `--tab_color` | Tab text colour override (all states) |
|
|
100
101
|
| `--tab_border-color` | Tab bottom-border colour override (all states) |
|
|
101
102
|
| `--tab_color--active` | Text colour override for the selected tab |
|
|
@@ -39,7 +39,7 @@ export class BdsAccordionItem extends LitElement {
|
|
|
39
39
|
|
|
40
40
|
:host {
|
|
41
41
|
display: block;
|
|
42
|
-
border-block-end: 1px solid var(--bds-color_bg--subtle);
|
|
42
|
+
border-block-end: 1px solid var(--accordion_divider-color, var(--bds-color_on-bg--as-surface, var(--bds-color_on-bg--border, var(--bds-color_bg--subtle))));
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
:host(:last-child) {
|
|
@@ -199,4 +199,11 @@ describe('bds-drawer', () => {
|
|
|
199
199
|
expect(focusSpy).toHaveBeenCalled();
|
|
200
200
|
cleanup(el);
|
|
201
201
|
});
|
|
202
|
+
|
|
203
|
+
it('paints the header rule with the non-text member of the colour set', () => {
|
|
204
|
+
const cssText = BdsDrawer.styles.cssText;
|
|
205
|
+
expect(cssText).toMatch(
|
|
206
|
+
/border-block-end:\s*1px solid var\(--drawer_border-color,\s*var\(--bds-color_on-bg--as-surface,/,
|
|
207
|
+
);
|
|
208
|
+
});
|
|
202
209
|
});
|
|
@@ -121,7 +121,7 @@ export class BdsDrawer extends LitElement {
|
|
|
121
121
|
align-items: center;
|
|
122
122
|
justify-content: space-between;
|
|
123
123
|
padding: var(--bds-space_m) var(--bds-space_l);
|
|
124
|
-
border-block-end: 1px solid
|
|
124
|
+
border-block-end: 1px solid var(--drawer_border-color, var(--bds-color_on-bg--as-surface, var(--bds-color_on-bg--border, var(--bds-color_on-bg))));
|
|
125
125
|
flex-shrink: 0;
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -43,7 +43,7 @@ export class BdsTabs extends LitElement {
|
|
|
43
43
|
|
|
44
44
|
.tablist {
|
|
45
45
|
display: flex;
|
|
46
|
-
border-block-end: 1px solid var(--bds-color_bg--subtle);
|
|
46
|
+
border-block-end: 1px solid var(--tabs_divider-color, var(--bds-color_on-bg--as-surface, var(--bds-color_on-bg--border, var(--bds-color_bg--subtle))));
|
|
47
47
|
gap: var(--bds-space_xxs);
|
|
48
48
|
}
|
|
49
49
|
`;
|
|
@@ -54,7 +54,7 @@ Or in HTML without a bundler:
|
|
|
54
54
|
|
|
55
55
|
| Property | Description |
|
|
56
56
|
|----------|-------------|
|
|
57
|
-
| `--separator_color` | Line colour (defaults to `--bds-color_on-bg
|
|
57
|
+
| `--separator_color` | Line colour (defaults to `--bds-color_on-bg--as-surface`, the non-text member of the set — a rule is not text, so it needs 3:1, not 4.5:1) |
|
|
58
58
|
| `--separator_thickness` | Line thickness (default: `1px`) |
|
|
59
59
|
|
|
60
60
|
## Usage in plain HTML
|
|
@@ -56,6 +56,7 @@ import '@boostdev/design-system-components/web-components';
|
|
|
56
56
|
|
|
57
57
|
| Property | Description |
|
|
58
58
|
|----------|-------------|
|
|
59
|
+
| `--table_divider-color` | Colour of the header underline and row rules (default: `--bds-color_on-bg--as-surface`, the non-text member of the set — ≥ 3:1, not a ground colour) |
|
|
59
60
|
| `--table_border` | Wrapper border (default: `none`) |
|
|
60
61
|
| `--table_radius` | Wrapper corner radius (default: `var(--bdc-outline_radius)`, itself set to `var(--bds-border_radius--s)` on the wrapper) |
|
|
61
62
|
| `--table_row-bg--hover` | Row background on hover, pointer devices only (default: `var(--bds-color_bg--subtle)`) |
|
|
@@ -47,4 +47,11 @@ describe('bds-separator', () => {
|
|
|
47
47
|
expect(el.getAttribute('orientation')).toBe('vertical');
|
|
48
48
|
cleanup(el);
|
|
49
49
|
});
|
|
50
|
+
|
|
51
|
+
it('paints the line with the non-text member of the colour set', () => {
|
|
52
|
+
const cssText = BdsSeparator.styles.cssText;
|
|
53
|
+
expect(cssText).toMatch(
|
|
54
|
+
/background-color:\s*var\(--separator_color,\s*var\(--bds-color_on-bg--as-surface,/,
|
|
55
|
+
);
|
|
56
|
+
});
|
|
50
57
|
});
|
|
@@ -33,7 +33,7 @@ export class BdsSeparator extends LitElement {
|
|
|
33
33
|
|
|
34
34
|
.separator {
|
|
35
35
|
border: none;
|
|
36
|
-
background-color: var(--separator_color, var(--bds-color_on-bg));
|
|
36
|
+
background-color: var(--separator_color, var(--bds-color_on-bg--as-surface, var(--bds-color_on-bg--border, var(--bds-color_on-bg))));
|
|
37
37
|
display: block;
|
|
38
38
|
inline-size: 100%;
|
|
39
39
|
block-size: var(--separator_thickness, 1px);
|
|
@@ -20,13 +20,13 @@ const tableLightDomCss = `
|
|
|
20
20
|
font-size: var(--bds-font_size--body--s);
|
|
21
21
|
text-align: start;
|
|
22
22
|
color: var(--bds-color_on-bg--subtle);
|
|
23
|
-
border-block-end: 1px solid var(--bds-color_bg--subtle);
|
|
23
|
+
border-block-end: 1px solid var(--table_divider-color, var(--bds-color_on-bg--as-surface, var(--bds-color_on-bg--border, var(--bds-color_bg--subtle))));
|
|
24
24
|
white-space: nowrap;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
bds-table > table td {
|
|
28
28
|
padding: var(--bds-space_s) var(--bds-space_m);
|
|
29
|
-
border-block-end: 1px solid var(--bds-color_bg--subtle);
|
|
29
|
+
border-block-end: 1px solid var(--table_divider-color, var(--bds-color_on-bg--as-surface, var(--bds-color_on-bg--border, var(--bds-color_bg--subtle))));
|
|
30
30
|
vertical-align: middle;
|
|
31
31
|
}
|
|
32
32
|
|