@teseor/css 1.0.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/README.md +102 -0
- package/dist/compiled.css +4463 -0
- package/dist/index.css +4445 -0
- package/fonts/.gitkeep +9 -0
- package/package.json +38 -0
- package/src/00-config/layers/layers.scss +1 -0
- package/src/00-config/mixins/_border.scss +13 -0
- package/src/00-config/mixins/index.scss +1 -0
- package/src/00-config/tokens/_variables.scss +120 -0
- package/src/00-config/tokens/borders/index.scss +6 -0
- package/src/00-config/tokens/colors/colors.docs.json +168 -0
- package/src/00-config/tokens/colors/index.scss +25 -0
- package/src/00-config/tokens/grid/grid.docs.json +54 -0
- package/src/00-config/tokens/grid/index.scss +11 -0
- package/src/00-config/tokens/index.scss +15 -0
- package/src/00-config/tokens/input.scss +14 -0
- package/src/00-config/tokens/motion/index.scss +25 -0
- package/src/00-config/tokens/radius/index.scss +7 -0
- package/src/00-config/tokens/semantic/colors/index.scss +30 -0
- package/src/00-config/tokens/semantic/spacing/index.scss +10 -0
- package/src/00-config/tokens/shadows/index.scss +5 -0
- package/src/00-config/tokens/spacing/index.scss +15 -0
- package/src/00-config/tokens/spacing/spacing.docs.json +114 -0
- package/src/00-config/tokens/theming.docs.json +77 -0
- package/src/00-config/tokens/typography/index.scss +119 -0
- package/src/00-config/tokens/zindex/index.scss +14 -0
- package/src/01-reset/index.scss +1 -0
- package/src/01-reset/reset.scss +8 -0
- package/src/02-base/index.scss +2 -0
- package/src/02-base/root/root.scss +12 -0
- package/src/02-base/typography/typography.docs.json +94 -0
- package/src/02-base/typography/typography.scss +145 -0
- package/src/03-layout/app-shell/app-shell.api.json +26 -0
- package/src/03-layout/app-shell/app-shell.docs.json +119 -0
- package/src/03-layout/app-shell/index.scss +5 -0
- package/src/03-layout/box/box.api.json +15 -0
- package/src/03-layout/box/box.docs.json +57 -0
- package/src/03-layout/box/index.scss +34 -0
- package/src/03-layout/center/center.api.json +6 -0
- package/src/03-layout/center/center.docs.json +24 -0
- package/src/03-layout/center/index.scss +11 -0
- package/src/03-layout/cluster/cluster.api.json +10 -0
- package/src/03-layout/cluster/cluster.docs.json +129 -0
- package/src/03-layout/cluster/index.scss +18 -0
- package/src/03-layout/container/container.api.json +13 -0
- package/src/03-layout/container/index.scss +17 -0
- package/src/03-layout/flex/flex.api.json +15 -0
- package/src/03-layout/flex/flex.docs.json +56 -0
- package/src/03-layout/flex/index.scss +51 -0
- package/src/03-layout/grid/grid.api.json +10 -0
- package/src/03-layout/grid/grid.docs.json +116 -0
- package/src/03-layout/grid/index.scss +15 -0
- package/src/03-layout/index.scss +11 -0
- package/src/03-layout/main/index.scss +17 -0
- package/src/03-layout/main/main.api.json +13 -0
- package/src/03-layout/sidebar/index.scss +30 -0
- package/src/03-layout/sidebar/sidebar.api.json +13 -0
- package/src/03-layout/sidebar-nav/index.scss +209 -0
- package/src/03-layout/sidebar-nav/sidebar-nav-all.png +0 -0
- package/src/03-layout/sidebar-nav/sidebar-nav.api.json +115 -0
- package/src/03-layout/sidebar-nav/sidebar-nav.docs.json +100 -0
- package/src/03-layout/sidebar-nav/sidebar-nav.visual.spec.ts +14 -0
- package/src/03-layout/stack/index.scss +13 -0
- package/src/03-layout/stack/stack.api.json +10 -0
- package/src/03-layout/stack/stack.docs.json +131 -0
- package/src/04-components/accordion/accordion-visual.png +0 -0
- package/src/04-components/accordion/accordion.api.json +19 -0
- package/src/04-components/accordion/accordion.docs.json +51 -0
- package/src/04-components/accordion/accordion.visual.spec.ts +14 -0
- package/src/04-components/accordion/index.scss +78 -0
- package/src/04-components/alert/alert-visual.png +0 -0
- package/src/04-components/alert/alert.api.json +91 -0
- package/src/04-components/alert/alert.docs.json +79 -0
- package/src/04-components/alert/alert.visual.spec.ts +14 -0
- package/src/04-components/alert/index.scss +108 -0
- package/src/04-components/avatar/avatar-visual.png +0 -0
- package/src/04-components/avatar/avatar.api.json +70 -0
- package/src/04-components/avatar/avatar.docs.json +200 -0
- package/src/04-components/avatar/avatar.visual.spec.ts +14 -0
- package/src/04-components/avatar/index.scss +104 -0
- package/src/04-components/badge/badge-visual.png +0 -0
- package/src/04-components/badge/badge.api.json +86 -0
- package/src/04-components/badge/badge.docs.json +89 -0
- package/src/04-components/badge/badge.visual.spec.ts +14 -0
- package/src/04-components/badge/index.scss +64 -0
- package/src/04-components/breadcrumb/breadcrumb-visual.png +0 -0
- package/src/04-components/breadcrumb/breadcrumb.api.json +31 -0
- package/src/04-components/breadcrumb/breadcrumb.docs.json +59 -0
- package/src/04-components/breadcrumb/breadcrumb.visual.spec.ts +14 -0
- package/src/04-components/breadcrumb/index.scss +77 -0
- package/src/04-components/button/button-visual.png +0 -0
- package/src/04-components/button/button.api.json +138 -0
- package/src/04-components/button/button.docs.json +75 -0
- package/src/04-components/button/button.visual.spec.ts +14 -0
- package/src/04-components/button/index.scss +222 -0
- package/src/04-components/button-group/button-group-visual.png +0 -0
- package/src/04-components/button-group/button-group.api.json +11 -0
- package/src/04-components/button-group/button-group.docs.json +52 -0
- package/src/04-components/button-group/button-group.visual.spec.ts +14 -0
- package/src/04-components/button-group/index.scss +78 -0
- package/src/04-components/card/card-visual.png +0 -0
- package/src/04-components/card/card.api.json +53 -0
- package/src/04-components/card/card.docs.json +103 -0
- package/src/04-components/card/card.visual.spec.ts +14 -0
- package/src/04-components/card/index.scss +41 -0
- package/src/04-components/checkbox/checkbox-visual.png +0 -0
- package/src/04-components/checkbox/checkbox.api.json +50 -0
- package/src/04-components/checkbox/checkbox.docs.json +151 -0
- package/src/04-components/checkbox/checkbox.visual.spec.ts +14 -0
- package/src/04-components/checkbox/index.scss +104 -0
- package/src/04-components/code/code-visual.png +0 -0
- package/src/04-components/code/code.api.json +47 -0
- package/src/04-components/code/code.docs.json +84 -0
- package/src/04-components/code/code.visual.spec.ts +14 -0
- package/src/04-components/code/index.scss +64 -0
- package/src/04-components/data-list/data-list-visual.png +0 -0
- package/src/04-components/data-list/data-list.api.json +23 -0
- package/src/04-components/data-list/data-list.docs.json +79 -0
- package/src/04-components/data-list/data-list.visual.spec.ts +14 -0
- package/src/04-components/data-list/index.scss +98 -0
- package/src/04-components/dialog/dialog-visual.png +0 -0
- package/src/04-components/dialog/dialog.api.json +23 -0
- package/src/04-components/dialog/dialog.docs.json +58 -0
- package/src/04-components/dialog/dialog.visual.spec.ts +14 -0
- package/src/04-components/dialog/index.scss +74 -0
- package/src/04-components/disclosure/disclosure-visual.png +0 -0
- package/src/04-components/disclosure/disclosure.api.json +31 -0
- package/src/04-components/disclosure/disclosure.docs.json +73 -0
- package/src/04-components/disclosure/disclosure.visual.spec.ts +14 -0
- package/src/04-components/disclosure/index.scss +111 -0
- package/src/04-components/divider/divider-visual.png +0 -0
- package/src/04-components/divider/divider.api.json +30 -0
- package/src/04-components/divider/divider.docs.json +68 -0
- package/src/04-components/divider/divider.visual.spec.ts +14 -0
- package/src/04-components/divider/index.scss +115 -0
- package/src/04-components/drawer/drawer-visual.png +0 -0
- package/src/04-components/drawer/drawer.api.json +39 -0
- package/src/04-components/drawer/drawer.docs.json +78 -0
- package/src/04-components/drawer/drawer.visual.spec.ts +14 -0
- package/src/04-components/drawer/index.scss +251 -0
- package/src/04-components/field/field-visual.png +0 -0
- package/src/04-components/field/field.api.json +11 -0
- package/src/04-components/field/field.docs.json +59 -0
- package/src/04-components/field/field.visual.spec.ts +14 -0
- package/src/04-components/field/index.scss +44 -0
- package/src/04-components/form-error/form-error-visual.png +0 -0
- package/src/04-components/form-error/form-error.api.json +19 -0
- package/src/04-components/form-error/form-error.docs.json +40 -0
- package/src/04-components/form-error/form-error.visual.spec.ts +14 -0
- package/src/04-components/form-error/index.scss +31 -0
- package/src/04-components/form-helper/form-helper-visual.png +0 -0
- package/src/04-components/form-helper/form-helper.api.json +19 -0
- package/src/04-components/form-helper/form-helper.docs.json +31 -0
- package/src/04-components/form-helper/form-helper.visual.spec.ts +14 -0
- package/src/04-components/form-helper/index.scss +24 -0
- package/src/04-components/heading/heading-visual.png +0 -0
- package/src/04-components/heading/heading.api.json +83 -0
- package/src/04-components/heading/heading.docs.json +98 -0
- package/src/04-components/heading/heading.visual.spec.ts +14 -0
- package/src/04-components/heading/index.scss +61 -0
- package/src/04-components/icon/icon-visual.png +0 -0
- package/src/04-components/icon/icon.api.json +56 -0
- package/src/04-components/icon/icon.docs.json +155 -0
- package/src/04-components/icon/icon.visual.spec.ts +14 -0
- package/src/04-components/icon/index.scss +79 -0
- package/src/04-components/index.scss +41 -0
- package/src/04-components/input/index.scss +154 -0
- package/src/04-components/input/input-visual.png +0 -0
- package/src/04-components/input/input.api.json +85 -0
- package/src/04-components/input/input.docs.json +189 -0
- package/src/04-components/input/input.visual.spec.ts +14 -0
- package/src/04-components/label/index.scss +46 -0
- package/src/04-components/label/label-visual.png +0 -0
- package/src/04-components/label/label.api.json +27 -0
- package/src/04-components/label/label.docs.json +73 -0
- package/src/04-components/label/label.visual.spec.ts +14 -0
- package/src/04-components/link/index.scss +73 -0
- package/src/04-components/link/link-visual.png +0 -0
- package/src/04-components/link/link.api.json +39 -0
- package/src/04-components/link/link.docs.json +104 -0
- package/src/04-components/link/link.visual.spec.ts +14 -0
- package/src/04-components/menu/index.scss +145 -0
- package/src/04-components/menu/menu-visual.png +0 -0
- package/src/04-components/menu/menu.api.json +47 -0
- package/src/04-components/menu/menu.docs.json +81 -0
- package/src/04-components/menu/menu.visual.spec.ts +14 -0
- package/src/04-components/modal/index.scss +93 -0
- package/src/04-components/modal/modal-visual.png +0 -0
- package/src/04-components/modal/modal.api.json +43 -0
- package/src/04-components/modal/modal.docs.json +86 -0
- package/src/04-components/modal/modal.visual.spec.ts +14 -0
- package/src/04-components/overlay/index.scss +49 -0
- package/src/04-components/overlay/overlay-visual.png +0 -0
- package/src/04-components/overlay/overlay.api.json +23 -0
- package/src/04-components/overlay/overlay.docs.json +63 -0
- package/src/04-components/overlay/overlay.visual.spec.ts +14 -0
- package/src/04-components/pagination/index.scss +114 -0
- package/src/04-components/pagination/pagination-visual.png +0 -0
- package/src/04-components/pagination/pagination.api.json +39 -0
- package/src/04-components/pagination/pagination.docs.json +88 -0
- package/src/04-components/pagination/pagination.visual.spec.ts +14 -0
- package/src/04-components/popover/index.scss +114 -0
- package/src/04-components/popover/popover-visual.png +0 -0
- package/src/04-components/popover/popover.api.json +39 -0
- package/src/04-components/popover/popover.docs.json +70 -0
- package/src/04-components/popover/popover.visual.spec.ts +14 -0
- package/src/04-components/progress/index.scss +102 -0
- package/src/04-components/progress/progress-visual.png +0 -0
- package/src/04-components/progress/progress.api.json +23 -0
- package/src/04-components/progress/progress.docs.json +87 -0
- package/src/04-components/progress/progress.visual.spec.ts +14 -0
- package/src/04-components/radio/index.scss +96 -0
- package/src/04-components/radio/radio-visual.png +0 -0
- package/src/04-components/radio/radio.api.json +46 -0
- package/src/04-components/radio/radio.docs.json +159 -0
- package/src/04-components/radio/radio.visual.spec.ts +14 -0
- package/src/04-components/select/index.scss +113 -0
- package/src/04-components/select/select-visual.png +0 -0
- package/src/04-components/select/select.api.json +85 -0
- package/src/04-components/select/select.docs.json +162 -0
- package/src/04-components/select/select.visual.spec.ts +14 -0
- package/src/04-components/skeleton/index.scss +99 -0
- package/src/04-components/skeleton/skeleton-visual.png +0 -0
- package/src/04-components/skeleton/skeleton.api.json +19 -0
- package/src/04-components/skeleton/skeleton.docs.json +62 -0
- package/src/04-components/skeleton/skeleton.visual.spec.ts +14 -0
- package/src/04-components/spinner/index.scss +60 -0
- package/src/04-components/spinner/spinner-visual.png +0 -0
- package/src/04-components/spinner/spinner.api.json +63 -0
- package/src/04-components/spinner/spinner.docs.json +88 -0
- package/src/04-components/spinner/spinner.visual.spec.ts +15 -0
- package/src/04-components/status/index.scss +85 -0
- package/src/04-components/status/status-visual.png +0 -0
- package/src/04-components/status/status.api.json +19 -0
- package/src/04-components/status/status.docs.json +60 -0
- package/src/04-components/status/status.visual.spec.ts +14 -0
- package/src/04-components/table/index.scss +60 -0
- package/src/04-components/table/table-visual.png +0 -0
- package/src/04-components/table/table.api.json +27 -0
- package/src/04-components/table/table.docs.json +59 -0
- package/src/04-components/table/table.visual.spec.ts +14 -0
- package/src/04-components/tabs/index.scss +77 -0
- package/src/04-components/tabs/tabs-visual.png +0 -0
- package/src/04-components/tabs/tabs.api.json +31 -0
- package/src/04-components/tabs/tabs.docs.json +61 -0
- package/src/04-components/tabs/tabs.visual.spec.ts +14 -0
- package/src/04-components/tag/index.scss +98 -0
- package/src/04-components/tag/tag-visual.png +0 -0
- package/src/04-components/tag/tag.api.json +86 -0
- package/src/04-components/tag/tag.docs.json +108 -0
- package/src/04-components/tag/tag.visual.spec.ts +14 -0
- package/src/04-components/textarea/index.scss +124 -0
- package/src/04-components/textarea/textarea-visual.png +0 -0
- package/src/04-components/textarea/textarea.api.json +93 -0
- package/src/04-components/textarea/textarea.docs.json +191 -0
- package/src/04-components/textarea/textarea.visual.spec.ts +14 -0
- package/src/04-components/toast/index.scss +180 -0
- package/src/04-components/toast/toast-visual.png +0 -0
- package/src/04-components/toast/toast.api.json +43 -0
- package/src/04-components/toast/toast.docs.json +99 -0
- package/src/04-components/toast/toast.visual.spec.ts +14 -0
- package/src/04-components/toggle/index.scss +117 -0
- package/src/04-components/toggle/toggle-visual.png +0 -0
- package/src/04-components/toggle/toggle.api.json +43 -0
- package/src/04-components/toggle/toggle.docs.json +92 -0
- package/src/04-components/toggle/toggle.visual.spec.ts +14 -0
- package/src/04-components/tooltip/index.scss +102 -0
- package/src/04-components/tooltip/tooltip-visual.png +0 -0
- package/src/04-components/tooltip/tooltip.api.json +39 -0
- package/src/04-components/tooltip/tooltip.docs.json +63 -0
- package/src/04-components/tooltip/tooltip.visual.spec.ts +14 -0
- package/src/05-utilities/border/index.scss +21 -0
- package/src/05-utilities/display/display.api.json +6 -0
- package/src/05-utilities/display/display.docs.json +28 -0
- package/src/05-utilities/display/display.scss +195 -0
- package/src/05-utilities/index.scss +6 -0
- package/src/05-utilities/spacing/spacing.api.json +6 -0
- package/src/05-utilities/spacing/spacing.docs.json +43 -0
- package/src/05-utilities/spacing/spacing.scss +399 -0
- package/src/05-utilities/text/text.api.json +38 -0
- package/src/05-utilities/text/text.docs.json +132 -0
- package/src/05-utilities/text/text.scss +246 -0
- package/src/05-utilities/view-transition/index.scss +198 -0
- package/src/05-utilities/view-transition/view-transition.api.json +21 -0
- package/src/05-utilities/view-transition/view-transition.docs.json +63 -0
- package/src/05-utilities/visually-hidden/index.scss +38 -0
- package/src/05-utilities/visually-hidden/visually-hidden.api.json +8 -0
- package/src/05-utilities/visually-hidden/visually-hidden.docs.json +29 -0
- package/src/99-debug/grid-overlay.scss +79 -0
- package/src/99-debug/index.scss +1 -0
- package/src/index.scss +30 -0
- package/src/testing/api-types.ts +20 -0
- package/src/testing/grid-alignment.spec.ts +92 -0
- package/src/testing/html-generator.ts +151 -0
- package/src/testing/index.ts +15 -0
- package/src/testing/page-setup.ts +131 -0
- package/src/testing/rhythm.ts +146 -0
- package/src/testing/scaffold.ts +50 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@layer primitives {
|
|
2
|
+
.stack {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--stack-gap, var(--ui-space-2));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.stack--xs { --stack-gap: var(--ui-space-1); }
|
|
9
|
+
.stack--sm { --stack-gap: var(--ui-space-2); }
|
|
10
|
+
.stack--md { --stack-gap: var(--ui-space-4); }
|
|
11
|
+
.stack--lg { --stack-gap: var(--ui-space-6); }
|
|
12
|
+
.stack--xl { --stack-gap: var(--ui-space-8); }
|
|
13
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "stack",
|
|
3
|
+
"type": "primitive",
|
|
4
|
+
"title": "Stack",
|
|
5
|
+
"description": "Vertical layout with consistent gap.",
|
|
6
|
+
"api": "stack.api.json",
|
|
7
|
+
"sections": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Basic",
|
|
10
|
+
"examples": [
|
|
11
|
+
{
|
|
12
|
+
"items": [
|
|
13
|
+
{
|
|
14
|
+
"tag": "div",
|
|
15
|
+
"class": "ui-stack ui-stack--sm",
|
|
16
|
+
"children": [
|
|
17
|
+
{
|
|
18
|
+
"tag": "div",
|
|
19
|
+
"text": "Item 1",
|
|
20
|
+
"style": {
|
|
21
|
+
"background": "var(--ui-color-bg-muted)",
|
|
22
|
+
"padding": "var(--ui-space-2)"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"tag": "div",
|
|
27
|
+
"text": "Item 2",
|
|
28
|
+
"style": {
|
|
29
|
+
"background": "var(--ui-color-bg-muted)",
|
|
30
|
+
"padding": "var(--ui-space-2)"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"tag": "div",
|
|
35
|
+
"text": "Item 3",
|
|
36
|
+
"style": {
|
|
37
|
+
"background": "var(--ui-color-bg-muted)",
|
|
38
|
+
"padding": "var(--ui-space-2)"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"title": "Sizes",
|
|
49
|
+
"examples": [
|
|
50
|
+
{
|
|
51
|
+
"items": [
|
|
52
|
+
{
|
|
53
|
+
"tag": "div",
|
|
54
|
+
"class": "ui-stack ui-stack--xs",
|
|
55
|
+
"children": [
|
|
56
|
+
{
|
|
57
|
+
"tag": "div",
|
|
58
|
+
"text": "xs gap",
|
|
59
|
+
"style": {
|
|
60
|
+
"background": "var(--ui-color-bg-muted)",
|
|
61
|
+
"padding": "var(--ui-space-1)"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"tag": "div",
|
|
66
|
+
"text": "xs gap",
|
|
67
|
+
"style": {
|
|
68
|
+
"background": "var(--ui-color-bg-muted)",
|
|
69
|
+
"padding": "var(--ui-space-1)"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"items": [
|
|
78
|
+
{
|
|
79
|
+
"tag": "div",
|
|
80
|
+
"class": "ui-stack ui-stack--md",
|
|
81
|
+
"children": [
|
|
82
|
+
{
|
|
83
|
+
"tag": "div",
|
|
84
|
+
"text": "md gap",
|
|
85
|
+
"style": {
|
|
86
|
+
"background": "var(--ui-color-bg-muted)",
|
|
87
|
+
"padding": "var(--ui-space-1)"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"tag": "div",
|
|
92
|
+
"text": "md gap",
|
|
93
|
+
"style": {
|
|
94
|
+
"background": "var(--ui-color-bg-muted)",
|
|
95
|
+
"padding": "var(--ui-space-1)"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"items": [
|
|
104
|
+
{
|
|
105
|
+
"tag": "div",
|
|
106
|
+
"class": "ui-stack ui-stack--lg",
|
|
107
|
+
"children": [
|
|
108
|
+
{
|
|
109
|
+
"tag": "div",
|
|
110
|
+
"text": "lg gap",
|
|
111
|
+
"style": {
|
|
112
|
+
"background": "var(--ui-color-bg-muted)",
|
|
113
|
+
"padding": "var(--ui-space-1)"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"tag": "div",
|
|
118
|
+
"text": "lg gap",
|
|
119
|
+
"style": {
|
|
120
|
+
"background": "var(--ui-color-bg-muted)",
|
|
121
|
+
"padding": "var(--ui-space-1)"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "accordion",
|
|
3
|
+
"element": "div",
|
|
4
|
+
"modifiers": {},
|
|
5
|
+
"cssVars": [
|
|
6
|
+
{
|
|
7
|
+
"name": "--ui-accordion-border-color",
|
|
8
|
+
"default": "var(--ui-color-border)"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "--ui-accordion-border-width",
|
|
12
|
+
"default": "1px"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "--ui-accordion-radius",
|
|
16
|
+
"default": "var(--ui-radius-md)"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "accordion",
|
|
3
|
+
"type": "component",
|
|
4
|
+
"title": "Accordion",
|
|
5
|
+
"description": "Container for grouped expandable sections. Use with disclosure components.",
|
|
6
|
+
"api": "./accordion.api.json",
|
|
7
|
+
"sections": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Default",
|
|
10
|
+
"examples": [
|
|
11
|
+
{
|
|
12
|
+
"html": "<div class=\"ui-accordion\"><details class=\"ui-disclosure\"><summary class=\"ui-disclosure__trigger\">Section 1<span class=\"ui-disclosure__icon\">▾</span></summary><div class=\"ui-disclosure__content\"><p>Content for section 1</p></div></details><details class=\"ui-disclosure\"><summary class=\"ui-disclosure__trigger\">Section 2<span class=\"ui-disclosure__icon\">▾</span></summary><div class=\"ui-disclosure__content\"><p>Content for section 2</p></div></details><details class=\"ui-disclosure\"><summary class=\"ui-disclosure__trigger\">Section 3<span class=\"ui-disclosure__icon\">▾</span></summary><div class=\"ui-disclosure__content\"><p>Content for section 3</p></div></details></div>",
|
|
13
|
+
"code": "<div class=\"ui-accordion\">\n <details class=\"ui-disclosure\">\n <summary class=\"ui-disclosure__trigger\">Section 1</summary>\n <div class=\"ui-disclosure__content\">...</div>\n </details>\n <details class=\"ui-disclosure\">\n <summary class=\"ui-disclosure__trigger\">Section 2</summary>\n <div class=\"ui-disclosure__content\">...</div>\n </details>\n</div>"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"title": "Separated",
|
|
19
|
+
"description": "Gap between accordion items",
|
|
20
|
+
"api": "./accordion.api.json",
|
|
21
|
+
"examples": [
|
|
22
|
+
{
|
|
23
|
+
"html": "<div class=\"ui-accordion ui-accordion--separated\"><details class=\"ui-disclosure\"><summary class=\"ui-disclosure__trigger\">Section 1<span class=\"ui-disclosure__icon\">▾</span></summary><div class=\"ui-disclosure__content\"><p>Content for section 1</p></div></details><details class=\"ui-disclosure\"><summary class=\"ui-disclosure__trigger\">Section 2<span class=\"ui-disclosure__icon\">▾</span></summary><div class=\"ui-disclosure__content\"><p>Content for section 2</p></div></details></div>",
|
|
24
|
+
"code": "<div class=\"ui-accordion ui-accordion--separated\">\n ...\n</div>"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "With One Open",
|
|
30
|
+
"examples": [
|
|
31
|
+
{
|
|
32
|
+
"html": "<div class=\"ui-accordion\"><details class=\"ui-disclosure\" open><summary class=\"ui-disclosure__trigger\">Open Section<span class=\"ui-disclosure__icon\">▾</span></summary><div class=\"ui-disclosure__content\"><p>This section starts open</p></div></details><details class=\"ui-disclosure\"><summary class=\"ui-disclosure__trigger\">Closed Section<span class=\"ui-disclosure__icon\">▾</span></summary><div class=\"ui-disclosure__content\"><p>Click to open</p></div></details></div>",
|
|
33
|
+
"code": "<div class=\"ui-accordion\">\n <details class=\"ui-disclosure\" open>\n <summary class=\"ui-disclosure__trigger\">Open Section</summary>\n <div class=\"ui-disclosure__content\">...</div>\n </details>\n <details class=\"ui-disclosure\">\n ...\n </details>\n</div>"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"customization": [
|
|
39
|
+
{
|
|
40
|
+
"token": "--ui-accordion-border-color",
|
|
41
|
+
"default": "var(--ui-color-border)",
|
|
42
|
+
"description": "Border color"
|
|
43
|
+
},
|
|
44
|
+
{ "token": "--ui-accordion-border-width", "default": "1px", "description": "Border width" },
|
|
45
|
+
{
|
|
46
|
+
"token": "--ui-accordion-radius",
|
|
47
|
+
"default": "var(--ui-radius-md)",
|
|
48
|
+
"description": "Border radius"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import { expect, test } from '@playwright/test';
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../testing';
|
|
4
|
+
|
|
5
|
+
const DOCS_PATH = resolve(__dirname, 'accordion.docs.json');
|
|
6
|
+
|
|
7
|
+
test.describe('accordion visual regression', () => {
|
|
8
|
+
test('all variations', async ({ page }) => {
|
|
9
|
+
await setupVisualTestFromDocs(page, DOCS_PATH);
|
|
10
|
+
await validateGridRhythm(page, 'accordion');
|
|
11
|
+
await saveForLostPixel(page, 'accordion');
|
|
12
|
+
await expect(page.locator('body')).toHaveScreenshot('accordion.visual.png');
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@use '../../00-config/tokens/variables' as t;
|
|
2
|
+
|
|
3
|
+
// Accordion - grouped expandable sections
|
|
4
|
+
// Container for multiple disclosure items
|
|
5
|
+
|
|
6
|
+
@layer components.tokens {
|
|
7
|
+
.accordion {
|
|
8
|
+
--_border-color: var(--ui-accordion-border-color, var(--ui-color-border, rgb(0 0 0 / 0.1)));
|
|
9
|
+
--_border-width: var(--ui-accordion-border-width, 1px);
|
|
10
|
+
--_radius: var(--ui-accordion-radius, var(--ui-radius-md, calc(#{t.$unit} * 1)));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@layer components.styles {
|
|
15
|
+
.accordion {
|
|
16
|
+
border-radius: var(--_radius);
|
|
17
|
+
// Use outline instead of border - doesn't affect box dimensions
|
|
18
|
+
outline: var(--_border-width) solid var(--_border-color);
|
|
19
|
+
outline-offset: calc(var(--_border-width) * -1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Remove individual borders from nested disclosures
|
|
23
|
+
.accordion > .disclosure {
|
|
24
|
+
// Reset disclosure's border-width token so its height calculation is correct
|
|
25
|
+
--_border-width: 0;
|
|
26
|
+
border: none;
|
|
27
|
+
border-radius: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Add dividers between items
|
|
31
|
+
.accordion > .disclosure + .disclosure {
|
|
32
|
+
border-block-start: 1px solid var(--_border-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Round first and last items
|
|
36
|
+
.accordion > .disclosure:first-child .disclosure__trigger {
|
|
37
|
+
border-start-start-radius: var(--_radius);
|
|
38
|
+
border-start-end-radius: var(--_radius);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.accordion > .disclosure:last-child .disclosure__trigger {
|
|
42
|
+
border-end-start-radius: var(--_radius);
|
|
43
|
+
border-end-end-radius: var(--_radius);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// When last item is open, content needs rounding
|
|
47
|
+
.accordion > .disclosure:last-child .disclosure__content {
|
|
48
|
+
border-end-start-radius: var(--_radius);
|
|
49
|
+
border-end-end-radius: var(--_radius);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Borderless variant
|
|
53
|
+
.accordion--borderless {
|
|
54
|
+
border: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.accordion--borderless > .disclosure + .disclosure {
|
|
58
|
+
border-block-start: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Separated variant - gap between items
|
|
62
|
+
.accordion--separated {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: calc(#{t.$unit} * 1);
|
|
66
|
+
|
|
67
|
+
border: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.accordion--separated > .disclosure {
|
|
71
|
+
border: 1px solid var(--_border-color);
|
|
72
|
+
border-radius: var(--_radius);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.accordion--separated > .disclosure + .disclosure {
|
|
76
|
+
border-block-start: 1px solid var(--_border-color);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "alert",
|
|
3
|
+
"element": "div",
|
|
4
|
+
"modifiers": {
|
|
5
|
+
"variant": {
|
|
6
|
+
"values": ["info", "success", "warning", "danger"]
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"cssVars": [
|
|
10
|
+
{
|
|
11
|
+
"name": "--ui-alert-padding",
|
|
12
|
+
"default": "var(--ui-space-2)"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "--ui-alert-border-width",
|
|
16
|
+
"default": "var(--ui-border-width-sm)"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "--ui-alert-gap",
|
|
20
|
+
"default": "var(--ui-space-1)"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "--ui-alert-radius",
|
|
24
|
+
"default": "var(--ui-radius-md)"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "--ui-alert-bg",
|
|
28
|
+
"default": "var(--ui-color-bg-subtle)"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "--ui-alert-border-color",
|
|
32
|
+
"default": "var(--ui-color-border)"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "--ui-alert-color",
|
|
36
|
+
"default": "var(--ui-color-text)"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "--ui-alert-icon-color",
|
|
40
|
+
"default": "currentcolor"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "--ui-alert-info-bg",
|
|
44
|
+
"default": "var(--ui-color-bg-subtle)"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "--ui-alert-info-border",
|
|
48
|
+
"default": "var(--ui-color-primary)"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "--ui-alert-info-icon",
|
|
52
|
+
"default": "var(--ui-color-primary)"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "--ui-alert-success-bg",
|
|
56
|
+
"default": "var(--ui-color-bg-subtle)"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "--ui-alert-success-border",
|
|
60
|
+
"default": "var(--ui-color-success)"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "--ui-alert-success-icon",
|
|
64
|
+
"default": "var(--ui-color-success)"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "--ui-alert-warning-bg",
|
|
68
|
+
"default": "var(--ui-color-bg-subtle)"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "--ui-alert-warning-border",
|
|
72
|
+
"default": "var(--ui-color-warning)"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "--ui-alert-warning-icon",
|
|
76
|
+
"default": "var(--ui-color-warning)"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "--ui-alert-danger-bg",
|
|
80
|
+
"default": "var(--ui-color-bg-subtle)"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "--ui-alert-danger-border",
|
|
84
|
+
"default": "var(--ui-color-danger)"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "--ui-alert-danger-icon",
|
|
88
|
+
"default": "var(--ui-color-danger)"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "alert",
|
|
3
|
+
"type": "component",
|
|
4
|
+
"title": "Alert",
|
|
5
|
+
"description": "Informational banner for important messages. Use variants for different message types.",
|
|
6
|
+
"api": "./alert.api.json",
|
|
7
|
+
"sections": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Default",
|
|
10
|
+
"examples": [
|
|
11
|
+
{
|
|
12
|
+
"html": "<div class=\"ui-alert\"><div class=\"ui-alert__content\"><p class=\"ui-alert__title\">Note</p><p class=\"ui-alert__description\">This is a default alert message.</p></div></div>",
|
|
13
|
+
"code": "<div class=\"ui-alert\">\n <div class=\"ui-alert__content\">\n <p class=\"ui-alert__title\">Note</p>\n <p class=\"ui-alert__description\">This is a default alert.</p>\n </div>\n</div>"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"title": "Variants",
|
|
19
|
+
"examples": [
|
|
20
|
+
{
|
|
21
|
+
"html": "<div class=\"ui-stack\" style=\"--stack-gap: var(--ui-space-2);\"><div class=\"ui-alert ui-alert--info\"><div class=\"ui-alert__content\"><p class=\"ui-alert__title\">Info</p><p class=\"ui-alert__description\">Informational message for the user.</p></div></div><div class=\"ui-alert ui-alert--success\"><div class=\"ui-alert__content\"><p class=\"ui-alert__title\">Success</p><p class=\"ui-alert__description\">Your action was completed successfully.</p></div></div><div class=\"ui-alert ui-alert--warning\"><div class=\"ui-alert__content\"><p class=\"ui-alert__title\">Warning</p><p class=\"ui-alert__description\">Please review before continuing.</p></div></div><div class=\"ui-alert ui-alert--danger\"><div class=\"ui-alert__content\"><p class=\"ui-alert__title\">Error</p><p class=\"ui-alert__description\">Something went wrong. Please try again.</p></div></div></div>",
|
|
22
|
+
"code": "<div class=\"ui-alert ui-alert--info\">...</div>\n<div class=\"ui-alert ui-alert--success\">...</div>\n<div class=\"ui-alert ui-alert--warning\">...</div>\n<div class=\"ui-alert ui-alert--danger\">...</div>"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"title": "With Icon",
|
|
28
|
+
"examples": [
|
|
29
|
+
{
|
|
30
|
+
"html": "<div class=\"ui-alert ui-alert--info\"><svg class=\"ui-icon ui-icon--sm ui-alert__icon\" viewBox=\"0 0 24 24\"><circle cx=\"12\" cy=\"12\" r=\"10\"></circle><path d=\"M12 16v-4\"></path><path d=\"M12 8h.01\"></path></svg><div class=\"ui-alert__content\"><p class=\"ui-alert__description\">Your session will expire in 5 minutes.</p></div></div>",
|
|
31
|
+
"code": "<div class=\"ui-alert ui-alert--info\">\n <svg class=\"ui-icon ui-alert__icon\">...</svg>\n <div class=\"ui-alert__content\">\n <p class=\"ui-alert__description\">Your session will expire.</p>\n </div>\n</div>"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"title": "Description Only",
|
|
37
|
+
"examples": [
|
|
38
|
+
{
|
|
39
|
+
"html": "<div class=\"ui-alert ui-alert--success\"><div class=\"ui-alert__content\"><p class=\"ui-alert__description\">File uploaded successfully.</p></div></div>",
|
|
40
|
+
"code": "<div class=\"ui-alert ui-alert--success\">\n <div class=\"ui-alert__content\">\n <p class=\"ui-alert__description\">File uploaded.</p>\n </div>\n</div>"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"customization": [
|
|
46
|
+
{
|
|
47
|
+
"token": "--ui-alert-padding",
|
|
48
|
+
"default": "var(--ui-space-2)",
|
|
49
|
+
"description": "Inner padding"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"token": "--ui-alert-gap",
|
|
53
|
+
"default": "var(--ui-space-1)",
|
|
54
|
+
"description": "Gap between icon and content"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"token": "--ui-alert-radius",
|
|
58
|
+
"default": "var(--ui-radius-md)",
|
|
59
|
+
"description": "Border radius"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"token": "--ui-alert-border-width",
|
|
63
|
+
"default": "var(--ui-border-width-sm)",
|
|
64
|
+
"description": "Border width"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"token": "--ui-alert-bg",
|
|
68
|
+
"default": "var(--ui-color-bg-subtle)",
|
|
69
|
+
"description": "Background color"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"token": "--ui-alert-border-color",
|
|
73
|
+
"default": "var(--ui-color-border)",
|
|
74
|
+
"description": "Border color"
|
|
75
|
+
},
|
|
76
|
+
{ "token": "--ui-alert-color", "default": "var(--ui-color-text)", "description": "Text color" },
|
|
77
|
+
{ "token": "--ui-alert-icon-color", "default": "currentcolor", "description": "Icon color" }
|
|
78
|
+
]
|
|
79
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import { expect, test } from '@playwright/test';
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../testing';
|
|
4
|
+
|
|
5
|
+
const DOCS_PATH = resolve(__dirname, 'alert.docs.json');
|
|
6
|
+
|
|
7
|
+
test.describe('alert visual regression', () => {
|
|
8
|
+
test('all variations', async ({ page }) => {
|
|
9
|
+
await setupVisualTestFromDocs(page, DOCS_PATH);
|
|
10
|
+
await validateGridRhythm(page, 'alert');
|
|
11
|
+
await saveForLostPixel(page, 'alert');
|
|
12
|
+
await expect(page.locator('body')).toHaveScreenshot('alert.visual.png');
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
@use '../../00-config/tokens/variables' as t;
|
|
2
|
+
|
|
3
|
+
// @component alert
|
|
4
|
+
// @element div
|
|
5
|
+
|
|
6
|
+
@layer components.tokens {
|
|
7
|
+
.alert {
|
|
8
|
+
--_padding: var(--ui-alert-padding, var(--ui-space-2, #{t.$space-2}));
|
|
9
|
+
--_border-width: var(--ui-alert-border-width, var(--ui-border-width-sm, #{t.$border-width-sm}));
|
|
10
|
+
--_gap: var(--ui-alert-gap, var(--ui-space-1, #{t.$space-1}));
|
|
11
|
+
--_radius: var(--ui-alert-radius, var(--ui-radius-md, #{t.$radius-md}));
|
|
12
|
+
--_bg: var(--ui-alert-bg, var(--ui-color-bg-subtle, #{t.$color-bg-subtle}));
|
|
13
|
+
--_border-color: var(--ui-alert-border-color, var(--ui-color-border, #{t.$color-border}));
|
|
14
|
+
--_color: var(--ui-alert-color, var(--ui-color-text, #{t.$color-text}));
|
|
15
|
+
--_icon-color: var(--ui-alert-icon-color, currentcolor);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// @modifier variant
|
|
19
|
+
.alert--info {
|
|
20
|
+
--_bg: var(--ui-alert-info-bg, var(--ui-color-bg-subtle, #{t.$color-bg-subtle}));
|
|
21
|
+
--_border-color: var(--ui-alert-info-border, var(--ui-color-primary, #{t.$color-primary}));
|
|
22
|
+
--_icon-color: var(--ui-alert-info-icon, var(--ui-color-primary, #{t.$color-primary}));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.alert--success {
|
|
26
|
+
--_bg: var(--ui-alert-success-bg, var(--ui-color-bg-subtle, #{t.$color-bg-subtle}));
|
|
27
|
+
--_border-color: var(--ui-alert-success-border, var(--ui-color-success, #{t.$color-success}));
|
|
28
|
+
--_icon-color: var(--ui-alert-success-icon, var(--ui-color-success, #{t.$color-success}));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.alert--warning {
|
|
32
|
+
--_bg: var(--ui-alert-warning-bg, var(--ui-color-bg-subtle, #{t.$color-bg-subtle}));
|
|
33
|
+
--_border-color: var(--ui-alert-warning-border, var(--ui-color-warning, #{t.$color-warning}));
|
|
34
|
+
--_icon-color: var(--ui-alert-warning-icon, var(--ui-color-warning, #{t.$color-warning}));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.alert--danger {
|
|
38
|
+
--_bg: var(--ui-alert-danger-bg, var(--ui-color-bg-subtle, #{t.$color-bg-subtle}));
|
|
39
|
+
--_border-color: var(--ui-alert-danger-border, var(--ui-color-danger, #{t.$color-danger}));
|
|
40
|
+
--_icon-color: var(--ui-alert-danger-icon, var(--ui-color-danger, #{t.$color-danger}));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@layer components.styles {
|
|
45
|
+
.alert {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: flex-start;
|
|
48
|
+
gap: var(--_gap);
|
|
49
|
+
|
|
50
|
+
// Subtract border from padding to maintain grid rhythm
|
|
51
|
+
padding: calc(var(--_padding) - var(--_border-width));
|
|
52
|
+
padding-inline: var(--_padding);
|
|
53
|
+
|
|
54
|
+
color: var(--_color);
|
|
55
|
+
|
|
56
|
+
background: var(--_bg);
|
|
57
|
+
border: var(--_border-width) solid var(--_border-color);
|
|
58
|
+
border-radius: var(--_radius);
|
|
59
|
+
border-inline-start-width: calc(#{t.$unit} * 0.5);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.alert__icon {
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
|
|
65
|
+
color: var(--_icon-color);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.alert__content {
|
|
69
|
+
flex: 1;
|
|
70
|
+
|
|
71
|
+
min-inline-size: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.alert__title {
|
|
75
|
+
margin: 0;
|
|
76
|
+
|
|
77
|
+
font-weight: var(--ui-weight-medium, #{t.$weight-medium});
|
|
78
|
+
// Line-height aligned to grid (24px = 3 units)
|
|
79
|
+
line-height: var(--ui-row-1, #{t.$row});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.alert__description {
|
|
83
|
+
margin: 0;
|
|
84
|
+
margin-block-start: calc(#{t.$unit} * 1);
|
|
85
|
+
|
|
86
|
+
font-size: var(--ui-font-size-sm, #{t.$font-size-sm});
|
|
87
|
+
// Line-height aligned to grid (16px = 2 units for smaller text)
|
|
88
|
+
line-height: var(--ui-row-1, #{t.$row});
|
|
89
|
+
color: var(--ui-color-text-muted, #{t.$color-text-muted});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.alert__close {
|
|
93
|
+
flex-shrink: 0;
|
|
94
|
+
align-self: flex-start;
|
|
95
|
+
|
|
96
|
+
padding: 0;
|
|
97
|
+
|
|
98
|
+
color: var(--ui-color-text-muted, #{t.$color-text-muted});
|
|
99
|
+
|
|
100
|
+
background: none;
|
|
101
|
+
border: none;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
|
|
104
|
+
&:hover {
|
|
105
|
+
color: var(--ui-color-text, #{t.$color-text});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
Binary file
|