@adamarant/designsystem 0.11.2
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/README.md +101 -0
- package/dist/designsystem.css +13494 -0
- package/dist/designsystem.js +67 -0
- package/dist/designsystem.min.css +2 -0
- package/package.json +111 -0
- package/src/base/index.css +2 -0
- package/src/base/reset.css +119 -0
- package/src/base/typography.css +172 -0
- package/src/components/accordion.css +166 -0
- package/src/components/admin-layout.css +371 -0
- package/src/components/alert.css +159 -0
- package/src/components/avatar.css +109 -0
- package/src/components/badge.css +80 -0
- package/src/components/bottom-nav.css +125 -0
- package/src/components/bottom-sheet.css +146 -0
- package/src/components/breadcrumb.css +102 -0
- package/src/components/button.css +250 -0
- package/src/components/card.css +117 -0
- package/src/components/chip.css +79 -0
- package/src/components/collapsible.css +112 -0
- package/src/components/color-picker.css +82 -0
- package/src/components/combobox.css +420 -0
- package/src/components/command.css +210 -0
- package/src/components/context-menu.css +162 -0
- package/src/components/copy-button.css +106 -0
- package/src/components/custom-select.css +446 -0
- package/src/components/datepicker.css +301 -0
- package/src/components/description-list.css +100 -0
- package/src/components/divider.css +66 -0
- package/src/components/drawer.css +234 -0
- package/src/components/drop-zone.css +166 -0
- package/src/components/dropdown.css +169 -0
- package/src/components/empty-state.css +75 -0
- package/src/components/field.css +112 -0
- package/src/components/gallery.css +257 -0
- package/src/components/hero.css +111 -0
- package/src/components/icon-btn.css +103 -0
- package/src/components/index.css +74 -0
- package/src/components/input.css +311 -0
- package/src/components/kbd.css +54 -0
- package/src/components/media-library.css +230 -0
- package/src/components/modal.css +136 -0
- package/src/components/nav.css +198 -0
- package/src/components/number-input.css +163 -0
- package/src/components/pagination.css +175 -0
- package/src/components/pin-input.css +136 -0
- package/src/components/popover.css +111 -0
- package/src/components/progress.css +217 -0
- package/src/components/prose.css +337 -0
- package/src/components/result.css +80 -0
- package/src/components/scroll-area.css +73 -0
- package/src/components/search.css +311 -0
- package/src/components/segmented-control.css +94 -0
- package/src/components/skeleton.css +100 -0
- package/src/components/slider.css +133 -0
- package/src/components/sortable.css +70 -0
- package/src/components/spinner.css +60 -0
- package/src/components/star-rating.css +121 -0
- package/src/components/stat-card.css +44 -0
- package/src/components/table.css +359 -0
- package/src/components/tabs.css +215 -0
- package/src/components/tag.css +188 -0
- package/src/components/timeline.css +130 -0
- package/src/components/toast.css +90 -0
- package/src/components/toggle.css +173 -0
- package/src/components/toolbar.css +206 -0
- package/src/components/tooltip.css +167 -0
- package/src/components/truncated-text.css +75 -0
- package/src/index.css +21 -0
- package/src/js/theme.js +67 -0
- package/src/tokens/colors.css +256 -0
- package/src/tokens/index.css +11 -0
- package/src/tokens/shadows.css +55 -0
- package/src/tokens/spacing.css +82 -0
- package/src/tokens/tokens.json +413 -0
- package/src/tokens/typography.css +90 -0
- package/src/utilities/a11y.css +102 -0
- package/src/utilities/index.css +7 -0
- package/src/utilities/interactive.css +121 -0
- package/src/utilities/layout.css +273 -0
- package/src/utilities/sizing.css +85 -0
- package/src/utilities/spacing.css +204 -0
- package/src/utilities/states.css +182 -0
- package/src/utilities/text.css +381 -0
package/package.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adamarant/designsystem",
|
|
3
|
+
"version": "0.11.2",
|
|
4
|
+
"description": "Design system — installable, extensible, indestructible.",
|
|
5
|
+
"main": "dist/designsystem.css",
|
|
6
|
+
"style": "dist/designsystem.css",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./dist/designsystem.css",
|
|
9
|
+
"./min": "./dist/designsystem.min.css",
|
|
10
|
+
"./tokens": "./src/tokens/index.css",
|
|
11
|
+
"./base": "./src/base/index.css",
|
|
12
|
+
"./components": "./src/components/index.css",
|
|
13
|
+
"./components/accordion": "./src/components/accordion.css",
|
|
14
|
+
"./components/admin-layout": "./src/components/admin-layout.css",
|
|
15
|
+
"./components/alert": "./src/components/alert.css",
|
|
16
|
+
"./components/avatar": "./src/components/avatar.css",
|
|
17
|
+
"./components/badge": "./src/components/badge.css",
|
|
18
|
+
"./components/bottom-nav": "./src/components/bottom-nav.css",
|
|
19
|
+
"./components/bottom-sheet": "./src/components/bottom-sheet.css",
|
|
20
|
+
"./components/breadcrumb": "./src/components/breadcrumb.css",
|
|
21
|
+
"./components/button": "./src/components/button.css",
|
|
22
|
+
"./components/card": "./src/components/card.css",
|
|
23
|
+
"./components/chip": "./src/components/chip.css",
|
|
24
|
+
"./components/collapsible": "./src/components/collapsible.css",
|
|
25
|
+
"./components/color-picker": "./src/components/color-picker.css",
|
|
26
|
+
"./components/combobox": "./src/components/combobox.css",
|
|
27
|
+
"./components/command": "./src/components/command.css",
|
|
28
|
+
"./components/context-menu": "./src/components/context-menu.css",
|
|
29
|
+
"./components/copy-button": "./src/components/copy-button.css",
|
|
30
|
+
"./components/custom-select": "./src/components/custom-select.css",
|
|
31
|
+
"./components/datepicker": "./src/components/datepicker.css",
|
|
32
|
+
"./components/description-list": "./src/components/description-list.css",
|
|
33
|
+
"./components/divider": "./src/components/divider.css",
|
|
34
|
+
"./components/drawer": "./src/components/drawer.css",
|
|
35
|
+
"./components/drop-zone": "./src/components/drop-zone.css",
|
|
36
|
+
"./components/dropdown": "./src/components/dropdown.css",
|
|
37
|
+
"./components/empty-state": "./src/components/empty-state.css",
|
|
38
|
+
"./components/field": "./src/components/field.css",
|
|
39
|
+
"./components/gallery": "./src/components/gallery.css",
|
|
40
|
+
"./components/hero": "./src/components/hero.css",
|
|
41
|
+
"./components/icon-btn": "./src/components/icon-btn.css",
|
|
42
|
+
"./components/input": "./src/components/input.css",
|
|
43
|
+
"./components/kbd": "./src/components/kbd.css",
|
|
44
|
+
"./components/media-library": "./src/components/media-library.css",
|
|
45
|
+
"./components/modal": "./src/components/modal.css",
|
|
46
|
+
"./components/nav": "./src/components/nav.css",
|
|
47
|
+
"./components/number-input": "./src/components/number-input.css",
|
|
48
|
+
"./components/pagination": "./src/components/pagination.css",
|
|
49
|
+
"./components/pin-input": "./src/components/pin-input.css",
|
|
50
|
+
"./components/popover": "./src/components/popover.css",
|
|
51
|
+
"./components/progress": "./src/components/progress.css",
|
|
52
|
+
"./components/prose": "./src/components/prose.css",
|
|
53
|
+
"./components/result": "./src/components/result.css",
|
|
54
|
+
"./components/scroll-area": "./src/components/scroll-area.css",
|
|
55
|
+
"./components/search": "./src/components/search.css",
|
|
56
|
+
"./components/segmented-control": "./src/components/segmented-control.css",
|
|
57
|
+
"./components/skeleton": "./src/components/skeleton.css",
|
|
58
|
+
"./components/slider": "./src/components/slider.css",
|
|
59
|
+
"./components/sortable": "./src/components/sortable.css",
|
|
60
|
+
"./components/spinner": "./src/components/spinner.css",
|
|
61
|
+
"./components/star-rating": "./src/components/star-rating.css",
|
|
62
|
+
"./components/stat-card": "./src/components/stat-card.css",
|
|
63
|
+
"./components/table": "./src/components/table.css",
|
|
64
|
+
"./components/tabs": "./src/components/tabs.css",
|
|
65
|
+
"./components/tag": "./src/components/tag.css",
|
|
66
|
+
"./components/timeline": "./src/components/timeline.css",
|
|
67
|
+
"./components/toast": "./src/components/toast.css",
|
|
68
|
+
"./components/toggle": "./src/components/toggle.css",
|
|
69
|
+
"./components/toolbar": "./src/components/toolbar.css",
|
|
70
|
+
"./components/tooltip": "./src/components/tooltip.css",
|
|
71
|
+
"./components/truncated-text": "./src/components/truncated-text.css",
|
|
72
|
+
"./utilities": "./src/utilities/index.css",
|
|
73
|
+
"./js": "./dist/designsystem.js",
|
|
74
|
+
"./tokens/json": "./src/tokens/tokens.json"
|
|
75
|
+
},
|
|
76
|
+
"files": [
|
|
77
|
+
"dist/",
|
|
78
|
+
"src/"
|
|
79
|
+
],
|
|
80
|
+
"scripts": {
|
|
81
|
+
"build": "node scripts/build.js",
|
|
82
|
+
"validate": "node scripts/validate.js",
|
|
83
|
+
"docs": "node scripts/generate-docs.js",
|
|
84
|
+
"lint": "stylelint 'src/**/*.css'",
|
|
85
|
+
"dev": "node scripts/build.js --watch & npm run dev --workspace=docs",
|
|
86
|
+
"dev:legacy": "node scripts/build.js --watch & node scripts/generate-docs.js && live-server --host=localhost --port=3000 --open=examples/ --watch=dist/,examples/ --wait=200 --no-browser"
|
|
87
|
+
},
|
|
88
|
+
"workspaces": [
|
|
89
|
+
"packages/*",
|
|
90
|
+
"docs"
|
|
91
|
+
],
|
|
92
|
+
"keywords": [
|
|
93
|
+
"design-system",
|
|
94
|
+
"css",
|
|
95
|
+
"tokens",
|
|
96
|
+
"components"
|
|
97
|
+
],
|
|
98
|
+
"license": "MIT",
|
|
99
|
+
"repository": {
|
|
100
|
+
"type": "git",
|
|
101
|
+
"url": "git+https://github.com/adamarant/designsystem.git"
|
|
102
|
+
},
|
|
103
|
+
"publishConfig": {
|
|
104
|
+
"access": "public"
|
|
105
|
+
},
|
|
106
|
+
"devDependencies": {
|
|
107
|
+
"live-server": "^1.2.2",
|
|
108
|
+
"stylelint": "^17.5.0",
|
|
109
|
+
"stylelint-config-standard": "^40.0.0"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Base: Reset
|
|
3
|
+
Clean, modern, antialiased.
|
|
4
|
+
========================================================================== */
|
|
5
|
+
|
|
6
|
+
*,
|
|
7
|
+
*::before,
|
|
8
|
+
*::after {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
html {
|
|
15
|
+
-webkit-font-smoothing: antialiased;
|
|
16
|
+
-moz-osx-font-smoothing: grayscale;
|
|
17
|
+
text-size-adjust: 100%;
|
|
18
|
+
tab-size: 4;
|
|
19
|
+
scroll-behavior: smooth;
|
|
20
|
+
/* overflow-y:auto enables scrollbar-gutter:stable (requires non-visible overflow) */
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
scrollbar-gutter: stable;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
html, body {
|
|
26
|
+
overflow-x: clip;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
body {
|
|
30
|
+
min-height: 100dvh;
|
|
31
|
+
font-family: var(--ds-font-sans);
|
|
32
|
+
font-size: var(--ds-text-base);
|
|
33
|
+
line-height: var(--ds-leading-normal);
|
|
34
|
+
color: var(--ds-color-text);
|
|
35
|
+
background-color: var(--ds-color-bg);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
img, picture, video, canvas {
|
|
39
|
+
display: block;
|
|
40
|
+
max-width: 100%;
|
|
41
|
+
height: auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* SVG icons: keep block, but respect explicit width/height attributes
|
|
45
|
+
(icon libraries like Phosphor/Lucide set size via attrs). The previous
|
|
46
|
+
`max-width: 100%; height: auto` was collapsing SVGs to 0 inside table
|
|
47
|
+
cells with fixed widths. Consumers that use SVG as fluid artwork can
|
|
48
|
+
opt in with their own sizing classes. */
|
|
49
|
+
svg {
|
|
50
|
+
display: block;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
input, button, textarea, select {
|
|
54
|
+
font: inherit;
|
|
55
|
+
color: inherit;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
button,
|
|
59
|
+
[role="button"],
|
|
60
|
+
select,
|
|
61
|
+
summary {
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
button {
|
|
66
|
+
background: none;
|
|
67
|
+
border: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
a {
|
|
71
|
+
color: inherit;
|
|
72
|
+
text-decoration: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
ul, ol {
|
|
76
|
+
list-style: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
table {
|
|
80
|
+
border-collapse: collapse;
|
|
81
|
+
border-spacing: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Hide number input spinners */
|
|
85
|
+
input[type="number"] { -moz-appearance: textfield; }
|
|
86
|
+
input[type="number"]::-webkit-outer-spin-button,
|
|
87
|
+
input[type="number"]::-webkit-inner-spin-button {
|
|
88
|
+
-webkit-appearance: none;
|
|
89
|
+
margin: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Focus: subtle ring */
|
|
93
|
+
*:focus-visible {
|
|
94
|
+
outline: var(--ds-ring-width) solid var(--ds-ring-color);
|
|
95
|
+
outline-offset: var(--ds-ring-offset);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Selection — inverted */
|
|
99
|
+
::selection {
|
|
100
|
+
background-color: var(--ds-color-selection-bg);
|
|
101
|
+
color: var(--ds-color-selection-text);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Scrollbar — use standard properties (compatible with scrollbar-gutter:stable).
|
|
105
|
+
::-webkit-scrollbar breaks scrollbar-gutter in Chromium browsers. */
|
|
106
|
+
* {
|
|
107
|
+
scrollbar-width: thin;
|
|
108
|
+
scrollbar-color: var(--ds-scrollbar-thumb) transparent;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.ds-no-scrollbar::-webkit-scrollbar { display: none; }
|
|
112
|
+
.ds-no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
|
|
113
|
+
|
|
114
|
+
/* Reduce motion — scroll only.
|
|
115
|
+
Transitions are handled via --ds-duration-* tokens in shadows.css.
|
|
116
|
+
Keyframe animations are handled per-component. */
|
|
117
|
+
@media (prefers-reduced-motion: reduce) {
|
|
118
|
+
html { scroll-behavior: auto !important; }
|
|
119
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Base: Typography
|
|
3
|
+
Display font for headings, generous sizes, editorial hierarchy.
|
|
4
|
+
========================================================================== */
|
|
5
|
+
|
|
6
|
+
/* Display font utility — use on headings to get the display typeface */
|
|
7
|
+
.ds-font-display {
|
|
8
|
+
font-family: var(--ds-font-display);
|
|
9
|
+
font-weight: var(--ds-font-display-weight);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
h1, h2, h3, h4, h5, h6 {
|
|
13
|
+
font-family: var(--ds-font-display);
|
|
14
|
+
font-weight: var(--ds-font-display-weight);
|
|
15
|
+
line-height: var(--ds-leading-tight);
|
|
16
|
+
letter-spacing: var(--ds-tracking-tight);
|
|
17
|
+
color: var(--ds-color-text);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
h1 { font-size: var(--ds-text-5xl); }
|
|
21
|
+
h2 { font-size: var(--ds-text-4xl); }
|
|
22
|
+
h3 { font-size: var(--ds-text-2xl); }
|
|
23
|
+
h4 { font-size: var(--ds-text-xl); }
|
|
24
|
+
h5 { font-size: var(--ds-text-lg); }
|
|
25
|
+
h6 { font-size: var(--ds-text-base); font-weight: var(--ds-weight-medium); }
|
|
26
|
+
|
|
27
|
+
p {
|
|
28
|
+
line-height: var(--ds-leading-normal);
|
|
29
|
+
color: var(--ds-color-text-secondary);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ds-prose p + p {
|
|
33
|
+
margin-block-start: var(--ds-space-4);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
small {
|
|
37
|
+
font-size: var(--ds-text-xs);
|
|
38
|
+
color: var(--ds-color-text-tertiary);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
strong, b {
|
|
42
|
+
font-weight: var(--ds-weight-semibold);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Overline / label style (like "PRODUCT DESIGNER & DEVELOPER") */
|
|
46
|
+
.ds-overline {
|
|
47
|
+
font-family: var(--ds-font-sans);
|
|
48
|
+
font-size: var(--ds-text-sm);
|
|
49
|
+
font-weight: var(--ds-weight-medium);
|
|
50
|
+
letter-spacing: var(--ds-tracking-wide);
|
|
51
|
+
text-transform: uppercase;
|
|
52
|
+
color: var(--ds-color-text-secondary);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* UI heading — body font for functional/interface headings (labels, settings, admin) */
|
|
56
|
+
.ds-heading-ui {
|
|
57
|
+
font-family: var(--ds-font-sans);
|
|
58
|
+
font-weight: var(--ds-weight-medium);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Section title style */
|
|
62
|
+
.ds-section-title {
|
|
63
|
+
font-family: var(--ds-font-display);
|
|
64
|
+
font-weight: var(--ds-font-display-weight);
|
|
65
|
+
font-size: var(--ds-text-3xl);
|
|
66
|
+
letter-spacing: var(--ds-tracking-tight);
|
|
67
|
+
color: var(--ds-color-text);
|
|
68
|
+
text-wrap: balance;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media (min-width: 640px) {
|
|
72
|
+
.ds-section-title { font-size: var(--ds-text-4xl); }
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Hero title — large editorial display */
|
|
76
|
+
.ds-hero-title {
|
|
77
|
+
font-family: var(--ds-font-display);
|
|
78
|
+
font-weight: var(--ds-font-display-weight);
|
|
79
|
+
font-size: var(--ds-text-4xl);
|
|
80
|
+
line-height: var(--ds-leading-tight);
|
|
81
|
+
letter-spacing: var(--ds-tracking-tight);
|
|
82
|
+
color: var(--ds-color-text);
|
|
83
|
+
text-wrap: balance;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (min-width: 640px) {
|
|
87
|
+
.ds-hero-title { font-size: var(--ds-text-5xl); }
|
|
88
|
+
}
|
|
89
|
+
@media (min-width: 768px) {
|
|
90
|
+
.ds-hero-title { font-size: var(--ds-text-6xl); }
|
|
91
|
+
}
|
|
92
|
+
@media (min-width: 1024px) /* --ds-breakpoint-lg */ {
|
|
93
|
+
.ds-hero-title { font-size: var(--ds-text-7xl); }
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
code, kbd, samp {
|
|
97
|
+
font-family: var(--ds-font-mono);
|
|
98
|
+
font-size: 0.9em;
|
|
99
|
+
background-color: var(--ds-color-surface-elevated);
|
|
100
|
+
padding: 2px 6px;
|
|
101
|
+
border-radius: var(--ds-radius-sm);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
pre {
|
|
105
|
+
font-family: var(--ds-font-mono);
|
|
106
|
+
font-size: var(--ds-text-sm);
|
|
107
|
+
line-height: var(--ds-leading-relaxed);
|
|
108
|
+
background-color: var(--ds-color-surface);
|
|
109
|
+
border: 1px solid var(--ds-color-border);
|
|
110
|
+
padding: var(--ds-space-4);
|
|
111
|
+
border-radius: var(--ds-radius-lg);
|
|
112
|
+
overflow-x: auto;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
pre code {
|
|
116
|
+
background: none;
|
|
117
|
+
padding: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
blockquote {
|
|
121
|
+
padding-inline-start: var(--ds-space-4);
|
|
122
|
+
border-inline-start: 2px solid var(--ds-color-border-hover);
|
|
123
|
+
color: var(--ds-color-text-secondary);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
hr {
|
|
127
|
+
border: none;
|
|
128
|
+
height: 1px;
|
|
129
|
+
background-color: var(--ds-color-border);
|
|
130
|
+
margin: var(--ds-space-8) 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Prose: opt-in rich text styling */
|
|
134
|
+
.ds-prose a {
|
|
135
|
+
color: var(--ds-color-info);
|
|
136
|
+
text-decoration: underline;
|
|
137
|
+
text-underline-offset: 2px;
|
|
138
|
+
transition: color var(--ds-duration-fast) var(--ds-ease-default);
|
|
139
|
+
}
|
|
140
|
+
.ds-prose a:hover {
|
|
141
|
+
opacity: 0.8;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ds-prose ul, .ds-prose ol {
|
|
145
|
+
padding-inline-start: var(--ds-space-6);
|
|
146
|
+
margin-block-start: var(--ds-space-2);
|
|
147
|
+
margin-block-end: var(--ds-space-2);
|
|
148
|
+
}
|
|
149
|
+
.ds-prose ul { list-style-type: disc; }
|
|
150
|
+
.ds-prose ol { list-style-type: decimal; }
|
|
151
|
+
|
|
152
|
+
.ds-prose li {
|
|
153
|
+
line-height: var(--ds-leading-normal);
|
|
154
|
+
color: var(--ds-color-text-secondary);
|
|
155
|
+
}
|
|
156
|
+
.ds-prose li + li {
|
|
157
|
+
margin-block-start: var(--ds-space-1);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Tabular figures for numbers */
|
|
161
|
+
.ds-tabular-nums {
|
|
162
|
+
font-variant-numeric: tabular-nums;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Stat numbers — display font, large */
|
|
166
|
+
.ds-stat-number {
|
|
167
|
+
font-family: var(--ds-font-display);
|
|
168
|
+
font-weight: var(--ds-font-display-weight);
|
|
169
|
+
font-variant-numeric: tabular-nums;
|
|
170
|
+
font-size: var(--ds-text-2xl);
|
|
171
|
+
color: var(--ds-color-text);
|
|
172
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Accordion / Collapse
|
|
3
|
+
==========================================================================
|
|
4
|
+
A vertically stacked set of collapsible sections. Supports CSS-only
|
|
5
|
+
open/close via the `.ds-accordion__item--open` modifier.
|
|
6
|
+
|
|
7
|
+
ARIA requirements (consumer responsibility):
|
|
8
|
+
- Trigger: <button> with aria-expanded="true|false"
|
|
9
|
+
- Trigger: aria-controls="[content-panel-id]"
|
|
10
|
+
- Content panel: id matching aria-controls, role="region", aria-labelledby="[trigger-id]"
|
|
11
|
+
- Keyboard: Enter/Space toggles section (native <button> handles this)
|
|
12
|
+
|
|
13
|
+
Variants:
|
|
14
|
+
--flush – borderless, full-bleed style
|
|
15
|
+
--separated – visually detached items with individual borders
|
|
16
|
+
|
|
17
|
+
Usage:
|
|
18
|
+
<div class="ds-accordion">
|
|
19
|
+
<div class="ds-accordion__item ds-accordion__item--open">
|
|
20
|
+
<button class="ds-accordion__trigger" aria-expanded="true" aria-controls="panel-1">Section</button>
|
|
21
|
+
<div class="ds-accordion__content" id="panel-1" role="region">
|
|
22
|
+
<div class="ds-accordion__body">…</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
========================================================================== */
|
|
27
|
+
|
|
28
|
+
/* ---------------------------------------------------------------------------
|
|
29
|
+
Container
|
|
30
|
+
--------------------------------------------------------------------------- */
|
|
31
|
+
|
|
32
|
+
.ds-accordion {
|
|
33
|
+
border: 1px solid var(--ds-color-border);
|
|
34
|
+
border-radius: var(--ds-radius-xl);
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
|
|
37
|
+
/* ---------------------------------------------------------------------------
|
|
38
|
+
Item
|
|
39
|
+
--------------------------------------------------------------------------- */
|
|
40
|
+
|
|
41
|
+
&__item {
|
|
42
|
+
border-block-start: 1px solid var(--ds-color-border);
|
|
43
|
+
|
|
44
|
+
&:first-child {
|
|
45
|
+
border-block-start: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Open state – rotate chevron */
|
|
49
|
+
&--open .ds-accordion__trigger::after {
|
|
50
|
+
transform: rotate(225deg);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&--open .ds-accordion__content {
|
|
54
|
+
max-height: 80rem;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ---------------------------------------------------------------------------
|
|
59
|
+
Trigger (button)
|
|
60
|
+
--------------------------------------------------------------------------- */
|
|
61
|
+
|
|
62
|
+
&__trigger {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: row;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
align-items: center;
|
|
67
|
+
width: 100%;
|
|
68
|
+
padding: var(--ds-space-4);
|
|
69
|
+
text-align: start;
|
|
70
|
+
font-family: var(--ds-font-sans);
|
|
71
|
+
font-size: var(--ds-text-sm);
|
|
72
|
+
font-weight: var(--ds-weight-medium);
|
|
73
|
+
color: var(--ds-color-text);
|
|
74
|
+
background: transparent;
|
|
75
|
+
border: 0;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
78
|
+
|
|
79
|
+
/* Chevron indicator (CSS border-arrow) */
|
|
80
|
+
&::after {
|
|
81
|
+
content: "";
|
|
82
|
+
display: inline-block;
|
|
83
|
+
width: 0.5rem;
|
|
84
|
+
height: 0.5rem;
|
|
85
|
+
border-inline-end: 2px solid var(--ds-color-text-secondary);
|
|
86
|
+
border-block-end: 2px solid var(--ds-color-text-secondary);
|
|
87
|
+
transform: rotate(45deg);
|
|
88
|
+
flex-shrink: 0;
|
|
89
|
+
margin-inline-start: var(--ds-space-3);
|
|
90
|
+
transition: transform var(--ds-duration-fast) var(--ds-ease-default);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:hover {
|
|
94
|
+
background-color: var(--ds-color-surface-hover);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:focus-visible {
|
|
98
|
+
outline: none;
|
|
99
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
100
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* ---------------------------------------------------------------------------
|
|
105
|
+
Collapsible content wrapper
|
|
106
|
+
--------------------------------------------------------------------------- */
|
|
107
|
+
|
|
108
|
+
&__content {
|
|
109
|
+
max-height: 0;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
transition:
|
|
112
|
+
max-height var(--ds-duration-normal) var(--ds-ease-default),
|
|
113
|
+
padding var(--ds-duration-normal) var(--ds-ease-default);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* ---------------------------------------------------------------------------
|
|
117
|
+
Inner body (visible content)
|
|
118
|
+
--------------------------------------------------------------------------- */
|
|
119
|
+
|
|
120
|
+
&__body {
|
|
121
|
+
padding: var(--ds-space-4);
|
|
122
|
+
padding-block-start: 0;
|
|
123
|
+
font-size: var(--ds-text-sm);
|
|
124
|
+
color: var(--ds-color-text-secondary);
|
|
125
|
+
line-height: var(--ds-leading-relaxed);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* ==========================================================================
|
|
129
|
+
* Variant: Flush
|
|
130
|
+
* ========================================================================== */
|
|
131
|
+
|
|
132
|
+
&--flush {
|
|
133
|
+
border: 0;
|
|
134
|
+
border-radius: 0;
|
|
135
|
+
|
|
136
|
+
& .ds-accordion__item {
|
|
137
|
+
border-block-start: 0;
|
|
138
|
+
border-block-end: 1px solid var(--ds-color-border);
|
|
139
|
+
|
|
140
|
+
&:last-child {
|
|
141
|
+
border-block-end: 0;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* ==========================================================================
|
|
147
|
+
* Variant: Separated
|
|
148
|
+
* ========================================================================== */
|
|
149
|
+
|
|
150
|
+
&--separated {
|
|
151
|
+
border: 0;
|
|
152
|
+
border-radius: 0;
|
|
153
|
+
overflow: visible;
|
|
154
|
+
|
|
155
|
+
& .ds-accordion__item {
|
|
156
|
+
border: 1px solid var(--ds-color-border);
|
|
157
|
+
border-radius: var(--ds-radius-xl);
|
|
158
|
+
margin-block-end: var(--ds-space-3);
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
|
|
161
|
+
&:last-child {
|
|
162
|
+
margin-block-end: 0;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|