@zyncat/ui 0.13.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -157
- package/dist/alert.css +27 -34
- package/dist/alert.js +26 -17
- package/dist/alert.js.map +1 -1
- package/dist/avatar-group.js +2 -2
- package/dist/avatar-group.js.map +1 -1
- package/dist/avatar.css +53 -51
- package/dist/avatar.js +29 -7
- package/dist/avatar.js.map +1 -1
- package/dist/badge.css +31 -37
- package/dist/badge.js +1 -1
- package/dist/bloom-HV23M4AW.js +81 -0
- package/dist/bloom-HV23M4AW.js.map +1 -0
- package/dist/button.css +99 -118
- package/dist/button.js +3 -1
- package/dist/checkbox.css +28 -33
- package/dist/checkbox.js +2 -2
- package/dist/chunk-2YGHPQ66.js +16 -0
- package/dist/chunk-2YGHPQ66.js.map +1 -0
- package/dist/chunk-3MLUH2QL.js +53 -0
- package/dist/chunk-3MLUH2QL.js.map +1 -0
- package/dist/{chunk-RJFGWJ4W.js → chunk-3XRVPCIM.js} +6 -6
- package/dist/chunk-3XRVPCIM.js.map +1 -0
- package/dist/{chunk-FONOS5RN.js → chunk-4PQDVK23.js} +11 -10
- package/dist/chunk-4PQDVK23.js.map +1 -0
- package/dist/{chunk-45R4Z5XN.js → chunk-5VC3TUZ2.js} +4 -4
- package/dist/{chunk-45R4Z5XN.js.map → chunk-5VC3TUZ2.js.map} +1 -1
- package/dist/{chunk-A5WTZACK.js → chunk-5W5TKANX.js} +3 -3
- package/dist/{chunk-A5WTZACK.js.map → chunk-5W5TKANX.js.map} +1 -1
- package/dist/{chunk-227ZW4V7.js → chunk-6IXLW7QA.js} +11 -11
- package/dist/chunk-6IXLW7QA.js.map +1 -0
- package/dist/chunk-7NHY2CRA.js +132 -0
- package/dist/chunk-7NHY2CRA.js.map +1 -0
- package/dist/{chunk-EF6RPXU7.js → chunk-7VTWJL72.js} +43 -35
- package/dist/chunk-7VTWJL72.js.map +1 -0
- package/dist/chunk-7ZSIUUC3.js +50 -0
- package/dist/chunk-7ZSIUUC3.js.map +1 -0
- package/dist/{chunk-TYHR4VNM.js → chunk-AREEMG47.js} +10 -8
- package/dist/chunk-AREEMG47.js.map +1 -0
- package/dist/{chunk-DDRSMHN4.js → chunk-DH7DT6EO.js} +3 -3
- package/dist/{chunk-DDRSMHN4.js.map → chunk-DH7DT6EO.js.map} +1 -1
- package/dist/chunk-EOWWVFBF.js +14 -0
- package/dist/chunk-EOWWVFBF.js.map +1 -0
- package/dist/{chunk-5PZ43DCG.js → chunk-FLDIRXFU.js} +12 -13
- package/dist/chunk-FLDIRXFU.js.map +1 -0
- package/dist/{chunk-I45AU6KH.js → chunk-GGDAMIBH.js} +13 -7
- package/dist/chunk-GGDAMIBH.js.map +1 -0
- package/dist/{chunk-M43IOM5C.js → chunk-GWCBTD63.js} +3 -3
- package/dist/{chunk-M43IOM5C.js.map → chunk-GWCBTD63.js.map} +1 -1
- package/dist/chunk-GZ6UMHCK.js +103 -0
- package/dist/chunk-GZ6UMHCK.js.map +1 -0
- package/dist/chunk-H3X2263Y.js +17 -0
- package/dist/chunk-H3X2263Y.js.map +1 -0
- package/dist/{chunk-IJS7TPGV.js → chunk-HWDIVGME.js} +14 -7
- package/dist/chunk-HWDIVGME.js.map +1 -0
- package/dist/chunk-KSAJ6DED.js +16 -0
- package/dist/chunk-KSAJ6DED.js.map +1 -0
- package/dist/chunk-LH2UIEKN.js +42 -0
- package/dist/chunk-LH2UIEKN.js.map +1 -0
- package/dist/{chunk-JY6A2ZJZ.js → chunk-LNAV5E7S.js} +2 -2
- package/dist/{chunk-JY6A2ZJZ.js.map → chunk-LNAV5E7S.js.map} +1 -1
- package/dist/{chunk-CF4QHO4N.js → chunk-M2A6PZ7J.js} +10 -10
- package/dist/{chunk-CF4QHO4N.js.map → chunk-M2A6PZ7J.js.map} +1 -1
- package/dist/chunk-NYQQH4R5.js +40 -0
- package/dist/chunk-NYQQH4R5.js.map +1 -0
- package/dist/{chunk-TVYH4AN7.js → chunk-ODRO3KS6.js} +13 -13
- package/dist/chunk-ODRO3KS6.js.map +1 -0
- package/dist/chunk-PU3QWBEL.js +39 -0
- package/dist/chunk-PU3QWBEL.js.map +1 -0
- package/dist/{chunk-4BSHB7R3.js → chunk-QDAN43B6.js} +9 -9
- package/dist/chunk-QDAN43B6.js.map +1 -0
- package/dist/{chunk-XNIYSAMJ.js → chunk-RW2A4M2Q.js} +14 -9
- package/dist/chunk-RW2A4M2Q.js.map +1 -0
- package/dist/{chunk-TUTXXC3W.js → chunk-RY35IU3G.js} +3 -3
- package/dist/{chunk-TUTXXC3W.js.map → chunk-RY35IU3G.js.map} +1 -1
- package/dist/{chunk-EAI4POPB.js → chunk-TBLPZQSI.js} +56 -50
- package/dist/chunk-TBLPZQSI.js.map +1 -0
- package/dist/{chunk-AADAJL7D.js → chunk-UKPX3RIP.js} +8 -9
- package/dist/chunk-UKPX3RIP.js.map +1 -0
- package/dist/chunk-VDOBLABP.js +38 -0
- package/dist/chunk-VDOBLABP.js.map +1 -0
- package/dist/chunk-VNVVG47J.js +12 -0
- package/dist/chunk-VNVVG47J.js.map +1 -0
- package/dist/{chunk-4C5RZXBT.js → chunk-VZXML7EH.js} +8 -8
- package/dist/chunk-VZXML7EH.js.map +1 -0
- package/dist/{chunk-43M6GQ4Q.js → chunk-WC45VSST.js} +51 -32
- package/dist/chunk-WC45VSST.js.map +1 -0
- package/dist/{chunk-3MPF7FZV.js → chunk-WCWV5IX6.js} +3 -3
- package/dist/{chunk-3MPF7FZV.js.map → chunk-WCWV5IX6.js.map} +1 -1
- package/dist/chunk-WQKWPI6V.js +196 -0
- package/dist/chunk-WQKWPI6V.js.map +1 -0
- package/dist/{chunk-VAXCXZ53.js → chunk-WZUTBJC4.js} +5 -4
- package/dist/chunk-WZUTBJC4.js.map +1 -0
- package/dist/chunk-ZHMOH62S.js +101 -0
- package/dist/chunk-ZHMOH62S.js.map +1 -0
- package/dist/cli.js +356 -28
- package/dist/collapse.css +21 -33
- package/dist/collapse.js +1 -1
- package/dist/confetti.css +20 -13
- package/dist/confetti.js +7 -6
- package/dist/confetti.js.map +1 -1
- package/dist/count-badge.js +2 -2
- package/dist/date-field.js +22 -19
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +287 -185
- package/dist/date-range-field.js +75 -59
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +26 -23
- package/dist/datetime-field.js.map +1 -1
- package/dist/dialog.css +35 -44
- package/dist/dialog.js +23 -22
- package/dist/dialog.js.map +1 -1
- package/dist/digit-strip.css +17 -17
- package/dist/dropdown.css +37 -28
- package/dist/dropdown.js +77 -40
- package/dist/dropdown.js.map +1 -1
- package/dist/emoji-picker.js +44 -45
- package/dist/emoji-picker.js.map +1 -1
- package/dist/facebook-feed.css +146 -149
- package/dist/facebook-feed.js +106 -102
- package/dist/facebook-feed.js.map +1 -1
- package/dist/flow-field.css +9 -5
- package/dist/flow-field.js +8 -7
- package/dist/flow-field.js.map +1 -1
- package/dist/glide.js +4 -3
- package/dist/icon.css +8 -11
- package/dist/input.css +81 -86
- package/dist/instagram-feed.css +66 -67
- package/dist/instagram-feed.js +61 -44
- package/dist/instagram-feed.js.map +1 -1
- package/dist/lens.css +42 -39
- package/dist/lens.js +17 -16
- package/dist/lens.js.map +1 -1
- package/dist/mcp.js +4 -3
- package/dist/menu-surface.css +55 -35
- package/dist/modal.css +3 -5
- package/dist/modal.js +12 -11
- package/dist/modal.js.map +1 -1
- package/dist/morphing-text.css +27 -17
- package/dist/morphing-text.js +14 -13
- package/dist/morphing-text.js.map +1 -1
- package/dist/motion-devtools.css +118 -69
- package/dist/motion-devtools.js +230 -65
- package/dist/motion-devtools.js.map +1 -1
- package/dist/motion-tokens.js +1 -1
- package/dist/multi-select.js +21 -16
- package/dist/multi-select.js.map +1 -1
- package/dist/number-field.js +15 -15
- package/dist/number-field.js.map +1 -1
- package/dist/odometer.css +23 -17
- package/dist/odometer.js +12 -11
- package/dist/odometer.js.map +1 -1
- package/dist/otp-field.js +3 -3
- package/dist/otp-field.js.map +1 -1
- package/dist/overlay.css +5 -10
- package/dist/pagination.css +11 -16
- package/dist/pagination.js +13 -10
- package/dist/pagination.js.map +1 -1
- package/dist/paint-CJQCM6ZO.js +260 -0
- package/dist/paint-CJQCM6ZO.js.map +1 -0
- package/dist/popover.css +14 -16
- package/dist/popover.js +10 -9
- package/dist/radio-group.css +65 -76
- package/dist/radio-group.js +30 -29
- package/dist/radio-group.js.map +1 -1
- package/dist/select.css +67 -76
- package/dist/select.js +19 -14
- package/dist/select.js.map +1 -1
- package/dist/sheet.css +13 -15
- package/dist/sheet.js +11 -10
- package/dist/spinner.css +115 -0
- package/dist/spinner.js +4 -0
- package/dist/spinner.js.map +1 -0
- package/dist/status-badge.js +9 -9
- package/dist/status-badge.js.map +1 -1
- package/dist/styles.css +35 -35
- package/dist/support-rail.css +110 -256
- package/dist/support-rail.js +116 -123
- package/dist/support-rail.js.map +1 -1
- package/dist/table.css +77 -85
- package/dist/table.js +44 -41
- package/dist/table.js.map +1 -1
- package/dist/tabs.css +81 -93
- package/dist/tabs.js +23 -20
- package/dist/tabs.js.map +1 -1
- package/dist/tag.css +49 -54
- package/dist/tag.js +13 -12
- package/dist/tag.js.map +1 -1
- package/dist/text-field.js +5 -5
- package/dist/textarea.css +47 -50
- package/dist/textarea.js +16 -16
- package/dist/textarea.js.map +1 -1
- package/dist/theme-grid.js +11 -0
- package/dist/theme-grid.js.map +1 -0
- package/dist/theme-switcher.css +107 -0
- package/dist/theme-switcher.js +70 -0
- package/dist/theme-switcher.js.map +1 -0
- package/dist/theme-transition-LLC644ZR.js +346 -0
- package/dist/theme-transition-LLC644ZR.js.map +1 -0
- package/dist/theme-transition.css +48 -0
- package/dist/theme.js +74 -27
- package/dist/theme.js.map +1 -1
- package/dist/tide-DJZMDAFT.js +57 -0
- package/dist/tide-DJZMDAFT.js.map +1 -0
- package/dist/tiktok.css +114 -119
- package/dist/tiktok.js +53 -52
- package/dist/tiktok.js.map +1 -1
- package/dist/time-field.js +26 -20
- package/dist/time-field.js.map +1 -1
- package/dist/toast-store.js +2 -1
- package/dist/toast.css +51 -79
- package/dist/toast.js +34 -26
- package/dist/toast.js.map +1 -1
- package/dist/toggle-tag.js +23 -14
- package/dist/toggle-tag.js.map +1 -1
- package/dist/toggle.css +27 -32
- package/dist/toggle.js +7 -7
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.css +17 -24
- package/dist/tooltip.js +117 -95
- package/dist/tooltip.js.map +1 -1
- package/dist/trigger.css +4 -4
- package/dist/types/components/composites/alert/Alert.d.ts +1 -2
- package/dist/types/components/composites/date-picker/TimeField.d.ts +1 -2
- package/dist/types/components/composites/date-picker/field-shell.d.ts +1 -1
- package/dist/types/components/composites/date-picker/month-jump.d.ts +11 -0
- package/dist/types/components/composites/date-picker/time-core.d.ts +1 -2
- package/dist/types/components/composites/dropdown/Dropdown.d.ts +9 -1
- package/dist/types/components/composites/dropdown/types.d.ts +14 -0
- package/dist/types/components/composites/emoji-picker/EmojiPickerPanel.d.ts +1 -1
- package/dist/types/components/composites/emoji-picker/data.d.ts +2 -5
- package/dist/types/components/composites/emoji-picker/react/useEmojiPicker.d.ts +0 -11
- package/dist/types/components/composites/emoji-picker/types.d.ts +3 -8
- package/dist/types/components/composites/select/MultiSelect.d.ts +6 -1
- package/dist/types/components/composites/select/Select.d.ts +6 -1
- package/dist/types/components/composites/select/core/index.d.ts +1 -1
- package/dist/types/components/composites/select/core/menu.d.ts +3 -3
- package/dist/types/components/composites/select/core/panel.d.ts +3 -3
- package/dist/types/components/composites/tabs/Tabs.d.ts +7 -10
- package/dist/types/components/composites/theme-switcher/ThemeGrid.d.ts +20 -0
- package/dist/types/components/composites/theme-switcher/ThemeSwitcher.d.ts +24 -0
- package/dist/types/components/composites/toast/Toast.d.ts +1 -1
- package/dist/types/components/composites/tooltip/Tooltip.d.ts +9 -1
- package/dist/types/components/composites/tooltip/tooltip-store.d.ts +5 -6
- package/dist/types/components/compound/support-rail/SupportRail.d.ts +10 -8
- package/dist/types/components/dev/MotionDevtools.d.ts +12 -5
- package/dist/types/components/expressive/theme-transition/bloom.d.ts +2 -0
- package/dist/types/components/expressive/theme-transition/paint.d.ts +2 -0
- package/dist/types/components/expressive/theme-transition/scene.d.ts +24 -0
- package/dist/types/components/expressive/theme-transition/theme-transition.d.ts +19 -0
- package/dist/types/components/expressive/theme-transition/tide.d.ts +2 -0
- package/dist/types/components/internal/hooks/use-host-election.d.ts +8 -0
- package/dist/types/components/internal/icon/Icon.d.ts +2 -3
- package/dist/types/components/internal/menu/highlight.d.ts +7 -0
- package/dist/types/components/internal/utils/activation.d.ts +0 -4
- package/dist/types/components/primitives/avatar/Avatar.d.ts +1 -1
- package/dist/types/components/primitives/button/Button.d.ts +10 -13
- package/dist/types/components/primitives/button/button-style.d.ts +15 -0
- package/dist/types/components/primitives/input/TextField.d.ts +1 -2
- package/dist/types/components/primitives/spinner/Spinner.d.ts +27 -0
- package/dist/types/components/primitives/textarea/Textarea.d.ts +0 -1
- package/dist/types/engine/animate.d.ts +1 -0
- package/dist/types/shared-slot.d.ts +1 -0
- package/dist/types/tokens/component-styles.generated.d.ts +80 -155
- package/dist/types/tokens/motion-defaults.generated.d.ts +34 -0
- package/dist/types/tokens/motion-scale.d.ts +2 -2
- package/dist/types/tokens/motion-tokens.d.ts +7 -0
- package/dist/types/tokens/theme-store.d.ts +47 -0
- package/dist/types/tokens/theme-sync.d.ts +9 -0
- package/dist/types/tokens/theme-tokens.generated.d.ts +693 -1117
- package/dist/types/tokens/theme.d.ts +28 -5
- package/dist/typing-lines.css +18 -11
- package/dist/typing-lines.js +9 -8
- package/dist/typing-lines.js.map +1 -1
- package/dist/weight-field.css +32 -18
- package/dist/weight-field.js +4 -4
- package/dist/weight-field.js.map +1 -1
- package/dist/youtube.css +91 -97
- package/dist/youtube.js +87 -86
- package/dist/youtube.js.map +1 -1
- package/package.json +27 -31
- package/skills/zyncat-ui/SKILL.md +5 -3
- package/skills/zyncat-ui/references/components.md +7 -4
- package/skills/zyncat-ui/references/theming.md +105 -34
- package/src/components/composites/alert/Alert.tsx +15 -12
- package/src/components/composites/alert/alert.css +27 -34
- package/src/components/composites/date-picker/DateField.tsx +1 -1
- package/src/components/composites/date-picker/DateRangeField.tsx +1 -1
- package/src/components/composites/date-picker/DateTimeField.tsx +4 -4
- package/src/components/composites/date-picker/TimeField.tsx +8 -5
- package/src/components/composites/date-picker/calendar-panel.tsx +33 -22
- package/src/components/composites/date-picker/date-picker.css +287 -185
- package/src/components/composites/date-picker/field-shell.tsx +7 -7
- package/src/components/composites/date-picker/month-jump.tsx +192 -0
- package/src/components/composites/date-picker/range-panel.tsx +51 -36
- package/src/components/composites/date-picker/time-core.tsx +4 -6
- package/src/components/composites/date-picker/use-day-focus.ts +1 -1
- package/src/components/composites/dialog/Dialog.tsx +11 -11
- package/src/components/composites/dialog/dialog.css +35 -44
- package/src/components/composites/dropdown/Dropdown.tsx +15 -2
- package/src/components/composites/dropdown/Dropdown.usage.md +7 -4
- package/src/components/composites/dropdown/dropdown.css +37 -28
- package/src/components/composites/dropdown/menu-panel.tsx +56 -27
- package/src/components/composites/dropdown/types.ts +28 -6
- package/src/components/composites/emoji-picker/EmojiPickerPanel.tsx +5 -4
- package/src/components/composites/emoji-picker/EmojiPickerPanel.usage.md +4 -4
- package/src/components/composites/emoji-picker/data.ts +2 -5
- package/src/components/composites/emoji-picker/dom.ts +6 -6
- package/src/components/composites/emoji-picker/react/category-bar.tsx +6 -6
- package/src/components/composites/emoji-picker/react/useEmojiPicker.ts +0 -11
- package/src/components/composites/emoji-picker/scaffold.ts +7 -7
- package/src/components/composites/emoji-picker/search.ts +0 -7
- package/src/components/composites/emoji-picker/styles.css +35 -35
- package/src/components/composites/emoji-picker/types.ts +3 -8
- package/src/components/composites/modal/Modal.tsx +2 -2
- package/src/components/composites/modal/modal.css +3 -5
- package/src/components/composites/pagination/Pagination.tsx +7 -7
- package/src/components/composites/pagination/pagination.css +11 -16
- package/src/components/composites/popover/Popover.tsx +2 -2
- package/src/components/composites/popover/popover.css +14 -16
- package/src/components/composites/select/MultiSelect.tsx +11 -2
- package/src/components/composites/select/MultiSelect.usage.md +2 -1
- package/src/components/composites/select/Select.tsx +10 -1
- package/src/components/composites/select/Select.usage.md +2 -1
- package/src/components/composites/select/core/index.ts +1 -1
- package/src/components/composites/select/core/menu.tsx +19 -4
- package/src/components/composites/select/core/panel.tsx +19 -15
- package/src/components/composites/select/core/trigger.tsx +5 -5
- package/src/components/composites/select/select.css +67 -76
- package/src/components/composites/sheet/Sheet.tsx +2 -2
- package/src/components/composites/sheet/sheet.css +13 -15
- package/src/components/composites/sheet/use-sheet-drag.ts +1 -1
- package/src/components/composites/table/Table.tsx +35 -35
- package/src/components/composites/table/table.css +77 -85
- package/src/components/composites/tabs/Tabs.tsx +20 -21
- package/src/components/composites/tabs/Tabs.usage.md +3 -2
- package/src/components/composites/tabs/tabs.css +81 -93
- package/src/components/composites/theme-switcher/ThemeGrid.tsx +133 -0
- package/src/components/composites/theme-switcher/ThemeGrid.usage.md +20 -0
- package/src/components/composites/theme-switcher/ThemeSwitcher.tsx +75 -0
- package/src/components/composites/theme-switcher/ThemeSwitcher.usage.md +21 -0
- package/src/components/composites/theme-switcher/theme-switcher.css +107 -0
- package/src/components/composites/toast/Toast.tsx +24 -18
- package/src/components/composites/toast/toast-store.ts +8 -6
- package/src/components/composites/toast/toast.css +51 -79
- package/src/components/composites/tooltip/Tooltip.tsx +40 -19
- package/src/components/composites/tooltip/Tooltip.usage.md +9 -1
- package/src/components/composites/tooltip/tooltip-host.tsx +55 -23
- package/src/components/composites/tooltip/tooltip-store.ts +36 -53
- package/src/components/composites/tooltip/tooltip.css +17 -24
- package/src/components/compound/support-rail/SupportRail.tsx +132 -144
- package/src/components/compound/support-rail/SupportRail.usage.md +7 -6
- package/src/components/compound/support-rail/support-rail.css +110 -256
- package/src/components/dev/MotionDevtools.tsx +272 -51
- package/src/components/dev/MotionDevtools.usage.md +12 -4
- package/src/components/dev/motion-devtools.css +118 -69
- package/src/components/dev/slowmo-engine.ts +16 -15
- package/src/components/expressive/confetti/Confetti.tsx +4 -4
- package/src/components/expressive/confetti/confetti.css +20 -13
- package/src/components/expressive/facebook-feed/chrome.tsx +2 -2
- package/src/components/expressive/facebook-feed/facebook-feed.css +146 -149
- package/src/components/expressive/facebook-feed/post.tsx +39 -39
- package/src/components/expressive/facebook-feed/reel.tsx +41 -37
- package/src/components/expressive/facebook-feed/story.tsx +27 -27
- package/src/components/expressive/flow-field/FlowField.tsx +5 -5
- package/src/components/expressive/flow-field/flow-field.css +9 -5
- package/src/components/expressive/instagram-feed/InstagramFeed.tsx +52 -44
- package/src/components/expressive/instagram-feed/instagram-feed.css +66 -67
- package/src/components/expressive/lens/Lens.tsx +14 -14
- package/src/components/expressive/lens/lens.css +42 -39
- package/src/components/expressive/morphing-text/MorphingText.tsx +12 -13
- package/src/components/expressive/morphing-text/morphing-text.css +27 -17
- package/src/components/expressive/odometer/Odometer.tsx +9 -9
- package/src/components/expressive/odometer/odometer.css +23 -17
- package/src/components/expressive/theme-transition/bloom.ts +88 -0
- package/src/components/expressive/theme-transition/paint.ts +296 -0
- package/src/components/expressive/theme-transition/scene.ts +38 -0
- package/src/components/expressive/theme-transition/theme-transition.css +48 -0
- package/src/components/expressive/theme-transition/theme-transition.ts +423 -0
- package/src/components/expressive/theme-transition/tide.ts +65 -0
- package/src/components/expressive/tiktok/TikTok.tsx +54 -54
- package/src/components/expressive/tiktok/tiktok.css +114 -119
- package/src/components/expressive/typing-lines/TypingLines.tsx +0 -0
- package/src/components/expressive/typing-lines/typing-lines.css +18 -11
- package/src/components/expressive/weight-field/WeightField.tsx +4 -4
- package/src/components/expressive/weight-field/weight-field.css +32 -18
- package/src/components/expressive/youtube/YouTube.tsx +4 -4
- package/src/components/expressive/youtube/glyphs.tsx +16 -16
- package/src/components/expressive/youtube/media.tsx +3 -3
- package/src/components/expressive/youtube/post.tsx +28 -28
- package/src/components/expressive/youtube/short.tsx +25 -25
- package/src/components/expressive/youtube/video.tsx +13 -13
- package/src/components/expressive/youtube/youtube.css +91 -97
- package/src/components/internal/glass/glass.css +20 -23
- package/src/components/internal/glass/glint.ts +3 -3
- package/src/components/internal/hooks/use-host-election.ts +46 -0
- package/src/components/internal/icon/Icon.tsx +3 -5
- package/src/components/internal/icon/IconSlot.tsx +1 -1
- package/src/components/internal/icon/icon.css +8 -11
- package/src/components/internal/menu/highlight.ts +12 -0
- package/src/components/internal/menu/menu-row.tsx +5 -5
- package/src/components/internal/menu/menu-surface.css +55 -35
- package/src/components/internal/overlay/layer.tsx +2 -1
- package/src/components/internal/overlay/modal.tsx +5 -4
- package/src/components/internal/overlay/overlay.css +5 -10
- package/src/components/internal/overlay/trigger.css +4 -4
- package/src/components/internal/utils/activation.ts +0 -4
- package/src/components/primitives/avatar/Avatar.tsx +24 -8
- package/src/components/primitives/avatar/AvatarGroup.tsx +4 -4
- package/src/components/primitives/avatar/avatar.css +53 -51
- package/src/components/primitives/badge/Badge.tsx +9 -9
- package/src/components/primitives/badge/StatusBadge.tsx +7 -7
- package/src/components/primitives/badge/badge.css +31 -37
- package/src/components/primitives/badge/digit-strip.css +17 -17
- package/src/components/primitives/badge/digit-strip.tsx +4 -4
- package/src/components/primitives/button/Button.tsx +14 -28
- package/src/components/primitives/button/button-style.ts +28 -0
- package/src/components/primitives/button/button.css +99 -118
- package/src/components/primitives/checkbox/Checkbox.tsx +10 -4
- package/src/components/primitives/checkbox/check-glyph.tsx +5 -5
- package/src/components/primitives/checkbox/checkbox.css +28 -33
- package/src/components/primitives/collapse/Collapse.tsx +2 -2
- package/src/components/primitives/collapse/collapse.css +21 -33
- package/src/components/primitives/collapse/collapse.typecheck.tsx +1 -1
- package/src/components/primitives/input/NumberField.tsx +11 -11
- package/src/components/primitives/input/OtpField.tsx +3 -3
- package/src/components/primitives/input/TextField.tsx +9 -10
- package/src/components/primitives/input/field-chrome.tsx +6 -6
- package/src/components/primitives/input/input.css +81 -86
- package/src/components/primitives/radio-group/RadioGroup.tsx +23 -23
- package/src/components/primitives/radio-group/radio-group.css +65 -76
- package/src/components/primitives/spinner/Spinner.tsx +70 -0
- package/src/components/primitives/spinner/Spinner.usage.md +19 -0
- package/src/components/primitives/spinner/spinner.css +115 -0
- package/src/components/primitives/tag/Tag.tsx +5 -5
- package/src/components/primitives/tag/ToggleTag.tsx +11 -6
- package/src/components/primitives/tag/tag.css +49 -54
- package/src/components/primitives/textarea/Textarea.tsx +13 -14
- package/src/components/primitives/textarea/textarea.css +47 -50
- package/src/components/primitives/toggle/Toggle.tsx +7 -7
- package/src/components/primitives/toggle/toggle.css +27 -32
- package/src/engine/animate.ts +12 -3
- package/src/engine/flip.ts +2 -1
- package/src/mcp/server.ts +5 -2
- package/src/motion/flip.ts +7 -8
- package/src/motion/glide.tsx +41 -26
- package/src/shared-slot.ts +10 -0
- package/src/styles.css +8 -16
- package/src/tokens/base.css +15 -0
- package/src/tokens/color.css +22 -63
- package/src/tokens/component-styles.generated.ts +81 -155
- package/src/tokens/dark.css +58 -0
- package/src/tokens/decisions.css +23 -0
- package/src/tokens/elevation.css +65 -23
- package/src/tokens/fonts.css +0 -2
- package/src/tokens/glass.css +17 -10
- package/src/tokens/motion-defaults.generated.ts +21 -0
- package/src/tokens/motion-scale.ts +2 -2
- package/src/tokens/motion-tokens.ts +65 -40
- package/src/tokens/motion-tokens.usage.md +5 -2
- package/src/tokens/motion.css +18 -28
- package/src/tokens/radius.css +12 -10
- package/src/tokens/reset.css +36 -0
- package/src/tokens/semantic.css +51 -39
- package/src/tokens/spacing.css +6 -7
- package/src/tokens/theme-store.ts +187 -0
- package/src/tokens/theme-sync.tsx +62 -0
- package/src/tokens/theme-tokens.generated.ts +708 -1121
- package/src/tokens/theme.tsx +116 -38
- package/src/tokens/theme.usage.md +26 -19
- package/src/tokens/typography.css +18 -20
- package/tailwind.css +187 -0
- package/dist/chunk-227ZW4V7.js.map +0 -1
- package/dist/chunk-43M6GQ4Q.js.map +0 -1
- package/dist/chunk-4BSHB7R3.js.map +0 -1
- package/dist/chunk-4C5RZXBT.js.map +0 -1
- package/dist/chunk-5PZ43DCG.js.map +0 -1
- package/dist/chunk-7IZJERGA.js +0 -80
- package/dist/chunk-7IZJERGA.js.map +0 -1
- package/dist/chunk-AADAJL7D.js.map +0 -1
- package/dist/chunk-CNWTIMIP.js +0 -39
- package/dist/chunk-CNWTIMIP.js.map +0 -1
- package/dist/chunk-EAI4POPB.js.map +0 -1
- package/dist/chunk-EF6RPXU7.js.map +0 -1
- package/dist/chunk-FONOS5RN.js.map +0 -1
- package/dist/chunk-FQEHSKEI.js +0 -38
- package/dist/chunk-FQEHSKEI.js.map +0 -1
- package/dist/chunk-HY5MPISE.js +0 -52
- package/dist/chunk-HY5MPISE.js.map +0 -1
- package/dist/chunk-I45AU6KH.js.map +0 -1
- package/dist/chunk-IJS7TPGV.js.map +0 -1
- package/dist/chunk-OWNMRMPN.js +0 -14
- package/dist/chunk-OWNMRMPN.js.map +0 -1
- package/dist/chunk-RJFGWJ4W.js.map +0 -1
- package/dist/chunk-TCUCYFT7.js +0 -25
- package/dist/chunk-TCUCYFT7.js.map +0 -1
- package/dist/chunk-TVYH4AN7.js.map +0 -1
- package/dist/chunk-TYHR4VNM.js.map +0 -1
- package/dist/chunk-VAXCXZ53.js.map +0 -1
- package/dist/chunk-XNIYSAMJ.js.map +0 -1
- package/dist/chunk-Y2YA7QRF.js +0 -17
- package/dist/chunk-Y2YA7QRF.js.map +0 -1
- package/src/tokens/avatar.css +0 -24
- package/src/tokens/icons.css +0 -11
- package/src/tokens/layers.css +0 -11
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.components {
|
|
4
|
-
/*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
.rg {
|
|
4
|
+
/* Bespoke px: the authored value is the ring gap and the marker falls out of it, so the two
|
|
5
|
+
never leave an odd remainder to halve. */
|
|
6
|
+
.zc-rg {
|
|
8
7
|
--radio-group-dot: 18px;
|
|
9
|
-
--radio-group-dot-
|
|
8
|
+
--radio-group-dot-gap: 4px;
|
|
9
|
+
--radio-group-dot-inner: calc(var(--radio-group-dot) - 2 * (var(--border-hairline) + var(--radio-group-dot-gap)));
|
|
10
10
|
|
|
11
11
|
display: grid;
|
|
12
12
|
border: 0;
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
padding: 0;
|
|
15
15
|
min-width: 0;
|
|
16
16
|
}
|
|
17
|
-
.rg--sm {
|
|
17
|
+
.zc-rg--sm {
|
|
18
18
|
--radio-group-dot: 16px;
|
|
19
|
-
--radio-group-dot-
|
|
19
|
+
--radio-group-dot-gap: 3px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.rg__label {
|
|
22
|
+
.zc-rg__label {
|
|
23
23
|
font: var(--type-caption);
|
|
24
24
|
font-weight: var(--weight-medium);
|
|
25
25
|
color: var(--text-body);
|
|
@@ -29,50 +29,49 @@
|
|
|
29
29
|
line-height: 1;
|
|
30
30
|
padding: 0;
|
|
31
31
|
}
|
|
32
|
-
.rg__req {
|
|
32
|
+
.zc-rg__req {
|
|
33
33
|
color: var(--danger);
|
|
34
34
|
}
|
|
35
|
-
.rg__optional {
|
|
35
|
+
.zc-rg__optional {
|
|
36
36
|
color: var(--text-subtle);
|
|
37
37
|
font-weight: var(--weight-regular);
|
|
38
38
|
}
|
|
39
|
-
.rg__helper {
|
|
39
|
+
.zc-rg__helper {
|
|
40
40
|
font: var(--type-caption);
|
|
41
41
|
color: var(--text-muted);
|
|
42
42
|
margin-top: var(--space-1);
|
|
43
43
|
max-width: var(--measure-prose);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.rg__options {
|
|
47
|
-
position: relative;
|
|
46
|
+
.zc-rg__options {
|
|
47
|
+
position: relative;
|
|
48
48
|
isolation: isolate;
|
|
49
49
|
display: grid;
|
|
50
50
|
gap: var(--space-1);
|
|
51
51
|
}
|
|
52
|
-
.rg__label + .rg__options,
|
|
53
|
-
.rg__helper + .rg__options {
|
|
52
|
+
.zc-rg__label + .zc-rg__options,
|
|
53
|
+
.zc-rg__helper + .zc-rg__options {
|
|
54
54
|
margin-top: var(--space-4);
|
|
55
55
|
}
|
|
56
|
-
.rg--horizontal .rg__options {
|
|
56
|
+
.zc-rg--horizontal .zc-rg__options {
|
|
57
57
|
display: flex;
|
|
58
58
|
flex-wrap: wrap;
|
|
59
59
|
gap: var(--space-2) var(--space-5);
|
|
60
60
|
}
|
|
61
|
-
.rg--cards .rg__options {
|
|
61
|
+
.zc-rg--cards .zc-rg__options {
|
|
62
62
|
gap: var(--space-3);
|
|
63
63
|
}
|
|
64
|
-
.rg--cards.rg--horizontal .rg__options {
|
|
64
|
+
.zc-rg--cards.zc-rg--horizontal .zc-rg__options {
|
|
65
65
|
display: flex;
|
|
66
66
|
flex-wrap: wrap;
|
|
67
67
|
gap: var(--space-3);
|
|
68
68
|
}
|
|
69
|
-
.rg--cards.rg--horizontal .rg-opt {
|
|
69
|
+
.zc-rg--cards.zc-rg--horizontal .zc-rg-opt {
|
|
70
70
|
flex: 1 1 0;
|
|
71
71
|
min-width: 12rem;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
.rg-opt {
|
|
74
|
+
.zc-rg-opt {
|
|
76
75
|
position: relative;
|
|
77
76
|
display: flex;
|
|
78
77
|
align-items: flex-start;
|
|
@@ -83,10 +82,7 @@
|
|
|
83
82
|
transition: var(--transition-colors);
|
|
84
83
|
-webkit-tap-highlight-color: transparent;
|
|
85
84
|
}
|
|
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 {
|
|
85
|
+
.zc-rg__hover {
|
|
90
86
|
opacity: 0;
|
|
91
87
|
position: absolute;
|
|
92
88
|
top: 0;
|
|
@@ -96,13 +92,13 @@
|
|
|
96
92
|
background: var(--neutral-wash);
|
|
97
93
|
pointer-events: none;
|
|
98
94
|
}
|
|
99
|
-
.rg-opt__control,
|
|
100
|
-
.rg-opt__body {
|
|
95
|
+
.zc-rg-opt__control,
|
|
96
|
+
.zc-rg-opt__body {
|
|
101
97
|
position: relative;
|
|
102
98
|
z-index: 1;
|
|
103
99
|
}
|
|
104
100
|
|
|
105
|
-
.rg-opt__input {
|
|
101
|
+
.zc-rg-opt__input {
|
|
106
102
|
position: absolute;
|
|
107
103
|
width: 1px;
|
|
108
104
|
height: 1px;
|
|
@@ -112,32 +108,28 @@
|
|
|
112
108
|
pointer-events: none;
|
|
113
109
|
}
|
|
114
110
|
|
|
115
|
-
|
|
116
|
-
.rg-opt__control {
|
|
111
|
+
.zc-rg-opt__control {
|
|
117
112
|
flex: none;
|
|
118
113
|
height: var(--leading-body);
|
|
119
114
|
display: grid;
|
|
120
115
|
place-items: center;
|
|
121
116
|
}
|
|
122
|
-
.rg--sm .rg-opt__control {
|
|
117
|
+
.zc-rg--sm .zc-rg-opt__control {
|
|
123
118
|
height: var(--leading-caption);
|
|
124
119
|
}
|
|
125
120
|
|
|
126
|
-
.rg-opt__dot {
|
|
121
|
+
.zc-rg-opt__dot {
|
|
127
122
|
position: relative;
|
|
128
123
|
width: var(--radio-group-dot);
|
|
129
124
|
height: var(--radio-group-dot);
|
|
130
125
|
border-radius: var(--radius-full);
|
|
131
|
-
/* transparent so the ring-centre gap shows the surface behind (card tint), never a white halo */
|
|
132
126
|
background: transparent;
|
|
133
127
|
border: var(--border-hairline) solid var(--border-strong);
|
|
134
|
-
/* transform stays in the bundle so the press scale eases instead of snapping */
|
|
135
128
|
transition:
|
|
136
129
|
var(--transition-control),
|
|
137
130
|
transform var(--duration-fast) var(--ease-standard);
|
|
138
131
|
}
|
|
139
|
-
|
|
140
|
-
.rg__marker {
|
|
132
|
+
.zc-rg__marker {
|
|
141
133
|
position: absolute;
|
|
142
134
|
inset: 0;
|
|
143
135
|
margin: auto;
|
|
@@ -149,63 +141,63 @@
|
|
|
149
141
|
will-change: transform;
|
|
150
142
|
}
|
|
151
143
|
|
|
152
|
-
.rg-opt__body {
|
|
144
|
+
.zc-rg-opt__body {
|
|
153
145
|
display: grid;
|
|
154
146
|
gap: var(--space-px);
|
|
155
147
|
padding-top: 0;
|
|
156
148
|
}
|
|
157
|
-
.rg-opt__label {
|
|
149
|
+
.zc-rg-opt__label {
|
|
158
150
|
font: var(--type-body);
|
|
159
151
|
color: var(--text-strong);
|
|
160
152
|
}
|
|
161
|
-
.rg--sm .rg-opt__label {
|
|
153
|
+
.zc-rg--sm .zc-rg-opt__label {
|
|
162
154
|
font: var(--type-caption);
|
|
163
155
|
font-weight: var(--weight-medium);
|
|
164
156
|
}
|
|
165
|
-
.rg-opt__desc {
|
|
157
|
+
.zc-rg-opt__desc {
|
|
166
158
|
font: var(--type-caption);
|
|
167
159
|
color: var(--text-muted);
|
|
168
160
|
text-wrap: pretty;
|
|
169
161
|
}
|
|
170
162
|
|
|
171
|
-
.rg-opt:hover:not(.is-disabled):not(.is-selected) .rg-opt__dot {
|
|
163
|
+
.zc-rg-opt:hover:not(.zc-is-disabled):not(.zc-is-selected) .zc-rg-opt__dot {
|
|
172
164
|
border-color: var(--text-muted);
|
|
173
165
|
}
|
|
174
|
-
.rg-opt:active:not(.is-disabled) .rg-opt__dot {
|
|
166
|
+
.zc-rg-opt:active:not(.zc-is-disabled) .zc-rg-opt__dot {
|
|
175
167
|
transform: scale(0.92);
|
|
176
168
|
}
|
|
177
169
|
|
|
178
|
-
/*
|
|
179
|
-
.rg-opt.is-selected .rg-opt__dot {
|
|
170
|
+
/* A React class, not :checked - Chromium does not reliably restyle :has() on a radio's implicit sibling uncheck. */
|
|
171
|
+
.zc-rg-opt.zc-is-selected .zc-rg-opt__dot {
|
|
180
172
|
border-color: var(--accent);
|
|
181
173
|
}
|
|
182
174
|
|
|
183
|
-
.rg-opt__input:focus-visible ~ .rg-opt__control .rg-opt__dot {
|
|
175
|
+
.zc-rg-opt__input:focus-visible ~ .zc-rg-opt__control .zc-rg-opt__dot {
|
|
184
176
|
border-color: var(--accent);
|
|
185
|
-
|
|
177
|
+
outline: var(--ring-accent);
|
|
186
178
|
}
|
|
187
179
|
|
|
188
|
-
.rg-opt.is-disabled {
|
|
180
|
+
.zc-rg-opt.zc-is-disabled {
|
|
189
181
|
cursor: not-allowed;
|
|
190
182
|
}
|
|
191
|
-
.rg-opt.is-disabled .rg-opt__label {
|
|
183
|
+
.zc-rg-opt.zc-is-disabled .zc-rg-opt__label {
|
|
192
184
|
color: var(--text-disabled);
|
|
193
185
|
}
|
|
194
|
-
.rg-opt.is-disabled .rg-opt__desc {
|
|
186
|
+
.zc-rg-opt.zc-is-disabled .zc-rg-opt__desc {
|
|
195
187
|
color: var(--text-disabled);
|
|
196
188
|
}
|
|
197
|
-
.rg-opt.is-disabled .rg-opt__dot {
|
|
189
|
+
.zc-rg-opt.zc-is-disabled .zc-rg-opt__dot {
|
|
198
190
|
background: var(--bg-muted);
|
|
199
191
|
border-color: var(--border-default);
|
|
200
192
|
}
|
|
201
|
-
.rg-opt.is-disabled.is-selected .rg-opt__dot {
|
|
193
|
+
.zc-rg-opt.zc-is-disabled.zc-is-selected .zc-rg-opt__dot {
|
|
202
194
|
border-color: var(--border-strong);
|
|
203
195
|
}
|
|
204
|
-
.rg-opt.is-disabled.is-selected .rg__marker {
|
|
196
|
+
.zc-rg-opt.zc-is-disabled.zc-is-selected .zc-rg__marker {
|
|
205
197
|
background: var(--text-disabled);
|
|
206
198
|
}
|
|
207
199
|
|
|
208
|
-
.rg--cards .rg-opt {
|
|
200
|
+
.zc-rg--cards .zc-rg-opt {
|
|
209
201
|
position: relative;
|
|
210
202
|
align-items: center;
|
|
211
203
|
padding: var(--space-4);
|
|
@@ -217,30 +209,28 @@
|
|
|
217
209
|
var(--transition-control),
|
|
218
210
|
transform var(--duration-fast) var(--ease-standard);
|
|
219
211
|
}
|
|
220
|
-
.rg--cards .rg-opt:active:not(.is-disabled) {
|
|
212
|
+
.zc-rg--cards .zc-rg-opt:active:not(.zc-is-disabled) {
|
|
221
213
|
transform: translateY(var(--space-px));
|
|
222
214
|
box-shadow: var(--shadow-xs);
|
|
223
215
|
}
|
|
224
216
|
|
|
225
|
-
.rg--cards .rg-opt__control {
|
|
217
|
+
.zc-rg--cards .zc-rg-opt__control {
|
|
226
218
|
order: 3;
|
|
227
219
|
margin-left: auto;
|
|
228
220
|
}
|
|
229
|
-
.rg-opt__icon {
|
|
221
|
+
.zc-rg-opt__icon {
|
|
230
222
|
flex: none;
|
|
231
223
|
display: inline-flex;
|
|
232
224
|
color: var(--text-muted);
|
|
233
225
|
transition: color var(--duration-fast) var(--ease-standard);
|
|
234
226
|
}
|
|
235
|
-
.rg-opt__icon svg {
|
|
227
|
+
.zc-rg-opt__icon svg {
|
|
236
228
|
display: block;
|
|
237
229
|
}
|
|
238
230
|
|
|
239
|
-
|
|
240
|
-
.rg__card-fill {
|
|
231
|
+
.zc-rg__card-fill {
|
|
241
232
|
position: absolute;
|
|
242
233
|
|
|
243
|
-
/* negative inset covers the card's hairline so the accent edge replaces it */
|
|
244
234
|
inset: calc(-1 * var(--border-hairline));
|
|
245
235
|
z-index: 1;
|
|
246
236
|
border: var(--border-hairline) solid var(--accent);
|
|
@@ -249,34 +239,33 @@
|
|
|
249
239
|
pointer-events: none;
|
|
250
240
|
}
|
|
251
241
|
|
|
252
|
-
.rg--cards .rg-opt:hover:not(.is-disabled):not(.is-selected) {
|
|
242
|
+
.zc-rg--cards .zc-rg-opt:hover:not(.zc-is-disabled):not(.zc-is-selected) {
|
|
253
243
|
border-color: var(--border-strong);
|
|
254
244
|
background: var(--neutral-wash);
|
|
255
245
|
}
|
|
256
|
-
.rg--cards .rg-opt > .rg-opt__icon,
|
|
257
|
-
.rg--cards .rg-opt > .rg-opt__control,
|
|
258
|
-
.rg--cards .rg-opt > .rg-opt__body {
|
|
246
|
+
.zc-rg--cards .zc-rg-opt > .zc-rg-opt__icon,
|
|
247
|
+
.zc-rg--cards .zc-rg-opt > .zc-rg-opt__control,
|
|
248
|
+
.zc-rg--cards .zc-rg-opt > .zc-rg-opt__body {
|
|
259
249
|
position: relative;
|
|
260
250
|
z-index: 2;
|
|
261
251
|
}
|
|
262
|
-
.rg--cards .rg-opt.is-selected .rg-opt__icon {
|
|
252
|
+
.zc-rg--cards .zc-rg-opt.zc-is-selected .zc-rg-opt__icon {
|
|
263
253
|
color: var(--text-accent);
|
|
264
254
|
}
|
|
265
|
-
.rg--cards .rg-opt:has(.rg-opt__input:focus-visible) {
|
|
266
|
-
|
|
255
|
+
.zc-rg--cards .zc-rg-opt:has(.zc-rg-opt__input:focus-visible) {
|
|
256
|
+
outline: var(--ring-accent);
|
|
267
257
|
}
|
|
268
258
|
|
|
269
|
-
.rg--cards .rg-opt.is-disabled {
|
|
259
|
+
.zc-rg--cards .zc-rg-opt.zc-is-disabled {
|
|
270
260
|
background: var(--bg-subtle);
|
|
271
261
|
border-color: var(--border-subtle);
|
|
272
262
|
box-shadow: none;
|
|
273
263
|
}
|
|
274
|
-
.rg--cards .rg-opt.is-disabled .rg-opt__icon {
|
|
264
|
+
.zc-rg--cards .zc-rg-opt.zc-is-disabled .zc-rg-opt__icon {
|
|
275
265
|
color: var(--text-disabled);
|
|
276
266
|
}
|
|
277
267
|
|
|
278
|
-
|
|
279
|
-
.rg__msg {
|
|
268
|
+
.zc-rg__msg {
|
|
280
269
|
font: var(--type-caption);
|
|
281
270
|
color: var(--danger-text);
|
|
282
271
|
display: flex;
|
|
@@ -285,15 +274,15 @@
|
|
|
285
274
|
min-height: 1em;
|
|
286
275
|
padding-top: var(--space-3);
|
|
287
276
|
}
|
|
288
|
-
.rg__msg i,
|
|
289
|
-
.rg__msg svg {
|
|
277
|
+
.zc-rg__msg i,
|
|
278
|
+
.zc-rg__msg svg {
|
|
290
279
|
flex: none;
|
|
291
280
|
}
|
|
292
281
|
|
|
293
|
-
.rg.is-error .rg-opt:not(.is-selected) .rg-opt__dot {
|
|
282
|
+
.zc-rg.zc-is-error .zc-rg-opt:not(.zc-is-selected) .zc-rg-opt__dot {
|
|
294
283
|
border-color: var(--danger);
|
|
295
284
|
}
|
|
296
|
-
.rg.is-error.rg--cards .rg-opt:not(.is-selected) {
|
|
285
|
+
.zc-rg.zc-is-error.zc-rg--cards .zc-rg-opt:not(.zc-is-selected) {
|
|
297
286
|
border-color: var(--danger);
|
|
298
287
|
}
|
|
299
288
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import './spinner.css';
|
|
2
|
+
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
4
|
+
|
|
5
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
6
|
+
import { cx } from '../../internal/utils/cx';
|
|
7
|
+
|
|
8
|
+
export type SpinnerSize = 'inherit' | 'sm' | 'md' | 'lg';
|
|
9
|
+
export type SpinnerThickness = 'thin' | 'regular' | 'bold';
|
|
10
|
+
export type SpinnerVariant = 'arc' | 'dots' | 'pulse';
|
|
11
|
+
|
|
12
|
+
const PART_COUNT: Record<SpinnerVariant, number> = { arc: 0, pulse: 0, dots: 3 };
|
|
13
|
+
|
|
14
|
+
export interface SpinnerProps {
|
|
15
|
+
/** Diameter. `inherit` tracks the parent's font size at 1em, so a spinner beside a label
|
|
16
|
+
* always matches it; for any other size set `style={{ fontSize }}`. @default 'inherit' */
|
|
17
|
+
size?: SpinnerSize;
|
|
18
|
+
/** Stroke weight, scaled to the diameter so it holds up at every size. @default 'regular' */
|
|
19
|
+
thickness?: SpinnerThickness;
|
|
20
|
+
/** Which loader to draw. @default 'arc' */
|
|
21
|
+
variant?: SpinnerVariant;
|
|
22
|
+
/** What assistive tech announces. Pass `null` when something nearby already announces the
|
|
23
|
+
* wait - a button's `aria-busy`, an enclosing `role="status"` - and the spinner turns
|
|
24
|
+
* decorative rather than announcing it twice. @default 'Loading' */
|
|
25
|
+
label?: string | null;
|
|
26
|
+
/** Hold invisible for a beat before fading in, so work that finishes quickly never flashes
|
|
27
|
+
* a spinner. @default false */
|
|
28
|
+
delay?: boolean;
|
|
29
|
+
/** Extra class(es) merged onto the root. */
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Inline styles merged onto the root. */
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function Spinner({
|
|
36
|
+
size = 'inherit',
|
|
37
|
+
thickness = 'regular',
|
|
38
|
+
variant = 'arc',
|
|
39
|
+
label = 'Loading',
|
|
40
|
+
delay = false,
|
|
41
|
+
className,
|
|
42
|
+
style,
|
|
43
|
+
...rest
|
|
44
|
+
}: SpinnerProps & DataAttributes) {
|
|
45
|
+
const decorative = label === null;
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<span
|
|
49
|
+
className={cx(
|
|
50
|
+
'zc-spin',
|
|
51
|
+
`zc-spin--${variant}`,
|
|
52
|
+
size !== 'inherit' && `zc-spin--${size}`,
|
|
53
|
+
thickness !== 'regular' && `zc-spin--${thickness}`,
|
|
54
|
+
delay && 'zc-spin--delayed',
|
|
55
|
+
className,
|
|
56
|
+
)}
|
|
57
|
+
style={style}
|
|
58
|
+
role={decorative ? undefined : 'status'}
|
|
59
|
+
aria-label={decorative ? undefined : label}
|
|
60
|
+
aria-hidden={decorative ? true : undefined}
|
|
61
|
+
{...rest}
|
|
62
|
+
>
|
|
63
|
+
<span className="zc-spin__figure">
|
|
64
|
+
{Array.from({ length: PART_COUNT[variant] }, (_, i) => (
|
|
65
|
+
<span key={i} className="zc-spin__part" style={{ '--_spinner-i': i } as CSSProperties} />
|
|
66
|
+
))}
|
|
67
|
+
</span>
|
|
68
|
+
</span>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Spinner - @zyncat/ui/spinner
|
|
2
|
+
|
|
3
|
+
Group: primitives
|
|
4
|
+
Docs: https://ui.zyncat.app/spinner
|
|
5
|
+
|
|
6
|
+
Indeterminate loader; three looks, no JavaScript, no layout of its own.
|
|
7
|
+
|
|
8
|
+
Sizing is type-relative: the default `size="inherit"` draws at 1em, so a spinner beside a label
|
|
9
|
+
matches it without being told to, and `style={{ fontSize }}` sets any other diameter. thickness
|
|
10
|
+
scales with the diameter, so a large spinner is not a hairline. It announces itself as
|
|
11
|
+
`role="status"` labelled "Loading" by default; pass `label={null}` where something nearby already
|
|
12
|
+
announces the wait, as Button does through `aria-busy`. delay holds it invisible for a beat, so work
|
|
13
|
+
that finishes quickly never flashes a spinner.
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
<Spinner />
|
|
17
|
+
<Spinner variant="dots" size="lg" thickness="bold" />
|
|
18
|
+
<Spinner label={null} delay />
|
|
19
|
+
```
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
2
|
+
|
|
3
|
+
@layer zyncat.components {
|
|
4
|
+
.zc-spin {
|
|
5
|
+
--_spinner-size: 1em;
|
|
6
|
+
--_spinner-stroke: 0.125em;
|
|
7
|
+
--_spinner-dim: 0.16;
|
|
8
|
+
--_spinner-onset: var(--duration-slowest);
|
|
9
|
+
|
|
10
|
+
display: inline-block;
|
|
11
|
+
vertical-align: middle;
|
|
12
|
+
flex: none;
|
|
13
|
+
color: inherit;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.zc-spin--sm {
|
|
17
|
+
font-size: var(--size-caption);
|
|
18
|
+
}
|
|
19
|
+
.zc-spin--md {
|
|
20
|
+
font-size: var(--size-heading);
|
|
21
|
+
}
|
|
22
|
+
.zc-spin--lg {
|
|
23
|
+
font-size: var(--size-title-lg);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.zc-spin--thin {
|
|
27
|
+
--_spinner-stroke: 0.09em;
|
|
28
|
+
}
|
|
29
|
+
.zc-spin--bold {
|
|
30
|
+
--_spinner-stroke: 0.19em;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.zc-spin__figure {
|
|
34
|
+
position: relative;
|
|
35
|
+
display: block;
|
|
36
|
+
inline-size: var(--_spinner-size);
|
|
37
|
+
block-size: var(--_spinner-size);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.zc-spin--delayed .zc-spin__figure {
|
|
41
|
+
animation: zc-spin-appear var(--duration-base) var(--ease-standard) var(--_spinner-onset) backwards;
|
|
42
|
+
}
|
|
43
|
+
@keyframes zc-spin-appear {
|
|
44
|
+
from {
|
|
45
|
+
opacity: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.zc-spin--arc .zc-spin__figure {
|
|
50
|
+
border-radius: var(--radius-full);
|
|
51
|
+
border: var(--_spinner-stroke) solid currentColor;
|
|
52
|
+
border-inline-end-color: transparent;
|
|
53
|
+
animation: zc-spin-turn var(--duration-spin) linear infinite;
|
|
54
|
+
}
|
|
55
|
+
.zc-spin--delayed.zc-spin--arc .zc-spin__figure {
|
|
56
|
+
animation:
|
|
57
|
+
zc-spin-turn var(--duration-spin) linear infinite,
|
|
58
|
+
zc-spin-appear var(--duration-base) var(--ease-standard) var(--_spinner-onset) backwards;
|
|
59
|
+
}
|
|
60
|
+
@keyframes zc-spin-turn {
|
|
61
|
+
to {
|
|
62
|
+
rotate: 1turn;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.zc-spin--pulse .zc-spin__figure::before,
|
|
67
|
+
.zc-spin--pulse .zc-spin__figure::after {
|
|
68
|
+
content: '';
|
|
69
|
+
position: absolute;
|
|
70
|
+
inset: 0;
|
|
71
|
+
border-radius: var(--radius-full);
|
|
72
|
+
border: var(--_spinner-stroke) solid currentColor;
|
|
73
|
+
animation: zc-spin-ping var(--duration-spin) var(--ease-standard) infinite;
|
|
74
|
+
}
|
|
75
|
+
.zc-spin--pulse .zc-spin__figure::after {
|
|
76
|
+
animation-delay: calc(var(--duration-spin) / -2);
|
|
77
|
+
}
|
|
78
|
+
@keyframes zc-spin-ping {
|
|
79
|
+
from {
|
|
80
|
+
scale: 0.2;
|
|
81
|
+
opacity: 1;
|
|
82
|
+
}
|
|
83
|
+
to {
|
|
84
|
+
scale: 1;
|
|
85
|
+
opacity: 0;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.zc-spin--dots .zc-spin__figure {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: space-between;
|
|
93
|
+
inline-size: calc(var(--_spinner-size) * 2);
|
|
94
|
+
}
|
|
95
|
+
.zc-spin--dots .zc-spin__part {
|
|
96
|
+
inline-size: calc(var(--_spinner-size) / 2.6);
|
|
97
|
+
block-size: calc(var(--_spinner-size) / 2.6);
|
|
98
|
+
border-radius: var(--radius-full);
|
|
99
|
+
background: currentColor;
|
|
100
|
+
animation: zc-spin-bob var(--duration-spin) var(--ease-standard) infinite;
|
|
101
|
+
animation-delay: calc(var(--_spinner-i) * var(--duration-spin) / 6);
|
|
102
|
+
}
|
|
103
|
+
@keyframes zc-spin-bob {
|
|
104
|
+
0%,
|
|
105
|
+
70%,
|
|
106
|
+
100% {
|
|
107
|
+
scale: 0.6;
|
|
108
|
+
opacity: var(--_spinner-dim);
|
|
109
|
+
}
|
|
110
|
+
35% {
|
|
111
|
+
scale: 1;
|
|
112
|
+
opacity: 1;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -96,7 +96,7 @@ export function Tag({
|
|
|
96
96
|
htmlProps,
|
|
97
97
|
ref,
|
|
98
98
|
}: TagProps) {
|
|
99
|
-
const cls = cx('tag', size === 'sm' && 'tag--sm', className);
|
|
99
|
+
const cls = cx('zc-tag', size === 'sm' && 'zc-tag--sm', className);
|
|
100
100
|
const xLabel = removeLabel || (typeof children === 'string' ? 'Remove ' + children : 'Remove');
|
|
101
101
|
const group = useContext(TagGroupContext);
|
|
102
102
|
|
|
@@ -114,13 +114,13 @@ export function Tag({
|
|
|
114
114
|
{...htmlProps}
|
|
115
115
|
>
|
|
116
116
|
{icon && (
|
|
117
|
-
<span className="tag__icon">
|
|
117
|
+
<span className="zc-tag__icon">
|
|
118
118
|
<IconSlot size="sm">{icon}</IconSlot>
|
|
119
119
|
</span>
|
|
120
120
|
)}
|
|
121
|
-
<span className="tag__label">{children}</span>
|
|
121
|
+
<span className="zc-tag__label">{children}</span>
|
|
122
122
|
{onRemove && (
|
|
123
|
-
<button type="button" className="tag__remove" aria-label={xLabel} disabled={disabled} onClick={onRemove}>
|
|
123
|
+
<button type="button" className="zc-tag__remove" aria-label={xLabel} disabled={disabled} onClick={onRemove}>
|
|
124
124
|
<TagRemoveGlyph />
|
|
125
125
|
</button>
|
|
126
126
|
)}
|
|
@@ -139,7 +139,7 @@ export function TagGroup({ ariaLabel, className = '', style, children, htmlProps
|
|
|
139
139
|
};
|
|
140
140
|
|
|
141
141
|
return (
|
|
142
|
-
<div className={cx('tag-group', className)} style={style} role="group" aria-label={ariaLabel} {...htmlProps}>
|
|
142
|
+
<div className={cx('zc-tag-group', className)} style={style} role="group" aria-label={ariaLabel} {...htmlProps}>
|
|
143
143
|
<TagGroupContext.Provider value={motion}>
|
|
144
144
|
<Presence initial={false}>{children}</Presence>
|
|
145
145
|
</TagGroupContext.Provider>
|
|
@@ -41,8 +41,13 @@ export interface ToggleTagProps extends ToggleTagOwnProps {
|
|
|
41
41
|
|
|
42
42
|
function ToggleTagTick({ selected }: { selected: boolean }) {
|
|
43
43
|
return (
|
|
44
|
-
<span
|
|
45
|
-
|
|
44
|
+
<span
|
|
45
|
+
className="zc-tag__check zc-collapse"
|
|
46
|
+
data-axis="width"
|
|
47
|
+
data-open={selected ? 'true' : 'false'}
|
|
48
|
+
aria-hidden="true"
|
|
49
|
+
>
|
|
50
|
+
<span className="zc-collapse__inner">
|
|
46
51
|
<svg viewBox="0 0 12 12" fill="none">
|
|
47
52
|
<path
|
|
48
53
|
d="M2.5 6.5 L5 9 L9.5 3.5"
|
|
@@ -73,7 +78,7 @@ export function ToggleTag({
|
|
|
73
78
|
const [selected, setSelected] = useControllable(selectedProp, defaultSelected, onChange);
|
|
74
79
|
const toggle = () => setSelected(!selected);
|
|
75
80
|
|
|
76
|
-
const cls = cx('tag', 'tag--toggle', size === 'sm' && 'tag--sm', className);
|
|
81
|
+
const cls = cx('zc-tag', 'zc-tag--toggle', size === 'sm' && 'zc-tag--sm', className);
|
|
77
82
|
|
|
78
83
|
return (
|
|
79
84
|
<button
|
|
@@ -86,14 +91,14 @@ export function ToggleTag({
|
|
|
86
91
|
{...htmlProps}
|
|
87
92
|
>
|
|
88
93
|
{icon ? (
|
|
89
|
-
<span className="tag__icon">
|
|
94
|
+
<span className="zc-tag__icon">
|
|
90
95
|
<IconSlot size="sm">{icon}</IconSlot>
|
|
91
96
|
</span>
|
|
92
97
|
) : (
|
|
93
98
|
<ToggleTagTick selected={selected} />
|
|
94
99
|
)}
|
|
95
|
-
<span className="tag__label">{children}</span>
|
|
96
|
-
{count != null && <span className="tag__count">{count}</span>}
|
|
100
|
+
<span className="zc-tag__label">{children}</span>
|
|
101
|
+
{count != null && <span className="zc-tag__count">{count}</span>}
|
|
97
102
|
</button>
|
|
98
103
|
);
|
|
99
104
|
}
|