@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,10 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import './motion-scale-Canq4stZ.js';
|
|
5
|
-
import './dom-props-C0jrllBw.js';
|
|
6
|
-
|
|
7
|
-
interface TimeFieldProps extends DateFieldBaseProps {
|
|
1
|
+
import './date-picker.css';
|
|
2
|
+
import { type DateFieldBaseProps } from './field-shell';
|
|
3
|
+
export interface TimeFieldProps extends DateFieldBaseProps {
|
|
8
4
|
/** Controlled value, canonical 'HH:mm' (24h). */
|
|
9
5
|
value?: string | null;
|
|
10
6
|
/** Uncontrolled initial value, 'HH:mm' (24h). Use instead of `value`. @default null */
|
|
@@ -22,7 +18,5 @@ interface TimeFieldProps extends DateFieldBaseProps {
|
|
|
22
18
|
/** Upper bound 'HH:mm' - saturates, never errors. */
|
|
23
19
|
max?: string;
|
|
24
20
|
}
|
|
25
|
-
declare function TimeField({ value, // controlled: 'HH:mm' | null
|
|
26
|
-
defaultValue, onChange, label, format, minuteStep, min, max, required, invalid, message, disabled, className, htmlProps, }: TimeFieldProps): react.JSX.Element;
|
|
27
|
-
|
|
28
|
-
export { TimeField, type TimeFieldProps };
|
|
21
|
+
export declare function TimeField({ value, // controlled: 'HH:mm' | null
|
|
22
|
+
defaultValue, onChange, label, format, minuteStep, min, max, required, invalid, message, disabled, className, htmlProps, }: TimeFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './date-picker.css';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import { type ActivateOn } from '../../internal/utils/activation';
|
|
4
|
+
interface DtpPanelProps {
|
|
5
|
+
val: string | null;
|
|
6
|
+
commit: (key: string) => void;
|
|
7
|
+
close: () => void;
|
|
8
|
+
min?: string;
|
|
9
|
+
max?: string;
|
|
10
|
+
timezone?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
slot?: ReactNode;
|
|
13
|
+
activateOn?: ActivateOn;
|
|
14
|
+
}
|
|
15
|
+
export declare function DtpPanel({ val, commit, min, max, timezone, label, close, slot, activateOn }: DtpPanelProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const MONTHS: string[];
|
|
2
|
+
export declare const DOW: string[];
|
|
3
|
+
export declare const pad: (n: number) => string;
|
|
4
|
+
export declare const toKey: (d: Date) => string;
|
|
5
|
+
export declare function parse(k: string): Date;
|
|
6
|
+
export declare const today: () => string;
|
|
7
|
+
export declare const add: (k: string, days: number) => string;
|
|
8
|
+
export declare const col: (d: Date) => number;
|
|
9
|
+
export declare const within: (k: string, min?: string, max?: string) => boolean;
|
|
10
|
+
export declare function displayDay(k: string | null): string | null;
|
|
11
|
+
export declare function grid(y: number, m: number): Date[];
|
|
12
|
+
export declare function tzLabel(tz: string, dateKey?: string): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import './date-picker.css';
|
|
2
|
+
import type { ButtonHTMLAttributes, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
import type { DisableableAnimation } from '../../../motion/timing';
|
|
5
|
+
import { type IconName } from '../../internal/icon/Icon';
|
|
6
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
7
|
+
export interface DateFieldBaseProps {
|
|
8
|
+
/** Field label rendered above the trigger. */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Asterisk on the label. @default false */
|
|
11
|
+
required?: boolean;
|
|
12
|
+
/** Danger border + message color (.fld is-error). @default false */
|
|
13
|
+
invalid?: boolean;
|
|
14
|
+
/** Helper / error text under the field. */
|
|
15
|
+
message?: string;
|
|
16
|
+
/** Disable the field. @default false */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Extra class on the field shell root. */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Standard <div> attributes (style, data-*, aria-*, ...) forwarded to the field shell root. */
|
|
21
|
+
htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
22
|
+
/** Whether the trigger, the day cells and the panel controls fire on `pointerdown` (snappier) or
|
|
23
|
+
* wait for `click`. (Not used by TimeField, which is inline.) @default 'pointerdown' */
|
|
24
|
+
activateOn?: ActivateOn;
|
|
25
|
+
/** Popover open/close timing - motion tokens only, or `null` to disable. (Not used by TimeField, which is inline.) */
|
|
26
|
+
animation?: DisableableAnimation;
|
|
27
|
+
}
|
|
28
|
+
export interface FieldShellProps {
|
|
29
|
+
variant: string;
|
|
30
|
+
label?: string;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
invalid?: boolean;
|
|
33
|
+
message?: ReactNode;
|
|
34
|
+
icon: IconName;
|
|
35
|
+
className?: string;
|
|
36
|
+
htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
}
|
|
39
|
+
export declare function FieldShell({ variant, label, required, invalid, message, icon, className, htmlProps, children, }: FieldShellProps): import("react").JSX.Element;
|
|
40
|
+
export declare function FieldTrigger({ display, placeholder, disabled, ...rest }: {
|
|
41
|
+
display: string | null;
|
|
42
|
+
placeholder: string;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
} & ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
45
|
+
ref?: Ref<HTMLButtonElement>;
|
|
46
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import './date-picker.css';
|
|
2
|
+
import { type ActivateOn } from '../../internal/utils/activation';
|
|
3
|
+
/** A date range as wall-clock 'YYYY-MM-DD' endpoints, inclusive. */
|
|
4
|
+
export interface DateRange {
|
|
5
|
+
/** Range start, inclusive - `'YYYY-MM-DD'`. */
|
|
6
|
+
start: string;
|
|
7
|
+
/** Range end, inclusive - `'YYYY-MM-DD'`. Never before `start`. */
|
|
8
|
+
end: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function drpRangeText(start: string, end: string): string;
|
|
11
|
+
interface DrpPanelProps {
|
|
12
|
+
value: DateRange | null;
|
|
13
|
+
commit: (value: DateRange) => void;
|
|
14
|
+
close: () => void;
|
|
15
|
+
min?: string;
|
|
16
|
+
max?: string;
|
|
17
|
+
timezone?: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
months: number;
|
|
20
|
+
layout: 'popover' | 'sheet';
|
|
21
|
+
activateOn?: ActivateOn;
|
|
22
|
+
}
|
|
23
|
+
export declare function DrpPanel({ value, commit, close, min, max, timezone, label, months, layout, activateOn, }: DrpPanelProps): import("react").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './date-picker.css';
|
|
2
|
+
export interface TimeSegmentsProps {
|
|
3
|
+
value?: string | null;
|
|
4
|
+
onCommit?: (value: string) => void;
|
|
5
|
+
format?: '24h' | '12h';
|
|
6
|
+
minuteStep?: number;
|
|
7
|
+
min?: string | null;
|
|
8
|
+
max?: string | null;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const disp12: (h24: number) => number;
|
|
14
|
+
export declare function TimeSegments({ value, onCommit, format, minuteStep, min, max, disabled, ariaLabel, className, }: TimeSegmentsProps): import("react").JSX.Element;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactElement, ReactNode
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
|
|
7
|
-
interface DialogProps {
|
|
1
|
+
import './dialog.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 DialogProps {
|
|
8
7
|
/** Controlled open state. Omit for uncontrolled (use defaultOpen + trigger). */
|
|
9
8
|
open?: boolean;
|
|
10
9
|
/** Initial open 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
|
-
/** Optional element cloned to open the dialog
|
|
13
|
+
/** Optional element cloned to open the dialog (uncontrolled ergonomics). */
|
|
15
14
|
trigger?: ReactElement | null;
|
|
15
|
+
/** Whether the trigger fires on `pointerdown` (snappier) or waits for `click`. @default 'click' */
|
|
16
|
+
activateOn?: ActivateOn;
|
|
16
17
|
/** Header title - rendered as the `<h2>` and wired to `aria-labelledby`. */
|
|
17
18
|
title?: ReactNode;
|
|
18
19
|
/** Subtext under the title - wired to `aria-describedby`. @default null */
|
|
@@ -40,6 +41,4 @@ interface DialogProps {
|
|
|
40
41
|
/** Open/close timing - motion tokens only, or `null` to disable. @default open 'slow'/'entrance', close 'base'/'standard' */
|
|
41
42
|
animation?: DisableableAnimation;
|
|
42
43
|
}
|
|
43
|
-
declare function Dialog({ open: controlledOpen, defaultOpen, onOpenChange, trigger, title, description, size, tone, icon, dismissible, container, footer, children, id, htmlProps, animation, }: DialogProps): react.JSX.Element;
|
|
44
|
-
|
|
45
|
-
export { Dialog, type DialogProps };
|
|
44
|
+
export declare function Dialog({ open: controlledOpen, defaultOpen, onOpenChange, trigger, activateOn, title, description, size, tone, icon, dismissible, container, footer, children, id, htmlProps, animation, }: DialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import './dropdown.css';
|
|
2
|
+
import { type HTMLAttributes, type ReactElement } 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 DropdownItem, type DropdownItems } from './types';
|
|
7
|
+
export type { DropdownItem, DropdownGroup } from './types';
|
|
8
|
+
export interface DropdownProps {
|
|
9
|
+
/** The rows - a flat `DropdownItem[]`, or `DropdownGroup[]` to render divided sections.
|
|
10
|
+
* A row with its own `items` opens a submenu instead of committing. @default [] */
|
|
11
|
+
items: DropdownItems;
|
|
12
|
+
/** Cloned to toggle the menu, and used as the anchor. Gets the `aria-haspopup="menu"` wiring. */
|
|
13
|
+
trigger: ReactElement;
|
|
14
|
+
/** Whether the trigger and the rows fire on `pointerdown` (snappier) or wait for `click`. @default 'pointerdown' */
|
|
15
|
+
activateOn?: ActivateOn;
|
|
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 item. Committing closes every level. */
|
|
23
|
+
onSelect?: (id: string, item: DropdownItem) => void;
|
|
24
|
+
/** Preferred side of the trigger; flips to the opposite side when cramped. @default 'bottom' */
|
|
25
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
26
|
+
/** Cross-axis alignment against the trigger. Submenus always align to their row. @default 'start' */
|
|
27
|
+
align?: 'start' | 'center' | 'end';
|
|
28
|
+
/** Base id for the menu and its rows; drives the trigger's `aria-controls`. Auto-generated when omitted. */
|
|
29
|
+
id?: string;
|
|
30
|
+
/** Accessible name for the menu - supply when the trigger's own label does not describe it. */
|
|
31
|
+
ariaLabel?: string;
|
|
32
|
+
/** Standard attributes (className, style, data-*, ...) forwarded to the top-level menu panel. */
|
|
33
|
+
htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
34
|
+
/** Open/close timing - motion tokens only, or `null` to disable. @default open 'base'/'entrance', close 'fast'/'exit' */
|
|
35
|
+
animation?: DisableableAnimation;
|
|
36
|
+
}
|
|
37
|
+
export declare function Dropdown({ items, trigger, activateOn, open: controlledOpen, defaultOpen, onOpenChange, onSelect, side, align, id, ariaLabel, htmlProps, animation, }: DropdownProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '../../internal/menu/menu-surface.css';
|
|
2
|
+
import { type MotionSpecs } from '../../../motion/use-motion';
|
|
3
|
+
import { type MenuChain } from './types';
|
|
4
|
+
export declare function MenuPanel({ chain, depth, ...motion }: {
|
|
5
|
+
chain: MenuChain;
|
|
6
|
+
depth: number;
|
|
7
|
+
} & MotionSpecs): import("react").JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
3
|
+
import { type NormalizedGroup } from '../../internal/collection/collection';
|
|
4
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
5
|
+
export interface DropdownItem {
|
|
6
|
+
/** Unique id - what `onSelect` receives, and what identifies this row's open submenu. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Primary row text. */
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
/** Optional secondary line under the label. */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Your own icon node shown before the label. */
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/** Keyboard hint shown at the trailing edge, mono. Display only - you still bind the key. */
|
|
15
|
+
shortcut?: string;
|
|
16
|
+
/** Destructive action - the row reads in the danger hue. @default false */
|
|
17
|
+
danger?: boolean;
|
|
18
|
+
/** Not selectable - skipped by arrow keys and typeahead, and marked `aria-disabled`. @default false */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Nested menu. The row opens it instead of committing, and can nest again without limit. */
|
|
21
|
+
items?: DropdownItem[] | DropdownGroup[];
|
|
22
|
+
/** Text used for typeahead. Required when `label` is not a string. */
|
|
23
|
+
searchText?: string;
|
|
24
|
+
/** Fires when this row commits, before the menu's own `onSelect`. */
|
|
25
|
+
onSelect?: () => void;
|
|
26
|
+
}
|
|
27
|
+
export interface DropdownGroup {
|
|
28
|
+
/** Section heading rendered above the rows; omit for an unlabeled but still divided group. */
|
|
29
|
+
label?: string;
|
|
30
|
+
/** The rows in this section. */
|
|
31
|
+
items: DropdownItem[];
|
|
32
|
+
}
|
|
33
|
+
export type DropdownItems = DropdownItem[] | DropdownGroup[];
|
|
34
|
+
export declare const normalize: (source: DropdownItems) => {
|
|
35
|
+
groups: NormalizedGroup<DropdownItem>[];
|
|
36
|
+
flat: DropdownItem[];
|
|
37
|
+
};
|
|
38
|
+
export declare const itemText: (item: DropdownItem) => string;
|
|
39
|
+
export declare const submenuOf: (item: DropdownItem) => DropdownItems | null;
|
|
40
|
+
export declare const ROOT_LEVEL = "root";
|
|
41
|
+
export declare const levelKey: (depth: number, ownerId: string) => string;
|
|
42
|
+
export interface Level {
|
|
43
|
+
key: string;
|
|
44
|
+
items: DropdownItems;
|
|
45
|
+
owner: DropdownItem | null;
|
|
46
|
+
ownerIdx: number;
|
|
47
|
+
}
|
|
48
|
+
export declare function resolveLevels(items: DropdownItems, path: string[]): Level[];
|
|
49
|
+
export type SeedFocus = 'first' | 'last' | 'none';
|
|
50
|
+
export interface MenuChain {
|
|
51
|
+
levels: Level[];
|
|
52
|
+
menuId: string;
|
|
53
|
+
activateOn?: ActivateOn;
|
|
54
|
+
side: 'top' | 'bottom' | 'left' | 'right';
|
|
55
|
+
align: 'start' | 'center' | 'end';
|
|
56
|
+
ariaLabel?: string;
|
|
57
|
+
htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
58
|
+
seed: {
|
|
59
|
+
key: string;
|
|
60
|
+
focus: SeedFocus;
|
|
61
|
+
};
|
|
62
|
+
hoverDepth: {
|
|
63
|
+
current: number;
|
|
64
|
+
};
|
|
65
|
+
refFor: (key: string) => RefObject<HTMLElement>;
|
|
66
|
+
openSub: (depth: number, item: DropdownItem, focus: SeedFocus) => void;
|
|
67
|
+
closeSub: (depth: number) => void;
|
|
68
|
+
cancel: (depth: number) => void;
|
|
69
|
+
dismiss: (returnFocus: boolean) => void;
|
|
70
|
+
select: (item: DropdownItem) => void;
|
|
71
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import './styles.css';
|
|
2
|
+
import { type ReactElement, type Ref } from 'react';
|
|
3
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
4
|
+
import { type PopoverProps } from '../popover/Popover';
|
|
5
|
+
import { type SheetProps } from '../sheet/Sheet';
|
|
6
|
+
import { type EmojiPickerStore } from './react/useEmojiPicker';
|
|
7
|
+
import type { GetEmojiUrl } from './types';
|
|
8
|
+
export { loadEmojiData, onEmojiDataLoaded, type EmojiData, type Emoji } from './data';
|
|
9
|
+
export { getEmojiUrl } from './getEmojiUrl';
|
|
10
|
+
export type { GetEmojiUrl, EmojiUrlSource } from './types';
|
|
11
|
+
export declare const SHEET_BREAKPOINT = "(max-width: 40rem)";
|
|
12
|
+
type Forwarded = 'open' | 'onOpenChange' | 'trigger' | 'children' | 'htmlProps';
|
|
13
|
+
export type EmojiPickerHandle = Pick<EmojiPickerStore, 'renderAll' | 'renderFiltered' | 'handleKey' | 'selectFocused'>;
|
|
14
|
+
export interface EmojiPickerPanelProps {
|
|
15
|
+
/** Controlled open state - the panel has no uncontrolled mode. */
|
|
16
|
+
open: boolean;
|
|
17
|
+
/** Fires whenever the panel asks to open or close: trigger press, Esc, outside press, sheet drag. */
|
|
18
|
+
onOpenChange: (open: boolean) => void;
|
|
19
|
+
/** Fires on pick, with the primary shortcode (`smile`, no colons) and the emoji's hex id. */
|
|
20
|
+
onSelect: (shortcode: string, hexId: string) => void;
|
|
21
|
+
/** Builds the image URL for one emoji at one call site. Pass the bundled `getEmojiUrl` to use Twemoji and Noto. */
|
|
22
|
+
getEmojiUrl: GetEmojiUrl;
|
|
23
|
+
/** Element that both opens the panel and anchors it, when there is no anchor. */
|
|
24
|
+
trigger?: ReactElement | null;
|
|
25
|
+
/** Gap in pixels between a custom `popoverProps.anchor` and the panel. Ignored when the panel anchors to its trigger. */
|
|
26
|
+
offset?: number;
|
|
27
|
+
/** Render the panel's own search field. Always on in sheet mode, where the
|
|
28
|
+
* sheet traps focus and an outside query can no longer reach the panel. */
|
|
29
|
+
search?: boolean;
|
|
30
|
+
/** Drive the results from outside — a `:` chip in a document, your own input. */
|
|
31
|
+
query?: string;
|
|
32
|
+
/** Whether the trigger, an emoji and a category fire on `pointerdown` (snappier) or wait for `click`. @default 'click' */
|
|
33
|
+
activateOn?: ActivateOn;
|
|
34
|
+
/** Viewport at which the panel becomes a bottom sheet. */
|
|
35
|
+
breakpoint?: string;
|
|
36
|
+
/** Desktop placement — `anchor`, `side`, `align`, `arrow`, and every other Popover knob. */
|
|
37
|
+
popoverProps?: Omit<PopoverProps, Forwarded>;
|
|
38
|
+
/** Narrow-viewport docking — `container`, `dismissible`, and every other Sheet knob. */
|
|
39
|
+
sheetProps?: Omit<SheetProps, Forwarded | 'side'>;
|
|
40
|
+
/** Extra class(es) merged onto the panel frame. */
|
|
41
|
+
className?: string;
|
|
42
|
+
/** Imperative handle - drive the grid from your own field: `handleKey`, `selectFocused`, `renderAll`, `renderFiltered`. */
|
|
43
|
+
ref?: Ref<EmojiPickerHandle>;
|
|
44
|
+
}
|
|
45
|
+
export declare function EmojiPickerPanel({ open, onOpenChange, onSelect, getEmojiUrl, trigger, offset, search, query, activateOn, breakpoint, popoverProps, sheetProps, className, ref, }: EmojiPickerPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CATEGORY_ICONS: Record<string, string>;
|
|
2
|
+
export declare const CATEGORY_ICON_ATTRS: {
|
|
3
|
+
readonly viewBox: "0 0 24 24";
|
|
4
|
+
readonly fill: "none";
|
|
5
|
+
readonly stroke: "currentColor";
|
|
6
|
+
readonly strokeWidth: 2;
|
|
7
|
+
readonly strokeLinecap: "round";
|
|
8
|
+
readonly strokeLinejoin: "round";
|
|
9
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface EmojiSkin {
|
|
2
|
+
unified: string;
|
|
3
|
+
native: string;
|
|
4
|
+
tone?: number | number[];
|
|
5
|
+
}
|
|
6
|
+
export interface Emoji {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
unicode: string;
|
|
10
|
+
tags: string[];
|
|
11
|
+
skins: EmojiSkin[];
|
|
12
|
+
group: number;
|
|
13
|
+
shortcodes: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface EmojiCategory {
|
|
16
|
+
id: string;
|
|
17
|
+
icon: string;
|
|
18
|
+
emojis: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface EmojiData {
|
|
21
|
+
emojis: Record<string, Emoji>;
|
|
22
|
+
categories: EmojiCategory[];
|
|
23
|
+
}
|
|
24
|
+
/** Run `cb` once the emoji data is available. Fires immediately if already loaded. */
|
|
25
|
+
export declare function onEmojiDataLoaded(cb: () => void): () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Load the emoji dataset. Pass a URL to fetch it, or an already-parsed
|
|
28
|
+
* `EmojiData` object to install it directly. Idempotent — the first call wins.
|
|
29
|
+
*/
|
|
30
|
+
export declare function loadEmojiData(loader: string | EmojiData): Promise<EmojiData>;
|
|
31
|
+
/** Synchronous access — only valid after loadEmojiData() has resolved */
|
|
32
|
+
export declare function getEmojiData(): EmojiData | null;
|
|
33
|
+
export declare function getEmojiArray(): Emoji[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GetEmojiUrl } from './types';
|
|
2
|
+
export declare const COLUMN_COUNT = 8;
|
|
3
|
+
export interface GridSection {
|
|
4
|
+
key: string;
|
|
5
|
+
header: HTMLElement;
|
|
6
|
+
start: number;
|
|
7
|
+
count: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const el: <K extends keyof HTMLElementTagNameMap>(tag: K, className: string) => HTMLElementTagNameMap[K];
|
|
10
|
+
export declare function createEmojiGrid(scroll: HTMLDivElement, getEmojiUrl: GetEmojiUrl, tileIdPrefix: string): {
|
|
11
|
+
buttons: HTMLButtonElement[];
|
|
12
|
+
sections: GridSection[];
|
|
13
|
+
timers: number[];
|
|
14
|
+
addCategory: (title: string, key: string, ids: string[]) => void;
|
|
15
|
+
showEmpty: (message: string) => void;
|
|
16
|
+
clear: () => void;
|
|
17
|
+
indexOfKey: (key: string) => number;
|
|
18
|
+
destroy: () => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type GridSection } from './dom';
|
|
2
|
+
export declare function createNavigator(buttons: HTMLButtonElement[], sections: GridSection[], onFocus: (button: HTMLButtonElement | null) => void): {
|
|
3
|
+
setFocus: (next: number, scroll?: boolean) => void;
|
|
4
|
+
handleKey: (event: KeyboardEvent, onEnter: () => void) => boolean;
|
|
5
|
+
reset: () => void;
|
|
6
|
+
getFocusedIdx: () => number;
|
|
7
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ActivateOn } from '../../internal/utils/activation';
|
|
2
|
+
import type { GetEmojiUrl } from './types';
|
|
3
|
+
export interface EmojiPickerOptions {
|
|
4
|
+
onSelect: (shortcode: string, id: string) => void;
|
|
5
|
+
getEmojiUrl: GetEmojiUrl;
|
|
6
|
+
listboxId: string;
|
|
7
|
+
getFocusHost?: () => HTMLElement | null;
|
|
8
|
+
getActivateOn?: () => ActivateOn | undefined;
|
|
9
|
+
onCategoriesChange?: (keys: string[]) => void;
|
|
10
|
+
onActiveCategoryChange?: (key: string | null) => void;
|
|
11
|
+
}
|
|
12
|
+
export type EmojiPickerApi = ReturnType<typeof createEmojiPicker>;
|
|
13
|
+
export declare function createEmojiPicker(root: HTMLElement, options: EmojiPickerOptions): {
|
|
14
|
+
renderAll: () => void;
|
|
15
|
+
renderFiltered: (query: string) => void;
|
|
16
|
+
scrollToCategory: (key: string) => void;
|
|
17
|
+
handleKey: (event: KeyboardEvent) => boolean;
|
|
18
|
+
selectFocused: () => void;
|
|
19
|
+
destroy: () => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ActivateOn } from '../../../internal/utils/activation';
|
|
2
|
+
import { type EmojiPickerStore } from './useEmojiPicker';
|
|
3
|
+
export declare function CategoryBar({ store, activateOn }: {
|
|
4
|
+
store: EmojiPickerStore;
|
|
5
|
+
activateOn?: ActivateOn;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ActivateOn } from '../../../internal/utils/activation';
|
|
2
|
+
import type { GetEmojiUrl } from '../types';
|
|
3
|
+
export interface UseEmojiPickerOptions {
|
|
4
|
+
onSelect: (shortcode: string, hexId: string) => void;
|
|
5
|
+
getEmojiUrl: GetEmojiUrl;
|
|
6
|
+
/** Drive the results from outside — a `:` chip in a document, your own input. */
|
|
7
|
+
query?: string;
|
|
8
|
+
/** Whether picking an emoji fires on `pointerdown` (snappier) or waits for `click`. @default 'click' */
|
|
9
|
+
activateOn?: ActivateOn;
|
|
10
|
+
}
|
|
11
|
+
export type EmojiPickerStore = ReturnType<typeof createEmojiPickerStore>;
|
|
12
|
+
type Handlers = Pick<UseEmojiPickerOptions, 'onSelect' | 'getEmojiUrl' | 'activateOn'>;
|
|
13
|
+
export declare function createEmojiPickerStore(listboxId: string, handlers: Handlers): {
|
|
14
|
+
/** Spread onto the field that drives the picker: combobox roles, already pointing at the grid. */
|
|
15
|
+
searchProps: {
|
|
16
|
+
readonly role: "combobox";
|
|
17
|
+
readonly 'aria-expanded': true;
|
|
18
|
+
readonly 'aria-autocomplete': "list";
|
|
19
|
+
readonly 'aria-controls': string;
|
|
20
|
+
};
|
|
21
|
+
/** Callback ref for the element the picker takes over. The grid is built the moment the node
|
|
22
|
+
* arrives, which for a popover is a commit or two after the hook first ran. */
|
|
23
|
+
mount: (node: HTMLDivElement | null) => void;
|
|
24
|
+
/** Callback ref for the field that keeps focus while the grid is navigated, or anything wrapping it.
|
|
25
|
+
* The picker moves `aria-activedescendant` on it directly, so running the marker down 1900 tiles
|
|
26
|
+
* never costs a render. */
|
|
27
|
+
searchRef: (node: HTMLElement | null) => void;
|
|
28
|
+
setHandlers: (next: Handlers) => void;
|
|
29
|
+
subscribe: (listener: () => void) => () => void;
|
|
30
|
+
getCategories: () => string[];
|
|
31
|
+
isActive: (key: string) => boolean;
|
|
32
|
+
render: (next?: string) => void;
|
|
33
|
+
scrollToCategory: (key: string) => void;
|
|
34
|
+
/** Redraw the full category grid, dropping whatever query was showing. */
|
|
35
|
+
renderAll: () => void;
|
|
36
|
+
/** Redraw the grid as the ranked results for `next`, with the first hit already marked. */
|
|
37
|
+
renderFiltered: (next: string) => void;
|
|
38
|
+
/** Feed a key event from your own field into the grid - arrows move, Enter picks.
|
|
39
|
+
* Returns true when the grid consumed the key, so you can leave the rest to your input. */
|
|
40
|
+
handleKey: (event: KeyboardEvent) => boolean;
|
|
41
|
+
/** Commit the tile the marker is on, exactly as a click on it would. */
|
|
42
|
+
selectFocused: () => void;
|
|
43
|
+
};
|
|
44
|
+
export declare function useEmojiPicker({ onSelect, getEmojiUrl, query, activateOn }: UseEmojiPickerOptions): EmojiPickerStore;
|
|
45
|
+
/** Category keys the grid currently holds; empty while showing search results. */
|
|
46
|
+
export declare const useCategories: (store: EmojiPickerStore) => string[];
|
|
47
|
+
/** Whether the scroll position is inside this category. Subscribing per key means a scrollspy
|
|
48
|
+
* tick re-renders the two rows whose state flipped, not the panel. */
|
|
49
|
+
export declare const useIsActiveCategory: (store: EmojiPickerStore, key: string) => boolean;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EmojiData } from './data';
|
|
2
|
+
import type { GetEmojiUrl } from './types';
|
|
3
|
+
export declare function createScaffold(root: HTMLElement, emojiData: EmojiData, getEmojiUrl: GetEmojiUrl, listboxId: string): {
|
|
4
|
+
scroll: HTMLDivElement;
|
|
5
|
+
setCaption: (btn: HTMLButtonElement | null) => void;
|
|
6
|
+
positionMarker: (btn: HTMLButtonElement | null) => void;
|
|
7
|
+
mountMarker: () => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getRankedEmojiIds: (query: string) => string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the emoji is being rendered. It's metadata for
|
|
3
|
+
* {@link GetEmojiUrl} — consumers can vary provider, size, or format per
|
|
4
|
+
* context, or ignore it entirely.
|
|
5
|
+
*
|
|
6
|
+
* - `"inline"` — inline within editor text (small)
|
|
7
|
+
* - `"picker-grid"` — main grid in the picker panel (medium)
|
|
8
|
+
* - `"category-bar"` — category tab icons (small, often animated)
|
|
9
|
+
* - `"callout-icon"` — callout block leading icon (medium)
|
|
10
|
+
*/
|
|
11
|
+
export type EmojiUrlSource = 'inline' | 'picker-grid' | 'category-bar' | 'callout-icon';
|
|
12
|
+
/** Returns a URL for an emoji image. */
|
|
13
|
+
export type GetEmojiUrl = (hexId: string, source: EmojiUrlSource) => string;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
|
|
7
|
-
interface ModalProps {
|
|
1
|
+
import './modal.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 ModalProps {
|
|
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 modal
|
|
13
|
+
/** Cloned to open the modal. */
|
|
15
14
|
trigger?: ReactElement | null;
|
|
15
|
+
/** Whether the trigger fires on `pointerdown` (snappier) or waits for `click`. @default 'click' */
|
|
16
|
+
activateOn?: ActivateOn;
|
|
16
17
|
/** Scrim/Esc dismissal. Default true. */
|
|
17
18
|
dismissible?: boolean;
|
|
18
19
|
/** Mount inside this element instead of the viewport - it must be positioned (`position: relative` or similar).
|
|
@@ -30,6 +31,4 @@ interface ModalProps {
|
|
|
30
31
|
/** The ENTIRE surface - paint AND semantics (`role="dialog"`, a label). Nothing is painted for you. */
|
|
31
32
|
children: ReactNode;
|
|
32
33
|
}
|
|
33
|
-
declare function Modal({ open: controlledOpen, defaultOpen, onOpenChange, trigger, dismissible, container, id, htmlProps, layerProps, animation, children, }: ModalProps): react.JSX.Element;
|
|
34
|
-
|
|
35
|
-
export { Modal, type ModalProps };
|
|
34
|
+
export declare function Modal({ open: controlledOpen, defaultOpen, onOpenChange, trigger, activateOn, dismissible, container, id, htmlProps, layerProps, animation, children, }: ModalProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
interface PaginationProps {
|
|
1
|
+
import './pagination.css';
|
|
2
|
+
import { type HTMLAttributes } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
export interface PaginationProps {
|
|
6
5
|
/** Accessible name for the nav landmark - name the list ("Posts"), not "pagination". @default 'Pagination' */
|
|
7
6
|
ariaLabel?: string;
|
|
8
7
|
/** Items currently shown, 1-based inclusive: `[from, to]` (e.g. `[26, 50]`). */
|
|
@@ -24,6 +23,4 @@ interface PaginationProps {
|
|
|
24
23
|
/** Standard <nav> attributes (style, data-*, aria-*, ...) forwarded to the root. */
|
|
25
24
|
htmlProps?: Omit<HTMLAttributes<HTMLElement>, 'className'> & DataAttributes;
|
|
26
25
|
}
|
|
27
|
-
declare function Pagination({ ariaLabel, range, total, hasPrev, hasNext, onPrev, onNext, loading, className, htmlProps, }: PaginationProps): react.JSX.Element;
|
|
28
|
-
|
|
29
|
-
export { Pagination, type PaginationProps };
|
|
26
|
+
export declare function Pagination({ ariaLabel, range, total, hasPrev, hasNext, onPrev, onNext, loading, className, htmlProps, }: PaginationProps): import("react").JSX.Element;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface PopoverProps {
|
|
1
|
+
import './popover.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 VirtualAnchor } from '../../internal/overlay/position';
|
|
6
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
7
|
+
export type { VirtualAnchor };
|
|
8
|
+
export interface PopoverProps {
|
|
12
9
|
/** Controlled open state. Omit to stay uncontrolled. */
|
|
13
10
|
open?: boolean;
|
|
14
11
|
/** Initial state when uncontrolled. Default false. */
|
|
@@ -17,6 +14,8 @@ interface PopoverProps {
|
|
|
17
14
|
onOpenChange?: (open: boolean) => void;
|
|
18
15
|
/** Cloned to toggle the panel, and used as the anchor unless `anchor` is set. */
|
|
19
16
|
trigger?: ReactElement | null;
|
|
17
|
+
/** Whether the trigger fires on `pointerdown` (snappier) or waits for `click`. @default 'click' */
|
|
18
|
+
activateOn?: ActivateOn;
|
|
20
19
|
/** Anchor to an arbitrary rect instead of the trigger - any `{ getBoundingClientRect() }`, which an element also satisfies.
|
|
21
20
|
* Drive `open` yourself; pass a new object to re-place a moving anchor. */
|
|
22
21
|
anchor?: VirtualAnchor | null;
|
|
@@ -37,6 +36,4 @@ interface PopoverProps {
|
|
|
37
36
|
/** The ENTIRE surface - paint AND semantics. Drive dismissal with `open`/`onOpenChange`. */
|
|
38
37
|
children: ReactNode;
|
|
39
38
|
}
|
|
40
|
-
declare function Popover({ open: controlledOpen, defaultOpen, onOpenChange, trigger, anchor, side, align, arrow, dismissible, id, htmlProps, animation, children, }: PopoverProps): react.JSX.Element;
|
|
41
|
-
|
|
42
|
-
export { Popover, type PopoverProps, type VirtualAnchor };
|
|
39
|
+
export declare function Popover({ open: controlledOpen, defaultOpen, onOpenChange, trigger, activateOn, anchor, side, align, arrow, dismissible, id, htmlProps, animation, children, }: PopoverProps): import("react").JSX.Element;
|