@zyncat/ui 0.13.0 → 0.15.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 +72 -13
- package/dist/alert.css +26 -33
- package/dist/alert.js +18 -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 +51 -50
- package/dist/avatar.js +29 -7
- package/dist/avatar.js.map +1 -1
- package/dist/badge.css +30 -36
- package/dist/badge.js +1 -1
- package/dist/button.css +80 -96
- package/dist/button.js +1 -1
- package/dist/checkbox.css +27 -32
- package/dist/checkbox.js +2 -2
- package/dist/{chunk-RJFGWJ4W.js → chunk-3XRVPCIM.js} +6 -6
- package/dist/chunk-3XRVPCIM.js.map +1 -0
- package/dist/{chunk-M43IOM5C.js → chunk-5GBV45YD.js} +3 -3
- package/dist/{chunk-M43IOM5C.js.map → chunk-5GBV45YD.js.map} +1 -1
- 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-AADAJL7D.js → chunk-5X3MJRIM.js} +8 -9
- package/dist/chunk-5X3MJRIM.js.map +1 -0
- package/dist/{chunk-TCUCYFT7.js → chunk-6SUHSSOK.js} +3 -3
- package/dist/{chunk-TCUCYFT7.js.map → chunk-6SUHSSOK.js.map} +1 -1
- package/dist/{chunk-DDRSMHN4.js → chunk-6X3G4GIM.js} +3 -3
- package/dist/{chunk-DDRSMHN4.js.map → chunk-6X3G4GIM.js.map} +1 -1
- package/dist/{chunk-TYHR4VNM.js → chunk-AREEMG47.js} +10 -8
- package/dist/chunk-AREEMG47.js.map +1 -0
- package/dist/{chunk-EF6RPXU7.js → chunk-BH4JFWXQ.js} +36 -31
- package/dist/chunk-BH4JFWXQ.js.map +1 -0
- package/dist/{chunk-TVYH4AN7.js → chunk-BTF6DAE3.js} +13 -13
- package/dist/chunk-BTF6DAE3.js.map +1 -0
- package/dist/{chunk-CF4QHO4N.js → chunk-CAXQJSIE.js} +10 -10
- package/dist/{chunk-CF4QHO4N.js.map → chunk-CAXQJSIE.js.map} +1 -1
- package/dist/{chunk-4C5RZXBT.js → chunk-CFRGQJ23.js} +8 -8
- package/dist/chunk-CFRGQJ23.js.map +1 -0
- package/dist/{chunk-IJS7TPGV.js → chunk-FEXUS4SV.js} +6 -5
- package/dist/chunk-FEXUS4SV.js.map +1 -0
- package/dist/{chunk-227ZW4V7.js → chunk-FLQVOSFC.js} +11 -11
- package/dist/chunk-FLQVOSFC.js.map +1 -0
- package/dist/{chunk-FONOS5RN.js → chunk-FVPNICF4.js} +11 -10
- package/dist/chunk-FVPNICF4.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-4BSHB7R3.js → chunk-GJTHWB6O.js} +9 -9
- package/dist/chunk-GJTHWB6O.js.map +1 -0
- package/dist/{chunk-EAI4POPB.js → chunk-GOLSYGRA.js} +45 -75
- package/dist/chunk-GOLSYGRA.js.map +1 -0
- package/dist/chunk-H3X2263Y.js +17 -0
- package/dist/chunk-H3X2263Y.js.map +1 -0
- package/dist/chunk-K45CWVHS.js +53 -0
- package/dist/chunk-K45CWVHS.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-TUTXXC3W.js → chunk-MDSRZ4QR.js} +3 -3
- package/dist/{chunk-TUTXXC3W.js.map → chunk-MDSRZ4QR.js.map} +1 -1
- package/dist/chunk-N2GJEO5Z.js +101 -0
- package/dist/chunk-N2GJEO5Z.js.map +1 -0
- package/dist/chunk-PU3QWBEL.js +39 -0
- package/dist/chunk-PU3QWBEL.js.map +1 -0
- package/dist/{chunk-43M6GQ4Q.js → chunk-PWQVSVXR.js} +51 -32
- package/dist/chunk-PWQVSVXR.js.map +1 -0
- package/dist/chunk-QGVFFT2B.js +14 -0
- package/dist/chunk-QGVFFT2B.js.map +1 -0
- package/dist/{chunk-5PZ43DCG.js → chunk-RBSHRRNO.js} +12 -13
- package/dist/chunk-RBSHRRNO.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-HY5MPISE.js → chunk-UYSXJ7MH.js} +9 -9
- package/dist/chunk-UYSXJ7MH.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-3MPF7FZV.js → chunk-WCWV5IX6.js} +3 -3
- package/dist/{chunk-3MPF7FZV.js.map → chunk-WCWV5IX6.js.map} +1 -1
- package/dist/{chunk-VAXCXZ53.js → chunk-WZUTBJC4.js} +5 -4
- package/dist/chunk-WZUTBJC4.js.map +1 -0
- package/dist/cli.js +137 -25
- package/dist/collapse.css +15 -30
- package/dist/collapse.js +1 -1
- package/dist/confetti.css +19 -12
- 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 +20 -19
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +131 -154
- package/dist/date-range-field.js +55 -54
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +24 -23
- package/dist/datetime-field.js.map +1 -1
- package/dist/dialog.css +31 -41
- package/dist/dialog.js +23 -22
- package/dist/dialog.js.map +1 -1
- package/dist/digit-strip.css +16 -16
- package/dist/dropdown.css +36 -27
- 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 +145 -148
- package/dist/facebook-feed.js +106 -102
- package/dist/facebook-feed.js.map +1 -1
- package/dist/flow-field.css +8 -4
- package/dist/flow-field.js +7 -6
- package/dist/flow-field.js.map +1 -1
- package/dist/glide.js +4 -3
- package/dist/icon.css +7 -10
- package/dist/input.css +76 -84
- package/dist/instagram-feed.css +65 -66
- package/dist/instagram-feed.js +61 -44
- package/dist/instagram-feed.js.map +1 -1
- package/dist/lens.css +42 -38
- package/dist/lens.js +17 -16
- package/dist/lens.js.map +1 -1
- package/dist/mcp.js +3 -2
- package/dist/menu-surface.css +54 -34
- package/dist/modal.css +2 -4
- package/dist/modal.js +12 -11
- package/dist/modal.js.map +1 -1
- package/dist/morphing-text.css +26 -16
- package/dist/morphing-text.js +14 -13
- package/dist/morphing-text.js.map +1 -1
- package/dist/motion-devtools.css +42 -68
- package/dist/motion-devtools.js +47 -39
- 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 +14 -14
- package/dist/number-field.js.map +1 -1
- package/dist/odometer.css +22 -16
- 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 +4 -9
- package/dist/pagination.css +10 -15
- package/dist/pagination.js +11 -10
- package/dist/pagination.js.map +1 -1
- package/dist/popover.css +13 -15
- package/dist/popover.js +10 -9
- package/dist/radio-group.css +60 -73
- package/dist/radio-group.js +30 -29
- package/dist/radio-group.js.map +1 -1
- package/dist/select.css +66 -75
- package/dist/select.js +19 -14
- package/dist/select.js.map +1 -1
- package/dist/sheet.css +12 -14
- package/dist/sheet.js +11 -10
- package/dist/status-badge.js +9 -9
- package/dist/status-badge.js.map +1 -1
- package/dist/styles.css +34 -34
- package/dist/support-rail.css +116 -100
- package/dist/support-rail.js +41 -40
- package/dist/support-rail.js.map +1 -1
- package/dist/table.css +76 -84
- package/dist/table.js +42 -41
- package/dist/table.js.map +1 -1
- package/dist/tabs.css +82 -90
- package/dist/tabs.js +23 -20
- package/dist/tabs.js.map +1 -1
- package/dist/tag.css +48 -53
- package/dist/tag.js +13 -12
- package/dist/tag.js.map +1 -1
- package/dist/text-field.js +5 -5
- package/dist/textarea.css +46 -49
- package/dist/textarea.js +16 -16
- package/dist/textarea.js.map +1 -1
- package/dist/theme.js +31 -15
- package/dist/theme.js.map +1 -1
- package/dist/tiktok.css +113 -117
- 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 +49 -65
- package/dist/toast.js +32 -26
- package/dist/toast.js.map +1 -1
- package/dist/toggle-tag.js +22 -13
- package/dist/toggle-tag.js.map +1 -1
- package/dist/toggle.css +26 -31
- package/dist/toggle.js +7 -7
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.css +16 -23
- package/dist/tooltip.js +117 -95
- package/dist/tooltip.js.map +1 -1
- package/dist/trigger.css +3 -3
- 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/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/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/dev/MotionDevtools.d.ts +3 -1
- package/dist/types/components/internal/hooks/use-host-election.d.ts +8 -0
- package/dist/types/components/internal/icon/Icon.d.ts +1 -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 +1 -1
- package/dist/types/components/primitives/input/TextField.d.ts +1 -2
- package/dist/types/components/primitives/textarea/Textarea.d.ts +0 -1
- package/dist/types/shared-slot.d.ts +1 -0
- package/dist/types/tokens/component-styles.generated.d.ts +79 -151
- 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-sync.d.ts +3 -0
- package/dist/types/tokens/theme-tokens.generated.d.ts +669 -1105
- package/dist/typing-lines.css +17 -10
- package/dist/typing-lines.js +9 -8
- package/dist/typing-lines.js.map +1 -1
- package/dist/weight-field.css +31 -17
- package/dist/weight-field.js +4 -4
- package/dist/weight-field.js.map +1 -1
- package/dist/youtube.css +90 -96
- package/dist/youtube.js +87 -86
- package/dist/youtube.js.map +1 -1
- package/package.json +3 -1
- package/skills/zyncat-ui/SKILL.md +5 -3
- package/skills/zyncat-ui/references/components.md +4 -4
- package/skills/zyncat-ui/references/theming.md +105 -34
- package/src/components/composites/alert/Alert.tsx +9 -10
- package/src/components/composites/alert/alert.css +26 -33
- 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 +25 -20
- package/src/components/composites/date-picker/date-picker.css +131 -154
- package/src/components/composites/date-picker/field-shell.tsx +7 -7
- package/src/components/composites/date-picker/range-panel.tsx +34 -34
- 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 +31 -41
- 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 +36 -27
- 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 +34 -34
- 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 +2 -4
- package/src/components/composites/pagination/Pagination.tsx +7 -7
- package/src/components/composites/pagination/pagination.css +10 -15
- package/src/components/composites/popover/Popover.tsx +2 -2
- package/src/components/composites/popover/popover.css +13 -15
- 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 +66 -75
- package/src/components/composites/sheet/Sheet.tsx +2 -2
- package/src/components/composites/sheet/sheet.css +12 -14
- 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 +76 -84
- 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 +82 -90
- package/src/components/composites/toast/Toast.tsx +23 -18
- package/src/components/composites/toast/toast-store.ts +8 -6
- package/src/components/composites/toast/toast.css +49 -65
- 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 +16 -23
- package/src/components/compound/support-rail/SupportRail.tsx +33 -33
- package/src/components/compound/support-rail/support-rail.css +116 -100
- package/src/components/dev/MotionDevtools.tsx +28 -17
- package/src/components/dev/MotionDevtools.usage.md +2 -2
- package/src/components/dev/motion-devtools.css +42 -68
- 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 +19 -12
- package/src/components/expressive/facebook-feed/chrome.tsx +2 -2
- package/src/components/expressive/facebook-feed/facebook-feed.css +145 -148
- 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 +4 -4
- package/src/components/expressive/flow-field/flow-field.css +8 -4
- package/src/components/expressive/instagram-feed/InstagramFeed.tsx +52 -44
- package/src/components/expressive/instagram-feed/instagram-feed.css +65 -66
- package/src/components/expressive/lens/Lens.tsx +14 -14
- package/src/components/expressive/lens/lens.css +42 -38
- package/src/components/expressive/morphing-text/MorphingText.tsx +12 -13
- package/src/components/expressive/morphing-text/morphing-text.css +26 -16
- package/src/components/expressive/odometer/Odometer.tsx +9 -9
- package/src/components/expressive/odometer/odometer.css +22 -16
- package/src/components/expressive/tiktok/TikTok.tsx +54 -54
- package/src/components/expressive/tiktok/tiktok.css +113 -117
- package/src/components/expressive/typing-lines/TypingLines.tsx +0 -0
- package/src/components/expressive/typing-lines/typing-lines.css +17 -10
- package/src/components/expressive/weight-field/WeightField.tsx +4 -4
- package/src/components/expressive/weight-field/weight-field.css +31 -17
- 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 +90 -96
- package/src/components/internal/glass/glass.css +19 -22
- 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 +1 -5
- package/src/components/internal/icon/IconSlot.tsx +1 -1
- package/src/components/internal/icon/icon.css +7 -10
- 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 +54 -34
- 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 +4 -9
- package/src/components/internal/overlay/trigger.css +3 -3
- 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 +51 -50
- 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 +30 -36
- package/src/components/primitives/badge/digit-strip.css +16 -16
- package/src/components/primitives/badge/digit-strip.tsx +4 -4
- package/src/components/primitives/button/Button.tsx +8 -8
- package/src/components/primitives/button/button.css +80 -96
- 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 +27 -32
- package/src/components/primitives/collapse/Collapse.tsx +2 -2
- package/src/components/primitives/collapse/collapse.css +15 -30
- 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 +76 -84
- package/src/components/primitives/radio-group/RadioGroup.tsx +23 -23
- package/src/components/primitives/radio-group/radio-group.css +60 -73
- 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 +48 -53
- package/src/components/primitives/textarea/Textarea.tsx +13 -14
- package/src/components/primitives/textarea/textarea.css +46 -49
- package/src/components/primitives/toggle/Toggle.tsx +7 -7
- package/src/components/primitives/toggle/toggle.css +26 -31
- package/src/engine/animate.ts +2 -1
- package/src/engine/flip.ts +2 -1
- package/src/mcp/server.ts +3 -1
- 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 +7 -15
- package/src/tokens/base.css +15 -0
- package/src/tokens/color.css +19 -59
- package/src/tokens/component-styles.generated.ts +79 -151
- package/src/tokens/dark.css +63 -0
- package/src/tokens/decisions.css +26 -0
- package/src/tokens/elevation.css +71 -21
- package/src/tokens/fonts.css +0 -2
- package/src/tokens/glass.css +15 -9
- 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 +12 -22
- package/src/tokens/radius.css +10 -9
- package/src/tokens/semantic.css +57 -37
- package/src/tokens/spacing.css +5 -6
- package/src/tokens/theme-sync.tsx +15 -0
- package/src/tokens/theme-tokens.generated.ts +682 -1109
- package/src/tokens/theme.tsx +22 -16
- package/src/tokens/theme.usage.md +19 -13
- package/src/tokens/typography.css +16 -19
- package/tailwind.css +193 -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.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-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
package/dist/pagination.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/composites/pagination/Pagination.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/composites/pagination/Pagination.tsx"],"names":[],"mappings":"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","file":"pagination.js","sourcesContent":["'use client';\n\nimport './pagination.css';\n\nimport { useEffect, useRef, type HTMLAttributes } from 'react';\n\nimport type { DataAttributes } from '../../../dom-props';\nimport { animate } from '../../../engine';\nimport { slideIn } from '../../../motion/presets';\nimport { UIMotion } from '../../../tokens/motion-tokens';\nimport { Icon } from '../../internal/icon/Icon';\nimport { cx } from '../../internal/utils/cx';\nimport { Button } from '../../primitives/button/Button';\n\nexport interface PaginationProps {\n /** Accessible name for the nav landmark - name the list (\"Posts\"), not \"pagination\". @default 'Pagination' */\n ariaLabel?: string;\n /** Items currently shown, 1-based inclusive: `[from, to]` (e.g. `[26, 50]`). */\n range: [number, number];\n /** Total item count - render `of N` only when the API reports one; omit for endless lists. */\n total?: number | null;\n /** A previous cursor exists. @default false */\n hasPrev?: boolean;\n /** A next cursor exists. @default false */\n hasNext?: boolean;\n /** Fired when the previous arrow is pressed. */\n onPrev?: () => void;\n /** Fired when the next arrow is pressed. */\n onNext?: () => void;\n /** A page fetch is in flight: both arrows go inert, the clicked arrow carries the spinner. @default false */\n loading?: boolean;\n /** Extra class(es) merged onto the root element. */\n className?: string;\n /** Standard <nav> attributes (style, data-*, aria-*, ...) forwarded to the root. */\n htmlProps?: Omit<HTMLAttributes<HTMLElement>, 'className'> & DataAttributes;\n}\n\nfunction pgnFormat(n: number) {\n return n.toLocaleString('en-US').replace(/,/g, '\\u2009');\n}\n\nexport function Pagination({\n ariaLabel = 'Pagination',\n range,\n total = null,\n hasPrev = false,\n hasNext = false,\n onPrev,\n onNext,\n loading = false,\n className = '',\n htmlProps,\n}: PaginationProps) {\n const rangeRef = useRef<HTMLSpanElement>(null);\n const prevBtnRef = useRef<HTMLButtonElement>(null);\n const nextBtnRef = useRef<HTMLButtonElement>(null);\n const shownRef = useRef<[number, number]>(range);\n const lastDirRef = useRef(0);\n\n const from = range[0];\n const to = range[1];\n\n useEffect(() => {\n const pf = shownRef.current[0],\n pt = shownRef.current[1];\n if (pf === from && pt === to) return;\n const dir = from > pf ? 1 : -1;\n shownRef.current = range;\n if (rangeRef.current) animate(rangeRef.current, slideIn(dir * UIMotion.dist.sm, UIMotion.t.enter));\n }, [from, to]);\n\n useEffect(() => {\n if (loading || document.activeElement !== document.body) return;\n const d = lastDirRef.current;\n if (d === 1 && !hasNext && hasPrev && prevBtnRef.current) prevBtnRef.current.focus();\n if (d === -1 && !hasPrev && hasNext && nextBtnRef.current) nextBtnRef.current.focus();\n }, [loading, hasPrev, hasNext]);\n\n const prevBusy = loading && lastDirRef.current === -1;\n const nextBusy = loading && lastDirRef.current === 1;\n\n return (\n <nav className={cx('zc-pgn', className)} aria-label={ariaLabel} aria-busy={loading || undefined} {...htmlProps}>\n <span className=\"zc-pgn__readout\" aria-live=\"polite\">\n <span className=\"zc-pgn__range\" ref={rangeRef}>\n <b>\n {pgnFormat(from)}-{pgnFormat(to)}\n </b>\n {total != null ? <span className=\"zc-pgn__total\"> of {pgnFormat(total)}</span> : null}\n </span>\n </span>\n <div className=\"zc-pgn__nav\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n ref={prevBtnRef}\n className=\"zc-pgn__btn zc-pgn__btn--prev\"\n loading={prevBusy}\n disabled={!hasPrev || loading}\n htmlProps={{ 'aria-label': 'Previous page' }}\n onClick={() => {\n lastDirRef.current = -1;\n if (onPrev) onPrev();\n }}\n >\n <Icon name=\"caret-left\" size=\"sm\" />\n </Button>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n ref={nextBtnRef}\n className=\"zc-pgn__btn zc-pgn__btn--next\"\n loading={nextBusy}\n disabled={!hasNext || loading}\n htmlProps={{ 'aria-label': 'Next page' }}\n onClick={() => {\n lastDirRef.current = 1;\n if (onNext) onNext();\n }}\n >\n <Icon name=\"caret-right\" size=\"sm\" />\n </Button>\n </div>\n </nav>\n );\n}\n"]}
|
package/dist/popover.css
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
@layer zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.components {
|
|
4
|
-
|
|
5
|
-
.overlay-popover {
|
|
4
|
+
.zc-overlay-popover {
|
|
6
5
|
position: fixed;
|
|
7
6
|
top: 0;
|
|
8
7
|
left: 0;
|
|
@@ -10,31 +9,30 @@
|
|
|
10
9
|
outline: none;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
.overlay-popover[data-align='start'] {
|
|
12
|
+
.zc-overlay-popover[data-align='start'] {
|
|
14
13
|
--ov-origin: var(--space-4);
|
|
15
14
|
}
|
|
16
|
-
.overlay-popover[data-align='center'] {
|
|
15
|
+
.zc-overlay-popover[data-align='center'] {
|
|
17
16
|
--ov-origin: 50%;
|
|
18
17
|
}
|
|
19
|
-
.overlay-popover[data-align='end'] {
|
|
18
|
+
.zc-overlay-popover[data-align='end'] {
|
|
20
19
|
--ov-origin: calc(100% - var(--space-4));
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
.overlay-popover[data-side='bottom'] {
|
|
22
|
+
.zc-overlay-popover[data-side='bottom'] {
|
|
24
23
|
transform-origin: var(--overlay-arrow-x, var(--ov-origin)) top;
|
|
25
24
|
}
|
|
26
|
-
.overlay-popover[data-side='top'] {
|
|
25
|
+
.zc-overlay-popover[data-side='top'] {
|
|
27
26
|
transform-origin: var(--overlay-arrow-x, var(--ov-origin)) bottom;
|
|
28
27
|
}
|
|
29
|
-
.overlay-popover[data-side='right'] {
|
|
28
|
+
.zc-overlay-popover[data-side='right'] {
|
|
30
29
|
transform-origin: left var(--overlay-arrow-y, var(--ov-origin));
|
|
31
30
|
}
|
|
32
|
-
.overlay-popover[data-side='left'] {
|
|
31
|
+
.zc-overlay-popover[data-side='left'] {
|
|
33
32
|
transform-origin: right var(--overlay-arrow-y, var(--ov-origin));
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
.overlay-popover__arrow {
|
|
35
|
+
.zc-overlay-popover__arrow {
|
|
38
36
|
position: absolute;
|
|
39
37
|
width: 10px;
|
|
40
38
|
height: 10px;
|
|
@@ -42,28 +40,28 @@
|
|
|
42
40
|
border: var(--border-hairline) solid var(--border-default);
|
|
43
41
|
pointer-events: none;
|
|
44
42
|
}
|
|
45
|
-
.overlay-popover[data-side='bottom'] .overlay-popover__arrow {
|
|
43
|
+
.zc-overlay-popover[data-side='bottom'] .zc-overlay-popover__arrow {
|
|
46
44
|
top: -5px;
|
|
47
45
|
left: var(--overlay-arrow-x, 50%);
|
|
48
46
|
transform: translateX(-50%) rotate(45deg);
|
|
49
47
|
border-right: none;
|
|
50
48
|
border-bottom: none;
|
|
51
49
|
}
|
|
52
|
-
.overlay-popover[data-side='top'] .overlay-popover__arrow {
|
|
50
|
+
.zc-overlay-popover[data-side='top'] .zc-overlay-popover__arrow {
|
|
53
51
|
bottom: -5px;
|
|
54
52
|
left: var(--overlay-arrow-x, 50%);
|
|
55
53
|
transform: translateX(-50%) rotate(45deg);
|
|
56
54
|
border-left: none;
|
|
57
55
|
border-top: none;
|
|
58
56
|
}
|
|
59
|
-
.overlay-popover[data-side='right'] .overlay-popover__arrow {
|
|
57
|
+
.zc-overlay-popover[data-side='right'] .zc-overlay-popover__arrow {
|
|
60
58
|
left: -5px;
|
|
61
59
|
top: var(--overlay-arrow-y, 50%);
|
|
62
60
|
transform: translateY(-50%) rotate(45deg);
|
|
63
61
|
border-right: none;
|
|
64
62
|
border-top: none;
|
|
65
63
|
}
|
|
66
|
-
.overlay-popover[data-side='left'] .overlay-popover__arrow {
|
|
64
|
+
.zc-overlay-popover[data-side='left'] .zc-overlay-popover__arrow {
|
|
67
65
|
right: -5px;
|
|
68
66
|
top: var(--overlay-arrow-y, 50%);
|
|
69
67
|
transform: translateY(-50%) rotate(45deg);
|
package/dist/popover.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
'use client';export { Popover } from './chunk-
|
|
1
|
+
'use client';export { Popover } from './chunk-CAXQJSIE.js';
|
|
2
2
|
import './chunk-IUQAUBVM.js';
|
|
3
3
|
import './chunk-UE63OOVG.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
4
|
+
import './chunk-5W5TKANX.js';
|
|
5
|
+
import './chunk-WZUTBJC4.js';
|
|
6
|
+
import './chunk-LNAV5E7S.js';
|
|
7
7
|
import './chunk-HDSFWZ7L.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
8
|
+
import './chunk-6X3G4GIM.js';
|
|
9
|
+
import './chunk-MDSRZ4QR.js';
|
|
10
|
+
import './chunk-5GBV45YD.js';
|
|
11
|
+
import './chunk-FEXUS4SV.js';
|
|
12
|
+
import './chunk-VNVVG47J.js';
|
|
12
13
|
import './chunk-MMRIQNEN.js';
|
|
13
|
-
import './chunk-
|
|
14
|
+
import './chunk-N2GJEO5Z.js';
|
|
14
15
|
import './chunk-DMX2F6B4.js';
|
|
15
16
|
import './chunk-QGNC7LH5.js';
|
|
16
17
|
//# sourceMappingURL=popover.js.map
|
package/dist/radio-group.css
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
@layer zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.components {
|
|
4
|
-
/*
|
|
5
|
-
|
|
6
|
-
/* dot dims (18 / sm 16, inner 8 / sm 7) are bespoke, intentionally off the token ramps - don't "fix" to a token */
|
|
7
|
-
.rg {
|
|
4
|
+
/* Bespoke px: the dot sizes sit off the token ramp on purpose. */
|
|
5
|
+
.zc-rg {
|
|
8
6
|
--radio-group-dot: 18px;
|
|
9
7
|
--radio-group-dot-inner: 8px;
|
|
10
8
|
|
|
@@ -14,12 +12,12 @@
|
|
|
14
12
|
padding: 0;
|
|
15
13
|
min-width: 0;
|
|
16
14
|
}
|
|
17
|
-
.rg--sm {
|
|
15
|
+
.zc-rg--sm {
|
|
18
16
|
--radio-group-dot: 16px;
|
|
19
17
|
--radio-group-dot-inner: 7px;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
.rg__label {
|
|
20
|
+
.zc-rg__label {
|
|
23
21
|
font: var(--type-caption);
|
|
24
22
|
font-weight: var(--weight-medium);
|
|
25
23
|
color: var(--text-body);
|
|
@@ -29,50 +27,49 @@
|
|
|
29
27
|
line-height: 1;
|
|
30
28
|
padding: 0;
|
|
31
29
|
}
|
|
32
|
-
.rg__req {
|
|
30
|
+
.zc-rg__req {
|
|
33
31
|
color: var(--danger);
|
|
34
32
|
}
|
|
35
|
-
.rg__optional {
|
|
33
|
+
.zc-rg__optional {
|
|
36
34
|
color: var(--text-subtle);
|
|
37
35
|
font-weight: var(--weight-regular);
|
|
38
36
|
}
|
|
39
|
-
.rg__helper {
|
|
37
|
+
.zc-rg__helper {
|
|
40
38
|
font: var(--type-caption);
|
|
41
39
|
color: var(--text-muted);
|
|
42
40
|
margin-top: var(--space-1);
|
|
43
41
|
max-width: var(--measure-prose);
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
.rg__options {
|
|
47
|
-
position: relative;
|
|
44
|
+
.zc-rg__options {
|
|
45
|
+
position: relative;
|
|
48
46
|
isolation: isolate;
|
|
49
47
|
display: grid;
|
|
50
48
|
gap: var(--space-1);
|
|
51
49
|
}
|
|
52
|
-
.rg__label + .rg__options,
|
|
53
|
-
.rg__helper + .rg__options {
|
|
50
|
+
.zc-rg__label + .zc-rg__options,
|
|
51
|
+
.zc-rg__helper + .zc-rg__options {
|
|
54
52
|
margin-top: var(--space-4);
|
|
55
53
|
}
|
|
56
|
-
.rg--horizontal .rg__options {
|
|
54
|
+
.zc-rg--horizontal .zc-rg__options {
|
|
57
55
|
display: flex;
|
|
58
56
|
flex-wrap: wrap;
|
|
59
57
|
gap: var(--space-2) var(--space-5);
|
|
60
58
|
}
|
|
61
|
-
.rg--cards .rg__options {
|
|
59
|
+
.zc-rg--cards .zc-rg__options {
|
|
62
60
|
gap: var(--space-3);
|
|
63
61
|
}
|
|
64
|
-
.rg--cards.rg--horizontal .rg__options {
|
|
62
|
+
.zc-rg--cards.zc-rg--horizontal .zc-rg__options {
|
|
65
63
|
display: flex;
|
|
66
64
|
flex-wrap: wrap;
|
|
67
65
|
gap: var(--space-3);
|
|
68
66
|
}
|
|
69
|
-
.rg--cards.rg--horizontal .rg-opt {
|
|
67
|
+
.zc-rg--cards.zc-rg--horizontal .zc-rg-opt {
|
|
70
68
|
flex: 1 1 0;
|
|
71
69
|
min-width: 12rem;
|
|
72
70
|
}
|
|
73
71
|
|
|
74
|
-
|
|
75
|
-
.rg-opt {
|
|
72
|
+
.zc-rg-opt {
|
|
76
73
|
position: relative;
|
|
77
74
|
display: flex;
|
|
78
75
|
align-items: flex-start;
|
|
@@ -83,10 +80,7 @@
|
|
|
83
80
|
transition: var(--transition-colors);
|
|
84
81
|
-webkit-tap-highlight-color: transparent;
|
|
85
82
|
}
|
|
86
|
-
|
|
87
|
-
springs between rows; the positioned rows paint above it. Rows only; cards keep their
|
|
88
|
-
own layoutId hover (their opaque bg + press transform need the fill inside the card). */
|
|
89
|
-
.rg__hover {
|
|
83
|
+
.zc-rg__hover {
|
|
90
84
|
opacity: 0;
|
|
91
85
|
position: absolute;
|
|
92
86
|
top: 0;
|
|
@@ -96,13 +90,13 @@
|
|
|
96
90
|
background: var(--neutral-wash);
|
|
97
91
|
pointer-events: none;
|
|
98
92
|
}
|
|
99
|
-
.rg-opt__control,
|
|
100
|
-
.rg-opt__body {
|
|
93
|
+
.zc-rg-opt__control,
|
|
94
|
+
.zc-rg-opt__body {
|
|
101
95
|
position: relative;
|
|
102
96
|
z-index: 1;
|
|
103
97
|
}
|
|
104
98
|
|
|
105
|
-
.rg-opt__input {
|
|
99
|
+
.zc-rg-opt__input {
|
|
106
100
|
position: absolute;
|
|
107
101
|
width: 1px;
|
|
108
102
|
height: 1px;
|
|
@@ -112,32 +106,28 @@
|
|
|
112
106
|
pointer-events: none;
|
|
113
107
|
}
|
|
114
108
|
|
|
115
|
-
|
|
116
|
-
.rg-opt__control {
|
|
109
|
+
.zc-rg-opt__control {
|
|
117
110
|
flex: none;
|
|
118
111
|
height: var(--leading-body);
|
|
119
112
|
display: grid;
|
|
120
113
|
place-items: center;
|
|
121
114
|
}
|
|
122
|
-
.rg--sm .rg-opt__control {
|
|
115
|
+
.zc-rg--sm .zc-rg-opt__control {
|
|
123
116
|
height: var(--leading-caption);
|
|
124
117
|
}
|
|
125
118
|
|
|
126
|
-
.rg-opt__dot {
|
|
119
|
+
.zc-rg-opt__dot {
|
|
127
120
|
position: relative;
|
|
128
121
|
width: var(--radio-group-dot);
|
|
129
122
|
height: var(--radio-group-dot);
|
|
130
123
|
border-radius: var(--radius-full);
|
|
131
|
-
/* transparent so the ring-centre gap shows the surface behind (card tint), never a white halo */
|
|
132
124
|
background: transparent;
|
|
133
125
|
border: var(--border-hairline) solid var(--border-strong);
|
|
134
|
-
/* transform stays in the bundle so the press scale eases instead of snapping */
|
|
135
126
|
transition:
|
|
136
127
|
var(--transition-control),
|
|
137
128
|
transform var(--duration-fast) var(--ease-standard);
|
|
138
129
|
}
|
|
139
|
-
|
|
140
|
-
.rg__marker {
|
|
130
|
+
.zc-rg__marker {
|
|
141
131
|
position: absolute;
|
|
142
132
|
inset: 0;
|
|
143
133
|
margin: auto;
|
|
@@ -149,63 +139,63 @@
|
|
|
149
139
|
will-change: transform;
|
|
150
140
|
}
|
|
151
141
|
|
|
152
|
-
.rg-opt__body {
|
|
142
|
+
.zc-rg-opt__body {
|
|
153
143
|
display: grid;
|
|
154
144
|
gap: var(--space-px);
|
|
155
145
|
padding-top: 0;
|
|
156
146
|
}
|
|
157
|
-
.rg-opt__label {
|
|
147
|
+
.zc-rg-opt__label {
|
|
158
148
|
font: var(--type-body);
|
|
159
149
|
color: var(--text-strong);
|
|
160
150
|
}
|
|
161
|
-
.rg--sm .rg-opt__label {
|
|
151
|
+
.zc-rg--sm .zc-rg-opt__label {
|
|
162
152
|
font: var(--type-caption);
|
|
163
153
|
font-weight: var(--weight-medium);
|
|
164
154
|
}
|
|
165
|
-
.rg-opt__desc {
|
|
155
|
+
.zc-rg-opt__desc {
|
|
166
156
|
font: var(--type-caption);
|
|
167
157
|
color: var(--text-muted);
|
|
168
158
|
text-wrap: pretty;
|
|
169
159
|
}
|
|
170
160
|
|
|
171
|
-
.rg-opt:hover:not(.is-disabled):not(.is-selected) .rg-opt__dot {
|
|
161
|
+
.zc-rg-opt:hover:not(.zc-is-disabled):not(.zc-is-selected) .zc-rg-opt__dot {
|
|
172
162
|
border-color: var(--text-muted);
|
|
173
163
|
}
|
|
174
|
-
.rg-opt:active:not(.is-disabled) .rg-opt__dot {
|
|
164
|
+
.zc-rg-opt:active:not(.zc-is-disabled) .zc-rg-opt__dot {
|
|
175
165
|
transform: scale(0.92);
|
|
176
166
|
}
|
|
177
167
|
|
|
178
|
-
/*
|
|
179
|
-
.rg-opt.is-selected .rg-opt__dot {
|
|
168
|
+
/* A React class, not :checked - Chromium does not reliably restyle :has() on a radio's implicit sibling uncheck. */
|
|
169
|
+
.zc-rg-opt.zc-is-selected .zc-rg-opt__dot {
|
|
180
170
|
border-color: var(--accent);
|
|
181
171
|
}
|
|
182
172
|
|
|
183
|
-
.rg-opt__input:focus-visible ~ .rg-opt__control .rg-opt__dot {
|
|
173
|
+
.zc-rg-opt__input:focus-visible ~ .zc-rg-opt__control .zc-rg-opt__dot {
|
|
184
174
|
border-color: var(--accent);
|
|
185
|
-
|
|
175
|
+
outline: var(--ring-accent);
|
|
186
176
|
}
|
|
187
177
|
|
|
188
|
-
.rg-opt.is-disabled {
|
|
178
|
+
.zc-rg-opt.zc-is-disabled {
|
|
189
179
|
cursor: not-allowed;
|
|
190
180
|
}
|
|
191
|
-
.rg-opt.is-disabled .rg-opt__label {
|
|
181
|
+
.zc-rg-opt.zc-is-disabled .zc-rg-opt__label {
|
|
192
182
|
color: var(--text-disabled);
|
|
193
183
|
}
|
|
194
|
-
.rg-opt.is-disabled .rg-opt__desc {
|
|
184
|
+
.zc-rg-opt.zc-is-disabled .zc-rg-opt__desc {
|
|
195
185
|
color: var(--text-disabled);
|
|
196
186
|
}
|
|
197
|
-
.rg-opt.is-disabled .rg-opt__dot {
|
|
187
|
+
.zc-rg-opt.zc-is-disabled .zc-rg-opt__dot {
|
|
198
188
|
background: var(--bg-muted);
|
|
199
189
|
border-color: var(--border-default);
|
|
200
190
|
}
|
|
201
|
-
.rg-opt.is-disabled.is-selected .rg-opt__dot {
|
|
191
|
+
.zc-rg-opt.zc-is-disabled.zc-is-selected .zc-rg-opt__dot {
|
|
202
192
|
border-color: var(--border-strong);
|
|
203
193
|
}
|
|
204
|
-
.rg-opt.is-disabled.is-selected .rg__marker {
|
|
194
|
+
.zc-rg-opt.zc-is-disabled.zc-is-selected .zc-rg__marker {
|
|
205
195
|
background: var(--text-disabled);
|
|
206
196
|
}
|
|
207
197
|
|
|
208
|
-
.rg--cards .rg-opt {
|
|
198
|
+
.zc-rg--cards .zc-rg-opt {
|
|
209
199
|
position: relative;
|
|
210
200
|
align-items: center;
|
|
211
201
|
padding: var(--space-4);
|
|
@@ -217,30 +207,28 @@
|
|
|
217
207
|
var(--transition-control),
|
|
218
208
|
transform var(--duration-fast) var(--ease-standard);
|
|
219
209
|
}
|
|
220
|
-
.rg--cards .rg-opt:active:not(.is-disabled) {
|
|
210
|
+
.zc-rg--cards .zc-rg-opt:active:not(.zc-is-disabled) {
|
|
221
211
|
transform: translateY(var(--space-px));
|
|
222
212
|
box-shadow: var(--shadow-xs);
|
|
223
213
|
}
|
|
224
214
|
|
|
225
|
-
.rg--cards .rg-opt__control {
|
|
215
|
+
.zc-rg--cards .zc-rg-opt__control {
|
|
226
216
|
order: 3;
|
|
227
217
|
margin-left: auto;
|
|
228
218
|
}
|
|
229
|
-
.rg-opt__icon {
|
|
219
|
+
.zc-rg-opt__icon {
|
|
230
220
|
flex: none;
|
|
231
221
|
display: inline-flex;
|
|
232
222
|
color: var(--text-muted);
|
|
233
223
|
transition: color var(--duration-fast) var(--ease-standard);
|
|
234
224
|
}
|
|
235
|
-
.rg-opt__icon svg {
|
|
225
|
+
.zc-rg-opt__icon svg {
|
|
236
226
|
display: block;
|
|
237
227
|
}
|
|
238
228
|
|
|
239
|
-
|
|
240
|
-
.rg__card-fill {
|
|
229
|
+
.zc-rg__card-fill {
|
|
241
230
|
position: absolute;
|
|
242
231
|
|
|
243
|
-
/* negative inset covers the card's hairline so the accent edge replaces it */
|
|
244
232
|
inset: calc(-1 * var(--border-hairline));
|
|
245
233
|
z-index: 1;
|
|
246
234
|
border: var(--border-hairline) solid var(--accent);
|
|
@@ -249,34 +237,33 @@
|
|
|
249
237
|
pointer-events: none;
|
|
250
238
|
}
|
|
251
239
|
|
|
252
|
-
.rg--cards .rg-opt:hover:not(.is-disabled):not(.is-selected) {
|
|
240
|
+
.zc-rg--cards .zc-rg-opt:hover:not(.zc-is-disabled):not(.zc-is-selected) {
|
|
253
241
|
border-color: var(--border-strong);
|
|
254
242
|
background: var(--neutral-wash);
|
|
255
243
|
}
|
|
256
|
-
.rg--cards .rg-opt > .rg-opt__icon,
|
|
257
|
-
.rg--cards .rg-opt > .rg-opt__control,
|
|
258
|
-
.rg--cards .rg-opt > .rg-opt__body {
|
|
244
|
+
.zc-rg--cards .zc-rg-opt > .zc-rg-opt__icon,
|
|
245
|
+
.zc-rg--cards .zc-rg-opt > .zc-rg-opt__control,
|
|
246
|
+
.zc-rg--cards .zc-rg-opt > .zc-rg-opt__body {
|
|
259
247
|
position: relative;
|
|
260
248
|
z-index: 2;
|
|
261
249
|
}
|
|
262
|
-
.rg--cards .rg-opt.is-selected .rg-opt__icon {
|
|
250
|
+
.zc-rg--cards .zc-rg-opt.zc-is-selected .zc-rg-opt__icon {
|
|
263
251
|
color: var(--text-accent);
|
|
264
252
|
}
|
|
265
|
-
.rg--cards .rg-opt:has(.rg-opt__input:focus-visible) {
|
|
266
|
-
|
|
253
|
+
.zc-rg--cards .zc-rg-opt:has(.zc-rg-opt__input:focus-visible) {
|
|
254
|
+
outline: var(--ring-accent);
|
|
267
255
|
}
|
|
268
256
|
|
|
269
|
-
.rg--cards .rg-opt.is-disabled {
|
|
257
|
+
.zc-rg--cards .zc-rg-opt.zc-is-disabled {
|
|
270
258
|
background: var(--bg-subtle);
|
|
271
259
|
border-color: var(--border-subtle);
|
|
272
260
|
box-shadow: none;
|
|
273
261
|
}
|
|
274
|
-
.rg--cards .rg-opt.is-disabled .rg-opt__icon {
|
|
262
|
+
.zc-rg--cards .zc-rg-opt.zc-is-disabled .zc-rg-opt__icon {
|
|
275
263
|
color: var(--text-disabled);
|
|
276
264
|
}
|
|
277
265
|
|
|
278
|
-
|
|
279
|
-
.rg__msg {
|
|
266
|
+
.zc-rg__msg {
|
|
280
267
|
font: var(--type-caption);
|
|
281
268
|
color: var(--danger-text);
|
|
282
269
|
display: flex;
|
|
@@ -285,15 +272,15 @@
|
|
|
285
272
|
min-height: 1em;
|
|
286
273
|
padding-top: var(--space-3);
|
|
287
274
|
}
|
|
288
|
-
.rg__msg i,
|
|
289
|
-
.rg__msg svg {
|
|
275
|
+
.zc-rg__msg i,
|
|
276
|
+
.zc-rg__msg svg {
|
|
290
277
|
flex: none;
|
|
291
278
|
}
|
|
292
279
|
|
|
293
|
-
.rg.is-error .rg-opt:not(.is-selected) .rg-opt__dot {
|
|
280
|
+
.zc-rg.zc-is-error .zc-rg-opt:not(.zc-is-selected) .zc-rg-opt__dot {
|
|
294
281
|
border-color: var(--danger);
|
|
295
282
|
}
|
|
296
|
-
.rg.is-error.rg--cards .rg-opt:not(.is-selected) {
|
|
283
|
+
.zc-rg.zc-is-error.zc-rg--cards .zc-rg-opt:not(.zc-is-selected) {
|
|
297
284
|
border-color: var(--danger);
|
|
298
285
|
}
|
|
299
286
|
}
|
package/dist/radio-group.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
'use client';import { useGlide, GlidePill } from './chunk-
|
|
2
|
-
import { Motion } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
'use client';import { useGlide, GlidePill } from './chunk-K45CWVHS.js';
|
|
2
|
+
import { Motion } from './chunk-RBSHRRNO.js';
|
|
3
|
+
import './chunk-5GBV45YD.js';
|
|
4
|
+
import './chunk-FEXUS4SV.js';
|
|
5
|
+
import './chunk-VNVVG47J.js';
|
|
6
|
+
import { IconSlot } from './chunk-WCWV5IX6.js';
|
|
7
|
+
import { Icon } from './chunk-GOLSYGRA.js';
|
|
8
|
+
import { UIMotion } from './chunk-N2GJEO5Z.js';
|
|
9
|
+
import { Collapse } from './chunk-5VC3TUZ2.js';
|
|
9
10
|
import './chunk-DMX2F6B4.js';
|
|
10
11
|
import { cx } from './chunk-QGNC7LH5.js';
|
|
11
12
|
import './radio-group.css';
|
|
@@ -36,35 +37,35 @@ function RadioGroup({
|
|
|
36
37
|
const optionsRef = useRef(null);
|
|
37
38
|
const glide = useGlide(optionsRef);
|
|
38
39
|
const cls = cx(
|
|
39
|
-
"rg",
|
|
40
|
-
variant === "cards" && "rg--cards",
|
|
41
|
-
orientation === "horizontal" && "rg--horizontal",
|
|
42
|
-
size === "sm" && "rg--sm",
|
|
43
|
-
error && "is-error",
|
|
40
|
+
"zc-rg",
|
|
41
|
+
variant === "cards" && "zc-rg--cards",
|
|
42
|
+
orientation === "horizontal" && "zc-rg--horizontal",
|
|
43
|
+
size === "sm" && "zc-rg--sm",
|
|
44
|
+
error && "zc-is-error",
|
|
44
45
|
className
|
|
45
46
|
);
|
|
46
47
|
return /* @__PURE__ */ jsxs("fieldset", { className: cls, style, "aria-invalid": error ? true : void 0, ...htmlProps, children: [
|
|
47
|
-
label && /* @__PURE__ */ jsxs("legend", { className: "rg__label", children: [
|
|
48
|
+
label && /* @__PURE__ */ jsxs("legend", { className: "zc-rg__label", children: [
|
|
48
49
|
label,
|
|
49
|
-
required && /* @__PURE__ */ jsx("span", { className: "rg__req", "aria-hidden": "true", children: "*" }),
|
|
50
|
-
optional && /* @__PURE__ */ jsx("span", { className: "rg__optional", children: "(optional)" })
|
|
50
|
+
required && /* @__PURE__ */ jsx("span", { className: "zc-rg__req", "aria-hidden": "true", children: "*" }),
|
|
51
|
+
optional && /* @__PURE__ */ jsx("span", { className: "zc-rg__optional", children: "(optional)" })
|
|
51
52
|
] }),
|
|
52
|
-
label && helper && /* @__PURE__ */ jsx("p", { className: "rg__helper", children: helper }),
|
|
53
|
-
/* @__PURE__ */ jsxs("div", { className: "rg__options", ref: optionsRef, onPointerLeave: () => glide.leave(), children: [
|
|
54
|
-
variant === "rows" && /* @__PURE__ */ jsx(GlidePill, { className: "rg__hover", glide }),
|
|
53
|
+
label && helper && /* @__PURE__ */ jsx("p", { className: "zc-rg__helper", children: helper }),
|
|
54
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-rg__options", ref: optionsRef, onPointerLeave: () => glide.leave(), children: [
|
|
55
|
+
variant === "rows" && /* @__PURE__ */ jsx(GlidePill, { className: "zc-rg__hover", glide }),
|
|
55
56
|
options.map((opt) => {
|
|
56
57
|
const selected = opt.value === value;
|
|
57
58
|
const isDisabled = disabled || opt.disabled;
|
|
58
59
|
return /* @__PURE__ */ jsxs(
|
|
59
60
|
"label",
|
|
60
61
|
{
|
|
61
|
-
className: cx("rg-opt", selected && "is-selected", isDisabled && "is-disabled"),
|
|
62
|
+
className: cx("zc-rg-opt", selected && "zc-is-selected", isDisabled && "zc-is-disabled"),
|
|
62
63
|
onPointerEnter: isDisabled || variant !== "rows" ? void 0 : (e) => glide.enter(e.currentTarget),
|
|
63
64
|
children: [
|
|
64
65
|
/* @__PURE__ */ jsx(
|
|
65
66
|
"input",
|
|
66
67
|
{
|
|
67
|
-
className: "rg-opt__input",
|
|
68
|
+
className: "zc-rg-opt__input",
|
|
68
69
|
type: "radio",
|
|
69
70
|
name,
|
|
70
71
|
value: opt.value,
|
|
@@ -80,24 +81,24 @@ function RadioGroup({
|
|
|
80
81
|
as: "span",
|
|
81
82
|
layoutId: groupId + ":card-fill",
|
|
82
83
|
layoutTransition: LAYOUT_FLIP,
|
|
83
|
-
className: "rg__card-fill",
|
|
84
|
+
className: "zc-rg__card-fill",
|
|
84
85
|
"aria-hidden": "true"
|
|
85
86
|
}
|
|
86
87
|
),
|
|
87
|
-
variant === "cards" && opt.icon && /* @__PURE__ */ jsx("span", { className: "rg-opt__icon", children: /* @__PURE__ */ jsx(IconSlot, { children: opt.icon }) }),
|
|
88
|
-
/* @__PURE__ */ jsx("span", { className: "rg-opt__control", children: /* @__PURE__ */ jsx("span", { className: "rg-opt__dot", children: selected && /* @__PURE__ */ jsx(
|
|
88
|
+
variant === "cards" && opt.icon && /* @__PURE__ */ jsx("span", { className: "zc-rg-opt__icon", children: /* @__PURE__ */ jsx(IconSlot, { children: opt.icon }) }),
|
|
89
|
+
/* @__PURE__ */ jsx("span", { className: "zc-rg-opt__control", children: /* @__PURE__ */ jsx("span", { className: "zc-rg-opt__dot", children: selected && /* @__PURE__ */ jsx(
|
|
89
90
|
Motion,
|
|
90
91
|
{
|
|
91
92
|
as: "span",
|
|
92
93
|
layoutId: groupId + ":marker",
|
|
93
94
|
layoutTransition: LAYOUT_FLIP,
|
|
94
|
-
className: "rg__marker",
|
|
95
|
+
className: "zc-rg__marker",
|
|
95
96
|
"aria-hidden": "true"
|
|
96
97
|
}
|
|
97
98
|
) }) }),
|
|
98
|
-
/* @__PURE__ */ jsxs("span", { className: "rg-opt__body", children: [
|
|
99
|
-
/* @__PURE__ */ jsx("span", { className: "rg-opt__label", children: opt.label }),
|
|
100
|
-
opt.description && /* @__PURE__ */ jsx("span", { className: "rg-opt__desc", children: opt.description })
|
|
99
|
+
/* @__PURE__ */ jsxs("span", { className: "zc-rg-opt__body", children: [
|
|
100
|
+
/* @__PURE__ */ jsx("span", { className: "zc-rg-opt__label", children: opt.label }),
|
|
101
|
+
opt.description && /* @__PURE__ */ jsx("span", { className: "zc-rg-opt__desc", children: opt.description })
|
|
101
102
|
] })
|
|
102
103
|
]
|
|
103
104
|
},
|
|
@@ -105,7 +106,7 @@ function RadioGroup({
|
|
|
105
106
|
);
|
|
106
107
|
})
|
|
107
108
|
] }),
|
|
108
|
-
/* @__PURE__ */ jsx(Collapse, { open: !!error, fade: true, className: "rg__msg-wrap", children: /* @__PURE__ */ jsxs("div", { className: "rg__msg", children: [
|
|
109
|
+
/* @__PURE__ */ jsx(Collapse, { open: !!error, fade: true, className: "zc-rg__msg-wrap", children: /* @__PURE__ */ jsxs("div", { className: "zc-rg__msg", children: [
|
|
109
110
|
/* @__PURE__ */ jsx(Icon, { name: "warning-circle", size: "sm", weight: "fill" }),
|
|
110
111
|
error
|
|
111
112
|
] }) })
|