@zyncat/ui 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -13
- package/dist/alert.css +26 -33
- package/dist/alert.js +18 -17
- package/dist/alert.js.map +1 -1
- package/dist/avatar-group.js +2 -2
- package/dist/avatar-group.js.map +1 -1
- package/dist/avatar.css +51 -50
- package/dist/avatar.js +29 -7
- package/dist/avatar.js.map +1 -1
- package/dist/badge.css +30 -36
- package/dist/badge.js +1 -1
- package/dist/button.css +80 -96
- package/dist/button.js +1 -1
- package/dist/checkbox.css +27 -32
- package/dist/checkbox.js +2 -2
- package/dist/{chunk-RJFGWJ4W.js → chunk-3XRVPCIM.js} +6 -6
- package/dist/chunk-3XRVPCIM.js.map +1 -0
- package/dist/{chunk-M43IOM5C.js → chunk-5GBV45YD.js} +3 -3
- package/dist/{chunk-M43IOM5C.js.map → chunk-5GBV45YD.js.map} +1 -1
- package/dist/{chunk-45R4Z5XN.js → chunk-5VC3TUZ2.js} +4 -4
- package/dist/{chunk-45R4Z5XN.js.map → chunk-5VC3TUZ2.js.map} +1 -1
- package/dist/{chunk-A5WTZACK.js → chunk-5W5TKANX.js} +3 -3
- package/dist/{chunk-A5WTZACK.js.map → chunk-5W5TKANX.js.map} +1 -1
- package/dist/{chunk-AADAJL7D.js → chunk-5X3MJRIM.js} +8 -9
- package/dist/chunk-5X3MJRIM.js.map +1 -0
- package/dist/{chunk-TCUCYFT7.js → chunk-6SUHSSOK.js} +3 -3
- package/dist/{chunk-TCUCYFT7.js.map → chunk-6SUHSSOK.js.map} +1 -1
- package/dist/{chunk-DDRSMHN4.js → chunk-6X3G4GIM.js} +3 -3
- package/dist/{chunk-DDRSMHN4.js.map → chunk-6X3G4GIM.js.map} +1 -1
- package/dist/{chunk-TYHR4VNM.js → chunk-AREEMG47.js} +10 -8
- package/dist/chunk-AREEMG47.js.map +1 -0
- package/dist/{chunk-EF6RPXU7.js → chunk-BH4JFWXQ.js} +36 -31
- package/dist/chunk-BH4JFWXQ.js.map +1 -0
- package/dist/{chunk-TVYH4AN7.js → chunk-BTF6DAE3.js} +13 -13
- package/dist/chunk-BTF6DAE3.js.map +1 -0
- package/dist/{chunk-CF4QHO4N.js → chunk-CAXQJSIE.js} +10 -10
- package/dist/{chunk-CF4QHO4N.js.map → chunk-CAXQJSIE.js.map} +1 -1
- package/dist/{chunk-4C5RZXBT.js → chunk-CFRGQJ23.js} +8 -8
- package/dist/chunk-CFRGQJ23.js.map +1 -0
- package/dist/{chunk-IJS7TPGV.js → chunk-FEXUS4SV.js} +6 -5
- package/dist/chunk-FEXUS4SV.js.map +1 -0
- package/dist/{chunk-227ZW4V7.js → chunk-FLQVOSFC.js} +11 -11
- package/dist/chunk-FLQVOSFC.js.map +1 -0
- package/dist/{chunk-FONOS5RN.js → chunk-FVPNICF4.js} +11 -10
- package/dist/chunk-FVPNICF4.js.map +1 -0
- package/dist/{chunk-I45AU6KH.js → chunk-GGDAMIBH.js} +13 -7
- package/dist/chunk-GGDAMIBH.js.map +1 -0
- package/dist/{chunk-4BSHB7R3.js → chunk-GJTHWB6O.js} +9 -9
- package/dist/chunk-GJTHWB6O.js.map +1 -0
- package/dist/{chunk-EAI4POPB.js → chunk-GOLSYGRA.js} +45 -75
- package/dist/chunk-GOLSYGRA.js.map +1 -0
- package/dist/chunk-H3X2263Y.js +17 -0
- package/dist/chunk-H3X2263Y.js.map +1 -0
- package/dist/chunk-K45CWVHS.js +53 -0
- package/dist/chunk-K45CWVHS.js.map +1 -0
- package/dist/{chunk-JY6A2ZJZ.js → chunk-LNAV5E7S.js} +2 -2
- package/dist/{chunk-JY6A2ZJZ.js.map → chunk-LNAV5E7S.js.map} +1 -1
- package/dist/{chunk-TUTXXC3W.js → chunk-MDSRZ4QR.js} +3 -3
- package/dist/{chunk-TUTXXC3W.js.map → chunk-MDSRZ4QR.js.map} +1 -1
- package/dist/chunk-N2GJEO5Z.js +101 -0
- package/dist/chunk-N2GJEO5Z.js.map +1 -0
- package/dist/chunk-PU3QWBEL.js +39 -0
- package/dist/chunk-PU3QWBEL.js.map +1 -0
- package/dist/{chunk-43M6GQ4Q.js → chunk-PWQVSVXR.js} +51 -32
- package/dist/chunk-PWQVSVXR.js.map +1 -0
- package/dist/chunk-QGVFFT2B.js +14 -0
- package/dist/chunk-QGVFFT2B.js.map +1 -0
- package/dist/{chunk-5PZ43DCG.js → chunk-RBSHRRNO.js} +12 -13
- package/dist/chunk-RBSHRRNO.js.map +1 -0
- package/dist/{chunk-XNIYSAMJ.js → chunk-RW2A4M2Q.js} +14 -9
- package/dist/chunk-RW2A4M2Q.js.map +1 -0
- package/dist/{chunk-HY5MPISE.js → chunk-UYSXJ7MH.js} +9 -9
- package/dist/chunk-UYSXJ7MH.js.map +1 -0
- package/dist/chunk-VDOBLABP.js +38 -0
- package/dist/chunk-VDOBLABP.js.map +1 -0
- package/dist/chunk-VNVVG47J.js +12 -0
- package/dist/chunk-VNVVG47J.js.map +1 -0
- package/dist/{chunk-3MPF7FZV.js → chunk-WCWV5IX6.js} +3 -3
- package/dist/{chunk-3MPF7FZV.js.map → chunk-WCWV5IX6.js.map} +1 -1
- package/dist/{chunk-VAXCXZ53.js → chunk-WZUTBJC4.js} +5 -4
- package/dist/chunk-WZUTBJC4.js.map +1 -0
- package/dist/cli.js +137 -25
- package/dist/collapse.css +15 -30
- package/dist/collapse.js +1 -1
- package/dist/confetti.css +19 -12
- package/dist/confetti.js +7 -6
- package/dist/confetti.js.map +1 -1
- package/dist/count-badge.js +2 -2
- package/dist/date-field.js +20 -19
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +131 -154
- package/dist/date-range-field.js +55 -54
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +24 -23
- package/dist/datetime-field.js.map +1 -1
- package/dist/dialog.css +31 -41
- package/dist/dialog.js +23 -22
- package/dist/dialog.js.map +1 -1
- package/dist/digit-strip.css +16 -16
- package/dist/dropdown.css +36 -27
- package/dist/dropdown.js +77 -40
- package/dist/dropdown.js.map +1 -1
- package/dist/emoji-picker.js +44 -45
- package/dist/emoji-picker.js.map +1 -1
- package/dist/facebook-feed.css +145 -148
- package/dist/facebook-feed.js +106 -102
- package/dist/facebook-feed.js.map +1 -1
- package/dist/flow-field.css +8 -4
- package/dist/flow-field.js +7 -6
- package/dist/flow-field.js.map +1 -1
- package/dist/glide.js +4 -3
- package/dist/icon.css +7 -10
- package/dist/input.css +76 -84
- package/dist/instagram-feed.css +65 -66
- package/dist/instagram-feed.js +61 -44
- package/dist/instagram-feed.js.map +1 -1
- package/dist/lens.css +42 -38
- package/dist/lens.js +17 -16
- package/dist/lens.js.map +1 -1
- package/dist/mcp.js +3 -2
- package/dist/menu-surface.css +54 -34
- package/dist/modal.css +2 -4
- package/dist/modal.js +12 -11
- package/dist/modal.js.map +1 -1
- package/dist/morphing-text.css +26 -16
- package/dist/morphing-text.js +14 -13
- package/dist/morphing-text.js.map +1 -1
- package/dist/motion-devtools.css +42 -68
- package/dist/motion-devtools.js +47 -39
- package/dist/motion-devtools.js.map +1 -1
- package/dist/motion-tokens.js +1 -1
- package/dist/multi-select.js +21 -16
- package/dist/multi-select.js.map +1 -1
- package/dist/number-field.js +14 -14
- package/dist/number-field.js.map +1 -1
- package/dist/odometer.css +22 -16
- package/dist/odometer.js +12 -11
- package/dist/odometer.js.map +1 -1
- package/dist/otp-field.js +3 -3
- package/dist/otp-field.js.map +1 -1
- package/dist/overlay.css +4 -9
- package/dist/pagination.css +10 -15
- package/dist/pagination.js +11 -10
- package/dist/pagination.js.map +1 -1
- package/dist/popover.css +13 -15
- package/dist/popover.js +10 -9
- package/dist/radio-group.css +60 -73
- package/dist/radio-group.js +30 -29
- package/dist/radio-group.js.map +1 -1
- package/dist/select.css +66 -75
- package/dist/select.js +19 -14
- package/dist/select.js.map +1 -1
- package/dist/sheet.css +12 -14
- package/dist/sheet.js +11 -10
- package/dist/status-badge.js +9 -9
- package/dist/status-badge.js.map +1 -1
- package/dist/styles.css +34 -34
- package/dist/support-rail.css +116 -100
- package/dist/support-rail.js +41 -40
- package/dist/support-rail.js.map +1 -1
- package/dist/table.css +76 -84
- package/dist/table.js +42 -41
- package/dist/table.js.map +1 -1
- package/dist/tabs.css +82 -90
- package/dist/tabs.js +23 -20
- package/dist/tabs.js.map +1 -1
- package/dist/tag.css +48 -53
- package/dist/tag.js +13 -12
- package/dist/tag.js.map +1 -1
- package/dist/text-field.js +5 -5
- package/dist/textarea.css +46 -49
- package/dist/textarea.js +16 -16
- package/dist/textarea.js.map +1 -1
- package/dist/theme.js +31 -15
- package/dist/theme.js.map +1 -1
- package/dist/tiktok.css +113 -117
- package/dist/tiktok.js +53 -52
- package/dist/tiktok.js.map +1 -1
- package/dist/time-field.js +26 -20
- package/dist/time-field.js.map +1 -1
- package/dist/toast-store.js +2 -1
- package/dist/toast.css +49 -65
- package/dist/toast.js +32 -26
- package/dist/toast.js.map +1 -1
- package/dist/toggle-tag.js +22 -13
- package/dist/toggle-tag.js.map +1 -1
- package/dist/toggle.css +26 -31
- package/dist/toggle.js +7 -7
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.css +16 -23
- package/dist/tooltip.js +117 -95
- package/dist/tooltip.js.map +1 -1
- package/dist/trigger.css +3 -3
- package/dist/types/components/composites/alert/Alert.d.ts +1 -2
- package/dist/types/components/composites/date-picker/TimeField.d.ts +1 -2
- package/dist/types/components/composites/date-picker/field-shell.d.ts +1 -1
- package/dist/types/components/composites/date-picker/time-core.d.ts +1 -2
- package/dist/types/components/composites/dropdown/Dropdown.d.ts +9 -1
- package/dist/types/components/composites/dropdown/types.d.ts +14 -0
- package/dist/types/components/composites/emoji-picker/EmojiPickerPanel.d.ts +1 -1
- package/dist/types/components/composites/emoji-picker/data.d.ts +2 -5
- package/dist/types/components/composites/emoji-picker/react/useEmojiPicker.d.ts +0 -11
- package/dist/types/components/composites/emoji-picker/types.d.ts +3 -8
- package/dist/types/components/composites/select/MultiSelect.d.ts +6 -1
- package/dist/types/components/composites/select/Select.d.ts +6 -1
- package/dist/types/components/composites/select/core/index.d.ts +1 -1
- package/dist/types/components/composites/select/core/menu.d.ts +3 -3
- package/dist/types/components/composites/select/core/panel.d.ts +3 -3
- package/dist/types/components/composites/tabs/Tabs.d.ts +7 -10
- package/dist/types/components/composites/toast/Toast.d.ts +1 -1
- package/dist/types/components/composites/tooltip/Tooltip.d.ts +9 -1
- package/dist/types/components/composites/tooltip/tooltip-store.d.ts +5 -6
- package/dist/types/components/dev/MotionDevtools.d.ts +3 -1
- package/dist/types/components/internal/hooks/use-host-election.d.ts +8 -0
- package/dist/types/components/internal/icon/Icon.d.ts +1 -3
- package/dist/types/components/internal/menu/highlight.d.ts +7 -0
- package/dist/types/components/internal/utils/activation.d.ts +0 -4
- package/dist/types/components/primitives/avatar/Avatar.d.ts +1 -1
- package/dist/types/components/primitives/button/Button.d.ts +1 -1
- package/dist/types/components/primitives/input/TextField.d.ts +1 -2
- package/dist/types/components/primitives/textarea/Textarea.d.ts +0 -1
- package/dist/types/shared-slot.d.ts +1 -0
- package/dist/types/tokens/component-styles.generated.d.ts +79 -151
- package/dist/types/tokens/motion-defaults.generated.d.ts +34 -0
- package/dist/types/tokens/motion-scale.d.ts +2 -2
- package/dist/types/tokens/motion-tokens.d.ts +7 -0
- package/dist/types/tokens/theme-sync.d.ts +3 -0
- package/dist/types/tokens/theme-tokens.generated.d.ts +669 -1105
- package/dist/typing-lines.css +17 -10
- package/dist/typing-lines.js +9 -8
- package/dist/typing-lines.js.map +1 -1
- package/dist/weight-field.css +31 -17
- package/dist/weight-field.js +4 -4
- package/dist/weight-field.js.map +1 -1
- package/dist/youtube.css +90 -96
- package/dist/youtube.js +87 -86
- package/dist/youtube.js.map +1 -1
- package/package.json +3 -1
- package/skills/zyncat-ui/SKILL.md +5 -3
- package/skills/zyncat-ui/references/components.md +4 -4
- package/skills/zyncat-ui/references/theming.md +105 -34
- package/src/components/composites/alert/Alert.tsx +9 -10
- package/src/components/composites/alert/alert.css +26 -33
- package/src/components/composites/date-picker/DateField.tsx +1 -1
- package/src/components/composites/date-picker/DateRangeField.tsx +1 -1
- package/src/components/composites/date-picker/DateTimeField.tsx +4 -4
- package/src/components/composites/date-picker/TimeField.tsx +8 -5
- package/src/components/composites/date-picker/calendar-panel.tsx +25 -20
- package/src/components/composites/date-picker/date-picker.css +131 -154
- package/src/components/composites/date-picker/field-shell.tsx +7 -7
- package/src/components/composites/date-picker/range-panel.tsx +34 -34
- package/src/components/composites/date-picker/time-core.tsx +4 -6
- package/src/components/composites/date-picker/use-day-focus.ts +1 -1
- package/src/components/composites/dialog/Dialog.tsx +11 -11
- package/src/components/composites/dialog/dialog.css +31 -41
- package/src/components/composites/dropdown/Dropdown.tsx +15 -2
- package/src/components/composites/dropdown/Dropdown.usage.md +7 -4
- package/src/components/composites/dropdown/dropdown.css +36 -27
- package/src/components/composites/dropdown/menu-panel.tsx +56 -27
- package/src/components/composites/dropdown/types.ts +28 -6
- package/src/components/composites/emoji-picker/EmojiPickerPanel.tsx +5 -4
- package/src/components/composites/emoji-picker/EmojiPickerPanel.usage.md +4 -4
- package/src/components/composites/emoji-picker/data.ts +2 -5
- package/src/components/composites/emoji-picker/dom.ts +6 -6
- package/src/components/composites/emoji-picker/react/category-bar.tsx +6 -6
- package/src/components/composites/emoji-picker/react/useEmojiPicker.ts +0 -11
- package/src/components/composites/emoji-picker/scaffold.ts +7 -7
- package/src/components/composites/emoji-picker/search.ts +0 -7
- package/src/components/composites/emoji-picker/styles.css +34 -34
- package/src/components/composites/emoji-picker/types.ts +3 -8
- package/src/components/composites/modal/Modal.tsx +2 -2
- package/src/components/composites/modal/modal.css +2 -4
- package/src/components/composites/pagination/Pagination.tsx +7 -7
- package/src/components/composites/pagination/pagination.css +10 -15
- package/src/components/composites/popover/Popover.tsx +2 -2
- package/src/components/composites/popover/popover.css +13 -15
- package/src/components/composites/select/MultiSelect.tsx +11 -2
- package/src/components/composites/select/MultiSelect.usage.md +2 -1
- package/src/components/composites/select/Select.tsx +10 -1
- package/src/components/composites/select/Select.usage.md +2 -1
- package/src/components/composites/select/core/index.ts +1 -1
- package/src/components/composites/select/core/menu.tsx +19 -4
- package/src/components/composites/select/core/panel.tsx +19 -15
- package/src/components/composites/select/core/trigger.tsx +5 -5
- package/src/components/composites/select/select.css +66 -75
- package/src/components/composites/sheet/Sheet.tsx +2 -2
- package/src/components/composites/sheet/sheet.css +12 -14
- package/src/components/composites/sheet/use-sheet-drag.ts +1 -1
- package/src/components/composites/table/Table.tsx +35 -35
- package/src/components/composites/table/table.css +76 -84
- package/src/components/composites/tabs/Tabs.tsx +20 -21
- package/src/components/composites/tabs/Tabs.usage.md +3 -2
- package/src/components/composites/tabs/tabs.css +82 -90
- package/src/components/composites/toast/Toast.tsx +23 -18
- package/src/components/composites/toast/toast-store.ts +8 -6
- package/src/components/composites/toast/toast.css +49 -65
- package/src/components/composites/tooltip/Tooltip.tsx +40 -19
- package/src/components/composites/tooltip/Tooltip.usage.md +9 -1
- package/src/components/composites/tooltip/tooltip-host.tsx +55 -23
- package/src/components/composites/tooltip/tooltip-store.ts +36 -53
- package/src/components/composites/tooltip/tooltip.css +16 -23
- package/src/components/compound/support-rail/SupportRail.tsx +33 -33
- package/src/components/compound/support-rail/support-rail.css +116 -100
- package/src/components/dev/MotionDevtools.tsx +28 -17
- package/src/components/dev/MotionDevtools.usage.md +2 -2
- package/src/components/dev/motion-devtools.css +42 -68
- package/src/components/dev/slowmo-engine.ts +16 -15
- package/src/components/expressive/confetti/Confetti.tsx +4 -4
- package/src/components/expressive/confetti/confetti.css +19 -12
- package/src/components/expressive/facebook-feed/chrome.tsx +2 -2
- package/src/components/expressive/facebook-feed/facebook-feed.css +145 -148
- package/src/components/expressive/facebook-feed/post.tsx +39 -39
- package/src/components/expressive/facebook-feed/reel.tsx +41 -37
- package/src/components/expressive/facebook-feed/story.tsx +27 -27
- package/src/components/expressive/flow-field/FlowField.tsx +4 -4
- package/src/components/expressive/flow-field/flow-field.css +8 -4
- package/src/components/expressive/instagram-feed/InstagramFeed.tsx +52 -44
- package/src/components/expressive/instagram-feed/instagram-feed.css +65 -66
- package/src/components/expressive/lens/Lens.tsx +14 -14
- package/src/components/expressive/lens/lens.css +42 -38
- package/src/components/expressive/morphing-text/MorphingText.tsx +12 -13
- package/src/components/expressive/morphing-text/morphing-text.css +26 -16
- package/src/components/expressive/odometer/Odometer.tsx +9 -9
- package/src/components/expressive/odometer/odometer.css +22 -16
- package/src/components/expressive/tiktok/TikTok.tsx +54 -54
- package/src/components/expressive/tiktok/tiktok.css +113 -117
- package/src/components/expressive/typing-lines/TypingLines.tsx +0 -0
- package/src/components/expressive/typing-lines/typing-lines.css +17 -10
- package/src/components/expressive/weight-field/WeightField.tsx +4 -4
- package/src/components/expressive/weight-field/weight-field.css +31 -17
- package/src/components/expressive/youtube/YouTube.tsx +4 -4
- package/src/components/expressive/youtube/glyphs.tsx +16 -16
- package/src/components/expressive/youtube/media.tsx +3 -3
- package/src/components/expressive/youtube/post.tsx +28 -28
- package/src/components/expressive/youtube/short.tsx +25 -25
- package/src/components/expressive/youtube/video.tsx +13 -13
- package/src/components/expressive/youtube/youtube.css +90 -96
- package/src/components/internal/glass/glass.css +19 -22
- package/src/components/internal/glass/glint.ts +3 -3
- package/src/components/internal/hooks/use-host-election.ts +46 -0
- package/src/components/internal/icon/Icon.tsx +1 -5
- package/src/components/internal/icon/IconSlot.tsx +1 -1
- package/src/components/internal/icon/icon.css +7 -10
- package/src/components/internal/menu/highlight.ts +12 -0
- package/src/components/internal/menu/menu-row.tsx +5 -5
- package/src/components/internal/menu/menu-surface.css +54 -34
- package/src/components/internal/overlay/layer.tsx +2 -1
- package/src/components/internal/overlay/modal.tsx +5 -4
- package/src/components/internal/overlay/overlay.css +4 -9
- package/src/components/internal/overlay/trigger.css +3 -3
- package/src/components/internal/utils/activation.ts +0 -4
- package/src/components/primitives/avatar/Avatar.tsx +24 -8
- package/src/components/primitives/avatar/AvatarGroup.tsx +4 -4
- package/src/components/primitives/avatar/avatar.css +51 -50
- package/src/components/primitives/badge/Badge.tsx +9 -9
- package/src/components/primitives/badge/StatusBadge.tsx +7 -7
- package/src/components/primitives/badge/badge.css +30 -36
- package/src/components/primitives/badge/digit-strip.css +16 -16
- package/src/components/primitives/badge/digit-strip.tsx +4 -4
- package/src/components/primitives/button/Button.tsx +8 -8
- package/src/components/primitives/button/button.css +80 -96
- package/src/components/primitives/checkbox/Checkbox.tsx +10 -4
- package/src/components/primitives/checkbox/check-glyph.tsx +5 -5
- package/src/components/primitives/checkbox/checkbox.css +27 -32
- package/src/components/primitives/collapse/Collapse.tsx +2 -2
- package/src/components/primitives/collapse/collapse.css +15 -30
- package/src/components/primitives/collapse/collapse.typecheck.tsx +1 -1
- package/src/components/primitives/input/NumberField.tsx +11 -11
- package/src/components/primitives/input/OtpField.tsx +3 -3
- package/src/components/primitives/input/TextField.tsx +9 -10
- package/src/components/primitives/input/field-chrome.tsx +6 -6
- package/src/components/primitives/input/input.css +76 -84
- package/src/components/primitives/radio-group/RadioGroup.tsx +23 -23
- package/src/components/primitives/radio-group/radio-group.css +60 -73
- package/src/components/primitives/tag/Tag.tsx +5 -5
- package/src/components/primitives/tag/ToggleTag.tsx +11 -6
- package/src/components/primitives/tag/tag.css +48 -53
- package/src/components/primitives/textarea/Textarea.tsx +13 -14
- package/src/components/primitives/textarea/textarea.css +46 -49
- package/src/components/primitives/toggle/Toggle.tsx +7 -7
- package/src/components/primitives/toggle/toggle.css +26 -31
- package/src/engine/animate.ts +2 -1
- package/src/engine/flip.ts +2 -1
- package/src/mcp/server.ts +3 -1
- package/src/motion/flip.ts +7 -8
- package/src/motion/glide.tsx +41 -26
- package/src/shared-slot.ts +10 -0
- package/src/styles.css +7 -15
- package/src/tokens/base.css +15 -0
- package/src/tokens/color.css +19 -59
- package/src/tokens/component-styles.generated.ts +79 -151
- package/src/tokens/dark.css +63 -0
- package/src/tokens/decisions.css +26 -0
- package/src/tokens/elevation.css +71 -21
- package/src/tokens/fonts.css +0 -2
- package/src/tokens/glass.css +15 -9
- package/src/tokens/motion-defaults.generated.ts +21 -0
- package/src/tokens/motion-scale.ts +2 -2
- package/src/tokens/motion-tokens.ts +65 -40
- package/src/tokens/motion-tokens.usage.md +5 -2
- package/src/tokens/motion.css +12 -22
- package/src/tokens/radius.css +10 -9
- package/src/tokens/semantic.css +57 -37
- package/src/tokens/spacing.css +5 -6
- package/src/tokens/theme-sync.tsx +15 -0
- package/src/tokens/theme-tokens.generated.ts +682 -1109
- package/src/tokens/theme.tsx +22 -16
- package/src/tokens/theme.usage.md +19 -13
- package/src/tokens/typography.css +16 -19
- package/tailwind.css +193 -0
- package/dist/chunk-227ZW4V7.js.map +0 -1
- package/dist/chunk-43M6GQ4Q.js.map +0 -1
- package/dist/chunk-4BSHB7R3.js.map +0 -1
- package/dist/chunk-4C5RZXBT.js.map +0 -1
- package/dist/chunk-5PZ43DCG.js.map +0 -1
- package/dist/chunk-7IZJERGA.js +0 -80
- package/dist/chunk-7IZJERGA.js.map +0 -1
- package/dist/chunk-AADAJL7D.js.map +0 -1
- package/dist/chunk-CNWTIMIP.js +0 -39
- package/dist/chunk-CNWTIMIP.js.map +0 -1
- package/dist/chunk-EAI4POPB.js.map +0 -1
- package/dist/chunk-EF6RPXU7.js.map +0 -1
- package/dist/chunk-FONOS5RN.js.map +0 -1
- package/dist/chunk-FQEHSKEI.js +0 -38
- package/dist/chunk-FQEHSKEI.js.map +0 -1
- package/dist/chunk-HY5MPISE.js.map +0 -1
- package/dist/chunk-I45AU6KH.js.map +0 -1
- package/dist/chunk-IJS7TPGV.js.map +0 -1
- package/dist/chunk-OWNMRMPN.js +0 -14
- package/dist/chunk-OWNMRMPN.js.map +0 -1
- package/dist/chunk-RJFGWJ4W.js.map +0 -1
- package/dist/chunk-TVYH4AN7.js.map +0 -1
- package/dist/chunk-TYHR4VNM.js.map +0 -1
- package/dist/chunk-VAXCXZ53.js.map +0 -1
- package/dist/chunk-XNIYSAMJ.js.map +0 -1
- package/dist/chunk-Y2YA7QRF.js +0 -17
- package/dist/chunk-Y2YA7QRF.js.map +0 -1
- package/src/tokens/avatar.css +0 -24
- package/src/tokens/icons.css +0 -11
- package/src/tokens/layers.css +0 -11
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
@layer zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.components {
|
|
4
|
-
.typing-lines {
|
|
4
|
+
.zc-typing-lines {
|
|
5
|
+
/* Letter ink. */
|
|
5
6
|
--typing-lines-ink: var(--text-strong);
|
|
7
|
+
/* The caret. */
|
|
6
8
|
--typing-lines-caret-ink: var(--accent);
|
|
9
|
+
/* Letter size. */
|
|
7
10
|
--typing-lines-size: var(--size-title);
|
|
11
|
+
/* Letter weight. */
|
|
8
12
|
--typing-lines-weight: var(--weight-regular);
|
|
13
|
+
/* Line height, unitless. */
|
|
9
14
|
--typing-lines-leading: 1.4;
|
|
15
|
+
/* The caret's blink period. */
|
|
10
16
|
--typing-lines-blink: 1080ms;
|
|
17
|
+
/* Space between the last glyph and the caret. */
|
|
11
18
|
--typing-lines-caret-gap: 0.12em;
|
|
12
19
|
|
|
13
20
|
position: relative;
|
|
14
21
|
display: block;
|
|
15
22
|
min-height: calc(var(--typing-lines-size) * var(--typing-lines-leading));
|
|
16
|
-
font-family: var(--font-
|
|
23
|
+
font-family: var(--font-body);
|
|
17
24
|
font-size: var(--typing-lines-size);
|
|
18
25
|
font-weight: var(--typing-lines-weight);
|
|
19
26
|
line-height: var(--typing-lines-leading);
|
|
@@ -21,7 +28,7 @@
|
|
|
21
28
|
text-wrap: pretty;
|
|
22
29
|
}
|
|
23
30
|
|
|
24
|
-
.typing-lines__label {
|
|
31
|
+
.zc-typing-lines__label {
|
|
25
32
|
position: absolute;
|
|
26
33
|
width: 1px;
|
|
27
34
|
height: 1px;
|
|
@@ -30,36 +37,36 @@
|
|
|
30
37
|
white-space: nowrap;
|
|
31
38
|
}
|
|
32
39
|
|
|
33
|
-
.typing-lines__caret {
|
|
40
|
+
.zc-typing-lines__caret {
|
|
34
41
|
display: inline-block;
|
|
35
42
|
margin-left: var(--typing-lines-caret-gap);
|
|
36
43
|
background: var(--typing-lines-caret-ink);
|
|
37
44
|
vertical-align: -0.16em;
|
|
38
45
|
}
|
|
39
46
|
|
|
40
|
-
.typing-lines__caret--line {
|
|
47
|
+
.zc-typing-lines__caret--line {
|
|
41
48
|
width: 2px;
|
|
42
49
|
height: 1.1em;
|
|
43
50
|
}
|
|
44
51
|
|
|
45
|
-
.typing-lines__caret--block {
|
|
52
|
+
.zc-typing-lines__caret--block {
|
|
46
53
|
width: 0.52em;
|
|
47
54
|
height: 1.05em;
|
|
48
55
|
border-radius: 1px;
|
|
49
56
|
vertical-align: -0.14em;
|
|
50
57
|
}
|
|
51
58
|
|
|
52
|
-
.typing-lines__caret--underscore {
|
|
59
|
+
.zc-typing-lines__caret--underscore {
|
|
53
60
|
width: 0.55em;
|
|
54
61
|
height: 2px;
|
|
55
62
|
vertical-align: -0.08em;
|
|
56
63
|
}
|
|
57
64
|
|
|
58
|
-
.typing-lines__caret--blinking {
|
|
65
|
+
.zc-typing-lines__caret--blinking {
|
|
59
66
|
animation: typing-lines-blink var(--typing-lines-blink) step-end infinite;
|
|
60
67
|
}
|
|
61
68
|
|
|
62
|
-
.typing-lines__word {
|
|
69
|
+
.zc-typing-lines__word {
|
|
63
70
|
display: inline-block;
|
|
64
71
|
animation: typing-lines-word var(--duration-base) var(--ease-entrance) both;
|
|
65
72
|
}
|
|
@@ -85,7 +92,7 @@
|
|
|
85
92
|
}
|
|
86
93
|
|
|
87
94
|
@media (prefers-reduced-motion: reduce) {
|
|
88
|
-
.typing-lines__caret--blinking {
|
|
95
|
+
.zc-typing-lines__caret--blinking {
|
|
89
96
|
animation: none;
|
|
90
97
|
}
|
|
91
98
|
}
|
|
@@ -26,16 +26,16 @@ export interface WeightFieldProps extends WeightFieldOwnProps {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export function WeightField({ text, speed = 1, className = '', style, htmlProps }: WeightFieldProps) {
|
|
29
|
-
const ramp = { ...style, '--
|
|
29
|
+
const ramp = { ...style, '--_weight-field-speed': speed } as CSSProperties;
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<span className={cx('weight-field', className)} style={ramp} {...htmlProps}>
|
|
32
|
+
<span className={cx('zc-weight-field', className)} style={ramp} {...htmlProps}>
|
|
33
33
|
{[...text].map((glyph, index) => (
|
|
34
|
-
<span key={index} className="weight-field__unit" aria-hidden="true">
|
|
34
|
+
<span key={index} className="zc-weight-field__unit" aria-hidden="true">
|
|
35
35
|
{glyph === SPACE ? NO_BREAK_SPACE : glyph}
|
|
36
36
|
</span>
|
|
37
37
|
))}
|
|
38
|
-
<span className="weight-field__label">{text}</span>
|
|
38
|
+
<span className="zc-weight-field__label">{text}</span>
|
|
39
39
|
</span>
|
|
40
40
|
);
|
|
41
41
|
}
|
|
@@ -1,31 +1,45 @@
|
|
|
1
1
|
@layer zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.components {
|
|
4
|
-
.weight-field {
|
|
4
|
+
.zc-weight-field {
|
|
5
|
+
/* Letter ink. */
|
|
5
6
|
--weight-field-ink: var(--text-strong);
|
|
7
|
+
/* Letter size. */
|
|
6
8
|
--weight-field-size: 6rem;
|
|
9
|
+
/* Line height, unitless. */
|
|
7
10
|
--weight-field-leading: 1;
|
|
11
|
+
/* Where the units sit on the line - center, start or end. */
|
|
8
12
|
--weight-field-align: center;
|
|
13
|
+
/* Padding around the field. */
|
|
9
14
|
--weight-field-pad: var(--space-6) var(--space-4);
|
|
15
|
+
/* Letter spacing. */
|
|
10
16
|
--weight-field-tracking: -0.05em;
|
|
17
|
+
/* A unit's weight at rest. */
|
|
11
18
|
--weight-field-rest-weight: 300;
|
|
19
|
+
/* The weight two units from the pointer. */
|
|
12
20
|
--weight-field-far-weight: 400;
|
|
21
|
+
/* The weight next to the pointer. */
|
|
13
22
|
--weight-field-near-weight: 600;
|
|
23
|
+
/* The weight under the pointer. */
|
|
14
24
|
--weight-field-peak-weight: 900;
|
|
25
|
+
/* How much a unit widens under the pointer. */
|
|
15
26
|
--weight-field-hover-padding: calc(1em / 12);
|
|
27
|
+
/* The text stroke every unit carries; the peak letter doubles it. */
|
|
16
28
|
--weight-field-stroke: calc(1em * 125 / 6000);
|
|
17
|
-
--
|
|
29
|
+
--_weight-field-stroke-peak: calc(var(--weight-field-stroke) * 2);
|
|
30
|
+
/* How long a unit takes to settle at a new weight. */
|
|
18
31
|
--weight-field-duration: 400ms;
|
|
32
|
+
/* The settle curve. */
|
|
19
33
|
--weight-field-ease: ease;
|
|
20
|
-
--
|
|
21
|
-
--
|
|
34
|
+
--_weight-field-speed: 1;
|
|
35
|
+
--_weight-field-ramp: calc(var(--weight-field-duration) / var(--_weight-field-speed));
|
|
22
36
|
|
|
23
37
|
position: relative;
|
|
24
38
|
display: flex;
|
|
25
39
|
flex-wrap: wrap;
|
|
26
40
|
justify-content: var(--weight-field-align);
|
|
27
41
|
padding: var(--weight-field-pad);
|
|
28
|
-
font-family: var(--font-
|
|
42
|
+
font-family: var(--font-body);
|
|
29
43
|
font-size: var(--weight-field-size);
|
|
30
44
|
font-weight: var(--weight-field-rest-weight);
|
|
31
45
|
font-optical-sizing: auto;
|
|
@@ -34,7 +48,7 @@
|
|
|
34
48
|
color: var(--weight-field-ink);
|
|
35
49
|
}
|
|
36
50
|
|
|
37
|
-
.weight-field__label {
|
|
51
|
+
.zc-weight-field__label {
|
|
38
52
|
position: absolute;
|
|
39
53
|
width: 1px;
|
|
40
54
|
height: 1px;
|
|
@@ -43,7 +57,7 @@
|
|
|
43
57
|
white-space: nowrap;
|
|
44
58
|
}
|
|
45
59
|
|
|
46
|
-
.weight-field__unit {
|
|
60
|
+
.zc-weight-field__unit {
|
|
47
61
|
padding-inline: 0;
|
|
48
62
|
font-weight: var(--weight-field-rest-weight);
|
|
49
63
|
-webkit-text-stroke-color: transparent;
|
|
@@ -53,31 +67,31 @@
|
|
|
53
67
|
-webkit-text-stroke-width,
|
|
54
68
|
padding;
|
|
55
69
|
transition:
|
|
56
|
-
font-weight var(--
|
|
57
|
-
padding var(--
|
|
58
|
-
-webkit-text-stroke-color var(--
|
|
70
|
+
font-weight var(--_weight-field-ramp) var(--weight-field-ease),
|
|
71
|
+
padding var(--_weight-field-ramp) var(--weight-field-ease),
|
|
72
|
+
-webkit-text-stroke-color var(--_weight-field-ramp) var(--weight-field-ease);
|
|
59
73
|
}
|
|
60
74
|
|
|
61
|
-
.weight-field__unit:has(+ .weight-field__unit + .weight-field__unit:hover),
|
|
62
|
-
.weight-field__unit:hover + .weight-field__unit + .weight-field__unit {
|
|
75
|
+
.zc-weight-field__unit:has(+ .zc-weight-field__unit + .zc-weight-field__unit:hover),
|
|
76
|
+
.zc-weight-field__unit:hover + .zc-weight-field__unit + .zc-weight-field__unit {
|
|
63
77
|
font-weight: var(--weight-field-far-weight);
|
|
64
78
|
}
|
|
65
79
|
|
|
66
|
-
.weight-field__unit:has(+ .weight-field__unit:hover),
|
|
67
|
-
.weight-field__unit:hover + .weight-field__unit {
|
|
80
|
+
.zc-weight-field__unit:has(+ .zc-weight-field__unit:hover),
|
|
81
|
+
.zc-weight-field__unit:hover + .zc-weight-field__unit {
|
|
68
82
|
padding-inline: var(--weight-field-hover-padding);
|
|
69
83
|
font-weight: var(--weight-field-near-weight);
|
|
70
84
|
}
|
|
71
85
|
|
|
72
|
-
.weight-field__unit:hover {
|
|
86
|
+
.zc-weight-field__unit:hover {
|
|
73
87
|
padding-inline: var(--weight-field-hover-padding);
|
|
74
88
|
font-weight: var(--weight-field-peak-weight);
|
|
75
89
|
-webkit-text-stroke-color: currentcolor;
|
|
76
|
-
-webkit-text-stroke-width: var(--
|
|
90
|
+
-webkit-text-stroke-width: var(--_weight-field-stroke-peak);
|
|
77
91
|
}
|
|
78
92
|
|
|
79
93
|
@media (prefers-reduced-motion: reduce) {
|
|
80
|
-
.weight-field {
|
|
94
|
+
.zc-weight-field {
|
|
81
95
|
--weight-field-duration: 1ms;
|
|
82
96
|
}
|
|
83
97
|
}
|
|
@@ -17,9 +17,9 @@ export type { YouTubeAction, YouTubeMedia } from './media';
|
|
|
17
17
|
export type YouTubeSurface = 'video' | 'short' | 'post';
|
|
18
18
|
|
|
19
19
|
const SURFACE_CLASS: Record<YouTubeSurface, string> = {
|
|
20
|
-
video: 'youtube--video',
|
|
21
|
-
short: 'youtube--short',
|
|
22
|
-
post: 'youtube--post',
|
|
20
|
+
video: 'zc-youtube--video',
|
|
21
|
+
short: 'zc-youtube--short',
|
|
22
|
+
post: 'zc-youtube--post',
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const EMPTY_TEXT = '';
|
|
@@ -136,7 +136,7 @@ export function YouTube({
|
|
|
136
136
|
const slides = carousel && carousel.length ? carousel : [media];
|
|
137
137
|
|
|
138
138
|
return (
|
|
139
|
-
<article className={cx('youtube', SURFACE_CLASS[surface], className)} style={style} {...htmlProps}>
|
|
139
|
+
<article className={cx('zc-youtube', SURFACE_CLASS[surface], className)} style={style} {...htmlProps}>
|
|
140
140
|
{surface === 'video' && (
|
|
141
141
|
<VideoSurface
|
|
142
142
|
title={title}
|
|
@@ -2,7 +2,7 @@ import type { ReactElement } from 'react';
|
|
|
2
2
|
|
|
3
3
|
export function KebabGlyph(): ReactElement {
|
|
4
4
|
return (
|
|
5
|
-
<svg className="youtube__glyph" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
|
|
5
|
+
<svg className="zc-youtube__glyph" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
|
|
6
6
|
<circle cx="12" cy="6" r="2" />
|
|
7
7
|
<circle cx="12" cy="12" r="2" />
|
|
8
8
|
<circle cx="12" cy="18" r="2" />
|
|
@@ -12,16 +12,16 @@ export function KebabGlyph(): ReactElement {
|
|
|
12
12
|
|
|
13
13
|
export function VerifiedGlyph(): ReactElement {
|
|
14
14
|
return (
|
|
15
|
-
<svg className="youtube__glyph" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
|
15
|
+
<svg className="zc-youtube__glyph" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
|
16
16
|
<circle cx="12" cy="12" r="12" fill="currentColor" />
|
|
17
|
-
<path className="youtube__glyph-knockout" d="M10.3 16.7 5.9 12.3l1.6-1.6 2.8 2.8 6.2-6.2 1.6 1.6z" />
|
|
17
|
+
<path className="zc-youtube__glyph-knockout" d="M10.3 16.7 5.9 12.3l1.6-1.6 2.8 2.8 6.2-6.2 1.6 1.6z" />
|
|
18
18
|
</svg>
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export function PlayGlyph(): ReactElement {
|
|
23
23
|
return (
|
|
24
|
-
<svg className="youtube__glyph" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
|
|
24
|
+
<svg className="zc-youtube__glyph" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
|
|
25
25
|
<path d="M7.4 4.5 19.6 12 7.4 19.5z" />
|
|
26
26
|
</svg>
|
|
27
27
|
);
|
|
@@ -29,7 +29,7 @@ export function PlayGlyph(): ReactElement {
|
|
|
29
29
|
|
|
30
30
|
export function PauseGlyph(): ReactElement {
|
|
31
31
|
return (
|
|
32
|
-
<svg className="youtube__glyph" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
|
|
32
|
+
<svg className="zc-youtube__glyph" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
|
|
33
33
|
<rect x="6.4" y="4.4" width="4" height="15.2" rx="0.5" />
|
|
34
34
|
<rect x="13.6" y="4.4" width="4" height="15.2" rx="0.5" />
|
|
35
35
|
</svg>
|
|
@@ -38,7 +38,7 @@ export function PauseGlyph(): ReactElement {
|
|
|
38
38
|
|
|
39
39
|
export function SpeakerGlyph(): ReactElement {
|
|
40
40
|
return (
|
|
41
|
-
<svg className="youtube__glyph" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
|
41
|
+
<svg className="zc-youtube__glyph" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
|
42
42
|
<path d="M3.4 9h3.4l4.8-4.2v14.4L6.8 15H3.4z" fill="currentColor" />
|
|
43
43
|
<path
|
|
44
44
|
d="M14.6 9.3a3.6 3.6 0 0 1 0 5.4M17.2 6.9a7.1 7.1 0 0 1 0 10.2"
|
|
@@ -54,7 +54,7 @@ export function SpeakerGlyph(): ReactElement {
|
|
|
54
54
|
export function ExpandGlyph(): ReactElement {
|
|
55
55
|
return (
|
|
56
56
|
<svg
|
|
57
|
-
className="youtube__glyph"
|
|
57
|
+
className="zc-youtube__glyph"
|
|
58
58
|
viewBox="0 0 24 24"
|
|
59
59
|
fill="none"
|
|
60
60
|
stroke="currentColor"
|
|
@@ -73,7 +73,7 @@ export function ExpandGlyph(): ReactElement {
|
|
|
73
73
|
export function HeartGlyph(): ReactElement {
|
|
74
74
|
return (
|
|
75
75
|
<svg
|
|
76
|
-
className="youtube__glyph"
|
|
76
|
+
className="zc-youtube__glyph"
|
|
77
77
|
viewBox="0 0 22 22"
|
|
78
78
|
fill="none"
|
|
79
79
|
stroke="currentColor"
|
|
@@ -90,7 +90,7 @@ export function HeartGlyph(): ReactElement {
|
|
|
90
90
|
export function BubbleGlyph(): ReactElement {
|
|
91
91
|
return (
|
|
92
92
|
<svg
|
|
93
|
-
className="youtube__glyph"
|
|
93
|
+
className="zc-youtube__glyph"
|
|
94
94
|
viewBox="0 0 22 21"
|
|
95
95
|
fill="none"
|
|
96
96
|
stroke="currentColor"
|
|
@@ -109,7 +109,7 @@ export function BubbleGlyph(): ReactElement {
|
|
|
109
109
|
export function ShareGlyph(): ReactElement {
|
|
110
110
|
return (
|
|
111
111
|
<svg
|
|
112
|
-
className="youtube__glyph"
|
|
112
|
+
className="zc-youtube__glyph"
|
|
113
113
|
viewBox="0 0 22 20"
|
|
114
114
|
fill="none"
|
|
115
115
|
stroke="currentColor"
|
|
@@ -126,7 +126,7 @@ export function ShareGlyph(): ReactElement {
|
|
|
126
126
|
export function RemixGlyph(): ReactElement {
|
|
127
127
|
return (
|
|
128
128
|
<svg
|
|
129
|
-
className="youtube__glyph"
|
|
129
|
+
className="zc-youtube__glyph"
|
|
130
130
|
viewBox="0 0 22 22"
|
|
131
131
|
fill="none"
|
|
132
132
|
stroke="currentColor"
|
|
@@ -147,7 +147,7 @@ export function RemixGlyph(): ReactElement {
|
|
|
147
147
|
export function ThumbUpGlyph(): ReactElement {
|
|
148
148
|
return (
|
|
149
149
|
<svg
|
|
150
|
-
className="youtube__glyph"
|
|
150
|
+
className="zc-youtube__glyph"
|
|
151
151
|
viewBox="0 0 21 21"
|
|
152
152
|
fill="none"
|
|
153
153
|
stroke="currentColor"
|
|
@@ -165,7 +165,7 @@ export function ThumbUpGlyph(): ReactElement {
|
|
|
165
165
|
export function ThumbDownGlyph(): ReactElement {
|
|
166
166
|
return (
|
|
167
167
|
<svg
|
|
168
|
-
className="youtube__glyph"
|
|
168
|
+
className="zc-youtube__glyph"
|
|
169
169
|
viewBox="0 0 21 21"
|
|
170
170
|
fill="none"
|
|
171
171
|
stroke="currentColor"
|
|
@@ -183,7 +183,7 @@ export function ThumbDownGlyph(): ReactElement {
|
|
|
183
183
|
export function ChevronLeftGlyph(): ReactElement {
|
|
184
184
|
return (
|
|
185
185
|
<svg
|
|
186
|
-
className="youtube__glyph"
|
|
186
|
+
className="zc-youtube__glyph"
|
|
187
187
|
viewBox="0 0 24 24"
|
|
188
188
|
fill="none"
|
|
189
189
|
stroke="currentColor"
|
|
@@ -201,7 +201,7 @@ export function ChevronLeftGlyph(): ReactElement {
|
|
|
201
201
|
export function ChevronRightGlyph(): ReactElement {
|
|
202
202
|
return (
|
|
203
203
|
<svg
|
|
204
|
-
className="youtube__glyph"
|
|
204
|
+
className="zc-youtube__glyph"
|
|
205
205
|
viewBox="0 0 24 24"
|
|
206
206
|
fill="none"
|
|
207
207
|
stroke="currentColor"
|
|
@@ -219,7 +219,7 @@ export function ChevronRightGlyph(): ReactElement {
|
|
|
219
219
|
export function StackGlyph(): ReactElement {
|
|
220
220
|
return (
|
|
221
221
|
<svg
|
|
222
|
-
className="youtube__glyph"
|
|
222
|
+
className="zc-youtube__glyph"
|
|
223
223
|
viewBox="0 0 24 24"
|
|
224
224
|
fill="none"
|
|
225
225
|
stroke="currentColor"
|
|
@@ -12,7 +12,7 @@ function isEmpty(source: YouTubeMedia): boolean {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export function Media({ source, className }: { source?: YouTubeMedia; className?: string }): ReactElement {
|
|
15
|
-
if (typeof source === 'string') return <img className={cx('youtube__media', className)} src={source} alt="" />;
|
|
16
|
-
if (!isEmpty(source)) return <div className={cx('youtube__media', className)}>{source}</div>;
|
|
17
|
-
return <div className={cx('youtube__media', 'youtube__placeholder', className)} />;
|
|
15
|
+
if (typeof source === 'string') return <img className={cx('zc-youtube__media', className)} src={source} alt="" />;
|
|
16
|
+
if (!isEmpty(source)) return <div className={cx('zc-youtube__media', className)}>{source}</div>;
|
|
17
|
+
return <div className={cx('zc-youtube__media', 'zc-youtube__placeholder', className)} />;
|
|
18
18
|
}
|
|
@@ -150,21 +150,21 @@ export function PostSurface({
|
|
|
150
150
|
|
|
151
151
|
return (
|
|
152
152
|
<>
|
|
153
|
-
<div className="youtube-post__avatar">
|
|
154
|
-
<Media source={avatar} className="youtube__avatar-media" />
|
|
153
|
+
<div className="zc-youtube-post__avatar">
|
|
154
|
+
<Media source={avatar} className="zc-youtube__avatar-media" />
|
|
155
155
|
</div>
|
|
156
156
|
|
|
157
|
-
<div className="youtube-post__body">
|
|
158
|
-
<p className="youtube-post__head">
|
|
159
|
-
<span className="youtube-post__name">{channel}</span>
|
|
160
|
-
<span className="youtube-post__time">{age}</span>
|
|
157
|
+
<div className="zc-youtube-post__body">
|
|
158
|
+
<p className="zc-youtube-post__head">
|
|
159
|
+
<span className="zc-youtube-post__name">{channel}</span>
|
|
160
|
+
<span className="zc-youtube-post__time">{age}</span>
|
|
161
161
|
</p>
|
|
162
162
|
|
|
163
|
-
<p className="youtube-post__text">{text}</p>
|
|
163
|
+
<p className="zc-youtube-post__text">{text}</p>
|
|
164
164
|
|
|
165
|
-
<div className="youtube-post__carousel" ref={carouselRef} style={pageStyle(page)}>
|
|
165
|
+
<div className="zc-youtube-post__carousel" ref={carouselRef} style={pageStyle(page)}>
|
|
166
166
|
<div
|
|
167
|
-
className="youtube-post__viewport"
|
|
167
|
+
className="zc-youtube-post__viewport"
|
|
168
168
|
ref={viewportRef}
|
|
169
169
|
role="group"
|
|
170
170
|
aria-roledescription={paged ? CAROUSEL_ROLE_DESCRIPTION : undefined}
|
|
@@ -173,10 +173,10 @@ export function PostSurface({
|
|
|
173
173
|
onPointerDown={onGrab}
|
|
174
174
|
onKeyDown={onKeyDown}
|
|
175
175
|
>
|
|
176
|
-
<div className="youtube-post__strip">
|
|
176
|
+
<div className="zc-youtube-post__strip">
|
|
177
177
|
{slides.map((slide, index) => (
|
|
178
178
|
<div
|
|
179
|
-
className="youtube-post__slide"
|
|
179
|
+
className="zc-youtube-post__slide"
|
|
180
180
|
key={index}
|
|
181
181
|
role={paged ? 'group' : undefined}
|
|
182
182
|
aria-roledescription={paged ? SLIDE_ROLE_DESCRIPTION : undefined}
|
|
@@ -187,7 +187,7 @@ export function PostSurface({
|
|
|
187
187
|
))}
|
|
188
188
|
</div>
|
|
189
189
|
{paged && (
|
|
190
|
-
<span className="youtube-post__stack" aria-hidden="true">
|
|
190
|
+
<span className="zc-youtube-post__stack" aria-hidden="true">
|
|
191
191
|
<StackGlyph />
|
|
192
192
|
</span>
|
|
193
193
|
)}
|
|
@@ -196,7 +196,7 @@ export function PostSurface({
|
|
|
196
196
|
{paged && page > FIRST_PAGE && (
|
|
197
197
|
<button
|
|
198
198
|
type="button"
|
|
199
|
-
className="youtube-post__arrow youtube-post__arrow--prev"
|
|
199
|
+
className="zc-youtube-post__arrow zc-youtube-post__arrow--prev"
|
|
200
200
|
aria-label={PREVIOUS_LABEL}
|
|
201
201
|
onClick={() => goTo(page - ONE_PAGE)}
|
|
202
202
|
>
|
|
@@ -206,7 +206,7 @@ export function PostSurface({
|
|
|
206
206
|
{paged && page < lastPage && (
|
|
207
207
|
<button
|
|
208
208
|
type="button"
|
|
209
|
-
className="youtube-post__arrow youtube-post__arrow--next"
|
|
209
|
+
className="zc-youtube-post__arrow zc-youtube-post__arrow--next"
|
|
210
210
|
aria-label={NEXT_LABEL}
|
|
211
211
|
onClick={() => goTo(page + ONE_PAGE)}
|
|
212
212
|
>
|
|
@@ -215,26 +215,26 @@ export function PostSurface({
|
|
|
215
215
|
)}
|
|
216
216
|
</div>
|
|
217
217
|
|
|
218
|
-
<p className="youtube-post__actions">
|
|
219
|
-
<span className="youtube-post__action">
|
|
218
|
+
<p className="zc-youtube-post__actions">
|
|
219
|
+
<span className="zc-youtube-post__action">
|
|
220
220
|
<button
|
|
221
221
|
type="button"
|
|
222
|
-
className="youtube-button youtube-post__action-glyph youtube-post__action-glyph--thumb"
|
|
222
|
+
className="zc-youtube-button zc-youtube-post__action-glyph zc-youtube-post__action-glyph--thumb"
|
|
223
223
|
aria-label={LIKE_LABEL}
|
|
224
224
|
aria-pressed={liked}
|
|
225
225
|
onClick={() => onLikedChange(!liked)}
|
|
226
226
|
>
|
|
227
227
|
<ThumbUpGlyph />
|
|
228
228
|
</button>
|
|
229
|
-
<span className="youtube-post__action-count">
|
|
230
|
-
<span className="youtube__sr">{LIKES_LABEL} </span>
|
|
229
|
+
<span className="zc-youtube-post__action-count">
|
|
230
|
+
<span className="zc-youtube__sr">{LIKES_LABEL} </span>
|
|
231
231
|
{compactCount(likes + (liked ? 1 : 0))}
|
|
232
232
|
</span>
|
|
233
233
|
</span>
|
|
234
|
-
<span className="youtube-post__action youtube-post__action--dislike">
|
|
234
|
+
<span className="zc-youtube-post__action zc-youtube-post__action--dislike">
|
|
235
235
|
<button
|
|
236
236
|
type="button"
|
|
237
|
-
className="youtube-button youtube-post__action-glyph youtube-post__action-glyph--thumb"
|
|
237
|
+
className="zc-youtube-button zc-youtube-post__action-glyph zc-youtube-post__action-glyph--thumb"
|
|
238
238
|
aria-label={DISLIKE_LABEL}
|
|
239
239
|
aria-pressed={disliked}
|
|
240
240
|
onClick={() => onDislikedChange(!disliked)}
|
|
@@ -242,27 +242,27 @@ export function PostSurface({
|
|
|
242
242
|
<ThumbDownGlyph />
|
|
243
243
|
</button>
|
|
244
244
|
</span>
|
|
245
|
-
<span className="youtube-post__action youtube-post__action--share">
|
|
245
|
+
<span className="zc-youtube-post__action zc-youtube-post__action--share">
|
|
246
246
|
<button
|
|
247
247
|
type="button"
|
|
248
|
-
className="youtube-button youtube-post__action-glyph youtube-post__action-glyph--share"
|
|
248
|
+
className="zc-youtube-button zc-youtube-post__action-glyph zc-youtube-post__action-glyph--share"
|
|
249
249
|
aria-label={SHARE_LABEL}
|
|
250
250
|
onClick={() => onAction?.('share')}
|
|
251
251
|
>
|
|
252
252
|
<ShareGlyph />
|
|
253
253
|
</button>
|
|
254
254
|
</span>
|
|
255
|
-
<span className="youtube-post__action youtube-post__action--comment">
|
|
255
|
+
<span className="zc-youtube-post__action zc-youtube-post__action--comment">
|
|
256
256
|
<button
|
|
257
257
|
type="button"
|
|
258
|
-
className="youtube-button youtube-post__action-glyph youtube-post__action-glyph--bubble"
|
|
258
|
+
className="zc-youtube-button zc-youtube-post__action-glyph zc-youtube-post__action-glyph--bubble"
|
|
259
259
|
aria-label={COMMENT_LABEL}
|
|
260
260
|
onClick={() => onAction?.('comment')}
|
|
261
261
|
>
|
|
262
262
|
<BubbleGlyph />
|
|
263
263
|
</button>
|
|
264
|
-
<span className="youtube-post__action-count">
|
|
265
|
-
<span className="youtube__sr">{COMMENTS_LABEL} </span>
|
|
264
|
+
<span className="zc-youtube-post__action-count">
|
|
265
|
+
<span className="zc-youtube__sr">{COMMENTS_LABEL} </span>
|
|
266
266
|
{groupedCount(comments)}
|
|
267
267
|
</span>
|
|
268
268
|
</span>
|
|
@@ -271,7 +271,7 @@ export function PostSurface({
|
|
|
271
271
|
|
|
272
272
|
<button
|
|
273
273
|
type="button"
|
|
274
|
-
className="youtube-button youtube-post__more"
|
|
274
|
+
className="zc-youtube-button zc-youtube-post__more"
|
|
275
275
|
aria-label={MENU_LABEL}
|
|
276
276
|
onClick={() => onAction?.('menu')}
|
|
277
277
|
>
|
|
@@ -59,18 +59,18 @@ function RailAction({
|
|
|
59
59
|
onClick: () => void;
|
|
60
60
|
}): ReactElement {
|
|
61
61
|
return (
|
|
62
|
-
<li className="youtube-short__action">
|
|
62
|
+
<li className="zc-youtube-short__action">
|
|
63
63
|
<button
|
|
64
64
|
type="button"
|
|
65
|
-
className="youtube-button youtube-short__action-face"
|
|
65
|
+
className="zc-youtube-button zc-youtube-short__action-face"
|
|
66
66
|
aria-label={action}
|
|
67
67
|
aria-pressed={pressed}
|
|
68
68
|
onClick={onClick}
|
|
69
69
|
>
|
|
70
70
|
{glyph}
|
|
71
71
|
</button>
|
|
72
|
-
<span className="youtube-short__action-label">
|
|
73
|
-
{count !== undefined && <span className="youtube__sr">{name} </span>}
|
|
72
|
+
<span className="zc-youtube-short__action-label">
|
|
73
|
+
{count !== undefined && <span className="zc-youtube__sr">{name} </span>}
|
|
74
74
|
{count ?? name}
|
|
75
75
|
</span>
|
|
76
76
|
</li>
|
|
@@ -110,43 +110,43 @@ export function ShortSurface({
|
|
|
110
110
|
}: ShortSurfaceProps): ReactElement {
|
|
111
111
|
return (
|
|
112
112
|
<>
|
|
113
|
-
<div className="youtube-short__meta">
|
|
114
|
-
<div className="youtube-short__account">
|
|
115
|
-
<div className="youtube-short__account-avatar">
|
|
116
|
-
<Media source={avatar} className="youtube__avatar-media" />
|
|
113
|
+
<div className="zc-youtube-short__meta">
|
|
114
|
+
<div className="zc-youtube-short__account">
|
|
115
|
+
<div className="zc-youtube-short__account-avatar">
|
|
116
|
+
<Media source={avatar} className="zc-youtube__avatar-media" />
|
|
117
117
|
</div>
|
|
118
|
-
<span className="youtube-short__handle">{channel}</span>
|
|
118
|
+
<span className="zc-youtube-short__handle">{channel}</span>
|
|
119
119
|
</div>
|
|
120
|
-
<p className="youtube-short__title">{title}</p>
|
|
120
|
+
<p className="zc-youtube-short__title">{title}</p>
|
|
121
121
|
</div>
|
|
122
122
|
|
|
123
|
-
<div className="youtube-short__stage">
|
|
124
|
-
<div className="youtube-short__frame">
|
|
123
|
+
<div className="zc-youtube-short__stage">
|
|
124
|
+
<div className="zc-youtube-short__frame">
|
|
125
125
|
<Media source={media} />
|
|
126
126
|
</div>
|
|
127
127
|
|
|
128
|
-
<div className="youtube-short__controls">
|
|
128
|
+
<div className="zc-youtube-short__controls">
|
|
129
129
|
<button
|
|
130
130
|
type="button"
|
|
131
|
-
className="youtube-short__control"
|
|
131
|
+
className="zc-youtube-short__control"
|
|
132
132
|
aria-pressed={paused}
|
|
133
133
|
aria-label={paused ? PLAY_LABEL : PAUSE_LABEL}
|
|
134
134
|
onClick={onTogglePaused}
|
|
135
135
|
>
|
|
136
136
|
{paused ? <PlayGlyph /> : <PauseGlyph />}
|
|
137
137
|
</button>
|
|
138
|
-
<span className="youtube-short__control youtube-short__control--static" aria-hidden="true">
|
|
138
|
+
<span className="zc-youtube-short__control zc-youtube-short__control--static" aria-hidden="true">
|
|
139
139
|
<SpeakerGlyph />
|
|
140
140
|
</span>
|
|
141
141
|
</div>
|
|
142
142
|
|
|
143
|
-
<div className="youtube-short__pill">
|
|
144
|
-
<span className="youtube-short__pill-cell" aria-hidden="true">
|
|
145
|
-
<span className="youtube-short__captions">{CAPTIONS_LABEL}</span>
|
|
143
|
+
<div className="zc-youtube-short__pill">
|
|
144
|
+
<span className="zc-youtube-short__pill-cell" aria-hidden="true">
|
|
145
|
+
<span className="zc-youtube-short__captions">{CAPTIONS_LABEL}</span>
|
|
146
146
|
</span>
|
|
147
147
|
<button
|
|
148
148
|
type="button"
|
|
149
|
-
className="youtube-button youtube-short__pill-cell"
|
|
149
|
+
className="zc-youtube-button zc-youtube-short__pill-cell"
|
|
150
150
|
aria-label={MENU_LABEL}
|
|
151
151
|
onClick={() => onAction?.('menu')}
|
|
152
152
|
>
|
|
@@ -154,7 +154,7 @@ export function ShortSurface({
|
|
|
154
154
|
</button>
|
|
155
155
|
<button
|
|
156
156
|
type="button"
|
|
157
|
-
className="youtube-button youtube-short__pill-cell"
|
|
157
|
+
className="zc-youtube-button zc-youtube-short__pill-cell"
|
|
158
158
|
aria-label={EXPAND_LABEL}
|
|
159
159
|
onClick={() => onAction?.('expand')}
|
|
160
160
|
>
|
|
@@ -163,18 +163,18 @@ export function ShortSurface({
|
|
|
163
163
|
</div>
|
|
164
164
|
|
|
165
165
|
<div
|
|
166
|
-
className="youtube-short__progress"
|
|
166
|
+
className="zc-youtube-short__progress"
|
|
167
167
|
role="progressbar"
|
|
168
168
|
aria-label={PROGRESS_LABEL}
|
|
169
169
|
aria-valuemin={PROGRESS_MIN}
|
|
170
170
|
aria-valuemax={PROGRESS_MAX}
|
|
171
171
|
aria-valuenow={progressValue(progress)}
|
|
172
172
|
>
|
|
173
|
-
<div className="youtube-short__progress-fill" style={progressStyle(progress)} />
|
|
173
|
+
<div className="zc-youtube-short__progress-fill" style={progressStyle(progress)} />
|
|
174
174
|
</div>
|
|
175
175
|
</div>
|
|
176
176
|
|
|
177
|
-
<ul className="youtube-short__rail">
|
|
177
|
+
<ul className="zc-youtube-short__rail">
|
|
178
178
|
<RailAction
|
|
179
179
|
glyph={<HeartGlyph />}
|
|
180
180
|
action={LIKE_ACTION}
|
|
@@ -203,8 +203,8 @@ export function ShortSurface({
|
|
|
203
203
|
count={groupedCount(remixes)}
|
|
204
204
|
onClick={() => onAction?.('remix')}
|
|
205
205
|
/>
|
|
206
|
-
<li className="youtube-short__rail-avatar" aria-hidden="true">
|
|
207
|
-
<Media source={avatar} className="youtube__avatar-media" />
|
|
206
|
+
<li className="zc-youtube-short__rail-avatar" aria-hidden="true">
|
|
207
|
+
<Media source={avatar} className="zc-youtube__avatar-media" />
|
|
208
208
|
</li>
|
|
209
209
|
</ul>
|
|
210
210
|
</>
|