@zazz-ui/core 0.4.1 → 0.5.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/AUTHORING.md +158 -0
- package/CHANGELOG.md +331 -0
- package/README.md +55 -23
- package/dist/scroll-state-C8mA5gq6.js +1 -0
- package/dist/sri.json +124 -72
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/editor/zazz.css-data.json +116794 -0
- package/editor/zazz.html-data.json +1683 -0
- package/editor/zazz.language-data.json +5001 -0
- package/editor/zazz.lint-data.json +152 -0
- package/package.json +12 -5
- package/src/base/_breakpoints.css +12 -0
- package/src/base/_layers.css +8 -9
- package/src/base/_properties-2xl.css +171 -0
- package/src/base/_properties-active.css +107 -0
- package/src/base/_properties-checked.css +107 -0
- package/src/base/_properties-current.css +107 -0
- package/src/base/_properties-disabled.css +107 -0
- package/src/base/_properties-focus-visible.css +107 -0
- package/src/base/_properties-focus-within.css +107 -0
- package/src/base/_properties-hover.css +107 -0
- package/src/base/_properties-lg.css +171 -0
- package/src/base/_properties-md.css +171 -0
- package/src/base/_properties-open.css +107 -0
- package/src/base/_properties-sm.css +171 -0
- package/src/base/_properties-starting.css +55 -0
- package/src/base/_properties-stuck.css +55 -0
- package/src/base/_properties-xl.css +171 -0
- package/src/base/_properties.css +555 -0
- package/src/base/_reset.css +67 -75
- package/src/base/_switches.css +145 -0
- package/src/base/_typography.css +437 -370
- package/src/base/_utilities-box.css +142 -0
- package/src/base/_utilities-color.css +290 -0
- package/src/base/_utilities-effects.css +235 -0
- package/src/base/_utilities-flow.css +312 -0
- package/src/base/_utilities-grid.css +143 -0
- package/src/base/_utilities-margin.css +376 -0
- package/src/base/_utilities-pseudo.css +426 -0
- package/src/base/_utilities-sizing.css +259 -0
- package/src/base/_utilities-spacing.css +190 -0
- package/src/base/_utilities-tier-2xl.css +93 -0
- package/src/base/_utilities-tier-active.css +61 -0
- package/src/base/_utilities-tier-checked.css +61 -0
- package/src/base/_utilities-tier-current.css +61 -0
- package/src/base/_utilities-tier-disabled.css +61 -0
- package/src/base/_utilities-tier-focus-visible.css +61 -0
- package/src/base/_utilities-tier-focus-within.css +61 -0
- package/src/base/_utilities-tier-hover.css +63 -0
- package/src/base/_utilities-tier-lg.css +93 -0
- package/src/base/_utilities-tier-md.css +93 -0
- package/src/base/_utilities-tier-open.css +61 -0
- package/src/base/_utilities-tier-sm.css +93 -0
- package/src/base/_utilities-tier-starting.css +35 -0
- package/src/base/_utilities-tier-stuck.css +114 -0
- package/src/base/_utilities-tier-xl.css +93 -0
- package/src/base/_utilities-typography.css +141 -0
- package/src/base/_variables.css +323 -372
- package/src/base/_view-transitions.css +10 -12
- package/src/base/command-score.d.ts.map +1 -1
- package/src/base/command-score.js +1 -2
- package/src/base/command-score.ts +1 -2
- package/src/base/dialog-lifecycle.js +1 -1
- package/src/base/dialog-lifecycle.ts +1 -1
- package/src/base/embla.d.ts +6 -7
- package/src/base/embla.d.ts.map +1 -1
- package/src/base/embla.js +89 -55
- package/src/base/embla.ts +89 -55
- package/src/base/hotkeys.d.ts +0 -5
- package/src/base/hotkeys.d.ts.map +1 -1
- package/src/base/hotkeys.ts +0 -5
- package/src/base/navigation.d.ts +12 -1
- package/src/base/navigation.d.ts.map +1 -1
- package/src/base/navigation.js +229 -86
- package/src/base/navigation.ts +224 -92
- package/src/base/reveal.js +14 -14
- package/src/base/reveal.ts +14 -14
- package/src/base/scroll-state.d.ts +21 -0
- package/src/base/scroll-state.d.ts.map +1 -0
- package/src/base/scroll-state.js +177 -0
- package/src/base/scroll-state.ts +188 -0
- package/src/base/signals.d.ts +1 -2
- package/src/base/signals.d.ts.map +1 -1
- package/src/base/signals.js +4 -6
- package/src/base/signals.ts +4 -6
- package/src/base/style-format.d.ts +33 -0
- package/src/base/style-format.d.ts.map +1 -0
- package/src/base/style-format.js +160 -0
- package/src/base/style-format.ts +180 -0
- package/src/base/typeahead.d.ts +19 -4
- package/src/base/typeahead.d.ts.map +1 -1
- package/src/base/typeahead.js +68 -21
- package/src/base/typeahead.ts +73 -23
- package/src/base/utilities.d.ts +188 -0
- package/src/base/utilities.d.ts.map +1 -0
- package/src/base/utilities.js +750 -0
- package/src/base/utilities.ts +865 -0
- package/src/base/utils.d.ts +3 -7
- package/src/base/utils.d.ts.map +1 -1
- package/src/base/utils.js +4 -8
- package/src/base/utils.ts +4 -8
- package/src/base/zazz-element.d.ts +14 -8
- package/src/base/zazz-element.d.ts.map +1 -1
- package/src/base/zazz-element.js +14 -8
- package/src/base/zazz-element.ts +15 -8
- package/src/globals.d.ts +1 -1
- package/src/head.d.ts +50 -4
- package/src/head.d.ts.map +1 -1
- package/src/head.js +119 -38
- package/src/head.ts +172 -41
- package/src/index.css +57 -14
- package/src/index.js +5 -0
- package/src/index.ts +6 -0
- package/src/manifest.d.ts +36 -5
- package/src/manifest.d.ts.map +1 -1
- package/src/manifest.js +150 -6
- package/src/manifest.ts +167 -9
- package/src/primitives/accordion/accordion.css +18 -17
- package/src/primitives/accordion/accordion.html +42 -9
- package/src/primitives/alert-dialog/alert-dialog.css +13 -13
- package/src/primitives/alert-dialog/alert-dialog.html +26 -12
- package/src/primitives/autocomplete/autocomplete-groups.html +64 -33
- package/src/primitives/autocomplete/autocomplete.css +43 -39
- package/src/primitives/autocomplete/autocomplete.d.ts +6 -5
- package/src/primitives/autocomplete/autocomplete.d.ts.map +1 -1
- package/src/primitives/autocomplete/autocomplete.html +38 -26
- package/src/primitives/autocomplete/autocomplete.js +6 -5
- package/src/primitives/autocomplete/autocomplete.ts +6 -5
- package/src/primitives/avatar/avatar.html +110 -15
- package/src/primitives/badge/badge-icon.html +22 -8
- package/src/primitives/badge/badge.css +401 -128
- package/src/primitives/badge/badge.html +12 -6
- package/src/primitives/breadcrumbs/breadcrumbs.html +25 -5
- package/src/primitives/button/button-icon-only.html +17 -11
- package/src/primitives/button/button-icon.html +9 -3
- package/src/primitives/button/button.css +408 -164
- package/src/primitives/button/button.html +14 -7
- package/src/primitives/button-group/button-group-vertical.html +5 -5
- package/src/primitives/button-group/button-group.css +53 -25
- package/src/primitives/button-group/button-group.html +18 -12
- package/src/primitives/callout/callout.css +114 -0
- package/src/primitives/callout/callout.html +188 -0
- package/src/primitives/card/card-subgrid.html +249 -34
- package/src/primitives/card/card.css +125 -0
- package/src/primitives/card/card.html +141 -20
- package/src/primitives/carousel/carousel.css +30 -20
- package/src/primitives/carousel/carousel.d.ts +7 -10
- package/src/primitives/carousel/carousel.d.ts.map +1 -1
- package/src/primitives/carousel/carousel.html +420 -84
- package/src/primitives/carousel/carousel.js +1 -1
- package/src/primitives/carousel/carousel.ts +8 -11
- package/src/primitives/checkbox/checkbox-tasklist.html +6 -6
- package/src/primitives/checkbox/checkbox.css +98 -40
- package/src/primitives/checkbox/checkbox.d.ts.map +1 -1
- package/src/primitives/checkbox/checkbox.html +13 -8
- package/src/primitives/checkbox/checkbox.js +7 -9
- package/src/primitives/checkbox/checkbox.ts +7 -15
- package/src/primitives/combobox/combobox-multiselect.html +53 -33
- package/src/primitives/combobox/combobox.css +145 -122
- package/src/primitives/combobox/combobox.d.ts +12 -11
- package/src/primitives/combobox/combobox.d.ts.map +1 -1
- package/src/primitives/combobox/combobox.html +48 -28
- package/src/primitives/combobox/combobox.js +46 -51
- package/src/primitives/combobox/combobox.ts +48 -55
- package/src/primitives/command/command-actions.d.ts +2 -3
- package/src/primitives/command/command-actions.d.ts.map +1 -1
- package/src/primitives/command/command-actions.html +48 -33
- package/src/primitives/command/command-actions.js +12 -10
- package/src/primitives/command/command-actions.ts +12 -13
- package/src/primitives/command/command-dialog.html +49 -25
- package/src/primitives/command/command.css +52 -42
- package/src/primitives/command/command.d.ts +10 -7
- package/src/primitives/command/command.d.ts.map +1 -1
- package/src/primitives/command/command.html +95 -46
- package/src/primitives/command/command.js +30 -13
- package/src/primitives/command/command.ts +30 -12
- package/src/primitives/debug/audit-core.d.ts +64 -0
- package/src/primitives/debug/audit-core.d.ts.map +1 -0
- package/src/primitives/debug/audit-core.js +356 -0
- package/src/primitives/debug/audit-core.ts +535 -0
- package/src/primitives/debug/debug.d.ts +50 -0
- package/src/primitives/debug/debug.d.ts.map +1 -0
- package/src/primitives/debug/debug.js +168 -0
- package/src/primitives/debug/debug.ts +211 -0
- package/src/primitives/dialog/dialog-with-form.html +67 -45
- package/src/primitives/dialog/dialog.css +87 -61
- package/src/primitives/dialog/dialog.html +25 -17
- package/src/primitives/fields/fields.css +108 -134
- package/src/primitives/fields/fields.html +39 -0
- package/src/primitives/input/input-icon-leading.html +3 -3
- package/src/primitives/input/input-icon-trailing.html +3 -3
- package/src/primitives/input/input.css +87 -49
- package/src/primitives/input/input.html +15 -15
- package/src/primitives/input-group/input-group-password-group.html +15 -15
- package/src/primitives/input-group/input-group.css +118 -75
- package/src/primitives/input-group/input-group.html +42 -30
- package/src/primitives/kbd/kbd-group.html +15 -2
- package/src/primitives/kbd/kbd.css +44 -31
- package/src/primitives/kbd/kbd.html +7 -1
- package/src/primitives/layout/layout.css +159 -0
- package/src/primitives/layout/layout.html +35 -0
- package/src/primitives/lightbox/lightbox.css +178 -105
- package/src/primitives/lightbox/lightbox.d.ts.map +1 -1
- package/src/primitives/lightbox/lightbox.html +138 -166
- package/src/primitives/lightbox/lightbox.js +10 -13
- package/src/primitives/lightbox/lightbox.ts +12 -13
- package/src/primitives/menu/menu-interest.html +60 -18
- package/src/primitives/menu/menu.css +22 -17
- package/src/primitives/menu/menu.d.ts +5 -5
- package/src/primitives/menu/menu.html +195 -40
- package/src/primitives/menu/menu.js +8 -8
- package/src/primitives/menu/menu.ts +8 -8
- package/src/primitives/menubar/menubar-help-search.html +78 -32
- package/src/primitives/menubar/menubar.html +166 -38
- package/src/primitives/meter/meter.css +41 -38
- package/src/primitives/meter/meter.html +44 -9
- package/src/primitives/mobile-menu/mobile-menu.css +47 -40
- package/src/primitives/mobile-menu/mobile-menu.html +1460 -179
- package/src/primitives/navigation-menu/navigation-menu-featured.html +155 -33
- package/src/primitives/navigation-menu/navigation-menu-icon-grid.html +222 -47
- package/src/primitives/navigation-menu/navigation-menu-interest.html +130 -38
- package/src/primitives/navigation-menu/navigation-menu-megamenu.html +402 -72
- package/src/primitives/navigation-menu/navigation-menu-simple.html +90 -40
- package/src/primitives/navigation-menu/navigation-menu.css +104 -106
- package/src/primitives/navigation-menu/navigation-menu.html +554 -158
- package/src/primitives/otp/otp.css +43 -44
- package/src/primitives/otp/otp.d.ts +4 -5
- package/src/primitives/otp/otp.d.ts.map +1 -1
- package/src/primitives/otp/otp.html +7 -6
- package/src/primitives/otp/otp.js +13 -18
- package/src/primitives/otp/otp.ts +12 -19
- package/src/primitives/password-group/password-group.css +132 -107
- package/src/primitives/password-group/password-group.d.ts.map +1 -1
- package/src/primitives/password-group/password-group.html +23 -16
- package/src/primitives/password-group/password-group.js +11 -12
- package/src/primitives/password-group/password-group.ts +11 -12
- package/src/primitives/popover/popover.css +88 -95
- package/src/primitives/popover/popover.html +18 -0
- package/src/primitives/progress/progress-indeterminate.html +1 -1
- package/src/primitives/progress/progress.css +34 -35
- package/src/primitives/progress/progress.html +18 -4
- package/src/primitives/prose/prose.html +19 -12
- package/src/primitives/radio/radio.css +83 -46
- package/src/primitives/radio/radio.html +16 -11
- package/src/primitives/reveal/reveal.css +37 -46
- package/src/primitives/reveal/reveal.html +15 -0
- package/src/primitives/scroll-fade/scroll-fade.css +115 -0
- package/src/primitives/scroll-fade/scroll-fade.html +69 -0
- package/src/primitives/select/multiselect.d.ts +8 -10
- package/src/primitives/select/multiselect.d.ts.map +1 -1
- package/src/primitives/select/multiselect.js +23 -27
- package/src/primitives/select/multiselect.ts +23 -29
- package/src/primitives/select/select-align.html +79 -16
- package/src/primitives/select/select-multiple.html +8 -4
- package/src/primitives/select/select-sides.html +104 -21
- package/src/primitives/select/select.css +297 -186
- package/src/primitives/select/select.html +24 -5
- package/src/primitives/separator/separator.css +15 -18
- package/src/primitives/separator/separator.html +37 -10
- package/src/primitives/slider/slider.css +48 -38
- package/src/primitives/slider/slider.html +9 -1
- package/src/primitives/style-guard/style-guard.d.ts +19 -0
- package/src/primitives/style-guard/style-guard.d.ts.map +1 -0
- package/src/primitives/style-guard/style-guard.js +125 -0
- package/src/primitives/style-guard/style-guard.ts +153 -0
- package/src/primitives/switch/switch.css +42 -33
- package/src/primitives/switch/switch.html +11 -6
- package/src/primitives/table/table-alternating.html +1 -1
- package/src/primitives/table/table-grid.html +5 -5
- package/src/primitives/table/table-size-sm.html +1 -1
- package/src/primitives/table/table.css +64 -61
- package/src/primitives/table/table.html +7 -7
- package/src/primitives/tabs/tabs.css +167 -166
- package/src/primitives/tabs/tabs.d.ts +10 -11
- package/src/primitives/tabs/tabs.d.ts.map +1 -1
- package/src/primitives/tabs/tabs.html +192 -36
- package/src/primitives/tabs/tabs.js +14 -15
- package/src/primitives/tabs/tabs.ts +14 -15
- package/src/primitives/textarea/textarea.css +69 -44
- package/src/primitives/textarea/textarea.html +3 -3
- package/src/primitives/toaster/toaster.css +90 -92
- package/src/primitives/toaster/toaster.d.ts +0 -6
- package/src/primitives/toaster/toaster.d.ts.map +1 -1
- package/src/primitives/toaster/toaster.html +22 -18
- package/src/primitives/toaster/toaster.js +64 -72
- package/src/primitives/toaster/toaster.ts +71 -87
- package/src/primitives/toggle/toggle.css +368 -153
- package/src/primitives/toggle/toggle.html +27 -9
- package/src/primitives/toggle-group/toggle-group-multiple.html +3 -3
- package/src/primitives/toggle-group/toggle-group-vertical.html +4 -4
- package/src/primitives/toggle-group/toggle-group.css +71 -23
- package/src/primitives/toggle-group/toggle-group.html +3 -3
- package/src/primitives/toolbar/toolbar.html +35 -13
- package/src/primitives/tooltip/tooltip-disabled.html +3 -3
- package/src/primitives/tooltip/tooltip-sides.html +36 -14
- package/src/primitives/tooltip/tooltip-with-kbd.html +5 -5
- package/src/primitives/tooltip/tooltip.css +111 -80
- package/src/primitives/tooltip/tooltip.html +3 -3
- package/src/primitives/utilities/aspect-ratio.html +51 -7
- package/src/primitives/utilities/basis.html +64 -11
- package/src/primitives/utilities/col-span.html +65 -9
- package/src/primitives/utilities/compose.html +48 -10
- package/src/primitives/utilities/flex-align.html +89 -19
- package/src/primitives/utilities/flex-direction.html +111 -13
- package/src/primitives/utilities/flex-grow.html +41 -7
- package/src/primitives/utilities/gap.html +158 -19
- package/src/primitives/utilities/grid-cols.html +75 -7
- package/src/primitives/utilities/grid-responsive.html +111 -12
- package/src/primitives/utilities/margin-auto.html +38 -7
- package/src/primitives/utilities/object-fit.html +75 -13
- package/src/primitives/utilities/order.html +40 -4
- package/src/primitives/utilities/overflow.html +74 -20
- package/src/primitives/utilities/padding-compose.html +67 -10
- package/src/primitives/utilities/padding.html +84 -13
- package/src/primitives/utilities/pile.html +29 -0
- package/src/primitives/utilities/position.html +65 -8
- package/src/primitives/utilities/responsive-flex.html +54 -7
- package/src/primitives/utilities/responsive-grid.html +115 -12
- package/src/primitives/utilities/size.html +120 -16
- package/src/primitives/utilities/width.html +123 -16
- package/examples/about.html +0 -583
- package/examples/components.html +0 -1028
- package/examples/forms.html +0 -504
- package/examples/index.html +0 -261
- package/examples/layout.html +0 -313
- package/examples/products.html +0 -839
- package/examples/responsive.html +0 -332
- package/src/base/_layout.css +0 -571
- package/src/base/_utilities.css +0 -6758
- package/src/primitives/utilities/grid-pile.html +0 -5
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
<div
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<div
|
|
2
|
+
style="
|
|
3
|
+
--display: flex;
|
|
4
|
+
--items: center;
|
|
5
|
+
--gap: 4;
|
|
6
|
+
"
|
|
7
|
+
>
|
|
8
|
+
<button data-ui="button" type="button">Default</button>
|
|
9
|
+
<button data-ui="button" data-button-variant="primary" type="button">Primary</button>
|
|
10
|
+
<button data-ui="button" data-button-variant="muted" type="button">Muted</button>
|
|
11
|
+
<button data-ui="button" data-button-variant="ghost" type="button">Ghost</button>
|
|
12
|
+
<button data-ui="button" data-button-variant="outline" type="button">Outline</button>
|
|
13
|
+
<button data-ui="button" data-button-variant="destructive" type="button">Destructive</button>
|
|
14
|
+
<button data-ui="button" data-button-variant="link" type="button">Link</button>
|
|
8
15
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<ui-button-group data-orientation="vertical" role="group" aria-label="View options">
|
|
2
|
-
<button
|
|
3
|
-
<button
|
|
4
|
-
<button
|
|
5
|
-
<button
|
|
1
|
+
<ui-button-group data-button-group-orientation="vertical" role="group" aria-label="View options">
|
|
2
|
+
<button data-ui="button" type="button">List</button>
|
|
3
|
+
<button data-ui="button" type="button">Board</button>
|
|
4
|
+
<button data-ui="button" type="button">Calendar</button>
|
|
5
|
+
<button data-ui="button" type="button">Timeline</button>
|
|
6
6
|
</ui-button-group>
|
|
@@ -1,54 +1,68 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* button-group.css: Button group (ui-button-group |
|
|
2
|
+
* button-group.css: Button group (ui-button-group | [data-ui~="button-group"])
|
|
3
3
|
*
|
|
4
|
-
* @layer components
|
|
5
|
-
* @requires
|
|
4
|
+
* @layer variables, components
|
|
5
|
+
* @requires _layers.css, _variables.css, _properties.css (--_*-resolved), button.css
|
|
6
6
|
* @uses :not(): first/last edge selection for shared-border collapse
|
|
7
7
|
* @uses logical border-radius longhands: RTL-safe corner rounding per orientation
|
|
8
8
|
* @uses flex-item z-index: raise the active control so its border/ring isn't clipped
|
|
9
|
-
* @
|
|
9
|
+
* @tokens --ui-button-group-* (@layer variables; named after the utilities they back)
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
@layer variables {
|
|
13
13
|
:root {
|
|
14
|
-
--ui-button-group-
|
|
15
|
-
--ui-button-group-
|
|
14
|
+
--ui-button-group-rounded: var(--ui-button-rounded);
|
|
15
|
+
--ui-button-group-bg: var(--color-card);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
@
|
|
19
|
+
@property --_button-group-rounded {
|
|
20
|
+
syntax: "*";
|
|
21
|
+
inherits: false;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@property --_button-group-bg {
|
|
25
|
+
syntax: "*";
|
|
26
|
+
inherits: false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@layer ui.components {
|
|
20
30
|
/* ===========================================================================
|
|
21
31
|
BUTTON GROUP
|
|
22
32
|
|
|
23
|
-
Joins adjacent controls (
|
|
24
|
-
segmented unit. Children keep their own --ui-button-
|
|
25
|
-
follow the buttons' size
|
|
33
|
+
Joins adjacent controls (buttons, and any child it wraps) into a single
|
|
34
|
+
segmented unit. Children keep their own --ui-button-rounded, so the outer corners
|
|
35
|
+
follow the buttons' size preset automatically; only the *inner* corners are
|
|
26
36
|
squared off and the doubled border is collapsed with a -1px overlap.
|
|
27
37
|
=========================================================================== */
|
|
28
38
|
|
|
29
|
-
:where(ui-button-group,
|
|
39
|
+
:where(ui-button-group, [data-ui~="button-group"]) {
|
|
30
40
|
display: flex;
|
|
31
41
|
inline-size: fit-content;
|
|
32
42
|
/* stretch so mixed-height children share one edge */
|
|
33
43
|
align-items: stretch;
|
|
34
|
-
border-radius: var(
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
border-radius: var(
|
|
45
|
+
--_rounded-resolved,
|
|
46
|
+
var(--_button-group-rounded, var(--ui-button-group-rounded))
|
|
47
|
+
);
|
|
48
|
+
background-color: var(--_bg-resolved, var(--_button-group-bg, var(--ui-button-group-bg)));
|
|
37
49
|
position: relative;
|
|
38
50
|
isolation: isolate;
|
|
39
51
|
}
|
|
40
52
|
|
|
41
53
|
/* flex items honour z-index without positioning, but relative keeps the
|
|
42
54
|
stacking context robust across child types (inputs, selects, …) */
|
|
43
|
-
:where(ui-button-group,
|
|
55
|
+
:where(ui-button-group, [data-ui~="button-group"]) > * {
|
|
44
56
|
position: relative;
|
|
45
57
|
}
|
|
46
58
|
|
|
47
59
|
/* the focused/hovered/pressed control floats above its neighbours so its
|
|
48
60
|
border and box-shadow ring paint over the overlapped edge */
|
|
49
|
-
:where(ui-button-group,
|
|
50
|
-
|
|
51
|
-
:where(ui-button-group,
|
|
61
|
+
:where(ui-button-group, [data-ui~="button-group"])
|
|
62
|
+
> *:hover:not(:disabled, [aria-disabled="true"]),
|
|
63
|
+
:where(ui-button-group, [data-ui~="button-group"]) > *:focus-visible,
|
|
64
|
+
:where(ui-button-group, [data-ui~="button-group"])
|
|
65
|
+
> *:active:not(:disabled, [aria-disabled="true"]) {
|
|
52
66
|
z-index: 1;
|
|
53
67
|
}
|
|
54
68
|
|
|
@@ -56,16 +70,19 @@
|
|
|
56
70
|
BUTTON GROUP: HORIZONTAL (default)
|
|
57
71
|
=========================================================================== */
|
|
58
72
|
|
|
59
|
-
:where(ui-button-group,
|
|
73
|
+
:where(ui-button-group, [data-ui~="button-group"]):not(
|
|
74
|
+
[data-button-group-orientation="vertical"]
|
|
75
|
+
) {
|
|
60
76
|
flex-direction: row;
|
|
61
77
|
}
|
|
62
78
|
|
|
63
|
-
:where(ui-button-group,
|
|
79
|
+
:where(ui-button-group, [data-ui~="button-group"]):not([data-button-group-orientation="vertical"])
|
|
80
|
+
> :not(:last-child) {
|
|
64
81
|
border-start-end-radius: 0;
|
|
65
82
|
border-end-end-radius: 0;
|
|
66
83
|
}
|
|
67
84
|
|
|
68
|
-
:where(ui-button-group,
|
|
85
|
+
:where(ui-button-group, [data-ui~="button-group"]):not([data-button-group-orientation="vertical"])
|
|
69
86
|
> :not(:first-child) {
|
|
70
87
|
/* pull onto the previous control's border so the seam is one line, not two */
|
|
71
88
|
margin-inline-start: -1px;
|
|
@@ -74,19 +91,30 @@
|
|
|
74
91
|
}
|
|
75
92
|
|
|
76
93
|
/* ===========================================================================
|
|
77
|
-
BUTTON GROUP: VERTICAL
|
|
94
|
+
BUTTON GROUP: VERTICAL — data-button-group-orientation="vertical"
|
|
78
95
|
=========================================================================== */
|
|
79
96
|
|
|
80
|
-
:where(
|
|
97
|
+
:where(
|
|
98
|
+
ui-button-group[data-button-group-orientation="vertical"],
|
|
99
|
+
[data-ui~="button-group"][data-button-group-orientation="vertical"]
|
|
100
|
+
) {
|
|
81
101
|
flex-direction: column;
|
|
82
102
|
}
|
|
83
103
|
|
|
84
|
-
:where(
|
|
104
|
+
:where(
|
|
105
|
+
ui-button-group[data-button-group-orientation="vertical"],
|
|
106
|
+
[data-ui~="button-group"][data-button-group-orientation="vertical"]
|
|
107
|
+
)
|
|
108
|
+
> :not(:last-child) {
|
|
85
109
|
border-end-start-radius: 0;
|
|
86
110
|
border-end-end-radius: 0;
|
|
87
111
|
}
|
|
88
112
|
|
|
89
|
-
:where(
|
|
113
|
+
:where(
|
|
114
|
+
ui-button-group[data-button-group-orientation="vertical"],
|
|
115
|
+
[data-ui~="button-group"][data-button-group-orientation="vertical"]
|
|
116
|
+
)
|
|
117
|
+
> :not(:first-child) {
|
|
90
118
|
margin-block-start: -1px;
|
|
91
119
|
border-start-start-radius: 0;
|
|
92
120
|
border-start-end-radius: 0;
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
<div
|
|
1
|
+
<div
|
|
2
|
+
style="
|
|
3
|
+
--display: flex-col;
|
|
4
|
+
--items: start;
|
|
5
|
+
--gap: 6;
|
|
6
|
+
"
|
|
7
|
+
>
|
|
2
8
|
<ui-button-group role="group" aria-label="Text alignment">
|
|
3
|
-
<button
|
|
4
|
-
<button
|
|
5
|
-
<button
|
|
9
|
+
<button data-ui="button" type="button">Left</button>
|
|
10
|
+
<button data-ui="button" type="button">Center</button>
|
|
11
|
+
<button data-ui="button" type="button">Right</button>
|
|
6
12
|
</ui-button-group>
|
|
7
13
|
|
|
8
14
|
<ui-button-group role="group" aria-label="Pagination">
|
|
9
|
-
<button
|
|
10
|
-
<button
|
|
11
|
-
<button
|
|
12
|
-
<button
|
|
13
|
-
<button
|
|
15
|
+
<button data-ui="button" data-button-variant="muted" type="button">Previous</button>
|
|
16
|
+
<button data-ui="button" data-button-variant="muted" type="button">1</button>
|
|
17
|
+
<button data-ui="button" data-button-variant="muted" type="button">2</button>
|
|
18
|
+
<button data-ui="button" data-button-variant="muted" type="button">3</button>
|
|
19
|
+
<button data-ui="button" data-button-variant="muted" type="button">Next</button>
|
|
14
20
|
</ui-button-group>
|
|
15
21
|
|
|
16
22
|
<ui-button-group role="group" aria-label="Formatting">
|
|
17
|
-
<button
|
|
23
|
+
<button data-ui="button" data-button-size="icon" type="button" aria-label="Bold">
|
|
18
24
|
<svg
|
|
19
25
|
xmlns="http://www.w3.org/2000/svg"
|
|
20
26
|
viewBox="0 0 24 24"
|
|
@@ -29,7 +35,7 @@
|
|
|
29
35
|
<path d="M6 12h9a4 4 0 0 1 0 8H6z" />
|
|
30
36
|
</svg>
|
|
31
37
|
</button>
|
|
32
|
-
<button
|
|
38
|
+
<button data-ui="button" data-button-size="icon" type="button" aria-label="Italic">
|
|
33
39
|
<svg
|
|
34
40
|
xmlns="http://www.w3.org/2000/svg"
|
|
35
41
|
viewBox="0 0 24 24"
|
|
@@ -45,7 +51,7 @@
|
|
|
45
51
|
<line x1="15" y1="4" x2="9" y2="20" />
|
|
46
52
|
</svg>
|
|
47
53
|
</button>
|
|
48
|
-
<button
|
|
54
|
+
<button data-ui="button" data-button-size="icon" type="button" aria-label="Underline">
|
|
49
55
|
<svg
|
|
50
56
|
xmlns="http://www.w3.org/2000/svg"
|
|
51
57
|
viewBox="0 0 24 24"
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* callout.css — Callout ([data-ui~="callout"])
|
|
3
|
+
*
|
|
4
|
+
* @layer variables, components
|
|
5
|
+
* @requires _layers.css, _variables.css, _properties.css (--_*-resolved)
|
|
6
|
+
* @uses oklch(from …): status tints
|
|
7
|
+
* @tokens --ui-callout-* (@layer variables; named after the utilities they back)
|
|
8
|
+
* @see badge.css (status tint and border formulas; the test keeps them in sync)
|
|
9
|
+
* @presets data-callout-variant="muted" | "info" | "success" | "warning" | "destructive"
|
|
10
|
+
*
|
|
11
|
+
* A callout is an aside or alert: a padded grid with a gap, a border, and a
|
|
12
|
+
* radius. The default matches an outline card and muted a muted card. Info,
|
|
13
|
+
* success, and warning take the matching badge's tint and border, with the
|
|
14
|
+
* role mixed toward --color-foreground for text; destructive is the badge's
|
|
15
|
+
* solid fill.
|
|
16
|
+
* Every variant keeps the 1px border (muted makes it transparent), so every
|
|
17
|
+
* variant is the same size.
|
|
18
|
+
* Its parts are plain elements laid out with utilities. Use <aside> for a
|
|
19
|
+
* side note, or a <div> with role="status" or role="alert" for a message
|
|
20
|
+
* that follows something the user did.
|
|
21
|
+
* Every utility-backed declaration reads one chain, highest first:
|
|
22
|
+
* var(--_<utility>-resolved, var(--_callout-<utility>, var(--ui-callout-<utility>)))
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
@layer variables {
|
|
26
|
+
:root {
|
|
27
|
+
--ui-callout-bg: var(--color-card);
|
|
28
|
+
--ui-callout-text: var(--color-card-foreground);
|
|
29
|
+
--ui-callout-rounded: var(--radius-md);
|
|
30
|
+
--ui-callout-shadow: none;
|
|
31
|
+
|
|
32
|
+
--ui-callout-border-width: 1px;
|
|
33
|
+
--ui-callout-border-style: solid;
|
|
34
|
+
--ui-callout-border-color: var(--color-border);
|
|
35
|
+
|
|
36
|
+
/* dual-mode: a scale number or a length */
|
|
37
|
+
--ui-callout-gap: var(--space-xs);
|
|
38
|
+
--ui-callout-p: var(--space-sm);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Variant privates: non-inheriting so a variant never cascades into a nested callout. */
|
|
43
|
+
@property --_callout-bg {
|
|
44
|
+
syntax: "*";
|
|
45
|
+
inherits: false;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@property --_callout-text {
|
|
49
|
+
syntax: "*";
|
|
50
|
+
inherits: false;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@property --_callout-border-color {
|
|
54
|
+
syntax: "*";
|
|
55
|
+
inherits: false;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@layer ui.components {
|
|
59
|
+
:where([data-ui~="callout"]) {
|
|
60
|
+
display: grid;
|
|
61
|
+
--_gap-len: var(--_gap-resolved, var(--ui-callout-gap));
|
|
62
|
+
--_gap-num: var(--_gap-resolved, var(--ui-callout-gap));
|
|
63
|
+
gap: calc(var(--_gap-len) + var(--_gap-num) * var(--spacing));
|
|
64
|
+
--_p-len: var(--_p-resolved, var(--ui-callout-p));
|
|
65
|
+
--_p-num: var(--_p-resolved, var(--ui-callout-p));
|
|
66
|
+
padding: calc(var(--_p-len) + var(--_p-num) * var(--spacing));
|
|
67
|
+
color: var(--_text-resolved, var(--_callout-text, var(--ui-callout-text)));
|
|
68
|
+
background-color: var(--_bg-resolved, var(--_callout-bg, var(--ui-callout-bg)));
|
|
69
|
+
border-width: var(--_border-width-resolved, var(--ui-callout-border-width));
|
|
70
|
+
border-style: var(--_border-style-resolved, var(--ui-callout-border-style));
|
|
71
|
+
border-color: var(
|
|
72
|
+
--_border-color-resolved,
|
|
73
|
+
var(--_callout-border-color, var(--ui-callout-border-color))
|
|
74
|
+
);
|
|
75
|
+
border-radius: var(--_rounded-resolved, var(--ui-callout-rounded));
|
|
76
|
+
box-shadow: var(--_shadow-resolved, var(--ui-callout-shadow));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* ===========================================================================
|
|
80
|
+
CALLOUT VARIANTS — data-callout-variant writes the privates
|
|
81
|
+
=========================================================================== */
|
|
82
|
+
|
|
83
|
+
:where([data-ui~="callout"][data-callout-variant="muted"]) {
|
|
84
|
+
--_callout-bg: var(--color-muted);
|
|
85
|
+
--_callout-text: var(--color-foreground);
|
|
86
|
+
--_callout-border-color: transparent;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* status variants: the badge's tint and border for the same role */
|
|
90
|
+
|
|
91
|
+
:where([data-ui~="callout"][data-callout-variant="info"]) {
|
|
92
|
+
--_callout-bg: oklch(from var(--color-info) l c h / 0.15);
|
|
93
|
+
--_callout-text: color-mix(in xyz, var(--color-info), var(--color-foreground));
|
|
94
|
+
--_callout-border-color: oklch(from var(--color-info) l c h / 0.2);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:where([data-ui~="callout"][data-callout-variant="success"]) {
|
|
98
|
+
--_callout-bg: oklch(from var(--color-success) l c h / 0.15);
|
|
99
|
+
--_callout-text: color-mix(in xyz, var(--color-success), var(--color-foreground));
|
|
100
|
+
--_callout-border-color: oklch(from var(--color-success) l c h / 0.2);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:where([data-ui~="callout"][data-callout-variant="warning"]) {
|
|
104
|
+
--_callout-bg: oklch(from var(--color-warning) l c h / 0.15);
|
|
105
|
+
--_callout-text: color-mix(in xyz, var(--color-warning), var(--color-foreground));
|
|
106
|
+
--_callout-border-color: oklch(from var(--color-warning) l c h / 0.2);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where([data-ui~="callout"][data-callout-variant="destructive"]) {
|
|
110
|
+
--_callout-bg: var(--color-destructive);
|
|
111
|
+
--_callout-text: var(--color-destructive-foreground);
|
|
112
|
+
--_callout-border-color: var(--_callout-bg);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
<div
|
|
2
|
+
style="
|
|
3
|
+
--display: grid;
|
|
4
|
+
--gap: 4;
|
|
5
|
+
"
|
|
6
|
+
>
|
|
7
|
+
<aside data-ui="callout" aria-labelledby="callout-note">
|
|
8
|
+
<p
|
|
9
|
+
id="callout-note"
|
|
10
|
+
data-ui="text-sm"
|
|
11
|
+
style="
|
|
12
|
+
--display: flex;
|
|
13
|
+
--items: center;
|
|
14
|
+
--gap: 2;
|
|
15
|
+
--font-weight: strong;
|
|
16
|
+
"
|
|
17
|
+
>
|
|
18
|
+
<svg
|
|
19
|
+
style="
|
|
20
|
+
--shrink: 0;
|
|
21
|
+
--size: 4;
|
|
22
|
+
"
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
viewBox="0 0 20 20"
|
|
25
|
+
fill="currentColor"
|
|
26
|
+
aria-hidden="true"
|
|
27
|
+
>
|
|
28
|
+
<path
|
|
29
|
+
fill-rule="evenodd"
|
|
30
|
+
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"
|
|
31
|
+
clip-rule="evenodd"
|
|
32
|
+
/>
|
|
33
|
+
</svg>
|
|
34
|
+
Note
|
|
35
|
+
</p>
|
|
36
|
+
<p data-ui="text-sm">Callouts set supporting information apart from the text around it.</p>
|
|
37
|
+
</aside>
|
|
38
|
+
<div data-ui="callout" data-callout-variant="muted">
|
|
39
|
+
<p
|
|
40
|
+
data-ui="text-sm"
|
|
41
|
+
style="
|
|
42
|
+
--display: flex;
|
|
43
|
+
--items: center;
|
|
44
|
+
--gap: 2;
|
|
45
|
+
--font-weight: strong;
|
|
46
|
+
"
|
|
47
|
+
>
|
|
48
|
+
<svg
|
|
49
|
+
style="
|
|
50
|
+
--shrink: 0;
|
|
51
|
+
--size: 4;
|
|
52
|
+
"
|
|
53
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
54
|
+
viewBox="0 0 20 20"
|
|
55
|
+
fill="currentColor"
|
|
56
|
+
aria-hidden="true"
|
|
57
|
+
>
|
|
58
|
+
<path
|
|
59
|
+
fill-rule="evenodd"
|
|
60
|
+
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"
|
|
61
|
+
clip-rule="evenodd"
|
|
62
|
+
/>
|
|
63
|
+
</svg>
|
|
64
|
+
Aside
|
|
65
|
+
</p>
|
|
66
|
+
<p data-ui="text-sm">A quieter surface for tips and context that readers can skip.</p>
|
|
67
|
+
</div>
|
|
68
|
+
<div data-ui="callout" data-callout-variant="info">
|
|
69
|
+
<p
|
|
70
|
+
data-ui="text-sm"
|
|
71
|
+
style="
|
|
72
|
+
--display: flex;
|
|
73
|
+
--items: center;
|
|
74
|
+
--gap: 2;
|
|
75
|
+
--font-weight: strong;
|
|
76
|
+
"
|
|
77
|
+
>
|
|
78
|
+
<svg
|
|
79
|
+
style="
|
|
80
|
+
--shrink: 0;
|
|
81
|
+
--size: 4;
|
|
82
|
+
"
|
|
83
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
84
|
+
viewBox="0 0 20 20"
|
|
85
|
+
fill="currentColor"
|
|
86
|
+
aria-hidden="true"
|
|
87
|
+
>
|
|
88
|
+
<path
|
|
89
|
+
fill-rule="evenodd"
|
|
90
|
+
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"
|
|
91
|
+
clip-rule="evenodd"
|
|
92
|
+
/>
|
|
93
|
+
</svg>
|
|
94
|
+
Scheduled maintenance
|
|
95
|
+
</p>
|
|
96
|
+
<p data-ui="text-sm">The dashboard is read-only on Saturday from 2 to 4 a.m. UTC.</p>
|
|
97
|
+
</div>
|
|
98
|
+
<div data-ui="callout" data-callout-variant="success">
|
|
99
|
+
<p
|
|
100
|
+
data-ui="text-sm"
|
|
101
|
+
style="
|
|
102
|
+
--display: flex;
|
|
103
|
+
--items: center;
|
|
104
|
+
--gap: 2;
|
|
105
|
+
--font-weight: strong;
|
|
106
|
+
"
|
|
107
|
+
>
|
|
108
|
+
<svg
|
|
109
|
+
style="
|
|
110
|
+
--shrink: 0;
|
|
111
|
+
--size: 4;
|
|
112
|
+
"
|
|
113
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
114
|
+
viewBox="0 0 20 20"
|
|
115
|
+
fill="currentColor"
|
|
116
|
+
aria-hidden="true"
|
|
117
|
+
>
|
|
118
|
+
<path
|
|
119
|
+
fill-rule="evenodd"
|
|
120
|
+
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"
|
|
121
|
+
clip-rule="evenodd"
|
|
122
|
+
/>
|
|
123
|
+
</svg>
|
|
124
|
+
Payment received
|
|
125
|
+
</p>
|
|
126
|
+
<p data-ui="text-sm">Your invoice is paid, and a receipt is on its way to your inbox.</p>
|
|
127
|
+
</div>
|
|
128
|
+
<div data-ui="callout" data-callout-variant="warning">
|
|
129
|
+
<p
|
|
130
|
+
data-ui="text-sm"
|
|
131
|
+
style="
|
|
132
|
+
--display: flex;
|
|
133
|
+
--items: center;
|
|
134
|
+
--gap: 2;
|
|
135
|
+
--font-weight: strong;
|
|
136
|
+
"
|
|
137
|
+
>
|
|
138
|
+
<svg
|
|
139
|
+
style="
|
|
140
|
+
--shrink: 0;
|
|
141
|
+
--size: 4;
|
|
142
|
+
"
|
|
143
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
144
|
+
viewBox="0 0 24 24"
|
|
145
|
+
fill="currentColor"
|
|
146
|
+
aria-hidden="true"
|
|
147
|
+
>
|
|
148
|
+
<path
|
|
149
|
+
fill-rule="evenodd"
|
|
150
|
+
d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z"
|
|
151
|
+
clip-rule="evenodd"
|
|
152
|
+
/>
|
|
153
|
+
</svg>
|
|
154
|
+
Your trial ends in 3 days
|
|
155
|
+
</p>
|
|
156
|
+
<p data-ui="text-sm">Add a payment method to keep your projects running.</p>
|
|
157
|
+
</div>
|
|
158
|
+
<div data-ui="callout" data-callout-variant="destructive">
|
|
159
|
+
<p
|
|
160
|
+
data-ui="text-sm"
|
|
161
|
+
style="
|
|
162
|
+
--display: flex;
|
|
163
|
+
--items: center;
|
|
164
|
+
--gap: 2;
|
|
165
|
+
--font-weight: strong;
|
|
166
|
+
"
|
|
167
|
+
>
|
|
168
|
+
<svg
|
|
169
|
+
style="
|
|
170
|
+
--shrink: 0;
|
|
171
|
+
--size: 4;
|
|
172
|
+
"
|
|
173
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
174
|
+
viewBox="0 0 20 20"
|
|
175
|
+
fill="currentColor"
|
|
176
|
+
aria-hidden="true"
|
|
177
|
+
>
|
|
178
|
+
<path
|
|
179
|
+
fill-rule="evenodd"
|
|
180
|
+
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z"
|
|
181
|
+
clip-rule="evenodd"
|
|
182
|
+
/>
|
|
183
|
+
</svg>
|
|
184
|
+
Deleting a workspace can't be undone
|
|
185
|
+
</p>
|
|
186
|
+
<p data-ui="text-sm">Its projects, files, and members are removed for good.</p>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|