@zyncat/ui 0.13.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -157
- package/dist/alert.css +27 -34
- package/dist/alert.js +26 -17
- package/dist/alert.js.map +1 -1
- package/dist/avatar-group.js +2 -2
- package/dist/avatar-group.js.map +1 -1
- package/dist/avatar.css +53 -51
- package/dist/avatar.js +29 -7
- package/dist/avatar.js.map +1 -1
- package/dist/badge.css +31 -37
- package/dist/badge.js +1 -1
- package/dist/bloom-HV23M4AW.js +81 -0
- package/dist/bloom-HV23M4AW.js.map +1 -0
- package/dist/button.css +99 -118
- package/dist/button.js +3 -1
- package/dist/checkbox.css +28 -33
- package/dist/checkbox.js +2 -2
- package/dist/chunk-2YGHPQ66.js +16 -0
- package/dist/chunk-2YGHPQ66.js.map +1 -0
- package/dist/chunk-3MLUH2QL.js +53 -0
- package/dist/chunk-3MLUH2QL.js.map +1 -0
- package/dist/{chunk-RJFGWJ4W.js → chunk-3XRVPCIM.js} +6 -6
- package/dist/chunk-3XRVPCIM.js.map +1 -0
- package/dist/{chunk-FONOS5RN.js → chunk-4PQDVK23.js} +11 -10
- package/dist/chunk-4PQDVK23.js.map +1 -0
- package/dist/{chunk-45R4Z5XN.js → chunk-5VC3TUZ2.js} +4 -4
- package/dist/{chunk-45R4Z5XN.js.map → chunk-5VC3TUZ2.js.map} +1 -1
- package/dist/{chunk-A5WTZACK.js → chunk-5W5TKANX.js} +3 -3
- package/dist/{chunk-A5WTZACK.js.map → chunk-5W5TKANX.js.map} +1 -1
- package/dist/{chunk-227ZW4V7.js → chunk-6IXLW7QA.js} +11 -11
- package/dist/chunk-6IXLW7QA.js.map +1 -0
- package/dist/chunk-7NHY2CRA.js +132 -0
- package/dist/chunk-7NHY2CRA.js.map +1 -0
- package/dist/{chunk-EF6RPXU7.js → chunk-7VTWJL72.js} +43 -35
- package/dist/chunk-7VTWJL72.js.map +1 -0
- package/dist/chunk-7ZSIUUC3.js +50 -0
- package/dist/chunk-7ZSIUUC3.js.map +1 -0
- package/dist/{chunk-TYHR4VNM.js → chunk-AREEMG47.js} +10 -8
- package/dist/chunk-AREEMG47.js.map +1 -0
- package/dist/{chunk-DDRSMHN4.js → chunk-DH7DT6EO.js} +3 -3
- package/dist/{chunk-DDRSMHN4.js.map → chunk-DH7DT6EO.js.map} +1 -1
- package/dist/chunk-EOWWVFBF.js +14 -0
- package/dist/chunk-EOWWVFBF.js.map +1 -0
- package/dist/{chunk-5PZ43DCG.js → chunk-FLDIRXFU.js} +12 -13
- package/dist/chunk-FLDIRXFU.js.map +1 -0
- package/dist/{chunk-I45AU6KH.js → chunk-GGDAMIBH.js} +13 -7
- package/dist/chunk-GGDAMIBH.js.map +1 -0
- package/dist/{chunk-M43IOM5C.js → chunk-GWCBTD63.js} +3 -3
- package/dist/{chunk-M43IOM5C.js.map → chunk-GWCBTD63.js.map} +1 -1
- package/dist/chunk-GZ6UMHCK.js +103 -0
- package/dist/chunk-GZ6UMHCK.js.map +1 -0
- package/dist/chunk-H3X2263Y.js +17 -0
- package/dist/chunk-H3X2263Y.js.map +1 -0
- package/dist/{chunk-IJS7TPGV.js → chunk-HWDIVGME.js} +14 -7
- package/dist/chunk-HWDIVGME.js.map +1 -0
- package/dist/chunk-KSAJ6DED.js +16 -0
- package/dist/chunk-KSAJ6DED.js.map +1 -0
- package/dist/chunk-LH2UIEKN.js +42 -0
- package/dist/chunk-LH2UIEKN.js.map +1 -0
- package/dist/{chunk-JY6A2ZJZ.js → chunk-LNAV5E7S.js} +2 -2
- package/dist/{chunk-JY6A2ZJZ.js.map → chunk-LNAV5E7S.js.map} +1 -1
- package/dist/{chunk-CF4QHO4N.js → chunk-M2A6PZ7J.js} +10 -10
- package/dist/{chunk-CF4QHO4N.js.map → chunk-M2A6PZ7J.js.map} +1 -1
- package/dist/chunk-NYQQH4R5.js +40 -0
- package/dist/chunk-NYQQH4R5.js.map +1 -0
- package/dist/{chunk-TVYH4AN7.js → chunk-ODRO3KS6.js} +13 -13
- package/dist/chunk-ODRO3KS6.js.map +1 -0
- package/dist/chunk-PU3QWBEL.js +39 -0
- package/dist/chunk-PU3QWBEL.js.map +1 -0
- package/dist/{chunk-4BSHB7R3.js → chunk-QDAN43B6.js} +9 -9
- package/dist/chunk-QDAN43B6.js.map +1 -0
- package/dist/{chunk-XNIYSAMJ.js → chunk-RW2A4M2Q.js} +14 -9
- package/dist/chunk-RW2A4M2Q.js.map +1 -0
- package/dist/{chunk-TUTXXC3W.js → chunk-RY35IU3G.js} +3 -3
- package/dist/{chunk-TUTXXC3W.js.map → chunk-RY35IU3G.js.map} +1 -1
- package/dist/{chunk-EAI4POPB.js → chunk-TBLPZQSI.js} +56 -50
- package/dist/chunk-TBLPZQSI.js.map +1 -0
- package/dist/{chunk-AADAJL7D.js → chunk-UKPX3RIP.js} +8 -9
- package/dist/chunk-UKPX3RIP.js.map +1 -0
- package/dist/chunk-VDOBLABP.js +38 -0
- package/dist/chunk-VDOBLABP.js.map +1 -0
- package/dist/chunk-VNVVG47J.js +12 -0
- package/dist/chunk-VNVVG47J.js.map +1 -0
- package/dist/{chunk-4C5RZXBT.js → chunk-VZXML7EH.js} +8 -8
- package/dist/chunk-VZXML7EH.js.map +1 -0
- package/dist/{chunk-43M6GQ4Q.js → chunk-WC45VSST.js} +51 -32
- package/dist/chunk-WC45VSST.js.map +1 -0
- package/dist/{chunk-3MPF7FZV.js → chunk-WCWV5IX6.js} +3 -3
- package/dist/{chunk-3MPF7FZV.js.map → chunk-WCWV5IX6.js.map} +1 -1
- package/dist/chunk-WQKWPI6V.js +196 -0
- package/dist/chunk-WQKWPI6V.js.map +1 -0
- package/dist/{chunk-VAXCXZ53.js → chunk-WZUTBJC4.js} +5 -4
- package/dist/chunk-WZUTBJC4.js.map +1 -0
- package/dist/chunk-ZHMOH62S.js +101 -0
- package/dist/chunk-ZHMOH62S.js.map +1 -0
- package/dist/cli.js +356 -28
- package/dist/collapse.css +21 -33
- package/dist/collapse.js +1 -1
- package/dist/confetti.css +20 -13
- package/dist/confetti.js +7 -6
- package/dist/confetti.js.map +1 -1
- package/dist/count-badge.js +2 -2
- package/dist/date-field.js +22 -19
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +287 -185
- package/dist/date-range-field.js +75 -59
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +26 -23
- package/dist/datetime-field.js.map +1 -1
- package/dist/dialog.css +35 -44
- package/dist/dialog.js +23 -22
- package/dist/dialog.js.map +1 -1
- package/dist/digit-strip.css +17 -17
- package/dist/dropdown.css +37 -28
- package/dist/dropdown.js +77 -40
- package/dist/dropdown.js.map +1 -1
- package/dist/emoji-picker.js +44 -45
- package/dist/emoji-picker.js.map +1 -1
- package/dist/facebook-feed.css +146 -149
- package/dist/facebook-feed.js +106 -102
- package/dist/facebook-feed.js.map +1 -1
- package/dist/flow-field.css +9 -5
- package/dist/flow-field.js +8 -7
- package/dist/flow-field.js.map +1 -1
- package/dist/glide.js +4 -3
- package/dist/icon.css +8 -11
- package/dist/input.css +81 -86
- package/dist/instagram-feed.css +66 -67
- package/dist/instagram-feed.js +61 -44
- package/dist/instagram-feed.js.map +1 -1
- package/dist/lens.css +42 -39
- package/dist/lens.js +17 -16
- package/dist/lens.js.map +1 -1
- package/dist/mcp.js +4 -3
- package/dist/menu-surface.css +55 -35
- package/dist/modal.css +3 -5
- package/dist/modal.js +12 -11
- package/dist/modal.js.map +1 -1
- package/dist/morphing-text.css +27 -17
- package/dist/morphing-text.js +14 -13
- package/dist/morphing-text.js.map +1 -1
- package/dist/motion-devtools.css +118 -69
- package/dist/motion-devtools.js +230 -65
- package/dist/motion-devtools.js.map +1 -1
- package/dist/motion-tokens.js +1 -1
- package/dist/multi-select.js +21 -16
- package/dist/multi-select.js.map +1 -1
- package/dist/number-field.js +15 -15
- package/dist/number-field.js.map +1 -1
- package/dist/odometer.css +23 -17
- package/dist/odometer.js +12 -11
- package/dist/odometer.js.map +1 -1
- package/dist/otp-field.js +3 -3
- package/dist/otp-field.js.map +1 -1
- package/dist/overlay.css +5 -10
- package/dist/pagination.css +11 -16
- package/dist/pagination.js +13 -10
- package/dist/pagination.js.map +1 -1
- package/dist/paint-CJQCM6ZO.js +260 -0
- package/dist/paint-CJQCM6ZO.js.map +1 -0
- package/dist/popover.css +14 -16
- package/dist/popover.js +10 -9
- package/dist/radio-group.css +65 -76
- package/dist/radio-group.js +30 -29
- package/dist/radio-group.js.map +1 -1
- package/dist/select.css +67 -76
- package/dist/select.js +19 -14
- package/dist/select.js.map +1 -1
- package/dist/sheet.css +13 -15
- package/dist/sheet.js +11 -10
- package/dist/spinner.css +115 -0
- package/dist/spinner.js +4 -0
- package/dist/spinner.js.map +1 -0
- package/dist/status-badge.js +9 -9
- package/dist/status-badge.js.map +1 -1
- package/dist/styles.css +35 -35
- package/dist/support-rail.css +110 -256
- package/dist/support-rail.js +116 -123
- package/dist/support-rail.js.map +1 -1
- package/dist/table.css +77 -85
- package/dist/table.js +44 -41
- package/dist/table.js.map +1 -1
- package/dist/tabs.css +81 -93
- package/dist/tabs.js +23 -20
- package/dist/tabs.js.map +1 -1
- package/dist/tag.css +49 -54
- package/dist/tag.js +13 -12
- package/dist/tag.js.map +1 -1
- package/dist/text-field.js +5 -5
- package/dist/textarea.css +47 -50
- package/dist/textarea.js +16 -16
- package/dist/textarea.js.map +1 -1
- package/dist/theme-grid.js +11 -0
- package/dist/theme-grid.js.map +1 -0
- package/dist/theme-switcher.css +107 -0
- package/dist/theme-switcher.js +70 -0
- package/dist/theme-switcher.js.map +1 -0
- package/dist/theme-transition-LLC644ZR.js +346 -0
- package/dist/theme-transition-LLC644ZR.js.map +1 -0
- package/dist/theme-transition.css +48 -0
- package/dist/theme.js +74 -27
- package/dist/theme.js.map +1 -1
- package/dist/tide-DJZMDAFT.js +57 -0
- package/dist/tide-DJZMDAFT.js.map +1 -0
- package/dist/tiktok.css +114 -119
- package/dist/tiktok.js +53 -52
- package/dist/tiktok.js.map +1 -1
- package/dist/time-field.js +26 -20
- package/dist/time-field.js.map +1 -1
- package/dist/toast-store.js +2 -1
- package/dist/toast.css +51 -79
- package/dist/toast.js +34 -26
- package/dist/toast.js.map +1 -1
- package/dist/toggle-tag.js +23 -14
- package/dist/toggle-tag.js.map +1 -1
- package/dist/toggle.css +27 -32
- package/dist/toggle.js +7 -7
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.css +17 -24
- package/dist/tooltip.js +117 -95
- package/dist/tooltip.js.map +1 -1
- package/dist/trigger.css +4 -4
- package/dist/types/components/composites/alert/Alert.d.ts +1 -2
- package/dist/types/components/composites/date-picker/TimeField.d.ts +1 -2
- package/dist/types/components/composites/date-picker/field-shell.d.ts +1 -1
- package/dist/types/components/composites/date-picker/month-jump.d.ts +11 -0
- package/dist/types/components/composites/date-picker/time-core.d.ts +1 -2
- package/dist/types/components/composites/dropdown/Dropdown.d.ts +9 -1
- package/dist/types/components/composites/dropdown/types.d.ts +14 -0
- package/dist/types/components/composites/emoji-picker/EmojiPickerPanel.d.ts +1 -1
- package/dist/types/components/composites/emoji-picker/data.d.ts +2 -5
- package/dist/types/components/composites/emoji-picker/react/useEmojiPicker.d.ts +0 -11
- package/dist/types/components/composites/emoji-picker/types.d.ts +3 -8
- package/dist/types/components/composites/select/MultiSelect.d.ts +6 -1
- package/dist/types/components/composites/select/Select.d.ts +6 -1
- package/dist/types/components/composites/select/core/index.d.ts +1 -1
- package/dist/types/components/composites/select/core/menu.d.ts +3 -3
- package/dist/types/components/composites/select/core/panel.d.ts +3 -3
- package/dist/types/components/composites/tabs/Tabs.d.ts +7 -10
- package/dist/types/components/composites/theme-switcher/ThemeGrid.d.ts +20 -0
- package/dist/types/components/composites/theme-switcher/ThemeSwitcher.d.ts +24 -0
- package/dist/types/components/composites/toast/Toast.d.ts +1 -1
- package/dist/types/components/composites/tooltip/Tooltip.d.ts +9 -1
- package/dist/types/components/composites/tooltip/tooltip-store.d.ts +5 -6
- package/dist/types/components/compound/support-rail/SupportRail.d.ts +10 -8
- package/dist/types/components/dev/MotionDevtools.d.ts +12 -5
- package/dist/types/components/expressive/theme-transition/bloom.d.ts +2 -0
- package/dist/types/components/expressive/theme-transition/paint.d.ts +2 -0
- package/dist/types/components/expressive/theme-transition/scene.d.ts +24 -0
- package/dist/types/components/expressive/theme-transition/theme-transition.d.ts +19 -0
- package/dist/types/components/expressive/theme-transition/tide.d.ts +2 -0
- package/dist/types/components/internal/hooks/use-host-election.d.ts +8 -0
- package/dist/types/components/internal/icon/Icon.d.ts +2 -3
- package/dist/types/components/internal/menu/highlight.d.ts +7 -0
- package/dist/types/components/internal/utils/activation.d.ts +0 -4
- package/dist/types/components/primitives/avatar/Avatar.d.ts +1 -1
- package/dist/types/components/primitives/button/Button.d.ts +10 -13
- package/dist/types/components/primitives/button/button-style.d.ts +15 -0
- package/dist/types/components/primitives/input/TextField.d.ts +1 -2
- package/dist/types/components/primitives/spinner/Spinner.d.ts +27 -0
- package/dist/types/components/primitives/textarea/Textarea.d.ts +0 -1
- package/dist/types/engine/animate.d.ts +1 -0
- package/dist/types/shared-slot.d.ts +1 -0
- package/dist/types/tokens/component-styles.generated.d.ts +80 -155
- package/dist/types/tokens/motion-defaults.generated.d.ts +34 -0
- package/dist/types/tokens/motion-scale.d.ts +2 -2
- package/dist/types/tokens/motion-tokens.d.ts +7 -0
- package/dist/types/tokens/theme-store.d.ts +47 -0
- package/dist/types/tokens/theme-sync.d.ts +9 -0
- package/dist/types/tokens/theme-tokens.generated.d.ts +693 -1117
- package/dist/types/tokens/theme.d.ts +28 -5
- package/dist/typing-lines.css +18 -11
- package/dist/typing-lines.js +9 -8
- package/dist/typing-lines.js.map +1 -1
- package/dist/weight-field.css +32 -18
- package/dist/weight-field.js +4 -4
- package/dist/weight-field.js.map +1 -1
- package/dist/youtube.css +91 -97
- package/dist/youtube.js +87 -86
- package/dist/youtube.js.map +1 -1
- package/package.json +27 -31
- package/skills/zyncat-ui/SKILL.md +5 -3
- package/skills/zyncat-ui/references/components.md +7 -4
- package/skills/zyncat-ui/references/theming.md +105 -34
- package/src/components/composites/alert/Alert.tsx +15 -12
- package/src/components/composites/alert/alert.css +27 -34
- package/src/components/composites/date-picker/DateField.tsx +1 -1
- package/src/components/composites/date-picker/DateRangeField.tsx +1 -1
- package/src/components/composites/date-picker/DateTimeField.tsx +4 -4
- package/src/components/composites/date-picker/TimeField.tsx +8 -5
- package/src/components/composites/date-picker/calendar-panel.tsx +33 -22
- package/src/components/composites/date-picker/date-picker.css +287 -185
- package/src/components/composites/date-picker/field-shell.tsx +7 -7
- package/src/components/composites/date-picker/month-jump.tsx +192 -0
- package/src/components/composites/date-picker/range-panel.tsx +51 -36
- package/src/components/composites/date-picker/time-core.tsx +4 -6
- package/src/components/composites/date-picker/use-day-focus.ts +1 -1
- package/src/components/composites/dialog/Dialog.tsx +11 -11
- package/src/components/composites/dialog/dialog.css +35 -44
- package/src/components/composites/dropdown/Dropdown.tsx +15 -2
- package/src/components/composites/dropdown/Dropdown.usage.md +7 -4
- package/src/components/composites/dropdown/dropdown.css +37 -28
- package/src/components/composites/dropdown/menu-panel.tsx +56 -27
- package/src/components/composites/dropdown/types.ts +28 -6
- package/src/components/composites/emoji-picker/EmojiPickerPanel.tsx +5 -4
- package/src/components/composites/emoji-picker/EmojiPickerPanel.usage.md +4 -4
- package/src/components/composites/emoji-picker/data.ts +2 -5
- package/src/components/composites/emoji-picker/dom.ts +6 -6
- package/src/components/composites/emoji-picker/react/category-bar.tsx +6 -6
- package/src/components/composites/emoji-picker/react/useEmojiPicker.ts +0 -11
- package/src/components/composites/emoji-picker/scaffold.ts +7 -7
- package/src/components/composites/emoji-picker/search.ts +0 -7
- package/src/components/composites/emoji-picker/styles.css +35 -35
- package/src/components/composites/emoji-picker/types.ts +3 -8
- package/src/components/composites/modal/Modal.tsx +2 -2
- package/src/components/composites/modal/modal.css +3 -5
- package/src/components/composites/pagination/Pagination.tsx +7 -7
- package/src/components/composites/pagination/pagination.css +11 -16
- package/src/components/composites/popover/Popover.tsx +2 -2
- package/src/components/composites/popover/popover.css +14 -16
- package/src/components/composites/select/MultiSelect.tsx +11 -2
- package/src/components/composites/select/MultiSelect.usage.md +2 -1
- package/src/components/composites/select/Select.tsx +10 -1
- package/src/components/composites/select/Select.usage.md +2 -1
- package/src/components/composites/select/core/index.ts +1 -1
- package/src/components/composites/select/core/menu.tsx +19 -4
- package/src/components/composites/select/core/panel.tsx +19 -15
- package/src/components/composites/select/core/trigger.tsx +5 -5
- package/src/components/composites/select/select.css +67 -76
- package/src/components/composites/sheet/Sheet.tsx +2 -2
- package/src/components/composites/sheet/sheet.css +13 -15
- package/src/components/composites/sheet/use-sheet-drag.ts +1 -1
- package/src/components/composites/table/Table.tsx +35 -35
- package/src/components/composites/table/table.css +77 -85
- package/src/components/composites/tabs/Tabs.tsx +20 -21
- package/src/components/composites/tabs/Tabs.usage.md +3 -2
- package/src/components/composites/tabs/tabs.css +81 -93
- package/src/components/composites/theme-switcher/ThemeGrid.tsx +133 -0
- package/src/components/composites/theme-switcher/ThemeGrid.usage.md +20 -0
- package/src/components/composites/theme-switcher/ThemeSwitcher.tsx +75 -0
- package/src/components/composites/theme-switcher/ThemeSwitcher.usage.md +21 -0
- package/src/components/composites/theme-switcher/theme-switcher.css +107 -0
- package/src/components/composites/toast/Toast.tsx +24 -18
- package/src/components/composites/toast/toast-store.ts +8 -6
- package/src/components/composites/toast/toast.css +51 -79
- package/src/components/composites/tooltip/Tooltip.tsx +40 -19
- package/src/components/composites/tooltip/Tooltip.usage.md +9 -1
- package/src/components/composites/tooltip/tooltip-host.tsx +55 -23
- package/src/components/composites/tooltip/tooltip-store.ts +36 -53
- package/src/components/composites/tooltip/tooltip.css +17 -24
- package/src/components/compound/support-rail/SupportRail.tsx +132 -144
- package/src/components/compound/support-rail/SupportRail.usage.md +7 -6
- package/src/components/compound/support-rail/support-rail.css +110 -256
- package/src/components/dev/MotionDevtools.tsx +272 -51
- package/src/components/dev/MotionDevtools.usage.md +12 -4
- package/src/components/dev/motion-devtools.css +118 -69
- package/src/components/dev/slowmo-engine.ts +16 -15
- package/src/components/expressive/confetti/Confetti.tsx +4 -4
- package/src/components/expressive/confetti/confetti.css +20 -13
- package/src/components/expressive/facebook-feed/chrome.tsx +2 -2
- package/src/components/expressive/facebook-feed/facebook-feed.css +146 -149
- package/src/components/expressive/facebook-feed/post.tsx +39 -39
- package/src/components/expressive/facebook-feed/reel.tsx +41 -37
- package/src/components/expressive/facebook-feed/story.tsx +27 -27
- package/src/components/expressive/flow-field/FlowField.tsx +5 -5
- package/src/components/expressive/flow-field/flow-field.css +9 -5
- package/src/components/expressive/instagram-feed/InstagramFeed.tsx +52 -44
- package/src/components/expressive/instagram-feed/instagram-feed.css +66 -67
- package/src/components/expressive/lens/Lens.tsx +14 -14
- package/src/components/expressive/lens/lens.css +42 -39
- package/src/components/expressive/morphing-text/MorphingText.tsx +12 -13
- package/src/components/expressive/morphing-text/morphing-text.css +27 -17
- package/src/components/expressive/odometer/Odometer.tsx +9 -9
- package/src/components/expressive/odometer/odometer.css +23 -17
- package/src/components/expressive/theme-transition/bloom.ts +88 -0
- package/src/components/expressive/theme-transition/paint.ts +296 -0
- package/src/components/expressive/theme-transition/scene.ts +38 -0
- package/src/components/expressive/theme-transition/theme-transition.css +48 -0
- package/src/components/expressive/theme-transition/theme-transition.ts +423 -0
- package/src/components/expressive/theme-transition/tide.ts +65 -0
- package/src/components/expressive/tiktok/TikTok.tsx +54 -54
- package/src/components/expressive/tiktok/tiktok.css +114 -119
- package/src/components/expressive/typing-lines/TypingLines.tsx +0 -0
- package/src/components/expressive/typing-lines/typing-lines.css +18 -11
- package/src/components/expressive/weight-field/WeightField.tsx +4 -4
- package/src/components/expressive/weight-field/weight-field.css +32 -18
- package/src/components/expressive/youtube/YouTube.tsx +4 -4
- package/src/components/expressive/youtube/glyphs.tsx +16 -16
- package/src/components/expressive/youtube/media.tsx +3 -3
- package/src/components/expressive/youtube/post.tsx +28 -28
- package/src/components/expressive/youtube/short.tsx +25 -25
- package/src/components/expressive/youtube/video.tsx +13 -13
- package/src/components/expressive/youtube/youtube.css +91 -97
- package/src/components/internal/glass/glass.css +20 -23
- package/src/components/internal/glass/glint.ts +3 -3
- package/src/components/internal/hooks/use-host-election.ts +46 -0
- package/src/components/internal/icon/Icon.tsx +3 -5
- package/src/components/internal/icon/IconSlot.tsx +1 -1
- package/src/components/internal/icon/icon.css +8 -11
- package/src/components/internal/menu/highlight.ts +12 -0
- package/src/components/internal/menu/menu-row.tsx +5 -5
- package/src/components/internal/menu/menu-surface.css +55 -35
- package/src/components/internal/overlay/layer.tsx +2 -1
- package/src/components/internal/overlay/modal.tsx +5 -4
- package/src/components/internal/overlay/overlay.css +5 -10
- package/src/components/internal/overlay/trigger.css +4 -4
- package/src/components/internal/utils/activation.ts +0 -4
- package/src/components/primitives/avatar/Avatar.tsx +24 -8
- package/src/components/primitives/avatar/AvatarGroup.tsx +4 -4
- package/src/components/primitives/avatar/avatar.css +53 -51
- package/src/components/primitives/badge/Badge.tsx +9 -9
- package/src/components/primitives/badge/StatusBadge.tsx +7 -7
- package/src/components/primitives/badge/badge.css +31 -37
- package/src/components/primitives/badge/digit-strip.css +17 -17
- package/src/components/primitives/badge/digit-strip.tsx +4 -4
- package/src/components/primitives/button/Button.tsx +14 -28
- package/src/components/primitives/button/button-style.ts +28 -0
- package/src/components/primitives/button/button.css +99 -118
- package/src/components/primitives/checkbox/Checkbox.tsx +10 -4
- package/src/components/primitives/checkbox/check-glyph.tsx +5 -5
- package/src/components/primitives/checkbox/checkbox.css +28 -33
- package/src/components/primitives/collapse/Collapse.tsx +2 -2
- package/src/components/primitives/collapse/collapse.css +21 -33
- package/src/components/primitives/collapse/collapse.typecheck.tsx +1 -1
- package/src/components/primitives/input/NumberField.tsx +11 -11
- package/src/components/primitives/input/OtpField.tsx +3 -3
- package/src/components/primitives/input/TextField.tsx +9 -10
- package/src/components/primitives/input/field-chrome.tsx +6 -6
- package/src/components/primitives/input/input.css +81 -86
- package/src/components/primitives/radio-group/RadioGroup.tsx +23 -23
- package/src/components/primitives/radio-group/radio-group.css +65 -76
- package/src/components/primitives/spinner/Spinner.tsx +70 -0
- package/src/components/primitives/spinner/Spinner.usage.md +19 -0
- package/src/components/primitives/spinner/spinner.css +115 -0
- package/src/components/primitives/tag/Tag.tsx +5 -5
- package/src/components/primitives/tag/ToggleTag.tsx +11 -6
- package/src/components/primitives/tag/tag.css +49 -54
- package/src/components/primitives/textarea/Textarea.tsx +13 -14
- package/src/components/primitives/textarea/textarea.css +47 -50
- package/src/components/primitives/toggle/Toggle.tsx +7 -7
- package/src/components/primitives/toggle/toggle.css +27 -32
- package/src/engine/animate.ts +12 -3
- package/src/engine/flip.ts +2 -1
- package/src/mcp/server.ts +5 -2
- package/src/motion/flip.ts +7 -8
- package/src/motion/glide.tsx +41 -26
- package/src/shared-slot.ts +10 -0
- package/src/styles.css +8 -16
- package/src/tokens/base.css +15 -0
- package/src/tokens/color.css +22 -63
- package/src/tokens/component-styles.generated.ts +81 -155
- package/src/tokens/dark.css +58 -0
- package/src/tokens/decisions.css +23 -0
- package/src/tokens/elevation.css +65 -23
- package/src/tokens/fonts.css +0 -2
- package/src/tokens/glass.css +17 -10
- package/src/tokens/motion-defaults.generated.ts +21 -0
- package/src/tokens/motion-scale.ts +2 -2
- package/src/tokens/motion-tokens.ts +65 -40
- package/src/tokens/motion-tokens.usage.md +5 -2
- package/src/tokens/motion.css +18 -28
- package/src/tokens/radius.css +12 -10
- package/src/tokens/reset.css +36 -0
- package/src/tokens/semantic.css +51 -39
- package/src/tokens/spacing.css +6 -7
- package/src/tokens/theme-store.ts +187 -0
- package/src/tokens/theme-sync.tsx +62 -0
- package/src/tokens/theme-tokens.generated.ts +708 -1121
- package/src/tokens/theme.tsx +116 -38
- package/src/tokens/theme.usage.md +26 -19
- package/src/tokens/typography.css +18 -20
- package/tailwind.css +187 -0
- package/dist/chunk-227ZW4V7.js.map +0 -1
- package/dist/chunk-43M6GQ4Q.js.map +0 -1
- package/dist/chunk-4BSHB7R3.js.map +0 -1
- package/dist/chunk-4C5RZXBT.js.map +0 -1
- package/dist/chunk-5PZ43DCG.js.map +0 -1
- package/dist/chunk-7IZJERGA.js +0 -80
- package/dist/chunk-7IZJERGA.js.map +0 -1
- package/dist/chunk-AADAJL7D.js.map +0 -1
- package/dist/chunk-CNWTIMIP.js +0 -39
- package/dist/chunk-CNWTIMIP.js.map +0 -1
- package/dist/chunk-EAI4POPB.js.map +0 -1
- package/dist/chunk-EF6RPXU7.js.map +0 -1
- package/dist/chunk-FONOS5RN.js.map +0 -1
- package/dist/chunk-FQEHSKEI.js +0 -38
- package/dist/chunk-FQEHSKEI.js.map +0 -1
- package/dist/chunk-HY5MPISE.js +0 -52
- package/dist/chunk-HY5MPISE.js.map +0 -1
- package/dist/chunk-I45AU6KH.js.map +0 -1
- package/dist/chunk-IJS7TPGV.js.map +0 -1
- package/dist/chunk-OWNMRMPN.js +0 -14
- package/dist/chunk-OWNMRMPN.js.map +0 -1
- package/dist/chunk-RJFGWJ4W.js.map +0 -1
- package/dist/chunk-TCUCYFT7.js +0 -25
- package/dist/chunk-TCUCYFT7.js.map +0 -1
- package/dist/chunk-TVYH4AN7.js.map +0 -1
- package/dist/chunk-TYHR4VNM.js.map +0 -1
- package/dist/chunk-VAXCXZ53.js.map +0 -1
- package/dist/chunk-XNIYSAMJ.js.map +0 -1
- package/dist/chunk-Y2YA7QRF.js +0 -17
- package/dist/chunk-Y2YA7QRF.js.map +0 -1
- package/src/tokens/avatar.css +0 -24
- package/src/tokens/icons.css +0 -11
- package/src/tokens/layers.css +0 -11
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.components {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
--cbx-fill: linear-gradient(180deg, var(--accent), var(--accent-hover));
|
|
8
|
-
--cbx-on: var(--accent);
|
|
4
|
+
.zc-cbx {
|
|
5
|
+
--cbx-fill: linear-gradient(180deg, var(--accent-fill), var(--accent-hover));
|
|
6
|
+
--cbx-on: var(--accent-fill);
|
|
9
7
|
--cbx-off: var(--border-strong);
|
|
10
8
|
--cbx-ring: var(--ring-accent);
|
|
11
9
|
--cbx-size: var(--control-box);
|
|
12
10
|
--cbx-radius: var(--radius-sm);
|
|
13
|
-
--cbx-tick-len: 14px; /*
|
|
11
|
+
--cbx-tick-len: 14px; /* the tick path's length, with a unit so the calc() dashoffset is a <length> */
|
|
14
12
|
--cbx-checked: 0;
|
|
15
13
|
--cbx-tick: 0;
|
|
16
14
|
--cbx-dash: 0;
|
|
@@ -25,7 +23,6 @@
|
|
|
25
23
|
-webkit-tap-highlight-color: transparent;
|
|
26
24
|
transition: background-color var(--duration-base) var(--ease-standard);
|
|
27
25
|
|
|
28
|
-
/* later rule wins, so indeterminate beats checked */
|
|
29
26
|
&:has(:checked) {
|
|
30
27
|
--cbx-checked: 1;
|
|
31
28
|
--cbx-tick: 1;
|
|
@@ -36,22 +33,21 @@
|
|
|
36
33
|
--cbx-dash: 1;
|
|
37
34
|
}
|
|
38
35
|
|
|
39
|
-
&:not(.cbx--disabled):hover {
|
|
36
|
+
&:not(.zc-cbx--disabled):hover {
|
|
40
37
|
background: var(--neutral-wash);
|
|
41
38
|
}
|
|
42
|
-
|
|
43
|
-
&:not(.cbx--disabled):hover:not(:has(:checked, :indeterminate)) {
|
|
39
|
+
&:not(.zc-cbx--disabled):hover:not(:has(:checked, :indeterminate)) {
|
|
44
40
|
--cbx-off: var(--cbx-on);
|
|
45
41
|
}
|
|
46
|
-
&:not(.cbx--disabled):active {
|
|
42
|
+
&:not(.zc-cbx--disabled):active {
|
|
47
43
|
--cbx-press: 0.88;
|
|
48
44
|
}
|
|
49
|
-
&:has(:focus-visible) .cbx__box {
|
|
50
|
-
|
|
45
|
+
&:has(:focus-visible) .zc-cbx__box {
|
|
46
|
+
outline: var(--cbx-ring);
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
49
|
|
|
54
|
-
.cbx__input {
|
|
50
|
+
.zc-cbx__input {
|
|
55
51
|
position: absolute;
|
|
56
52
|
width: 1px;
|
|
57
53
|
height: 1px;
|
|
@@ -64,7 +60,7 @@
|
|
|
64
60
|
overflow: hidden;
|
|
65
61
|
}
|
|
66
62
|
|
|
67
|
-
.cbx__box {
|
|
63
|
+
.zc-cbx__box {
|
|
68
64
|
position: relative;
|
|
69
65
|
flex: none;
|
|
70
66
|
display: grid;
|
|
@@ -81,6 +77,7 @@
|
|
|
81
77
|
border-color var(--duration-fast) var(--ease-standard),
|
|
82
78
|
background-color var(--duration-fast) var(--ease-standard),
|
|
83
79
|
box-shadow var(--duration-fast) var(--ease-standard),
|
|
80
|
+
outline-color var(--duration-fast) var(--ease-standard),
|
|
84
81
|
transform var(--duration-base) var(--ease-spring);
|
|
85
82
|
|
|
86
83
|
&::before {
|
|
@@ -88,7 +85,6 @@
|
|
|
88
85
|
position: absolute;
|
|
89
86
|
inset: 0;
|
|
90
87
|
|
|
91
|
-
/* inner corner = outer radius - border, so the fill reaches the corners (no --bg-inset showing) */
|
|
92
88
|
border-radius: calc(var(--cbx-radius) - var(--border-hairline));
|
|
93
89
|
background: var(--cbx-fill);
|
|
94
90
|
opacity: var(--cbx-checked);
|
|
@@ -97,10 +93,10 @@
|
|
|
97
93
|
transform var(--duration-base) var(--ease-spring),
|
|
98
94
|
opacity var(--duration-fast) var(--ease-standard);
|
|
99
95
|
}
|
|
96
|
+
outline: var(--ring-rest);
|
|
100
97
|
}
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
.cbx__mark {
|
|
99
|
+
.zc-cbx__mark {
|
|
104
100
|
position: relative;
|
|
105
101
|
display: block;
|
|
106
102
|
width: 100%;
|
|
@@ -108,7 +104,7 @@
|
|
|
108
104
|
color: var(--text-on-accent);
|
|
109
105
|
pointer-events: none;
|
|
110
106
|
}
|
|
111
|
-
.cbx__tick {
|
|
107
|
+
.zc-cbx__tick {
|
|
112
108
|
fill: none;
|
|
113
109
|
stroke: currentColor;
|
|
114
110
|
stroke-width: 2;
|
|
@@ -119,7 +115,7 @@
|
|
|
119
115
|
transition: stroke-dashoffset var(--duration-base) var(--ease-entrance) calc(var(--cbx-tick) * var(--duration-fast));
|
|
120
116
|
}
|
|
121
117
|
|
|
122
|
-
.cbx__dash {
|
|
118
|
+
.zc-cbx__dash {
|
|
123
119
|
position: absolute;
|
|
124
120
|
width: 56%;
|
|
125
121
|
height: 2px;
|
|
@@ -133,49 +129,48 @@
|
|
|
133
129
|
opacity var(--duration-fast) var(--ease-standard);
|
|
134
130
|
}
|
|
135
131
|
|
|
136
|
-
.cbx__text {
|
|
132
|
+
.zc-cbx__text {
|
|
137
133
|
display: grid;
|
|
138
134
|
gap: var(--space-1);
|
|
139
135
|
}
|
|
140
|
-
.cbx__label {
|
|
136
|
+
.zc-cbx__label {
|
|
141
137
|
font: var(--type-label);
|
|
142
138
|
color: var(--text-strong);
|
|
143
139
|
}
|
|
144
|
-
.cbx__desc {
|
|
140
|
+
.zc-cbx__desc {
|
|
145
141
|
font: var(--type-caption);
|
|
146
142
|
color: var(--text-muted);
|
|
147
143
|
}
|
|
148
144
|
|
|
149
|
-
.cbx--sm {
|
|
145
|
+
.zc-cbx--sm {
|
|
150
146
|
--cbx-size: var(--space-4);
|
|
151
|
-
& .cbx__label {
|
|
147
|
+
& .zc-cbx__label {
|
|
152
148
|
font: var(--type-caption);
|
|
153
149
|
font-weight: var(--weight-medium);
|
|
154
150
|
color: var(--text-strong);
|
|
155
151
|
}
|
|
156
|
-
& .cbx__box {
|
|
152
|
+
& .zc-cbx__box {
|
|
157
153
|
margin-top: calc((var(--leading-caption) - var(--cbx-size)) / 2);
|
|
158
154
|
}
|
|
159
155
|
}
|
|
160
156
|
|
|
161
|
-
.cbx--error {
|
|
157
|
+
.zc-cbx--error {
|
|
162
158
|
--cbx-fill: linear-gradient(180deg, var(--danger), var(--danger));
|
|
163
159
|
--cbx-on: var(--danger);
|
|
164
160
|
--cbx-off: var(--danger);
|
|
165
161
|
--cbx-ring: var(--ring-danger);
|
|
166
162
|
}
|
|
167
163
|
|
|
168
|
-
|
|
169
|
-
.cbx--disabled {
|
|
164
|
+
.zc-cbx--disabled {
|
|
170
165
|
cursor: not-allowed;
|
|
171
166
|
--cbx-fill: var(--border-strong);
|
|
172
167
|
--cbx-on: var(--border-default);
|
|
173
168
|
--cbx-off: var(--border-subtle);
|
|
174
|
-
& .cbx__box {
|
|
169
|
+
& .zc-cbx__box {
|
|
175
170
|
background: var(--bg-muted);
|
|
176
171
|
}
|
|
177
|
-
& .cbx__label,
|
|
178
|
-
& .cbx__desc {
|
|
172
|
+
& .zc-cbx__label,
|
|
173
|
+
& .zc-cbx__desc {
|
|
179
174
|
color: var(--text-disabled);
|
|
180
175
|
}
|
|
181
176
|
}
|
|
@@ -68,7 +68,7 @@ export function Collapse({
|
|
|
68
68
|
as: As = 'div',
|
|
69
69
|
htmlProps,
|
|
70
70
|
}: CollapseProps) {
|
|
71
|
-
const cls = cx('collapse', fade && 'collapse--fade', className);
|
|
71
|
+
const cls = cx('zc-collapse', fade && 'zc-collapse--fade', className);
|
|
72
72
|
|
|
73
73
|
const vars = timingVars('collapse', animation);
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ export function Collapse({
|
|
|
80
80
|
style={vars || style ? ({ ...style, ...vars } as CSSProperties) : undefined}
|
|
81
81
|
{...htmlProps}
|
|
82
82
|
>
|
|
83
|
-
<As className={cx('collapse__inner', innerClassName)} style={vars}>
|
|
83
|
+
<As className={cx('zc-collapse__inner', innerClassName)} style={vars}>
|
|
84
84
|
{children}
|
|
85
85
|
</As>
|
|
86
86
|
</div>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
|
+
/* Registered non-inheriting so a Collapse's inline timing never leaks into a Collapse nested
|
|
4
|
+
inside it; unset, they resolve invalid and the var() fallbacks supply the defaults. */
|
|
3
5
|
@property --collapse-dur-open {
|
|
4
6
|
syntax: '*';
|
|
5
7
|
inherits: false;
|
|
@@ -18,23 +20,7 @@
|
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
@layer zyncat.components {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Closed content leaves the page semantics, not just the paint: the root turns
|
|
24
|
-
visibility:hidden, dropping children out of the tab order, the accessibility tree and
|
|
25
|
-
hit-testing. The flip is directional by construction. Closing lists visibility with a
|
|
26
|
-
delay equal to the size duration, so removal lands only after the exit finishes and
|
|
27
|
-
nothing pops. Opening omits visibility from its transition list entirely, so content is
|
|
28
|
-
focusable the same frame it opens, before the entrance runs. The delay rides the duration
|
|
29
|
-
tokens, so the global reduced-motion collapse (~1ms) applies to it as well. The open state
|
|
30
|
-
deliberately declares no `visibility: visible` - it inherits instead, so a Collapse nested
|
|
31
|
-
inside a closed ancestor cannot poke a focusable hole through it. */
|
|
32
|
-
|
|
33
|
-
/* Timing overrides - set inline by Collapse.tsx from the token-typed duration/ease props.
|
|
34
|
-
Registered non-inheriting so one Collapse's timing can never leak into a Collapse nested
|
|
35
|
-
inside it; where unset they resolve invalid and the var() fallbacks supply the defaults. */
|
|
36
|
-
|
|
37
|
-
.collapse {
|
|
23
|
+
.zc-collapse {
|
|
38
24
|
--collapse-fade-stagger: 60ms;
|
|
39
25
|
|
|
40
26
|
display: grid;
|
|
@@ -46,10 +32,11 @@
|
|
|
46
32
|
var(--collapse-ease-close, var(--ease-entrance)),
|
|
47
33
|
visibility 0s linear var(--collapse-dur-close, var(--duration-slow));
|
|
48
34
|
}
|
|
49
|
-
.collapse[data-open='false'] {
|
|
35
|
+
.zc-collapse[data-open='false'] {
|
|
50
36
|
visibility: hidden;
|
|
51
37
|
}
|
|
52
|
-
|
|
38
|
+
/* No visibility: visible here - inheriting it would reveal a Collapse nested under a closed one. */
|
|
39
|
+
.zc-collapse[data-open='true'] {
|
|
53
40
|
grid-template-rows: 1fr;
|
|
54
41
|
transition:
|
|
55
42
|
grid-template-rows var(--collapse-dur-open, var(--duration-slow)) var(--collapse-ease-open, var(--ease-entrance)),
|
|
@@ -57,40 +44,41 @@
|
|
|
57
44
|
var(--collapse-ease-open, var(--ease-entrance));
|
|
58
45
|
}
|
|
59
46
|
|
|
60
|
-
.collapse[data-axis='width'] {
|
|
47
|
+
.zc-collapse[data-axis='width'] {
|
|
61
48
|
grid-template-rows: 1fr;
|
|
62
49
|
grid-template-columns: 0fr;
|
|
63
50
|
}
|
|
64
|
-
.collapse[data-axis='width'][data-open='true'] {
|
|
51
|
+
.zc-collapse[data-axis='width'][data-open='true'] {
|
|
65
52
|
grid-template-columns: 1fr;
|
|
66
53
|
}
|
|
67
54
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
overflow:
|
|
55
|
+
.zc-collapse__inner {
|
|
56
|
+
overflow-x: visible;
|
|
57
|
+
overflow-y: clip;
|
|
71
58
|
min-height: 0;
|
|
72
59
|
min-width: 0;
|
|
73
60
|
}
|
|
61
|
+
.zc-collapse[data-axis='width'] .zc-collapse__inner {
|
|
62
|
+
overflow-x: clip;
|
|
63
|
+
overflow-y: visible;
|
|
64
|
+
}
|
|
74
65
|
|
|
75
|
-
.collapse--fade .collapse__inner {
|
|
66
|
+
.zc-collapse--fade .zc-collapse__inner {
|
|
76
67
|
opacity: 0;
|
|
77
68
|
transition: opacity var(--collapse-dur-close, var(--duration-base)) var(--collapse-ease-close, var(--ease-standard));
|
|
78
69
|
}
|
|
79
|
-
.collapse--fade[data-open='true'] .collapse__inner {
|
|
70
|
+
.zc-collapse--fade[data-open='true'] .zc-collapse__inner {
|
|
80
71
|
opacity: 1;
|
|
81
|
-
/* fade in slightly after the size opens */
|
|
82
72
|
transition: opacity var(--collapse-dur-open, var(--duration-slow)) var(--collapse-ease-open, var(--ease-entrance))
|
|
83
73
|
var(--collapse-fade-stagger);
|
|
84
74
|
}
|
|
85
75
|
|
|
86
76
|
@media (prefers-reduced-motion: reduce) {
|
|
87
|
-
.collapse,
|
|
88
|
-
.collapse--fade .collapse__inner {
|
|
77
|
+
.zc-collapse,
|
|
78
|
+
.zc-collapse--fade .zc-collapse__inner {
|
|
89
79
|
transition-duration: 1ms;
|
|
90
80
|
}
|
|
91
|
-
|
|
92
|
-
no override - it rides the duration tokens, which this media query collapses to 1ms */
|
|
93
|
-
.collapse--fade .collapse__inner {
|
|
81
|
+
.zc-collapse--fade .zc-collapse__inner {
|
|
94
82
|
transition-delay: 0ms;
|
|
95
83
|
}
|
|
96
84
|
}
|
|
@@ -25,7 +25,7 @@ export const bad = (
|
|
|
25
25
|
<Collapse open animation={{ ease: 'ease-in-out' }} />
|
|
26
26
|
{/* @ts-expect-error - unknown directions must not type-check */}
|
|
27
27
|
<Collapse open animation={{ duration: { enter: 'fast' } }} />
|
|
28
|
-
{/* @ts-expect-error - raw DOM attributes
|
|
28
|
+
{/* @ts-expect-error - raw DOM attributes must not type-check at the top level */}
|
|
29
29
|
<Collapse open onClick={() => {}} />
|
|
30
30
|
</>
|
|
31
31
|
);
|
|
@@ -84,21 +84,21 @@ export function NumberField({
|
|
|
84
84
|
setNum(clamp(n));
|
|
85
85
|
};
|
|
86
86
|
const cls = cx(
|
|
87
|
-
'fld',
|
|
88
|
-
'numf',
|
|
89
|
-
unit && 'numf--unit',
|
|
90
|
-
size === 'sm' ? 'fld--sm' : size === 'lg' ? 'fld--lg' : '',
|
|
91
|
-
error && 'is-error',
|
|
87
|
+
'zc-fld',
|
|
88
|
+
'zc-numf',
|
|
89
|
+
unit && 'zc-numf--unit',
|
|
90
|
+
size === 'sm' ? 'zc-fld--sm' : size === 'lg' ? 'zc-fld--lg' : '',
|
|
91
|
+
error && 'zc-is-error',
|
|
92
92
|
className,
|
|
93
93
|
);
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
96
|
<div className={cls} style={style}>
|
|
97
97
|
<FieldLabel id={id} label={label} />
|
|
98
|
-
<div className="fld__control">
|
|
98
|
+
<div className="zc-fld__control">
|
|
99
99
|
<input
|
|
100
100
|
id={id}
|
|
101
|
-
className="fld__input"
|
|
101
|
+
className="zc-fld__input"
|
|
102
102
|
type="text"
|
|
103
103
|
inputMode="decimal"
|
|
104
104
|
disabled={disabled}
|
|
@@ -124,11 +124,11 @@ export function NumberField({
|
|
|
124
124
|
{...htmlProps}
|
|
125
125
|
aria-describedby={joinIds(msgId, htmlProps?.['aria-describedby'])}
|
|
126
126
|
/>
|
|
127
|
-
{unit && <span className="numf__unit">{unit}</span>}
|
|
128
|
-
<div className="numf__steppers">
|
|
127
|
+
{unit && <span className="zc-numf__unit">{unit}</span>}
|
|
128
|
+
<div className="zc-numf__steppers">
|
|
129
129
|
<button
|
|
130
130
|
type="button"
|
|
131
|
-
className="numf__step"
|
|
131
|
+
className="zc-numf__step"
|
|
132
132
|
aria-label="Increase"
|
|
133
133
|
disabled={disabled || v >= max}
|
|
134
134
|
onClick={() => commit(v + step)}
|
|
@@ -137,7 +137,7 @@ export function NumberField({
|
|
|
137
137
|
</button>
|
|
138
138
|
<button
|
|
139
139
|
type="button"
|
|
140
|
-
className="numf__step"
|
|
140
|
+
className="zc-numf__step"
|
|
141
141
|
aria-label="Decrease"
|
|
142
142
|
disabled={disabled || v <= min}
|
|
143
143
|
onClick={() => commit(v - step)}
|
|
@@ -78,18 +78,18 @@ export function OtpField({
|
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
const cls = cx('otp', size === 'sm' && 'otp--sm', error && 'is-error', className);
|
|
81
|
+
const cls = cx('zc-otp', size === 'sm' && 'zc-otp--sm', error && 'zc-is-error', className);
|
|
82
82
|
|
|
83
83
|
const cells: ReactNode[] = [];
|
|
84
84
|
for (let i = 0; i < length; i++) {
|
|
85
|
-
if (group && i > 0 && i % group === 0) cells.push(<span key={`sep${i}`} className="otp__sep" />);
|
|
85
|
+
if (group && i > 0 && i % group === 0) cells.push(<span key={`sep${i}`} className="zc-otp__sep" />);
|
|
86
86
|
cells.push(
|
|
87
87
|
<input
|
|
88
88
|
key={i}
|
|
89
89
|
ref={(el) => {
|
|
90
90
|
refs.current[i] = el;
|
|
91
91
|
}}
|
|
92
|
-
className="otp__slot"
|
|
92
|
+
className="zc-otp__slot"
|
|
93
93
|
inputMode="numeric"
|
|
94
94
|
autoComplete="one-time-code"
|
|
95
95
|
disabled={disabled}
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
type FieldMessagingProps,
|
|
19
19
|
} from './field-chrome';
|
|
20
20
|
|
|
21
|
-
/** The native <input> props TextField surfaces at the top level (the rest live in `htmlProps`). */
|
|
22
21
|
type TextFieldNative = Pick<
|
|
23
22
|
InputHTMLAttributes<HTMLInputElement>,
|
|
24
23
|
| 'placeholder'
|
|
@@ -38,7 +37,7 @@ interface TextFieldOwnProps extends FieldMessagingProps, TextFieldNative {
|
|
|
38
37
|
leadingIcon?: ReactNode;
|
|
39
38
|
/** Show a clear button when there's a value. */
|
|
40
39
|
clearable?: boolean;
|
|
41
|
-
/** Control height: sm
|
|
40
|
+
/** Control height: sm 28px - md 32px (default) - lg 37px. */
|
|
42
41
|
size?: 'sm' | 'md' | 'lg';
|
|
43
42
|
/** Extra class(es) merged onto the field root. */
|
|
44
43
|
className?: string;
|
|
@@ -84,10 +83,10 @@ export function TextField({
|
|
|
84
83
|
el.focus();
|
|
85
84
|
}
|
|
86
85
|
const cls = cx(
|
|
87
|
-
'fld',
|
|
88
|
-
size === 'sm' ? 'fld--sm' : size === 'lg' ? 'fld--lg' : '',
|
|
89
|
-
leadingIcon && 'fld--has-lead',
|
|
90
|
-
showClear && 'fld--has-action',
|
|
86
|
+
'zc-fld',
|
|
87
|
+
size === 'sm' ? 'zc-fld--sm' : size === 'lg' ? 'zc-fld--lg' : '',
|
|
88
|
+
leadingIcon && 'zc-fld--has-lead',
|
|
89
|
+
showClear && 'zc-fld--has-action',
|
|
91
90
|
state,
|
|
92
91
|
className,
|
|
93
92
|
);
|
|
@@ -95,15 +94,15 @@ export function TextField({
|
|
|
95
94
|
return (
|
|
96
95
|
<div className={cls} style={style}>
|
|
97
96
|
<FieldLabel id={rest.id} label={label} required={rest.required} optional={optional} />
|
|
98
|
-
<div className="fld__control">
|
|
97
|
+
<div className="zc-fld__control">
|
|
99
98
|
{leadingIcon && (
|
|
100
|
-
<span className="fld__icon fld__icon--lead">
|
|
99
|
+
<span className="zc-fld__icon zc-fld__icon--lead">
|
|
101
100
|
<IconSlot size={size}>{leadingIcon}</IconSlot>
|
|
102
101
|
</span>
|
|
103
102
|
)}
|
|
104
103
|
<input
|
|
105
104
|
ref={inputRef}
|
|
106
|
-
className="fld__input"
|
|
105
|
+
className="zc-fld__input"
|
|
107
106
|
value={value}
|
|
108
107
|
aria-invalid={error ? true : undefined}
|
|
109
108
|
{...rest}
|
|
@@ -111,7 +110,7 @@ export function TextField({
|
|
|
111
110
|
aria-describedby={joinIds(msgId, htmlProps?.['aria-describedby'])}
|
|
112
111
|
/>
|
|
113
112
|
{showClear && (
|
|
114
|
-
<button type="button" className="fld__action" aria-label="Clear" onClick={clear}>
|
|
113
|
+
<button type="button" className="zc-fld__action" aria-label="Clear" onClick={clear}>
|
|
115
114
|
<Icon name="close" size={size} />
|
|
116
115
|
</button>
|
|
117
116
|
)}
|
|
@@ -43,14 +43,14 @@ export interface FieldLabelProps extends FieldIdProps, FieldRequirementProps {
|
|
|
43
43
|
export function FieldLabel({ id, label, required, optional }: FieldLabelProps) {
|
|
44
44
|
if (!label) return null;
|
|
45
45
|
return (
|
|
46
|
-
<label className="fld__label" htmlFor={id}>
|
|
46
|
+
<label className="zc-fld__label" htmlFor={id}>
|
|
47
47
|
{label}
|
|
48
48
|
{required && (
|
|
49
|
-
<span className="fld__req" aria-hidden="true">
|
|
49
|
+
<span className="zc-fld__req" aria-hidden="true">
|
|
50
50
|
*
|
|
51
51
|
</span>
|
|
52
52
|
)}
|
|
53
|
-
{optional && <span className="fld__optional">(optional)</span>}
|
|
53
|
+
{optional && <span className="zc-fld__optional">(optional)</span>}
|
|
54
54
|
</label>
|
|
55
55
|
);
|
|
56
56
|
}
|
|
@@ -63,8 +63,8 @@ export interface FieldMessageProps {
|
|
|
63
63
|
|
|
64
64
|
export function FieldMessage({ id, message, icon }: FieldMessageProps) {
|
|
65
65
|
return (
|
|
66
|
-
<Collapse open={!!message} className="fld__msg-wrap">
|
|
67
|
-
<div className="fld__msg" id={id}>
|
|
66
|
+
<Collapse open={!!message} className="zc-fld__msg-wrap">
|
|
67
|
+
<div className="zc-fld__msg" id={id}>
|
|
68
68
|
{icon && <Icon name={icon} size="sm" weight="fill" />}
|
|
69
69
|
{message}
|
|
70
70
|
</div>
|
|
@@ -85,7 +85,7 @@ export function resolveFieldMessage(
|
|
|
85
85
|
helper: ReactNode,
|
|
86
86
|
): { state: string; msg: ReactNode; msgIcon: IconName | null } {
|
|
87
87
|
return {
|
|
88
|
-
state: error ? 'is-error' : warning ? 'is-warning' : success ? 'is-success' : '',
|
|
88
|
+
state: error ? 'zc-is-error' : warning ? 'zc-is-warning' : success ? 'zc-is-success' : '',
|
|
89
89
|
msg: error || warning || success || helper,
|
|
90
90
|
msgIcon: error ? 'warning-circle' : warning ? 'warning' : success ? 'check-circle' : null,
|
|
91
91
|
};
|