@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
|
@@ -7,63 +7,108 @@ values.
|
|
|
7
7
|
## Level 0 - your plain CSS already wins
|
|
8
8
|
|
|
9
9
|
Every shipped rule lives inside `@layer zyncat.tokens` or `@layer zyncat.components`, and unlayered
|
|
10
|
-
CSS beats every layer however specific the layered rule is. `.btn { border-radius: 0 }` in your
|
|
11
|
-
sheet lands: no `!important`, no specificity ladder, no parent selector. Even `:where(.btn)` at
|
|
12
|
-
specificity (0,0,0) wins.
|
|
13
|
-
|
|
10
|
+
CSS beats every layer however specific the layered rule is. `.zc-btn { border-radius: 0 }` in your
|
|
11
|
+
sheet lands: no `!important`, no specificity ladder, no parent selector. Even `:where(.zc-btn)` at
|
|
12
|
+
specificity (0,0,0) wins. Every class is BEM off a short base behind the `zc-` namespace, so nothing
|
|
13
|
+
in your sheet collides with one - `.zc-btn`, `.zc-btn--primary`,
|
|
14
|
+
`.zc-btn__label`; `.zc-fld`, `.zc-fld__input`; `.zc-dialog__body`.
|
|
14
15
|
|
|
15
16
|
## Level 1 - retheme the whole system
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
Eight values are decisions and everything else derives from them: `--accent`, `--success`,
|
|
19
|
+
`--warning`, `--danger`, `--neutral` (the gray ramp's hue, the accent by default, read on `:root` only), `--radius`,
|
|
20
|
+
`--font-body`, `--font-code`. `zyncat-ui init` writes them at their defaults into `zyncat.theme.css`
|
|
21
|
+
beside the app entry, imported right after `@zyncat/ui/styles.css`; a retheme is editing a value
|
|
22
|
+
there. VS Code's built-in CSS completion only sees variables declared in the file being edited; a
|
|
23
|
+
workspace-indexing extension such as CSS Variable Autocomplete picks this file up. Setting
|
|
24
|
+
`--accent` moves `--accent-hover/-active/-lift/-subtle/-border/-disabled/-wash`, `--text-accent`,
|
|
25
|
+
`--ring-accent`, `--focus-ring` and `--info`; `--success`, `--warning` and `--danger` each carry their
|
|
26
|
+
own `-subtle`, `-text` and `-wash`; the `--radius-*` steps are fixed ratios of `--radius`, so
|
|
27
|
+
`--radius: 0` squares every corner (`--radius-full` is a shape and stays put); the `--type-*` bundles
|
|
28
|
+
follow the faces. Set a derived token only to break it away from its decision.
|
|
29
|
+
|
|
30
|
+
Dark ships in the package. `data-theme="dark"` on `<html>` turns the page - the base layer paints
|
|
31
|
+
`body` in `--bg-app`, `--text-body` and `--type-body`, so there is no wrapper to add - and on any
|
|
32
|
+
element it turns that subtree, where `data-theme="light"` makes a light island. The dark theme sets
|
|
33
|
+
the neutral roles (`--bg-*`, `--text-*`, `--border-*`), the shadow ink, `--shadow-strength` (how much
|
|
34
|
+
shadow the surfaces cast), `--sheen-strength` (how bright the white top-light highlights render) and
|
|
35
|
+
`--glow-strength` (how much light a hovered hue fill casts on the canvas around it), drops the filled
|
|
36
|
+
faces (`--accent-fill`, `--danger-fill`) a step, and re-derives the hue steps whose light values pin a
|
|
37
|
+
lightness near white; the decisions cascade in, so the accent a project sets is the dark theme's
|
|
38
|
+
accent too. Extend it in the same block -
|
|
39
|
+
`[data-theme='dark'] { --accent: oklch(0.72 0.14 292); --shadow-strength: 2.5; }` - and whatever is
|
|
40
|
+
left out keeps the shipped dark value. The derived tokens are declared on every theme root (`:root`
|
|
41
|
+
and any element with `data-theme`), so a subtree theme that repoints `--accent` re-derives all of
|
|
42
|
+
them; the neutral roles cascade like any property, so a theme of your own that sets `--bg-app` and
|
|
43
|
+
`--text-body` keeps them without restating the rest.
|
|
44
|
+
Components read the tokens live, and the WAAPI engine reads the same values at `<body>` - again
|
|
45
|
+
whenever `data-theme` changes or `prefers-reduced-motion` flips - so motion retimes with the CSS.
|
|
46
|
+
Reduced motion is handled here - every `--duration-*` collapses to 1ms under
|
|
47
|
+
`prefers-reduced-motion`, so derive your own delays from a duration token, and repoint durations on
|
|
48
|
+
`:root` rather than a nested scope or the collapse cannot reach them.
|
|
49
|
+
|
|
50
|
+
`@zyncat/ui/theme` is the same level with a type on it, for a theme that is data - several named
|
|
51
|
+
themes, or values computed at build time. `defineTheme` takes one object shaped like a theme: four
|
|
52
|
+
categories - `color` (the five hues, then `bg`, `text` and `border`), `type.font` (`body`, `code`),
|
|
53
|
+
`shape.radius`, `motion` (`duration`, `ease`, `distance`, `scale`) - then `components` for the scoped
|
|
54
|
+
knobs and `custom` for any other token by its CSS name - a ramp stop, a size, a spacing step, a
|
|
55
|
+
derived hover - or a property of your own. The path is the CSS name: `color.bg.app` is `--bg-app`,
|
|
56
|
+
`type.font.body` is `--font-body`, `motion.duration.base` is `--duration-base`. Values are any CSS
|
|
57
|
+
including `var()` references, every level completes with its default on hover, and a typo is a
|
|
58
|
+
compile error. `ZyncatTheme` renders the set once at the app root; it is a plain component with no
|
|
59
|
+
hooks, so it server-renders and needs no build configuration. Keep one writer per decision: a project
|
|
60
|
+
on `defineTheme` drops those lines from `zyncat.theme.css`.
|
|
23
61
|
|
|
24
62
|
```tsx
|
|
25
63
|
import { defineTheme, ZyncatTheme } from '@zyncat/ui/theme';
|
|
26
64
|
|
|
27
65
|
const base = defineTheme({
|
|
28
|
-
color: { accent: 'oklch(0.58 0.19 292)'
|
|
29
|
-
|
|
66
|
+
color: { accent: 'oklch(0.58 0.19 292)' },
|
|
67
|
+
shape: { radius: '0.75rem' },
|
|
30
68
|
components: { odometer: { accent: 'var(--warning)' } },
|
|
31
69
|
});
|
|
32
|
-
const dark = defineTheme({ color: {
|
|
70
|
+
const dark = defineTheme({ color: { accent: 'oklch(0.72 0.14 292)' }, custom: { '--shadow-strength': 2.5 } });
|
|
33
71
|
|
|
34
72
|
<ZyncatTheme theme={{ base, dark }} />;
|
|
35
73
|
```
|
|
36
74
|
|
|
37
|
-
`base` lands on `:root`; every other key is a `[data-theme='<key>']` block, so
|
|
38
|
-
|
|
75
|
+
`base` lands on `:root`; every other key is a `[data-theme='<key>']` block, so `dark` and `light`
|
|
76
|
+
extend the shipped polarities rather than starting them. Durations you repoint keep their
|
|
39
77
|
reduced-motion collapse automatically.
|
|
40
78
|
|
|
41
|
-
The
|
|
42
|
-
`--
|
|
43
|
-
`--
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
79
|
+
The vocabulary a page reads is the roles, never the plumbing:
|
|
80
|
+
`--bg-app/-surface/-surface-raised/-subtle/-muted/-inset/-overlay`,
|
|
81
|
+
`--text-strong/-body/-secondary/-muted/-subtle/-disabled/-accent/-on-accent/-inverse`,
|
|
82
|
+
`--border-subtle/-default/-strong`, the four status hues and `--info` with `-subtle` and `-text`, the
|
|
83
|
+
`--type-*` bundles (one `font:` shorthand per role), `--space-px` and `--space-1..10` (a 4px grid),
|
|
84
|
+
`--radius-sm..2xl/-full`, `--shadow-xs..xl`, `--focus-ring`, `--duration-*`, `--ease-*`,
|
|
85
|
+
`--transition-control/-colors/-opacity`. `get_tokens` prints all of it with real values.
|
|
86
|
+
|
|
87
|
+
`--focus-ring` and `--ring-accent/-danger/-warning/-success` are `outline` values, so they go on
|
|
88
|
+
`outline`, not `box-shadow`: `outline: var(--focus-ring)`. `--ring-color-*` is the hue alone,
|
|
89
|
+
`--ring-width` the reach past the border box. A ring is an outline so it never collides with a
|
|
90
|
+
component's elevation, and a container that clips can reserve exactly `--ring-width` for it - give
|
|
91
|
+
your own scrollers `scroll-padding: var(--ring-width)` and anything flush with a clipping edge
|
|
92
|
+
`outline-offset: var(--ring-inset)`.
|
|
48
93
|
|
|
49
94
|
## Level 2 - retune one component
|
|
50
95
|
|
|
51
96
|
Expressive and compound components publish scoped `--<component>-<name>` properties as their public
|
|
52
|
-
contract: `--odometer-size/-accent/-gap`, `--typing-lines-caret-ink/-blink`,
|
|
97
|
+
contract, each with a doc line: `--odometer-size/-accent/-gap`, `--typing-lines-caret-ink/-blink`,
|
|
53
98
|
`--lens-surface/-fringe-warm`, `--morphing-text-size/-smear`, `--weight-field-peak-weight/-hover-padding`,
|
|
54
|
-
`--flow-field-ramp-0..11`, `--confetti-paper-1..5`, `--support-rail
|
|
55
|
-
on any ancestor or inline via `style`. The canvas simulations sample theirs at their next measure -
|
|
99
|
+
`--flow-field-ramp-0..11`, `--confetti-paper-1..5`, `--support-rail-width/-accent/-row-pad-block`. Set
|
|
100
|
+
them on any ancestor or inline via `style`. The canvas simulations sample theirs at their next measure -
|
|
56
101
|
FlowField on resize and on a theme attribute change, Confetti on the next `fire()`.
|
|
57
102
|
|
|
58
|
-
Both reaches are typed. In a theme they are
|
|
59
|
-
`components.odometer.accent` is `--odometer-accent
|
|
60
|
-
`
|
|
61
|
-
component
|
|
103
|
+
Both reaches are typed. In a theme they are `components`, grouped like the theme:
|
|
104
|
+
`components.odometer.accent` is `--odometer-accent`, `components.typingLines.caret.ink` is
|
|
105
|
+
`--typing-lines-caret-ink`, `components.confetti.paper[3]` is `--confetti-paper-3`. On one instance
|
|
106
|
+
they are the component's own `style` prop, which accepts the design tokens plus that component's knobs
|
|
107
|
+
and nothing from another component - `<Odometer style={{ '--odometer-size': '3rem' }} />`.
|
|
62
108
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Setting those does nothing, and they are absent from the types, so trying is a compile error.
|
|
109
|
+
Everything else a component declares - its constants, its derivations, the per-frame state it writes
|
|
110
|
+
to itself - is a private `--_<component>-*` property: not a contract, and absent from the types, so
|
|
111
|
+
setting one is a compile error.
|
|
67
112
|
|
|
68
113
|
System primitives and composites publish none by design - retheme those at level 1.
|
|
69
114
|
|
|
@@ -78,6 +123,32 @@ itself. Importing `@zyncat/ui/theme` anywhere in the app types every design toke
|
|
|
78
123
|
## Replicas answer to none of this, on purpose
|
|
79
124
|
|
|
80
125
|
FacebookFeed, InstagramFeed, TikTok and YouTube pin platform metrics as constants; only
|
|
81
|
-
`--font-
|
|
126
|
+
`--font-body`, `--focus-ring` and the duration tokens reach them, and there are no scoped
|
|
82
127
|
properties to set. Fidelity is the contract. If you want a card that follows your theme, build one
|
|
83
128
|
from primitives instead.
|
|
129
|
+
|
|
130
|
+
## With Tailwind v4 - the vocabulary as utilities
|
|
131
|
+
|
|
132
|
+
`@zyncat/ui/tailwind.css` is the token vocabulary as Tailwind v4 utilities, generated from the token
|
|
133
|
+
CSS, and Tailwind IntelliSense completes them. It goes on the first line of the stylesheet Tailwind
|
|
134
|
+
compiles, above `@import 'tailwindcss'`; `init` writes it there. The base stylesheet stays on its JS
|
|
135
|
+
import at the app root - only the bridge goes through Tailwind.
|
|
136
|
+
|
|
137
|
+
Every role is a utility named after its token: surfaces `bg-app`, `bg-surface`, `bg-surface-raised`,
|
|
138
|
+
`bg-subtle`, `bg-muted`, `bg-inset`, `bg-overlay`; ink `text-strong`, `text-default` (the body ink -
|
|
139
|
+
`text-body` is the type role), `text-secondary`, `text-muted`, `text-subtle`, `text-disabled`,
|
|
140
|
+
`text-accent`, `text-on-accent`, `text-inverse`, and the legible hue inks `text-success`,
|
|
141
|
+
`text-warning`, `text-danger`, `text-info`; hairlines `border-subtle`, `border-default`,
|
|
142
|
+
`border-strong`; the hues on every colour utility with `/opacity` - `bg-accent`, `bg-accent-fill`,
|
|
143
|
+
`hover:bg-accent-hover`, `bg-accent-wash`, `ring-accent`, `bg-danger/10`; the type roles
|
|
144
|
+
`text-micro` … `text-display-lg`, `text-label`, `text-code` (size and leading - add `font-code` for
|
|
145
|
+
the face), with `font-body`, `leading-<role>`, `tracking-caps`, `tracking-display`; `rounded-sm` …
|
|
146
|
+
`rounded-2xl`, `shadow-xs` … `shadow-xl`, `shadow-glow-<hue>`, `outline-ring-<hue>` (and every other
|
|
147
|
+
colour utility on `ring-<hue>`);
|
|
148
|
+
`duration-fast` … `duration-slowest`, `ease-standard`, `ease-entrance`, `ease-exit`, `ease-spring`,
|
|
149
|
+
`ease-glide`; `max-w-prose`, `max-w-floating`. Each utility reads the token itself, so a themed
|
|
150
|
+
subtree and the dark theme reach it, and `dark:` follows `data-theme` rather than the OS. The names
|
|
151
|
+
Tailwind also ships - `rounded-md`, `shadow-md`, `tracking-tight` - read the zyncat token of the same
|
|
152
|
+
name, so `--radius` in the theme file moves utilities and components together. Spacing stays
|
|
153
|
+
Tailwind's own scale; both sit on the 4px grid. Reach for a role utility before an arbitrary value:
|
|
154
|
+
`bg-surface`, not `bg-[var(--bg-surface)]`.
|
|
@@ -15,7 +15,7 @@ import { useControllable } from '../../internal/hooks/use-controllable';
|
|
|
15
15
|
import { Icon, type IconName } from '../../internal/icon/Icon';
|
|
16
16
|
import { IconSlot } from '../../internal/icon/IconSlot';
|
|
17
17
|
import { cx } from '../../internal/utils/cx';
|
|
18
|
-
import {
|
|
18
|
+
import { buttonClass } from '../../primitives/button/button-style';
|
|
19
19
|
|
|
20
20
|
export type AlertTone = 'info' | 'success' | 'warning' | 'danger';
|
|
21
21
|
|
|
@@ -38,8 +38,7 @@ interface AlertOwnProps {
|
|
|
38
38
|
dismissible?: boolean;
|
|
39
39
|
/** Fires on dismiss. With `open` set, the parent owns hiding the alert. */
|
|
40
40
|
onDismiss?: () => void;
|
|
41
|
-
/** Controlled visibility; omit for uncontrolled.
|
|
42
|
-
* occupied is released when it unmounts, so content below moves up then rather than during. */
|
|
41
|
+
/** Controlled visibility; omit for uncontrolled. The exit fades and scales down, then releases the slot. */
|
|
43
42
|
open?: boolean;
|
|
44
43
|
/** App-level strip: square corners, hairline below only. Paint modifier. */
|
|
45
44
|
banner?: boolean;
|
|
@@ -97,14 +96,14 @@ export function Alert({
|
|
|
97
96
|
const h = resolveMotionTiming(animation, ALERT_HEIGHT_TIMING);
|
|
98
97
|
const o = resolveMotionTiming(animation, ALERT_OPACITY_TIMING);
|
|
99
98
|
|
|
100
|
-
const cls = cx('alert', banner && 'alert--banner', className);
|
|
99
|
+
const cls = cx('zc-alert', banner && 'zc-alert--banner', className);
|
|
101
100
|
|
|
102
101
|
return (
|
|
103
102
|
<Presence initial={false}>
|
|
104
103
|
{isOpen && (
|
|
105
104
|
<Motion
|
|
106
105
|
key="alert-shell"
|
|
107
|
-
className="alert-shell"
|
|
106
|
+
className="zc-alert-shell"
|
|
108
107
|
animate={[
|
|
109
108
|
{ height: [0, 'auto'], timing: h.open },
|
|
110
109
|
{ opacity: [0, 1], timing: o.open },
|
|
@@ -113,7 +112,7 @@ export function Alert({
|
|
|
113
112
|
>
|
|
114
113
|
<div className={cls} style={style} data-tone={tone} role={TONE_ROLE[tone] || 'status'} {...htmlProps}>
|
|
115
114
|
{icon === null ? null : (
|
|
116
|
-
<span className="alert__icon" aria-hidden="true">
|
|
115
|
+
<span className="zc-alert__icon" aria-hidden="true">
|
|
117
116
|
{icon !== undefined ? (
|
|
118
117
|
<IconSlot size="md">{icon}</IconSlot>
|
|
119
118
|
) : (
|
|
@@ -121,17 +120,21 @@ export function Alert({
|
|
|
121
120
|
)}
|
|
122
121
|
</span>
|
|
123
122
|
)}
|
|
124
|
-
<div className="alert__body">
|
|
125
|
-
<p className="alert__title">{title}</p>
|
|
126
|
-
{children != null && <p className="alert__desc">{children}</p>}
|
|
123
|
+
<div className="zc-alert__body">
|
|
124
|
+
<p className="zc-alert__title">{title}</p>
|
|
125
|
+
{children != null && <p className="zc-alert__desc">{children}</p>}
|
|
127
126
|
</div>
|
|
128
127
|
{action && (
|
|
129
|
-
<
|
|
128
|
+
<button
|
|
129
|
+
type="button"
|
|
130
|
+
className={buttonClass({ size: 'sm', className: 'zc-alert__action' })}
|
|
131
|
+
onClick={action.onClick}
|
|
132
|
+
>
|
|
130
133
|
{action.label}
|
|
131
|
-
</
|
|
134
|
+
</button>
|
|
132
135
|
)}
|
|
133
136
|
{dismissible && (
|
|
134
|
-
<button type="button" className="alert__close" aria-label="Dismiss" onClick={dismiss}>
|
|
137
|
+
<button type="button" className="zc-alert__close" aria-label="Dismiss" onClick={dismiss}>
|
|
135
138
|
<Icon name="close" size="sm" />
|
|
136
139
|
</button>
|
|
137
140
|
)}
|
|
@@ -1,69 +1,64 @@
|
|
|
1
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.components {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.alert-shell {
|
|
4
|
+
.zc-alert-shell {
|
|
7
5
|
overflow: hidden;
|
|
8
6
|
}
|
|
9
7
|
|
|
10
|
-
.alert {
|
|
11
|
-
/* tone hooks - repointed by [data-tone] below; info is the default */
|
|
8
|
+
.zc-alert {
|
|
12
9
|
--alert-hue: var(--info);
|
|
13
10
|
--alert-fg: var(--info-text);
|
|
14
11
|
--alert-bg: var(--info-subtle);
|
|
15
|
-
--alert-wash: var(--
|
|
16
|
-
--alert-sheen: rgb(255 255 255 / 0.55);
|
|
12
|
+
--alert-wash: var(--info-wash);
|
|
13
|
+
--alert-sheen: rgb(255 255 255 / calc(0.55 * var(--sheen-strength)));
|
|
17
14
|
|
|
18
15
|
box-sizing: border-box;
|
|
19
16
|
display: flex;
|
|
20
17
|
align-items: center;
|
|
21
18
|
gap: var(--space-3);
|
|
22
19
|
padding: var(--space-3) var(--space-4);
|
|
23
|
-
/* the lit pane: top-light gradient over the tint + 1px inner highlight (Button's lighting model) */
|
|
24
20
|
background: linear-gradient(180deg, color-mix(in oklab, var(--bg-surface) 45%, var(--alert-bg)), var(--alert-bg));
|
|
25
21
|
border: var(--border-hairline) solid color-mix(in oklab, var(--alert-hue) 30%, transparent);
|
|
26
22
|
border-radius: var(--radius-lg);
|
|
23
|
+
background-origin: border-box;
|
|
27
24
|
box-shadow: inset 0 1px 0 0 var(--alert-sheen);
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
.alert[data-tone='success'] {
|
|
27
|
+
.zc-alert[data-tone='success'] {
|
|
31
28
|
--alert-hue: var(--success);
|
|
32
29
|
--alert-fg: var(--success-text);
|
|
33
30
|
--alert-bg: var(--success-subtle);
|
|
34
31
|
--alert-wash: var(--success-wash);
|
|
35
32
|
}
|
|
36
|
-
.alert[data-tone='warning'] {
|
|
33
|
+
.zc-alert[data-tone='warning'] {
|
|
37
34
|
--alert-hue: var(--warning);
|
|
38
35
|
--alert-fg: var(--warning-text);
|
|
39
36
|
--alert-bg: var(--warning-subtle);
|
|
40
37
|
--alert-wash: var(--warning-wash);
|
|
41
38
|
}
|
|
42
|
-
.alert[data-tone='danger'] {
|
|
39
|
+
.zc-alert[data-tone='danger'] {
|
|
43
40
|
--alert-hue: var(--danger);
|
|
44
41
|
--alert-fg: var(--danger-text);
|
|
45
42
|
--alert-bg: var(--danger-subtle);
|
|
46
43
|
--alert-wash: var(--danger-wash);
|
|
47
44
|
}
|
|
48
45
|
|
|
49
|
-
|
|
50
|
-
.alert:has(.alert__desc) {
|
|
46
|
+
.zc-alert:has(.zc-alert__desc) {
|
|
51
47
|
align-items: flex-start;
|
|
52
48
|
}
|
|
53
|
-
.alert:has(.alert__desc) .alert__action,
|
|
54
|
-
.alert:has(.alert__desc) .alert__close {
|
|
49
|
+
.zc-alert:has(.zc-alert__desc) .zc-alert__action,
|
|
50
|
+
.zc-alert:has(.zc-alert__desc) .zc-alert__close {
|
|
55
51
|
align-self: center;
|
|
56
52
|
}
|
|
57
53
|
|
|
58
|
-
.alert--banner {
|
|
54
|
+
.zc-alert--banner {
|
|
59
55
|
border-radius: 0;
|
|
60
56
|
border-block-start: 0;
|
|
61
57
|
border-inline: 0;
|
|
62
58
|
padding-inline: var(--space-6);
|
|
63
59
|
}
|
|
64
60
|
|
|
65
|
-
|
|
66
|
-
.alert__icon {
|
|
61
|
+
.zc-alert__icon {
|
|
67
62
|
flex: none;
|
|
68
63
|
display: grid;
|
|
69
64
|
place-items: center;
|
|
@@ -71,43 +66,41 @@
|
|
|
71
66
|
color: var(--alert-hue);
|
|
72
67
|
}
|
|
73
68
|
|
|
74
|
-
.alert__body {
|
|
69
|
+
.zc-alert__body {
|
|
75
70
|
flex: 1 1 auto;
|
|
76
71
|
min-width: 0;
|
|
77
72
|
}
|
|
78
|
-
.alert__title {
|
|
73
|
+
.zc-alert__title {
|
|
79
74
|
margin: 0;
|
|
80
75
|
font: var(--type-label);
|
|
81
76
|
color: var(--alert-fg);
|
|
82
77
|
text-wrap: pretty;
|
|
83
78
|
}
|
|
84
|
-
.alert__desc {
|
|
79
|
+
.zc-alert__desc {
|
|
85
80
|
margin: var(--space-1) 0 0;
|
|
86
81
|
font: var(--type-caption);
|
|
87
82
|
color: color-mix(in oklab, var(--alert-fg) 56%, var(--text-body));
|
|
88
83
|
text-wrap: pretty;
|
|
89
84
|
}
|
|
90
85
|
|
|
91
|
-
|
|
92
|
-
.alert__action {
|
|
86
|
+
.zc-alert__action {
|
|
93
87
|
flex: none;
|
|
94
88
|
color: var(--alert-fg);
|
|
95
89
|
background: transparent;
|
|
96
90
|
}
|
|
97
|
-
.alert__action:hover:not(:disabled) {
|
|
91
|
+
.zc-alert__action:hover:not(:disabled) {
|
|
98
92
|
color: var(--alert-fg);
|
|
99
93
|
background: var(--alert-wash);
|
|
100
94
|
}
|
|
101
|
-
.alert__action:active:not(:disabled) {
|
|
95
|
+
.zc-alert__action:active:not(:disabled) {
|
|
102
96
|
background: color-mix(in oklab, var(--alert-hue) 16%, transparent);
|
|
103
97
|
transform: translateY(var(--space-px));
|
|
104
98
|
}
|
|
105
|
-
.alert[data-tone='danger'] .alert__action {
|
|
99
|
+
.zc-alert[data-tone='danger'] .zc-alert__action {
|
|
106
100
|
--btn-ring: var(--ring-danger);
|
|
107
101
|
}
|
|
108
102
|
|
|
109
|
-
|
|
110
|
-
.alert__close {
|
|
103
|
+
.zc-alert__close {
|
|
111
104
|
flex: none;
|
|
112
105
|
appearance: none;
|
|
113
106
|
display: grid;
|
|
@@ -122,16 +115,16 @@
|
|
|
122
115
|
color: color-mix(in oklab, var(--alert-fg) 64%, transparent);
|
|
123
116
|
cursor: pointer;
|
|
124
117
|
transition: var(--transition-control);
|
|
118
|
+
outline: var(--ring-rest);
|
|
125
119
|
}
|
|
126
|
-
.alert__close:hover {
|
|
120
|
+
.zc-alert__close:hover {
|
|
127
121
|
background: color-mix(in oklab, var(--alert-fg) 9%, transparent);
|
|
128
122
|
color: var(--alert-fg);
|
|
129
123
|
}
|
|
130
|
-
.alert__close:active {
|
|
124
|
+
.zc-alert__close:active {
|
|
131
125
|
background: color-mix(in oklab, var(--alert-fg) 14%, transparent);
|
|
132
126
|
}
|
|
133
|
-
.alert__close:focus-visible {
|
|
134
|
-
outline:
|
|
135
|
-
box-shadow: var(--focus-ring);
|
|
127
|
+
.zc-alert__close:focus-visible {
|
|
128
|
+
outline: var(--focus-ring);
|
|
136
129
|
}
|
|
137
130
|
}
|
|
@@ -115,7 +115,7 @@ export function DateTimeField({
|
|
|
115
115
|
|
|
116
116
|
return (
|
|
117
117
|
<FieldShell
|
|
118
|
-
variant="dtf"
|
|
118
|
+
variant="zc-dtf"
|
|
119
119
|
label={label}
|
|
120
120
|
required={required}
|
|
121
121
|
invalid={invalid}
|
|
@@ -143,9 +143,9 @@ export function DateTimeField({
|
|
|
143
143
|
label={label}
|
|
144
144
|
activateOn={activateOn}
|
|
145
145
|
slot={
|
|
146
|
-
<div className="dtp__time">
|
|
147
|
-
<span className="dtp__timeLabel">Time</span>
|
|
148
|
-
<span className="dtp__timeHint" aria-hidden="true">
|
|
146
|
+
<div className="zc-dtp__time">
|
|
147
|
+
<span className="zc-dtp__timeLabel">Time</span>
|
|
148
|
+
<span className="zc-dtp__timeHint" aria-hidden="true">
|
|
149
149
|
<kbd>↑</kbd>
|
|
150
150
|
<kbd>↓</kbd>
|
|
151
151
|
</span>
|
|
@@ -28,7 +28,7 @@ export interface TimeFieldProps extends DateFieldBaseProps {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export function TimeField({
|
|
31
|
-
value,
|
|
31
|
+
value,
|
|
32
32
|
defaultValue = null,
|
|
33
33
|
onChange,
|
|
34
34
|
label,
|
|
@@ -46,15 +46,15 @@ export function TimeField({
|
|
|
46
46
|
const [val, commit] = useControllable(value, defaultValue, onChange);
|
|
47
47
|
|
|
48
48
|
function onBoxPointerDown(e: PointerEvent<HTMLDivElement>) {
|
|
49
|
-
if (disabled || (e.target as HTMLElement).closest('.tsg__seg')) return;
|
|
49
|
+
if (disabled || (e.target as HTMLElement).closest('.zc-tsg__seg')) return;
|
|
50
50
|
e.preventDefault();
|
|
51
|
-
const seg = e.currentTarget.querySelector('.tsg__seg') as HTMLElement | null;
|
|
51
|
+
const seg = e.currentTarget.querySelector('.zc-tsg__seg') as HTMLElement | null;
|
|
52
52
|
if (seg) seg.focus();
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
return (
|
|
56
56
|
<FieldShell
|
|
57
|
-
variant="tfd"
|
|
57
|
+
variant="zc-tfd"
|
|
58
58
|
label={label}
|
|
59
59
|
required={required}
|
|
60
60
|
invalid={invalid}
|
|
@@ -63,7 +63,10 @@ export function TimeField({
|
|
|
63
63
|
className={className}
|
|
64
64
|
htmlProps={htmlProps}
|
|
65
65
|
>
|
|
66
|
-
<div
|
|
66
|
+
<div
|
|
67
|
+
className={'zc-fld__input zc-tfd__box' + (disabled ? ' zc-is-disabled' : '')}
|
|
68
|
+
onPointerDown={onBoxPointerDown}
|
|
69
|
+
>
|
|
67
70
|
<TimeSegments
|
|
68
71
|
value={val}
|
|
69
72
|
onCommit={commit}
|
|
@@ -14,6 +14,7 @@ import { activationProps, type ActivateOn } from '../../internal/utils/activatio
|
|
|
14
14
|
import { cx } from '../../internal/utils/cx';
|
|
15
15
|
import { Button } from '../../primitives/button/Button';
|
|
16
16
|
import { col, DOW, grid, MONTHS, parse, today, toKey, tzLabel, within } from './date-utils';
|
|
17
|
+
import { MonthJump } from './month-jump';
|
|
17
18
|
import { useDayFocus } from './use-day-focus';
|
|
18
19
|
|
|
19
20
|
const PILL_FLIP = { timing: UIMotion.t.settle };
|
|
@@ -56,6 +57,11 @@ export function DtpPanel({ val, commit, min, max, timezone, label, close, slot,
|
|
|
56
57
|
function goToMonth(y: number, m: number) {
|
|
57
58
|
setView((v) => (v.y === y && v.m === m ? v : { y: y, m: m }));
|
|
58
59
|
}
|
|
60
|
+
const jumpedRef = useRef(false);
|
|
61
|
+
function jumpToMonth(y: number, m: number) {
|
|
62
|
+
jumpedRef.current = true;
|
|
63
|
+
goToMonth(y, m);
|
|
64
|
+
}
|
|
59
65
|
function nav(dir: number) {
|
|
60
66
|
const d = new Date(view.y, view.m + dir, 1);
|
|
61
67
|
goToMonth(d.getFullYear(), d.getMonth());
|
|
@@ -75,7 +81,9 @@ export function DtpPanel({ val, commit, min, max, timezone, label, close, slot,
|
|
|
75
81
|
const prev = prevViewRef.current;
|
|
76
82
|
prevViewRef.current = viewIdx;
|
|
77
83
|
const el = daysRef.current;
|
|
78
|
-
|
|
84
|
+
const jumped = jumpedRef.current;
|
|
85
|
+
jumpedRef.current = false;
|
|
86
|
+
if (prev == null || prev === viewIdx || !el || jumped) return;
|
|
79
87
|
const dir = viewIdx > prev ? 1 : -1;
|
|
80
88
|
animate(el, slideIn(dir * UIMotion.dist.md, UIMotion.t.enter));
|
|
81
89
|
}, [viewIdx]);
|
|
@@ -126,16 +134,14 @@ export function DtpPanel({ val, commit, min, max, timezone, label, close, slot,
|
|
|
126
134
|
for (let w = 0; w < 6; w++) weeks.push(days.slice(w * 7, w * 7 + 7));
|
|
127
135
|
|
|
128
136
|
return (
|
|
129
|
-
<div className="dtp" role="dialog" aria-label={label || 'Pick a date'}>
|
|
130
|
-
<div className="dtp__cal">
|
|
131
|
-
<div className="dtp__head">
|
|
132
|
-
<
|
|
133
|
-
|
|
134
|
-
</span>
|
|
135
|
-
<div className="dtp__navs">
|
|
137
|
+
<div className="zc-dtp" role="dialog" aria-label={label || 'Pick a date'}>
|
|
138
|
+
<div className="zc-dtp__cal">
|
|
139
|
+
<div className="zc-dtp__head">
|
|
140
|
+
<MonthJump y={view.y} m={view.m} min={min} max={max} activateOn={activateOn} onPick={jumpToMonth} />
|
|
141
|
+
<div className="zc-dtp__navs">
|
|
136
142
|
<button
|
|
137
143
|
type="button"
|
|
138
|
-
className="dtp__nav"
|
|
144
|
+
className="zc-dtp__nav"
|
|
139
145
|
aria-label="Previous month"
|
|
140
146
|
disabled={!canPrev}
|
|
141
147
|
{...activationProps<HTMLButtonElement>(() => nav(-1), { on: activateOn })}
|
|
@@ -144,7 +150,7 @@ export function DtpPanel({ val, commit, min, max, timezone, label, close, slot,
|
|
|
144
150
|
</button>
|
|
145
151
|
<button
|
|
146
152
|
type="button"
|
|
147
|
-
className="dtp__nav"
|
|
153
|
+
className="zc-dtp__nav"
|
|
148
154
|
aria-label="Go to today"
|
|
149
155
|
disabled={viewIsCurrent}
|
|
150
156
|
{...activationProps<HTMLButtonElement>(goToToday, { on: activateOn })}
|
|
@@ -153,7 +159,7 @@ export function DtpPanel({ val, commit, min, max, timezone, label, close, slot,
|
|
|
153
159
|
</button>
|
|
154
160
|
<button
|
|
155
161
|
type="button"
|
|
156
|
-
className="dtp__nav"
|
|
162
|
+
className="zc-dtp__nav"
|
|
157
163
|
aria-label="Next month"
|
|
158
164
|
disabled={!canNext}
|
|
159
165
|
{...activationProps<HTMLButtonElement>(() => nav(1), { on: activateOn })}
|
|
@@ -162,13 +168,13 @@ export function DtpPanel({ val, commit, min, max, timezone, label, close, slot,
|
|
|
162
168
|
</button>
|
|
163
169
|
</div>
|
|
164
170
|
</div>
|
|
165
|
-
<div className="dtp__dow" aria-hidden="true">
|
|
171
|
+
<div className="zc-dtp__dow" aria-hidden="true">
|
|
166
172
|
{DOW.map((d) => (
|
|
167
173
|
<span key={d}>{d}</span>
|
|
168
174
|
))}
|
|
169
175
|
</div>
|
|
170
176
|
<div
|
|
171
|
-
className="dtp__days"
|
|
177
|
+
className="zc-dtp__days"
|
|
172
178
|
ref={daysRef}
|
|
173
179
|
role="grid"
|
|
174
180
|
aria-label="Calendar"
|
|
@@ -176,12 +182,17 @@ export function DtpPanel({ val, commit, min, max, timezone, label, close, slot,
|
|
|
176
182
|
onPointerLeave={glide.leave}
|
|
177
183
|
>
|
|
178
184
|
{weeks.map((week, wi) => (
|
|
179
|
-
<div key={wi} role="row" className="dtp__row">
|
|
185
|
+
<div key={wi} role="row" className="zc-dtp__row">
|
|
180
186
|
{week.map((d) => {
|
|
181
187
|
const key = toKey(d);
|
|
182
188
|
const out = d.getMonth() !== view.m;
|
|
183
189
|
const sel = key === selKey;
|
|
184
|
-
const cls = cx(
|
|
190
|
+
const cls = cx(
|
|
191
|
+
'zc-dtp__day',
|
|
192
|
+
out && 'zc-is-out',
|
|
193
|
+
sel && 'zc-is-selected',
|
|
194
|
+
key === todayKey && 'zc-is-today',
|
|
195
|
+
);
|
|
185
196
|
return (
|
|
186
197
|
<button
|
|
187
198
|
key={key}
|
|
@@ -201,26 +212,26 @@ export function DtpPanel({ val, commit, min, max, timezone, label, close, slot,
|
|
|
201
212
|
as="span"
|
|
202
213
|
layoutId={pillId}
|
|
203
214
|
layoutTransition={PILL_FLIP}
|
|
204
|
-
className="dtp__pill"
|
|
215
|
+
className="zc-dtp__pill"
|
|
205
216
|
aria-hidden="true"
|
|
206
217
|
/>
|
|
207
218
|
) : null}
|
|
208
|
-
<span className="dtp__num">{d.getDate()}</span>
|
|
209
|
-
{key === todayKey ? <span className="dtp__dot" aria-hidden="true"></span> : null}
|
|
219
|
+
<span className="zc-dtp__num">{d.getDate()}</span>
|
|
220
|
+
{key === todayKey ? <span className="zc-dtp__dot" aria-hidden="true"></span> : null}
|
|
210
221
|
</button>
|
|
211
222
|
);
|
|
212
223
|
})}
|
|
213
224
|
</div>
|
|
214
225
|
))}
|
|
215
|
-
<GlidePill className="dtp__hover" glide={glide} />
|
|
226
|
+
<GlidePill className="zc-dtp__hover" glide={glide} />
|
|
216
227
|
</div>
|
|
217
228
|
</div>
|
|
218
229
|
|
|
219
230
|
{slot || null}
|
|
220
231
|
|
|
221
|
-
<div className="dtp__foot">
|
|
222
|
-
{timezone ? <span className="dtp__tz">{tzLabel(timezone, selKey)}</span> : null}
|
|
223
|
-
<span className="dtp__footSpacer"></span>
|
|
232
|
+
<div className="zc-dtp__foot">
|
|
233
|
+
{timezone ? <span className="zc-dtp__tz">{tzLabel(timezone, selKey)}</span> : null}
|
|
234
|
+
<span className="zc-dtp__footSpacer"></span>
|
|
224
235
|
<Button variant="primary" size="sm" onClick={close}>
|
|
225
236
|
Done
|
|
226
237
|
</Button>
|