@zazz-ui/core 0.1.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/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/README.md +61 -0
- package/dist/sri.json +75 -0
- package/dist/zazz.css +1 -0
- package/dist/zazz.js +1 -0
- package/examples/about.html +590 -0
- package/examples/components.html +1040 -0
- package/examples/forms.html +511 -0
- package/examples/index.html +268 -0
- package/examples/layout.html +320 -0
- package/examples/products.html +846 -0
- package/examples/responsive.html +339 -0
- package/package.json +85 -0
- package/src/base/_layers.css +12 -0
- package/src/base/_layout.css +568 -0
- package/src/base/_reset.css +515 -0
- package/src/base/_typography.css +495 -0
- package/src/base/_utilities.css +6628 -0
- package/src/base/_variables.css +682 -0
- package/src/base/_view-transitions.css +103 -0
- package/src/base/command-score.d.ts +12 -0
- package/src/base/command-score.d.ts.map +1 -0
- package/src/base/command-score.js +151 -0
- package/src/base/command-score.ts +192 -0
- package/src/base/dialog-lifecycle.d.ts +11 -0
- package/src/base/dialog-lifecycle.d.ts.map +1 -0
- package/src/base/dialog-lifecycle.js +65 -0
- package/src/base/dialog-lifecycle.ts +80 -0
- package/src/base/embla.d.ts +90 -0
- package/src/base/embla.d.ts.map +1 -0
- package/src/base/embla.js +643 -0
- package/src/base/embla.ts +791 -0
- package/src/base/hotkeys.d.ts +82 -0
- package/src/base/hotkeys.d.ts.map +1 -0
- package/src/base/hotkeys.js +141 -0
- package/src/base/hotkeys.ts +195 -0
- package/src/base/navigation.d.ts +2 -0
- package/src/base/navigation.d.ts.map +1 -0
- package/src/base/navigation.js +136 -0
- package/src/base/navigation.ts +151 -0
- package/src/base/reveal.d.ts +80 -0
- package/src/base/reveal.d.ts.map +1 -0
- package/src/base/reveal.js +305 -0
- package/src/base/reveal.ts +379 -0
- package/src/base/signals.d.ts +89 -0
- package/src/base/signals.d.ts.map +1 -0
- package/src/base/signals.js +134 -0
- package/src/base/signals.ts +164 -0
- package/src/base/typeahead.d.ts +105 -0
- package/src/base/typeahead.d.ts.map +1 -0
- package/src/base/typeahead.js +411 -0
- package/src/base/typeahead.ts +500 -0
- package/src/base/utils.d.ts +56 -0
- package/src/base/utils.d.ts.map +1 -0
- package/src/base/utils.js +88 -0
- package/src/base/utils.ts +98 -0
- package/src/base/zazz-element.d.ts +44 -0
- package/src/base/zazz-element.d.ts.map +1 -0
- package/src/base/zazz-element.js +59 -0
- package/src/base/zazz-element.ts +73 -0
- package/src/globals.d.ts +148 -0
- package/src/head.d.ts +95 -0
- package/src/head.d.ts.map +1 -0
- package/src/head.js +311 -0
- package/src/head.ts +433 -0
- package/src/index.css +71 -0
- package/src/index.d.ts +36 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +35 -0
- package/src/index.ts +36 -0
- package/src/manifest.d.ts +90 -0
- package/src/manifest.d.ts.map +1 -0
- package/src/manifest.js +614 -0
- package/src/manifest.ts +667 -0
- package/src/primitives/accordion/accordion.css +104 -0
- package/src/primitives/accordion/accordion.html +69 -0
- package/src/primitives/alert-dialog/alert-dialog.css +38 -0
- package/src/primitives/alert-dialog/alert-dialog.html +53 -0
- package/src/primitives/autocomplete/autocomplete-groups.html +77 -0
- package/src/primitives/autocomplete/autocomplete.css +114 -0
- package/src/primitives/autocomplete/autocomplete.d.ts +30 -0
- package/src/primitives/autocomplete/autocomplete.d.ts.map +1 -0
- package/src/primitives/autocomplete/autocomplete.html +66 -0
- package/src/primitives/autocomplete/autocomplete.js +41 -0
- package/src/primitives/autocomplete/autocomplete.ts +46 -0
- package/src/primitives/avatar/avatar.html +44 -0
- package/src/primitives/badge/badge-icon.html +36 -0
- package/src/primitives/badge/badge.css +251 -0
- package/src/primitives/badge/badge.html +7 -0
- package/src/primitives/breadcrumbs/breadcrumbs.html +9 -0
- package/src/primitives/button/button-icon-only.html +84 -0
- package/src/primitives/button/button-icon.html +82 -0
- package/src/primitives/button/button.css +319 -0
- package/src/primitives/button/button.html +8 -0
- package/src/primitives/button-group/button-group-vertical.html +6 -0
- package/src/primitives/button-group/button-group.css +94 -0
- package/src/primitives/button-group/button-group.html +64 -0
- package/src/primitives/card/card-subgrid.html +118 -0
- package/src/primitives/card/card.html +53 -0
- package/src/primitives/carousel/carousel.css +61 -0
- package/src/primitives/carousel/carousel.d.ts +16 -0
- package/src/primitives/carousel/carousel.d.ts.map +1 -0
- package/src/primitives/carousel/carousel.html +315 -0
- package/src/primitives/carousel/carousel.js +73 -0
- package/src/primitives/carousel/carousel.ts +84 -0
- package/src/primitives/checkbox/checkbox-tasklist.html +71 -0
- package/src/primitives/checkbox/checkbox.css +82 -0
- package/src/primitives/checkbox/checkbox.d.ts +21 -0
- package/src/primitives/checkbox/checkbox.d.ts.map +1 -0
- package/src/primitives/checkbox/checkbox.html +17 -0
- package/src/primitives/checkbox/checkbox.js +190 -0
- package/src/primitives/checkbox/checkbox.ts +219 -0
- package/src/primitives/combobox/combobox-multiselect.html +91 -0
- package/src/primitives/combobox/combobox.css +307 -0
- package/src/primitives/combobox/combobox.d.ts +100 -0
- package/src/primitives/combobox/combobox.d.ts.map +1 -0
- package/src/primitives/combobox/combobox.html +73 -0
- package/src/primitives/combobox/combobox.js +503 -0
- package/src/primitives/combobox/combobox.ts +559 -0
- package/src/primitives/command/command-actions.d.ts +31 -0
- package/src/primitives/command/command-actions.d.ts.map +1 -0
- package/src/primitives/command/command-actions.html +89 -0
- package/src/primitives/command/command-actions.js +70 -0
- package/src/primitives/command/command-actions.ts +77 -0
- package/src/primitives/command/command-dialog.html +77 -0
- package/src/primitives/command/command.css +151 -0
- package/src/primitives/command/command.d.ts +52 -0
- package/src/primitives/command/command.d.ts.map +1 -0
- package/src/primitives/command/command.html +119 -0
- package/src/primitives/command/command.js +146 -0
- package/src/primitives/command/command.ts +157 -0
- package/src/primitives/dialog/dialog-with-form.html +200 -0
- package/src/primitives/dialog/dialog.css +229 -0
- package/src/primitives/dialog/dialog.html +90 -0
- package/src/primitives/fields/fields.css +278 -0
- package/src/primitives/input/input-icon-leading.html +19 -0
- package/src/primitives/input/input-icon-trailing.html +18 -0
- package/src/primitives/input/input.css +114 -0
- package/src/primitives/input/input.html +61 -0
- package/src/primitives/input-group/input-group-password-group.html +108 -0
- package/src/primitives/input-group/input-group.css +215 -0
- package/src/primitives/input-group/input-group.html +132 -0
- package/src/primitives/kbd/kbd-group.html +18 -0
- package/src/primitives/kbd/kbd.css +87 -0
- package/src/primitives/kbd/kbd.html +7 -0
- package/src/primitives/lightbox/lightbox.css +459 -0
- package/src/primitives/lightbox/lightbox.d.ts +7 -0
- package/src/primitives/lightbox/lightbox.d.ts.map +1 -0
- package/src/primitives/lightbox/lightbox.html +665 -0
- package/src/primitives/lightbox/lightbox.js +96 -0
- package/src/primitives/lightbox/lightbox.ts +113 -0
- package/src/primitives/menu/menu-interest.html +52 -0
- package/src/primitives/menu/menu.css +55 -0
- package/src/primitives/menu/menu.d.ts +38 -0
- package/src/primitives/menu/menu.d.ts.map +1 -0
- package/src/primitives/menu/menu.html +70 -0
- package/src/primitives/menu/menu.js +117 -0
- package/src/primitives/menu/menu.ts +131 -0
- package/src/primitives/menubar/menubar-help-search.html +103 -0
- package/src/primitives/menubar/menubar.html +166 -0
- package/src/primitives/meter/meter.css +178 -0
- package/src/primitives/meter/meter.html +38 -0
- package/src/primitives/mobile-menu/mobile-menu.css +145 -0
- package/src/primitives/mobile-menu/mobile-menu.html +614 -0
- package/src/primitives/navigation-menu/navigation-menu-featured.html +76 -0
- package/src/primitives/navigation-menu/navigation-menu-icon-grid.html +158 -0
- package/src/primitives/navigation-menu/navigation-menu-interest.html +103 -0
- package/src/primitives/navigation-menu/navigation-menu-megamenu.html +141 -0
- package/src/primitives/navigation-menu/navigation-menu-simple.html +96 -0
- package/src/primitives/navigation-menu/navigation-menu.css +295 -0
- package/src/primitives/navigation-menu/navigation-menu.html +576 -0
- package/src/primitives/otp/otp.css +126 -0
- package/src/primitives/otp/otp.d.ts +89 -0
- package/src/primitives/otp/otp.d.ts.map +1 -0
- package/src/primitives/otp/otp.html +22 -0
- package/src/primitives/otp/otp.js +226 -0
- package/src/primitives/otp/otp.ts +279 -0
- package/src/primitives/password-group/password-group.css +238 -0
- package/src/primitives/password-group/password-group.d.ts +25 -0
- package/src/primitives/password-group/password-group.d.ts.map +1 -0
- package/src/primitives/password-group/password-group.html +109 -0
- package/src/primitives/password-group/password-group.js +76 -0
- package/src/primitives/password-group/password-group.ts +95 -0
- package/src/primitives/popover/popover.css +233 -0
- package/src/primitives/progress/progress-indeterminate.html +1 -0
- package/src/primitives/progress/progress.css +105 -0
- package/src/primitives/progress/progress.html +7 -0
- package/src/primitives/prose/prose.html +65 -0
- package/src/primitives/radio/radio.css +84 -0
- package/src/primitives/radio/radio.html +17 -0
- package/src/primitives/reveal/reveal.css +167 -0
- package/src/primitives/select/multiselect.d.ts +43 -0
- package/src/primitives/select/multiselect.d.ts.map +1 -0
- package/src/primitives/select/multiselect.js +147 -0
- package/src/primitives/select/multiselect.ts +188 -0
- package/src/primitives/select/select-align.html +49 -0
- package/src/primitives/select/select-multiple.html +12 -0
- package/src/primitives/select/select-sides.html +65 -0
- package/src/primitives/select/select.css +481 -0
- package/src/primitives/select/select.html +16 -0
- package/src/primitives/separator/separator.css +49 -0
- package/src/primitives/separator/separator.html +16 -0
- package/src/primitives/slider/slider.css +122 -0
- package/src/primitives/slider/slider.html +1 -0
- package/src/primitives/switch/switch.css +126 -0
- package/src/primitives/switch/switch.html +13 -0
- package/src/primitives/table/table-alternating.html +36 -0
- package/src/primitives/table/table-grid.html +30 -0
- package/src/primitives/table/table-size-sm.html +26 -0
- package/src/primitives/table/table.css +158 -0
- package/src/primitives/table/table.html +45 -0
- package/src/primitives/tabs/tabs.css +328 -0
- package/src/primitives/tabs/tabs.d.ts +35 -0
- package/src/primitives/tabs/tabs.d.ts.map +1 -0
- package/src/primitives/tabs/tabs.html +75 -0
- package/src/primitives/tabs/tabs.js +84 -0
- package/src/primitives/tabs/tabs.ts +93 -0
- package/src/primitives/textarea/textarea.css +78 -0
- package/src/primitives/textarea/textarea.html +10 -0
- package/src/primitives/toaster/toaster.css +309 -0
- package/src/primitives/toaster/toaster.d.ts +138 -0
- package/src/primitives/toaster/toaster.d.ts.map +1 -0
- package/src/primitives/toaster/toaster.html +77 -0
- package/src/primitives/toaster/toaster.js +736 -0
- package/src/primitives/toaster/toaster.ts +823 -0
- package/src/primitives/toggle/toggle.css +295 -0
- package/src/primitives/toggle/toggle.html +68 -0
- package/src/primitives/toggle-group/toggle-group-multiple.html +14 -0
- package/src/primitives/toggle-group/toggle-group-vertical.html +14 -0
- package/src/primitives/toggle-group/toggle-group.css +73 -0
- package/src/primitives/toggle-group/toggle-group.html +53 -0
- package/src/primitives/toolbar/toolbar.html +45 -0
- package/src/primitives/tooltip/tooltip-disabled.html +19 -0
- package/src/primitives/tooltip/tooltip-sides.html +57 -0
- package/src/primitives/tooltip/tooltip-with-kbd.html +31 -0
- package/src/primitives/tooltip/tooltip.css +235 -0
- package/src/primitives/tooltip/tooltip.html +12 -0
- package/src/primitives/utilities/aspect-ratio.html +17 -0
- package/src/primitives/utilities/basis.html +27 -0
- package/src/primitives/utilities/col-span.html +23 -0
- package/src/primitives/utilities/compose.html +19 -0
- package/src/primitives/utilities/flex-align.html +26 -0
- package/src/primitives/utilities/flex-direction.html +36 -0
- package/src/primitives/utilities/flex-grow.html +17 -0
- package/src/primitives/utilities/gap.html +62 -0
- package/src/primitives/utilities/grid-cols.html +20 -0
- package/src/primitives/utilities/grid-pile.html +5 -0
- package/src/primitives/utilities/grid-responsive.html +31 -0
- package/src/primitives/utilities/margin-auto.html +13 -0
- package/src/primitives/utilities/object-fit.html +41 -0
- package/src/primitives/utilities/order.html +17 -0
- package/src/primitives/utilities/overflow.html +26 -0
- package/src/primitives/utilities/padding-compose.html +23 -0
- package/src/primitives/utilities/padding.html +30 -0
- package/src/primitives/utilities/position.html +13 -0
- package/src/primitives/utilities/responsive-flex.html +22 -0
- package/src/primitives/utilities/responsive-grid.html +31 -0
- package/src/primitives/utilities/size.html +22 -0
- package/src/primitives/utilities/width.html +22 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<div class="flex w-full items-center gap-px bg-card border-b p-xs" aria-label="Application menu">
|
|
2
|
+
<ui-menu>
|
|
3
|
+
<button
|
|
4
|
+
class="ui-button"
|
|
5
|
+
data-variant="ghost"
|
|
6
|
+
type="button"
|
|
7
|
+
popovertarget="menubar-search-file"
|
|
8
|
+
interestfor="menubar-search-file"
|
|
9
|
+
>
|
|
10
|
+
File
|
|
11
|
+
</button>
|
|
12
|
+
<div
|
|
13
|
+
id="menubar-search-file"
|
|
14
|
+
data-slot="menu-popover"
|
|
15
|
+
data-side="bottom"
|
|
16
|
+
data-align="start"
|
|
17
|
+
popover="auto"
|
|
18
|
+
>
|
|
19
|
+
<menu>
|
|
20
|
+
<li>
|
|
21
|
+
<button class="ui-button justify-start" data-variant="ghost" type="button">
|
|
22
|
+
New window
|
|
23
|
+
</button>
|
|
24
|
+
</li>
|
|
25
|
+
<li>
|
|
26
|
+
<button class="ui-button justify-start" data-variant="ghost" type="button">Open…</button>
|
|
27
|
+
</li>
|
|
28
|
+
</menu>
|
|
29
|
+
</div>
|
|
30
|
+
</ui-menu>
|
|
31
|
+
|
|
32
|
+
<ui-menu>
|
|
33
|
+
<button
|
|
34
|
+
class="ui-button"
|
|
35
|
+
data-variant="ghost"
|
|
36
|
+
type="button"
|
|
37
|
+
popovertarget="menubar-search-help"
|
|
38
|
+
interestfor="menubar-search-help"
|
|
39
|
+
>
|
|
40
|
+
Help
|
|
41
|
+
</button>
|
|
42
|
+
<div
|
|
43
|
+
id="menubar-search-help"
|
|
44
|
+
data-slot="menu-popover"
|
|
45
|
+
data-side="bottom"
|
|
46
|
+
data-align="start"
|
|
47
|
+
popover="auto"
|
|
48
|
+
>
|
|
49
|
+
<div class="flex flex-col gap-xs p-xs" style="min-inline-size: 20rem">
|
|
50
|
+
<label class="font-strong text-eyebrow text-muted-foreground" for="menubar-help-topic"
|
|
51
|
+
>Search help topics</label
|
|
52
|
+
>
|
|
53
|
+
<ui-combobox>
|
|
54
|
+
<input type="hidden" name="help-topic" data-slot="combobox-value" value="" />
|
|
55
|
+
<div data-slot="combobox-control">
|
|
56
|
+
<input
|
|
57
|
+
id="menubar-help-topic"
|
|
58
|
+
type="text"
|
|
59
|
+
placeholder="Find a topic…"
|
|
60
|
+
role="combobox"
|
|
61
|
+
aria-expanded="true"
|
|
62
|
+
aria-autocomplete="list"
|
|
63
|
+
autocomplete="off"
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
<!-- No [popover] = the inline variant: the list renders in flow, always open -->
|
|
67
|
+
<div data-slot="combobox-panel">
|
|
68
|
+
<ul role="listbox" data-slot="combobox-list" aria-label="Help topics">
|
|
69
|
+
<li
|
|
70
|
+
role="option"
|
|
71
|
+
data-slot="combobox-item"
|
|
72
|
+
class="ui-button justify-start"
|
|
73
|
+
data-variant="ghost"
|
|
74
|
+
data-value="shortcuts"
|
|
75
|
+
>
|
|
76
|
+
Keyboard shortcuts
|
|
77
|
+
</li>
|
|
78
|
+
<li
|
|
79
|
+
role="option"
|
|
80
|
+
data-slot="combobox-item"
|
|
81
|
+
class="ui-button justify-start"
|
|
82
|
+
data-variant="ghost"
|
|
83
|
+
data-value="theming"
|
|
84
|
+
>
|
|
85
|
+
Theming and dark mode
|
|
86
|
+
</li>
|
|
87
|
+
<li
|
|
88
|
+
role="option"
|
|
89
|
+
data-slot="combobox-item"
|
|
90
|
+
class="ui-button justify-start"
|
|
91
|
+
data-variant="ghost"
|
|
92
|
+
data-value="updates"
|
|
93
|
+
>
|
|
94
|
+
Checking for updates
|
|
95
|
+
</li>
|
|
96
|
+
</ul>
|
|
97
|
+
<p data-slot="combobox-empty" class="text-muted-foreground">No topics found.</p>
|
|
98
|
+
</div>
|
|
99
|
+
</ui-combobox>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</ui-menu>
|
|
103
|
+
</div>
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<div class="flex w-full items-center gap-px bg-card border-b p-xs" aria-label="Application menu">
|
|
2
|
+
<ui-menu>
|
|
3
|
+
<button
|
|
4
|
+
class="ui-button"
|
|
5
|
+
data-variant="ghost"
|
|
6
|
+
type="button"
|
|
7
|
+
popovertarget="menubar-example-file"
|
|
8
|
+
interestfor="menubar-example-file"
|
|
9
|
+
>
|
|
10
|
+
File
|
|
11
|
+
</button>
|
|
12
|
+
<div
|
|
13
|
+
id="menubar-example-file"
|
|
14
|
+
data-slot="menu-popover"
|
|
15
|
+
data-side="bottom"
|
|
16
|
+
data-align="start"
|
|
17
|
+
popover="auto"
|
|
18
|
+
>
|
|
19
|
+
<menu>
|
|
20
|
+
<li>
|
|
21
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
22
|
+
New window
|
|
23
|
+
</button>
|
|
24
|
+
</li>
|
|
25
|
+
<li>
|
|
26
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
27
|
+
Open...
|
|
28
|
+
</button>
|
|
29
|
+
</li>
|
|
30
|
+
<li>
|
|
31
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
32
|
+
Save
|
|
33
|
+
</button>
|
|
34
|
+
</li>
|
|
35
|
+
<hr class="ui-separator my-xs" />
|
|
36
|
+
<li>
|
|
37
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
38
|
+
Close window
|
|
39
|
+
</button>
|
|
40
|
+
</li>
|
|
41
|
+
</menu>
|
|
42
|
+
</div>
|
|
43
|
+
</ui-menu>
|
|
44
|
+
|
|
45
|
+
<ui-menu>
|
|
46
|
+
<button
|
|
47
|
+
class="ui-button"
|
|
48
|
+
data-variant="ghost"
|
|
49
|
+
type="button"
|
|
50
|
+
popovertarget="menubar-example-edit"
|
|
51
|
+
interestfor="menubar-example-edit"
|
|
52
|
+
>
|
|
53
|
+
Edit
|
|
54
|
+
</button>
|
|
55
|
+
<div
|
|
56
|
+
id="menubar-example-edit"
|
|
57
|
+
data-slot="menu-popover"
|
|
58
|
+
data-side="bottom"
|
|
59
|
+
data-align="start"
|
|
60
|
+
popover="auto"
|
|
61
|
+
>
|
|
62
|
+
<menu>
|
|
63
|
+
<li>
|
|
64
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
65
|
+
Undo
|
|
66
|
+
</button>
|
|
67
|
+
</li>
|
|
68
|
+
<li>
|
|
69
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
70
|
+
Redo
|
|
71
|
+
</button>
|
|
72
|
+
</li>
|
|
73
|
+
<hr class="ui-separator my-xs" />
|
|
74
|
+
<li>
|
|
75
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
76
|
+
Cut
|
|
77
|
+
</button>
|
|
78
|
+
</li>
|
|
79
|
+
<li>
|
|
80
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
81
|
+
Copy
|
|
82
|
+
</button>
|
|
83
|
+
</li>
|
|
84
|
+
<li>
|
|
85
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
86
|
+
Paste
|
|
87
|
+
</button>
|
|
88
|
+
</li>
|
|
89
|
+
</menu>
|
|
90
|
+
</div>
|
|
91
|
+
</ui-menu>
|
|
92
|
+
|
|
93
|
+
<ui-menu>
|
|
94
|
+
<button
|
|
95
|
+
class="ui-button"
|
|
96
|
+
data-variant="ghost"
|
|
97
|
+
type="button"
|
|
98
|
+
popovertarget="menubar-example-view"
|
|
99
|
+
interestfor="menubar-example-view"
|
|
100
|
+
>
|
|
101
|
+
View
|
|
102
|
+
</button>
|
|
103
|
+
<div
|
|
104
|
+
id="menubar-example-view"
|
|
105
|
+
data-slot="menu-popover"
|
|
106
|
+
data-side="bottom"
|
|
107
|
+
data-align="start"
|
|
108
|
+
popover="auto"
|
|
109
|
+
>
|
|
110
|
+
<menu>
|
|
111
|
+
<li>
|
|
112
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
113
|
+
Zoom in
|
|
114
|
+
</button>
|
|
115
|
+
</li>
|
|
116
|
+
<li>
|
|
117
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
118
|
+
Zoom out
|
|
119
|
+
</button>
|
|
120
|
+
</li>
|
|
121
|
+
<li>
|
|
122
|
+
<button class="ui-button w-full justify-between" data-variant="ghost" type="button">
|
|
123
|
+
Full screen
|
|
124
|
+
</button>
|
|
125
|
+
</li>
|
|
126
|
+
</menu>
|
|
127
|
+
</div>
|
|
128
|
+
</ui-menu>
|
|
129
|
+
|
|
130
|
+
<ui-menu>
|
|
131
|
+
<button
|
|
132
|
+
class="ui-button"
|
|
133
|
+
data-variant="ghost"
|
|
134
|
+
type="button"
|
|
135
|
+
popovertarget="menubar-example-help"
|
|
136
|
+
interestfor="menubar-example-help"
|
|
137
|
+
>
|
|
138
|
+
Help
|
|
139
|
+
</button>
|
|
140
|
+
<div
|
|
141
|
+
id="menubar-example-help"
|
|
142
|
+
data-slot="menu-popover"
|
|
143
|
+
data-side="bottom"
|
|
144
|
+
data-align="end"
|
|
145
|
+
popover="auto"
|
|
146
|
+
>
|
|
147
|
+
<menu>
|
|
148
|
+
<li>
|
|
149
|
+
<a href="#" class="ui-button w-full justify-between" data-variant="ghost"
|
|
150
|
+
>Documentation</a
|
|
151
|
+
>
|
|
152
|
+
</li>
|
|
153
|
+
<li>
|
|
154
|
+
<a href="#" class="ui-button w-full justify-between" data-variant="ghost"
|
|
155
|
+
>Keyboard shortcuts</a
|
|
156
|
+
>
|
|
157
|
+
</li>
|
|
158
|
+
<li>
|
|
159
|
+
<a href="#" class="ui-button w-full justify-between" data-variant="ghost"
|
|
160
|
+
>Report an issue</a
|
|
161
|
+
>
|
|
162
|
+
</li>
|
|
163
|
+
</menu>
|
|
164
|
+
</div>
|
|
165
|
+
</ui-menu>
|
|
166
|
+
</div>
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* meter.css: Meter (.ui-meter on native <meter>)
|
|
3
|
+
*
|
|
4
|
+
* @layer variables, reset
|
|
5
|
+
* @requires layers.css, _variables.css, _reset.css, progress.css
|
|
6
|
+
* @uses appearance: none: element box becomes the track; only the fill
|
|
7
|
+
* needs vendor pseudo-elements (::-webkit-meter-*-value,
|
|
8
|
+
* ::-moz-meter-bar + :-moz-meter-* state classes); never combine
|
|
9
|
+
* the two vendors in one selector list
|
|
10
|
+
* @uses attr(<attr> type(<number>)): where typed attr() exists
|
|
11
|
+
* (Chromium 133+) the fill is painted on the element from the
|
|
12
|
+
* meter's own attributes, because Blink locks the shadow parts'
|
|
13
|
+
* geometry (backgrounds apply, heights do not); @supports gated
|
|
14
|
+
* @uses Engines without typed attr() keep the vendor-pseudo fill;
|
|
15
|
+
* recorded degradation in Blink pre-133: themed track + thin
|
|
16
|
+
* centered fill (browser policy exception)
|
|
17
|
+
* @tokens --ui-meter-* (@layer variables); geometry aliases --ui-progress-*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
@layer variables {
|
|
21
|
+
:root {
|
|
22
|
+
/* Geometry rides the progress family so the two bars read identically;
|
|
23
|
+
retune a --ui-progress-* token and both follow. */
|
|
24
|
+
--ui-meter-inline-size: var(--ui-progress-inline-size);
|
|
25
|
+
--ui-meter-height: var(--ui-progress-height);
|
|
26
|
+
--ui-meter-radius: var(--ui-progress-radius);
|
|
27
|
+
--ui-meter-track-background: var(--ui-progress-track-background);
|
|
28
|
+
--ui-meter-track-border: var(--ui-progress-track-border);
|
|
29
|
+
|
|
30
|
+
/* Fills are semantic: a meter communicates good/bad, not completion */
|
|
31
|
+
--ui-meter-bar-background: var(--success);
|
|
32
|
+
--ui-meter-bar-background--suboptimum: var(--warning);
|
|
33
|
+
--ui-meter-bar-background--even-less-good: var(--destructive);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@layer reset {
|
|
38
|
+
/* ===========================================================================
|
|
39
|
+
METER: native <meter> fill redraw
|
|
40
|
+
- Same track-on-the-element strategy as progress.css. WebKit exposes one
|
|
41
|
+
pseudo per state; Firefox exposes one fill pseudo colored by :-moz-meter-*
|
|
42
|
+
state classes. One rule per vendor pseudo, by necessity.
|
|
43
|
+
=========================================================================== */
|
|
44
|
+
|
|
45
|
+
:where(.ui-meter) {
|
|
46
|
+
inline-size: var(--ui-meter-inline-size);
|
|
47
|
+
block-size: var(--ui-meter-height);
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
background-color: var(--ui-meter-track-background);
|
|
50
|
+
border: var(--ui-meter-track-border);
|
|
51
|
+
border-radius: var(--ui-meter-radius);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where(.ui-meter)::-webkit-meter-bar {
|
|
55
|
+
background: transparent;
|
|
56
|
+
border: none;
|
|
57
|
+
block-size: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* The value pseudos keep a UA-default height unless given one explicitly */
|
|
61
|
+
:where(.ui-meter)::-webkit-meter-optimum-value {
|
|
62
|
+
block-size: 100%;
|
|
63
|
+
background: var(--ui-meter-bar-background);
|
|
64
|
+
border-radius: inherit;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:where(.ui-meter)::-webkit-meter-suboptimum-value {
|
|
68
|
+
block-size: 100%;
|
|
69
|
+
background: var(--ui-meter-bar-background--suboptimum);
|
|
70
|
+
border-radius: inherit;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:where(.ui-meter)::-webkit-meter-even-less-good-value {
|
|
74
|
+
block-size: 100%;
|
|
75
|
+
background: var(--ui-meter-bar-background--even-less-good);
|
|
76
|
+
border-radius: inherit;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:where(.ui-meter)::-moz-meter-bar {
|
|
80
|
+
block-size: 100%;
|
|
81
|
+
border-radius: inherit;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where(.ui-meter:-moz-meter-optimum)::-moz-meter-bar {
|
|
85
|
+
background: var(--ui-meter-bar-background);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:where(.ui-meter:-moz-meter-sub-optimum)::-moz-meter-bar {
|
|
89
|
+
background: var(--ui-meter-bar-background--suboptimum);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:where(.ui-meter:-moz-meter-sub-sub-optimum)::-moz-meter-bar {
|
|
93
|
+
background: var(--ui-meter-bar-background--even-less-good);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* ===========================================================================
|
|
97
|
+
ATTRIBUTE-PAINTED FILL: Blink accepts backgrounds on the meter shadow parts
|
|
98
|
+
but ignores their geometry entirely (author heights, even !important, never
|
|
99
|
+
apply), leaving a thin centered fill. Where typed attr() exists, paint the
|
|
100
|
+
fill on the element itself instead: a hard-stop gradient sized from the
|
|
101
|
+
meter's own attributes, reproducing the HTML spec's region algorithm:
|
|
102
|
+
value and optimum each land in a low/between/high region, and the distance
|
|
103
|
+
between the two regions (0/1/2) picks optimal / suboptimal / even-less-good.
|
|
104
|
+
The shadow fills are blanked underneath so nothing double-paints.
|
|
105
|
+
=========================================================================== */
|
|
106
|
+
|
|
107
|
+
@supports (inline-size: calc(attr(value type(<number>), 0) * 1px)) {
|
|
108
|
+
:where(.ui-meter) {
|
|
109
|
+
/* Attribute facts, with the spec's defaults */
|
|
110
|
+
--_val: attr(value type(<number>), 0);
|
|
111
|
+
--_min: attr(min type(<number>), 0);
|
|
112
|
+
--_max: attr(max type(<number>), 1);
|
|
113
|
+
--_low: attr(low type(<number>), var(--_min));
|
|
114
|
+
--_high: attr(high type(<number>), var(--_max));
|
|
115
|
+
--_opt: attr(optimum type(<number>), calc((var(--_min) + var(--_max)) / 2));
|
|
116
|
+
|
|
117
|
+
--_pct: calc((var(--_val) - var(--_min)) / (var(--_max) - var(--_min)) * 100%);
|
|
118
|
+
|
|
119
|
+
/* Region index 0/1/2 = below low / between / above high. The ×100000
|
|
120
|
+
saturation stands in for sign(); the +1 makes the low bound inclusive.
|
|
121
|
+
Assumes attribute deltas of at least 0.00001. */
|
|
122
|
+
--_region-val: calc(
|
|
123
|
+
clamp(0, (var(--_val) - var(--_low)) * 100000 + 1, 1) +
|
|
124
|
+
clamp(0, (var(--_val) - var(--_high)) * 100000, 1)
|
|
125
|
+
);
|
|
126
|
+
--_region-opt: calc(
|
|
127
|
+
clamp(0, (var(--_opt) - var(--_low)) * 100000 + 1, 1) +
|
|
128
|
+
clamp(0, (var(--_opt) - var(--_high)) * 100000, 1)
|
|
129
|
+
);
|
|
130
|
+
--_distance: max(
|
|
131
|
+
var(--_region-val) - var(--_region-opt),
|
|
132
|
+
var(--_region-opt) - var(--_region-val)
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
/* distance 0 → optimal, 1 → suboptimal, 2 → even less good */
|
|
136
|
+
--_fill: color-mix(
|
|
137
|
+
in oklch,
|
|
138
|
+
var(--ui-meter-bar-background--even-less-good)
|
|
139
|
+
calc(clamp(0, var(--_distance) - 1, 1) * 100%),
|
|
140
|
+
color-mix(
|
|
141
|
+
in oklch,
|
|
142
|
+
var(--ui-meter-bar-background--suboptimum) calc(min(var(--_distance), 1) * 100%),
|
|
143
|
+
var(--ui-meter-bar-background)
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
background-image: linear-gradient(
|
|
148
|
+
to right,
|
|
149
|
+
var(--_fill) var(--_pct),
|
|
150
|
+
transparent var(--_pct)
|
|
151
|
+
);
|
|
152
|
+
background-origin: padding-box;
|
|
153
|
+
background-clip: padding-box;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:where(.ui-meter:dir(rtl)) {
|
|
157
|
+
background-image: linear-gradient(to left, var(--_fill) var(--_pct), transparent var(--_pct));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* The shadow fills would double-paint under the gradient (the UA styles
|
|
161
|
+
these parts with a bevel background-image) */
|
|
162
|
+
:where(.ui-meter)::-webkit-meter-optimum-value {
|
|
163
|
+
background: transparent;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:where(.ui-meter)::-webkit-meter-suboptimum-value {
|
|
167
|
+
background: transparent;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:where(.ui-meter)::-webkit-meter-even-less-good-value {
|
|
171
|
+
background: transparent;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:where(.ui-meter)::-moz-meter-bar {
|
|
175
|
+
background: transparent;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<div class="flex flex-col gap-sm w-full max-w-xl">
|
|
2
|
+
<div class="ui-field">
|
|
3
|
+
<label class="flex items-center justify-between" data-slot="field-label" for="f-storage">
|
|
4
|
+
<span>Storage used</span>
|
|
5
|
+
<span class="text-xs text-muted-foreground">52/100 GB</span>
|
|
6
|
+
</label>
|
|
7
|
+
<meter
|
|
8
|
+
class="ui-meter"
|
|
9
|
+
id="f-storage"
|
|
10
|
+
min="0"
|
|
11
|
+
max="100"
|
|
12
|
+
low="60"
|
|
13
|
+
high="85"
|
|
14
|
+
optimum="30"
|
|
15
|
+
value="52"
|
|
16
|
+
>
|
|
17
|
+
52 GB of 100 GB
|
|
18
|
+
</meter>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="ui-field">
|
|
21
|
+
<label class="flex items-center justify-between" data-slot="field-label" for="f-storage-high">
|
|
22
|
+
<span>Nearly full</span>
|
|
23
|
+
<span class="text-xs text-muted-foreground">93/100 GB</span>
|
|
24
|
+
</label>
|
|
25
|
+
<meter
|
|
26
|
+
class="ui-meter"
|
|
27
|
+
id="f-storage-high"
|
|
28
|
+
min="0"
|
|
29
|
+
max="100"
|
|
30
|
+
low="60"
|
|
31
|
+
high="85"
|
|
32
|
+
optimum="30"
|
|
33
|
+
value="93"
|
|
34
|
+
>
|
|
35
|
+
93 GB of 100 GB
|
|
36
|
+
</meter>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mobile-menu.css — Mobile menu (.ui-mobile-menu)
|
|
3
|
+
*
|
|
4
|
+
* @layer variables, components
|
|
5
|
+
* @requires layers.css, _variables.css, dialog.css, accordion.css
|
|
6
|
+
* @uses Composes .ui-dialog[data-size="screen"] — fullscreen native <dialog>
|
|
7
|
+
* @uses Invoker Commands (command="show-modal") — open without JS (markup)
|
|
8
|
+
* @uses view-transition-name — stable menu across navigations
|
|
9
|
+
* @uses @starting-style — viewport enter animation
|
|
10
|
+
* @uses Overrides --ui-dialog-* motion tokens for slide-right variant
|
|
11
|
+
* @tokens --ui-mobile-menu-* (@layer variables)
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
@layer variables {
|
|
15
|
+
:root {
|
|
16
|
+
--ui-mobile-menu-background: var(--background);
|
|
17
|
+
--ui-mobile-menu-foreground: var(--foreground);
|
|
18
|
+
--ui-mobile-menu-backdrop: var(--faded-foreground);
|
|
19
|
+
--ui-mobile-menu-header-padding-inline: var(--gap-md) var(--gap-xs);
|
|
20
|
+
--ui-mobile-menu-header-padding-block: var(--gap-xs);
|
|
21
|
+
--ui-mobile-menu-body-padding-inline: var(--gap-sm);
|
|
22
|
+
--ui-mobile-menu-body-padding-block: var(--gap-md);
|
|
23
|
+
--ui-mobile-menu-footer-padding: var(--gap-sm);
|
|
24
|
+
--ui-mobile-menu-footer-gap: var(--gap-xs);
|
|
25
|
+
--ui-mobile-menu-nested-accordion-padding-inline-start: var(--gap-sm);
|
|
26
|
+
|
|
27
|
+
--ui-mobile-menu-viewport-opacity--start: 0;
|
|
28
|
+
--ui-mobile-menu-viewport-opacity--end: 1;
|
|
29
|
+
--ui-mobile-menu-viewport-scale--start: 0.98;
|
|
30
|
+
--ui-mobile-menu-viewport-scale--end: 1;
|
|
31
|
+
--ui-mobile-menu-viewport-translate--start: -2rem, 1rem, 0;
|
|
32
|
+
--ui-mobile-menu-viewport-translate--end: 0, 0, 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@layer zazz.components {
|
|
37
|
+
/* ===========================================================================
|
|
38
|
+
MOBILE MENU — full-screen dialog with accordion-based nested navigation
|
|
39
|
+
- Composes .ui-dialog[data-size="screen"] + :where(ui-accordion, .ui-accordion) for expand/collapse
|
|
40
|
+
- No JavaScript — Invoker Commands to open, native dialog close, native details
|
|
41
|
+
=========================================================================== */
|
|
42
|
+
|
|
43
|
+
.ui-mobile-menu {
|
|
44
|
+
/* View transitions - keeps the menu stable when navigating between pages */
|
|
45
|
+
view-transition-name: global-mobile-menu;
|
|
46
|
+
inline-size: 100%;
|
|
47
|
+
|
|
48
|
+
--ui-dialog-background: var(--ui-mobile-menu-background);
|
|
49
|
+
--ui-dialog-foreground: var(--ui-mobile-menu-foreground);
|
|
50
|
+
|
|
51
|
+
overflow: clip;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ui-mobile-menu::backdrop {
|
|
55
|
+
background-color: var(--ui-mobile-menu-backdrop);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[data-slot~="mobile-menu-viewport"] {
|
|
59
|
+
display: grid;
|
|
60
|
+
position: relative;
|
|
61
|
+
grid-template-rows: auto 1fr auto;
|
|
62
|
+
overflow: clip;
|
|
63
|
+
align-items: start;
|
|
64
|
+
inline-size: 100%;
|
|
65
|
+
block-size: 100%;
|
|
66
|
+
max-block-size: 100svh;
|
|
67
|
+
transition: var(--default-transition);
|
|
68
|
+
transition-duration: var(--ui-dialog-transition-duration);
|
|
69
|
+
transition-delay: calc(var(--ui-dialog-transition-duration) / 1.5);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ui-mobile-menu[data-animation="slide-right"][open] [data-slot~="mobile-menu-viewport"] {
|
|
73
|
+
opacity: var(--ui-mobile-menu-viewport-opacity--end);
|
|
74
|
+
transform: scale(var(--ui-mobile-menu-viewport-scale--end))
|
|
75
|
+
translate3d(var(--ui-mobile-menu-viewport-translate--end));
|
|
76
|
+
|
|
77
|
+
@starting-style {
|
|
78
|
+
opacity: var(--ui-mobile-menu-viewport-opacity--start);
|
|
79
|
+
transform: scale(var(--ui-mobile-menu-viewport-scale--start))
|
|
80
|
+
translate3d(var(--ui-mobile-menu-viewport-translate--start));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-slot~="mobile-menu-header"] {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: space-between;
|
|
88
|
+
padding-inline: var(--ui-mobile-menu-header-padding-inline);
|
|
89
|
+
padding-block: var(--ui-mobile-menu-header-padding-block);
|
|
90
|
+
border-bottom: 1px solid var(--border);
|
|
91
|
+
position: sticky;
|
|
92
|
+
top: 0;
|
|
93
|
+
background-color: var(--ui-mobile-menu-background);
|
|
94
|
+
z-index: 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-slot~="mobile-menu-body"] {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
overflow-y: auto;
|
|
101
|
+
overflow-x: clip;
|
|
102
|
+
padding-inline: var(--ui-mobile-menu-body-padding-inline);
|
|
103
|
+
padding-block: var(--ui-mobile-menu-body-padding-block);
|
|
104
|
+
max-block-size: 100%;
|
|
105
|
+
scrollbar-gutter: stable both-edges;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-slot~="mobile-menu-footer"] {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-wrap: wrap;
|
|
111
|
+
gap: var(--ui-mobile-menu-footer-gap);
|
|
112
|
+
padding: var(--ui-mobile-menu-footer-padding);
|
|
113
|
+
border-top: 1px solid var(--border);
|
|
114
|
+
position: sticky;
|
|
115
|
+
bottom: 0;
|
|
116
|
+
background-color: var(--ui-mobile-menu-background);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Nested accordion inside mobile menu — tighter padding for sub-levels */
|
|
120
|
+
[data-slot~="mobile-menu-body"]
|
|
121
|
+
:where(ui-accordion, .ui-accordion)
|
|
122
|
+
:where(ui-accordion, .ui-accordion) {
|
|
123
|
+
padding-inline-start: var(--ui-mobile-menu-nested-accordion-padding-inline-start);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
[data-slot~="mobile-menu-body"] :where(ui-accordion, .ui-accordion) details:not(:last-child) {
|
|
127
|
+
border-bottom-color: var(--border);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* ===========================================================================
|
|
131
|
+
MOBILE MENU SLIDE DOWN ANIMATION
|
|
132
|
+
=========================================================================== */
|
|
133
|
+
|
|
134
|
+
/* Slide-right: accordion-style block-size reveal on the viewport (not scaleY). */
|
|
135
|
+
.ui-mobile-menu[data-animation="slide-right"] {
|
|
136
|
+
--ui-dialog-transition-duration: calc(var(--default-transition-duration) * 1.75);
|
|
137
|
+
--ui-dialog-opacity--start: 1;
|
|
138
|
+
--ui-dialog-scale--start: 1;
|
|
139
|
+
--ui-dialog-translate--start: -100%, 0, 0;
|
|
140
|
+
--ui-dialog-translate--end: 0, 0, 0;
|
|
141
|
+
|
|
142
|
+
overflow: clip;
|
|
143
|
+
transform-origin: left center;
|
|
144
|
+
}
|
|
145
|
+
}
|