@techsio/ui-kit 0.57.0 → 0.59.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 +128 -133
- package/dist/atoms/action-icon.js +9 -8
- package/dist/atoms/button.js +114 -18
- package/dist/atoms/checkbox.js +77 -17
- package/dist/atoms/hotkeys.js +26 -7
- package/dist/atoms/icon.js +5 -5
- package/dist/atoms/image.js +118 -3
- package/dist/atoms/input.js +57 -9
- package/dist/atoms/label.js +13 -4
- package/dist/atoms/link-button.js +15 -12
- package/dist/atoms/link.js +18 -4
- package/dist/atoms/numeric-input.js +362 -84
- package/dist/atoms/rating.js +306 -73
- package/dist/atoms/skeleton.js +18 -14
- package/dist/atoms/status-text.js +31 -18
- package/dist/atoms/textarea.js +59 -12
- package/dist/atoms/tooltip.js +64 -43
- package/dist/hotkeys.js +1 -0
- package/dist/internal/choice-control.js +173 -0
- package/dist/internal/combobox-query-sync.js +11 -0
- package/dist/internal/date-picker-coordinator.js +56 -40
- package/dist/internal/date-picker-dom.js +44 -0
- package/dist/internal/date-picker-input.js +30 -0
- package/dist/internal/described-by.js +23 -18
- package/dist/internal/form-control-lifecycle.js +122 -0
- package/dist/internal/molecules/command.context.js +1 -0
- package/dist/internal/molecules/drawer.context.js +1 -0
- package/dist/internal/molecules/vertical-navigation.context.js +1 -0
- package/dist/internal/molecules/vertical-navigation.styles.js +9 -2
- package/dist/internal/numeric-input-editing.js +87 -0
- package/dist/internal/organisms/sidebar.context.js +1 -0
- package/dist/internal/organisms/sidebar.focus.js +1 -0
- package/dist/internal/overlay-portal.js +72 -0
- package/dist/internal/reduced-motion.js +1 -0
- package/dist/internal/use-effective-disabled.js +8 -0
- package/dist/molecules/accordion.js +44 -30
- package/dist/molecules/availability-status.js +1 -0
- package/dist/molecules/breadcrumb.js +11 -11
- package/dist/molecules/carousel.js +279 -97
- package/dist/molecules/cascade-select.js +327 -81
- package/dist/molecules/chart.js +427 -78
- package/dist/molecules/color-select.js +181 -62
- package/dist/molecules/combobox.js +537 -182
- package/dist/molecules/command.js +2 -1
- package/dist/molecules/date-picker.js +629 -119
- package/dist/molecules/dialog.js +89 -48
- package/dist/molecules/drawer.js +63 -6
- package/dist/molecules/file-upload.js +373 -37
- package/dist/molecules/form-checkbox.js +65 -22
- package/dist/molecules/form-error-summary.js +29 -5
- package/dist/molecules/form-input.js +26 -30
- package/dist/molecules/form-numeric-input.js +11 -9
- package/dist/molecules/form-textarea.js +26 -23
- package/dist/molecules/menu.js +170 -47
- package/dist/molecules/pagination.js +100 -28
- package/dist/molecules/phone-input.js +172 -37
- package/dist/molecules/popover.js +53 -26
- package/dist/molecules/price-block.js +1 -0
- package/dist/molecules/product-card.js +85 -23
- package/dist/molecules/quantity-field.js +4 -2
- package/dist/molecules/radio-card.js +102 -30
- package/dist/molecules/radio-group.js +108 -31
- package/dist/molecules/search-form.js +116 -13
- package/dist/molecules/select.js +226 -81
- package/dist/molecules/slider.js +141 -30
- package/dist/molecules/steps.js +181 -50
- package/dist/molecules/switch.js +86 -20
- package/dist/molecules/tabs.js +227 -31
- package/dist/molecules/toast.js +155 -53
- package/dist/molecules/totals-summary.js +2 -1
- package/dist/molecules/tour.js +9 -5
- package/dist/molecules/tree-view.js +255 -109
- package/dist/molecules/vertical-navigation.js +8 -4
- package/dist/organisms/data-table.fields.js +26 -5
- package/dist/organisms/data-table.helpers.js +6 -2
- package/dist/organisms/data-table.js +587 -154
- package/dist/organisms/footer.js +18 -11
- package/dist/organisms/gallery.js +61 -24
- package/dist/organisms/header.js +106 -32
- package/dist/organisms/line-item.js +1 -0
- package/dist/organisms/sidebar.js +1 -0
- package/dist/organisms/table.js +22 -7
- package/dist/src/atoms/action-icon.d.ts +10 -10
- package/dist/src/atoms/action-icon.d.ts.map +1 -1
- package/dist/src/atoms/badge.d.ts +3 -3
- package/dist/src/atoms/badge.d.ts.map +1 -1
- package/dist/src/atoms/button.d.ts +47 -24
- package/dist/src/atoms/button.d.ts.map +1 -1
- package/dist/src/atoms/checkbox.d.ts +6 -5
- package/dist/src/atoms/checkbox.d.ts.map +1 -1
- package/dist/src/atoms/hotkeys.d.ts +3 -2
- package/dist/src/atoms/hotkeys.d.ts.map +1 -1
- package/dist/src/atoms/icon.d.ts +18 -17
- package/dist/src/atoms/icon.d.ts.map +1 -1
- package/dist/src/atoms/image.d.ts +38 -7
- package/dist/src/atoms/image.d.ts.map +1 -1
- package/dist/src/atoms/input.d.ts +23 -14
- package/dist/src/atoms/input.d.ts.map +1 -1
- package/dist/src/atoms/label.d.ts +4 -4
- package/dist/src/atoms/label.d.ts.map +1 -1
- package/dist/src/atoms/link-button.d.ts +78 -31
- package/dist/src/atoms/link-button.d.ts.map +1 -1
- package/dist/src/atoms/link.d.ts +30 -9
- package/dist/src/atoms/link.d.ts.map +1 -1
- package/dist/src/atoms/numeric-input.d.ts +24 -19
- package/dist/src/atoms/numeric-input.d.ts.map +1 -1
- package/dist/src/atoms/rating.d.ts +54 -26
- package/dist/src/atoms/rating.d.ts.map +1 -1
- package/dist/src/atoms/skeleton.d.ts +9 -9
- package/dist/src/atoms/skeleton.d.ts.map +1 -1
- package/dist/src/atoms/status-text.d.ts +21 -13
- package/dist/src/atoms/status-text.d.ts.map +1 -1
- package/dist/src/atoms/textarea.d.ts +22 -20
- package/dist/src/atoms/textarea.d.ts.map +1 -1
- package/dist/src/atoms/tooltip.d.ts +5 -5
- package/dist/src/atoms/tooltip.d.ts.map +1 -1
- package/dist/src/hotkeys.d.ts +1 -1
- package/dist/src/hotkeys.d.ts.map +1 -1
- package/dist/src/internal/choice-control.d.ts +18 -0
- package/dist/src/internal/choice-control.d.ts.map +1 -0
- package/dist/src/internal/combobox-query-sync.d.ts +4 -0
- package/dist/src/internal/combobox-query-sync.d.ts.map +1 -0
- package/dist/src/internal/date-picker-coordinator.d.ts +7 -1
- package/dist/src/internal/date-picker-coordinator.d.ts.map +1 -1
- package/dist/src/internal/date-picker-dom.d.ts +10 -0
- package/dist/src/internal/date-picker-dom.d.ts.map +1 -0
- package/dist/src/internal/date-picker-input.d.ts +7 -0
- package/dist/src/internal/date-picker-input.d.ts.map +1 -0
- package/dist/src/internal/described-by.d.ts +7 -1
- package/dist/src/internal/described-by.d.ts.map +1 -1
- package/dist/src/internal/form-control-lifecycle.d.ts +22 -0
- package/dist/src/internal/form-control-lifecycle.d.ts.map +1 -0
- package/dist/src/internal/molecules/vertical-navigation.context.d.ts +1 -1
- package/dist/src/internal/molecules/vertical-navigation.context.d.ts.map +1 -1
- package/dist/src/internal/molecules/vertical-navigation.styles.d.ts +21 -0
- package/dist/src/internal/molecules/vertical-navigation.styles.d.ts.map +1 -1
- package/dist/src/internal/numeric-input-editing.d.ts +13 -0
- package/dist/src/internal/numeric-input-editing.d.ts.map +1 -0
- package/dist/src/internal/overlay-portal.d.ts +18 -0
- package/dist/src/internal/overlay-portal.d.ts.map +1 -0
- package/dist/src/internal/use-effective-disabled.d.ts +4 -0
- package/dist/src/internal/use-effective-disabled.d.ts.map +1 -0
- package/dist/src/molecules/accordion.d.ts +25 -19
- package/dist/src/molecules/accordion.d.ts.map +1 -1
- package/dist/src/molecules/availability-status.d.ts +4 -1
- package/dist/src/molecules/availability-status.d.ts.map +1 -1
- package/dist/src/molecules/breadcrumb.d.ts +2 -2
- package/dist/src/molecules/breadcrumb.d.ts.map +1 -1
- package/dist/src/molecules/carousel.d.ts +51 -52
- package/dist/src/molecules/carousel.d.ts.map +1 -1
- package/dist/src/molecules/cascade-select.d.ts +23 -8
- package/dist/src/molecules/cascade-select.d.ts.map +1 -1
- package/dist/src/molecules/chart.d.ts +18 -1
- package/dist/src/molecules/chart.d.ts.map +1 -1
- package/dist/src/molecules/color-select.d.ts +19 -3
- package/dist/src/molecules/color-select.d.ts.map +1 -1
- package/dist/src/molecules/combobox.d.ts +27 -5
- package/dist/src/molecules/combobox.d.ts.map +1 -1
- package/dist/src/molecules/command.d.ts +1 -1
- package/dist/src/molecules/date-picker.d.ts +30 -4
- package/dist/src/molecules/date-picker.d.ts.map +1 -1
- package/dist/src/molecules/dialog.d.ts +17 -4
- package/dist/src/molecules/dialog.d.ts.map +1 -1
- package/dist/src/molecules/drawer.d.ts +4 -4
- package/dist/src/molecules/drawer.d.ts.map +1 -1
- package/dist/src/molecules/file-upload.d.ts +11 -6
- package/dist/src/molecules/file-upload.d.ts.map +1 -1
- package/dist/src/molecules/form-checkbox.d.ts +7 -2
- package/dist/src/molecules/form-checkbox.d.ts.map +1 -1
- package/dist/src/molecules/form-error-summary.d.ts +4 -3
- package/dist/src/molecules/form-error-summary.d.ts.map +1 -1
- package/dist/src/molecules/form-input.d.ts +5 -6
- package/dist/src/molecules/form-input.d.ts.map +1 -1
- package/dist/src/molecules/form-numeric-input.d.ts +5 -5
- package/dist/src/molecules/form-numeric-input.d.ts.map +1 -1
- package/dist/src/molecules/form-textarea.d.ts +5 -6
- package/dist/src/molecules/form-textarea.d.ts.map +1 -1
- package/dist/src/molecules/menu.d.ts +17 -3
- package/dist/src/molecules/menu.d.ts.map +1 -1
- package/dist/src/molecules/pagination.d.ts +1 -1
- package/dist/src/molecules/pagination.d.ts.map +1 -1
- package/dist/src/molecules/phone-input.d.ts +4 -1
- package/dist/src/molecules/phone-input.d.ts.map +1 -1
- package/dist/src/molecules/popover.d.ts +7 -1
- package/dist/src/molecules/popover.d.ts.map +1 -1
- package/dist/src/molecules/price-block.d.ts +1 -1
- package/dist/src/molecules/price-block.d.ts.map +1 -1
- package/dist/src/molecules/product-card.d.ts +127 -27
- package/dist/src/molecules/product-card.d.ts.map +1 -1
- package/dist/src/molecules/quantity-field.d.ts +1 -1
- package/dist/src/molecules/quantity-field.d.ts.map +1 -1
- package/dist/src/molecules/radio-card.d.ts +10 -3
- package/dist/src/molecules/radio-card.d.ts.map +1 -1
- package/dist/src/molecules/radio-group.d.ts +15 -6
- package/dist/src/molecules/radio-group.d.ts.map +1 -1
- package/dist/src/molecules/search-form.d.ts +37 -12
- package/dist/src/molecules/search-form.d.ts.map +1 -1
- package/dist/src/molecules/select.d.ts +34 -29
- package/dist/src/molecules/select.d.ts.map +1 -1
- package/dist/src/molecules/slider.d.ts +23 -2
- package/dist/src/molecules/slider.d.ts.map +1 -1
- package/dist/src/molecules/steps.d.ts +30 -10
- package/dist/src/molecules/steps.d.ts.map +1 -1
- package/dist/src/molecules/switch.d.ts +54 -33
- package/dist/src/molecules/switch.d.ts.map +1 -1
- package/dist/src/molecules/tabs.d.ts +11 -11
- package/dist/src/molecules/tabs.d.ts.map +1 -1
- package/dist/src/molecules/toast.d.ts +38 -14
- package/dist/src/molecules/toast.d.ts.map +1 -1
- package/dist/src/molecules/totals-summary.d.ts +1 -1
- package/dist/src/molecules/totals-summary.d.ts.map +1 -1
- package/dist/src/molecules/tour.d.ts +1 -1
- package/dist/src/molecules/tour.d.ts.map +1 -1
- package/dist/src/molecules/tree-view.d.ts +16 -20
- package/dist/src/molecules/tree-view.d.ts.map +1 -1
- package/dist/src/molecules/vertical-navigation.d.ts +2 -2
- package/dist/src/molecules/vertical-navigation.d.ts.map +1 -1
- package/dist/src/organisms/data-table.d.ts +28 -3
- package/dist/src/organisms/data-table.d.ts.map +1 -1
- package/dist/src/organisms/data-table.fields.d.ts +4 -1
- package/dist/src/organisms/data-table.fields.d.ts.map +1 -1
- package/dist/src/organisms/data-table.helpers.d.ts +5 -12
- package/dist/src/organisms/data-table.helpers.d.ts.map +1 -1
- package/dist/src/organisms/footer.d.ts +5 -5
- package/dist/src/organisms/footer.d.ts.map +1 -1
- package/dist/src/organisms/gallery.d.ts +11 -9
- package/dist/src/organisms/gallery.d.ts.map +1 -1
- package/dist/src/organisms/header.d.ts +24 -22
- package/dist/src/organisms/header.d.ts.map +1 -1
- package/dist/src/organisms/table.d.ts +14 -14
- package/dist/src/organisms/table.d.ts.map +1 -1
- package/dist/src/templates/accordion.d.ts +8 -6
- package/dist/src/templates/accordion.d.ts.map +1 -1
- package/dist/src/templates/breadcrumb.d.ts +1 -1
- package/dist/src/templates/breadcrumb.d.ts.map +1 -1
- package/dist/src/templates/carousel.d.ts +3 -3
- package/dist/src/templates/carousel.d.ts.map +1 -1
- package/dist/src/templates/facet-filter-panel.d.ts +9 -3
- package/dist/src/templates/facet-filter-panel.d.ts.map +1 -1
- package/dist/src/templates/gallery.d.ts +2 -2
- package/dist/src/templates/gallery.d.ts.map +1 -1
- package/dist/src/templates/numeric-input.d.ts +1 -1
- package/dist/src/templates/numeric-input.d.ts.map +1 -1
- package/dist/src/templates/popover.d.ts +4 -2
- package/dist/src/templates/popover.d.ts.map +1 -1
- package/dist/src/templates/product-card.d.ts +12 -4
- package/dist/src/templates/product-card.d.ts.map +1 -1
- package/dist/src/templates/search-suggestions.d.ts +1 -1
- package/dist/src/templates/select.d.ts +7 -2
- package/dist/src/templates/select.d.ts.map +1 -1
- package/dist/src/templates/tabs.d.ts +8 -7
- package/dist/src/templates/tabs.d.ts.map +1 -1
- package/dist/src/theme/theme-config.d.ts +9 -16
- package/dist/src/theme/theme-config.d.ts.map +1 -1
- package/dist/src/theme/theme-provider.d.ts +16 -21
- package/dist/src/theme/theme-provider.d.ts.map +1 -1
- package/dist/src/theme/theme-toggle.d.ts.map +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/templates/accordion.js +3 -1
- package/dist/templates/breadcrumb.js +11 -4
- package/dist/templates/carousel.js +3 -6
- package/dist/templates/facet-filter-panel.js +121 -52
- package/dist/templates/gallery.js +6 -2
- package/dist/templates/numeric-input.js +6 -1
- package/dist/templates/popover.js +6 -1
- package/dist/templates/product-card.js +52 -26
- package/dist/templates/select.js +6 -1
- package/dist/templates/tabs.js +4 -2
- package/dist/theme/theme-config.js +8 -16
- package/dist/theme/theme-provider.js +89 -63
- package/dist/theme/theme-toggle.js +17 -9
- package/dist/utils.js +11 -1
- package/package.json +9 -5
- package/src/tokens/_base.css +4 -3
- package/src/tokens/_business-atoms.css +96 -0
- package/src/tokens/_foundation-overrides.css +251 -0
- package/src/tokens/_reset.css +10 -10
- package/src/tokens/_scheme-scopes.css +4194 -0
- package/src/tokens/_semantic.css +1 -23
- package/src/tokens/_tokens-base.css +36 -32
- package/src/tokens/_typography.css +2 -1
- package/src/tokens/components/_form-control.css +149 -6
- package/src/tokens/components/_popup-surface.css +15 -29
- package/src/tokens/components/atoms/_action-icon.css +49 -0
- package/src/tokens/components/atoms/_button.css +77 -0
- package/src/tokens/components/atoms/_checkbox.css +47 -4
- package/src/tokens/components/atoms/_hotkeys.css +2 -0
- package/src/tokens/components/atoms/_icon.css +60 -7
- package/src/tokens/components/atoms/_image.css +18 -0
- package/src/tokens/components/atoms/_input.css +20 -0
- package/src/tokens/components/atoms/_label.css +3 -7
- package/src/tokens/components/atoms/_link.css +47 -5
- package/src/tokens/components/atoms/_numeric-input.css +121 -2
- package/src/tokens/components/atoms/_rating.css +55 -6
- package/src/tokens/components/atoms/_skeleton.css +12 -2
- package/src/tokens/components/atoms/_status-text.css +35 -5
- package/src/tokens/components/atoms/_textarea.css +32 -3
- package/src/tokens/components/atoms/_tooltip.css +25 -0
- package/src/tokens/components/molecules/_accordion.css +46 -5
- package/src/tokens/components/molecules/_breadcrumb.css +15 -4
- package/src/tokens/components/molecules/_carousel.css +67 -0
- package/src/tokens/components/molecules/_cascade-select.css +104 -0
- package/src/tokens/components/molecules/_chart.css +32 -16
- package/src/tokens/components/molecules/_color-select.css +21 -0
- package/src/tokens/components/molecules/_combobox.css +81 -0
- package/src/tokens/components/molecules/_command.css +1 -0
- package/src/tokens/components/molecules/_date-picker.css +66 -10
- package/src/tokens/components/molecules/_dialog.css +36 -4
- package/src/tokens/components/molecules/_drawer.css +39 -3
- package/src/tokens/components/molecules/_file-upload.css +16 -1
- package/src/tokens/components/molecules/_menu.css +17 -0
- package/src/tokens/components/molecules/_pagination.css +19 -0
- package/src/tokens/components/molecules/_phone-input.css +20 -5
- package/src/tokens/components/molecules/_popover.css +34 -0
- package/src/tokens/components/molecules/_product-card.css +70 -0
- package/src/tokens/components/molecules/_radio-card.css +35 -0
- package/src/tokens/components/molecules/_radio-group.css +8 -0
- package/src/tokens/components/molecules/_select.css +33 -0
- package/src/tokens/components/molecules/_slider.css +5 -0
- package/src/tokens/components/molecules/_steps.css +52 -0
- package/src/tokens/components/molecules/_switch.css +59 -10
- package/src/tokens/components/molecules/_tabs.css +61 -3
- package/src/tokens/components/molecules/_toast.css +60 -0
- package/src/tokens/components/molecules/_totals-summary.css +22 -22
- package/src/tokens/components/molecules/_tour.css +16 -1
- package/src/tokens/components/molecules/_tree-view.css +27 -3
- package/src/tokens/components/molecules/_vertical-navigation.css +21 -3
- package/src/tokens/components/organisms/_data-table.css +97 -0
- package/src/tokens/components/organisms/_footer.css +9 -0
- package/src/tokens/components/organisms/_gallery.css +11 -0
- package/src/tokens/components/organisms/_header.css +22 -0
- package/src/tokens/components/organisms/_sidebar.css +1 -1
- package/src/tokens/components/organisms/_table.css +31 -0
- package/src/tokens/components/templates/_facet-filter-panel.css +11 -1
- package/src/tokens/figma/akros/variables.css +15 -6
- package/src/tokens/figma/brand-overrides.css +171 -57
- package/src/tokens/figma/business/variables.css +15 -6
- package/src/tokens/figma/cyber/variables.css +115 -38
- package/src/tokens/figma/cyber-dark/variables.css +115 -38
- package/src/tokens/figma/dark/variables.css +13 -4
- package/src/tokens/figma/light/variables.css +62 -49
- package/src/tokens/figma/{neo → n1}/variables.css +123 -114
- package/src/tokens/figma/variables.css +658 -249
- package/src/tokens/theme.css +24 -4
- package/src/tokens/_colors.css +0 -5
- package/src/tokens/figma/neo-dark/variables.css +0 -457
package/src/tokens/_semantic.css
CHANGED
|
@@ -56,28 +56,6 @@
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
/* Reverse flips whatever its parent theme is. */
|
|
60
|
-
:is(.light, .always-light) .reverse {
|
|
61
|
-
--theme-sign: -1;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:is(.dark, .always-dark) .reverse {
|
|
65
|
-
--theme-sign: 1;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* Reverse on System Light/Dark preference (when no explicit theme class is present) */
|
|
69
|
-
@media (prefers-color-scheme: light) {
|
|
70
|
-
.reverse:not(.dark):not(.always-dark):not(.light):not(.always-light) {
|
|
71
|
-
--theme-sign: -1;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@media (prefers-color-scheme: dark) {
|
|
76
|
-
.reverse:not(.dark):not(.always-dark):not(.light):not(.always-light) {
|
|
77
|
-
--theme-sign: 1;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
59
|
/* === TAILWIND UTILITY VARIABLES === */
|
|
82
60
|
@theme static {
|
|
83
61
|
/* Colors */
|
|
@@ -379,7 +357,7 @@
|
|
|
379
357
|
/* Disabled fill for form controls and interactive elements */
|
|
380
358
|
--color-fill-disabled: light-dark(
|
|
381
359
|
var(--color-gray-50),
|
|
382
|
-
var(--color-gray-
|
|
360
|
+
var(--color-gray-800)
|
|
383
361
|
);
|
|
384
362
|
|
|
385
363
|
/* Spacing */
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
/* Primitive tokens */
|
|
4
4
|
@import "./_base.css";
|
|
5
|
-
@import "./_colors.css";
|
|
6
5
|
@import "./_spacing.css";
|
|
7
6
|
@import "./_typography.css";
|
|
8
7
|
@import "./_layout.css";
|
|
@@ -21,10 +20,14 @@
|
|
|
21
20
|
@import "./figma/variables.css";
|
|
22
21
|
|
|
23
22
|
/* Brand theme overrides ([data-theme="…"]). Imported AFTER variables.css so
|
|
24
|
-
* the unlayered selectors win over the @theme
|
|
25
|
-
* light-dark() halves still follow `color-scheme`.
|
|
26
|
-
* (
|
|
23
|
+
* the unlayered selectors win over the @theme foundation values, while their
|
|
24
|
+
* light-dark() halves still follow `color-scheme`. Every selectable brand
|
|
25
|
+
* (business, akros, n1) is a data-theme block here; the attribute-less @theme
|
|
26
|
+
* above is the shared foundation, not a brand. */
|
|
27
27
|
@import "./figma/brand-overrides.css";
|
|
28
|
+
@import "./_foundation-overrides.css";
|
|
29
|
+
@import "./_business-atoms.css";
|
|
30
|
+
@import "./_scheme-scopes.css";
|
|
28
31
|
|
|
29
32
|
/* Colour formulas Figma cannot express (color-mix). Imported after the Figma
|
|
30
33
|
* layer so they win over its baked snapshots. */
|
|
@@ -33,55 +36,56 @@
|
|
|
33
36
|
/* Element defaults, the hover variant and the mobile input-size floor. */
|
|
34
37
|
@import "./_reset.css";
|
|
35
38
|
|
|
36
|
-
/*
|
|
39
|
+
/* Scheme switches use the nearest parent's computed theme sign. A style
|
|
40
|
+
* query does not require a size container and handles nested reverse scopes. */
|
|
37
41
|
:root {
|
|
38
42
|
color-scheme: light dark;
|
|
39
43
|
}
|
|
40
|
-
|
|
41
|
-
.light {
|
|
44
|
+
:is(.light, .always-light) {
|
|
42
45
|
color-scheme: light;
|
|
46
|
+
--theme-sign: 1;
|
|
43
47
|
}
|
|
44
|
-
|
|
45
|
-
.dark {
|
|
48
|
+
:is(.dark, .always-dark) {
|
|
46
49
|
color-scheme: dark;
|
|
50
|
+
--theme-sign: -1;
|
|
47
51
|
}
|
|
48
|
-
|
|
49
|
-
.always-light {
|
|
50
|
-
color-scheme: light;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.always-dark {
|
|
54
|
-
color-scheme: dark;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
52
|
@media (prefers-color-scheme: light) {
|
|
58
|
-
.reverse {
|
|
53
|
+
:root.reverse:not(.light, .always-light, .dark, .always-dark) {
|
|
59
54
|
color-scheme: dark;
|
|
55
|
+
--theme-sign: -1;
|
|
60
56
|
}
|
|
61
57
|
}
|
|
62
|
-
|
|
63
58
|
@media (prefers-color-scheme: dark) {
|
|
64
|
-
.reverse {
|
|
59
|
+
:root.reverse:not(.light, .always-light, .dark, .always-dark) {
|
|
65
60
|
color-scheme: light;
|
|
61
|
+
--theme-sign: 1;
|
|
66
62
|
}
|
|
67
63
|
}
|
|
68
|
-
|
|
69
|
-
.light .
|
|
70
|
-
|
|
64
|
+
@container style(--theme-sign: 1) {
|
|
65
|
+
.reverse:not(.light, .always-light, .dark, .always-dark) {
|
|
66
|
+
color-scheme: dark;
|
|
67
|
+
--theme-sign: -1;
|
|
68
|
+
}
|
|
71
69
|
}
|
|
72
|
-
|
|
73
|
-
.dark .
|
|
74
|
-
|
|
70
|
+
@container style(--theme-sign: -1) {
|
|
71
|
+
.reverse:not(.light, .always-light, .dark, .always-dark) {
|
|
72
|
+
color-scheme: light;
|
|
73
|
+
--theme-sign: 1;
|
|
74
|
+
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
@layer base {
|
|
78
|
+
body {
|
|
79
|
+
background-color: var(--color-base);
|
|
80
|
+
color: var(--color-fg-primary);
|
|
81
|
+
font-family: var(--font-sans);
|
|
82
|
+
}
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
.sbdocs-preview {
|
|
85
86
|
background-color: var(--color-base) !important;
|
|
86
87
|
color: var(--color-fg-primary) !important;
|
|
87
88
|
}
|
|
89
|
+
|
|
90
|
+
/* Tailwind excludes node_modules by default. Register shipped component utilities relative to this CSS. */
|
|
91
|
+
@source "../../dist/**/*.js";
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
|
|
5
5
|
"Segoe UI Symbol", "Noto Color Emoji";
|
|
6
6
|
|
|
7
|
-
/*
|
|
7
|
+
/* Fallback Utopia typography. Figma overrides sm/md/lg (0.88/1.25/1.5rem);
|
|
8
|
+
* the runtime bridge restores ordered fluid headings. See THEME-FLOW.md. */
|
|
8
9
|
--text-xs: clamp(
|
|
9
10
|
0.7813rem,
|
|
10
11
|
0.7747rem +
|
|
@@ -30,27 +30,73 @@
|
|
|
30
30
|
--color-form-control-fg-disabled: var(--color-fg-disabled);
|
|
31
31
|
--color-form-control-border-disabled: var(--color-border-disabled);
|
|
32
32
|
|
|
33
|
+
/* Read-only is legible, not disabled. Component aliases may override these. */
|
|
34
|
+
--color-form-control-readonly: color-mix(
|
|
35
|
+
in oklab,
|
|
36
|
+
var(--color-fill-surface) 50%,
|
|
37
|
+
var(--color-base)
|
|
38
|
+
);
|
|
39
|
+
--color-form-control-text: var(--color-fg-primary);
|
|
40
|
+
--color-form-control-bg-readonly: var(--color-form-control-readonly);
|
|
41
|
+
--color-form-control-fg-readonly: var(--color-form-control-text);
|
|
42
|
+
|
|
33
43
|
/* Placeholder */
|
|
34
44
|
--color-form-control-placeholder: var(--color-fg-placeholder);
|
|
35
45
|
|
|
36
46
|
/*
|
|
37
|
-
*
|
|
47
|
+
* Canonical sm/md/lg heights for form controls + buttons.
|
|
38
48
|
* Formula: border×2 + button-padding-y×2 + 1lh
|
|
39
49
|
* (1lh resolves to the element's computed line-height at usage time)
|
|
40
|
-
*
|
|
41
|
-
* form-control
|
|
50
|
+
* Fixed fields use h-form-control-*. Growing compound triggers use
|
|
51
|
+
* form-control-size-* with matching block padding and minimum height.
|
|
42
52
|
*/
|
|
53
|
+
/* Small buttons use secondary type, but share the small field's box. The
|
|
54
|
+
* live line-height still wins when text is enlarged. */
|
|
55
|
+
--line-height-form-control-sm: var(--line-height-24);
|
|
56
|
+
--padding-form-control-block-sm: var(--padding-button-y-sm);
|
|
57
|
+
--padding-form-control-block-md: var(--padding-button-y-md);
|
|
58
|
+
--padding-form-control-block-lg: var(--padding-button-y-lg);
|
|
43
59
|
--height-form-control-sm: calc(
|
|
44
|
-
var(--border-width-form-control) *
|
|
60
|
+
var(--border-width-form-control) *
|
|
61
|
+
2 +
|
|
62
|
+
var(--padding-form-control-block-sm) *
|
|
63
|
+
2 +
|
|
64
|
+
max(1lh, var(--line-height-form-control-sm))
|
|
45
65
|
);
|
|
46
66
|
--height-form-control-md: calc(
|
|
47
|
-
var(--border-width-form-control) *
|
|
67
|
+
var(--border-width-form-control) *
|
|
68
|
+
2 +
|
|
69
|
+
var(--padding-form-control-block-md) *
|
|
70
|
+
2 +
|
|
71
|
+
1lh
|
|
48
72
|
);
|
|
49
73
|
--height-form-control-lg: calc(
|
|
50
|
-
var(--border-width-form-control) *
|
|
74
|
+
var(--border-width-form-control) *
|
|
75
|
+
2 +
|
|
76
|
+
var(--padding-form-control-block-lg) *
|
|
77
|
+
2 +
|
|
78
|
+
1lh
|
|
51
79
|
);
|
|
52
80
|
}
|
|
53
81
|
|
|
82
|
+
/* Compound text controls share the fixed field scale without clipping wrapped
|
|
83
|
+
* labels. Inline padding remains owned by the component. */
|
|
84
|
+
@utility form-control-size-sm {
|
|
85
|
+
height: auto;
|
|
86
|
+
min-height: var(--height-form-control-sm);
|
|
87
|
+
padding-block: var(--padding-form-control-block-sm);
|
|
88
|
+
}
|
|
89
|
+
@utility form-control-size-md {
|
|
90
|
+
height: auto;
|
|
91
|
+
min-height: var(--height-form-control-md);
|
|
92
|
+
padding-block: var(--padding-form-control-block-md);
|
|
93
|
+
}
|
|
94
|
+
@utility form-control-size-lg {
|
|
95
|
+
height: auto;
|
|
96
|
+
min-height: var(--height-form-control-lg);
|
|
97
|
+
padding-block: var(--padding-form-control-block-lg);
|
|
98
|
+
}
|
|
99
|
+
|
|
54
100
|
/*
|
|
55
101
|
* Shared base utility for box-style form controls.
|
|
56
102
|
* Covers the static visual foundation (border, radius, background).
|
|
@@ -59,9 +105,106 @@
|
|
|
59
105
|
* differs (focus-within vs data-focus vs focus-visible) across components.
|
|
60
106
|
*/
|
|
61
107
|
@utility form-control-base {
|
|
108
|
+
@apply form-control-readonly form-control-disabled;
|
|
109
|
+
|
|
62
110
|
border-width: var(--border-width-form-control);
|
|
63
111
|
border-style: solid;
|
|
64
112
|
border-color: var(--color-form-control-border);
|
|
65
113
|
border-radius: var(--radius-form-control);
|
|
66
114
|
background-color: var(--color-form-control-bg);
|
|
67
115
|
}
|
|
116
|
+
|
|
117
|
+
/* Opt in on the actual value surface (native input or compound control slot).
|
|
118
|
+
* Behaviour still belongs to the native readOnly prop / Zag machine. CSS never
|
|
119
|
+
* prevents keyboard edits or removes disabled elements from the tab order. */
|
|
120
|
+
@utility form-control-readonly {
|
|
121
|
+
&:is(
|
|
122
|
+
[readonly],
|
|
123
|
+
[data-readonly]:not([data-readonly="false"]),
|
|
124
|
+
[aria-readonly="true"]
|
|
125
|
+
):not(
|
|
126
|
+
:disabled,
|
|
127
|
+
[data-disabled]:not([data-disabled="false"]),
|
|
128
|
+
[aria-disabled="true"]
|
|
129
|
+
) {
|
|
130
|
+
&,
|
|
131
|
+
&:is(:hover, :focus, :focus-within) {
|
|
132
|
+
background-color: var(--color-form-control-bg-readonly);
|
|
133
|
+
color: var(--color-form-control-fg-readonly);
|
|
134
|
+
opacity: 1;
|
|
135
|
+
cursor: default;
|
|
136
|
+
user-select: text;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&:is(
|
|
140
|
+
input:not(
|
|
141
|
+
[type="checkbox"],
|
|
142
|
+
[type="radio"],
|
|
143
|
+
[type="range"],
|
|
144
|
+
[type="color"],
|
|
145
|
+
[type="file"],
|
|
146
|
+
[type="button"],
|
|
147
|
+
[type="submit"],
|
|
148
|
+
[type="reset"],
|
|
149
|
+
[type="hidden"],
|
|
150
|
+
[type="image"]
|
|
151
|
+
),
|
|
152
|
+
textarea,
|
|
153
|
+
[contenteditable]
|
|
154
|
+
),
|
|
155
|
+
&:is(
|
|
156
|
+
input:not(
|
|
157
|
+
[type="checkbox"],
|
|
158
|
+
[type="radio"],
|
|
159
|
+
[type="range"],
|
|
160
|
+
[type="color"],
|
|
161
|
+
[type="file"],
|
|
162
|
+
[type="button"],
|
|
163
|
+
[type="submit"],
|
|
164
|
+
[type="reset"],
|
|
165
|
+
[type="hidden"],
|
|
166
|
+
[type="image"]
|
|
167
|
+
),
|
|
168
|
+
textarea,
|
|
169
|
+
[contenteditable]
|
|
170
|
+
):is(:hover, :focus, :focus-within),
|
|
171
|
+
&
|
|
172
|
+
:where(
|
|
173
|
+
input:not(
|
|
174
|
+
[type="checkbox"],
|
|
175
|
+
[type="radio"],
|
|
176
|
+
[type="range"],
|
|
177
|
+
[type="color"],
|
|
178
|
+
[type="file"],
|
|
179
|
+
[type="button"],
|
|
180
|
+
[type="submit"],
|
|
181
|
+
[type="reset"],
|
|
182
|
+
[type="hidden"],
|
|
183
|
+
[type="image"]
|
|
184
|
+
),
|
|
185
|
+
textarea,
|
|
186
|
+
[contenteditable]
|
|
187
|
+
) {
|
|
188
|
+
cursor: text;
|
|
189
|
+
user-select: text;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* Mark only value-changing actions, never copy/reveal/view actions. */
|
|
193
|
+
& [data-readonly-affordance] {
|
|
194
|
+
display: none;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@utility form-control-disabled {
|
|
200
|
+
&:is(
|
|
201
|
+
:disabled,
|
|
202
|
+
[data-disabled]:not([data-disabled="false"]),
|
|
203
|
+
[aria-disabled="true"]
|
|
204
|
+
) {
|
|
205
|
+
background-color: var(--color-form-control-bg-disabled);
|
|
206
|
+
border-color: var(--color-form-control-border-disabled);
|
|
207
|
+
color: var(--color-form-control-fg-disabled);
|
|
208
|
+
cursor: not-allowed;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
@@ -23,37 +23,23 @@
|
|
|
23
23
|
* Single layer for every popup. Nesting bumps --layer-index rather than
|
|
24
24
|
* hard-coding a bigger number, so a Select inside a Popover always wins.
|
|
25
25
|
*/
|
|
26
|
-
--z-popup:
|
|
27
|
-
|
|
28
|
-
/*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* Only the LIGHT half is a fix. On a light panel that white landed on the
|
|
35
|
-
* hover tint at 1.42:1 (base) / 1.46:1 (neo) — invisible. primary-800
|
|
36
|
-
* clears it at 6.21:1 / 5.73:1; primary-700 was rejected because it fails
|
|
37
|
-
* neo at 4.41:1.
|
|
38
|
-
*
|
|
39
|
-
* The DARK half stays white deliberately. There the same white was already
|
|
40
|
-
* correct — 9.46:1 (base) / 8.34:1 (neo) against the dark hover tint — so
|
|
41
|
-
* changing it would alter a mode that was never broken. An earlier version
|
|
42
|
-
* of this fix used primary-200 for dark, which still passed but needlessly
|
|
43
|
-
* dropped contrast to 7.10 / 5.73.
|
|
44
|
-
*
|
|
45
|
-
* Named for the state it serves, not the colour: it is an accent in light
|
|
46
|
-
* and plain white in dark, so an appearance-based name would lie in one of
|
|
47
|
-
* the two modes.
|
|
48
|
-
*
|
|
49
|
-
* TEMPORARY BRIDGE: Figma has no popup-surface token for this yet, which is
|
|
50
|
-
* why this declaration survives (figma/variables.css is imported after this
|
|
51
|
-
* file and would otherwise win). Delete once Figma exports it.
|
|
52
|
-
*/
|
|
53
|
-
--color-popup-item-fg-checked: light-dark(
|
|
54
|
-
var(--color-primary-800),
|
|
26
|
+
--z-popup: 60;
|
|
27
|
+
|
|
28
|
+
/* Checked Menu rows have no filled selection background. Use the readable
|
|
29
|
+
* semantic foreground: an accent palette step can be yellow on yellow, and
|
|
30
|
+
* even the text accent falls below 4.5:1 on brand hover tints. The checkmark
|
|
31
|
+
* carries selection meaning; retain high-contrast white in dark mode. */
|
|
32
|
+
--color-popup-checked: light-dark(
|
|
33
|
+
var(--color-fg-primary),
|
|
55
34
|
var(--color-white)
|
|
56
35
|
);
|
|
36
|
+
--color-popup-item-fg-checked: var(--color-popup-checked);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Apply to Content AND Positioner. Zag may copy Content's computed z-index
|
|
40
|
+
* onto its Positioner; both must agree, especially in Dialog/Drawer portals. */
|
|
41
|
+
@utility popup-layer {
|
|
42
|
+
z-index: calc(var(--z-popup) + var(--layer-index, 0));
|
|
57
43
|
}
|
|
58
44
|
|
|
59
45
|
/*
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* Code-owned pressed pair; hand off the aliases to Figma before export.
|
|
2
|
+
* Opposite danger endpoints stay distinct in every brand and color scheme.
|
|
3
|
+
* Use explicit foreground paint so simultaneous hover cannot leak its tone. */
|
|
4
|
+
@theme static {
|
|
5
|
+
/* Default to the shared scale; theme refinements stay local to ActionIcon. */
|
|
6
|
+
--text-action-icon-glyph-sm: var(--text-icon-control-sm);
|
|
7
|
+
--text-action-icon-glyph-md: var(--text-icon-control-md);
|
|
8
|
+
--text-action-icon-glyph-lg: var(--text-icon-control-lg);
|
|
9
|
+
--text-action-icon-sm: var(--text-action-icon-glyph-sm);
|
|
10
|
+
--text-action-icon-md: var(--text-action-icon-glyph-md);
|
|
11
|
+
--text-action-icon-lg: var(--text-action-icon-glyph-lg);
|
|
12
|
+
|
|
13
|
+
/* Opt-in resting fill; keep existing brands and consumer overrides intact. */
|
|
14
|
+
--color-action-icon-surface: var(--color-transparent);
|
|
15
|
+
--color-action-icon-bg: var(--color-action-icon-surface);
|
|
16
|
+
--color-action-icon-surface-disabled: var(--color-action-icon-surface);
|
|
17
|
+
--color-action-icon-bg-disabled: var(--color-action-icon-surface-disabled);
|
|
18
|
+
|
|
19
|
+
--size-action-icon-target-lg: var(--size-icon-control-lg);
|
|
20
|
+
--size-action-icon-lg: var(--size-action-icon-target-lg);
|
|
21
|
+
|
|
22
|
+
/* Resting danger ink: a destructive action must not read as neutral. */
|
|
23
|
+
--color-action-icon-danger: var(--color-icon-control-fg-danger-hover);
|
|
24
|
+
--color-action-icon-fg-danger: var(--color-action-icon-danger);
|
|
25
|
+
|
|
26
|
+
--color-action-icon-danger-active: light-dark(
|
|
27
|
+
var(--color-danger-100),
|
|
28
|
+
var(--color-danger-900)
|
|
29
|
+
);
|
|
30
|
+
--color-action-icon-on-danger-active: light-dark(
|
|
31
|
+
var(--color-danger-900),
|
|
32
|
+
var(--color-danger-100)
|
|
33
|
+
);
|
|
34
|
+
--color-action-icon-bg-danger-active: var(--color-action-icon-danger-active);
|
|
35
|
+
--color-action-icon-fg-danger-active: var(
|
|
36
|
+
--color-action-icon-on-danger-active
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Parent controls may own an opaque surface, including when unavailable. */
|
|
41
|
+
@layer components {
|
|
42
|
+
.action-icon-surface {
|
|
43
|
+
background-color: var(--color-action-icon-bg);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.action-icon-surface:disabled {
|
|
47
|
+
background-color: var(--color-action-icon-bg-disabled);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import "./_action-icon.css";
|
|
2
|
+
|
|
1
3
|
/*
|
|
2
4
|
* Button — runtime tokens come from libs/ui/src/tokens/figma/variables.css.
|
|
3
5
|
*
|
|
@@ -9,10 +11,32 @@
|
|
|
9
11
|
* - The `token-icon-button-spinner` semantic icon alias.
|
|
10
12
|
* - `--font-weight-button` (also used by LinkButton). Code-owned until
|
|
11
13
|
* the shared Figma library exports the same alias.
|
|
14
|
+
* - `--text-button-icon-{sm,md,lg}` glyph sizes, defaulting to the label.
|
|
15
|
+
* - `--height-button-compact-{sm,md,lg}` and matching padding bridges for
|
|
16
|
+
* `density="compact"`. Fixed-height, dense actions; the default density
|
|
17
|
+
* keeps content-driven sizing.
|
|
12
18
|
*/
|
|
13
19
|
|
|
14
20
|
@theme static {
|
|
21
|
+
--height-button-compact-sm: var(--dimension-28);
|
|
22
|
+
--height-button-compact-md: var(--dimension-36);
|
|
23
|
+
--height-button-compact-lg: var(--dimension-44);
|
|
24
|
+
--padding-button-compact-sm: var(--dimension-2) var(--padding-button-x-sm);
|
|
25
|
+
--padding-button-compact-md: var(--padding-button-y-md) var(--dimension-10);
|
|
26
|
+
--padding-button-compact-lg: var(--padding-button-y-lg)
|
|
27
|
+
var(--padding-button-x-lg);
|
|
28
|
+
--color-button-interacting: var(--color-fg-primary);
|
|
29
|
+
--color-button-fg-interacting: var(--color-button-interacting);
|
|
30
|
+
--color-button-warning-readable: var(--color-warning-fg);
|
|
31
|
+
--color-button-fg-warning-readable: var(--color-button-warning-readable);
|
|
15
32
|
--font-weight-button: var(--font-weight-medium);
|
|
33
|
+
/* Leading/trailing glyphs default to the label size; themes may refine them. */
|
|
34
|
+
--text-button-glyph-sm: var(--text-button-sm);
|
|
35
|
+
--text-button-glyph-md: var(--text-button-md);
|
|
36
|
+
--text-button-glyph-lg: var(--text-button-lg);
|
|
37
|
+
--text-button-icon-sm: var(--text-button-glyph-sm);
|
|
38
|
+
--text-button-icon-md: var(--text-button-glyph-md);
|
|
39
|
+
--text-button-icon-lg: var(--text-button-glyph-lg);
|
|
16
40
|
--padding-button-sm: var(--padding-button-y-sm) var(--padding-button-x-sm);
|
|
17
41
|
--padding-button-md: var(--padding-button-y-md) var(--padding-button-x-md);
|
|
18
42
|
--padding-button-lg: var(--padding-button-y-lg) var(--padding-button-x-lg);
|
|
@@ -21,3 +45,56 @@
|
|
|
21
45
|
@utility token-icon-button-spinner {
|
|
22
46
|
@apply token-icon-spinner;
|
|
23
47
|
}
|
|
48
|
+
|
|
49
|
+
/* Anchors and native buttons share the same unavailable presentation. Hover
|
|
50
|
+
* and pressed selectors must never restore an interactive colour. Loading is
|
|
51
|
+
* busy, not unavailable: its aria-disabled guard keeps the variant paint. */
|
|
52
|
+
@utility button-disabled {
|
|
53
|
+
&:is(
|
|
54
|
+
:disabled,
|
|
55
|
+
[data-disabled=""],
|
|
56
|
+
[aria-disabled="true"]:not([data-loading])
|
|
57
|
+
),
|
|
58
|
+
&:is(
|
|
59
|
+
:disabled,
|
|
60
|
+
[data-disabled=""],
|
|
61
|
+
[aria-disabled="true"]:not([data-loading])
|
|
62
|
+
):is(:hover, :active) {
|
|
63
|
+
color: var(--color-button-fg-disabled);
|
|
64
|
+
background-color: var(
|
|
65
|
+
--color-button-bg-disabled-treatment,
|
|
66
|
+
var(--color-button-bg-disabled)
|
|
67
|
+
);
|
|
68
|
+
border-color: var(--color-button-border-disabled);
|
|
69
|
+
cursor: not-allowed;
|
|
70
|
+
transform: none;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@utility button-disabled-borderless {
|
|
75
|
+
--color-button-bg-disabled-treatment: var(--color-button-bg-borderless-base);
|
|
76
|
+
}
|
|
77
|
+
@utility button-disabled-outlined {
|
|
78
|
+
--color-button-bg-disabled-treatment: var(--color-button-bg-outlined);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Compatibility sizing inherits typography, not text colour. */
|
|
82
|
+
@utility button-current-size {
|
|
83
|
+
font-size: inherit;
|
|
84
|
+
line-height: inherit;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Text-bearing actions grow with wrapped/localized labels, unlike icon buttons.
|
|
88
|
+
* The shared canonical heights remain minimum geometry, not clipping boxes. */
|
|
89
|
+
@utility button-size-sm {
|
|
90
|
+
height: auto;
|
|
91
|
+
min-height: var(--height-form-control-sm);
|
|
92
|
+
}
|
|
93
|
+
@utility button-size-md {
|
|
94
|
+
height: auto;
|
|
95
|
+
min-height: var(--height-form-control-md);
|
|
96
|
+
}
|
|
97
|
+
@utility button-size-lg {
|
|
98
|
+
height: auto;
|
|
99
|
+
min-height: var(--height-form-control-lg);
|
|
100
|
+
}
|
|
@@ -2,21 +2,64 @@
|
|
|
2
2
|
* Checkbox — runtime tokens come from libs/ui/src/tokens/figma/variables.css.
|
|
3
3
|
*
|
|
4
4
|
* This file only declares what Figma does not export yet:
|
|
5
|
-
* - `--spacing-checkbox-indeterminate-icon` —
|
|
6
|
-
*
|
|
5
|
+
* - `--spacing-checkbox-indeterminate-icon` — width of the mixed-state dash.
|
|
6
|
+
* - `--spacing-checkbox-indeterminate-stroke` — dash thickness, kept separate
|
|
7
|
+
* from width so mixed selection is a minus rather than a circular dot.
|
|
8
|
+
* - `--text-checkbox-icon-{sm,md,lg}` — check glyph size per box size.
|
|
7
9
|
* - `--spacing-form-checkbox-gap` — Figma exports `--spacing-form-checkbox`
|
|
8
10
|
* (no `-gap` suffix); keep this alias name until FormCheckbox TSX
|
|
9
11
|
* adopts the Figma name.
|
|
10
12
|
*
|
|
11
|
-
* Color, border-width, radius, size, ring, and form-checkbox-text-offset
|
|
12
|
-
*
|
|
13
|
+
* Color, border-width, base radius, size, ring, and form-checkbox-text-offset
|
|
14
|
+
* come from Figma. The runtime radius cap below keeps small checkboxes from
|
|
15
|
+
* becoming visually identical to radios in rounded themes.
|
|
13
16
|
*/
|
|
14
17
|
|
|
15
18
|
@theme static {
|
|
19
|
+
--color-checkbox-readonly: var(--color-form-control-fg-readonly);
|
|
20
|
+
--color-checkbox-fg-readonly: var(--color-checkbox-readonly);
|
|
21
|
+
--spacing-form-checkbox-description-sm: calc(
|
|
22
|
+
var(--size-form-checkbox-control-sm) +
|
|
23
|
+
var(--spacing-form-checkbox-gap)
|
|
24
|
+
);
|
|
25
|
+
--size-form-checkbox-control-sm: var(--dimension-18);
|
|
26
|
+
--spacing-form-checkbox-description-md: calc(
|
|
27
|
+
var(--size-form-checkbox-control-md) +
|
|
28
|
+
var(--spacing-form-checkbox-gap)
|
|
29
|
+
);
|
|
30
|
+
--size-form-checkbox-control-md: var(--dimension-24);
|
|
31
|
+
--spacing-form-checkbox-description-lg: calc(
|
|
32
|
+
var(--size-form-checkbox-control-lg) +
|
|
33
|
+
var(--spacing-form-checkbox-gap)
|
|
34
|
+
);
|
|
35
|
+
--size-form-checkbox-control-lg: var(--dimension-30);
|
|
36
|
+
|
|
37
|
+
/* The check glyph scales with its box instead of inheriting row text. */
|
|
38
|
+
--text-checkbox-glyph-sm: calc(var(--size-form-checkbox-control-sm) * 0.8);
|
|
39
|
+
--text-checkbox-glyph-md: calc(var(--size-form-checkbox-control-md) * 0.8);
|
|
40
|
+
--text-checkbox-glyph-lg: calc(var(--size-form-checkbox-control-lg) * 0.8);
|
|
41
|
+
--text-checkbox-icon-sm: var(--text-checkbox-glyph-sm);
|
|
42
|
+
--text-checkbox-icon-md: var(--text-checkbox-glyph-md);
|
|
43
|
+
--text-checkbox-icon-lg: var(--text-checkbox-glyph-lg);
|
|
44
|
+
|
|
45
|
+
/* A checkbox must remain distinct from a radio even in rounded themes. */
|
|
46
|
+
--radius-checkbox-corner: var(--radius-xs);
|
|
47
|
+
--radius-checkbox-control: min(
|
|
48
|
+
var(--radius-checkbox),
|
|
49
|
+
var(--radius-checkbox-corner)
|
|
50
|
+
);
|
|
51
|
+
--spacing-checkbox-mixed-stroke: var(--border-width-lg);
|
|
16
52
|
--spacing-checkbox-indeterminate-icon: 60%;
|
|
53
|
+
--spacing-checkbox-indeterminate-stroke: var(--spacing-checkbox-mixed-stroke);
|
|
17
54
|
--spacing-form-checkbox-gap: var(--spacing-form-checkbox);
|
|
18
55
|
}
|
|
19
56
|
|
|
57
|
+
@utility checkbox-focus-outline {
|
|
58
|
+
outline: var(--default-ring-width) var(--default-ring-style)
|
|
59
|
+
var(--color-checkbox-ring-focus);
|
|
60
|
+
outline-offset: var(--default-ring-offset);
|
|
61
|
+
}
|
|
62
|
+
|
|
20
63
|
@utility token-icon-checkbox {
|
|
21
64
|
@apply token-icon-check-bold;
|
|
22
65
|
}
|