@zyncat/ui 0.13.1 → 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 +135 -23
- 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
|
@@ -214,31 +214,31 @@ export function Table<Row = any>({
|
|
|
214
214
|
|
|
215
215
|
function cellMods(col: TableColumn<Row>, i: number) {
|
|
216
216
|
const a: string[] = [];
|
|
217
|
-
if (col.align === 'end') a.push('tbl__cell--end');
|
|
218
|
-
if (col.align === 'center') a.push('tbl__cell--center');
|
|
219
|
-
if (col.grow) a.push('tbl__cell--grow');
|
|
220
|
-
if (col.hideBelow) a.push('tbl__cell--hide-' + col.hideBelow);
|
|
217
|
+
if (col.align === 'end') a.push('zc-tbl__cell--end');
|
|
218
|
+
if (col.align === 'center') a.push('zc-tbl__cell--center');
|
|
219
|
+
if (col.grow) a.push('zc-tbl__cell--grow');
|
|
220
|
+
if (col.hideBelow) a.push('zc-tbl__cell--hide-' + col.hideBelow);
|
|
221
221
|
if (pinFirst && i === 0) {
|
|
222
|
-
a.push('tbl__cell--pin', 'tbl__cell--pinEdge');
|
|
223
|
-
if (selectable) a.push('tbl__cell--pinOff');
|
|
222
|
+
a.push('zc-tbl__cell--pin', 'zc-tbl__cell--pinEdge');
|
|
223
|
+
if (selectable) a.push('zc-tbl__cell--pinOff');
|
|
224
224
|
}
|
|
225
225
|
return a;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
const colCount = columns.length + (selectable ? 1 : 0);
|
|
229
229
|
const showEmpty = !loading && sortedRows.length === 0;
|
|
230
|
-
const checkCellCls = 'tbl__cell--check' + (pinFirst ? ' tbl__cell--pin' : '');
|
|
230
|
+
const checkCellCls = 'zc-tbl__cell--check' + (pinFirst ? ' zc-tbl__cell--pin' : '');
|
|
231
231
|
|
|
232
232
|
const checkSize = density === 'compact' ? 'sm' : 'md';
|
|
233
233
|
const bulkOpen = selectable && selected.size > 0;
|
|
234
234
|
if (selected.size > 0) lastCountRef.current = selected.size;
|
|
235
235
|
|
|
236
236
|
const rootCls = cx(
|
|
237
|
-
'tbl',
|
|
238
|
-
density === 'compact' && 'tbl--compact',
|
|
239
|
-
pinFirst && 'tbl--pin',
|
|
240
|
-
loading && 'tbl--loading',
|
|
241
|
-
onRowClick && 'tbl--clickable',
|
|
237
|
+
'zc-tbl',
|
|
238
|
+
density === 'compact' && 'zc-tbl--compact',
|
|
239
|
+
pinFirst && 'zc-tbl--pin',
|
|
240
|
+
loading && 'zc-tbl--loading',
|
|
241
|
+
onRowClick && 'zc-tbl--clickable',
|
|
242
242
|
className,
|
|
243
243
|
);
|
|
244
244
|
|
|
@@ -246,25 +246,25 @@ export function Table<Row = any>({
|
|
|
246
246
|
<div ref={wrapRef} className={rootCls} {...htmlProps}>
|
|
247
247
|
{selectable ? (
|
|
248
248
|
<div
|
|
249
|
-
className="tbl__bulk"
|
|
249
|
+
className="zc-tbl__bulk"
|
|
250
250
|
data-open={bulkOpen ? '' : undefined}
|
|
251
251
|
aria-hidden={bulkOpen ? undefined : true}
|
|
252
252
|
role="toolbar"
|
|
253
253
|
aria-label="Selection actions"
|
|
254
254
|
>
|
|
255
255
|
<Checkbox
|
|
256
|
-
className="tbl__cbx"
|
|
256
|
+
className="zc-tbl__cbx"
|
|
257
257
|
size={checkSize}
|
|
258
258
|
checked={allSelected}
|
|
259
259
|
indeterminate={someSelected}
|
|
260
260
|
htmlProps={{ 'aria-label': 'Select all rows' }}
|
|
261
261
|
onChange={toggleAll}
|
|
262
262
|
/>
|
|
263
|
-
<span className="tbl__bulkCount" aria-live="polite" aria-atomic="true">
|
|
263
|
+
<span className="zc-tbl__bulkCount" aria-live="polite" aria-atomic="true">
|
|
264
264
|
<DigitStrip value={bulkOpen ? selected.size : lastCountRef.current} />
|
|
265
265
|
<span> selected</span>
|
|
266
266
|
</span>
|
|
267
|
-
<span className="tbl__bulkSpacer"></span>
|
|
267
|
+
<span className="zc-tbl__bulkSpacer"></span>
|
|
268
268
|
{bulkActions ? bulkActions(Array.from(selected), clearSelection) : null}
|
|
269
269
|
<Button variant="ghost" size="sm" onClick={clearSelection}>
|
|
270
270
|
Clear
|
|
@@ -272,15 +272,15 @@ export function Table<Row = any>({
|
|
|
272
272
|
</div>
|
|
273
273
|
) : null}
|
|
274
274
|
|
|
275
|
-
<div className="tbl__viewport">
|
|
276
|
-
<div className="tbl__scroll" ref={scrollRef}>
|
|
277
|
-
<table className="tbl__table" aria-label={ariaLabel} aria-busy={loading || undefined}>
|
|
275
|
+
<div className="zc-tbl__viewport">
|
|
276
|
+
<div className="zc-tbl__scroll" ref={scrollRef}>
|
|
277
|
+
<table className="zc-tbl__table" aria-label={ariaLabel} aria-busy={loading || undefined}>
|
|
278
278
|
<thead>
|
|
279
279
|
<tr>
|
|
280
280
|
{selectable ? (
|
|
281
281
|
<th scope="col" className={checkCellCls}>
|
|
282
282
|
<Checkbox
|
|
283
|
-
className="tbl__cbx"
|
|
283
|
+
className="zc-tbl__cbx"
|
|
284
284
|
size={checkSize}
|
|
285
285
|
checked={allSelected}
|
|
286
286
|
indeterminate={someSelected}
|
|
@@ -291,7 +291,7 @@ export function Table<Row = any>({
|
|
|
291
291
|
) : null}
|
|
292
292
|
{columns.map((c, i) => {
|
|
293
293
|
const active = sort && sort.key === c.key;
|
|
294
|
-
const cls = (c.sortable ? ['tbl__cell--sortable'] : []).concat(cellMods(c, i));
|
|
294
|
+
const cls = (c.sortable ? ['zc-tbl__cell--sortable'] : []).concat(cellMods(c, i));
|
|
295
295
|
return (
|
|
296
296
|
<th
|
|
297
297
|
key={c.key}
|
|
@@ -302,15 +302,15 @@ export function Table<Row = any>({
|
|
|
302
302
|
{c.sortable ? (
|
|
303
303
|
<button
|
|
304
304
|
type="button"
|
|
305
|
-
className="tbl__sort"
|
|
305
|
+
className="zc-tbl__sort"
|
|
306
306
|
{...activationProps<HTMLButtonElement>(() => cycleSort(c), { on: activateOn })}
|
|
307
307
|
>
|
|
308
|
-
<span className="tbl__sortLbl">{c.label}</span>
|
|
308
|
+
<span className="zc-tbl__sortLbl">{c.label}</span>
|
|
309
309
|
<span
|
|
310
310
|
className={
|
|
311
|
-
'tbl__sortIcon' +
|
|
312
|
-
(active ? ' is-on' : '') +
|
|
313
|
-
(active && sort.dir === 'desc' ? ' is-desc' : '')
|
|
311
|
+
'zc-tbl__sortIcon' +
|
|
312
|
+
(active ? ' zc-is-on' : '') +
|
|
313
|
+
(active && sort.dir === 'desc' ? ' zc-is-desc' : '')
|
|
314
314
|
}
|
|
315
315
|
aria-hidden="true"
|
|
316
316
|
>
|
|
@@ -318,7 +318,7 @@ export function Table<Row = any>({
|
|
|
318
318
|
</span>
|
|
319
319
|
</button>
|
|
320
320
|
) : c.label != null ? (
|
|
321
|
-
<span className="tbl__hLbl">{c.label}</span>
|
|
321
|
+
<span className="zc-tbl__hLbl">{c.label}</span>
|
|
322
322
|
) : null}
|
|
323
323
|
</th>
|
|
324
324
|
);
|
|
@@ -328,7 +328,7 @@ export function Table<Row = any>({
|
|
|
328
328
|
<tbody>
|
|
329
329
|
{showEmpty ? (
|
|
330
330
|
<tr>
|
|
331
|
-
<td colSpan={colCount} className="tbl__emptyCell">
|
|
331
|
+
<td colSpan={colCount} className="zc-tbl__emptyCell">
|
|
332
332
|
{empty != null ? empty : 'Nothing to show'}
|
|
333
333
|
</td>
|
|
334
334
|
</tr>
|
|
@@ -342,14 +342,14 @@ export function Table<Row = any>({
|
|
|
342
342
|
key={k}
|
|
343
343
|
layout
|
|
344
344
|
layoutTransition={ROW_FLIP}
|
|
345
|
-
className="tbl__row"
|
|
345
|
+
className="zc-tbl__row"
|
|
346
346
|
data-selected={isSel ? '' : undefined}
|
|
347
347
|
onClick={onRowClick ? () => onRowClick(row) : undefined}
|
|
348
348
|
>
|
|
349
349
|
{selectable ? (
|
|
350
350
|
<td className={checkCellCls} onClick={(e) => e.stopPropagation()}>
|
|
351
351
|
<Checkbox
|
|
352
|
-
className="tbl__cbx"
|
|
352
|
+
className="zc-tbl__cbx"
|
|
353
353
|
size={checkSize}
|
|
354
354
|
checked={isSel}
|
|
355
355
|
htmlProps={{
|
|
@@ -366,8 +366,8 @@ export function Table<Row = any>({
|
|
|
366
366
|
<td
|
|
367
367
|
key={c.key}
|
|
368
368
|
className={cellMods(c, i)
|
|
369
|
-
.concat(c.mono ? ['tbl__cell--mono'] : [])
|
|
370
|
-
.concat(c.strong ? ['tbl__cell--strong'] : [])
|
|
369
|
+
.concat(c.mono ? ['zc-tbl__cell--mono'] : [])
|
|
370
|
+
.concat(c.strong ? ['zc-tbl__cell--strong'] : [])
|
|
371
371
|
.join(' ')}
|
|
372
372
|
>
|
|
373
373
|
{c.render ? c.render(row) : (row as Record<string, ReactNode>)[c.key]}
|
|
@@ -380,11 +380,11 @@ export function Table<Row = any>({
|
|
|
380
380
|
</tbody>
|
|
381
381
|
</table>
|
|
382
382
|
</div>
|
|
383
|
-
<div className="tbl__edge tbl__edge--l" aria-hidden="true"></div>
|
|
384
|
-
<div className="tbl__edge tbl__edge--r" aria-hidden="true"></div>
|
|
383
|
+
<div className="zc-tbl__edge zc-tbl__edge--l" aria-hidden="true"></div>
|
|
384
|
+
<div className="zc-tbl__edge zc-tbl__edge--r" aria-hidden="true"></div>
|
|
385
385
|
</div>
|
|
386
386
|
|
|
387
|
-
{footer ? <div className="tbl__foot">{footer}</div> : null}
|
|
387
|
+
{footer ? <div className="zc-tbl__foot">{footer}</div> : null}
|
|
388
388
|
</div>
|
|
389
389
|
);
|
|
390
390
|
}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
@layer zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.components {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.tbl,
|
|
7
|
-
.tbl * {
|
|
4
|
+
.zc-tbl,
|
|
5
|
+
.zc-tbl * {
|
|
8
6
|
box-sizing: border-box;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
|
-
.tbl {
|
|
9
|
+
.zc-tbl {
|
|
12
10
|
--tbl-pad-y: var(--space-3);
|
|
13
11
|
--tbl-head-py: var(--space-3);
|
|
14
12
|
--tbl-head-h: calc(var(--leading-caption) + 2 * var(--tbl-head-py));
|
|
15
|
-
/* checkbox column: pad 8 + (8 + 18 + 8 hit area) + pad 8 - all tokens */
|
|
16
13
|
--tbl-check-w: calc(var(--control-box) + 4 * var(--space-2));
|
|
17
14
|
|
|
18
15
|
position: relative;
|
|
@@ -27,35 +24,36 @@
|
|
|
27
24
|
overflow: hidden;
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
.tbl--compact {
|
|
27
|
+
.zc-tbl--compact {
|
|
31
28
|
--tbl-pad-y: var(--space-2);
|
|
32
29
|
--tbl-head-py: var(--space-2);
|
|
33
30
|
}
|
|
34
31
|
|
|
35
|
-
.tbl__viewport {
|
|
32
|
+
.zc-tbl__viewport {
|
|
36
33
|
position: relative;
|
|
37
|
-
display: flex; /*
|
|
34
|
+
display: flex; /* not height: 100% - a percentage inside a max-height parent resolves to auto */
|
|
38
35
|
flex-direction: column;
|
|
39
36
|
flex: 1 1 auto;
|
|
40
37
|
min-height: 0;
|
|
41
38
|
}
|
|
42
|
-
.tbl__scroll {
|
|
39
|
+
.zc-tbl__scroll {
|
|
43
40
|
flex: 1 1 auto;
|
|
44
41
|
min-height: 0;
|
|
45
42
|
overflow: auto;
|
|
46
43
|
overscroll-behavior-x: contain;
|
|
44
|
+
scroll-padding: var(--ring-width);
|
|
47
45
|
}
|
|
48
|
-
.tbl[data-y-scroll] .tbl__scroll {
|
|
46
|
+
.zc-tbl[data-y-scroll] .zc-tbl__scroll {
|
|
49
47
|
overscroll-behavior-y: contain;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
|
-
.tbl__table {
|
|
50
|
+
.zc-tbl__table {
|
|
53
51
|
width: 100%;
|
|
54
52
|
border-collapse: separate; /* collapse breaks sticky borders */
|
|
55
53
|
border-spacing: 0;
|
|
56
54
|
}
|
|
57
55
|
|
|
58
|
-
.tbl__table thead th {
|
|
56
|
+
.zc-tbl__table thead th {
|
|
59
57
|
position: sticky;
|
|
60
58
|
top: 0;
|
|
61
59
|
z-index: 2;
|
|
@@ -71,74 +69,71 @@
|
|
|
71
69
|
white-space: nowrap;
|
|
72
70
|
transition: box-shadow var(--duration-base) var(--ease-standard);
|
|
73
71
|
}
|
|
74
|
-
.tbl[data-scrolled] .tbl__table thead th {
|
|
72
|
+
.zc-tbl[data-scrolled] .zc-tbl__table thead th {
|
|
75
73
|
box-shadow: var(--shadow-sm);
|
|
76
74
|
}
|
|
77
75
|
|
|
78
|
-
.tbl__table td {
|
|
76
|
+
.zc-tbl__table td {
|
|
79
77
|
padding: var(--tbl-pad-y) var(--space-3);
|
|
80
78
|
border-bottom: var(--border-hairline) solid var(--border-subtle);
|
|
81
79
|
background: var(--row-bg, var(--bg-surface));
|
|
82
80
|
font: var(--type-body);
|
|
83
81
|
color: var(--text-body);
|
|
84
82
|
vertical-align: middle;
|
|
85
|
-
white-space: nowrap;
|
|
83
|
+
white-space: nowrap;
|
|
86
84
|
transition: background-color var(--duration-fast) var(--ease-standard);
|
|
87
85
|
}
|
|
88
|
-
.tbl__table tbody tr:last-child td {
|
|
86
|
+
.zc-tbl__table tbody tr:last-child td {
|
|
89
87
|
border-bottom: 0;
|
|
90
88
|
}
|
|
91
89
|
|
|
92
|
-
|
|
93
|
-
.tbl__table
|
|
94
|
-
.tbl__table td:first-child:not(.tbl__cell--check) {
|
|
90
|
+
.zc-tbl__table th:first-child:not(.zc-tbl__cell--check):not(.zc-tbl__cell--sortable),
|
|
91
|
+
.zc-tbl__table td:first-child:not(.zc-tbl__cell--check) {
|
|
95
92
|
padding-inline-start: var(--space-4);
|
|
96
93
|
}
|
|
97
|
-
.tbl__table th:last-child:not(.tbl__cell--sortable),
|
|
98
|
-
.tbl__table td:last-child {
|
|
94
|
+
.zc-tbl__table th:last-child:not(.zc-tbl__cell--sortable),
|
|
95
|
+
.zc-tbl__table td:last-child {
|
|
99
96
|
padding-inline-end: var(--space-4);
|
|
100
97
|
}
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
.tbl__row {
|
|
99
|
+
.zc-tbl__row {
|
|
104
100
|
--row-bg: var(--bg-surface);
|
|
105
101
|
}
|
|
106
|
-
.tbl__row:hover {
|
|
102
|
+
.zc-tbl__row:hover {
|
|
107
103
|
--row-bg: var(--bg-subtle);
|
|
108
104
|
}
|
|
109
|
-
.tbl__row[data-selected] {
|
|
105
|
+
.zc-tbl__row[data-selected] {
|
|
110
106
|
--row-bg: color-mix(in oklab, var(--accent) 5%, var(--bg-surface));
|
|
111
107
|
}
|
|
112
|
-
.tbl__row[data-selected]:hover {
|
|
108
|
+
.zc-tbl__row[data-selected]:hover {
|
|
113
109
|
--row-bg: color-mix(in oklab, var(--accent) 5%, var(--bg-subtle));
|
|
114
110
|
}
|
|
115
|
-
.tbl--clickable tbody .tbl__row {
|
|
111
|
+
.zc-tbl--clickable tbody .zc-tbl__row {
|
|
116
112
|
cursor: pointer;
|
|
117
113
|
}
|
|
118
114
|
|
|
119
|
-
.tbl__table td.tbl__cell--mono {
|
|
120
|
-
font: var(--type-
|
|
115
|
+
.zc-tbl__table td.zc-tbl__cell--mono {
|
|
116
|
+
font: var(--type-code);
|
|
121
117
|
font-variant-numeric: tabular-nums;
|
|
122
118
|
}
|
|
123
|
-
.tbl__table td.tbl__cell--strong {
|
|
119
|
+
.zc-tbl__table td.zc-tbl__cell--strong {
|
|
124
120
|
color: var(--text-strong);
|
|
125
121
|
font-weight: var(--weight-medium);
|
|
126
122
|
}
|
|
127
|
-
.tbl__cell--end {
|
|
123
|
+
.zc-tbl__cell--end {
|
|
128
124
|
text-align: right;
|
|
129
125
|
}
|
|
130
|
-
.tbl__cell--center {
|
|
126
|
+
.zc-tbl__cell--center {
|
|
131
127
|
text-align: center;
|
|
132
128
|
}
|
|
133
|
-
.tbl__cell--grow {
|
|
129
|
+
.zc-tbl__cell--grow {
|
|
134
130
|
width: 100%;
|
|
135
|
-
}
|
|
131
|
+
}
|
|
136
132
|
|
|
137
|
-
|
|
138
|
-
.tbl__table th.tbl__cell--sortable {
|
|
133
|
+
.zc-tbl__table th.zc-tbl__cell--sortable {
|
|
139
134
|
padding: 0;
|
|
140
135
|
}
|
|
141
|
-
.tbl__sort {
|
|
136
|
+
.zc-tbl__sort {
|
|
142
137
|
appearance: none;
|
|
143
138
|
border: 0;
|
|
144
139
|
background: transparent;
|
|
@@ -157,31 +152,30 @@
|
|
|
157
152
|
white-space: nowrap;
|
|
158
153
|
transition: var(--transition-colors);
|
|
159
154
|
}
|
|
160
|
-
.tbl__table th.tbl__cell--sortable:first-child .tbl__sort {
|
|
155
|
+
.zc-tbl__table th.zc-tbl__cell--sortable:first-child .zc-tbl__sort {
|
|
161
156
|
padding-inline-start: var(--space-3);
|
|
162
157
|
}
|
|
163
|
-
.tbl__table th.tbl__cell--sortable:last-child .tbl__sort {
|
|
158
|
+
.zc-tbl__table th.zc-tbl__cell--sortable:last-child .zc-tbl__sort {
|
|
164
159
|
padding-inline-end: var(--space-3);
|
|
165
160
|
}
|
|
166
|
-
.tbl__cell--end .tbl__sort {
|
|
161
|
+
.zc-tbl__cell--end .zc-tbl__sort {
|
|
167
162
|
justify-content: flex-end;
|
|
168
163
|
}
|
|
169
|
-
.tbl__cell--center .tbl__sort {
|
|
164
|
+
.zc-tbl__cell--center .zc-tbl__sort {
|
|
170
165
|
justify-content: center;
|
|
171
166
|
}
|
|
172
|
-
.tbl__sort:hover {
|
|
167
|
+
.zc-tbl__sort:hover {
|
|
173
168
|
color: var(--text-strong);
|
|
174
169
|
background: var(--neutral-wash);
|
|
175
170
|
}
|
|
176
|
-
.tbl__sort:focus-visible {
|
|
177
|
-
outline:
|
|
178
|
-
box-shadow: var(--focus-ring);
|
|
171
|
+
.zc-tbl__sort:focus-visible {
|
|
172
|
+
outline: var(--focus-ring);
|
|
179
173
|
}
|
|
180
|
-
.tbl__table th[aria-sort] .tbl__sort {
|
|
174
|
+
.zc-tbl__table th[aria-sort] .zc-tbl__sort {
|
|
181
175
|
color: var(--text-strong);
|
|
182
176
|
}
|
|
183
177
|
|
|
184
|
-
.tbl__sortIcon {
|
|
178
|
+
.zc-tbl__sortIcon {
|
|
185
179
|
display: inline-flex;
|
|
186
180
|
flex: none;
|
|
187
181
|
opacity: 0;
|
|
@@ -189,30 +183,29 @@
|
|
|
189
183
|
opacity var(--duration-fast) var(--ease-standard),
|
|
190
184
|
transform var(--duration-base) var(--ease-glide);
|
|
191
185
|
}
|
|
192
|
-
.tbl__sort:hover .tbl__sortIcon,
|
|
193
|
-
.tbl__sort:focus-visible .tbl__sortIcon {
|
|
186
|
+
.zc-tbl__sort:hover .zc-tbl__sortIcon,
|
|
187
|
+
.zc-tbl__sort:focus-visible .zc-tbl__sortIcon {
|
|
194
188
|
opacity: 0.5;
|
|
195
189
|
}
|
|
196
|
-
.tbl__sortIcon.is-on {
|
|
190
|
+
.zc-tbl__sortIcon.zc-is-on {
|
|
197
191
|
opacity: 1;
|
|
198
192
|
}
|
|
199
|
-
.tbl__sortIcon.is-desc {
|
|
193
|
+
.zc-tbl__sortIcon.zc-is-desc {
|
|
200
194
|
transform: rotate(180deg);
|
|
201
195
|
}
|
|
202
196
|
|
|
203
|
-
.tbl__table .tbl__cell--check {
|
|
197
|
+
.zc-tbl__table .zc-tbl__cell--check {
|
|
204
198
|
width: var(--tbl-check-w);
|
|
205
199
|
padding: 0 var(--space-2);
|
|
206
200
|
}
|
|
207
|
-
.tbl__cbx {
|
|
201
|
+
.zc-tbl__cbx {
|
|
208
202
|
display: inline-flex;
|
|
209
203
|
}
|
|
210
|
-
.tbl__cbx .cbx__box {
|
|
204
|
+
.zc-tbl__cbx .zc-cbx__box {
|
|
211
205
|
margin-top: 0;
|
|
212
|
-
}
|
|
206
|
+
}
|
|
213
207
|
|
|
214
|
-
|
|
215
|
-
.tbl__bulk {
|
|
208
|
+
.zc-tbl__bulk {
|
|
216
209
|
position: absolute;
|
|
217
210
|
top: 0;
|
|
218
211
|
left: 0;
|
|
@@ -234,7 +227,7 @@
|
|
|
234
227
|
transform var(--duration-fast) var(--ease-exit),
|
|
235
228
|
visibility 0s linear var(--duration-fast);
|
|
236
229
|
}
|
|
237
|
-
.tbl__bulk[data-open] {
|
|
230
|
+
.zc-tbl__bulk[data-open] {
|
|
238
231
|
opacity: 1;
|
|
239
232
|
transform: none;
|
|
240
233
|
visibility: visible;
|
|
@@ -244,13 +237,13 @@
|
|
|
244
237
|
transform var(--duration-base) var(--ease-entrance),
|
|
245
238
|
visibility 0s;
|
|
246
239
|
}
|
|
247
|
-
.tbl__bulk .cbx:not(.cbx--disabled):hover {
|
|
240
|
+
.zc-tbl__bulk .zc-cbx:not(.zc-cbx--disabled):hover {
|
|
248
241
|
background: var(--accent-wash);
|
|
249
242
|
}
|
|
250
|
-
.tbl__bulkCount {
|
|
243
|
+
.zc-tbl__bulkCount {
|
|
251
244
|
display: inline-flex;
|
|
252
245
|
align-items: baseline;
|
|
253
|
-
font-family: var(--font-
|
|
246
|
+
font-family: var(--font-code);
|
|
254
247
|
font-size: var(--size-caption);
|
|
255
248
|
line-height: var(--leading-caption);
|
|
256
249
|
font-weight: var(--weight-medium);
|
|
@@ -258,43 +251,42 @@
|
|
|
258
251
|
color: var(--text-accent);
|
|
259
252
|
white-space: pre; /* keep the space before "selected" */
|
|
260
253
|
}
|
|
261
|
-
.tbl__bulkSpacer {
|
|
254
|
+
.zc-tbl__bulkSpacer {
|
|
262
255
|
flex: 1 1 auto;
|
|
263
256
|
}
|
|
264
257
|
|
|
265
|
-
.tbl--pin .tbl__cell--pin {
|
|
258
|
+
.zc-tbl--pin .zc-tbl__cell--pin {
|
|
266
259
|
position: sticky;
|
|
267
260
|
left: 0;
|
|
268
261
|
z-index: 1;
|
|
269
262
|
}
|
|
270
|
-
.tbl--pin thead .tbl__cell--pin {
|
|
263
|
+
.zc-tbl--pin thead .zc-tbl__cell--pin {
|
|
271
264
|
z-index: 3;
|
|
272
265
|
}
|
|
273
|
-
.tbl--pin .tbl__cell--pinOff {
|
|
266
|
+
.zc-tbl--pin .zc-tbl__cell--pinOff {
|
|
274
267
|
left: var(--tbl-check-w);
|
|
275
268
|
}
|
|
276
269
|
|
|
277
|
-
|
|
278
|
-
.tbl--pin .tbl__cell--pinEdge::after {
|
|
270
|
+
.zc-tbl--pin .zc-tbl__cell--pinEdge::after {
|
|
279
271
|
content: '';
|
|
280
272
|
position: absolute;
|
|
281
273
|
top: 0;
|
|
282
274
|
bottom: calc(-1 * var(--border-hairline));
|
|
283
275
|
left: 100%;
|
|
284
276
|
width: var(--space-3);
|
|
285
|
-
background: linear-gradient(to right, var(--
|
|
277
|
+
background: linear-gradient(to right, var(--neutral-wash), transparent);
|
|
286
278
|
opacity: 0;
|
|
287
279
|
transition: var(--transition-opacity);
|
|
288
280
|
pointer-events: none;
|
|
289
281
|
}
|
|
290
|
-
.tbl--pin tbody tr:last-child .tbl__cell--pinEdge::after {
|
|
282
|
+
.zc-tbl--pin tbody tr:last-child .zc-tbl__cell--pinEdge::after {
|
|
291
283
|
bottom: 0;
|
|
292
284
|
}
|
|
293
|
-
.tbl[data-x-back] .tbl__cell--pinEdge::after {
|
|
285
|
+
.zc-tbl[data-x-back] .zc-tbl__cell--pinEdge::after {
|
|
294
286
|
opacity: 1;
|
|
295
287
|
}
|
|
296
288
|
|
|
297
|
-
.tbl__edge {
|
|
289
|
+
.zc-tbl__edge {
|
|
298
290
|
position: absolute;
|
|
299
291
|
top: 0;
|
|
300
292
|
bottom: 0;
|
|
@@ -304,37 +296,37 @@
|
|
|
304
296
|
transition: var(--transition-opacity);
|
|
305
297
|
pointer-events: none;
|
|
306
298
|
}
|
|
307
|
-
.tbl__edge--l {
|
|
299
|
+
.zc-tbl__edge--l {
|
|
308
300
|
left: 0;
|
|
309
301
|
background: linear-gradient(to right, var(--bg-surface), transparent);
|
|
310
302
|
}
|
|
311
|
-
.tbl__edge--r {
|
|
303
|
+
.zc-tbl__edge--r {
|
|
312
304
|
right: 0;
|
|
313
305
|
background: linear-gradient(to left, var(--bg-surface), transparent);
|
|
314
306
|
}
|
|
315
|
-
.tbl[data-x-more] .tbl__edge--r {
|
|
307
|
+
.zc-tbl[data-x-more] .zc-tbl__edge--r {
|
|
316
308
|
opacity: 1;
|
|
317
309
|
}
|
|
318
|
-
.tbl[data-x-back]:not(.tbl--pin) .tbl__edge--l {
|
|
310
|
+
.zc-tbl[data-x-back]:not(.zc-tbl--pin) .zc-tbl__edge--l {
|
|
319
311
|
opacity: 1;
|
|
320
|
-
}
|
|
312
|
+
}
|
|
321
313
|
|
|
322
|
-
.tbl__emptyCell {
|
|
314
|
+
.zc-tbl__emptyCell {
|
|
323
315
|
padding: var(--space-7) var(--space-4);
|
|
324
316
|
text-align: center;
|
|
325
317
|
font: var(--type-body);
|
|
326
318
|
color: var(--text-muted);
|
|
327
319
|
}
|
|
328
320
|
|
|
329
|
-
.tbl__table tbody {
|
|
321
|
+
.zc-tbl__table tbody {
|
|
330
322
|
transition: var(--transition-opacity);
|
|
331
323
|
}
|
|
332
|
-
.tbl--loading .tbl__table tbody {
|
|
324
|
+
.zc-tbl--loading .zc-tbl__table tbody {
|
|
333
325
|
opacity: 0.45;
|
|
334
326
|
pointer-events: none;
|
|
335
327
|
}
|
|
336
328
|
|
|
337
|
-
.tbl__foot {
|
|
329
|
+
.zc-tbl__foot {
|
|
338
330
|
display: flex;
|
|
339
331
|
align-items: center;
|
|
340
332
|
justify-content: flex-end;
|
|
@@ -344,14 +336,14 @@
|
|
|
344
336
|
border-top: var(--border-hairline) solid var(--border-subtle);
|
|
345
337
|
}
|
|
346
338
|
|
|
347
|
-
/*
|
|
339
|
+
/* 30rem and 42rem are constants: there is no breakpoint token */
|
|
348
340
|
@container (max-width: 42rem) {
|
|
349
|
-
.tbl__cell--hide-md {
|
|
341
|
+
.zc-tbl__cell--hide-md {
|
|
350
342
|
display: none;
|
|
351
343
|
}
|
|
352
344
|
}
|
|
353
345
|
@container (max-width: 30rem) {
|
|
354
|
-
.tbl__cell--hide-sm {
|
|
346
|
+
.zc-tbl__cell--hide-sm {
|
|
355
347
|
display: none;
|
|
356
348
|
}
|
|
357
349
|
}
|
|
@@ -45,21 +45,18 @@ interface TabsOwnProps {
|
|
|
45
45
|
items: TabItem[];
|
|
46
46
|
/** Controlled - the value of the active tab (null/undefined hides the ink). */
|
|
47
47
|
value: string | null | undefined;
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* `dir` is the direction of travel (+1 right / -1 left) - hand it to
|
|
51
|
-
* TabPanel so content enters from the side the user moved toward.
|
|
52
|
-
*/
|
|
48
|
+
/** Fires on click and on arrow-key travel. `dir` is the direction of travel (+1 right, -1 left);
|
|
49
|
+
* hand it to TabPanel so content enters from that side. */
|
|
53
50
|
onChange?: (value: string, dir: 1 | -1) => void;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* same `name`; omit it when the tabs have no managed panel.
|
|
57
|
-
*/
|
|
51
|
+
/** Shared id prefix wiring tab and panel aria. Give Tabs and its TabPanel the same `name`;
|
|
52
|
+
* omit it when the tabs have no managed panel. */
|
|
58
53
|
name?: string;
|
|
59
54
|
/** Accessible name for the tablist (e.g. "Section views"). */
|
|
60
55
|
ariaLabel?: string;
|
|
61
56
|
/** Whether a tab switches on `pointerdown` (snappier) or waits for `click`. @default 'pointerdown' */
|
|
62
57
|
activateOn?: ActivateOn;
|
|
58
|
+
/** Skin: an underline that reaches across (default), or a segmented pill riding an inset track. */
|
|
59
|
+
variant?: 'underline' | 'pill';
|
|
63
60
|
/** Extra class(es) merged onto the root. */
|
|
64
61
|
className?: string;
|
|
65
62
|
/** Inline styles merged onto the root. */
|
|
@@ -81,12 +78,14 @@ export function Tabs({
|
|
|
81
78
|
name,
|
|
82
79
|
ariaLabel,
|
|
83
80
|
activateOn = 'pointerdown',
|
|
81
|
+
variant = 'underline',
|
|
84
82
|
className = '',
|
|
85
83
|
style,
|
|
86
84
|
htmlProps,
|
|
87
85
|
}: TabsProps) {
|
|
88
86
|
const autoId = useId();
|
|
89
87
|
const base = name || autoId;
|
|
88
|
+
const pill = variant === 'pill';
|
|
90
89
|
|
|
91
90
|
const listRef = useRef<HTMLDivElement>(null);
|
|
92
91
|
const inkRef = useRef<HTMLSpanElement>(null);
|
|
@@ -190,16 +189,16 @@ export function Tabs({
|
|
|
190
189
|
: (items.find((i) => !i.disabled) || ({} as Partial<TabItem>)).value;
|
|
191
190
|
|
|
192
191
|
return (
|
|
193
|
-
<div className={cx('tabs', className)} style={style} {...htmlProps}>
|
|
192
|
+
<div className={cx('zc-tabs', pill && 'zc-tabs--pill', className)} style={style} {...htmlProps}>
|
|
194
193
|
<div
|
|
195
|
-
className="tabs__list"
|
|
194
|
+
className="zc-tabs__list"
|
|
196
195
|
role="tablist"
|
|
197
196
|
aria-label={ariaLabel}
|
|
198
197
|
ref={listRef}
|
|
199
198
|
onKeyDown={onKeyDown}
|
|
200
|
-
onPointerLeave={glide.leave}
|
|
199
|
+
onPointerLeave={pill ? undefined : glide.leave}
|
|
201
200
|
>
|
|
202
|
-
<GlidePill className="tab__hover" glide={glide} />
|
|
201
|
+
{!pill && <GlidePill className="zc-tab__hover" glide={glide} />}
|
|
203
202
|
{items.map((it) => {
|
|
204
203
|
const selected = it.value === value;
|
|
205
204
|
return (
|
|
@@ -212,24 +211,24 @@ export function Tabs({
|
|
|
212
211
|
aria-controls={name ? name + '-panel-' + it.value : undefined}
|
|
213
212
|
tabIndex={it.value === focusValue ? 0 : -1}
|
|
214
213
|
disabled={it.disabled}
|
|
215
|
-
className={'tab' + (selected ? ' is-selected' : '')}
|
|
214
|
+
className={'zc-tab' + (selected ? ' zc-is-selected' : '')}
|
|
216
215
|
ref={(el) => {
|
|
217
216
|
tabRefs.current[it.value] = el;
|
|
218
217
|
}}
|
|
219
218
|
{...activationProps<HTMLButtonElement>(() => select(it.value), { on: activateOn })}
|
|
220
219
|
onPointerEnter={
|
|
221
|
-
it.disabled ? undefined : (e) => glide.enter(e.currentTarget.firstElementChild as HTMLElement)
|
|
220
|
+
it.disabled || pill ? undefined : (e) => glide.enter(e.currentTarget.firstElementChild as HTMLElement)
|
|
222
221
|
}
|
|
223
222
|
>
|
|
224
|
-
<span className="tab__pad">
|
|
223
|
+
<span className="zc-tab__pad">
|
|
225
224
|
{it.icon && <IconSlot size="sm">{it.icon}</IconSlot>}
|
|
226
|
-
<span className="tab__label">{it.label}</span>
|
|
227
|
-
{it.count != null && <span className="tab__count">{it.count}</span>}
|
|
225
|
+
<span className="zc-tab__label">{it.label}</span>
|
|
226
|
+
{it.count != null && <span className="zc-tab__count">{it.count}</span>}
|
|
228
227
|
</span>
|
|
229
228
|
</button>
|
|
230
229
|
);
|
|
231
230
|
})}
|
|
232
|
-
<span className="tabs__ink" key="ink" ref={inkRef} aria-hidden="true"></span>
|
|
231
|
+
<span className="zc-tabs__ink" key="ink" ref={inkRef} aria-hidden="true"></span>
|
|
233
232
|
</div>
|
|
234
233
|
</div>
|
|
235
234
|
);
|
|
@@ -274,11 +273,11 @@ export function TabPanel({ tab, name, dir = 0, className = '', style, children,
|
|
|
274
273
|
tabIndex={0}
|
|
275
274
|
id={name ? `${name}-panel-${tab}` : undefined}
|
|
276
275
|
aria-labelledby={name ? `${name}-tab-${tab}` : undefined}
|
|
277
|
-
className={cx('tab-panel', className)}
|
|
276
|
+
className={cx('zc-tab-panel', className)}
|
|
278
277
|
style={style}
|
|
279
278
|
{...htmlProps}
|
|
280
279
|
>
|
|
281
|
-
<Motion className="tab-panel__inner" animate={{ x: [dir * TABS_ENTER_X, 0], timing: enter }} deps={[tab]}>
|
|
280
|
+
<Motion className="zc-tab-panel__inner" animate={{ x: [dir * TABS_ENTER_X, 0], timing: enter }} deps={[tab]}>
|
|
282
281
|
{children}
|
|
283
282
|
</Motion>
|
|
284
283
|
</Motion>
|