@zyncat/ui 0.10.0 → 0.12.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 +135 -40
- package/dist/alert.css +126 -121
- package/dist/alert.js +12 -14
- package/dist/alert.js.map +1 -1
- package/dist/avatar-group.js.map +1 -1
- package/dist/avatar.css +179 -174
- package/dist/avatar.js.map +1 -1
- package/dist/badge.css +166 -160
- package/dist/badge.js +1 -1
- package/dist/button.css +272 -246
- package/dist/button.js +1 -1
- package/dist/checkbox.css +158 -153
- package/dist/checkbox.js +2 -2
- package/dist/{chunk-UXONUUPI.js → chunk-227ZW4V7.js} +40 -32
- package/dist/chunk-227ZW4V7.js.map +1 -0
- package/dist/{chunk-2ERBBFZS.js → chunk-3MPF7FZV.js} +2 -2
- package/dist/chunk-3MPF7FZV.js.map +1 -0
- package/dist/{chunk-OMHQ4U4J.js → chunk-43M6GQ4Q.js} +86 -79
- package/dist/chunk-43M6GQ4Q.js.map +1 -0
- package/dist/{chunk-7SZCJ7WI.js → chunk-45R4Z5XN.js} +3 -3
- package/dist/chunk-45R4Z5XN.js.map +1 -0
- package/dist/{chunk-I4XQ4PV2.js → chunk-4BSHB7R3.js} +9 -7
- package/dist/chunk-4BSHB7R3.js.map +1 -0
- package/dist/{chunk-YGGCQNNU.js → chunk-4C5RZXBT.js} +33 -34
- package/dist/chunk-4C5RZXBT.js.map +1 -0
- package/dist/{chunk-2QWJ6FAX.js → chunk-5PZ43DCG.js} +31 -15
- package/dist/chunk-5PZ43DCG.js.map +1 -0
- package/dist/{chunk-S5ZTZANS.js → chunk-7IZJERGA.js} +35 -12
- package/dist/chunk-7IZJERGA.js.map +1 -0
- package/dist/{chunk-ZCOUPPTI.js → chunk-A5WTZACK.js} +22 -12
- package/dist/chunk-A5WTZACK.js.map +1 -0
- package/dist/{chunk-64UU4LGU.js → chunk-AADAJL7D.js} +3 -3
- package/dist/{chunk-64UU4LGU.js.map → chunk-AADAJL7D.js.map} +1 -1
- package/dist/{chunk-FTOAUJL5.js → chunk-CF4QHO4N.js} +21 -11
- package/dist/chunk-CF4QHO4N.js.map +1 -0
- package/dist/{chunk-WM5J5TDI.js → chunk-CNWTIMIP.js} +13 -17
- package/dist/chunk-CNWTIMIP.js.map +1 -0
- package/dist/{chunk-356HZMT4.js → chunk-DDRSMHN4.js} +31 -22
- package/dist/chunk-DDRSMHN4.js.map +1 -0
- package/dist/{chunk-VTJTGVZZ.js → chunk-DMX2F6B4.js} +2 -2
- package/dist/chunk-DMX2F6B4.js.map +1 -0
- package/dist/{chunk-3SBCBYB7.js → chunk-EAI4POPB.js} +2 -2
- package/dist/{chunk-3SBCBYB7.js.map → chunk-EAI4POPB.js.map} +1 -1
- package/dist/{chunk-Y7AJQVWJ.js → chunk-EF6RPXU7.js} +17 -15
- package/dist/chunk-EF6RPXU7.js.map +1 -0
- package/dist/{chunk-K5X2GCXU.js → chunk-FONOS5RN.js} +14 -15
- package/dist/chunk-FONOS5RN.js.map +1 -0
- package/dist/{chunk-PMECHR3A.js → chunk-FQEHSKEI.js} +2 -2
- package/dist/chunk-FQEHSKEI.js.map +1 -0
- package/dist/chunk-HDSFWZ7L.js +12 -0
- package/dist/chunk-HDSFWZ7L.js.map +1 -0
- package/dist/{chunk-2F5PITAO.js → chunk-HY5MPISE.js} +2 -2
- package/dist/chunk-HY5MPISE.js.map +1 -0
- package/dist/{chunk-QDK66S4G.js → chunk-I45AU6KH.js} +3 -3
- package/dist/chunk-I45AU6KH.js.map +1 -0
- package/dist/{chunk-YGCVWGUG.js → chunk-IJS7TPGV.js} +153 -46
- package/dist/chunk-IJS7TPGV.js.map +1 -0
- package/dist/{chunk-62P3KD57.js → chunk-IUQAUBVM.js} +18 -11
- package/dist/chunk-IUQAUBVM.js.map +1 -0
- package/dist/chunk-JY6A2ZJZ.js +44 -0
- package/dist/chunk-JY6A2ZJZ.js.map +1 -0
- package/dist/{chunk-XWUWYSCT.js → chunk-M43IOM5C.js} +20 -10
- package/dist/chunk-M43IOM5C.js.map +1 -0
- package/dist/{chunk-S7B34VGN.js → chunk-OWNMRMPN.js} +3 -3
- package/dist/{chunk-S7B34VGN.js.map → chunk-OWNMRMPN.js.map} +1 -1
- package/dist/chunk-RFRE4WKX.js +22 -0
- package/dist/chunk-RFRE4WKX.js.map +1 -0
- package/dist/{chunk-NNXJCLTV.js → chunk-RJFGWJ4W.js} +2 -2
- package/dist/chunk-RJFGWJ4W.js.map +1 -0
- package/dist/{chunk-NEF5XAHG.js → chunk-TUTXXC3W.js} +4 -4
- package/dist/chunk-TUTXXC3W.js.map +1 -0
- package/dist/chunk-TVYH4AN7.js +70 -0
- package/dist/chunk-TVYH4AN7.js.map +1 -0
- package/dist/{chunk-RCONNA7I.js → chunk-VAXCXZ53.js} +34 -22
- package/dist/chunk-VAXCXZ53.js.map +1 -0
- package/dist/chunk-XNIYSAMJ.js +52 -0
- package/dist/chunk-XNIYSAMJ.js.map +1 -0
- package/dist/{chunk-CONSWNIV.js → chunk-Y2YA7QRF.js} +6 -6
- package/dist/chunk-Y2YA7QRF.js.map +1 -0
- package/dist/cli.js +1809 -0
- package/dist/collapse.css +70 -61
- package/dist/collapse.js +2 -2
- package/dist/confetti.css +45 -0
- package/dist/confetti.js +540 -0
- package/dist/confetti.js.map +1 -0
- package/dist/count-badge.js +3 -3
- package/dist/count-badge.js.map +1 -1
- package/dist/date-field.js +24 -19
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +563 -559
- package/dist/date-range-field.js +58 -41
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +24 -19
- package/dist/datetime-field.js.map +1 -1
- package/dist/dialog.css +176 -172
- package/dist/dialog.js +30 -19
- package/dist/dialog.js.map +1 -1
- package/dist/digit-strip.css +65 -0
- package/dist/dropdown.css +65 -0
- package/dist/dropdown.js +350 -0
- package/dist/dropdown.js.map +1 -0
- package/dist/emoji-picker.js +713 -0
- package/dist/emoji-picker.js.map +1 -0
- package/dist/facebook-feed.css +880 -0
- package/dist/facebook-feed.js +697 -0
- package/dist/facebook-feed.js.map +1 -0
- package/dist/flow-field.css +49 -0
- package/dist/flow-field.js +269 -0
- package/dist/flow-field.js.map +1 -0
- package/dist/glide.js +3 -3
- package/dist/icon.css +34 -30
- package/dist/input.css +296 -318
- package/dist/instagram-feed.css +378 -0
- package/dist/instagram-feed.js +272 -0
- package/dist/instagram-feed.js.map +1 -0
- package/dist/lens.css +119 -0
- package/dist/lens.js +307 -0
- package/dist/lens.js.map +1 -0
- package/dist/mcp.js +379 -184
- package/dist/menu-surface.css +127 -0
- package/dist/modal.css +11 -7
- package/dist/modal.js +24 -17
- package/dist/modal.js.map +1 -1
- package/dist/morphing-text.css +84 -0
- package/dist/morphing-text.js +256 -0
- package/dist/morphing-text.js.map +1 -0
- package/dist/motion-devtools.css +237 -233
- package/dist/motion-devtools.js +7 -6
- package/dist/motion-devtools.js.map +1 -1
- package/dist/motion-tokens.js +1 -1
- package/dist/multi-select.js +20 -17
- package/dist/multi-select.js.map +1 -1
- package/dist/number-field.js +11 -7
- package/dist/number-field.js.map +1 -1
- package/dist/odometer.css +58 -59
- package/dist/odometer.js +109 -0
- package/dist/odometer.js.map +1 -0
- package/dist/otp-field.js.map +1 -1
- package/dist/overlay.css +24 -20
- package/dist/pagination.css +42 -38
- package/dist/pagination.js +6 -12
- package/dist/pagination.js.map +1 -1
- package/dist/popover.css +69 -65
- package/dist/popover.js +12 -10
- package/dist/radio-group.css +275 -276
- package/dist/radio-group.js +70 -95
- package/dist/radio-group.js.map +1 -1
- package/dist/select.css +291 -386
- package/dist/select.js +18 -15
- package/dist/select.js.map +1 -1
- package/dist/sheet.css +47 -23
- package/dist/sheet.js +11 -10
- package/dist/status-badge.js +3 -3
- package/dist/status-badge.js.map +1 -1
- package/dist/styles.css +221 -0
- package/dist/support-rail.css +421 -0
- package/dist/support-rail.js +243 -0
- package/dist/support-rail.js.map +1 -0
- package/dist/table.css +333 -323
- package/dist/table.js +32 -21
- package/dist/table.js.map +1 -1
- package/dist/tabs.css +163 -156
- package/dist/tabs.js +26 -20
- package/dist/tabs.js.map +1 -1
- package/dist/tag.css +209 -231
- package/dist/tag.js +11 -10
- package/dist/tag.js.map +1 -1
- package/dist/text-field.js +7 -67
- package/dist/text-field.js.map +1 -1
- package/dist/textarea.css +205 -211
- package/dist/textarea.js +12 -12
- package/dist/textarea.js.map +1 -1
- package/dist/theme.js +69 -0
- package/dist/theme.js.map +1 -0
- package/dist/tiktok.css +662 -0
- package/dist/tiktok.js +494 -0
- package/dist/tiktok.js.map +1 -0
- package/dist/time-field.js +6 -6
- package/dist/time-field.js.map +1 -1
- package/dist/toast.css +237 -233
- package/dist/toast.js +43 -47
- package/dist/toast.js.map +1 -1
- package/dist/toggle-tag.js +1 -1
- package/dist/toggle-tag.js.map +1 -1
- package/dist/toggle.css +139 -135
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.css +79 -78
- package/dist/tooltip.js +50 -60
- package/dist/tooltip.js.map +1 -1
- package/dist/trigger.css +13 -0
- package/dist/{alert.d.ts → types/components/composites/alert/Alert.d.ts} +13 -15
- package/dist/{date-field.d.ts → types/components/composites/date-picker/DateField.d.ts} +4 -10
- package/dist/types/components/composites/date-picker/DateRangeField.d.ts +21 -0
- package/dist/{datetime-field.d.ts → types/components/composites/date-picker/DateTimeField.d.ts} +4 -10
- package/dist/{time-field.d.ts → types/components/composites/date-picker/TimeField.d.ts} +5 -11
- package/dist/types/components/composites/date-picker/calendar-panel.d.ts +16 -0
- package/dist/types/components/composites/date-picker/date-utils.d.ts +12 -0
- package/dist/types/components/composites/date-picker/field-shell.d.ts +46 -0
- package/dist/types/components/composites/date-picker/range-panel.d.ts +24 -0
- package/dist/types/components/composites/date-picker/time-core.d.ts +14 -0
- package/dist/types/components/composites/date-picker/use-day-focus.d.ts +2 -0
- package/dist/{dialog.d.ts → types/components/composites/dialog/Dialog.d.ts} +10 -11
- package/dist/types/components/composites/dropdown/Dropdown.d.ts +37 -0
- package/dist/types/components/composites/dropdown/menu-panel.d.ts +7 -0
- package/dist/types/components/composites/dropdown/types.d.ts +71 -0
- package/dist/types/components/composites/emoji-picker/EmojiPickerPanel.d.ts +45 -0
- package/dist/types/components/composites/emoji-picker/category-icons.d.ts +9 -0
- package/dist/types/components/composites/emoji-picker/data.d.ts +33 -0
- package/dist/types/components/composites/emoji-picker/dom.d.ts +19 -0
- package/dist/types/components/composites/emoji-picker/getEmojiUrl.d.ts +2 -0
- package/dist/types/components/composites/emoji-picker/navigation.d.ts +7 -0
- package/dist/types/components/composites/emoji-picker/picker.d.ts +20 -0
- package/dist/types/components/composites/emoji-picker/react/category-bar.d.ts +6 -0
- package/dist/types/components/composites/emoji-picker/react/useEmojiPicker.d.ts +50 -0
- package/dist/types/components/composites/emoji-picker/scaffold.d.ts +8 -0
- package/dist/types/components/composites/emoji-picker/search.d.ts +1 -0
- package/dist/types/components/composites/emoji-picker/types.d.ts +13 -0
- package/dist/{modal.d.ts → types/components/composites/modal/Modal.d.ts} +10 -11
- package/dist/{pagination.d.ts → types/components/composites/pagination/Pagination.d.ts} +5 -8
- package/dist/{popover.d.ts → types/components/composites/popover/Popover.d.ts} +11 -14
- package/dist/{multi-select.d.ts → types/components/composites/select/MultiSelect.d.ts} +12 -11
- package/dist/{select.d.ts → types/components/composites/select/Select.d.ts} +16 -14
- package/dist/types/components/composites/select/core/index.d.ts +4 -0
- package/dist/types/components/composites/select/core/menu.d.ts +13 -0
- package/dist/types/components/composites/select/core/panel.d.ts +18 -0
- package/dist/types/components/composites/select/core/trigger.d.ts +16 -0
- package/dist/{types-SGMShK7R.d.ts → types/components/composites/select/core/types.d.ts} +13 -6
- package/dist/types/components/composites/select/core/use-listbox.d.ts +42 -0
- package/dist/{sheet.d.ts → types/components/composites/sheet/Sheet.d.ts} +10 -11
- package/dist/types/components/composites/sheet/use-sheet-drag.d.ts +13 -0
- package/dist/{table.d.ts → types/components/composites/table/Table.d.ts} +12 -12
- package/dist/{tabs.d.ts → types/components/composites/tabs/Tabs.d.ts} +13 -13
- package/dist/types/components/composites/toast/Toast.d.ts +10 -0
- package/dist/{toast-store.d.ts → types/components/composites/toast/toast-store.d.ts} +12 -14
- package/dist/{tooltip.d.ts → types/components/composites/tooltip/Tooltip.d.ts} +6 -10
- package/dist/types/components/composites/tooltip/tooltip-host.d.ts +1 -0
- package/dist/types/components/composites/tooltip/tooltip-store.d.ts +29 -0
- package/dist/types/components/compound/support-rail/SupportRail.d.ts +41 -0
- package/dist/types/components/dev/MotionDevtools.d.ts +24 -0
- package/dist/types/components/dev/slowmo-engine.d.ts +27 -0
- package/dist/types/components/expressive/confetti/Confetti.d.ts +43 -0
- package/dist/types/components/expressive/facebook-feed/FacebookFeed.d.ts +73 -0
- package/dist/types/components/expressive/facebook-feed/chrome.d.ts +30 -0
- package/dist/types/components/expressive/facebook-feed/icons.d.ts +21 -0
- package/dist/types/components/expressive/facebook-feed/post.d.ts +25 -0
- package/dist/types/components/expressive/facebook-feed/reel.d.ts +26 -0
- package/dist/types/components/expressive/facebook-feed/story.d.ts +20 -0
- package/dist/types/components/expressive/flow-field/FlowField.d.ts +23 -0
- package/dist/types/components/expressive/instagram-feed/InstagramFeed.d.ts +59 -0
- package/dist/types/components/expressive/lens/Lens.d.ts +23 -0
- package/dist/types/components/expressive/morphing-text/MorphingText.d.ts +21 -0
- package/dist/types/components/expressive/odometer/Odometer.d.ts +21 -0
- package/dist/types/components/expressive/tiktok/TikTok.d.ts +85 -0
- package/dist/types/components/expressive/tiktok/glyphs.d.ts +40 -0
- package/dist/types/components/expressive/typing-lines/TypingLines.d.ts +25 -0
- package/dist/types/components/expressive/weight-field/WeightField.d.ts +19 -0
- package/dist/types/components/expressive/youtube/YouTube.d.ts +73 -0
- package/dist/types/components/expressive/youtube/format.d.ts +2 -0
- package/dist/types/components/expressive/youtube/glyphs.d.ts +16 -0
- package/dist/types/components/expressive/youtube/media.d.ts +8 -0
- package/dist/types/components/expressive/youtube/post.d.ts +19 -0
- package/dist/types/components/expressive/youtube/short.d.ts +18 -0
- package/dist/types/components/expressive/youtube/video.d.ts +14 -0
- package/dist/types/components/internal/collection/collection.d.ts +19 -0
- package/dist/types/components/internal/glass/glint.d.ts +1 -0
- package/dist/types/components/internal/hooks/use-controllable.d.ts +1 -0
- package/dist/types/components/internal/hooks/use-media-query.d.ts +1 -0
- package/dist/types/components/internal/hooks/use-scroll-edges.d.ts +10 -0
- package/dist/types/components/internal/hooks/use-typeahead.d.ts +5 -0
- package/dist/types/components/internal/icon/Icon.d.ts +33 -0
- package/dist/types/components/internal/icon/IconSlot.d.ts +7 -0
- package/dist/types/components/internal/menu/menu-row.d.ts +11 -0
- package/dist/types/components/internal/overlay/focus.d.ts +8 -0
- package/dist/types/components/internal/overlay/layer.d.ts +38 -0
- package/dist/types/components/internal/overlay/modal.d.ts +18 -0
- package/dist/types/components/internal/overlay/position.d.ts +14 -0
- package/dist/types/components/internal/support/types.d.ts +15 -0
- package/dist/types/components/internal/utils/activation.d.ts +23 -0
- package/dist/types/components/internal/utils/cx.d.ts +1 -0
- package/dist/types/components/internal/utils/token-px.d.ts +1 -0
- package/dist/{avatar.d.ts → types/components/primitives/avatar/Avatar.d.ts} +10 -12
- package/dist/{avatar-group.d.ts → types/components/primitives/avatar/AvatarGroup.d.ts} +7 -9
- package/dist/{badge.d.ts → types/components/primitives/badge/Badge.d.ts} +8 -10
- package/dist/types/components/primitives/badge/CountBadge.d.ts +8 -0
- package/dist/types/components/primitives/badge/StatusBadge.d.ts +15 -0
- package/dist/types/components/primitives/badge/digit-strip.d.ts +5 -0
- package/dist/{button.d.ts → types/components/primitives/button/Button.d.ts} +6 -8
- package/dist/{checkbox.d.ts → types/components/primitives/checkbox/Checkbox.d.ts} +6 -8
- package/dist/types/components/primitives/checkbox/check-glyph.d.ts +6 -0
- package/dist/{collapse.d.ts → types/components/primitives/collapse/Collapse.d.ts} +12 -13
- package/dist/types/components/primitives/collapse/collapse.typecheck.d.ts +2 -0
- package/dist/{number-field.d.ts → types/components/primitives/input/NumberField.d.ts} +7 -9
- package/dist/{otp-field.d.ts → types/components/primitives/input/OtpField.d.ts} +6 -8
- package/dist/{text-field.d.ts → types/components/primitives/input/TextField.d.ts} +7 -9
- package/dist/types/components/primitives/input/field-chrome.d.ts +45 -0
- package/dist/{radio-group.d.ts → types/components/primitives/radio-group/RadioGroup.d.ts} +8 -10
- package/dist/{tag.d.ts → types/components/primitives/tag/Tag.d.ts} +9 -12
- package/dist/{toggle-tag.d.ts → types/components/primitives/tag/ToggleTag.d.ts} +7 -8
- package/dist/{textarea.d.ts → types/components/primitives/textarea/Textarea.d.ts} +7 -9
- package/dist/{toggle.d.ts → types/components/primitives/toggle/Toggle.d.ts} +6 -8
- package/dist/{dom-props-C0jrllBw.d.ts → types/dom-props.d.ts} +1 -3
- package/dist/types/engine/animate.d.ts +30 -0
- package/dist/types/engine/drag.d.ts +17 -0
- package/dist/types/engine/ease.d.ts +15 -0
- package/dist/types/engine/flip.d.ts +18 -0
- package/dist/types/engine/index.d.ts +4 -0
- package/dist/types/engine/loop.d.ts +9 -0
- package/dist/types/motion/element.d.ts +17 -0
- package/dist/types/motion/flip.d.ts +4 -0
- package/dist/types/motion/glide.d.ts +11 -0
- package/dist/types/motion/motion-timing.d.ts +16 -0
- package/dist/types/motion/presence-context.d.ts +11 -0
- package/dist/types/motion/presence.d.ts +12 -0
- package/dist/types/motion/presets.d.ts +6 -0
- package/dist/{timing-7JA_zQHP.d.ts → types/motion/timing.d.ts} +9 -9
- package/dist/types/motion/use-motion.d.ts +17 -0
- package/dist/types/tokens/component-styles.generated.d.ts +262 -0
- package/dist/{motion-scale-Canq4stZ.d.ts → types/tokens/motion-scale.d.ts} +4 -4
- package/dist/{motion-tokens.d.ts → types/tokens/motion-tokens.d.ts} +9 -9
- package/dist/types/tokens/theme-tokens.generated.d.ts +1249 -0
- package/dist/types/tokens/theme.d.ts +12 -0
- package/dist/typing-lines.css +92 -0
- package/dist/typing-lines.js +139 -0
- package/dist/typing-lines.js.map +1 -0
- package/dist/weight-field.css +84 -0
- package/dist/weight-field.js +17 -0
- package/dist/weight-field.js.map +1 -0
- package/dist/youtube.css +611 -0
- package/dist/youtube.js +814 -0
- package/dist/youtube.js.map +1 -0
- package/package.json +155 -49
- package/skills/zyncat-ui/SKILL.md +95 -0
- package/skills/zyncat-ui/references/components.md +85 -0
- package/skills/zyncat-ui/references/recipes.md +171 -0
- package/skills/zyncat-ui/references/theming.md +83 -0
- package/src/components/composites/alert/Alert.tsx +13 -11
- package/src/components/composites/alert/Alert.usage.md +15 -0
- package/src/components/composites/alert/alert.css +126 -121
- package/src/components/composites/date-picker/DateField.tsx +7 -2
- package/src/components/composites/date-picker/DateField.usage.md +10 -0
- package/src/components/composites/date-picker/DateRangeField.tsx +18 -16
- package/src/components/composites/date-picker/DateRangeField.usage.md +10 -0
- package/src/components/composites/date-picker/DateTimeField.tsx +10 -5
- package/src/components/composites/date-picker/DateTimeField.usage.md +12 -0
- package/src/components/composites/date-picker/TimeField.tsx +3 -1
- package/src/components/composites/date-picker/TimeField.usage.md +12 -0
- package/src/components/composites/date-picker/calendar-panel.tsx +15 -10
- package/src/components/composites/date-picker/date-picker.css +563 -559
- package/src/components/composites/date-picker/field-shell.tsx +9 -3
- package/src/components/composites/date-picker/range-panel.tsx +23 -8
- package/src/components/composites/date-picker/time-core.tsx +2 -0
- package/src/components/composites/dialog/Dialog.tsx +30 -15
- package/src/components/composites/dialog/Dialog.usage.md +17 -0
- package/src/components/composites/dialog/dialog.css +176 -172
- package/src/components/composites/dropdown/Dropdown.tsx +184 -0
- package/src/components/composites/dropdown/Dropdown.usage.md +19 -0
- package/src/components/composites/dropdown/dropdown.css +65 -0
- package/src/components/composites/dropdown/menu-panel.tsx +255 -0
- package/src/components/composites/dropdown/types.ts +95 -0
- package/src/components/composites/emoji-picker/EmojiPickerPanel.tsx +153 -0
- package/src/components/composites/emoji-picker/EmojiPickerPanel.usage.md +26 -0
- package/src/components/composites/emoji-picker/category-icons.ts +29 -0
- package/src/components/composites/emoji-picker/data.ts +83 -0
- package/src/components/composites/emoji-picker/dom.ts +79 -0
- package/src/components/composites/emoji-picker/getEmojiUrl.ts +17 -0
- package/src/components/composites/emoji-picker/navigation.ts +86 -0
- package/src/components/composites/emoji-picker/picker.ts +169 -0
- package/src/components/composites/emoji-picker/react/category-bar.tsx +77 -0
- package/src/components/composites/emoji-picker/react/useEmojiPicker.ts +139 -0
- package/src/components/composites/emoji-picker/scaffold.ts +74 -0
- package/src/components/composites/emoji-picker/search.ts +79 -0
- package/src/components/composites/emoji-picker/styles.css +221 -0
- package/src/components/composites/emoji-picker/types.ts +14 -0
- package/src/components/composites/modal/Modal.tsx +24 -13
- package/src/components/composites/modal/Modal.usage.md +24 -0
- package/src/components/composites/modal/modal.css +11 -7
- package/src/components/composites/pagination/Pagination.tsx +6 -11
- package/src/components/composites/pagination/Pagination.usage.md +12 -0
- package/src/components/composites/pagination/pagination.css +42 -38
- package/src/components/composites/popover/Popover.tsx +22 -7
- package/src/components/composites/popover/Popover.usage.md +15 -0
- package/src/components/composites/popover/popover.css +69 -65
- package/src/components/composites/select/MultiSelect.tsx +13 -5
- package/src/components/composites/select/MultiSelect.usage.md +12 -0
- package/src/components/composites/select/Select.tsx +23 -7
- package/src/components/composites/select/Select.usage.md +20 -0
- package/src/components/composites/select/core/index.ts +1 -1
- package/src/components/composites/select/core/menu.tsx +8 -6
- package/src/components/composites/select/core/panel.tsx +25 -26
- package/src/components/composites/select/core/trigger.tsx +36 -24
- package/src/components/composites/select/core/types.ts +17 -15
- package/src/components/composites/select/core/use-listbox.ts +22 -21
- package/src/components/composites/select/select.css +291 -386
- package/src/components/composites/sheet/Sheet.tsx +28 -18
- package/src/components/composites/sheet/Sheet.usage.md +15 -0
- package/src/components/composites/sheet/sheet.css +47 -23
- package/src/components/composites/sheet/use-sheet-drag.ts +19 -15
- package/src/components/composites/table/Table.tsx +17 -6
- package/src/components/composites/table/Table.usage.md +19 -0
- package/src/components/composites/table/table.css +333 -323
- package/src/components/composites/tabs/Tabs.tsx +31 -23
- package/src/components/composites/tabs/Tabs.usage.md +13 -0
- package/src/components/composites/tabs/tabs.css +163 -156
- package/src/components/composites/toast/Toast.tsx +48 -51
- package/src/components/composites/toast/Toast.usage.md +23 -0
- package/src/components/composites/toast/toast-store.usage.md +16 -0
- package/src/components/composites/toast/toast.css +237 -233
- package/src/components/composites/tooltip/Tooltip.tsx +13 -8
- package/src/components/composites/tooltip/Tooltip.usage.md +14 -0
- package/src/components/composites/tooltip/tooltip-host.tsx +29 -61
- package/src/components/composites/tooltip/tooltip-store.ts +10 -0
- package/src/components/composites/tooltip/tooltip.css +79 -78
- package/src/components/compound/support-rail/SupportRail.tsx +343 -0
- package/src/components/compound/support-rail/SupportRail.usage.md +18 -0
- package/src/components/compound/support-rail/support-rail.css +421 -0
- package/src/components/dev/MotionDevtools.tsx +3 -1
- package/src/components/dev/MotionDevtools.usage.md +16 -0
- package/src/components/dev/motion-devtools.css +237 -233
- package/src/components/expressive/confetti/Confetti.tsx +727 -0
- package/src/components/expressive/confetti/Confetti.usage.md +18 -0
- package/src/components/expressive/confetti/confetti.css +45 -0
- package/src/components/expressive/facebook-feed/FacebookFeed.tsx +200 -0
- package/src/components/expressive/facebook-feed/FacebookFeed.usage.md +18 -0
- package/src/components/expressive/facebook-feed/chrome.tsx +120 -0
- package/src/components/expressive/facebook-feed/facebook-feed.css +880 -0
- package/src/components/expressive/facebook-feed/icons.tsx +145 -0
- package/src/components/expressive/facebook-feed/post.tsx +213 -0
- package/src/components/expressive/facebook-feed/reel.tsx +199 -0
- package/src/components/expressive/facebook-feed/story.tsx +132 -0
- package/src/components/expressive/flow-field/FlowField.tsx +348 -0
- package/src/components/expressive/flow-field/FlowField.usage.md +19 -0
- package/src/components/expressive/flow-field/flow-field.css +49 -0
- package/src/components/expressive/instagram-feed/InstagramFeed.tsx +374 -0
- package/src/components/expressive/instagram-feed/InstagramFeed.usage.md +18 -0
- package/src/components/expressive/instagram-feed/instagram-feed.css +378 -0
- package/src/components/expressive/lens/Lens.tsx +415 -0
- package/src/components/expressive/lens/Lens.usage.md +20 -0
- package/src/components/expressive/lens/lens.css +119 -0
- package/src/components/expressive/morphing-text/MorphingText.tsx +328 -0
- package/src/components/expressive/morphing-text/MorphingText.usage.md +19 -0
- package/src/components/expressive/morphing-text/morphing-text.css +84 -0
- package/src/components/expressive/odometer/Odometer.tsx +158 -0
- package/src/components/expressive/odometer/Odometer.usage.md +17 -0
- package/src/components/expressive/odometer/odometer.css +61 -0
- package/src/components/expressive/tiktok/TikTok.tsx +542 -0
- package/src/components/expressive/tiktok/TikTok.usage.md +17 -0
- package/src/components/expressive/tiktok/glyphs.tsx +163 -0
- package/src/components/expressive/tiktok/tiktok.css +662 -0
- package/src/components/expressive/typing-lines/TypingLines.tsx +0 -0
- package/src/components/expressive/typing-lines/TypingLines.usage.md +17 -0
- package/src/components/expressive/typing-lines/typing-lines.css +92 -0
- package/src/components/expressive/weight-field/WeightField.tsx +41 -0
- package/src/components/expressive/weight-field/WeightField.usage.md +20 -0
- package/src/components/expressive/weight-field/weight-field.css +84 -0
- package/src/components/expressive/youtube/YouTube.tsx +192 -0
- package/src/components/expressive/youtube/YouTube.usage.md +18 -0
- package/src/components/expressive/youtube/format.ts +22 -0
- package/src/components/expressive/youtube/glyphs.tsx +235 -0
- package/src/components/expressive/youtube/media.tsx +18 -0
- package/src/components/expressive/youtube/post.tsx +282 -0
- package/src/components/expressive/youtube/short.tsx +212 -0
- package/src/components/expressive/youtube/video.tsx +75 -0
- package/src/components/expressive/youtube/youtube.css +611 -0
- package/src/components/internal/collection/collection.ts +44 -0
- package/src/components/internal/glass/glass.css +88 -84
- package/src/components/internal/hooks/use-media-query.ts +20 -0
- package/src/components/internal/hooks/use-typeahead.ts +28 -0
- package/src/components/internal/icon/Icon.tsx +2 -0
- package/src/components/internal/icon/IconSlot.tsx +2 -0
- package/src/components/internal/icon/icon.css +34 -30
- package/src/components/internal/menu/menu-row.tsx +34 -0
- package/src/components/internal/menu/menu-surface.css +127 -0
- package/src/components/internal/overlay/focus.ts +26 -10
- package/src/components/internal/overlay/layer.tsx +50 -19
- package/src/components/internal/overlay/modal.tsx +14 -12
- package/src/components/internal/overlay/overlay.css +24 -20
- package/src/components/internal/overlay/position.ts +19 -9
- package/src/components/internal/overlay/trigger.css +13 -0
- package/src/components/internal/support/types.ts +16 -0
- package/src/components/internal/utils/activation.ts +78 -0
- package/src/components/primitives/avatar/Avatar.tsx +2 -0
- package/src/components/primitives/avatar/Avatar.usage.md +12 -0
- package/src/components/primitives/avatar/AvatarGroup.tsx +3 -1
- package/src/components/primitives/avatar/AvatarGroup.usage.md +15 -0
- package/src/components/primitives/avatar/avatar.css +179 -174
- package/src/components/primitives/badge/Badge.tsx +3 -1
- package/src/components/primitives/badge/Badge.usage.md +14 -0
- package/src/components/primitives/badge/CountBadge.tsx +2 -2
- package/src/components/primitives/badge/CountBadge.usage.md +13 -0
- package/src/components/primitives/badge/StatusBadge.tsx +3 -1
- package/src/components/primitives/badge/StatusBadge.usage.md +14 -0
- package/src/components/primitives/badge/badge.css +166 -160
- package/src/components/primitives/badge/digit-strip.css +65 -0
- package/src/components/primitives/badge/{odometer.tsx → digit-strip.tsx} +3 -3
- package/src/components/primitives/button/Button.tsx +2 -0
- package/src/components/primitives/button/Button.usage.md +14 -0
- package/src/components/primitives/button/button.css +272 -246
- package/src/components/primitives/checkbox/Checkbox.tsx +3 -1
- package/src/components/primitives/checkbox/Checkbox.usage.md +12 -0
- package/src/components/primitives/checkbox/check-glyph.tsx +1 -0
- package/src/components/primitives/checkbox/checkbox.css +158 -153
- package/src/components/primitives/collapse/Collapse.tsx +3 -1
- package/src/components/primitives/collapse/Collapse.usage.md +17 -0
- package/src/components/primitives/collapse/collapse.css +70 -61
- package/src/components/primitives/collapse/collapse.typecheck.tsx +2 -0
- package/src/components/primitives/input/NumberField.tsx +18 -5
- package/src/components/primitives/input/NumberField.usage.md +12 -0
- package/src/components/primitives/input/OtpField.tsx +2 -0
- package/src/components/primitives/input/OtpField.usage.md +12 -0
- package/src/components/primitives/input/TextField.tsx +16 -4
- package/src/components/primitives/input/TextField.usage.md +13 -0
- package/src/components/primitives/input/field-chrome.tsx +11 -2
- package/src/components/primitives/input/input.css +296 -318
- package/src/components/primitives/radio-group/RadioGroup.tsx +20 -44
- package/src/components/primitives/radio-group/RadioGroup.usage.md +13 -0
- package/src/components/primitives/radio-group/radio-group.css +275 -276
- package/src/components/primitives/tag/Tag.tsx +10 -6
- package/src/components/primitives/tag/Tag.usage.md +14 -0
- package/src/components/primitives/tag/ToggleTag.tsx +4 -2
- package/src/components/primitives/tag/ToggleTag.usage.md +14 -0
- package/src/components/primitives/tag/tag.css +209 -231
- package/src/components/primitives/textarea/Textarea.tsx +17 -7
- package/src/components/primitives/textarea/Textarea.usage.md +12 -0
- package/src/components/primitives/textarea/textarea.css +205 -211
- package/src/components/primitives/toggle/Toggle.tsx +3 -1
- package/src/components/primitives/toggle/Toggle.usage.md +12 -0
- package/src/components/primitives/toggle/toggle.css +139 -135
- package/src/engine/animate.ts +40 -13
- package/src/engine/ease.ts +1 -0
- package/src/engine/flip.ts +32 -15
- package/src/engine/index.ts +2 -1
- package/src/engine/loop.ts +97 -0
- package/src/mcp/server.ts +315 -221
- package/src/motion/element.tsx +1 -0
- package/src/motion/flip.ts +29 -10
- package/src/motion/glide.tsx +11 -14
- package/src/motion/glide.usage.md +15 -0
- package/src/motion/motion-timing.ts +3 -3
- package/src/motion/presence.tsx +38 -21
- package/src/motion/presets.ts +13 -0
- package/src/motion/timing.ts +1 -0
- package/src/motion/use-motion.ts +16 -3
- package/src/styles.css +5 -0
- package/src/tokens/avatar.css +20 -16
- package/src/tokens/color.css +67 -56
- package/src/tokens/component-styles.generated.ts +270 -0
- package/src/tokens/elevation.css +28 -17
- package/src/tokens/fonts.css +1 -1
- package/src/tokens/glass.css +19 -15
- package/src/tokens/icons.css +8 -4
- package/src/tokens/layers.css +9 -4
- package/src/tokens/motion-scale.ts +4 -0
- package/src/tokens/motion-tokens.ts +42 -12
- package/src/tokens/motion-tokens.usage.md +16 -0
- package/src/tokens/motion.css +63 -45
- package/src/tokens/radius.css +12 -8
- package/src/tokens/semantic.css +62 -54
- package/src/tokens/spacing.css +25 -21
- package/src/tokens/theme-tokens.generated.ts +1278 -0
- package/src/tokens/theme.tsx +83 -0
- package/src/tokens/theme.usage.md +36 -0
- package/src/tokens/typography.css +53 -49
- package/dist/chunk-2ERBBFZS.js.map +0 -1
- package/dist/chunk-2F5PITAO.js.map +0 -1
- package/dist/chunk-2QWJ6FAX.js.map +0 -1
- package/dist/chunk-356HZMT4.js.map +0 -1
- package/dist/chunk-62P3KD57.js.map +0 -1
- package/dist/chunk-7SZCJ7WI.js.map +0 -1
- package/dist/chunk-CONSWNIV.js.map +0 -1
- package/dist/chunk-FTOAUJL5.js.map +0 -1
- package/dist/chunk-I4XQ4PV2.js.map +0 -1
- package/dist/chunk-K5X2GCXU.js.map +0 -1
- package/dist/chunk-NEF5XAHG.js.map +0 -1
- package/dist/chunk-NNXJCLTV.js.map +0 -1
- package/dist/chunk-OMHQ4U4J.js.map +0 -1
- package/dist/chunk-PMECHR3A.js.map +0 -1
- package/dist/chunk-QDK66S4G.js.map +0 -1
- package/dist/chunk-RCONNA7I.js.map +0 -1
- package/dist/chunk-S5ZTZANS.js.map +0 -1
- package/dist/chunk-UXONUUPI.js.map +0 -1
- package/dist/chunk-VTJTGVZZ.js.map +0 -1
- package/dist/chunk-WM5J5TDI.js.map +0 -1
- package/dist/chunk-XWUWYSCT.js.map +0 -1
- package/dist/chunk-Y7AJQVWJ.js.map +0 -1
- package/dist/chunk-YGCVWGUG.js.map +0 -1
- package/dist/chunk-YGGCQNNU.js.map +0 -1
- package/dist/chunk-ZCOUPPTI.js.map +0 -1
- package/dist/count-badge.d.ts +0 -13
- package/dist/date-range-field.d.ts +0 -33
- package/dist/field-chrome-CMPOQSLs.d.ts +0 -28
- package/dist/field-shell-Cuda-feL.d.ts +0 -24
- package/dist/glide.d.ts +0 -15
- package/dist/motion-devtools.d.ts +0 -51
- package/dist/status-badge.d.ts +0 -19
- package/dist/toast.d.ts +0 -12
- package/llms.txt +0 -220
- package/src/components/primitives/badge/odometer.css +0 -62
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import './
|
|
7
|
-
|
|
8
|
-
interface MultiSelectProps {
|
|
1
|
+
import './select.css';
|
|
2
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
import type { DisableableAnimation } from '../../../motion/timing';
|
|
5
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
6
|
+
import { type SelectGroup, type SelectOption } from './core';
|
|
7
|
+
export type { SelectOption, SelectGroup } from './core';
|
|
8
|
+
export interface MultiSelectProps {
|
|
9
9
|
/** The choices - a flat `SelectOption[]`, or `SelectGroup[]` to render labeled sections. @default [] */
|
|
10
10
|
options: SelectOption[] | SelectGroup[];
|
|
11
11
|
/** Controlled value - the array of selected option `value`s. Omit for uncontrolled (use `defaultValue`). */
|
|
@@ -36,9 +36,10 @@ interface MultiSelectProps {
|
|
|
36
36
|
ariaLabel?: string;
|
|
37
37
|
/** Standard <div> attributes (className, style, data-*, ...) forwarded to the select root. */
|
|
38
38
|
htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
39
|
+
/** Whether the trigger and the options fire on `pointerdown` (snappier) or wait for `click`.
|
|
40
|
+
* @default 'pointerdown' */
|
|
41
|
+
activateOn?: ActivateOn;
|
|
39
42
|
/** Menu open/close timing - motion tokens only, or `null` to disable. @default duration 'base' + ease 'entrance'/'exit' */
|
|
40
43
|
animation?: DisableableAnimation;
|
|
41
44
|
}
|
|
42
|
-
declare function MultiSelect({ options, value: controlledValue, defaultValue, onChange, placeholder, size, disabled, invalid, loading, searchable, searchPlaceholder, leadingIcon, id, ariaLabel, htmlProps, animation, }: MultiSelectProps): react.JSX.Element;
|
|
43
|
-
|
|
44
|
-
export { MultiSelect, type MultiSelectProps, SelectGroup, SelectOption };
|
|
45
|
+
export declare function MultiSelect({ options, value: controlledValue, defaultValue, onChange, placeholder, size, disabled, invalid, loading, searchable, searchPlaceholder, leadingIcon, id, ariaLabel, htmlProps, activateOn, animation, }: MultiSelectProps): import("react").JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
interface SelectProps {
|
|
1
|
+
import './select.css';
|
|
2
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
import type { DisableableAnimation } from '../../../motion/timing';
|
|
5
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
6
|
+
import { type SelectGroup, type SelectOption, type SelectTriggerHtmlProps } from './core';
|
|
7
|
+
export type { SelectOption, SelectGroup } from './core';
|
|
8
|
+
export interface SelectProps {
|
|
10
9
|
/** The choices - a flat `SelectOption[]`, or `SelectGroup[]` to render labeled sections. @default [] */
|
|
11
10
|
options: SelectOption[] | SelectGroup[];
|
|
12
11
|
/** Controlled value - matches an option's `value`, or `null` for none. Omit for uncontrolled (use `defaultValue`). */
|
|
@@ -37,13 +36,16 @@ interface SelectProps {
|
|
|
37
36
|
ariaLabel?: string;
|
|
38
37
|
/** Standard <div> attributes (className, style, data-*, ...) forwarded to the select root. */
|
|
39
38
|
htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
39
|
+
/** Whether the trigger and the options fire on `pointerdown` (snappier) or wait for `click`.
|
|
40
|
+
* @default 'pointerdown' */
|
|
41
|
+
activateOn?: ActivateOn;
|
|
40
42
|
/** Menu open/close timing - motion tokens only, or `null` to disable. @default duration 'base' + ease 'entrance'/'exit' */
|
|
41
43
|
animation?: DisableableAnimation;
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
+
/** Standard <button> attributes (className, style, aria-*, data-*, ...) merged onto the trigger.
|
|
45
|
+
* `onClick` and `onKeyDown` run before the built-in open/close and arrow-key handling, which
|
|
46
|
+
* cannot be replaced - the trigger is the combobox. */
|
|
47
|
+
triggerProps?: SelectTriggerHtmlProps;
|
|
44
48
|
/** Show check icon on selected value */
|
|
45
49
|
showCheck?: boolean;
|
|
46
50
|
}
|
|
47
|
-
declare function Select({ options, value: controlledValue, defaultValue, onChange, placeholder, size, disabled, invalid, loading, searchable, searchPlaceholder, leadingIcon, id, ariaLabel, htmlProps, animation, triggerProps, showCheck, }: SelectProps): react.JSX.Element;
|
|
48
|
-
|
|
49
|
-
export { Select, SelectGroup, SelectOption, type SelectProps };
|
|
51
|
+
export declare function Select({ options, value: controlledValue, defaultValue, onChange, placeholder, size, disabled, invalid, loading, searchable, searchPlaceholder, leadingIcon, id, ariaLabel, htmlProps, activateOn, animation, triggerProps, showCheck, }: SelectProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import type { DisableableAnimation } from '../../../../motion/timing';
|
|
3
|
+
export interface SelectMenuProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
menuId: string;
|
|
6
|
+
requestClose: () => void;
|
|
7
|
+
triggerRef: RefObject<HTMLButtonElement | null>;
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
/** Open/close timing - motion tokens only, or `null` to disable. */
|
|
10
|
+
animation?: DisableableAnimation;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function SelectMenu({ open, menuId, requestClose, triggerRef, multiple, animation, children }: SelectMenuProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import '../../../internal/menu/menu-surface.css';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import type { DisableableAnimation } from '../../../../motion/timing';
|
|
4
|
+
import { type ActivateOn } from '../../../internal/utils/activation';
|
|
5
|
+
import type { ListboxState } from './use-listbox';
|
|
6
|
+
export interface ListboxPanelProps {
|
|
7
|
+
lb: ListboxState;
|
|
8
|
+
loading: boolean;
|
|
9
|
+
searchable: boolean;
|
|
10
|
+
searchPlaceholder?: string;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
activateOn?: ActivateOn;
|
|
14
|
+
/** Menu open/close timing - motion tokens only, or `null` to disable. */
|
|
15
|
+
animation?: DisableableAnimation;
|
|
16
|
+
check?: (selected: boolean) => ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare function ListboxPanel({ lb, loading, searchable, searchPlaceholder, ariaLabel, multiple, activateOn, animation, check, }: ListboxPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { DataAttributes } from '../../../../dom-props';
|
|
3
|
+
import { type ActivateOn } from '../../../internal/utils/activation';
|
|
4
|
+
import type { ListboxState } from './use-listbox';
|
|
5
|
+
export type SelectTriggerHtmlProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> & DataAttributes;
|
|
6
|
+
export interface SelectTriggerProps extends SelectTriggerHtmlProps {
|
|
7
|
+
lb: ListboxState;
|
|
8
|
+
invalid?: boolean;
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
leading?: ReactNode;
|
|
11
|
+
text?: ReactNode;
|
|
12
|
+
isPlaceholder?: boolean;
|
|
13
|
+
count?: number;
|
|
14
|
+
activateOn?: ActivateOn;
|
|
15
|
+
}
|
|
16
|
+
export declare function SelectTrigger({ lb, invalid, ariaLabel, leading, text, isPlaceholder, count, className, activateOn, onClick, onPointerDown, onKeyDown, ...rest }: SelectTriggerProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
interface SelectOption {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type NormalizedGroup as CollectionGroup } from '../../../internal/collection/collection';
|
|
3
|
+
export interface SelectOption {
|
|
4
4
|
/** The stored value - what `onChange` returns and `value` matches; must be unique. */
|
|
5
5
|
value: string;
|
|
6
6
|
/** Primary row text, and the trigger label once selected; also matched by `searchable`. */
|
|
@@ -11,12 +11,19 @@ interface SelectOption {
|
|
|
11
11
|
icon?: ReactNode;
|
|
12
12
|
/** Not selectable - skipped by keyboard nav and typeahead, and marked `aria-disabled`. @default false */
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
/** Text used for `searchable` filtering and typeahead. Required when `label` is not a string. */
|
|
15
|
+
searchText?: string;
|
|
14
16
|
}
|
|
15
|
-
interface SelectGroup {
|
|
17
|
+
export interface SelectGroup {
|
|
16
18
|
/** Section heading rendered above the options; omit for an unlabeled group. */
|
|
17
19
|
label?: string;
|
|
18
20
|
/** The options in this section. */
|
|
19
21
|
options: SelectOption[];
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
export
|
|
23
|
+
export type NormalizedGroup = CollectionGroup<SelectOption>;
|
|
24
|
+
export declare const normalize: (options: SelectOption[] | SelectGroup[]) => {
|
|
25
|
+
groups: NormalizedGroup[];
|
|
26
|
+
flat: SelectOption[];
|
|
27
|
+
};
|
|
28
|
+
export declare const optionText: (o: SelectOption) => string;
|
|
29
|
+
export declare const matches: (o: SelectOption, q: string) => boolean;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type KeyboardEvent } from 'react';
|
|
2
|
+
import { type SelectGroup, type SelectOption } from './types';
|
|
3
|
+
export interface UseListboxArgs {
|
|
4
|
+
options: SelectOption[] | SelectGroup[];
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
searchable: boolean;
|
|
8
|
+
id?: string;
|
|
9
|
+
idPrefix: string;
|
|
10
|
+
isSelected: (value: string) => boolean;
|
|
11
|
+
onCommit: (opt: SelectOption) => void;
|
|
12
|
+
closeOnCommit: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type ListboxState = ReturnType<typeof useListbox>;
|
|
15
|
+
export declare function useListbox({ options, disabled, loading, searchable, id, idPrefix, isSelected, onCommit, closeOnCommit, }: UseListboxArgs): {
|
|
16
|
+
open: boolean;
|
|
17
|
+
query: string;
|
|
18
|
+
setQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
19
|
+
triggerRef: import("react").RefObject<HTMLButtonElement>;
|
|
20
|
+
listRef: import("react").RefObject<HTMLDivElement>;
|
|
21
|
+
searchRef: import("react").RefObject<HTMLInputElement>;
|
|
22
|
+
baseId: string;
|
|
23
|
+
menuId: string;
|
|
24
|
+
listId: string;
|
|
25
|
+
optId: (value: string) => string;
|
|
26
|
+
adId: string;
|
|
27
|
+
groups: import("./types").NormalizedGroup[];
|
|
28
|
+
flat: SelectOption[];
|
|
29
|
+
navItems: SelectOption[];
|
|
30
|
+
glide: {
|
|
31
|
+
ref: import("react").RefObject<HTMLSpanElement>;
|
|
32
|
+
enter: (target: HTMLElement | null) => void;
|
|
33
|
+
leave: () => void;
|
|
34
|
+
};
|
|
35
|
+
isSelected: (value: string) => boolean;
|
|
36
|
+
show: () => void;
|
|
37
|
+
requestClose: () => void;
|
|
38
|
+
commit: (opt: SelectOption) => void;
|
|
39
|
+
activeIdx: number;
|
|
40
|
+
setActiveIdx: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
41
|
+
onMenuKeyDown: (e: KeyboardEvent) => void;
|
|
42
|
+
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
|
|
7
|
-
interface SheetProps {
|
|
1
|
+
import './sheet.css';
|
|
2
|
+
import { type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
import type { DisableableAnimation } from '../../../motion/timing';
|
|
5
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
6
|
+
export interface SheetProps {
|
|
8
7
|
/** Controlled open state. Omit to stay uncontrolled. */
|
|
9
8
|
open?: boolean;
|
|
10
9
|
/** Initial state when uncontrolled. Default false. */
|
|
11
10
|
defaultOpen?: boolean;
|
|
12
11
|
/** Fires whenever the open state changes. Pair with `open` for controlled use. */
|
|
13
12
|
onOpenChange?: (open: boolean) => void;
|
|
14
|
-
/** Cloned to open the sheet
|
|
13
|
+
/** Cloned to open the sheet. */
|
|
15
14
|
trigger?: ReactElement | null;
|
|
15
|
+
/** Whether the trigger fires on `pointerdown` (snappier) or waits for `click`. @default 'click' */
|
|
16
|
+
activateOn?: ActivateOn;
|
|
16
17
|
/** Edge the sheet slides in from. Default 'right'. */
|
|
17
18
|
side?: 'right' | 'bottom';
|
|
18
19
|
/** Scrim/Esc dismissal + drag-to-edge. Default true. */
|
|
@@ -29,6 +30,4 @@ interface SheetProps {
|
|
|
29
30
|
/** The ENTIRE surface - paint AND semantics. Drive dismissal with `open`/`onOpenChange`. */
|
|
30
31
|
children: ReactNode;
|
|
31
32
|
}
|
|
32
|
-
declare function Sheet({ open: controlledOpen, defaultOpen, onOpenChange, trigger, side, dismissible, container, id, htmlProps, animation, children, }: SheetProps): react.JSX.Element;
|
|
33
|
-
|
|
34
|
-
export { Sheet, type SheetProps };
|
|
33
|
+
export declare function Sheet({ open: controlledOpen, defaultOpen, onOpenChange, trigger, activateOn, side, dismissible, container, id, htmlProps, animation, children, }: SheetProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type PointerEvent as ReactPointerEvent, type RefObject } from 'react';
|
|
2
|
+
export declare function useSheetDrag({ side, panelRef, enabled, requestClose, }: {
|
|
3
|
+
side: 'right' | 'bottom';
|
|
4
|
+
panelRef: RefObject<HTMLElement>;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
requestClose: () => void;
|
|
7
|
+
}): {
|
|
8
|
+
onPointerDown: (e: ReactPointerEvent) => void;
|
|
9
|
+
'data-drag': string;
|
|
10
|
+
} | {
|
|
11
|
+
onPointerDown?: undefined;
|
|
12
|
+
'data-drag'?: undefined;
|
|
13
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
type TableAlign = 'start' | 'end' | 'center';
|
|
6
|
-
type TableHideBelow = 'sm' | 'md';
|
|
7
|
-
interface TableColumn<Row = any> {
|
|
1
|
+
import './table.css';
|
|
2
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
import { type ActivateOn } from '../../internal/utils/activation';
|
|
5
|
+
export type TableAlign = 'start' | 'end' | 'center';
|
|
6
|
+
export type TableHideBelow = 'sm' | 'md';
|
|
7
|
+
export interface TableColumn<Row = any> {
|
|
8
8
|
/** Unique column id; also the default data accessor (row[key]). */
|
|
9
9
|
key: string;
|
|
10
10
|
/** Header cell content; omit for a header-less column (e.g. an actions column). */
|
|
@@ -26,13 +26,13 @@ interface TableColumn<Row = any> {
|
|
|
26
26
|
/** Custom cell renderer. Defaults to row[key]. */
|
|
27
27
|
render?: (row: Row) => ReactNode;
|
|
28
28
|
}
|
|
29
|
-
interface TableSort {
|
|
29
|
+
export interface TableSort {
|
|
30
30
|
/** `key` of the column being sorted by. */
|
|
31
31
|
key: string;
|
|
32
32
|
/** Sort direction - `asc` or `desc`. */
|
|
33
33
|
dir: 'asc' | 'desc';
|
|
34
34
|
}
|
|
35
|
-
interface TableProps<Row = any> {
|
|
35
|
+
export interface TableProps<Row = any> {
|
|
36
36
|
/** Column defs, rendered left to right. */
|
|
37
37
|
columns: TableColumn<Row>[];
|
|
38
38
|
/** The row data; sorted locally per the active sort before render. */
|
|
@@ -65,11 +65,11 @@ interface TableProps<Row = any> {
|
|
|
65
65
|
footer?: ReactNode;
|
|
66
66
|
/** Makes rows clickable (checkbox cell excluded). */
|
|
67
67
|
onRowClick?: (row: Row) => void;
|
|
68
|
+
/** Whether a sortable header fires on `pointerdown` (snappier) or waits for `click`. @default 'pointerdown' */
|
|
69
|
+
activateOn?: ActivateOn;
|
|
68
70
|
/** Size the table here - the internal scroller absorbs the constraint. */
|
|
69
71
|
className?: string;
|
|
70
72
|
/** Standard <div> attributes (style, data-*, aria-*, ...) forwarded to the table wrapper. */
|
|
71
73
|
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, 'className'> & DataAttributes;
|
|
72
74
|
}
|
|
73
|
-
declare function Table<Row = any>({ columns, rows, rowKey, ariaLabel, selectable, onSelectionChange, bulkActions, selectionLabel, defaultSort, onSortChange, density, pinFirst, loading, empty, footer, onRowClick, className, htmlProps, }: TableProps<Row>): react.JSX.Element;
|
|
74
|
-
|
|
75
|
-
export { Table, type TableAlign, type TableColumn, type TableHideBelow, type TableProps, type TableSort };
|
|
75
|
+
export declare function Table<Row = any>({ columns, rows, rowKey, ariaLabel, selectable, onSelectionChange, bulkActions, selectionLabel, defaultSort, onSortChange, density, pinFirst, loading, empty, footer, onRowClick, activateOn, className, htmlProps, }: TableProps<Row>): import("react").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
|
|
1
|
+
import './tabs.css';
|
|
2
|
+
import { type CSSProperties, type HTMLAttributes, type ReactNode } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
import { type DisableableAnimation } from '../../../motion/timing';
|
|
5
|
+
import { type ActivateOn } from '../../internal/utils/activation';
|
|
7
6
|
/** One tab in the row. */
|
|
8
|
-
interface TabItem {
|
|
7
|
+
export interface TabItem {
|
|
9
8
|
/** Stable identity - also used in the tab/panel id pair. */
|
|
10
9
|
value: string;
|
|
11
10
|
/** Visible tab text. */
|
|
@@ -35,16 +34,18 @@ interface TabsOwnProps {
|
|
|
35
34
|
name?: string;
|
|
36
35
|
/** Accessible name for the tablist (e.g. "Section views"). */
|
|
37
36
|
ariaLabel?: string;
|
|
37
|
+
/** Whether a tab switches on `pointerdown` (snappier) or waits for `click`. @default 'pointerdown' */
|
|
38
|
+
activateOn?: ActivateOn;
|
|
38
39
|
/** Extra class(es) merged onto the root. */
|
|
39
40
|
className?: string;
|
|
40
41
|
/** Inline styles merged onto the root. */
|
|
41
42
|
style?: CSSProperties;
|
|
42
43
|
}
|
|
43
|
-
interface TabsProps extends TabsOwnProps {
|
|
44
|
+
export interface TabsProps extends TabsOwnProps {
|
|
44
45
|
/** Standard <div> attributes (data-*, aria-*, ...) forwarded to the root. */
|
|
45
46
|
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, keyof TabsOwnProps> & DataAttributes;
|
|
46
47
|
}
|
|
47
|
-
declare function Tabs({ items, value, onChange, name, ariaLabel, className, style, htmlProps }: TabsProps): react.JSX.Element;
|
|
48
|
+
export declare function Tabs({ items, value, onChange, name, ariaLabel, activateOn, className, style, htmlProps, }: TabsProps): import("react").JSX.Element;
|
|
48
49
|
interface TabPanelOwnProps {
|
|
49
50
|
/** The active tab's value - changing it cuts to the new content. */
|
|
50
51
|
tab: string;
|
|
@@ -62,10 +63,9 @@ interface TabPanelOwnProps {
|
|
|
62
63
|
/** Inline styles merged onto the root. */
|
|
63
64
|
style?: CSSProperties;
|
|
64
65
|
}
|
|
65
|
-
interface TabPanelProps extends TabPanelOwnProps {
|
|
66
|
+
export interface TabPanelProps extends TabPanelOwnProps {
|
|
66
67
|
/** Standard <div> attributes (data-*, aria-*, ...) forwarded to the root. */
|
|
67
68
|
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, keyof TabPanelOwnProps> & DataAttributes;
|
|
68
69
|
}
|
|
69
|
-
declare function TabPanel({ tab, name, dir, className, style, children, animation, htmlProps }: TabPanelProps): react.JSX.Element;
|
|
70
|
-
|
|
71
|
-
export { type TabItem, TabPanel, type TabPanelProps, Tabs, type TabsProps };
|
|
70
|
+
export declare function TabPanel({ tab, name, dir, className, style, children, animation, htmlProps }: TabPanelProps): import("react").JSX.Element;
|
|
71
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './toast.css';
|
|
2
|
+
import { type HTMLAttributes, type ReactElement } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
import { type ToasterConfig } from './toast-store';
|
|
5
|
+
export interface ToasterProps extends Partial<ToasterConfig> {
|
|
6
|
+
/** Standard <ol> attributes (className, style, data-*, ...) forwarded to the toast viewport. */
|
|
7
|
+
htmlProps?: HTMLAttributes<HTMLOListElement> & DataAttributes;
|
|
8
|
+
}
|
|
9
|
+
export declare function Toaster({ htmlProps, ...props }: ToasterProps): ReactElement;
|
|
10
|
+
export { toast } from './toast-store';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
type ToastTone = 'default' | 'success' | 'danger' | 'warning' | 'info' | 'loading' | 'custom';
|
|
2
|
-
interface ToastAction {
|
|
1
|
+
export type ToastTone = 'default' | 'success' | 'danger' | 'warning' | 'info' | 'loading' | 'custom';
|
|
2
|
+
export interface ToastAction {
|
|
3
3
|
label: string;
|
|
4
4
|
onClick: () => void;
|
|
5
5
|
}
|
|
6
|
-
interface ToastOptions {
|
|
6
|
+
export interface ToastOptions {
|
|
7
7
|
id?: string | number;
|
|
8
8
|
duration?: number;
|
|
9
9
|
description?: string | null;
|
|
10
10
|
action?: ToastAction | null;
|
|
11
11
|
}
|
|
12
|
-
interface ToastRecord {
|
|
12
|
+
export interface ToastRecord {
|
|
13
13
|
id: string;
|
|
14
14
|
tone: ToastTone;
|
|
15
15
|
message: string | null;
|
|
@@ -23,13 +23,13 @@ interface ToastRecord {
|
|
|
23
23
|
dismissible: boolean;
|
|
24
24
|
expiresAt?: number;
|
|
25
25
|
}
|
|
26
|
-
interface ToastSnapshot {
|
|
26
|
+
export interface ToastSnapshot {
|
|
27
27
|
toasts: ToastRecord[];
|
|
28
28
|
paused: boolean;
|
|
29
29
|
expanded: boolean;
|
|
30
30
|
}
|
|
31
|
-
type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
32
|
-
interface ToasterConfig {
|
|
31
|
+
export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
32
|
+
export interface ToasterConfig {
|
|
33
33
|
position: ToastPosition;
|
|
34
34
|
duration: number;
|
|
35
35
|
visibleToasts: number;
|
|
@@ -37,7 +37,7 @@ interface ToasterConfig {
|
|
|
37
37
|
offset: number;
|
|
38
38
|
expand: boolean;
|
|
39
39
|
}
|
|
40
|
-
declare const DEFAULT_TOASTER_CONFIG: ToasterConfig;
|
|
40
|
+
export declare const DEFAULT_TOASTER_CONFIG: ToasterConfig;
|
|
41
41
|
interface ToastStore {
|
|
42
42
|
toasts: ToastRecord[];
|
|
43
43
|
paused: boolean;
|
|
@@ -58,12 +58,12 @@ interface ToastStore {
|
|
|
58
58
|
setExpanded(v: boolean): void;
|
|
59
59
|
}
|
|
60
60
|
type PromiseMsg<V> = string | ((v: V) => string);
|
|
61
|
-
interface ToastPromiseMsgs<T> {
|
|
61
|
+
export interface ToastPromiseMsgs<T> {
|
|
62
62
|
loading?: string;
|
|
63
63
|
success?: PromiseMsg<T>;
|
|
64
64
|
error?: PromiseMsg<unknown>;
|
|
65
65
|
}
|
|
66
|
-
interface ToastApi {
|
|
66
|
+
export interface ToastApi {
|
|
67
67
|
(message: string, opts?: ToastOptions): string;
|
|
68
68
|
success(m: string, o?: ToastOptions): string;
|
|
69
69
|
error(m: string, o?: ToastOptions): string;
|
|
@@ -80,7 +80,5 @@ interface ToastApi {
|
|
|
80
80
|
}): string;
|
|
81
81
|
}
|
|
82
82
|
declare const toast: ToastApi;
|
|
83
|
-
|
|
84
|
-
declare const UIToast: ToastStore;
|
|
85
|
-
|
|
86
|
-
export { DEFAULT_TOASTER_CONFIG, type ToastAction, type ToastApi, type ToastOptions, type ToastPosition, type ToastPromiseMsgs, type ToastRecord, type ToastSnapshot, type ToastTone, type ToasterConfig, UIToast, toast };
|
|
83
|
+
export { toast };
|
|
84
|
+
export declare const UIToast: ToastStore;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
interface TooltipProps {
|
|
1
|
+
import './tooltip.css';
|
|
2
|
+
import { type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
import { type Placement } from './tooltip-store';
|
|
5
|
+
export interface TooltipProps {
|
|
8
6
|
/** The hint - a string or small node; never interactive content. */
|
|
9
7
|
content: ReactNode;
|
|
10
8
|
/** Optional keyboard hint, rendered as mono metadata ("⌘↩", "S"). */
|
|
@@ -25,6 +23,4 @@ interface TooltipProps {
|
|
|
25
23
|
/** Standard <span> attributes forwarded to the anchor wrapper. */
|
|
26
24
|
htmlProps?: HTMLAttributes<HTMLSpanElement> & DataAttributes;
|
|
27
25
|
}
|
|
28
|
-
declare function Tooltip({ content, shortcut, placement, disabled, openDelay, closeDelay, id, children, htmlProps, }: TooltipProps): react.JSX.Element;
|
|
29
|
-
|
|
30
|
-
export { Tooltip, type TooltipProps };
|
|
26
|
+
export declare function Tooltip({ content, shortcut, placement, disabled, openDelay, closeDelay, id, children, htmlProps, }: TooltipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TooltipHost(): import("react").ReactPortal;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type Placement = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
export interface ActivePayload {
|
|
4
|
+
id: string;
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
shortcut?: string | null;
|
|
7
|
+
placement: Placement;
|
|
8
|
+
anchor: () => HTMLElement | null;
|
|
9
|
+
rect: () => DOMRect;
|
|
10
|
+
}
|
|
11
|
+
export declare const OPEN_DELAY = 350;
|
|
12
|
+
export declare const CLOSE_GRACE = 140;
|
|
13
|
+
export declare const TOOLTIP_DOM_ID = "pds-tooltip";
|
|
14
|
+
export declare const store: {
|
|
15
|
+
active: ActivePayload | null;
|
|
16
|
+
described: HTMLElement | null;
|
|
17
|
+
closeTimer: ReturnType<typeof setTimeout> | 0;
|
|
18
|
+
warmUntil: number;
|
|
19
|
+
listeners: Set<() => void>;
|
|
20
|
+
get: () => ActivePayload;
|
|
21
|
+
subscribe(l: () => void): () => boolean;
|
|
22
|
+
emit(): void;
|
|
23
|
+
isWarm: () => boolean;
|
|
24
|
+
describe(el: HTMLElement | null): void;
|
|
25
|
+
open(payload: ActivePayload): void;
|
|
26
|
+
close(id: string, grace?: number): void;
|
|
27
|
+
closeNow(): void;
|
|
28
|
+
};
|
|
29
|
+
export declare function useHostElection(): boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import './support-rail.css';
|
|
2
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
import type { SupportRailStyle } from '../../../tokens/component-styles.generated';
|
|
5
|
+
import type { SupportAction } from '../../internal/support/types';
|
|
6
|
+
export type { SupportAction };
|
|
7
|
+
export interface SupportRailOwnProps {
|
|
8
|
+
/** The rows, in order. Each renders a button carrying its label, optional description and optional meta. @default [] */
|
|
9
|
+
actions: SupportAction[];
|
|
10
|
+
/** Panel heading, and the panel's accessible name. @default 'Talk to us' */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Small uppercase mono line under the heading - opening hours, queue depth, a shift note. */
|
|
13
|
+
status?: string;
|
|
14
|
+
/** Container edge the rail pins to. Flips the needle, the collapse origin, the drag axis and the vertical label. @default 'right' */
|
|
15
|
+
side?: 'right' | 'left';
|
|
16
|
+
/** Controlled open state. Omit to stay uncontrolled. */
|
|
17
|
+
open?: boolean;
|
|
18
|
+
/** Initial state when uncontrolled. @default false */
|
|
19
|
+
defaultOpen?: boolean;
|
|
20
|
+
/** Fires whenever the open state changes. Pair with `open` for controlled use. */
|
|
21
|
+
onOpenChange?: (open: boolean) => void;
|
|
22
|
+
/** Fires when a row commits - gets its `id` and the full action. The rail stays open; render what happens next in `children`. */
|
|
23
|
+
onSelect?: (id: string, action: SupportAction) => void;
|
|
24
|
+
/** The vertical mono word on the needle. Doubles as the needle's accessible name. @default 'Support' */
|
|
25
|
+
needleLabel?: string;
|
|
26
|
+
/** Availability dot on the needle, with an ambient halo. @default false */
|
|
27
|
+
live?: boolean;
|
|
28
|
+
/** Arbitrary content below the rows; it takes the leftover height and scrolls. */
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
/** Pinned bottom strip - on-shift avatars, an SLA line, a link out. */
|
|
31
|
+
footer?: ReactNode;
|
|
32
|
+
/** Extra class(es) merged onto the rail root. */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** Inline styles merged onto the rail root - the place to retune the `--support-rail-*` properties. */
|
|
35
|
+
style?: SupportRailStyle;
|
|
36
|
+
}
|
|
37
|
+
export interface SupportRailProps extends SupportRailOwnProps {
|
|
38
|
+
/** Standard <div> attributes (aria-*, data-*, id, ...) forwarded to the rail root. */
|
|
39
|
+
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, keyof SupportRailOwnProps> & DataAttributes;
|
|
40
|
+
}
|
|
41
|
+
export declare function SupportRail({ actions, title, status, side, open: controlledOpen, defaultOpen, onOpenChange, onSelect, needleLabel, live, children, footer, className, style, htmlProps, }: SupportRailProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import './motion-devtools.css';
|
|
2
|
+
export type MotionDevtoolsPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
3
|
+
export interface MotionDevtoolsProps {
|
|
4
|
+
/** Which corner of the viewport to pin to. @default 'bottom-right' */
|
|
5
|
+
placement?: MotionDevtoolsPlacement;
|
|
6
|
+
/** Distance from the viewport edges, in px. @default 16 */
|
|
7
|
+
offset?: number;
|
|
8
|
+
/** Quick-select slow-down factors (1 = real time). @default [1, 2, 4, 8, 16] */
|
|
9
|
+
presets?: number[];
|
|
10
|
+
/** Upper bound of the fine slider. @default 16 */
|
|
11
|
+
maxFactor?: number;
|
|
12
|
+
/** Slow-down factor to start at. @default 1 */
|
|
13
|
+
defaultFactor?: number;
|
|
14
|
+
/** Scale setTimeout/setInterval too, so duration-coupled JS cleanups don't truncate
|
|
15
|
+
* slowed CSS. Exposed as a live toggle in the panel. @default true */
|
|
16
|
+
scaleTimers?: boolean;
|
|
17
|
+
/** Remember the chosen factor across reloads (localStorage). @default true */
|
|
18
|
+
persist?: boolean;
|
|
19
|
+
/** Start with the full panel open rather than collapsed to its header. @default false */
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function MotionDevtools({ placement, offset, presets, maxFactor, defaultFactor, scaleTimers, persist, defaultOpen, }: MotionDevtoolsProps): import("react").ReactPortal;
|
|
23
|
+
export { motionSlowmo, type SlowmoState } from './slowmo-engine';
|
|
24
|
+
export default MotionDevtools;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface SlowmoState {
|
|
2
|
+
/** 1 = real time. >1 = that many times slower (4 = quarter speed). */
|
|
3
|
+
factor: number;
|
|
4
|
+
/** Freeze motion in place - useful for inspecting a transition mid-flight. */
|
|
5
|
+
paused: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface SlowmoOptions {
|
|
8
|
+
/** Also scale setTimeout/setInterval so duration-coupled JS cleanups don't truncate
|
|
9
|
+
* slowed CSS. Turn off if stretched app timers get in your way. @default true */
|
|
10
|
+
scaleTimers: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function shouldBeActive(factor: number, paused: boolean): boolean;
|
|
13
|
+
/** Imperative control surface - drive slow-mo from a console, a hotkey, or the panel.
|
|
14
|
+
* Safe to call during SSR (no-ops the DOM work, still tracks state for hydration). */
|
|
15
|
+
export declare const motionSlowmo: {
|
|
16
|
+
/** Current state (a copy). */
|
|
17
|
+
get(): SlowmoState;
|
|
18
|
+
/** Merge a partial state. factor is clamped to [1, 64]. */
|
|
19
|
+
set(patch: Partial<SlowmoState>): void;
|
|
20
|
+
/** Tune engine behaviour (e.g. stop scaling timers). Applies immediately if active. */
|
|
21
|
+
configure(patch: Partial<SlowmoOptions>): void;
|
|
22
|
+
/** Convenience: back to real time and unpaused. */
|
|
23
|
+
reset(): void;
|
|
24
|
+
/** Subscribe to state changes; returns an unsubscribe fn. */
|
|
25
|
+
subscribe(cb: (s: SlowmoState) => void): () => void;
|
|
26
|
+
};
|
|
27
|
+
export type MotionSlowmo = typeof motionSlowmo;
|