@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
|
@@ -16,7 +16,7 @@ export interface DateFieldBaseProps {
|
|
|
16
16
|
label?: string;
|
|
17
17
|
/** Asterisk on the label. @default false */
|
|
18
18
|
required?: boolean;
|
|
19
|
-
/** Danger border + message color (.fld
|
|
19
|
+
/** Danger border + message color (.zc-fld.zc-is-error). @default false */
|
|
20
20
|
invalid?: boolean;
|
|
21
21
|
/** Helper / error text under the field. */
|
|
22
22
|
message?: string;
|
|
@@ -56,13 +56,13 @@ export function FieldShell({
|
|
|
56
56
|
htmlProps,
|
|
57
57
|
children,
|
|
58
58
|
}: FieldShellProps) {
|
|
59
|
-
const cls = cx('fld', variant, 'fld--has-lead', invalid && 'is-error', className, htmlProps?.className);
|
|
59
|
+
const cls = cx('zc-fld', variant, 'zc-fld--has-lead', invalid && 'zc-is-error', className, htmlProps?.className);
|
|
60
60
|
return (
|
|
61
61
|
<div {...htmlProps} className={cls}>
|
|
62
62
|
<FieldLabel label={label} required={required} />
|
|
63
|
-
<div className="fld__control">
|
|
63
|
+
<div className="zc-fld__control">
|
|
64
64
|
{children}
|
|
65
|
-
<span className="fld__icon fld__icon--lead" aria-hidden="true">
|
|
65
|
+
<span className="zc-fld__icon zc-fld__icon--lead" aria-hidden="true">
|
|
66
66
|
<Icon name={icon} size="md" />
|
|
67
67
|
</span>
|
|
68
68
|
</div>
|
|
@@ -80,11 +80,11 @@ export function FieldTrigger({
|
|
|
80
80
|
ref?: Ref<HTMLButtonElement>;
|
|
81
81
|
}) {
|
|
82
82
|
return (
|
|
83
|
-
<button type="button" className="fld__input dtf__trigger" disabled={disabled} {...rest}>
|
|
83
|
+
<button type="button" className="zc-fld__input zc-dtf__trigger" disabled={disabled} {...rest}>
|
|
84
84
|
{display ? (
|
|
85
|
-
<span className="dtf__value">{display}</span>
|
|
85
|
+
<span className="zc-dtf__value">{display}</span>
|
|
86
86
|
) : (
|
|
87
|
-
<span className="dtf__placeholder">{placeholder}</span>
|
|
87
|
+
<span className="zc-dtf__placeholder">{placeholder}</span>
|
|
88
88
|
)}
|
|
89
89
|
</button>
|
|
90
90
|
);
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef, useState, type KeyboardEvent } from 'react';
|
|
4
|
+
|
|
5
|
+
import { animate } from '../../../engine';
|
|
6
|
+
import { GlidePill, useGlide } from '../../../motion/glide';
|
|
7
|
+
import { slideIn } from '../../../motion/presets';
|
|
8
|
+
import { UIMotion } from '../../../tokens/motion-tokens';
|
|
9
|
+
import { Icon } from '../../internal/icon/Icon';
|
|
10
|
+
import { activationProps, type ActivateOn } from '../../internal/utils/activation';
|
|
11
|
+
import { cx } from '../../internal/utils/cx';
|
|
12
|
+
import { Popover } from '../popover/Popover';
|
|
13
|
+
import { MONTHS, parse, toKey } from './date-utils';
|
|
14
|
+
|
|
15
|
+
const YEARS_PER_PAGE = 3;
|
|
16
|
+
const MONTH_COLUMNS = 3;
|
|
17
|
+
const UNBOUNDED_YEAR_REACH = 100;
|
|
18
|
+
const GRID_PARTS = '.zc-dtp__dow, .zc-dtp__days';
|
|
19
|
+
|
|
20
|
+
function gridBox(trigger: HTMLElement | null): DOMRect | null {
|
|
21
|
+
const cal = trigger && trigger.closest('.zc-dtp__cal');
|
|
22
|
+
const parts = cal && cal.querySelectorAll(GRID_PARTS);
|
|
23
|
+
if (!parts || parts.length === 0) return null;
|
|
24
|
+
const head = parts[0].getBoundingClientRect();
|
|
25
|
+
const tail = parts[parts.length - 1].getBoundingClientRect();
|
|
26
|
+
return new DOMRect(head.left, head.top, Math.max(head.width, tail.width), tail.bottom - head.top);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface MonthJumpProps {
|
|
30
|
+
y: number;
|
|
31
|
+
m: number;
|
|
32
|
+
min?: string;
|
|
33
|
+
max?: string;
|
|
34
|
+
onPick: (y: number, m: number) => void;
|
|
35
|
+
activateOn?: ActivateOn;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function MonthJump({ y, m, min, max, onPick, activateOn }: MonthJumpProps) {
|
|
39
|
+
const [open, setOpen] = useState(false);
|
|
40
|
+
const [page, setPage] = useState(y - 1);
|
|
41
|
+
const [year, setYear] = useState(y);
|
|
42
|
+
const [cursor, setCursor] = useState(m);
|
|
43
|
+
|
|
44
|
+
const [box, setBox] = useState<{ width: number; height: number } | null>(null);
|
|
45
|
+
|
|
46
|
+
const triggerRef = useRef<HTMLButtonElement>(null);
|
|
47
|
+
const monthsRef = useRef<HTMLDivElement>(null);
|
|
48
|
+
const stripRef = useRef<HTMLDivElement>(null);
|
|
49
|
+
|
|
50
|
+
const monthGlide = useGlide(monthsRef);
|
|
51
|
+
const yearGlide = useGlide(stripRef);
|
|
52
|
+
|
|
53
|
+
const minYear = min ? parse(min).getFullYear() : y - UNBOUNDED_YEAR_REACH;
|
|
54
|
+
const maxYear = max ? parse(max).getFullYear() : y + UNBOUNDED_YEAR_REACH;
|
|
55
|
+
|
|
56
|
+
const monthEnabled = (yy: number, mm: number): boolean => {
|
|
57
|
+
const first = toKey(new Date(yy, mm, 1));
|
|
58
|
+
const last = toKey(new Date(yy, mm + 1, 0));
|
|
59
|
+
return (!min || last >= min) && (!max || first <= max);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
function toggle(next: boolean) {
|
|
63
|
+
if (next) {
|
|
64
|
+
const grid = gridBox(triggerRef.current);
|
|
65
|
+
setBox(grid ? { width: grid.width, height: grid.height } : null);
|
|
66
|
+
setPage(y - 1);
|
|
67
|
+
setYear(y);
|
|
68
|
+
setCursor(m);
|
|
69
|
+
}
|
|
70
|
+
setOpen(next);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (!open) return;
|
|
75
|
+
monthsRef.current?.querySelector<HTMLButtonElement>('[tabindex="0"]')?.focus();
|
|
76
|
+
}, [open, cursor]);
|
|
77
|
+
|
|
78
|
+
function turn(dir: number) {
|
|
79
|
+
const next = page + dir * YEARS_PER_PAGE;
|
|
80
|
+
if (next + YEARS_PER_PAGE - 1 < minYear || next > maxYear) return;
|
|
81
|
+
setPage(next);
|
|
82
|
+
yearGlide.leave();
|
|
83
|
+
const el = stripRef.current;
|
|
84
|
+
if (el) animate(el, slideIn(dir * UIMotion.dist.md, UIMotion.t.enter));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function moveCursor(delta: number) {
|
|
88
|
+
const next = cursor + delta;
|
|
89
|
+
if (next < 0 || next > MONTHS.length - 1) return;
|
|
90
|
+
setCursor(next);
|
|
91
|
+
}
|
|
92
|
+
function onKeyDown(e: KeyboardEvent<HTMLDivElement>) {
|
|
93
|
+
const k = e.key;
|
|
94
|
+
if (k === 'ArrowLeft') moveCursor(-1);
|
|
95
|
+
else if (k === 'ArrowRight') moveCursor(1);
|
|
96
|
+
else if (k === 'ArrowUp') moveCursor(-MONTH_COLUMNS);
|
|
97
|
+
else if (k === 'ArrowDown') moveCursor(MONTH_COLUMNS);
|
|
98
|
+
else return;
|
|
99
|
+
e.preventDefault();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function pick(mm: number) {
|
|
103
|
+
onPick(year, mm);
|
|
104
|
+
setOpen(false);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const years: number[] = [];
|
|
108
|
+
for (let i = 0; i < YEARS_PER_PAGE; i++) years.push(page + i);
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<Popover
|
|
112
|
+
open={open}
|
|
113
|
+
onOpenChange={toggle}
|
|
114
|
+
side="bottom"
|
|
115
|
+
align="center"
|
|
116
|
+
arrow
|
|
117
|
+
activateOn={activateOn}
|
|
118
|
+
htmlProps={box ? { style: box } : undefined}
|
|
119
|
+
trigger={
|
|
120
|
+
<button
|
|
121
|
+
type="button"
|
|
122
|
+
ref={triggerRef}
|
|
123
|
+
className="zc-dtp__jump"
|
|
124
|
+
aria-label={'Change month - ' + MONTHS[m] + ' ' + y}
|
|
125
|
+
>
|
|
126
|
+
<span className="zc-dtp__month" aria-live="polite">
|
|
127
|
+
{MONTHS[m]} <span className="zc-dtp__year">{y}</span>
|
|
128
|
+
</span>
|
|
129
|
+
<Icon name="caret-down" size="sm" className="zc-dtp__jumpCaret" />
|
|
130
|
+
</button>
|
|
131
|
+
}
|
|
132
|
+
>
|
|
133
|
+
<div className="zc-dtp__jumpPanel" role="group" aria-label="Jump to month" onKeyDown={onKeyDown}>
|
|
134
|
+
<div className="zc-dtp__jumpYears">
|
|
135
|
+
<button
|
|
136
|
+
type="button"
|
|
137
|
+
className="zc-dtp__nav"
|
|
138
|
+
aria-label="Earlier years"
|
|
139
|
+
disabled={page <= minYear}
|
|
140
|
+
{...activationProps<HTMLButtonElement>(() => turn(-1), { on: activateOn })}
|
|
141
|
+
>
|
|
142
|
+
<Icon name="caret-left" size="sm" />
|
|
143
|
+
</button>
|
|
144
|
+
<div className="zc-dtp__jumpStrip" ref={stripRef} onPointerLeave={yearGlide.leave}>
|
|
145
|
+
{years.map((yy) => (
|
|
146
|
+
<button
|
|
147
|
+
key={yy}
|
|
148
|
+
type="button"
|
|
149
|
+
className={cx('zc-dtp__jumpOpt', 'zc-dtp__jumpYear', yy === year && 'zc-is-active')}
|
|
150
|
+
disabled={yy < minYear || yy > maxYear}
|
|
151
|
+
aria-pressed={yy === year}
|
|
152
|
+
onPointerEnter={(e) => yearGlide.enter(e.currentTarget)}
|
|
153
|
+
{...activationProps<HTMLButtonElement>(() => setYear(yy), { on: activateOn })}
|
|
154
|
+
>
|
|
155
|
+
{yy}
|
|
156
|
+
</button>
|
|
157
|
+
))}
|
|
158
|
+
<GlidePill className="zc-dtp__jumpGlide" glide={yearGlide} />
|
|
159
|
+
</div>
|
|
160
|
+
<button
|
|
161
|
+
type="button"
|
|
162
|
+
className="zc-dtp__nav"
|
|
163
|
+
aria-label="Later years"
|
|
164
|
+
disabled={page + YEARS_PER_PAGE - 1 >= maxYear}
|
|
165
|
+
{...activationProps<HTMLButtonElement>(() => turn(1), { on: activateOn })}
|
|
166
|
+
>
|
|
167
|
+
<Icon name="caret-right" size="sm" />
|
|
168
|
+
</button>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<div className="zc-dtp__jumpMonths" ref={monthsRef} onPointerLeave={monthGlide.leave}>
|
|
172
|
+
{MONTHS.map((name, mm) => (
|
|
173
|
+
<button
|
|
174
|
+
key={name}
|
|
175
|
+
type="button"
|
|
176
|
+
className={cx('zc-dtp__jumpOpt', year === y && mm === m && 'zc-is-active')}
|
|
177
|
+
disabled={!monthEnabled(year, mm)}
|
|
178
|
+
tabIndex={mm === cursor ? 0 : -1}
|
|
179
|
+
aria-pressed={year === y && mm === m}
|
|
180
|
+
aria-label={name + ' ' + year}
|
|
181
|
+
onPointerEnter={(e) => monthGlide.enter(e.currentTarget)}
|
|
182
|
+
{...activationProps<HTMLButtonElement>(() => pick(mm), { on: activateOn })}
|
|
183
|
+
>
|
|
184
|
+
{name.slice(0, 3)}
|
|
185
|
+
</button>
|
|
186
|
+
))}
|
|
187
|
+
<GlidePill className="zc-dtp__jumpGlide" glide={monthGlide} />
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
</Popover>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
@@ -11,6 +11,7 @@ import { Icon } from '../../internal/icon/Icon';
|
|
|
11
11
|
import { activationProps, type ActivateOn } from '../../internal/utils/activation';
|
|
12
12
|
import { Button } from '../../primitives/button/Button';
|
|
13
13
|
import { add, col, DOW, grid, MONTHS, pad, parse, today, toKey, tzLabel, within } from './date-utils';
|
|
14
|
+
import { MonthJump } from './month-jump';
|
|
14
15
|
import { useDayFocus } from './use-day-focus';
|
|
15
16
|
|
|
16
17
|
const CAP_FLIP = { timing: UIMotion.t.settle };
|
|
@@ -153,11 +154,20 @@ export function DrpPanel({
|
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
const prevViewIdxRef = useRef(viewIdx);
|
|
156
|
-
const
|
|
157
|
+
const jumpedRef = useRef(false);
|
|
158
|
+
const navDir =
|
|
159
|
+
prevViewIdxRef.current === viewIdx || jumpedRef.current ? 0 : viewIdx > prevViewIdxRef.current ? 1 : -1;
|
|
157
160
|
useEffect(() => {
|
|
158
161
|
prevViewIdxRef.current = viewIdx;
|
|
162
|
+
jumpedRef.current = false;
|
|
159
163
|
}, [viewIdx]);
|
|
160
164
|
|
|
165
|
+
function jumpToMonth(y: number, m: number, offset: number) {
|
|
166
|
+
jumpedRef.current = true;
|
|
167
|
+
const base = new Date(y, m - offset, 1);
|
|
168
|
+
setView({ y: base.getFullYear(), m: base.getMonth() });
|
|
169
|
+
}
|
|
170
|
+
|
|
161
171
|
function moveFocus(deltaDays: number, deltaMonths = 0) {
|
|
162
172
|
const d = parse(focusKey);
|
|
163
173
|
if (deltaMonths) d.setMonth(d.getMonth() + deltaMonths);
|
|
@@ -212,17 +222,17 @@ export function DrpPanel({
|
|
|
212
222
|
const loCap = isLo && capHere;
|
|
213
223
|
const hiCap = isHi && !single && capHere;
|
|
214
224
|
|
|
215
|
-
const cls = ['dtp__day'];
|
|
216
|
-
if (out) cls.push('is-out');
|
|
217
|
-
if (inRange) cls.push('is-in-range');
|
|
218
|
-
if ((loGhost || hiGhost) && capHere) cls.push('is-cap-ghost');
|
|
219
|
-
else if (loCap || hiCap) cls.push('is-cap');
|
|
225
|
+
const cls = ['zc-dtp__day'];
|
|
226
|
+
if (out) cls.push('zc-is-out');
|
|
227
|
+
if (inRange) cls.push('zc-is-in-range');
|
|
228
|
+
if ((loGhost || hiGhost) && capHere) cls.push('zc-is-cap-ghost');
|
|
229
|
+
else if (loCap || hiCap) cls.push('zc-is-cap');
|
|
220
230
|
|
|
221
|
-
const bandCls = ['drp__band'];
|
|
222
|
-
if (extL) bandCls.push('drp__band--extL');
|
|
223
|
-
if (extR) bandCls.push('drp__band--extR');
|
|
224
|
-
if (!extL) bandCls.push('drp__band--roundL');
|
|
225
|
-
if (!extR) bandCls.push('drp__band--roundR');
|
|
231
|
+
const bandCls = ['zc-drp__band'];
|
|
232
|
+
if (extL) bandCls.push('zc-drp__band--extL');
|
|
233
|
+
if (extR) bandCls.push('zc-drp__band--extR');
|
|
234
|
+
if (!extL) bandCls.push('zc-drp__band--roundL');
|
|
235
|
+
if (!extR) bandCls.push('zc-drp__band--roundR');
|
|
226
236
|
|
|
227
237
|
return (
|
|
228
238
|
<button
|
|
@@ -248,7 +258,7 @@ export function DrpPanel({
|
|
|
248
258
|
as="span"
|
|
249
259
|
layoutId={capLoId}
|
|
250
260
|
layoutTransition={CAP_FLIP}
|
|
251
|
-
className={'drp__cap' + (loGhost ? ' drp__cap--ghost' : '')}
|
|
261
|
+
className={'zc-drp__cap' + (loGhost ? ' zc-drp__cap--ghost' : '')}
|
|
252
262
|
aria-hidden="true"
|
|
253
263
|
/>
|
|
254
264
|
) : null}
|
|
@@ -257,12 +267,12 @@ export function DrpPanel({
|
|
|
257
267
|
as="span"
|
|
258
268
|
layoutId={capHiId}
|
|
259
269
|
layoutTransition={CAP_FLIP}
|
|
260
|
-
className={'drp__cap' + (hiGhost ? ' drp__cap--ghost' : '')}
|
|
270
|
+
className={'zc-drp__cap' + (hiGhost ? ' zc-drp__cap--ghost' : '')}
|
|
261
271
|
aria-hidden="true"
|
|
262
272
|
/>
|
|
263
273
|
) : null}
|
|
264
|
-
<span className="dtp__num">{d.getDate()}</span>
|
|
265
|
-
{key === todayKey ? <span className="dtp__dot" aria-hidden="true"></span> : null}
|
|
274
|
+
<span className="zc-dtp__num">{d.getDate()}</span>
|
|
275
|
+
{key === todayKey ? <span className="zc-dtp__dot" aria-hidden="true"></span> : null}
|
|
266
276
|
</button>
|
|
267
277
|
);
|
|
268
278
|
}
|
|
@@ -275,12 +285,12 @@ export function DrpPanel({
|
|
|
275
285
|
const prevEnd = toKey(new Date(y, m, 0));
|
|
276
286
|
const nextStart = toKey(new Date(y, m + 1, 1));
|
|
277
287
|
return (
|
|
278
|
-
<div className="dtp__cal" key={offset}>
|
|
279
|
-
<div className=
|
|
288
|
+
<div className="zc-dtp__cal" key={offset}>
|
|
289
|
+
<div className="zc-drp__mhead">
|
|
280
290
|
{withPrev ? (
|
|
281
291
|
<button
|
|
282
292
|
type="button"
|
|
283
|
-
className="dtp__nav"
|
|
293
|
+
className="zc-dtp__nav"
|
|
284
294
|
aria-label="Previous month"
|
|
285
295
|
disabled={min && prevEnd < min}
|
|
286
296
|
{...activationProps<HTMLButtonElement>(() => nav(-1), { on: activateOn })}
|
|
@@ -288,13 +298,18 @@ export function DrpPanel({
|
|
|
288
298
|
<Icon name="caret-left" size="sm" />
|
|
289
299
|
</button>
|
|
290
300
|
) : null}
|
|
291
|
-
<
|
|
292
|
-
|
|
293
|
-
|
|
301
|
+
<MonthJump
|
|
302
|
+
y={y}
|
|
303
|
+
m={m}
|
|
304
|
+
min={min}
|
|
305
|
+
max={max}
|
|
306
|
+
activateOn={activateOn}
|
|
307
|
+
onPick={(py, pm) => jumpToMonth(py, pm, offset)}
|
|
308
|
+
/>
|
|
294
309
|
{withNext ? (
|
|
295
310
|
<button
|
|
296
311
|
type="button"
|
|
297
|
-
className="dtp__nav"
|
|
312
|
+
className="zc-dtp__nav"
|
|
298
313
|
aria-label="Next month"
|
|
299
314
|
disabled={max && nextStart > max}
|
|
300
315
|
{...activationProps<HTMLButtonElement>(() => nav(1), { on: activateOn })}
|
|
@@ -303,13 +318,13 @@ export function DrpPanel({
|
|
|
303
318
|
</button>
|
|
304
319
|
) : null}
|
|
305
320
|
</div>
|
|
306
|
-
<div className="dtp__dow" aria-hidden="true">
|
|
321
|
+
<div className="zc-dtp__dow" aria-hidden="true">
|
|
307
322
|
{DOW.map((d) => (
|
|
308
323
|
<span key={d}>{d}</span>
|
|
309
324
|
))}
|
|
310
325
|
</div>
|
|
311
326
|
<div
|
|
312
|
-
className="dtp__days"
|
|
327
|
+
className="zc-dtp__days"
|
|
313
328
|
role="grid"
|
|
314
329
|
aria-label={MONTHS[m] + ' ' + y}
|
|
315
330
|
key={'days-' + viewIdx + '-' + offset}
|
|
@@ -328,13 +343,13 @@ export function DrpPanel({
|
|
|
328
343
|
|
|
329
344
|
return (
|
|
330
345
|
<div
|
|
331
|
-
className={'drp' + (layout === 'sheet' ? ' drp--sheet' : '')}
|
|
346
|
+
className={'zc-drp' + (layout === 'sheet' ? ' zc-drp--sheet' : '')}
|
|
332
347
|
role="dialog"
|
|
333
348
|
aria-label={label || 'Pick a date range'}
|
|
334
349
|
>
|
|
335
|
-
<div className="drp__body">
|
|
350
|
+
<div className="zc-drp__body">
|
|
336
351
|
<div
|
|
337
|
-
className="drp__presets"
|
|
352
|
+
className="zc-drp__presets"
|
|
338
353
|
role="group"
|
|
339
354
|
aria-label="Quick ranges"
|
|
340
355
|
ref={presetsRef}
|
|
@@ -344,17 +359,17 @@ export function DrpPanel({
|
|
|
344
359
|
<button
|
|
345
360
|
key={p.id}
|
|
346
361
|
type="button"
|
|
347
|
-
className={'drp__preset' + (presetActive(p) ? ' is-active' : '')}
|
|
362
|
+
className={'zc-drp__preset' + (presetActive(p) ? ' zc-is-active' : '')}
|
|
348
363
|
onPointerEnter={(e) => presetGlide.enter(e.currentTarget)}
|
|
349
364
|
{...activationProps<HTMLButtonElement>(() => applyPreset(p), { on: activateOn })}
|
|
350
365
|
>
|
|
351
366
|
{p.label}
|
|
352
367
|
</button>
|
|
353
368
|
))}
|
|
354
|
-
<GlidePill className="drp__presetGlide" glide={presetGlide} />
|
|
369
|
+
<GlidePill className="zc-drp__presetGlide" glide={presetGlide} />
|
|
355
370
|
</div>
|
|
356
371
|
<div
|
|
357
|
-
className="drp__months"
|
|
372
|
+
className="zc-drp__months"
|
|
358
373
|
ref={daysRef}
|
|
359
374
|
onKeyDown={onGridKeyDown}
|
|
360
375
|
onPointerLeave={() => {
|
|
@@ -363,15 +378,15 @@ export function DrpPanel({
|
|
|
363
378
|
}}
|
|
364
379
|
>
|
|
365
380
|
{months === 2 ? [renderMonth(0, true, false), renderMonth(1, false, true)] : renderMonth(0, true, true)}
|
|
366
|
-
<GlidePill className="dtp__hover" glide={gridGlide} />
|
|
381
|
+
<GlidePill className="zc-dtp__hover" glide={gridGlide} />
|
|
367
382
|
</div>
|
|
368
383
|
</div>
|
|
369
|
-
<div className="drp__foot">
|
|
370
|
-
<span className={'drp__readout' + (lo && hi ? '' : ' is-empty')}>
|
|
384
|
+
<div className="zc-drp__foot">
|
|
385
|
+
<span className={'zc-drp__readout' + (lo && hi ? '' : ' zc-is-empty')}>
|
|
371
386
|
{lo && hi ? (
|
|
372
387
|
<Fragment>
|
|
373
388
|
{drpRangeText(lo, hi)}{' '}
|
|
374
|
-
<span className="drp__count">
|
|
389
|
+
<span className="zc-drp__count">
|
|
375
390
|
- {drpDays(lo, hi)} {drpDays(lo, hi) === 1 ? 'day' : 'days'}
|
|
376
391
|
</span>
|
|
377
392
|
</Fragment>
|
|
@@ -381,8 +396,8 @@ export function DrpPanel({
|
|
|
381
396
|
'Pick a start date'
|
|
382
397
|
)}
|
|
383
398
|
</span>
|
|
384
|
-
{timezone ? <span className="drp__tz">{tzLabel(timezone)}</span> : null}
|
|
385
|
-
<span className="drp__footSpacer"></span>
|
|
399
|
+
{timezone ? <span className="zc-drp__tz">{tzLabel(timezone)}</span> : null}
|
|
400
|
+
<span className="zc-drp__footSpacer"></span>
|
|
386
401
|
<Button variant="primary" size="sm" onClick={close}>
|
|
387
402
|
Done
|
|
388
403
|
</Button>
|
|
@@ -23,7 +23,6 @@ export interface TimeSegmentsProps {
|
|
|
23
23
|
max?: string | null;
|
|
24
24
|
disabled?: boolean;
|
|
25
25
|
ariaLabel?: string;
|
|
26
|
-
className?: string;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
export const disp12 = (h24: number): number => ((h24 + 11) % 12) + 1;
|
|
@@ -46,7 +45,6 @@ export function TimeSegments({
|
|
|
46
45
|
max = null,
|
|
47
46
|
disabled = false,
|
|
48
47
|
ariaLabel = 'Time',
|
|
49
|
-
className = '',
|
|
50
48
|
}: TimeSegmentsProps) {
|
|
51
49
|
const is12 = format === '12h';
|
|
52
50
|
const seed = value ? value.split(':').map(Number) : [null, null];
|
|
@@ -230,12 +228,12 @@ export function TimeSegments({
|
|
|
230
228
|
const hText = pend && pend.seg === 'h' ? pad(pend.d) : h == null ? '--' : pad(is12 ? disp12(h) : h);
|
|
231
229
|
const mText = pend && pend.seg === 'm' ? pad(pend.d) : m == null ? '--' : pad(m);
|
|
232
230
|
|
|
233
|
-
const segCls = (empty: boolean): string => 'tsg__seg' + (empty ? ' is-empty' : '');
|
|
231
|
+
const segCls = (empty: boolean): string => 'zc-tsg__seg' + (empty ? ' zc-is-empty' : '');
|
|
234
232
|
const tab = disabled ? -1 : 0;
|
|
235
233
|
|
|
236
234
|
return (
|
|
237
235
|
<div
|
|
238
|
-
className={cx('tsg', disabled && 'is-disabled'
|
|
236
|
+
className={cx('zc-tsg', disabled && 'zc-is-disabled')}
|
|
239
237
|
role="group"
|
|
240
238
|
aria-label={ariaLabel}
|
|
241
239
|
aria-disabled={disabled || undefined}
|
|
@@ -256,7 +254,7 @@ export function TimeSegments({
|
|
|
256
254
|
>
|
|
257
255
|
{hText}
|
|
258
256
|
</span>
|
|
259
|
-
<span className="tsg__sep" aria-hidden="true">
|
|
257
|
+
<span className="zc-tsg__sep" aria-hidden="true">
|
|
260
258
|
:
|
|
261
259
|
</span>
|
|
262
260
|
<span
|
|
@@ -277,7 +275,7 @@ export function TimeSegments({
|
|
|
277
275
|
{is12 ? (
|
|
278
276
|
<span
|
|
279
277
|
ref={merRef}
|
|
280
|
-
className="tsg__seg tsg__seg--mer"
|
|
278
|
+
className="zc-tsg__seg zc-tsg__seg--mer"
|
|
281
279
|
role="spinbutton"
|
|
282
280
|
tabIndex={tab}
|
|
283
281
|
aria-label="AM or PM"
|
|
@@ -16,7 +16,7 @@ export function useDayFocus(
|
|
|
16
16
|
const btn =
|
|
17
17
|
(seedSelector && el.querySelector(seedSelector)) ||
|
|
18
18
|
el.querySelector('[data-key="' + focusKey + '"]:not(:disabled)') ||
|
|
19
|
-
el.querySelector('.dtp__day:not(:disabled)');
|
|
19
|
+
el.querySelector('.zc-dtp__day:not(:disabled)');
|
|
20
20
|
if (btn) (btn as HTMLElement).focus({ preventScroll: true });
|
|
21
21
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
22
22
|
}, []);
|
|
@@ -96,7 +96,7 @@ function DialogSurface({
|
|
|
96
96
|
return (
|
|
97
97
|
<section
|
|
98
98
|
{...htmlProps}
|
|
99
|
-
className={cx('dialog', htmlProps?.className)}
|
|
99
|
+
className={cx('zc-dialog', htmlProps?.className)}
|
|
100
100
|
role="dialog"
|
|
101
101
|
aria-modal="true"
|
|
102
102
|
data-size={size === 'md' ? undefined : size}
|
|
@@ -105,37 +105,37 @@ function DialogSurface({
|
|
|
105
105
|
aria-describedby={description ? descId : undefined}
|
|
106
106
|
>
|
|
107
107
|
{(icon || title || description || dismissible) && (
|
|
108
|
-
<header className="dialog__header">
|
|
108
|
+
<header className="zc-dialog__header">
|
|
109
109
|
{icon && (
|
|
110
|
-
<span className="dialog__icon">
|
|
110
|
+
<span className="zc-dialog__icon">
|
|
111
111
|
<IconSlot size="md">{icon}</IconSlot>
|
|
112
112
|
</span>
|
|
113
113
|
)}
|
|
114
|
-
<div className="dialog__heading">
|
|
114
|
+
<div className="zc-dialog__heading">
|
|
115
115
|
{title && (
|
|
116
|
-
<h2 className="dialog__title" id={titleId}>
|
|
116
|
+
<h2 className="zc-dialog__title" id={titleId}>
|
|
117
117
|
{title}
|
|
118
118
|
</h2>
|
|
119
119
|
)}
|
|
120
120
|
{description && (
|
|
121
|
-
<p className="dialog__desc" id={descId}>
|
|
121
|
+
<p className="zc-dialog__desc" id={descId}>
|
|
122
122
|
{description}
|
|
123
123
|
</p>
|
|
124
124
|
)}
|
|
125
125
|
</div>
|
|
126
126
|
{dismissible && (
|
|
127
|
-
<button type="button" className="dialog__close" aria-label="Close dialog" onClick={requestClose}>
|
|
127
|
+
<button type="button" className="zc-dialog__close" aria-label="Close dialog" onClick={requestClose}>
|
|
128
128
|
<Icon name="x" size="sm" weight="bold" />
|
|
129
129
|
</button>
|
|
130
130
|
)}
|
|
131
131
|
</header>
|
|
132
132
|
)}
|
|
133
133
|
|
|
134
|
-
<div className="dialog__body" ref={bodyRef}>
|
|
134
|
+
<div className="zc-dialog__body" ref={bodyRef}>
|
|
135
135
|
{children}
|
|
136
136
|
</div>
|
|
137
137
|
|
|
138
|
-
{footerContent && <footer className="dialog__footer">{footerContent}</footer>}
|
|
138
|
+
{footerContent && <footer className="zc-dialog__footer">{footerContent}</footer>}
|
|
139
139
|
</section>
|
|
140
140
|
);
|
|
141
141
|
}
|
|
@@ -190,8 +190,8 @@ export function Dialog({
|
|
|
190
190
|
timing: timings.open,
|
|
191
191
|
}}
|
|
192
192
|
exit={{ y: [UIMotion.dist.sm], scale: [UIMotion.scale.panel], opacity: [0], timing: timings.close }}
|
|
193
|
-
layerClass="overlay-layer--dialog"
|
|
194
|
-
panelClass="overlay-panel--dialog"
|
|
193
|
+
layerClass="zc-overlay-layer--dialog"
|
|
194
|
+
panelClass="zc-overlay-panel--dialog"
|
|
195
195
|
panelId={panelId}
|
|
196
196
|
dismissible={dismissible}
|
|
197
197
|
container={container}
|