@zazz-ui/core 0.4.0 → 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 +341 -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 +45 -43
- 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 +147 -126
- 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 +89 -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 +299 -191
- 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
package/examples/forms.html
DELETED
|
@@ -1,504 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<!-- Page-specific tags stay above the generated block -->
|
|
5
|
-
<title>Zazz tests | Overview</title>
|
|
6
|
-
<link rel="prefetch" href="layout.html" />
|
|
7
|
-
|
|
8
|
-
<!-- Shared head, generated from @zazz-ui/core's head contract (src/head.ts). -->
|
|
9
|
-
<!-- Edit nothing between the markers; run `vp run heads` to regenerate. -->
|
|
10
|
-
<!-- zazz:head -->
|
|
11
|
-
<meta charset="utf-8" />
|
|
12
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
13
|
-
<!-- Paint the right theme (background, form controls, scrollbars) before CSS loads -->
|
|
14
|
-
<meta name="color-scheme" content="light dark" />
|
|
15
|
-
<!-- Google Fonts: Geist + Geist Mono (preconnect so the CSS request starts early) -->
|
|
16
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
17
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
18
|
-
<link
|
|
19
|
-
rel="preload"
|
|
20
|
-
as="font"
|
|
21
|
-
type="font/woff2"
|
|
22
|
-
crossorigin
|
|
23
|
-
href="https://fonts.gstatic.com/s/geist/v5/gyByhwUxId8gMEwcGFWNOITd.woff2"
|
|
24
|
-
/>
|
|
25
|
-
<link
|
|
26
|
-
href="https://fonts.googleapis.com/css2?family=Geist+Mono:ital,wght@0,100..900;1,100..900&family=Geist:ital,wght@0,100..900;1,100..900&display=swap"
|
|
27
|
-
rel="stylesheet"
|
|
28
|
-
/>
|
|
29
|
-
<!-- Zazz styles: one bundle (index.css @imports every layer in cascade order) -->
|
|
30
|
-
<link rel="stylesheet" href="../src/index.css" />
|
|
31
|
-
<!-- Import map: bare specifiers in Zazz scripts resolve to pinned, SRI-checked files -->
|
|
32
|
-
<script type="importmap">
|
|
33
|
-
{
|
|
34
|
-
"imports": {
|
|
35
|
-
"signal-polyfill": "https://cdn.jsdelivr.net/npm/signal-polyfill@0.2.2/dist/index.js",
|
|
36
|
-
"embla-carousel": "https://cdn.jsdelivr.net/npm/embla-carousel@8.6.0/esm/embla-carousel.esm.js",
|
|
37
|
-
"embla-carousel-autoplay": "https://cdn.jsdelivr.net/npm/embla-carousel-autoplay@8.6.0/esm/embla-carousel-autoplay.esm.js",
|
|
38
|
-
"embla-carousel-auto-scroll": "https://cdn.jsdelivr.net/npm/embla-carousel-auto-scroll@8.6.0/esm/embla-carousel-auto-scroll.esm.js",
|
|
39
|
-
"embla-carousel-class-names": "https://cdn.jsdelivr.net/npm/embla-carousel-class-names@8.6.0/esm/embla-carousel-class-names.esm.js"
|
|
40
|
-
},
|
|
41
|
-
"integrity": {
|
|
42
|
-
"https://cdn.jsdelivr.net/npm/signal-polyfill@0.2.2/dist/index.js": "sha384-0OqM7OXGT6Oz1z98u/geiFn/FUyz4iWexkXHCvbIGXRRDXl6bp6IKc0j78AQ6DEK",
|
|
43
|
-
"https://cdn.jsdelivr.net/npm/embla-carousel@8.6.0/esm/embla-carousel.esm.js": "sha384-GXjfyU1fSHHeweoYd3rwo7OBKYtkq+JcsDoe8VDRc6znCty2ZTzyVvX1DwqCE+9t",
|
|
44
|
-
"https://cdn.jsdelivr.net/npm/embla-carousel-autoplay@8.6.0/esm/embla-carousel-autoplay.esm.js": "sha384-AX49yBc7zd/CT8ZqNMRiiqqVSV9xfxb27VwEGziPioT3wL4k4C5BW2qwefdWuN4J",
|
|
45
|
-
"https://cdn.jsdelivr.net/npm/embla-carousel-auto-scroll@8.6.0/esm/embla-carousel-auto-scroll.esm.js": "sha384-SPdnL1eic73WfM72zFEf0RJ5PdUC7TL3Yb5jOl1JC3/l4D7EsVxwO8wFnnezlMSu",
|
|
46
|
-
"https://cdn.jsdelivr.net/npm/embla-carousel-class-names@8.6.0/esm/embla-carousel-class-names.esm.js": "sha384-ZWno/FqzYeWE5Ils19GIhep1AZ5bMl0mp9wmm6baTJE4+pjMjOdTnE55SjUQAdVh"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
</script>
|
|
50
|
-
<link rel="modulepreload" href="../src/index.js" />
|
|
51
|
-
<!-- Polyfill: Interest Invokers (interestfor) — native in Chromium only -->
|
|
52
|
-
<script
|
|
53
|
-
type="module"
|
|
54
|
-
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
|
|
55
|
-
integrity="sha384-hR2BVNtsS7fIIMwOm+f7MY0JZfuByGhQQfevCBB6evFATKzBsTw0JzH/RxD94z2T"
|
|
56
|
-
crossorigin="anonymous"
|
|
57
|
-
></script>
|
|
58
|
-
<!-- Zazz behavior: one ES module imports every component script in dependency order -->
|
|
59
|
-
<script type="module" src="../src/index.js"></script>
|
|
60
|
-
<!-- Theme: apply the persisted (or preferred) scheme before first paint -->
|
|
61
|
-
<script>
|
|
62
|
-
(() => {
|
|
63
|
-
try {
|
|
64
|
-
const storedTheme = localStorage.getItem("theme");
|
|
65
|
-
const prefersDark = matchMedia("(prefers-color-scheme: dark)").matches;
|
|
66
|
-
const theme = storedTheme ?? (prefersDark ? "dark" : "light");
|
|
67
|
-
document.documentElement.classList.toggle("dark", theme === "dark");
|
|
68
|
-
} catch {
|
|
69
|
-
document.documentElement.classList.toggle(
|
|
70
|
-
"dark",
|
|
71
|
-
matchMedia("(prefers-color-scheme: dark)").matches,
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
})();
|
|
75
|
-
</script>
|
|
76
|
-
<!-- /zazz:head -->
|
|
77
|
-
</head>
|
|
78
|
-
|
|
79
|
-
<body class="bg-background">
|
|
80
|
-
<header class="py-md border-b" data-transition-layer="global-header">
|
|
81
|
-
<div class="container">
|
|
82
|
-
<div class="flex items-center justify-between">
|
|
83
|
-
<a href="index.html" class="text-h6 font-black">Zazz tests</a>
|
|
84
|
-
<nav>
|
|
85
|
-
<menu class="flex gap-xs">
|
|
86
|
-
<li>
|
|
87
|
-
<a class="ui-button" data-variant="ghost" data-size="sm" href="index.html"
|
|
88
|
-
>Overview</a
|
|
89
|
-
>
|
|
90
|
-
</li>
|
|
91
|
-
<li>
|
|
92
|
-
<a class="ui-button" data-variant="ghost" data-size="sm" href="about.html">About</a>
|
|
93
|
-
</li>
|
|
94
|
-
<li>
|
|
95
|
-
<a class="ui-button" data-variant="ghost" data-size="sm" href="products.html"
|
|
96
|
-
>Products</a
|
|
97
|
-
>
|
|
98
|
-
</li>
|
|
99
|
-
<li>
|
|
100
|
-
<a class="ui-button" data-variant="ghost" data-size="sm" href="layout.html"
|
|
101
|
-
>Layout</a
|
|
102
|
-
>
|
|
103
|
-
</li>
|
|
104
|
-
<li>
|
|
105
|
-
<a class="ui-button" data-variant="ghost" data-size="sm" href="responsive.html"
|
|
106
|
-
>Responsive</a
|
|
107
|
-
>
|
|
108
|
-
</li>
|
|
109
|
-
<li>
|
|
110
|
-
<a class="ui-button" data-variant="ghost" data-size="sm" href="components.html"
|
|
111
|
-
>Components</a
|
|
112
|
-
>
|
|
113
|
-
</li>
|
|
114
|
-
<li>
|
|
115
|
-
<a class="ui-button" data-variant="ghost" data-size="sm" href="forms.html">Forms</a>
|
|
116
|
-
</li>
|
|
117
|
-
</menu>
|
|
118
|
-
</nav>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</header>
|
|
122
|
-
|
|
123
|
-
<main data-layout="main">
|
|
124
|
-
<section class="py-xl">
|
|
125
|
-
<div class="container" data-container="md">
|
|
126
|
-
<hgroup class="flex flex-col gap-sm pb-md">
|
|
127
|
-
<span class="text-eyebrow">Forms</span>
|
|
128
|
-
<h1 class="text-h1">Fields and validation</h1>
|
|
129
|
-
<p class="text-lg text-muted-foreground">
|
|
130
|
-
Every control shares the <code>--ui-field-*</code> tokens and the
|
|
131
|
-
<code>.ui-field</code> layout. Validation surfaces through <code>:user-invalid</code>,
|
|
132
|
-
so errors appear only after you blur or submit. This form sits in the md band and
|
|
133
|
-
collapses to one column below md.
|
|
134
|
-
</p>
|
|
135
|
-
</hgroup>
|
|
136
|
-
|
|
137
|
-
<form class="grid gap-lg">
|
|
138
|
-
<div class="grid grid-cols-3 grid-flow-row gap-md">
|
|
139
|
-
<!-- Column one: text inputs, select, textarea -->
|
|
140
|
-
<div class="flex flex-col gap-md">
|
|
141
|
-
<div class="ui-field">
|
|
142
|
-
<label data-slot="field-label" for="f-name">Name</label>
|
|
143
|
-
<input
|
|
144
|
-
class="ui-input"
|
|
145
|
-
id="f-name"
|
|
146
|
-
name="name"
|
|
147
|
-
type="text"
|
|
148
|
-
inputmode="text"
|
|
149
|
-
placeholder="Ada Lovelace"
|
|
150
|
-
autocomplete="name"
|
|
151
|
-
autocapitalize="words"
|
|
152
|
-
enterkeyhint="next"
|
|
153
|
-
/>
|
|
154
|
-
</div>
|
|
155
|
-
|
|
156
|
-
<div class="ui-field">
|
|
157
|
-
<label data-slot="field-label" for="f-email">Email</label>
|
|
158
|
-
<input
|
|
159
|
-
class="ui-input"
|
|
160
|
-
id="f-email"
|
|
161
|
-
name="email"
|
|
162
|
-
type="email"
|
|
163
|
-
inputmode="email"
|
|
164
|
-
required
|
|
165
|
-
placeholder="you@example.com"
|
|
166
|
-
autocomplete="email"
|
|
167
|
-
autocapitalize="off"
|
|
168
|
-
spellcheck="false"
|
|
169
|
-
enterkeyhint="next"
|
|
170
|
-
aria-describedby="f-email-hint"
|
|
171
|
-
/>
|
|
172
|
-
<div data-slot="field-description">
|
|
173
|
-
<span data-slot="field-hint" id="f-email-hint"
|
|
174
|
-
>We'll never sell or share your email address.</span
|
|
175
|
-
>
|
|
176
|
-
<span data-slot="field-error" role="alert"
|
|
177
|
-
>Please enter a valid email address.</span
|
|
178
|
-
>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
|
|
182
|
-
<div class="ui-field">
|
|
183
|
-
<label data-slot="field-label" for="f-phone">Phone</label>
|
|
184
|
-
<input
|
|
185
|
-
class="ui-input"
|
|
186
|
-
id="f-phone"
|
|
187
|
-
name="phone"
|
|
188
|
-
type="tel"
|
|
189
|
-
inputmode="tel"
|
|
190
|
-
placeholder="+1 (555) 012-3456"
|
|
191
|
-
autocomplete="tel"
|
|
192
|
-
enterkeyhint="next"
|
|
193
|
-
/>
|
|
194
|
-
</div>
|
|
195
|
-
|
|
196
|
-
<div class="ui-field">
|
|
197
|
-
<label data-slot="field-label" for="f-sort">Sort by</label>
|
|
198
|
-
<select class="ui-select" id="f-sort" name="sort">
|
|
199
|
-
<button>
|
|
200
|
-
<selectedcontent></selectedcontent>
|
|
201
|
-
</button>
|
|
202
|
-
<optgroup class="grid gap-px" label="Sort by">
|
|
203
|
-
<legend class="text-eyebrow text-muted-foreground p-xs">Sort by</legend>
|
|
204
|
-
<option value="recent" selected>Most recent</option>
|
|
205
|
-
<option value="popular">Most popular</option>
|
|
206
|
-
<option value="price-asc">Price: low to high</option>
|
|
207
|
-
<option value="price-desc">Price: high to low</option>
|
|
208
|
-
</optgroup>
|
|
209
|
-
</select>
|
|
210
|
-
</div>
|
|
211
|
-
|
|
212
|
-
<div class="ui-field">
|
|
213
|
-
<label data-slot="field-label" for="f-message">Message</label>
|
|
214
|
-
<textarea
|
|
215
|
-
class="ui-textarea"
|
|
216
|
-
id="f-message"
|
|
217
|
-
name="message"
|
|
218
|
-
inputmode="text"
|
|
219
|
-
placeholder="Your message"
|
|
220
|
-
></textarea>
|
|
221
|
-
</div>
|
|
222
|
-
</div>
|
|
223
|
-
|
|
224
|
-
<!-- Column two: input groups, password, choice groups, slider -->
|
|
225
|
-
<div class="flex flex-col gap-md">
|
|
226
|
-
<div class="ui-field">
|
|
227
|
-
<label data-slot="field-label" for="f-search">Search</label>
|
|
228
|
-
<label class="ui-input-group">
|
|
229
|
-
<input
|
|
230
|
-
class="ui-input"
|
|
231
|
-
id="f-search"
|
|
232
|
-
type="search"
|
|
233
|
-
name="q"
|
|
234
|
-
inputmode="search"
|
|
235
|
-
placeholder="Search…"
|
|
236
|
-
autocomplete="off"
|
|
237
|
-
spellcheck="false"
|
|
238
|
-
enterkeyhint="search"
|
|
239
|
-
/>
|
|
240
|
-
<span data-slot="input-group-addon">
|
|
241
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
|
|
242
|
-
<rect width="256" height="256" fill="none" />
|
|
243
|
-
<circle
|
|
244
|
-
cx="112"
|
|
245
|
-
cy="112"
|
|
246
|
-
r="80"
|
|
247
|
-
fill="none"
|
|
248
|
-
stroke="currentColor"
|
|
249
|
-
stroke-linecap="round"
|
|
250
|
-
stroke-linejoin="round"
|
|
251
|
-
stroke-width="16"
|
|
252
|
-
/>
|
|
253
|
-
<line
|
|
254
|
-
x1="168.57"
|
|
255
|
-
y1="168.57"
|
|
256
|
-
x2="224"
|
|
257
|
-
y2="224"
|
|
258
|
-
fill="none"
|
|
259
|
-
stroke="currentColor"
|
|
260
|
-
stroke-linecap="round"
|
|
261
|
-
stroke-linejoin="round"
|
|
262
|
-
stroke-width="16"
|
|
263
|
-
/>
|
|
264
|
-
</svg>
|
|
265
|
-
</span>
|
|
266
|
-
</label>
|
|
267
|
-
</div>
|
|
268
|
-
|
|
269
|
-
<div class="ui-field">
|
|
270
|
-
<label data-slot="field-label" for="f-url">Website</label>
|
|
271
|
-
<label class="ui-input-group">
|
|
272
|
-
<input
|
|
273
|
-
class="ui-input"
|
|
274
|
-
id="f-url"
|
|
275
|
-
type="url"
|
|
276
|
-
name="url"
|
|
277
|
-
inputmode="url"
|
|
278
|
-
required
|
|
279
|
-
placeholder="https://zazz.sh"
|
|
280
|
-
autocomplete="url"
|
|
281
|
-
autocapitalize="off"
|
|
282
|
-
spellcheck="false"
|
|
283
|
-
enterkeyhint="go"
|
|
284
|
-
aria-describedby="f-url-hint"
|
|
285
|
-
/>
|
|
286
|
-
<span data-slot="input-group-addon">
|
|
287
|
-
<span data-slot="input-group-text">https://</span>
|
|
288
|
-
</span>
|
|
289
|
-
<span data-slot="input-group-addon" data-align="inline-end">
|
|
290
|
-
<button class="ui-button" data-variant="primary" data-size="sm" type="submit">
|
|
291
|
-
Apply
|
|
292
|
-
</button>
|
|
293
|
-
</span>
|
|
294
|
-
</label>
|
|
295
|
-
<div data-slot="field-description">
|
|
296
|
-
<span data-slot="field-hint" id="f-url-hint"
|
|
297
|
-
>Where people can find you online.</span
|
|
298
|
-
>
|
|
299
|
-
<span data-slot="field-error" role="alert"
|
|
300
|
-
>Enter a valid URL, e.g. https://zazz.sh.</span
|
|
301
|
-
>
|
|
302
|
-
</div>
|
|
303
|
-
</div>
|
|
304
|
-
|
|
305
|
-
<div class="ui-field">
|
|
306
|
-
<label data-slot="field-label" for="f-password">Password</label>
|
|
307
|
-
<ui-password>
|
|
308
|
-
<label class="ui-password-group">
|
|
309
|
-
<input
|
|
310
|
-
class="ui-input"
|
|
311
|
-
id="f-password"
|
|
312
|
-
name="password"
|
|
313
|
-
type="password"
|
|
314
|
-
autocomplete="new-password"
|
|
315
|
-
minlength="8"
|
|
316
|
-
required
|
|
317
|
-
placeholder="••••••••"
|
|
318
|
-
aria-describedby="f-password-hint f-password-warning"
|
|
319
|
-
/>
|
|
320
|
-
<span data-slot="password-group-addon" data-align="inline-end">
|
|
321
|
-
<button
|
|
322
|
-
class="ui-button"
|
|
323
|
-
data-slot="password-group-toggle"
|
|
324
|
-
type="button"
|
|
325
|
-
data-variant="ghost"
|
|
326
|
-
data-size="icon-sm"
|
|
327
|
-
aria-pressed="false"
|
|
328
|
-
aria-label="Show password"
|
|
329
|
-
aria-describedby="f-password-warning"
|
|
330
|
-
>
|
|
331
|
-
<svg
|
|
332
|
-
data-slot="password-group-icon password-group-icon-show"
|
|
333
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
334
|
-
viewBox="0 0 256 256"
|
|
335
|
-
aria-hidden="true"
|
|
336
|
-
>
|
|
337
|
-
<rect width="256" height="256" fill="none" />
|
|
338
|
-
<path
|
|
339
|
-
d="M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Z"
|
|
340
|
-
fill="none"
|
|
341
|
-
stroke="currentColor"
|
|
342
|
-
stroke-linecap="round"
|
|
343
|
-
stroke-linejoin="round"
|
|
344
|
-
stroke-width="16"
|
|
345
|
-
/>
|
|
346
|
-
<circle
|
|
347
|
-
cx="128"
|
|
348
|
-
cy="128"
|
|
349
|
-
r="40"
|
|
350
|
-
fill="none"
|
|
351
|
-
stroke="currentColor"
|
|
352
|
-
stroke-linecap="round"
|
|
353
|
-
stroke-linejoin="round"
|
|
354
|
-
stroke-width="16"
|
|
355
|
-
/>
|
|
356
|
-
</svg>
|
|
357
|
-
<svg
|
|
358
|
-
data-slot="password-group-icon password-group-icon-hide"
|
|
359
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
360
|
-
viewBox="0 0 256 256"
|
|
361
|
-
aria-hidden="true"
|
|
362
|
-
>
|
|
363
|
-
<rect width="256" height="256" fill="none" />
|
|
364
|
-
<line
|
|
365
|
-
x1="48"
|
|
366
|
-
y1="40"
|
|
367
|
-
x2="208"
|
|
368
|
-
y2="216"
|
|
369
|
-
fill="none"
|
|
370
|
-
stroke="currentColor"
|
|
371
|
-
stroke-linecap="round"
|
|
372
|
-
stroke-linejoin="round"
|
|
373
|
-
stroke-width="16"
|
|
374
|
-
/>
|
|
375
|
-
<path
|
|
376
|
-
d="M154.9,157.6A40,40,0,0,1,101,98.4"
|
|
377
|
-
fill="none"
|
|
378
|
-
stroke="currentColor"
|
|
379
|
-
stroke-linecap="round"
|
|
380
|
-
stroke-linejoin="round"
|
|
381
|
-
stroke-width="16"
|
|
382
|
-
/>
|
|
383
|
-
<path
|
|
384
|
-
d="M73.8,69.7C33.6,90.6,16,128,16,128s32,72,112,72a118.1,118.1,0,0,0,54.1-12.8"
|
|
385
|
-
fill="none"
|
|
386
|
-
stroke="currentColor"
|
|
387
|
-
stroke-linecap="round"
|
|
388
|
-
stroke-linejoin="round"
|
|
389
|
-
stroke-width="16"
|
|
390
|
-
/>
|
|
391
|
-
<path
|
|
392
|
-
d="M208.6,169.1C229.8,149.1,240,128,240,128S208,56,128,56a126,126,0,0,0-20.5,1.6"
|
|
393
|
-
fill="none"
|
|
394
|
-
stroke="currentColor"
|
|
395
|
-
stroke-linecap="round"
|
|
396
|
-
stroke-linejoin="round"
|
|
397
|
-
stroke-width="16"
|
|
398
|
-
/>
|
|
399
|
-
</svg>
|
|
400
|
-
</button>
|
|
401
|
-
</span>
|
|
402
|
-
</label>
|
|
403
|
-
</ui-password>
|
|
404
|
-
<div data-slot="field-description">
|
|
405
|
-
<span data-slot="field-hint" id="f-password-hint"
|
|
406
|
-
>Use eight or more characters.</span
|
|
407
|
-
>
|
|
408
|
-
<span data-slot="field-error" role="alert"
|
|
409
|
-
>Password must be at least 8 characters.</span
|
|
410
|
-
>
|
|
411
|
-
</div>
|
|
412
|
-
<span class="sr-only" id="f-password-warning">
|
|
413
|
-
Warning: showing the password makes it visible to anyone near your screen.
|
|
414
|
-
</span>
|
|
415
|
-
</div>
|
|
416
|
-
|
|
417
|
-
<fieldset class="ui-field-group">
|
|
418
|
-
<legend>Preferences</legend>
|
|
419
|
-
<div class="flex flex-col gap-xs">
|
|
420
|
-
<label class="ui-field" data-orientation="horizontal">
|
|
421
|
-
<input type="checkbox" name="preferences-newsletter" />
|
|
422
|
-
<span data-slot="field-label">Subscribe to the newsletter</span>
|
|
423
|
-
</label>
|
|
424
|
-
<label class="ui-field" data-orientation="horizontal">
|
|
425
|
-
<input type="checkbox" name="preferences-terms" checked />
|
|
426
|
-
<span data-slot="field-label">Accept terms & conditions</span>
|
|
427
|
-
</label>
|
|
428
|
-
</div>
|
|
429
|
-
</fieldset>
|
|
430
|
-
|
|
431
|
-
<fieldset class="ui-radio-group">
|
|
432
|
-
<legend>Plan</legend>
|
|
433
|
-
<div class="flex flex-col gap-xs">
|
|
434
|
-
<label class="ui-field" data-orientation="horizontal">
|
|
435
|
-
<input class="ui-radio" type="radio" name="plan" value="starter" />
|
|
436
|
-
<span data-slot="field-label">Starter</span>
|
|
437
|
-
</label>
|
|
438
|
-
<label class="ui-field" data-orientation="horizontal">
|
|
439
|
-
<input class="ui-radio" type="radio" name="plan" value="pro" checked />
|
|
440
|
-
<span data-slot="field-label">Pro</span>
|
|
441
|
-
</label>
|
|
442
|
-
<label class="ui-field" data-orientation="horizontal">
|
|
443
|
-
<input class="ui-radio" type="radio" name="plan" value="team" />
|
|
444
|
-
<span data-slot="field-label">Team</span>
|
|
445
|
-
</label>
|
|
446
|
-
</div>
|
|
447
|
-
</fieldset>
|
|
448
|
-
|
|
449
|
-
<fieldset class="ui-field-group">
|
|
450
|
-
<legend>Notifications</legend>
|
|
451
|
-
<div class="flex flex-col gap-xs">
|
|
452
|
-
<label class="ui-field" data-orientation="horizontal">
|
|
453
|
-
<input type="checkbox" role="switch" name="notifications-email" />
|
|
454
|
-
<span data-slot="field-label">Email notifications</span>
|
|
455
|
-
</label>
|
|
456
|
-
<label class="ui-field" data-orientation="horizontal">
|
|
457
|
-
<input type="checkbox" role="switch" name="notifications-2fa" checked />
|
|
458
|
-
<span data-slot="field-label">Two-factor authentication</span>
|
|
459
|
-
</label>
|
|
460
|
-
</div>
|
|
461
|
-
</fieldset>
|
|
462
|
-
|
|
463
|
-
<div class="ui-field">
|
|
464
|
-
<label data-slot="field-label" for="f-volume">Volume</label>
|
|
465
|
-
<input
|
|
466
|
-
class="max-w-full"
|
|
467
|
-
id="f-volume"
|
|
468
|
-
type="range"
|
|
469
|
-
min="0"
|
|
470
|
-
max="100"
|
|
471
|
-
step="10"
|
|
472
|
-
value="50"
|
|
473
|
-
/>
|
|
474
|
-
</div>
|
|
475
|
-
</div>
|
|
476
|
-
</div>
|
|
477
|
-
|
|
478
|
-
<!-- Actions span both columns -->
|
|
479
|
-
<div class="flex items-center justify-end gap-xs">
|
|
480
|
-
<button class="ui-button" type="reset">Reset</button>
|
|
481
|
-
<button class="ui-button" data-variant="primary" type="submit">Create account</button>
|
|
482
|
-
</div>
|
|
483
|
-
</form>
|
|
484
|
-
</div>
|
|
485
|
-
</section>
|
|
486
|
-
</main>
|
|
487
|
-
|
|
488
|
-
<footer class="border-t" data-transition-layer="global-footer">
|
|
489
|
-
<div class="container py-xl">
|
|
490
|
-
<div class="flex items-center justify-between gap-md">
|
|
491
|
-
<div class="text-h6 font-black">Zazz tests</div>
|
|
492
|
-
<menu class="flex gap-sm">
|
|
493
|
-
<li><a class="ui-button" data-variant="link" href="about.html">About</a></li>
|
|
494
|
-
<li><a class="ui-button" data-variant="link" href="layout.html">Layout</a></li>
|
|
495
|
-
<li><a class="ui-button" data-variant="link" href="responsive.html">Responsive</a></li>
|
|
496
|
-
<li><a class="ui-button" data-variant="link" href="products.html">Products</a></li>
|
|
497
|
-
<li><a class="ui-button" data-variant="link" href="components.html">Components</a></li>
|
|
498
|
-
<li><a class="ui-button" data-variant="link" href="forms.html">Forms</a></li>
|
|
499
|
-
</menu>
|
|
500
|
-
</div>
|
|
501
|
-
</div>
|
|
502
|
-
</footer>
|
|
503
|
-
</body>
|
|
504
|
-
</html>
|