@boostdev/design-system-components 1.0.1 → 1.0.3
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 +19 -17
- package/dist/client.cjs +50 -50
- package/dist/client.css +719 -700
- package/dist/client.js +50 -50
- package/dist/index.cjs +50 -50
- package/dist/index.css +719 -700
- package/dist/index.js +50 -50
- package/package.json +3 -3
- package/src/components/interaction/Button/Button.module.css +8 -8
- package/src/components/interaction/Command/Command.module.css +12 -12
- package/src/components/interaction/Dialog/Dialog.module.css +3 -3
- package/src/components/interaction/Drawer/Drawer.module.css +3 -3
- package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +4 -4
- package/src/components/interaction/Popover/Popover.module.css +2 -2
- package/src/components/interaction/Rating/Rating.module.css +2 -2
- package/src/components/interaction/Toast/Toast.module.css +10 -10
- package/src/components/interaction/form/Checkbox/Checkbox.module.css +5 -5
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.module.css +2 -2
- package/src/components/interaction/form/Combobox/Combobox.module.css +8 -8
- package/src/components/interaction/form/FileInput/FileInput.module.css +8 -8
- package/src/components/interaction/form/FormInput/FormInput.module.css +2 -2
- package/src/components/interaction/form/NumberInput/NumberInput.module.css +4 -4
- package/src/components/interaction/form/Radio/Radio.module.css +6 -6
- package/src/components/interaction/form/RadioGroup/RadioGroup.module.css +2 -2
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +6 -6
- package/src/components/interaction/form/Select/Select.module.css +3 -3
- package/src/components/interaction/form/Slider/Slider.module.css +14 -14
- package/src/components/interaction/form/Switch/Switch.module.css +8 -8
- package/src/components/interaction/form/Textarea/Textarea.module.css +2 -2
- package/src/components/interaction/form/atoms/Label.module.css +1 -1
- package/src/components/interaction/form/atoms/Message.module.css +1 -1
- package/src/components/layout/Card/Card.module.css +2 -2
- package/src/components/layout/IconWrapper/IconWrapper.module.css +3 -3
- package/src/components/layout/SectionHeader/SectionHeader.module.css +2 -2
- package/src/components/ui/Accordion/Accordion.module.css +5 -5
- package/src/components/ui/Alert/Alert.module.css +15 -15
- package/src/components/ui/Avatar/Avatar.module.css +2 -2
- package/src/components/ui/Badge/Badge.module.css +12 -12
- package/src/components/ui/Breadcrumb/Breadcrumb.module.css +3 -3
- package/src/components/ui/Calendar/Calendar.module.css +11 -11
- package/src/components/ui/Carousel/Carousel.module.css +4 -4
- package/src/components/ui/Collapsible/Collapsible.module.css +6 -6
- package/src/components/ui/DescriptionList/DescriptionList.module.css +3 -3
- package/src/components/ui/Link/Link.module.css +8 -8
- package/src/components/ui/Loading/Loading.module.css +2 -2
- package/src/components/ui/NotificationBanner/NotificationBanner.module.css +15 -15
- package/src/components/ui/Pagination/Pagination.module.css +8 -8
- package/src/components/ui/Progress/Progress.module.css +3 -3
- package/src/components/ui/ProgressCircle/ProgressCircle.module.css +3 -3
- package/src/components/ui/Separator/Separator.module.css +1 -1
- package/src/components/ui/Skeleton/Skeleton.module.css +3 -3
- package/src/components/ui/SkipLink/SkipLink.module.css +3 -3
- package/src/components/ui/Table/Table.module.css +11 -11
- package/src/components/ui/Tabs/Tabs.module.css +5 -5
- package/src/components/ui/Tooltip/Tooltip.module.css +2 -2
- package/src/components/ui/Typography/Typography.module.css +1 -1
- package/src/css/bdc.css +2 -2
- package/src/index.ts +2 -0
- package/src/stories/DesignSystem/Borders.mdx +7 -7
- package/src/stories/DesignSystem/Colors.mdx +28 -29
- package/src/stories/DesignSystem/Elevation.mdx +4 -4
- package/src/stories/DesignSystem/Grid.mdx +5 -5
- package/src/stories/DesignSystem/Motion.mdx +2 -2
- package/src/stories/DesignSystem/Overview.mdx +1 -1
- package/src/stories/DesignSystem/Spacing.mdx +3 -3
- package/src/stories/DesignSystem/Typography.mdx +6 -6
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.track {
|
|
14
|
-
stroke: var(--bds-
|
|
14
|
+
stroke: var(--bds-color_bg--subtle);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.fill {
|
|
18
|
-
stroke: var(--progressCircle_color-active, var(--bds-
|
|
18
|
+
stroke: var(--progressCircle_color-active, var(--bds-color_green));
|
|
19
19
|
transition: stroke-dashoffset var(--bds-animation_transition-duration) var(--bds-animation_easing);
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
font-size: var(--bds-font_size--body--s);
|
|
25
25
|
font-weight: var(--bds-font_weight--semibold);
|
|
26
26
|
font-variant-numeric: tabular-nums;
|
|
27
|
-
color: var(--bds-
|
|
27
|
+
color: var(--bds-color_on-bg);
|
|
28
28
|
line-height: 1;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
.skeleton {
|
|
3
3
|
background: linear-gradient(
|
|
4
4
|
90deg,
|
|
5
|
-
var(--bds-
|
|
6
|
-
var(--bds-
|
|
7
|
-
var(--bds-
|
|
5
|
+
var(--bds-color_grey--subtle) 25%,
|
|
6
|
+
var(--bds-color_bg) 50%,
|
|
7
|
+
var(--bds-color_grey--subtle) 75%
|
|
8
8
|
);
|
|
9
9
|
background-size: 200% 100%;
|
|
10
10
|
animation: shimmer 1.5s infinite;
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
inset-inline-start: var(--bds-space_s);
|
|
6
6
|
z-index: var(--z_overlay);
|
|
7
7
|
padding: var(--bds-space_xs) var(--bds-space_m);
|
|
8
|
-
background-color: var(--bds-
|
|
9
|
-
color: var(--bds-
|
|
8
|
+
background-color: var(--bds-color_bg);
|
|
9
|
+
color: var(--bds-color_on-bg);
|
|
10
10
|
font-size: var(--bds-font_size--body);
|
|
11
11
|
font-weight: var(--bds-font_weight--semibold);
|
|
12
12
|
border-radius: var(--bds-border_radius--s);
|
|
13
13
|
text-decoration: none;
|
|
14
14
|
|
|
15
|
-
--bdc_color: var(--color_focus, var(--bds-
|
|
15
|
+
--bdc_color: var(--color_focus, var(--bds-color_interactive));
|
|
16
16
|
|
|
17
17
|
border: var(--skip-link_border, none);
|
|
18
18
|
outline: var(--bdc-outline_width) solid var(--bdc_color);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
width: 100%;
|
|
4
4
|
overflow-x: auto;
|
|
5
5
|
border: var(--table_border, none);
|
|
6
|
-
--bdc_color: var(--bds-
|
|
6
|
+
--bdc_color: var(--bds-color_bg--subtle);
|
|
7
7
|
--bdc-outline_radius: var(--bds-border_radius--s);
|
|
8
8
|
|
|
9
9
|
outline: var(--bdc-outline_width) solid var(--bdc_color);
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
text-align: start;
|
|
24
24
|
padding: var(--bds-space_s) var(--bds-space_m);
|
|
25
25
|
font-weight: var(--bds-font_weight--semibold);
|
|
26
|
-
color: var(--bds-
|
|
26
|
+
color: var(--bds-color_on-bg);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.thead {
|
|
30
|
-
background-color: var(--bds-
|
|
30
|
+
background-color: var(--bds-color_bg--subtle);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.th {
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
text-align: start;
|
|
36
36
|
font-weight: var(--bds-font_weight--semibold);
|
|
37
37
|
font-size: var(--bds-font_size--body--s);
|
|
38
|
-
color: var(--bds-
|
|
38
|
+
color: var(--bds-color_on-bg--subtle);
|
|
39
39
|
white-space: nowrap;
|
|
40
|
-
border-bottom: 1px solid var(--bds-
|
|
40
|
+
border-bottom: 1px solid var(--bds-color_bg--subtle);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.th.--sortable {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
padding: var(--bds-space_s) var(--bds-space_m);
|
|
53
53
|
width: 100%;
|
|
54
54
|
cursor: pointer;
|
|
55
|
-
color: var(--bds-
|
|
55
|
+
color: var(--bds-color_on-bg--subtle);
|
|
56
56
|
font-weight: var(--bds-font_weight--semibold);
|
|
57
57
|
font-size: var(--bds-font_size--body--s);
|
|
58
58
|
transition: var(--bds-animation_transition);
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
|
|
67
67
|
@media (hover: hover) and (pointer: fine) {
|
|
68
68
|
.sortButton:hover {
|
|
69
|
-
color: var(--bds-
|
|
69
|
+
color: var(--bds-color_on-bg);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
|
|
81
81
|
.sortIcon.--sort-active {
|
|
82
82
|
opacity: 1;
|
|
83
|
-
color: var(--bds-
|
|
83
|
+
color: var(--bds-color_interactive);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.sortIcon.--sort-desc {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
.tbody .tr {
|
|
91
|
-
border-bottom: 1px solid var(--bds-
|
|
91
|
+
border-bottom: 1px solid var(--bds-color_bg--subtle);
|
|
92
92
|
transition: var(--bds-animation_transition);
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -98,13 +98,13 @@
|
|
|
98
98
|
|
|
99
99
|
@media (hover: hover) and (pointer: fine) {
|
|
100
100
|
.tbody .tr:hover {
|
|
101
|
-
background-color: var(--bds-
|
|
101
|
+
background-color: var(--bds-color_bg--subtle);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
.td {
|
|
106
106
|
padding: var(--bds-space_s) var(--bds-space_m);
|
|
107
|
-
color: var(--bds-
|
|
107
|
+
color: var(--bds-color_on-bg);
|
|
108
108
|
vertical-align: middle;
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
.tabList {
|
|
8
8
|
display: flex;
|
|
9
|
-
border-bottom: 1px solid var(--bds-
|
|
9
|
+
border-bottom: 1px solid var(--bds-color_bg--subtle);
|
|
10
10
|
gap: var(--bds-space_xxs);
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
font-family: var(--bds-font_family--body);
|
|
19
19
|
font-size: var(--bds-font_size--body);
|
|
20
20
|
font-weight: var(--bds-font_weight--semibold);
|
|
21
|
-
color: var(--tab_color, var(--bds-
|
|
21
|
+
color: var(--tab_color, var(--bds-color_on-bg));
|
|
22
22
|
border-bottom: 2px solid var(--tab_border-color, transparent);
|
|
23
23
|
margin-bottom: -1px;
|
|
24
24
|
cursor: pointer;
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.tab.--active {
|
|
29
|
-
--tab_color: var(--bds-
|
|
30
|
-
--tab_border-color: var(--bds-
|
|
29
|
+
--tab_color: var(--bds-color_interactive_on-bg);
|
|
30
|
+
--tab_border-color: var(--bds-color_interactive);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.tab:disabled {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
@media (hover: hover) and (pointer: fine) {
|
|
45
45
|
.tab:not(:disabled, .--active):hover {
|
|
46
|
-
--tab_color: var(--bds-
|
|
46
|
+
--tab_color: var(--bds-color_interactive_on-bg);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
z-index: var(--bds-z-index_popover);
|
|
11
11
|
padding: var(--bds-space_xxs) var(--bds-space_xs);
|
|
12
12
|
border-radius: var(--bds-border_radius--xs);
|
|
13
|
-
background-color: var(--tooltip_bg, var(--bds-
|
|
14
|
-
color: var(--tooltip_text, var(--bds-
|
|
13
|
+
background-color: var(--tooltip_bg, var(--bds-color_on-bg));
|
|
14
|
+
color: var(--tooltip_text, var(--bds-color_bg));
|
|
15
15
|
font-size: var(--bds-font_size--body--s);
|
|
16
16
|
line-height: var(--bds-font_line-height--body);
|
|
17
17
|
white-space: nowrap;
|
package/src/css/bdc.css
CHANGED
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
|
|
53
53
|
/* Colour tokens (kept as --bdc_color — see naming note above) */
|
|
54
54
|
--bdc_color: currentcolor;
|
|
55
|
-
--bdc_color--focus: var(--bds-
|
|
56
|
-
--bdc_color--error: var(--bds-
|
|
55
|
+
--bdc_color--focus: var(--bds-color_interactive);
|
|
56
|
+
--bdc_color--error: var(--bds-color_error);
|
|
57
57
|
|
|
58
58
|
/* Outline geometry */
|
|
59
59
|
--bdc-outline_width: 1px;
|
package/src/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ export const BorderDemo = ({ label, token, color = 'currentcolor', offset = '-1p
|
|
|
7
7
|
<div style={{
|
|
8
8
|
width: '8rem',
|
|
9
9
|
height: '5rem',
|
|
10
|
-
background: 'var(--bds-
|
|
10
|
+
background: 'var(--bds-color_bg)',
|
|
11
11
|
borderRadius: '0.5rem',
|
|
12
12
|
outline: `${width} solid ${color}`,
|
|
13
13
|
outlineOffset: offset,
|
|
@@ -64,11 +64,11 @@ Components use `outline` rather than `border` for their decorative edge. The rea
|
|
|
64
64
|
|
|
65
65
|
## Visual examples
|
|
66
66
|
|
|
67
|
-
<div style={{ display: 'flex', gap: '2.5rem', flexWrap: 'wrap', padding: '2rem', background: 'var(--bds-
|
|
67
|
+
<div style={{ display: 'flex', gap: '2.5rem', flexWrap: 'wrap', padding: '2rem', background: 'var(--bds-color_bg--subtle)', borderRadius: '0.75rem', marginBottom: '2rem' }}>
|
|
68
68
|
<BorderDemo label="Default" token="currentcolor" color="currentcolor" />
|
|
69
|
-
<BorderDemo label="Focus" token="--bdc_color--focus" color="var(--bds-
|
|
70
|
-
<BorderDemo label="Error" token="--bdc_color--error" color="var(--bds-
|
|
71
|
-
<BorderDemo label="Outer halo" token="--bdc-outline_offset: 2px" color="var(--bds-
|
|
69
|
+
<BorderDemo label="Focus" token="--bdc_color--focus" color="var(--bds-color_interactive)" />
|
|
70
|
+
<BorderDemo label="Error" token="--bdc_color--error" color="var(--bds-color_error)" />
|
|
71
|
+
<BorderDemo label="Outer halo" token="--bdc-outline_offset: 2px" color="var(--bds-color_interactive)" offset="2px" width="2px" />
|
|
72
72
|
</div>
|
|
73
73
|
|
|
74
74
|
| State | `--bdc_color` resolves to | Trigger |
|
|
@@ -123,13 +123,13 @@ Override a component's border colour for a specific context by reassigning `--bd
|
|
|
123
123
|
```css
|
|
124
124
|
/* Scoped to a single component instance */
|
|
125
125
|
.my-context .my-input {
|
|
126
|
-
--bdc_color: var(--bds-
|
|
126
|
+
--bdc_color: var(--bds-color_warning);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
/* Override globally via the token layer */
|
|
130
130
|
@layer tokens.override {
|
|
131
131
|
:root {
|
|
132
|
-
--bdc_color: var(--bds-
|
|
132
|
+
--bdc_color: var(--bds-color_green);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
```
|
|
@@ -47,12 +47,12 @@ export const TokenRow = ({ token, description }) => (
|
|
|
47
47
|
# Colours
|
|
48
48
|
|
|
49
49
|
Colours are the most visible part of the design system.
|
|
50
|
-
Every colour token comes in surface–content pairs: for every `--bds
|
|
50
|
+
Every colour token comes in surface–content pairs: for every `--bds-color_*` there is a `--bds-color_on-*` that guarantees WCAG AA contrast.
|
|
51
51
|
|
|
52
52
|
```css
|
|
53
53
|
.badge {
|
|
54
|
-
background-color: var(--bds-
|
|
55
|
-
color: var(--bds-
|
|
54
|
+
background-color: var(--bds-color_success--subtle);
|
|
55
|
+
color: var(--bds-color_on-success--subtle); /* always legible */
|
|
56
56
|
}
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -63,57 +63,56 @@ These are the tokens you should use in component CSS. They adapt automatically t
|
|
|
63
63
|
### Brand & intent
|
|
64
64
|
|
|
65
65
|
<SwatchRow>
|
|
66
|
-
<Swatch label="
|
|
67
|
-
<Swatch label="
|
|
68
|
-
<Swatch label="Brand" token="--bds-brand" bg="var(--bds-brand)" text="var(--bds-on-brand)" />
|
|
66
|
+
<Swatch label="Interactive" token="--bds-color_interactive" bg="var(--bds-color_interactive)" text="var(--bds-color_on-interactive)" />
|
|
67
|
+
<Swatch label="Green (CTA)" token="--bds-color_green" bg="var(--bds-color_green)" text="var(--bds-color_on-green)" />
|
|
69
68
|
</SwatchRow>
|
|
70
69
|
|
|
71
70
|
### Status
|
|
72
71
|
|
|
73
72
|
<SwatchRow>
|
|
74
|
-
<Swatch label="Success" token="--bds-
|
|
75
|
-
<Swatch label="Warning" token="--bds-
|
|
76
|
-
<Swatch label="Error" token="--bds-
|
|
77
|
-
<Swatch label="Important" token="--bds-
|
|
73
|
+
<Swatch label="Success" token="--bds-color_success" bg="var(--bds-color_success)" text="var(--bds-color_on-success)" />
|
|
74
|
+
<Swatch label="Warning" token="--bds-color_warning" bg="var(--bds-color_warning)" text="var(--bds-color_on-warning)" />
|
|
75
|
+
<Swatch label="Error" token="--bds-color_error" bg="var(--bds-color_error)" text="var(--bds-color_on-error)" />
|
|
76
|
+
<Swatch label="Important" token="--bds-color_important" bg="var(--bds-color_important)" text="var(--bds-color_on-important)" />
|
|
78
77
|
</SwatchRow>
|
|
79
78
|
|
|
80
79
|
### Surface
|
|
81
80
|
|
|
82
81
|
<SwatchRow>
|
|
83
|
-
<Swatch label="Background" token="--bds-
|
|
84
|
-
<Swatch label="Subtle background" token="--bds-
|
|
82
|
+
<Swatch label="Background" token="--bds-color_bg" bg="var(--bds-color_bg)" text="var(--bds-color_on-bg)" />
|
|
83
|
+
<Swatch label="Subtle background" token="--bds-color_bg--subtle" bg="var(--bds-color_bg--subtle)" text="var(--bds-color_on-bg--subtle)" />
|
|
85
84
|
</SwatchRow>
|
|
86
85
|
|
|
87
86
|
### Neutral grey scale
|
|
88
87
|
|
|
89
88
|
<SwatchRow>
|
|
90
|
-
<Swatch label="Grey subtle" token="--bds-
|
|
91
|
-
<Swatch label="Grey" token="--bds-
|
|
92
|
-
<Swatch label="Grey strong" token="--bds-
|
|
89
|
+
<Swatch label="Grey subtle" token="--bds-color_grey--subtle" bg="var(--bds-color_grey--subtle)" text="var(--bds-color_on-grey--subtle)" />
|
|
90
|
+
<Swatch label="Grey" token="--bds-color_grey" bg="var(--bds-color_grey)" text="var(--bds-color_on-grey)" />
|
|
91
|
+
<Swatch label="Grey strong" token="--bds-color_grey--strong" bg="var(--bds-color_grey--strong)" text="var(--bds-color_on-grey--strong)" />
|
|
93
92
|
</SwatchRow>
|
|
94
93
|
|
|
95
94
|
### Green scale
|
|
96
95
|
|
|
97
96
|
<SwatchRow>
|
|
98
|
-
<Swatch label="Green subtle" token="--bds-
|
|
99
|
-
<Swatch label="Green" token="--bds-
|
|
100
|
-
<Swatch label="Green strong" token="--bds-
|
|
97
|
+
<Swatch label="Green subtle" token="--bds-color_green--subtle" bg="var(--bds-color_green--subtle)" text="var(--bds-color_on-green--subtle)" />
|
|
98
|
+
<Swatch label="Green" token="--bds-color_green" bg="var(--bds-color_green)" text="var(--bds-color_on-green)" />
|
|
99
|
+
<Swatch label="Green strong" token="--bds-color_green--strong" bg="var(--bds-color_green--strong)" text="var(--bds-color_on-green--strong)" />
|
|
101
100
|
</SwatchRow>
|
|
102
101
|
|
|
103
102
|
### Blue scale
|
|
104
103
|
|
|
105
104
|
<SwatchRow>
|
|
106
|
-
<Swatch label="Blue subtle" token="--bds-
|
|
107
|
-
<Swatch label="Blue" token="--bds-
|
|
108
|
-
<Swatch label="Blue strong" token="--bds-
|
|
105
|
+
<Swatch label="Blue subtle" token="--bds-color_blue--subtle" bg="var(--bds-color_blue--subtle)" text="var(--bds-color_on-blue--subtle)" />
|
|
106
|
+
<Swatch label="Blue" token="--bds-color_blue" bg="var(--bds-color_blue)" text="var(--bds-color_on-blue)" />
|
|
107
|
+
<Swatch label="Blue strong" token="--bds-color_blue--strong" bg="var(--bds-color_blue--strong)" text="var(--bds-color_on-blue--strong)" />
|
|
109
108
|
</SwatchRow>
|
|
110
109
|
|
|
111
110
|
### Orange scale
|
|
112
111
|
|
|
113
112
|
<SwatchRow>
|
|
114
|
-
<Swatch label="Orange subtle" token="--bds-
|
|
115
|
-
<Swatch label="Orange" token="--bds-
|
|
116
|
-
<Swatch label="Orange strong" token="--bds-
|
|
113
|
+
<Swatch label="Orange subtle" token="--bds-color_orange--subtle" bg="var(--bds-color_orange--subtle)" text="var(--bds-color_on-orange--subtle)" />
|
|
114
|
+
<Swatch label="Orange" token="--bds-color_orange" bg="var(--bds-color_orange)" text="var(--bds-color_on-orange)" />
|
|
115
|
+
<Swatch label="Orange strong" token="--bds-color_orange--strong" bg="var(--bds-color_orange--strong)" text="var(--bds-color_on-orange--strong)" />
|
|
117
116
|
</SwatchRow>
|
|
118
117
|
|
|
119
118
|
---
|
|
@@ -182,15 +181,15 @@ These `--bds-BASE__color--*` tokens are the primitive values. **Do not use them
|
|
|
182
181
|
|
|
183
182
|
## Theming
|
|
184
183
|
|
|
185
|
-
Override `--bds-
|
|
184
|
+
Override `--bds-color_green` and `--bds-color_interactive` to change the primary action colour globally:
|
|
186
185
|
|
|
187
186
|
```css
|
|
188
187
|
@layer tokens.override {
|
|
189
188
|
:root {
|
|
190
|
-
--bds-
|
|
191
|
-
--bds-
|
|
192
|
-
--bds-
|
|
193
|
-
--bds-
|
|
189
|
+
--bds-color_green: var(--bds-BASE__color--blue);
|
|
190
|
+
--bds-color_on-green: var(--bds-BASE__color--white);
|
|
191
|
+
--bds-color_interactive: var(--bds-BASE__color--blue);
|
|
192
|
+
--bds-color_on-interactive: var(--bds-BASE__color--white);
|
|
194
193
|
}
|
|
195
194
|
}
|
|
196
195
|
```
|
|
@@ -7,7 +7,7 @@ export const ShadowCard = ({ token, label }) => (
|
|
|
7
7
|
<div style={{
|
|
8
8
|
width: '8rem',
|
|
9
9
|
height: '5rem',
|
|
10
|
-
background: 'var(--bds-
|
|
10
|
+
background: 'var(--bds-color_bg)',
|
|
11
11
|
borderRadius: '0.75rem',
|
|
12
12
|
boxShadow: `var(${token})`,
|
|
13
13
|
}} />
|
|
@@ -23,7 +23,7 @@ export const RadiusBox = ({ token, label, value }) => (
|
|
|
23
23
|
<div style={{
|
|
24
24
|
width: '4rem',
|
|
25
25
|
height: '4rem',
|
|
26
|
-
background: 'var(--bds-
|
|
26
|
+
background: 'var(--bds-color_interactive)',
|
|
27
27
|
borderRadius: `var(${token})`,
|
|
28
28
|
opacity: 0.8,
|
|
29
29
|
}} />
|
|
@@ -49,7 +49,7 @@ export const ZRow = ({ token, value, description }) => (
|
|
|
49
49
|
|
|
50
50
|
Five shadow levels from subtle to dramatic. All values adapt to dark mode (higher opacity for visibility against dark surfaces).
|
|
51
51
|
|
|
52
|
-
<div style={{ display: 'flex', gap: '2.5rem', flexWrap: 'wrap', padding: '2rem', background: 'var(--bds-
|
|
52
|
+
<div style={{ display: 'flex', gap: '2.5rem', flexWrap: 'wrap', padding: '2rem', background: 'var(--bds-color_bg--subtle)', borderRadius: '0.75rem', marginBottom: '2rem' }}>
|
|
53
53
|
<ShadowCard token="--bds-shadow_s" label="Small" />
|
|
54
54
|
<ShadowCard token="--bds-shadow_m" label="Medium" />
|
|
55
55
|
<ShadowCard token="--bds-shadow_l" label="Large" />
|
|
@@ -69,7 +69,7 @@ Five shadow levels from subtle to dramatic. All values adapt to dark mode (highe
|
|
|
69
69
|
|
|
70
70
|
## Border radius
|
|
71
71
|
|
|
72
|
-
<div style={{ display: 'flex', gap: '2rem', flexWrap: 'wrap', padding: '2rem', background: 'var(--bds-
|
|
72
|
+
<div style={{ display: 'flex', gap: '2rem', flexWrap: 'wrap', padding: '2rem', background: 'var(--bds-color_bg--subtle)', borderRadius: '0.75rem', marginBottom: '2rem' }}>
|
|
73
73
|
<RadiusBox token="--bds-border_radius--xs" label="X-Small" value="0.25rem / 4px" />
|
|
74
74
|
<RadiusBox token="--bds-border_radius--s" label="Small" value="0.75rem / 12px" />
|
|
75
75
|
<RadiusBox token="--bds-border_radius--m" label="Medium" value="1rem / 16px" />
|
|
@@ -2,11 +2,11 @@ import { Meta } from '@storybook/blocks';
|
|
|
2
2
|
|
|
3
3
|
<Meta title="Design System/Grid" />
|
|
4
4
|
|
|
5
|
-
export const GridCell = ({ span, label, color = 'var(--bds-
|
|
5
|
+
export const GridCell = ({ span, label, color = 'var(--bds-color_interactive)' }) => (
|
|
6
6
|
<div style={{
|
|
7
7
|
gridColumn: span,
|
|
8
8
|
background: color,
|
|
9
|
-
color: 'var(--bds-
|
|
9
|
+
color: 'var(--bds-color_on-interactive)',
|
|
10
10
|
borderRadius: '0.25rem',
|
|
11
11
|
padding: '0.5rem 0.75rem',
|
|
12
12
|
fontSize: '0.75rem',
|
|
@@ -23,7 +23,7 @@ export const GridDemo = ({ children }) => (
|
|
|
23
23
|
gridTemplateColumns: 'repeat(12, 1fr)',
|
|
24
24
|
gap: '0.5rem',
|
|
25
25
|
padding: '1rem',
|
|
26
|
-
background: 'var(--bds-
|
|
26
|
+
background: 'var(--bds-color_bg--subtle)',
|
|
27
27
|
borderRadius: '0.5rem',
|
|
28
28
|
marginBottom: '1.5rem',
|
|
29
29
|
}}>
|
|
@@ -69,14 +69,14 @@ The grid system is responsive and built entirely on CSS custom properties. It ad
|
|
|
69
69
|
|
|
70
70
|
<GridDemo>
|
|
71
71
|
<GridCell span="span 9" label="span 75%" />
|
|
72
|
-
<GridCell span="span 3" label="25%" color="var(--bds-
|
|
72
|
+
<GridCell span="span 3" label="25%" color="var(--bds-color_grey)" />
|
|
73
73
|
</GridDemo>
|
|
74
74
|
|
|
75
75
|
### Two thirds — `--bds-grid_span-66`
|
|
76
76
|
|
|
77
77
|
<GridDemo>
|
|
78
78
|
<GridCell span="span 8" label="span 66%" />
|
|
79
|
-
<GridCell span="span 4" label="33%" color="var(--bds-
|
|
79
|
+
<GridCell span="span 4" label="33%" color="var(--bds-color_grey)" />
|
|
80
80
|
</GridDemo>
|
|
81
81
|
|
|
82
82
|
### Half and half — `--bds-grid_span-50`
|
|
@@ -7,7 +7,7 @@ export const AnimDemo = ({ label, token, animationStyle }) => (
|
|
|
7
7
|
<div style={{
|
|
8
8
|
width: '3rem',
|
|
9
9
|
height: '3rem',
|
|
10
|
-
background: 'var(--bds-
|
|
10
|
+
background: 'var(--bds-color_interactive)',
|
|
11
11
|
borderRadius: '0.5rem',
|
|
12
12
|
animation: animationStyle,
|
|
13
13
|
opacity: 0.9,
|
|
@@ -47,7 +47,7 @@ export const AnimDemo = ({ label, token, animationStyle }) => (
|
|
|
47
47
|
|
|
48
48
|
The foundation ships six named keyframes.
|
|
49
49
|
|
|
50
|
-
<div style={{ display: 'flex', gap: '3rem', flexWrap: 'wrap', padding: '2rem', background: 'var(--bds-
|
|
50
|
+
<div style={{ display: 'flex', gap: '3rem', flexWrap: 'wrap', padding: '2rem', background: 'var(--bds-color_bg--subtle)', borderRadius: '0.75rem', marginBottom: '2rem' }}>
|
|
51
51
|
<AnimDemo label="bounce" animationStyle="bounce 1s ease-out infinite" />
|
|
52
52
|
<AnimDemo label="rotate" animationStyle="rotate 2s linear infinite" />
|
|
53
53
|
<AnimDemo label="fade-zoom" animationStyle="fade-zoom 2s ease-in-out infinite" />
|
|
@@ -3,10 +3,10 @@ import { Meta } from '@storybook/blocks';
|
|
|
3
3
|
<Meta title="Design System/Spacing" />
|
|
4
4
|
|
|
5
5
|
export const SpaceStep = ({ token, mobile, tablet, desktop }) => (
|
|
6
|
-
<div style={{ display: 'grid', gridTemplateColumns: '10rem auto 1fr', gap: '0 1.5rem', alignItems: 'center', padding: '0.625rem 0', borderBottom: '1px solid var(--bds-
|
|
6
|
+
<div style={{ display: 'grid', gridTemplateColumns: '10rem auto 1fr', gap: '0 1.5rem', alignItems: 'center', padding: '0.625rem 0', borderBottom: '1px solid var(--bds-color_grey--subtle)' }}>
|
|
7
7
|
<code style={{ fontSize: '0.75rem' }}>{token}</code>
|
|
8
|
-
<div style={{ width: `var(${token})`, height: '1.25rem', background: 'var(--bds-
|
|
9
|
-
<div style={{ fontSize: '0.75rem', color: 'var(--bds-
|
|
8
|
+
<div style={{ width: `var(${token})`, height: '1.25rem', background: 'var(--bds-color_interactive)', borderRadius: '0.125rem', minWidth: '2px' }} />
|
|
9
|
+
<div style={{ fontSize: '0.75rem', color: 'var(--bds-color_grey)', fontFamily: 'monospace' }}>
|
|
10
10
|
{mobile}{tablet !== mobile ? ` → ${tablet}` : ''}{desktop !== tablet ? ` → ${desktop}` : ''}
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
@@ -3,8 +3,8 @@ import { Meta } from '@storybook/blocks';
|
|
|
3
3
|
<Meta title="Design System/Typography" />
|
|
4
4
|
|
|
5
5
|
export const TypeScale = ({ token, label, style = {} }) => (
|
|
6
|
-
<div style={{ display: 'grid', gridTemplateColumns: '10rem 1fr', gap: '0.5rem 1.5rem', alignItems: 'baseline', padding: '0.75rem 0', borderBottom: '1px solid var(--bds-
|
|
7
|
-
<div style={{ fontSize: '0.75rem', fontFamily: 'monospace', color: 'var(--bds-on-bg--muted, var(--bds-
|
|
6
|
+
<div style={{ display: 'grid', gridTemplateColumns: '10rem 1fr', gap: '0.5rem 1.5rem', alignItems: 'baseline', padding: '0.75rem 0', borderBottom: '1px solid var(--bds-color_grey--subtle)' }}>
|
|
7
|
+
<div style={{ fontSize: '0.75rem', fontFamily: 'monospace', color: 'var(--bds-on-bg--muted, var(--bds-color_grey))', lineHeight: 1.4 }}>
|
|
8
8
|
{token}
|
|
9
9
|
</div>
|
|
10
10
|
<div style={{ fontFamily: 'var(--bds-font_family--body)', fontSize: `var(${token})`, ...style }}>
|
|
@@ -14,8 +14,8 @@ export const TypeScale = ({ token, label, style = {} }) => (
|
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
export const WeightSample = ({ weight, token, label }) => (
|
|
17
|
-
<div style={{ display: 'grid', gridTemplateColumns: '12rem 1fr', gap: '0.5rem 1.5rem', alignItems: 'baseline', padding: '0.75rem 0', borderBottom: '1px solid var(--bds-
|
|
18
|
-
<div style={{ fontSize: '0.75rem', fontFamily: 'monospace', color: 'var(--bds-
|
|
17
|
+
<div style={{ display: 'grid', gridTemplateColumns: '12rem 1fr', gap: '0.5rem 1.5rem', alignItems: 'baseline', padding: '0.75rem 0', borderBottom: '1px solid var(--bds-color_grey--subtle)' }}>
|
|
18
|
+
<div style={{ fontSize: '0.75rem', fontFamily: 'monospace', color: 'var(--bds-color_grey)' }}>
|
|
19
19
|
<div>{token}</div>
|
|
20
20
|
<div style={{ opacity: 0.7 }}>{weight}</div>
|
|
21
21
|
</div>
|
|
@@ -26,8 +26,8 @@ export const WeightSample = ({ weight, token, label }) => (
|
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
export const TrackingSample = ({ token, label, value }) => (
|
|
29
|
-
<div style={{ display: 'grid', gridTemplateColumns: '12rem 1fr', gap: '0.5rem 1.5rem', alignItems: 'baseline', padding: '0.75rem 0', borderBottom: '1px solid var(--bds-
|
|
30
|
-
<div style={{ fontSize: '0.75rem', fontFamily: 'monospace', color: 'var(--bds-
|
|
29
|
+
<div style={{ display: 'grid', gridTemplateColumns: '12rem 1fr', gap: '0.5rem 1.5rem', alignItems: 'baseline', padding: '0.75rem 0', borderBottom: '1px solid var(--bds-color_grey--subtle)' }}>
|
|
30
|
+
<div style={{ fontSize: '0.75rem', fontFamily: 'monospace', color: 'var(--bds-color_grey)' }}>
|
|
31
31
|
<div>{token}</div>
|
|
32
32
|
<div style={{ opacity: 0.7 }}>{value}</div>
|
|
33
33
|
</div>
|