@zyncat/ui 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -13
- package/dist/alert.css +26 -33
- package/dist/alert.js +18 -17
- package/dist/alert.js.map +1 -1
- package/dist/avatar-group.js +2 -2
- package/dist/avatar-group.js.map +1 -1
- package/dist/avatar.css +51 -50
- package/dist/avatar.js +29 -7
- package/dist/avatar.js.map +1 -1
- package/dist/badge.css +30 -36
- package/dist/badge.js +1 -1
- package/dist/button.css +80 -96
- package/dist/button.js +1 -1
- package/dist/checkbox.css +27 -32
- package/dist/checkbox.js +2 -2
- package/dist/{chunk-RJFGWJ4W.js → chunk-3XRVPCIM.js} +6 -6
- package/dist/chunk-3XRVPCIM.js.map +1 -0
- package/dist/{chunk-M43IOM5C.js → chunk-5GBV45YD.js} +3 -3
- package/dist/{chunk-M43IOM5C.js.map → chunk-5GBV45YD.js.map} +1 -1
- package/dist/{chunk-45R4Z5XN.js → chunk-5VC3TUZ2.js} +4 -4
- package/dist/{chunk-45R4Z5XN.js.map → chunk-5VC3TUZ2.js.map} +1 -1
- package/dist/{chunk-A5WTZACK.js → chunk-5W5TKANX.js} +3 -3
- package/dist/{chunk-A5WTZACK.js.map → chunk-5W5TKANX.js.map} +1 -1
- package/dist/{chunk-AADAJL7D.js → chunk-5X3MJRIM.js} +8 -9
- package/dist/chunk-5X3MJRIM.js.map +1 -0
- package/dist/{chunk-TCUCYFT7.js → chunk-6SUHSSOK.js} +3 -3
- package/dist/{chunk-TCUCYFT7.js.map → chunk-6SUHSSOK.js.map} +1 -1
- package/dist/{chunk-DDRSMHN4.js → chunk-6X3G4GIM.js} +3 -3
- package/dist/{chunk-DDRSMHN4.js.map → chunk-6X3G4GIM.js.map} +1 -1
- package/dist/{chunk-TYHR4VNM.js → chunk-AREEMG47.js} +10 -8
- package/dist/chunk-AREEMG47.js.map +1 -0
- package/dist/{chunk-EF6RPXU7.js → chunk-BH4JFWXQ.js} +36 -31
- package/dist/chunk-BH4JFWXQ.js.map +1 -0
- package/dist/{chunk-TVYH4AN7.js → chunk-BTF6DAE3.js} +13 -13
- package/dist/chunk-BTF6DAE3.js.map +1 -0
- package/dist/{chunk-CF4QHO4N.js → chunk-CAXQJSIE.js} +10 -10
- package/dist/{chunk-CF4QHO4N.js.map → chunk-CAXQJSIE.js.map} +1 -1
- package/dist/{chunk-4C5RZXBT.js → chunk-CFRGQJ23.js} +8 -8
- package/dist/chunk-CFRGQJ23.js.map +1 -0
- package/dist/{chunk-IJS7TPGV.js → chunk-FEXUS4SV.js} +6 -5
- package/dist/chunk-FEXUS4SV.js.map +1 -0
- package/dist/{chunk-227ZW4V7.js → chunk-FLQVOSFC.js} +11 -11
- package/dist/chunk-FLQVOSFC.js.map +1 -0
- package/dist/{chunk-FONOS5RN.js → chunk-FVPNICF4.js} +11 -10
- package/dist/chunk-FVPNICF4.js.map +1 -0
- package/dist/{chunk-I45AU6KH.js → chunk-GGDAMIBH.js} +13 -7
- package/dist/chunk-GGDAMIBH.js.map +1 -0
- package/dist/{chunk-4BSHB7R3.js → chunk-GJTHWB6O.js} +9 -9
- package/dist/chunk-GJTHWB6O.js.map +1 -0
- package/dist/{chunk-EAI4POPB.js → chunk-GOLSYGRA.js} +45 -75
- package/dist/chunk-GOLSYGRA.js.map +1 -0
- package/dist/chunk-H3X2263Y.js +17 -0
- package/dist/chunk-H3X2263Y.js.map +1 -0
- package/dist/chunk-K45CWVHS.js +53 -0
- package/dist/chunk-K45CWVHS.js.map +1 -0
- package/dist/{chunk-JY6A2ZJZ.js → chunk-LNAV5E7S.js} +2 -2
- package/dist/{chunk-JY6A2ZJZ.js.map → chunk-LNAV5E7S.js.map} +1 -1
- package/dist/{chunk-TUTXXC3W.js → chunk-MDSRZ4QR.js} +3 -3
- package/dist/{chunk-TUTXXC3W.js.map → chunk-MDSRZ4QR.js.map} +1 -1
- package/dist/chunk-N2GJEO5Z.js +101 -0
- package/dist/chunk-N2GJEO5Z.js.map +1 -0
- package/dist/chunk-PU3QWBEL.js +39 -0
- package/dist/chunk-PU3QWBEL.js.map +1 -0
- package/dist/{chunk-43M6GQ4Q.js → chunk-PWQVSVXR.js} +51 -32
- package/dist/chunk-PWQVSVXR.js.map +1 -0
- package/dist/chunk-QGVFFT2B.js +14 -0
- package/dist/chunk-QGVFFT2B.js.map +1 -0
- package/dist/{chunk-5PZ43DCG.js → chunk-RBSHRRNO.js} +12 -13
- package/dist/chunk-RBSHRRNO.js.map +1 -0
- package/dist/{chunk-XNIYSAMJ.js → chunk-RW2A4M2Q.js} +14 -9
- package/dist/chunk-RW2A4M2Q.js.map +1 -0
- package/dist/{chunk-HY5MPISE.js → chunk-UYSXJ7MH.js} +9 -9
- package/dist/chunk-UYSXJ7MH.js.map +1 -0
- package/dist/chunk-VDOBLABP.js +38 -0
- package/dist/chunk-VDOBLABP.js.map +1 -0
- package/dist/chunk-VNVVG47J.js +12 -0
- package/dist/chunk-VNVVG47J.js.map +1 -0
- package/dist/{chunk-3MPF7FZV.js → chunk-WCWV5IX6.js} +3 -3
- package/dist/{chunk-3MPF7FZV.js.map → chunk-WCWV5IX6.js.map} +1 -1
- package/dist/{chunk-VAXCXZ53.js → chunk-WZUTBJC4.js} +5 -4
- package/dist/chunk-WZUTBJC4.js.map +1 -0
- package/dist/cli.js +137 -25
- package/dist/collapse.css +15 -30
- package/dist/collapse.js +1 -1
- package/dist/confetti.css +19 -12
- package/dist/confetti.js +7 -6
- package/dist/confetti.js.map +1 -1
- package/dist/count-badge.js +2 -2
- package/dist/date-field.js +20 -19
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +131 -154
- package/dist/date-range-field.js +55 -54
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +24 -23
- package/dist/datetime-field.js.map +1 -1
- package/dist/dialog.css +31 -41
- package/dist/dialog.js +23 -22
- package/dist/dialog.js.map +1 -1
- package/dist/digit-strip.css +16 -16
- package/dist/dropdown.css +36 -27
- package/dist/dropdown.js +77 -40
- package/dist/dropdown.js.map +1 -1
- package/dist/emoji-picker.js +44 -45
- package/dist/emoji-picker.js.map +1 -1
- package/dist/facebook-feed.css +145 -148
- package/dist/facebook-feed.js +106 -102
- package/dist/facebook-feed.js.map +1 -1
- package/dist/flow-field.css +8 -4
- package/dist/flow-field.js +7 -6
- package/dist/flow-field.js.map +1 -1
- package/dist/glide.js +4 -3
- package/dist/icon.css +7 -10
- package/dist/input.css +76 -84
- package/dist/instagram-feed.css +65 -66
- package/dist/instagram-feed.js +61 -44
- package/dist/instagram-feed.js.map +1 -1
- package/dist/lens.css +42 -38
- package/dist/lens.js +17 -16
- package/dist/lens.js.map +1 -1
- package/dist/mcp.js +3 -2
- package/dist/menu-surface.css +54 -34
- package/dist/modal.css +2 -4
- package/dist/modal.js +12 -11
- package/dist/modal.js.map +1 -1
- package/dist/morphing-text.css +26 -16
- package/dist/morphing-text.js +14 -13
- package/dist/morphing-text.js.map +1 -1
- package/dist/motion-devtools.css +42 -68
- package/dist/motion-devtools.js +47 -39
- package/dist/motion-devtools.js.map +1 -1
- package/dist/motion-tokens.js +1 -1
- package/dist/multi-select.js +21 -16
- package/dist/multi-select.js.map +1 -1
- package/dist/number-field.js +14 -14
- package/dist/number-field.js.map +1 -1
- package/dist/odometer.css +22 -16
- package/dist/odometer.js +12 -11
- package/dist/odometer.js.map +1 -1
- package/dist/otp-field.js +3 -3
- package/dist/otp-field.js.map +1 -1
- package/dist/overlay.css +4 -9
- package/dist/pagination.css +10 -15
- package/dist/pagination.js +11 -10
- package/dist/pagination.js.map +1 -1
- package/dist/popover.css +13 -15
- package/dist/popover.js +10 -9
- package/dist/radio-group.css +60 -73
- package/dist/radio-group.js +30 -29
- package/dist/radio-group.js.map +1 -1
- package/dist/select.css +66 -75
- package/dist/select.js +19 -14
- package/dist/select.js.map +1 -1
- package/dist/sheet.css +12 -14
- package/dist/sheet.js +11 -10
- package/dist/status-badge.js +9 -9
- package/dist/status-badge.js.map +1 -1
- package/dist/styles.css +34 -34
- package/dist/support-rail.css +116 -100
- package/dist/support-rail.js +41 -40
- package/dist/support-rail.js.map +1 -1
- package/dist/table.css +76 -84
- package/dist/table.js +42 -41
- package/dist/table.js.map +1 -1
- package/dist/tabs.css +82 -90
- package/dist/tabs.js +23 -20
- package/dist/tabs.js.map +1 -1
- package/dist/tag.css +48 -53
- package/dist/tag.js +13 -12
- package/dist/tag.js.map +1 -1
- package/dist/text-field.js +5 -5
- package/dist/textarea.css +46 -49
- package/dist/textarea.js +16 -16
- package/dist/textarea.js.map +1 -1
- package/dist/theme.js +31 -15
- package/dist/theme.js.map +1 -1
- package/dist/tiktok.css +113 -117
- package/dist/tiktok.js +53 -52
- package/dist/tiktok.js.map +1 -1
- package/dist/time-field.js +26 -20
- package/dist/time-field.js.map +1 -1
- package/dist/toast-store.js +2 -1
- package/dist/toast.css +49 -65
- package/dist/toast.js +32 -26
- package/dist/toast.js.map +1 -1
- package/dist/toggle-tag.js +22 -13
- package/dist/toggle-tag.js.map +1 -1
- package/dist/toggle.css +26 -31
- package/dist/toggle.js +7 -7
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.css +16 -23
- package/dist/tooltip.js +117 -95
- package/dist/tooltip.js.map +1 -1
- package/dist/trigger.css +3 -3
- package/dist/types/components/composites/alert/Alert.d.ts +1 -2
- package/dist/types/components/composites/date-picker/TimeField.d.ts +1 -2
- package/dist/types/components/composites/date-picker/field-shell.d.ts +1 -1
- package/dist/types/components/composites/date-picker/time-core.d.ts +1 -2
- package/dist/types/components/composites/dropdown/Dropdown.d.ts +9 -1
- package/dist/types/components/composites/dropdown/types.d.ts +14 -0
- package/dist/types/components/composites/emoji-picker/EmojiPickerPanel.d.ts +1 -1
- package/dist/types/components/composites/emoji-picker/data.d.ts +2 -5
- package/dist/types/components/composites/emoji-picker/react/useEmojiPicker.d.ts +0 -11
- package/dist/types/components/composites/emoji-picker/types.d.ts +3 -8
- package/dist/types/components/composites/select/MultiSelect.d.ts +6 -1
- package/dist/types/components/composites/select/Select.d.ts +6 -1
- package/dist/types/components/composites/select/core/index.d.ts +1 -1
- package/dist/types/components/composites/select/core/menu.d.ts +3 -3
- package/dist/types/components/composites/select/core/panel.d.ts +3 -3
- package/dist/types/components/composites/tabs/Tabs.d.ts +7 -10
- package/dist/types/components/composites/toast/Toast.d.ts +1 -1
- package/dist/types/components/composites/tooltip/Tooltip.d.ts +9 -1
- package/dist/types/components/composites/tooltip/tooltip-store.d.ts +5 -6
- package/dist/types/components/dev/MotionDevtools.d.ts +3 -1
- package/dist/types/components/internal/hooks/use-host-election.d.ts +8 -0
- package/dist/types/components/internal/icon/Icon.d.ts +1 -3
- package/dist/types/components/internal/menu/highlight.d.ts +7 -0
- package/dist/types/components/internal/utils/activation.d.ts +0 -4
- package/dist/types/components/primitives/avatar/Avatar.d.ts +1 -1
- package/dist/types/components/primitives/button/Button.d.ts +1 -1
- package/dist/types/components/primitives/input/TextField.d.ts +1 -2
- package/dist/types/components/primitives/textarea/Textarea.d.ts +0 -1
- package/dist/types/shared-slot.d.ts +1 -0
- package/dist/types/tokens/component-styles.generated.d.ts +79 -151
- package/dist/types/tokens/motion-defaults.generated.d.ts +34 -0
- package/dist/types/tokens/motion-scale.d.ts +2 -2
- package/dist/types/tokens/motion-tokens.d.ts +7 -0
- package/dist/types/tokens/theme-sync.d.ts +3 -0
- package/dist/types/tokens/theme-tokens.generated.d.ts +669 -1105
- package/dist/typing-lines.css +17 -10
- package/dist/typing-lines.js +9 -8
- package/dist/typing-lines.js.map +1 -1
- package/dist/weight-field.css +31 -17
- package/dist/weight-field.js +4 -4
- package/dist/weight-field.js.map +1 -1
- package/dist/youtube.css +90 -96
- package/dist/youtube.js +87 -86
- package/dist/youtube.js.map +1 -1
- package/package.json +3 -1
- package/skills/zyncat-ui/SKILL.md +5 -3
- package/skills/zyncat-ui/references/components.md +4 -4
- package/skills/zyncat-ui/references/theming.md +105 -34
- package/src/components/composites/alert/Alert.tsx +9 -10
- package/src/components/composites/alert/alert.css +26 -33
- package/src/components/composites/date-picker/DateField.tsx +1 -1
- package/src/components/composites/date-picker/DateRangeField.tsx +1 -1
- package/src/components/composites/date-picker/DateTimeField.tsx +4 -4
- package/src/components/composites/date-picker/TimeField.tsx +8 -5
- package/src/components/composites/date-picker/calendar-panel.tsx +25 -20
- package/src/components/composites/date-picker/date-picker.css +131 -154
- package/src/components/composites/date-picker/field-shell.tsx +7 -7
- package/src/components/composites/date-picker/range-panel.tsx +34 -34
- package/src/components/composites/date-picker/time-core.tsx +4 -6
- package/src/components/composites/date-picker/use-day-focus.ts +1 -1
- package/src/components/composites/dialog/Dialog.tsx +11 -11
- package/src/components/composites/dialog/dialog.css +31 -41
- package/src/components/composites/dropdown/Dropdown.tsx +15 -2
- package/src/components/composites/dropdown/Dropdown.usage.md +7 -4
- package/src/components/composites/dropdown/dropdown.css +36 -27
- package/src/components/composites/dropdown/menu-panel.tsx +56 -27
- package/src/components/composites/dropdown/types.ts +28 -6
- package/src/components/composites/emoji-picker/EmojiPickerPanel.tsx +5 -4
- package/src/components/composites/emoji-picker/EmojiPickerPanel.usage.md +4 -4
- package/src/components/composites/emoji-picker/data.ts +2 -5
- package/src/components/composites/emoji-picker/dom.ts +6 -6
- package/src/components/composites/emoji-picker/react/category-bar.tsx +6 -6
- package/src/components/composites/emoji-picker/react/useEmojiPicker.ts +0 -11
- package/src/components/composites/emoji-picker/scaffold.ts +7 -7
- package/src/components/composites/emoji-picker/search.ts +0 -7
- package/src/components/composites/emoji-picker/styles.css +34 -34
- package/src/components/composites/emoji-picker/types.ts +3 -8
- package/src/components/composites/modal/Modal.tsx +2 -2
- package/src/components/composites/modal/modal.css +2 -4
- package/src/components/composites/pagination/Pagination.tsx +7 -7
- package/src/components/composites/pagination/pagination.css +10 -15
- package/src/components/composites/popover/Popover.tsx +2 -2
- package/src/components/composites/popover/popover.css +13 -15
- package/src/components/composites/select/MultiSelect.tsx +11 -2
- package/src/components/composites/select/MultiSelect.usage.md +2 -1
- package/src/components/composites/select/Select.tsx +10 -1
- package/src/components/composites/select/Select.usage.md +2 -1
- package/src/components/composites/select/core/index.ts +1 -1
- package/src/components/composites/select/core/menu.tsx +19 -4
- package/src/components/composites/select/core/panel.tsx +19 -15
- package/src/components/composites/select/core/trigger.tsx +5 -5
- package/src/components/composites/select/select.css +66 -75
- package/src/components/composites/sheet/Sheet.tsx +2 -2
- package/src/components/composites/sheet/sheet.css +12 -14
- package/src/components/composites/sheet/use-sheet-drag.ts +1 -1
- package/src/components/composites/table/Table.tsx +35 -35
- package/src/components/composites/table/table.css +76 -84
- package/src/components/composites/tabs/Tabs.tsx +20 -21
- package/src/components/composites/tabs/Tabs.usage.md +3 -2
- package/src/components/composites/tabs/tabs.css +82 -90
- package/src/components/composites/toast/Toast.tsx +23 -18
- package/src/components/composites/toast/toast-store.ts +8 -6
- package/src/components/composites/toast/toast.css +49 -65
- package/src/components/composites/tooltip/Tooltip.tsx +40 -19
- package/src/components/composites/tooltip/Tooltip.usage.md +9 -1
- package/src/components/composites/tooltip/tooltip-host.tsx +55 -23
- package/src/components/composites/tooltip/tooltip-store.ts +36 -53
- package/src/components/composites/tooltip/tooltip.css +16 -23
- package/src/components/compound/support-rail/SupportRail.tsx +33 -33
- package/src/components/compound/support-rail/support-rail.css +116 -100
- package/src/components/dev/MotionDevtools.tsx +28 -17
- package/src/components/dev/MotionDevtools.usage.md +2 -2
- package/src/components/dev/motion-devtools.css +42 -68
- package/src/components/dev/slowmo-engine.ts +16 -15
- package/src/components/expressive/confetti/Confetti.tsx +4 -4
- package/src/components/expressive/confetti/confetti.css +19 -12
- package/src/components/expressive/facebook-feed/chrome.tsx +2 -2
- package/src/components/expressive/facebook-feed/facebook-feed.css +145 -148
- package/src/components/expressive/facebook-feed/post.tsx +39 -39
- package/src/components/expressive/facebook-feed/reel.tsx +41 -37
- package/src/components/expressive/facebook-feed/story.tsx +27 -27
- package/src/components/expressive/flow-field/FlowField.tsx +4 -4
- package/src/components/expressive/flow-field/flow-field.css +8 -4
- package/src/components/expressive/instagram-feed/InstagramFeed.tsx +52 -44
- package/src/components/expressive/instagram-feed/instagram-feed.css +65 -66
- package/src/components/expressive/lens/Lens.tsx +14 -14
- package/src/components/expressive/lens/lens.css +42 -38
- package/src/components/expressive/morphing-text/MorphingText.tsx +12 -13
- package/src/components/expressive/morphing-text/morphing-text.css +26 -16
- package/src/components/expressive/odometer/Odometer.tsx +9 -9
- package/src/components/expressive/odometer/odometer.css +22 -16
- package/src/components/expressive/tiktok/TikTok.tsx +54 -54
- package/src/components/expressive/tiktok/tiktok.css +113 -117
- package/src/components/expressive/typing-lines/TypingLines.tsx +0 -0
- package/src/components/expressive/typing-lines/typing-lines.css +17 -10
- package/src/components/expressive/weight-field/WeightField.tsx +4 -4
- package/src/components/expressive/weight-field/weight-field.css +31 -17
- package/src/components/expressive/youtube/YouTube.tsx +4 -4
- package/src/components/expressive/youtube/glyphs.tsx +16 -16
- package/src/components/expressive/youtube/media.tsx +3 -3
- package/src/components/expressive/youtube/post.tsx +28 -28
- package/src/components/expressive/youtube/short.tsx +25 -25
- package/src/components/expressive/youtube/video.tsx +13 -13
- package/src/components/expressive/youtube/youtube.css +90 -96
- package/src/components/internal/glass/glass.css +19 -22
- package/src/components/internal/glass/glint.ts +3 -3
- package/src/components/internal/hooks/use-host-election.ts +46 -0
- package/src/components/internal/icon/Icon.tsx +1 -5
- package/src/components/internal/icon/IconSlot.tsx +1 -1
- package/src/components/internal/icon/icon.css +7 -10
- package/src/components/internal/menu/highlight.ts +12 -0
- package/src/components/internal/menu/menu-row.tsx +5 -5
- package/src/components/internal/menu/menu-surface.css +54 -34
- package/src/components/internal/overlay/layer.tsx +2 -1
- package/src/components/internal/overlay/modal.tsx +5 -4
- package/src/components/internal/overlay/overlay.css +4 -9
- package/src/components/internal/overlay/trigger.css +3 -3
- package/src/components/internal/utils/activation.ts +0 -4
- package/src/components/primitives/avatar/Avatar.tsx +24 -8
- package/src/components/primitives/avatar/AvatarGroup.tsx +4 -4
- package/src/components/primitives/avatar/avatar.css +51 -50
- package/src/components/primitives/badge/Badge.tsx +9 -9
- package/src/components/primitives/badge/StatusBadge.tsx +7 -7
- package/src/components/primitives/badge/badge.css +30 -36
- package/src/components/primitives/badge/digit-strip.css +16 -16
- package/src/components/primitives/badge/digit-strip.tsx +4 -4
- package/src/components/primitives/button/Button.tsx +8 -8
- package/src/components/primitives/button/button.css +80 -96
- package/src/components/primitives/checkbox/Checkbox.tsx +10 -4
- package/src/components/primitives/checkbox/check-glyph.tsx +5 -5
- package/src/components/primitives/checkbox/checkbox.css +27 -32
- package/src/components/primitives/collapse/Collapse.tsx +2 -2
- package/src/components/primitives/collapse/collapse.css +15 -30
- package/src/components/primitives/collapse/collapse.typecheck.tsx +1 -1
- package/src/components/primitives/input/NumberField.tsx +11 -11
- package/src/components/primitives/input/OtpField.tsx +3 -3
- package/src/components/primitives/input/TextField.tsx +9 -10
- package/src/components/primitives/input/field-chrome.tsx +6 -6
- package/src/components/primitives/input/input.css +76 -84
- package/src/components/primitives/radio-group/RadioGroup.tsx +23 -23
- package/src/components/primitives/radio-group/radio-group.css +60 -73
- package/src/components/primitives/tag/Tag.tsx +5 -5
- package/src/components/primitives/tag/ToggleTag.tsx +11 -6
- package/src/components/primitives/tag/tag.css +48 -53
- package/src/components/primitives/textarea/Textarea.tsx +13 -14
- package/src/components/primitives/textarea/textarea.css +46 -49
- package/src/components/primitives/toggle/Toggle.tsx +7 -7
- package/src/components/primitives/toggle/toggle.css +26 -31
- package/src/engine/animate.ts +2 -1
- package/src/engine/flip.ts +2 -1
- package/src/mcp/server.ts +3 -1
- package/src/motion/flip.ts +7 -8
- package/src/motion/glide.tsx +41 -26
- package/src/shared-slot.ts +10 -0
- package/src/styles.css +7 -15
- package/src/tokens/base.css +15 -0
- package/src/tokens/color.css +19 -59
- package/src/tokens/component-styles.generated.ts +79 -151
- package/src/tokens/dark.css +63 -0
- package/src/tokens/decisions.css +26 -0
- package/src/tokens/elevation.css +71 -21
- package/src/tokens/fonts.css +0 -2
- package/src/tokens/glass.css +15 -9
- package/src/tokens/motion-defaults.generated.ts +21 -0
- package/src/tokens/motion-scale.ts +2 -2
- package/src/tokens/motion-tokens.ts +65 -40
- package/src/tokens/motion-tokens.usage.md +5 -2
- package/src/tokens/motion.css +12 -22
- package/src/tokens/radius.css +10 -9
- package/src/tokens/semantic.css +57 -37
- package/src/tokens/spacing.css +5 -6
- package/src/tokens/theme-sync.tsx +15 -0
- package/src/tokens/theme-tokens.generated.ts +682 -1109
- package/src/tokens/theme.tsx +22 -16
- package/src/tokens/theme.usage.md +19 -13
- package/src/tokens/typography.css +16 -19
- package/tailwind.css +193 -0
- package/dist/chunk-227ZW4V7.js.map +0 -1
- package/dist/chunk-43M6GQ4Q.js.map +0 -1
- package/dist/chunk-4BSHB7R3.js.map +0 -1
- package/dist/chunk-4C5RZXBT.js.map +0 -1
- package/dist/chunk-5PZ43DCG.js.map +0 -1
- package/dist/chunk-7IZJERGA.js +0 -80
- package/dist/chunk-7IZJERGA.js.map +0 -1
- package/dist/chunk-AADAJL7D.js.map +0 -1
- package/dist/chunk-CNWTIMIP.js +0 -39
- package/dist/chunk-CNWTIMIP.js.map +0 -1
- package/dist/chunk-EAI4POPB.js.map +0 -1
- package/dist/chunk-EF6RPXU7.js.map +0 -1
- package/dist/chunk-FONOS5RN.js.map +0 -1
- package/dist/chunk-FQEHSKEI.js +0 -38
- package/dist/chunk-FQEHSKEI.js.map +0 -1
- package/dist/chunk-HY5MPISE.js.map +0 -1
- package/dist/chunk-I45AU6KH.js.map +0 -1
- package/dist/chunk-IJS7TPGV.js.map +0 -1
- package/dist/chunk-OWNMRMPN.js +0 -14
- package/dist/chunk-OWNMRMPN.js.map +0 -1
- package/dist/chunk-RJFGWJ4W.js.map +0 -1
- package/dist/chunk-TVYH4AN7.js.map +0 -1
- package/dist/chunk-TYHR4VNM.js.map +0 -1
- package/dist/chunk-VAXCXZ53.js.map +0 -1
- package/dist/chunk-XNIYSAMJ.js.map +0 -1
- package/dist/chunk-Y2YA7QRF.js +0 -17
- package/dist/chunk-Y2YA7QRF.js.map +0 -1
- package/src/tokens/avatar.css +0 -24
- package/src/tokens/icons.css +0 -11
- package/src/tokens/layers.css +0 -11
package/dist/youtube.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
'use client';import { startDrag } from './chunk-
|
|
1
|
+
'use client';import { startDrag } from './chunk-FEXUS4SV.js';
|
|
2
|
+
import './chunk-VNVVG47J.js';
|
|
2
3
|
import { useControllable } from './chunk-MMRIQNEN.js';
|
|
3
|
-
import './chunk-
|
|
4
|
+
import './chunk-N2GJEO5Z.js';
|
|
4
5
|
import { cx } from './chunk-QGNC7LH5.js';
|
|
5
6
|
import './youtube.css';
|
|
6
7
|
import { useRef, useEffect } from 'react';
|
|
@@ -27,29 +28,29 @@ function groupedCount(value) {
|
|
|
27
28
|
return String(whole(value)).replace(THOUSANDS_BOUNDARY, ",");
|
|
28
29
|
}
|
|
29
30
|
function KebabGlyph() {
|
|
30
|
-
return /* @__PURE__ */ jsxs("svg", { className: "youtube__glyph", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", focusable: "false", children: [
|
|
31
|
+
return /* @__PURE__ */ jsxs("svg", { className: "zc-youtube__glyph", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", focusable: "false", children: [
|
|
31
32
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "6", r: "2" }),
|
|
32
33
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2" }),
|
|
33
34
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "18", r: "2" })
|
|
34
35
|
] });
|
|
35
36
|
}
|
|
36
37
|
function VerifiedGlyph() {
|
|
37
|
-
return /* @__PURE__ */ jsxs("svg", { className: "youtube__glyph", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
|
|
38
|
+
return /* @__PURE__ */ jsxs("svg", { className: "zc-youtube__glyph", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
|
|
38
39
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "12", fill: "currentColor" }),
|
|
39
|
-
/* @__PURE__ */ jsx("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" })
|
|
40
|
+
/* @__PURE__ */ jsx("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" })
|
|
40
41
|
] });
|
|
41
42
|
}
|
|
42
43
|
function PlayGlyph() {
|
|
43
|
-
return /* @__PURE__ */ jsx("svg", { className: "youtube__glyph", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx("path", { d: "M7.4 4.5 19.6 12 7.4 19.5z" }) });
|
|
44
|
+
return /* @__PURE__ */ jsx("svg", { className: "zc-youtube__glyph", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx("path", { d: "M7.4 4.5 19.6 12 7.4 19.5z" }) });
|
|
44
45
|
}
|
|
45
46
|
function PauseGlyph() {
|
|
46
|
-
return /* @__PURE__ */ jsxs("svg", { className: "youtube__glyph", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", focusable: "false", children: [
|
|
47
|
+
return /* @__PURE__ */ jsxs("svg", { className: "zc-youtube__glyph", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", focusable: "false", children: [
|
|
47
48
|
/* @__PURE__ */ jsx("rect", { x: "6.4", y: "4.4", width: "4", height: "15.2", rx: "0.5" }),
|
|
48
49
|
/* @__PURE__ */ jsx("rect", { x: "13.6", y: "4.4", width: "4", height: "15.2", rx: "0.5" })
|
|
49
50
|
] });
|
|
50
51
|
}
|
|
51
52
|
function SpeakerGlyph() {
|
|
52
|
-
return /* @__PURE__ */ jsxs("svg", { className: "youtube__glyph", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
|
|
53
|
+
return /* @__PURE__ */ jsxs("svg", { className: "zc-youtube__glyph", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
|
|
53
54
|
/* @__PURE__ */ jsx("path", { d: "M3.4 9h3.4l4.8-4.2v14.4L6.8 15H3.4z", fill: "currentColor" }),
|
|
54
55
|
/* @__PURE__ */ jsx(
|
|
55
56
|
"path",
|
|
@@ -67,7 +68,7 @@ function ExpandGlyph() {
|
|
|
67
68
|
return /* @__PURE__ */ jsxs(
|
|
68
69
|
"svg",
|
|
69
70
|
{
|
|
70
|
-
className: "youtube__glyph",
|
|
71
|
+
className: "zc-youtube__glyph",
|
|
71
72
|
viewBox: "0 0 24 24",
|
|
72
73
|
fill: "none",
|
|
73
74
|
stroke: "currentColor",
|
|
@@ -87,7 +88,7 @@ function HeartGlyph() {
|
|
|
87
88
|
return /* @__PURE__ */ jsx(
|
|
88
89
|
"svg",
|
|
89
90
|
{
|
|
90
|
-
className: "youtube__glyph",
|
|
91
|
+
className: "zc-youtube__glyph",
|
|
91
92
|
viewBox: "0 0 22 22",
|
|
92
93
|
fill: "none",
|
|
93
94
|
stroke: "currentColor",
|
|
@@ -103,7 +104,7 @@ function BubbleGlyph() {
|
|
|
103
104
|
return /* @__PURE__ */ jsxs(
|
|
104
105
|
"svg",
|
|
105
106
|
{
|
|
106
|
-
className: "youtube__glyph",
|
|
107
|
+
className: "zc-youtube__glyph",
|
|
107
108
|
viewBox: "0 0 22 21",
|
|
108
109
|
fill: "none",
|
|
109
110
|
stroke: "currentColor",
|
|
@@ -123,7 +124,7 @@ function ShareGlyph() {
|
|
|
123
124
|
return /* @__PURE__ */ jsx(
|
|
124
125
|
"svg",
|
|
125
126
|
{
|
|
126
|
-
className: "youtube__glyph",
|
|
127
|
+
className: "zc-youtube__glyph",
|
|
127
128
|
viewBox: "0 0 22 20",
|
|
128
129
|
fill: "none",
|
|
129
130
|
stroke: "currentColor",
|
|
@@ -139,7 +140,7 @@ function RemixGlyph() {
|
|
|
139
140
|
return /* @__PURE__ */ jsxs(
|
|
140
141
|
"svg",
|
|
141
142
|
{
|
|
142
|
-
className: "youtube__glyph",
|
|
143
|
+
className: "zc-youtube__glyph",
|
|
143
144
|
viewBox: "0 0 22 22",
|
|
144
145
|
fill: "none",
|
|
145
146
|
stroke: "currentColor",
|
|
@@ -161,7 +162,7 @@ function ThumbUpGlyph() {
|
|
|
161
162
|
return /* @__PURE__ */ jsxs(
|
|
162
163
|
"svg",
|
|
163
164
|
{
|
|
164
|
-
className: "youtube__glyph",
|
|
165
|
+
className: "zc-youtube__glyph",
|
|
165
166
|
viewBox: "0 0 21 21",
|
|
166
167
|
fill: "none",
|
|
167
168
|
stroke: "currentColor",
|
|
@@ -180,7 +181,7 @@ function ThumbDownGlyph() {
|
|
|
180
181
|
return /* @__PURE__ */ jsxs(
|
|
181
182
|
"svg",
|
|
182
183
|
{
|
|
183
|
-
className: "youtube__glyph",
|
|
184
|
+
className: "zc-youtube__glyph",
|
|
184
185
|
viewBox: "0 0 21 21",
|
|
185
186
|
fill: "none",
|
|
186
187
|
stroke: "currentColor",
|
|
@@ -199,7 +200,7 @@ function ChevronLeftGlyph() {
|
|
|
199
200
|
return /* @__PURE__ */ jsx(
|
|
200
201
|
"svg",
|
|
201
202
|
{
|
|
202
|
-
className: "youtube__glyph",
|
|
203
|
+
className: "zc-youtube__glyph",
|
|
203
204
|
viewBox: "0 0 24 24",
|
|
204
205
|
fill: "none",
|
|
205
206
|
stroke: "currentColor",
|
|
@@ -216,7 +217,7 @@ function ChevronRightGlyph() {
|
|
|
216
217
|
return /* @__PURE__ */ jsx(
|
|
217
218
|
"svg",
|
|
218
219
|
{
|
|
219
|
-
className: "youtube__glyph",
|
|
220
|
+
className: "zc-youtube__glyph",
|
|
220
221
|
viewBox: "0 0 24 24",
|
|
221
222
|
fill: "none",
|
|
222
223
|
stroke: "currentColor",
|
|
@@ -233,7 +234,7 @@ function StackGlyph() {
|
|
|
233
234
|
return /* @__PURE__ */ jsxs(
|
|
234
235
|
"svg",
|
|
235
236
|
{
|
|
236
|
-
className: "youtube__glyph",
|
|
237
|
+
className: "zc-youtube__glyph",
|
|
237
238
|
viewBox: "0 0 24 24",
|
|
238
239
|
fill: "none",
|
|
239
240
|
stroke: "currentColor",
|
|
@@ -252,9 +253,9 @@ function isEmpty(source) {
|
|
|
252
253
|
return source === void 0 || source === null || source === false || source === "";
|
|
253
254
|
}
|
|
254
255
|
function Media({ source, className }) {
|
|
255
|
-
if (typeof source === "string") return /* @__PURE__ */ jsx("img", { className: cx("youtube__media", className), src: source, alt: "" });
|
|
256
|
-
if (!isEmpty(source)) return /* @__PURE__ */ jsx("div", { className: cx("youtube__media", className), children: source });
|
|
257
|
-
return /* @__PURE__ */ jsx("div", { className: cx("youtube__media", "youtube__placeholder", className) });
|
|
256
|
+
if (typeof source === "string") return /* @__PURE__ */ jsx("img", { className: cx("zc-youtube__media", className), src: source, alt: "" });
|
|
257
|
+
if (!isEmpty(source)) return /* @__PURE__ */ jsx("div", { className: cx("zc-youtube__media", className), children: source });
|
|
258
|
+
return /* @__PURE__ */ jsx("div", { className: cx("zc-youtube__media", "zc-youtube__placeholder", className) });
|
|
258
259
|
}
|
|
259
260
|
var PAGE_PROPERTY = "--youtube-carousel-page";
|
|
260
261
|
var DRAG_PROPERTY = "--youtube-carousel-drag";
|
|
@@ -359,18 +360,18 @@ function PostSurface({
|
|
|
359
360
|
}
|
|
360
361
|
};
|
|
361
362
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
362
|
-
/* @__PURE__ */ jsx("div", { className: "youtube-post__avatar", children: /* @__PURE__ */ jsx(Media, { source: avatar, className: "youtube__avatar-media" }) }),
|
|
363
|
-
/* @__PURE__ */ jsxs("div", { className: "youtube-post__body", children: [
|
|
364
|
-
/* @__PURE__ */ jsxs("p", { className: "youtube-post__head", children: [
|
|
365
|
-
/* @__PURE__ */ jsx("span", { className: "youtube-post__name", children: channel }),
|
|
366
|
-
/* @__PURE__ */ jsx("span", { className: "youtube-post__time", children: age })
|
|
363
|
+
/* @__PURE__ */ jsx("div", { className: "zc-youtube-post__avatar", children: /* @__PURE__ */ jsx(Media, { source: avatar, className: "zc-youtube__avatar-media" }) }),
|
|
364
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-youtube-post__body", children: [
|
|
365
|
+
/* @__PURE__ */ jsxs("p", { className: "zc-youtube-post__head", children: [
|
|
366
|
+
/* @__PURE__ */ jsx("span", { className: "zc-youtube-post__name", children: channel }),
|
|
367
|
+
/* @__PURE__ */ jsx("span", { className: "zc-youtube-post__time", children: age })
|
|
367
368
|
] }),
|
|
368
|
-
/* @__PURE__ */ jsx("p", { className: "youtube-post__text", children: text }),
|
|
369
|
-
/* @__PURE__ */ jsxs("div", { className: "youtube-post__carousel", ref: carouselRef, style: pageStyle(page), children: [
|
|
369
|
+
/* @__PURE__ */ jsx("p", { className: "zc-youtube-post__text", children: text }),
|
|
370
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-youtube-post__carousel", ref: carouselRef, style: pageStyle(page), children: [
|
|
370
371
|
/* @__PURE__ */ jsxs(
|
|
371
372
|
"div",
|
|
372
373
|
{
|
|
373
|
-
className: "youtube-post__viewport",
|
|
374
|
+
className: "zc-youtube-post__viewport",
|
|
374
375
|
ref: viewportRef,
|
|
375
376
|
role: "group",
|
|
376
377
|
"aria-roledescription": paged ? CAROUSEL_ROLE_DESCRIPTION : void 0,
|
|
@@ -379,10 +380,10 @@ function PostSurface({
|
|
|
379
380
|
onPointerDown: onGrab,
|
|
380
381
|
onKeyDown,
|
|
381
382
|
children: [
|
|
382
|
-
/* @__PURE__ */ jsx("div", { className: "youtube-post__strip", children: slides.map((slide, index) => /* @__PURE__ */ jsx(
|
|
383
|
+
/* @__PURE__ */ jsx("div", { className: "zc-youtube-post__strip", children: slides.map((slide, index) => /* @__PURE__ */ jsx(
|
|
383
384
|
"div",
|
|
384
385
|
{
|
|
385
|
-
className: "youtube-post__slide",
|
|
386
|
+
className: "zc-youtube-post__slide",
|
|
386
387
|
role: paged ? "group" : void 0,
|
|
387
388
|
"aria-roledescription": paged ? SLIDE_ROLE_DESCRIPTION : void 0,
|
|
388
389
|
"aria-label": paged ? slideLabel(index, slides.length) : void 0,
|
|
@@ -390,7 +391,7 @@ function PostSurface({
|
|
|
390
391
|
},
|
|
391
392
|
index
|
|
392
393
|
)) }),
|
|
393
|
-
paged && /* @__PURE__ */ jsx("span", { className: "youtube-post__stack", "aria-hidden": "true", children: /* @__PURE__ */ jsx(StackGlyph, {}) })
|
|
394
|
+
paged && /* @__PURE__ */ jsx("span", { className: "zc-youtube-post__stack", "aria-hidden": "true", children: /* @__PURE__ */ jsx(StackGlyph, {}) })
|
|
394
395
|
]
|
|
395
396
|
}
|
|
396
397
|
),
|
|
@@ -398,7 +399,7 @@ function PostSurface({
|
|
|
398
399
|
"button",
|
|
399
400
|
{
|
|
400
401
|
type: "button",
|
|
401
|
-
className: "youtube-post__arrow youtube-post__arrow--prev",
|
|
402
|
+
className: "zc-youtube-post__arrow zc-youtube-post__arrow--prev",
|
|
402
403
|
"aria-label": PREVIOUS_LABEL,
|
|
403
404
|
onClick: () => goTo(page - ONE_PAGE),
|
|
404
405
|
children: /* @__PURE__ */ jsx(ChevronLeftGlyph, {})
|
|
@@ -408,68 +409,68 @@ function PostSurface({
|
|
|
408
409
|
"button",
|
|
409
410
|
{
|
|
410
411
|
type: "button",
|
|
411
|
-
className: "youtube-post__arrow youtube-post__arrow--next",
|
|
412
|
+
className: "zc-youtube-post__arrow zc-youtube-post__arrow--next",
|
|
412
413
|
"aria-label": NEXT_LABEL,
|
|
413
414
|
onClick: () => goTo(page + ONE_PAGE),
|
|
414
415
|
children: /* @__PURE__ */ jsx(ChevronRightGlyph, {})
|
|
415
416
|
}
|
|
416
417
|
)
|
|
417
418
|
] }),
|
|
418
|
-
/* @__PURE__ */ jsxs("p", { className: "youtube-post__actions", children: [
|
|
419
|
-
/* @__PURE__ */ jsxs("span", { className: "youtube-post__action", children: [
|
|
419
|
+
/* @__PURE__ */ jsxs("p", { className: "zc-youtube-post__actions", children: [
|
|
420
|
+
/* @__PURE__ */ jsxs("span", { className: "zc-youtube-post__action", children: [
|
|
420
421
|
/* @__PURE__ */ jsx(
|
|
421
422
|
"button",
|
|
422
423
|
{
|
|
423
424
|
type: "button",
|
|
424
|
-
className: "youtube-button youtube-post__action-glyph youtube-post__action-glyph--thumb",
|
|
425
|
+
className: "zc-youtube-button zc-youtube-post__action-glyph zc-youtube-post__action-glyph--thumb",
|
|
425
426
|
"aria-label": LIKE_LABEL,
|
|
426
427
|
"aria-pressed": liked,
|
|
427
428
|
onClick: () => onLikedChange(!liked),
|
|
428
429
|
children: /* @__PURE__ */ jsx(ThumbUpGlyph, {})
|
|
429
430
|
}
|
|
430
431
|
),
|
|
431
|
-
/* @__PURE__ */ jsxs("span", { className: "youtube-post__action-count", children: [
|
|
432
|
-
/* @__PURE__ */ jsxs("span", { className: "youtube__sr", children: [
|
|
432
|
+
/* @__PURE__ */ jsxs("span", { className: "zc-youtube-post__action-count", children: [
|
|
433
|
+
/* @__PURE__ */ jsxs("span", { className: "zc-youtube__sr", children: [
|
|
433
434
|
LIKES_LABEL,
|
|
434
435
|
" "
|
|
435
436
|
] }),
|
|
436
437
|
compactCount(likes + (liked ? 1 : 0))
|
|
437
438
|
] })
|
|
438
439
|
] }),
|
|
439
|
-
/* @__PURE__ */ jsx("span", { className: "youtube-post__action youtube-post__action--dislike", children: /* @__PURE__ */ jsx(
|
|
440
|
+
/* @__PURE__ */ jsx("span", { className: "zc-youtube-post__action zc-youtube-post__action--dislike", children: /* @__PURE__ */ jsx(
|
|
440
441
|
"button",
|
|
441
442
|
{
|
|
442
443
|
type: "button",
|
|
443
|
-
className: "youtube-button youtube-post__action-glyph youtube-post__action-glyph--thumb",
|
|
444
|
+
className: "zc-youtube-button zc-youtube-post__action-glyph zc-youtube-post__action-glyph--thumb",
|
|
444
445
|
"aria-label": DISLIKE_LABEL,
|
|
445
446
|
"aria-pressed": disliked,
|
|
446
447
|
onClick: () => onDislikedChange(!disliked),
|
|
447
448
|
children: /* @__PURE__ */ jsx(ThumbDownGlyph, {})
|
|
448
449
|
}
|
|
449
450
|
) }),
|
|
450
|
-
/* @__PURE__ */ jsx("span", { className: "youtube-post__action youtube-post__action--share", children: /* @__PURE__ */ jsx(
|
|
451
|
+
/* @__PURE__ */ jsx("span", { className: "zc-youtube-post__action zc-youtube-post__action--share", children: /* @__PURE__ */ jsx(
|
|
451
452
|
"button",
|
|
452
453
|
{
|
|
453
454
|
type: "button",
|
|
454
|
-
className: "youtube-button youtube-post__action-glyph youtube-post__action-glyph--share",
|
|
455
|
+
className: "zc-youtube-button zc-youtube-post__action-glyph zc-youtube-post__action-glyph--share",
|
|
455
456
|
"aria-label": SHARE_LABEL,
|
|
456
457
|
onClick: () => onAction?.("share"),
|
|
457
458
|
children: /* @__PURE__ */ jsx(ShareGlyph, {})
|
|
458
459
|
}
|
|
459
460
|
) }),
|
|
460
|
-
/* @__PURE__ */ jsxs("span", { className: "youtube-post__action youtube-post__action--comment", children: [
|
|
461
|
+
/* @__PURE__ */ jsxs("span", { className: "zc-youtube-post__action zc-youtube-post__action--comment", children: [
|
|
461
462
|
/* @__PURE__ */ jsx(
|
|
462
463
|
"button",
|
|
463
464
|
{
|
|
464
465
|
type: "button",
|
|
465
|
-
className: "youtube-button youtube-post__action-glyph youtube-post__action-glyph--bubble",
|
|
466
|
+
className: "zc-youtube-button zc-youtube-post__action-glyph zc-youtube-post__action-glyph--bubble",
|
|
466
467
|
"aria-label": COMMENT_LABEL,
|
|
467
468
|
onClick: () => onAction?.("comment"),
|
|
468
469
|
children: /* @__PURE__ */ jsx(BubbleGlyph, {})
|
|
469
470
|
}
|
|
470
471
|
),
|
|
471
|
-
/* @__PURE__ */ jsxs("span", { className: "youtube-post__action-count", children: [
|
|
472
|
-
/* @__PURE__ */ jsxs("span", { className: "youtube__sr", children: [
|
|
472
|
+
/* @__PURE__ */ jsxs("span", { className: "zc-youtube-post__action-count", children: [
|
|
473
|
+
/* @__PURE__ */ jsxs("span", { className: "zc-youtube__sr", children: [
|
|
473
474
|
COMMENTS_LABEL,
|
|
474
475
|
" "
|
|
475
476
|
] }),
|
|
@@ -482,7 +483,7 @@ function PostSurface({
|
|
|
482
483
|
"button",
|
|
483
484
|
{
|
|
484
485
|
type: "button",
|
|
485
|
-
className: "youtube-button youtube-post__more",
|
|
486
|
+
className: "zc-youtube-button zc-youtube-post__more",
|
|
486
487
|
"aria-label": MENU_LABEL,
|
|
487
488
|
onClick: () => onAction?.("menu"),
|
|
488
489
|
children: /* @__PURE__ */ jsx(KebabGlyph, {})
|
|
@@ -521,20 +522,20 @@ function RailAction({
|
|
|
521
522
|
pressed,
|
|
522
523
|
onClick
|
|
523
524
|
}) {
|
|
524
|
-
return /* @__PURE__ */ jsxs("li", { className: "youtube-short__action", children: [
|
|
525
|
+
return /* @__PURE__ */ jsxs("li", { className: "zc-youtube-short__action", children: [
|
|
525
526
|
/* @__PURE__ */ jsx(
|
|
526
527
|
"button",
|
|
527
528
|
{
|
|
528
529
|
type: "button",
|
|
529
|
-
className: "youtube-button youtube-short__action-face",
|
|
530
|
+
className: "zc-youtube-button zc-youtube-short__action-face",
|
|
530
531
|
"aria-label": action,
|
|
531
532
|
"aria-pressed": pressed,
|
|
532
533
|
onClick,
|
|
533
534
|
children: glyph
|
|
534
535
|
}
|
|
535
536
|
),
|
|
536
|
-
/* @__PURE__ */ jsxs("span", { className: "youtube-short__action-label", children: [
|
|
537
|
-
count !== void 0 && /* @__PURE__ */ jsxs("span", { className: "youtube__sr", children: [
|
|
537
|
+
/* @__PURE__ */ jsxs("span", { className: "zc-youtube-short__action-label", children: [
|
|
538
|
+
count !== void 0 && /* @__PURE__ */ jsxs("span", { className: "zc-youtube__sr", children: [
|
|
538
539
|
name,
|
|
539
540
|
" "
|
|
540
541
|
] }),
|
|
@@ -558,36 +559,36 @@ function ShortSurface({
|
|
|
558
559
|
onAction
|
|
559
560
|
}) {
|
|
560
561
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
561
|
-
/* @__PURE__ */ jsxs("div", { className: "youtube-short__meta", children: [
|
|
562
|
-
/* @__PURE__ */ jsxs("div", { className: "youtube-short__account", children: [
|
|
563
|
-
/* @__PURE__ */ jsx("div", { className: "youtube-short__account-avatar", children: /* @__PURE__ */ jsx(Media, { source: avatar, className: "youtube__avatar-media" }) }),
|
|
564
|
-
/* @__PURE__ */ jsx("span", { className: "youtube-short__handle", children: channel })
|
|
562
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-youtube-short__meta", children: [
|
|
563
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-youtube-short__account", children: [
|
|
564
|
+
/* @__PURE__ */ jsx("div", { className: "zc-youtube-short__account-avatar", children: /* @__PURE__ */ jsx(Media, { source: avatar, className: "zc-youtube__avatar-media" }) }),
|
|
565
|
+
/* @__PURE__ */ jsx("span", { className: "zc-youtube-short__handle", children: channel })
|
|
565
566
|
] }),
|
|
566
|
-
/* @__PURE__ */ jsx("p", { className: "youtube-short__title", children: title })
|
|
567
|
+
/* @__PURE__ */ jsx("p", { className: "zc-youtube-short__title", children: title })
|
|
567
568
|
] }),
|
|
568
|
-
/* @__PURE__ */ jsxs("div", { className: "youtube-short__stage", children: [
|
|
569
|
-
/* @__PURE__ */ jsx("div", { className: "youtube-short__frame", children: /* @__PURE__ */ jsx(Media, { source: media }) }),
|
|
570
|
-
/* @__PURE__ */ jsxs("div", { className: "youtube-short__controls", children: [
|
|
569
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-youtube-short__stage", children: [
|
|
570
|
+
/* @__PURE__ */ jsx("div", { className: "zc-youtube-short__frame", children: /* @__PURE__ */ jsx(Media, { source: media }) }),
|
|
571
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-youtube-short__controls", children: [
|
|
571
572
|
/* @__PURE__ */ jsx(
|
|
572
573
|
"button",
|
|
573
574
|
{
|
|
574
575
|
type: "button",
|
|
575
|
-
className: "youtube-short__control",
|
|
576
|
+
className: "zc-youtube-short__control",
|
|
576
577
|
"aria-pressed": paused,
|
|
577
578
|
"aria-label": paused ? PLAY_LABEL : PAUSE_LABEL,
|
|
578
579
|
onClick: onTogglePaused,
|
|
579
580
|
children: paused ? /* @__PURE__ */ jsx(PlayGlyph, {}) : /* @__PURE__ */ jsx(PauseGlyph, {})
|
|
580
581
|
}
|
|
581
582
|
),
|
|
582
|
-
/* @__PURE__ */ jsx("span", { className: "youtube-short__control youtube-short__control--static", "aria-hidden": "true", children: /* @__PURE__ */ jsx(SpeakerGlyph, {}) })
|
|
583
|
+
/* @__PURE__ */ jsx("span", { className: "zc-youtube-short__control zc-youtube-short__control--static", "aria-hidden": "true", children: /* @__PURE__ */ jsx(SpeakerGlyph, {}) })
|
|
583
584
|
] }),
|
|
584
|
-
/* @__PURE__ */ jsxs("div", { className: "youtube-short__pill", children: [
|
|
585
|
-
/* @__PURE__ */ jsx("span", { className: "youtube-short__pill-cell", "aria-hidden": "true", children: /* @__PURE__ */ jsx("span", { className: "youtube-short__captions", children: CAPTIONS_LABEL }) }),
|
|
585
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-youtube-short__pill", children: [
|
|
586
|
+
/* @__PURE__ */ jsx("span", { className: "zc-youtube-short__pill-cell", "aria-hidden": "true", children: /* @__PURE__ */ jsx("span", { className: "zc-youtube-short__captions", children: CAPTIONS_LABEL }) }),
|
|
586
587
|
/* @__PURE__ */ jsx(
|
|
587
588
|
"button",
|
|
588
589
|
{
|
|
589
590
|
type: "button",
|
|
590
|
-
className: "youtube-button youtube-short__pill-cell",
|
|
591
|
+
className: "zc-youtube-button zc-youtube-short__pill-cell",
|
|
591
592
|
"aria-label": MENU_LABEL2,
|
|
592
593
|
onClick: () => onAction?.("menu"),
|
|
593
594
|
children: /* @__PURE__ */ jsx(KebabGlyph, {})
|
|
@@ -597,7 +598,7 @@ function ShortSurface({
|
|
|
597
598
|
"button",
|
|
598
599
|
{
|
|
599
600
|
type: "button",
|
|
600
|
-
className: "youtube-button youtube-short__pill-cell",
|
|
601
|
+
className: "zc-youtube-button zc-youtube-short__pill-cell",
|
|
601
602
|
"aria-label": EXPAND_LABEL,
|
|
602
603
|
onClick: () => onAction?.("expand"),
|
|
603
604
|
children: /* @__PURE__ */ jsx(ExpandGlyph, {})
|
|
@@ -607,17 +608,17 @@ function ShortSurface({
|
|
|
607
608
|
/* @__PURE__ */ jsx(
|
|
608
609
|
"div",
|
|
609
610
|
{
|
|
610
|
-
className: "youtube-short__progress",
|
|
611
|
+
className: "zc-youtube-short__progress",
|
|
611
612
|
role: "progressbar",
|
|
612
613
|
"aria-label": PROGRESS_LABEL,
|
|
613
614
|
"aria-valuemin": PROGRESS_MIN,
|
|
614
615
|
"aria-valuemax": PROGRESS_MAX,
|
|
615
616
|
"aria-valuenow": progressValue(progress),
|
|
616
|
-
children: /* @__PURE__ */ jsx("div", { className: "youtube-short__progress-fill", style: progressStyle(progress) })
|
|
617
|
+
children: /* @__PURE__ */ jsx("div", { className: "zc-youtube-short__progress-fill", style: progressStyle(progress) })
|
|
617
618
|
}
|
|
618
619
|
)
|
|
619
620
|
] }),
|
|
620
|
-
/* @__PURE__ */ jsxs("ul", { className: "youtube-short__rail", children: [
|
|
621
|
+
/* @__PURE__ */ jsxs("ul", { className: "zc-youtube-short__rail", children: [
|
|
621
622
|
/* @__PURE__ */ jsx(
|
|
622
623
|
RailAction,
|
|
623
624
|
{
|
|
@@ -658,7 +659,7 @@ function ShortSurface({
|
|
|
658
659
|
onClick: () => onAction?.("remix")
|
|
659
660
|
}
|
|
660
661
|
),
|
|
661
|
-
/* @__PURE__ */ jsx("li", { className: "youtube-short__rail-avatar", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Media, { source: avatar, className: "youtube__avatar-media" }) })
|
|
662
|
+
/* @__PURE__ */ jsx("li", { className: "zc-youtube-short__rail-avatar", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Media, { source: avatar, className: "zc-youtube__avatar-media" }) })
|
|
662
663
|
] })
|
|
663
664
|
] });
|
|
664
665
|
}
|
|
@@ -675,21 +676,21 @@ function VideoSurface({
|
|
|
675
676
|
onAction
|
|
676
677
|
}) {
|
|
677
678
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
678
|
-
/* @__PURE__ */ jsxs("div", { className: "youtube-video__frame", children: [
|
|
679
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-youtube-video__frame", children: [
|
|
679
680
|
/* @__PURE__ */ jsx(Media, { source: media }),
|
|
680
|
-
duration && /* @__PURE__ */ jsx("span", { className: "youtube-video__duration", children: duration })
|
|
681
|
+
duration && /* @__PURE__ */ jsx("span", { className: "zc-youtube-video__duration", children: duration })
|
|
681
682
|
] }),
|
|
682
|
-
/* @__PURE__ */ jsxs("div", { className: "youtube-video__meta", children: [
|
|
683
|
-
/* @__PURE__ */ jsx("div", { className: "youtube-video__avatar", children: /* @__PURE__ */ jsx(Media, { source: avatar, className: "youtube__avatar-media" }) }),
|
|
684
|
-
/* @__PURE__ */ jsxs("div", { className: "youtube-video__text", children: [
|
|
685
|
-
/* @__PURE__ */ jsx("h3", { className: "youtube-video__title", children: title }),
|
|
686
|
-
/* @__PURE__ */ jsxs("p", { className: "youtube-video__byline", children: [
|
|
687
|
-
/* @__PURE__ */ jsx("span", { className: "youtube-video__channel", children: channel }),
|
|
688
|
-
verified && /* @__PURE__ */ jsx("span", { className: "youtube-video__verified", children: /* @__PURE__ */ jsx(VerifiedGlyph, {}) })
|
|
683
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-youtube-video__meta", children: [
|
|
684
|
+
/* @__PURE__ */ jsx("div", { className: "zc-youtube-video__avatar", children: /* @__PURE__ */ jsx(Media, { source: avatar, className: "zc-youtube__avatar-media" }) }),
|
|
685
|
+
/* @__PURE__ */ jsxs("div", { className: "zc-youtube-video__text", children: [
|
|
686
|
+
/* @__PURE__ */ jsx("h3", { className: "zc-youtube-video__title", children: title }),
|
|
687
|
+
/* @__PURE__ */ jsxs("p", { className: "zc-youtube-video__byline", children: [
|
|
688
|
+
/* @__PURE__ */ jsx("span", { className: "zc-youtube-video__channel", children: channel }),
|
|
689
|
+
verified && /* @__PURE__ */ jsx("span", { className: "zc-youtube-video__verified", children: /* @__PURE__ */ jsx(VerifiedGlyph, {}) })
|
|
689
690
|
] }),
|
|
690
|
-
/* @__PURE__ */ jsxs("p", { className: "youtube-video__stats", children: [
|
|
691
|
+
/* @__PURE__ */ jsxs("p", { className: "zc-youtube-video__stats", children: [
|
|
691
692
|
views,
|
|
692
|
-
/* @__PURE__ */ jsx("span", { className: "youtube-video__dot", "aria-hidden": "true", children: "\u2022" }),
|
|
693
|
+
/* @__PURE__ */ jsx("span", { className: "zc-youtube-video__dot", "aria-hidden": "true", children: "\u2022" }),
|
|
693
694
|
age
|
|
694
695
|
] })
|
|
695
696
|
] }),
|
|
@@ -697,7 +698,7 @@ function VideoSurface({
|
|
|
697
698
|
"button",
|
|
698
699
|
{
|
|
699
700
|
type: "button",
|
|
700
|
-
className: "youtube-button youtube-video__more",
|
|
701
|
+
className: "zc-youtube-button zc-youtube-video__more",
|
|
701
702
|
"aria-label": MENU_LABEL3,
|
|
702
703
|
onClick: () => onAction?.("menu"),
|
|
703
704
|
children: /* @__PURE__ */ jsx(KebabGlyph, {})
|
|
@@ -707,9 +708,9 @@ function VideoSurface({
|
|
|
707
708
|
] });
|
|
708
709
|
}
|
|
709
710
|
var SURFACE_CLASS = {
|
|
710
|
-
video: "youtube--video",
|
|
711
|
-
short: "youtube--short",
|
|
712
|
-
post: "youtube--post"
|
|
711
|
+
video: "zc-youtube--video",
|
|
712
|
+
short: "zc-youtube--short",
|
|
713
|
+
post: "zc-youtube--post"
|
|
713
714
|
};
|
|
714
715
|
var EMPTY_TEXT = "";
|
|
715
716
|
var NO_COUNT = 0;
|
|
@@ -754,7 +755,7 @@ function YouTube({
|
|
|
754
755
|
const [liked, setLiked] = useControllable(controlledLiked, defaultLiked, onLikedChange);
|
|
755
756
|
const [disliked, setDisliked] = useControllable(controlledDisliked, defaultDisliked, onDislikedChange);
|
|
756
757
|
const slides = carousel && carousel.length ? carousel : [media];
|
|
757
|
-
return /* @__PURE__ */ jsxs("article", { className: cx("youtube", SURFACE_CLASS[surface], className), style, ...htmlProps, children: [
|
|
758
|
+
return /* @__PURE__ */ jsxs("article", { className: cx("zc-youtube", SURFACE_CLASS[surface], className), style, ...htmlProps, children: [
|
|
758
759
|
surface === "video" && /* @__PURE__ */ jsx(
|
|
759
760
|
VideoSurface,
|
|
760
761
|
{
|