@jfrader/ui 0.5.0 → 0.6.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 +18 -1
- package/dist/accordion-D6myONB9.js +206 -0
- package/dist/accordion.js +1 -1
- package/dist/activity-rings-Uszvwqdl.js +528 -0
- package/dist/activity-rings.js +2 -0
- package/dist/{alert-DS_einpy.js → alert-Bhj-qSMs.js} +15 -14
- package/dist/alert.js +1 -1
- package/dist/{announcement-bar-B58xempt.js → announcement-bar-B5J33QUh.js} +132 -131
- package/dist/announcement-bar.js +1 -1
- package/dist/avatar-B6idYC59.js +146 -0
- package/dist/{avatar-group-DOQQuV51.js → avatar-group-DvP8mAE-.js} +10 -9
- package/dist/avatar-group.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge-CfhTcA-Z.js +120 -0
- package/dist/badge.js +1 -1
- package/dist/billing-toggle-CgC7yxxo.js +349 -0
- package/dist/billing-toggle.js +2 -0
- package/dist/{bottom-sheet-DPJBFkie.js → bottom-sheet-BFQKO0Wo.js} +287 -268
- package/dist/bottom-sheet.js +1 -1
- package/dist/{breadcrumbs-Cfw_hgt2.js → breadcrumbs-CG3akw-b.js} +28 -20
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-C92uYFJW.js → button-C6OV0C7J.js} +21 -20
- package/dist/button-group-B9wP2ddS.js +611 -0
- package/dist/button-group.js +2 -0
- package/dist/button.js +1 -1
- package/dist/calendar-Bg6D2sul.js +377 -0
- package/dist/calendar.js +1 -1
- package/dist/calendar.utils-azmB4Ej7.js +79 -0
- package/dist/card-C008OQCp.js +164 -0
- package/dist/card.js +1 -1
- package/dist/carousel-lTH4Foke.js +475 -0
- package/dist/carousel.js +1 -1
- package/dist/chat-thread-DVa17BRC.js +864 -0
- package/dist/chat-thread.js +2 -0
- package/dist/{checkbox-cFquiSdy.js → checkbox-CClE61GV.js} +23 -21
- package/dist/checkbox.js +1 -1
- package/dist/{chip-group-DTQd_M-G.js → chip-group-BZUX9KPF.js} +19 -17
- package/dist/chip-group.js +1 -1
- package/dist/{choice-control-5kJkLXgv.js → choice-control-BsWOZPc9.js} +1 -1
- package/dist/{code-block-ahnRi-g8.js → code-block-CYP89_6h.js} +99 -97
- package/dist/code-block.js +1 -1
- package/dist/{combobox-Bhzvu9ma.js → combobox-D2Oc-co7.js} +131 -125
- package/dist/combobox.js +1 -1
- package/dist/command-palette-BrT1n9bb.js +394 -0
- package/dist/command-palette.js +1 -1
- package/dist/comment-thread-BnUHxviq.js +772 -0
- package/dist/comment-thread.js +2 -0
- package/dist/{container-BOaSptJa.js → container-BxtwJSSD.js} +3 -2
- package/dist/container.js +1 -1
- package/dist/context-menu-I4i0LRpm.js +371 -0
- package/dist/context-menu.js +2 -0
- package/dist/{copy-button-ByiA6D3R.js → copy-button-C0p_qrgf.js} +4 -4
- package/dist/copy-button.js +1 -1
- package/dist/{countdown-Dp_TD1VP.js → countdown-EcpV6rXy.js} +18 -17
- package/dist/countdown.js +1 -1
- package/dist/css-BYJhdGh-.js +2 -0
- package/dist/{date-picker-5zKSSuFF.js → date-picker-D-bn-iHs.js} +15 -14
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-rXcZsI1Y.js +589 -0
- package/dist/date-range-picker.js +1 -1
- package/dist/dialog-CR1xdkrC.js +222 -0
- package/dist/dialog.js +1 -1
- package/dist/{divider-DYoJf0I_.js → divider-zOJzkcHh.js} +23 -21
- package/dist/divider.js +1 -1
- package/dist/drawer-CceaEhCr.js +590 -0
- package/dist/drawer.js +1 -1
- package/dist/{empty-state-CDgrjPPf.js → empty-state-DO0ApylK.js} +2 -1
- package/dist/empty-state.js +1 -1
- package/dist/{expandable-card-C-qJcZ14.js → expandable-card-W97vjix9.js} +59 -51
- package/dist/expandable-card.js +1 -1
- package/dist/expanding-search-Bb2_YfNx.js +239 -0
- package/dist/expanding-search.js +2 -0
- package/dist/{field-anatomy-COVdNpf5.js → field-anatomy-BDIP42MI.js} +2 -1
- package/dist/file-dropzone-Bi5ikRIz.js +458 -0
- package/dist/file-dropzone.js +1 -1
- package/dist/{filter-toolbar-D5KEKTSe.js → filter-toolbar-QRnC4S_H.js} +36 -33
- package/dist/filter-toolbar.js +1 -1
- package/dist/{flex-Dh-_J5-U.js → flex-CS7eMRcK.js} +2 -2
- package/dist/flex.js +1 -1
- package/dist/{hold-to-confirm-DjB2EVjM.js → hold-to-confirm-CVBA0wNT.js} +18 -17
- package/dist/hold-to-confirm.js +1 -1
- package/dist/{hover-card-B-nrCIy2.js → hover-card-DN1EAlQA.js} +26 -25
- package/dist/hover-card.js +1 -1
- package/dist/{icon-wrapper-stN8sD7R.js → icon-wrapper-C-zMD0uL.js} +1 -1
- package/dist/{image-compare-ciuhPtQZ.js → image-compare-Ln2UUqTU.js} +20 -19
- package/dist/image-compare.js +1 -1
- package/dist/index.js +98 -78
- package/dist/{inline-edit-C0eeml65.js → inline-edit-D-pR2RPC.js} +22 -21
- package/dist/inline-edit.js +1 -1
- package/dist/{input-control-DmMuAuPS.js → input-control-B6HVBgwl.js} +1 -1
- package/dist/{json-viewer-BcySQfjZ.js → json-viewer-Dro3WrjS.js} +34 -29
- package/dist/json-viewer.js +1 -1
- package/dist/{kbd-C3ACoMoE.js → kbd-BI_9qzYr.js} +2 -1
- package/dist/kbd.js +1 -1
- package/dist/keycap-keyboard-Cdx-OAS1.js +311 -0
- package/dist/keycap-keyboard.js +2 -0
- package/dist/{layout-style-Cbd1Vilw.js → layout-style-BE0gSqrH.js} +1 -1
- package/dist/lightbox-gallery-D0YaSTut.js +777 -0
- package/dist/lightbox-gallery.js +2 -0
- package/dist/link-unfurl-CReyIjyy.js +695 -0
- package/dist/link-unfurl.js +2 -0
- package/dist/{listbox-style-WX-RASp1.js → listbox-style-DNOxAulu.js} +1 -1
- package/dist/{loading-ring-B8-30Dl1.js → loading-ring-D0lGrK8z.js} +1 -1
- package/dist/locale-switcher-CZF7XNYG.js +295 -0
- package/dist/locale-switcher.js +2 -0
- package/dist/mention-input-BjjAbJCf.js +600 -0
- package/dist/mention-input.js +1 -1
- package/dist/menu-CVzpsyXn.js +312 -0
- package/dist/menu.js +1 -1
- package/dist/{metric-card-Bh9K4fZs.js → metric-card-BnFssTXj.js} +12 -11
- package/dist/metric-card.js +1 -1
- package/dist/{multi-select-Pce_IYnz.js → multi-select-B3puEVo0.js} +78 -69
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-sP5fiuQS.js → navigation-C_JD43gA.js} +56 -49
- package/dist/navigation.js +1 -1
- package/dist/next.js +65 -0
- package/dist/now-playing-DjVm1Phm.js +439 -0
- package/dist/now-playing.js +2 -0
- package/dist/{overlay-layer-SeUyyEPD.js → overlay-layer-qEbpEtb8.js} +16 -2
- package/dist/overlay-motion-Cr77ihn2.js +90 -0
- package/dist/{overlay-portal-C4JZFq2M.js → overlay-portal-C9igMHnC.js} +1 -1
- package/dist/{pagination-DmXZ8E85.js → pagination-Dkh4bJQh.js} +31 -29
- package/dist/pagination.js +1 -1
- package/dist/{password-field-03pWRkuY.js → password-field-Da58GP1g.js} +4 -4
- package/dist/password-field.js +1 -1
- package/dist/photo-grid-Dtl17D74.js +830 -0
- package/dist/photo-grid.js +2 -0
- package/dist/pill-Dd7pog19.js +59 -0
- package/dist/pill.js +1 -1
- package/dist/popover-CUMOcMtj.js +126 -0
- package/dist/popover.js +1 -1
- package/dist/presence-spring-4zwtUDQN.js +12 -0
- package/dist/{progress-CbOWBUdA.js → progress-Bcuz3Ob4.js} +12 -11
- package/dist/progress.js +1 -1
- package/dist/{radio-cards-D2QZENI_.js → radio-cards-FkAhESb5.js} +65 -63
- package/dist/radio-cards.js +1 -1
- package/dist/{radio-group-E6mMRgo7.js → radio-group-DItMf2YM.js} +32 -28
- package/dist/radio-group.js +1 -1
- package/dist/{resizable-panels-BhjUVXZZ.js → resizable-panels-61h9hA3B.js} +16 -14
- package/dist/resizable-panels.js +1 -1
- package/dist/{scroll-area-CcZyiSOQ.js → scroll-area-B8KkCPOM.js} +16 -15
- package/dist/scroll-area.js +1 -1
- package/dist/{search-field-IxF0IJXm.js → search-field-CbsajaZb.js} +94 -93
- package/dist/search-field.js +1 -1
- package/dist/{segmented-control-yO1K1nbi.js → segmented-control-DCh-4ca-.js} +28 -26
- package/dist/segmented-control.js +1 -1
- package/dist/{select-n_H52W1Z.js → select-SrcQqZjo.js} +29 -27
- package/dist/select.js +1 -1
- package/dist/sheet-stack-DYX1SGSB.js +820 -0
- package/dist/sheet-stack.js +2 -0
- package/dist/shortcut-recorder-VgTQdjjn.js +688 -0
- package/dist/shortcut-recorder.js +2 -0
- package/dist/signature-pad-khL2yhQI.js +646 -0
- package/dist/signature-pad.js +1 -1
- package/dist/{skeleton-XQQDkCHd.js → skeleton-LJsQsveI.js} +9 -8
- package/dist/skeleton.js +1 -1
- package/dist/slider-DjAnGmlC.js +535 -0
- package/dist/slider.js +1 -1
- package/dist/{sortable-data-table-tirqlLY2.js → sortable-data-table-Bpitup_d.js} +29 -28
- package/dist/sortable-data-table.js +1 -1
- package/dist/{spinner-DtxvDPdM.js → spinner-CvzajSg9.js} +11 -10
- package/dist/spinner.js +1 -1
- package/dist/{split-button-Cb3EHs64.js → split-button-Bu41f2AY.js} +88 -93
- package/dist/split-button.js +1 -1
- package/dist/{stack-DC3IbtWk.js → stack-Bac4sJeI.js} +2 -2
- package/dist/stack.js +1 -1
- package/dist/{stepper-CruHbXxX.js → stepper-C8Ncavbr.js} +22 -21
- package/dist/stepper.js +1 -1
- package/dist/stretch-refresh-OrnTEj7P.js +349 -0
- package/dist/stretch-refresh.js +2 -0
- package/dist/{surface-DZ4d-2aL.js → surface-C69kwSuk.js} +13 -3
- package/dist/{swipe-actions-DiZC57-3.js → swipe-actions-1H5UOZKE.js} +29 -26
- package/dist/swipe-actions.js +1 -1
- package/dist/switch-79-hkQqg.js +146 -0
- package/dist/switch.js +1 -1
- package/dist/sx-BJXJ2xJK.js +23 -0
- package/dist/tabs-Bb5-noYE.js +211 -0
- package/dist/tabs.js +1 -1
- package/dist/{tag-input-DSRCyrX2.js → tag-input-BQaueKEb.js} +5 -5
- package/dist/tag-input.js +1 -1
- package/dist/{text-field-C8TWG-tY.js → text-field-D0VP7b4P.js} +18 -16
- package/dist/text-field.js +1 -1
- package/dist/{textarea-BrW0XcG_.js → textarea-D1YwEPmn.js} +21 -19
- package/dist/textarea.js +1 -1
- package/dist/theme-provider-BvcY-iJu.js +20 -0
- package/dist/theme-root-BrYVcTzt.js +163 -0
- package/dist/theme-root.js +1 -1
- package/dist/theme-scope-DGWy4H0C.js +62 -0
- package/dist/theme-switch-CP42mVDb.js +167 -0
- package/dist/theme-switch.js +2 -0
- package/dist/thread-parts-DfZNz70v.js +683 -0
- package/dist/{time-picker-Db8D49cP.js → time-picker-Tnd-JBLC.js} +39 -32
- package/dist/time-picker.js +1 -1
- package/dist/{timeline-k3nURuCP.js → timeline-DaldDMX7.js} +28 -21
- package/dist/timeline.js +1 -1
- package/dist/{toast-BHxI32ZA.js → toast-CSAbl5yK.js} +107 -87
- package/dist/{toast-stack-DqrAzdg5.js → toast-stack-BCR4Cu7V.js} +25 -10
- package/dist/toast-stack.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-fcjzpifI.js → toggle-group-C7ye1v4s.js} +24 -23
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-IajLwdUb.js +129 -0
- package/dist/tooltip.js +1 -1
- package/dist/{tree-view-C2liIxqy.js → tree-view-CoW4oJIZ.js} +18 -13
- package/dist/tree-view.js +1 -1
- package/dist/{trigger-style-B1KVC8O1.js → trigger-style-CtOrdPk4.js} +1 -1
- package/dist/types/components/activity-rings/activity-rings.d.ts +115 -0
- package/dist/types/components/activity-rings/index.d.ts +2 -0
- package/dist/types/components/billing-toggle/billing-toggle.d.ts +57 -0
- package/dist/types/components/billing-toggle/index.d.ts +2 -0
- package/dist/types/components/button-group/button-group.d.ts +72 -0
- package/dist/types/components/button-group/index.d.ts +2 -0
- package/dist/types/components/card/card.d.ts +4 -1
- package/dist/types/components/chat-thread/chat-thread.d.ts +130 -0
- package/dist/types/components/chat-thread/index.d.ts +2 -0
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/command-palette/command-palette.d.ts +1 -1
- package/dist/types/components/comment-thread/comment-thread.d.ts +118 -0
- package/dist/types/components/comment-thread/index.d.ts +1 -0
- package/dist/types/components/context-menu/context-menu.d.ts +55 -0
- package/dist/types/components/context-menu/index.d.ts +2 -0
- package/dist/types/components/date-range-picker/date-range-picker.d.ts +1 -1
- package/dist/types/components/drawer/drawer.d.ts +7 -1
- package/dist/types/components/expanding-search/expanding-search.d.ts +22 -0
- package/dist/types/components/expanding-search/index.d.ts +1 -0
- package/dist/types/components/keycap-keyboard/index.d.ts +2 -0
- package/dist/types/components/keycap-keyboard/keycap-keyboard.d.ts +32 -0
- package/dist/types/components/lightbox-gallery/index.d.ts +2 -0
- package/dist/types/components/lightbox-gallery/lightbox-gallery.d.ts +74 -0
- package/dist/types/components/link-unfurl/index.d.ts +2 -0
- package/dist/types/components/link-unfurl/link-unfurl.d.ts +94 -0
- package/dist/types/components/locale-switcher/index.d.ts +2 -0
- package/dist/types/components/locale-switcher/locale-switcher.d.ts +58 -0
- package/dist/types/components/menu/menu.d.ts +74 -7
- package/dist/types/components/next/emotion-registry.d.ts +16 -0
- package/dist/types/components/next/index.d.ts +2 -0
- package/dist/types/components/next/registry.d.ts +21 -0
- package/dist/types/components/now-playing/index.d.ts +1 -0
- package/dist/types/components/now-playing/now-playing.d.ts +88 -0
- package/dist/types/components/pagination/pagination.d.ts +1 -1
- package/dist/types/components/photo-grid/index.d.ts +2 -0
- package/dist/types/components/photo-grid/photo-grid.d.ts +82 -0
- package/dist/types/components/radio-cards/radio-cards.d.ts +1 -1
- package/dist/types/components/radio-group/radio-group.d.ts +1 -1
- package/dist/types/components/sheet-stack/index.d.ts +2 -0
- package/dist/types/components/sheet-stack/sheet-stack.d.ts +78 -0
- package/dist/types/components/shortcut-recorder/index.d.ts +2 -0
- package/dist/types/components/shortcut-recorder/shortcut-recorder.d.ts +117 -0
- package/dist/types/components/slider/slider-style.d.ts +14 -0
- package/dist/types/components/slider/slider.d.ts +2 -10
- package/dist/types/components/slider/use-slider-interaction.d.ts +79 -0
- package/dist/types/components/split-button/split-button.d.ts +2 -2
- package/dist/types/components/stretch-refresh/index.d.ts +1 -0
- package/dist/types/components/stretch-refresh/stretch-refresh.d.ts +49 -0
- package/dist/types/components/tabs/tabs.d.ts +1 -1
- package/dist/types/components/text-field/text-field.d.ts +1 -1
- package/dist/types/components/textarea/textarea.d.ts +1 -1
- package/dist/types/components/theme-root/index.d.ts +1 -0
- package/dist/types/components/theme-root/theme-root.d.ts +9 -1
- package/dist/types/components/theme-switch/index.d.ts +1 -0
- package/dist/types/components/theme-switch/theme-switch.d.ts +33 -0
- package/dist/types/components/thread/thread-core.d.ts +96 -0
- package/dist/types/components/thread/thread-parts.d.ts +119 -0
- package/dist/types/components/tooltip/tooltip.d.ts +9 -2
- package/dist/types/components/usage-meter/usage-meter.d.ts +2 -12
- package/dist/types/components/usage-meter/usage-model.d.ts +30 -0
- package/dist/types/components/user-menu/index.d.ts +2 -0
- package/dist/types/components/user-menu/user-menu.d.ts +119 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/overlay/exit-motion.d.ts +24 -0
- package/dist/types/overlay/overlay-layer.d.ts +20 -0
- package/dist/types/overlay/presence-spring.d.ts +12 -0
- package/dist/types/overlay/use-native-dialog.d.ts +10 -1
- package/dist/types/overlay/use-overlay-floating.d.ts +9 -2
- package/dist/types/styling/create-theme.d.ts +24 -0
- package/dist/types/styling/css.d.ts +1 -1
- package/dist/types/styling/overlay-motion.d.ts +95 -0
- package/dist/types/styling/surface.d.ts +7 -0
- package/dist/types/styling/theme-scope.d.ts +29 -3
- package/dist/types/styling/theme.d.ts +5 -0
- package/dist/{usage-meter-qyQ3rYVv.js → usage-meter-CYvlB6l3.js} +165 -175
- package/dist/usage-meter.js +1 -1
- package/dist/usage-model-C0fS47w4.js +32 -0
- package/dist/use-native-dialog-FB0p7lkg.js +93 -0
- package/dist/{use-overlay-floating-DvJifLpF.js → use-overlay-floating-Bx2jBKAA.js} +8 -6
- package/dist/use-scroll-lock-40gXwwAy.js +23 -0
- package/dist/user-menu-DzELTg1x.js +757 -0
- package/dist/user-menu.js +2 -0
- package/dist/{visually-hidden-BJdvqqvn.js → visually-hidden-DgVO3NaB.js} +1 -1
- package/package.json +88 -2
- package/dist/accordion-xCI_u0BV.js +0 -198
- package/dist/avatar-BahDVO9t.js +0 -132
- package/dist/badge-B_sLygxU.js +0 -108
- package/dist/calendar-B3Svu0X2.js +0 -447
- package/dist/card-D-aI2QHx.js +0 -158
- package/dist/carousel-IvPqN-oM.js +0 -472
- package/dist/command-palette-BQ5LleGb.js +0 -384
- package/dist/date-range-picker-B5uFWsm-.js +0 -562
- package/dist/dialog-ciiv9H2b.js +0 -218
- package/dist/drawer-DsASTiP-.js +0 -553
- package/dist/file-dropzone-pR4v7owg.js +0 -457
- package/dist/mention-input-BcQKX2EJ.js +0 -599
- package/dist/menu-xwOOUtWP.js +0 -275
- package/dist/pill-DO2gHzMb.js +0 -56
- package/dist/popover-QHcEvf9c.js +0 -119
- package/dist/signature-pad-q2SAsrdD.js +0 -640
- package/dist/slider-t0B5cecO.js +0 -477
- package/dist/switch-qwv8jQnR.js +0 -142
- package/dist/sx-Dx9JUKp5.js +0 -23
- package/dist/tabs-CAVJndX1.js +0 -203
- package/dist/theme-root-BbTBuLMQ.js +0 -46
- package/dist/theme-scope-t7nAKc2c.js +0 -27
- package/dist/tooltip-CkeiW9C1.js +0 -113
- package/dist/use-native-dialog-DWpIUVO1.js +0 -84
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type SxProps } from '../../styling/sx';
|
|
3
|
+
import { type ThreadAuthor, type ThreadComment, type ThreadReaction } from '../thread/thread-core';
|
|
4
|
+
import { type ThreadButtonProps, type ThreadPartProps, type ThreadReactionLabels, type ThreadSize, type ThreadTextareaProps } from '../thread/thread-parts';
|
|
5
|
+
export type { ThreadComment } from '../thread/thread-core';
|
|
6
|
+
export type CommentAuthor = ThreadAuthor;
|
|
7
|
+
export type CommentReaction = ThreadReaction;
|
|
8
|
+
export type CommentThreadSize = ThreadSize;
|
|
9
|
+
export type CommentThreadHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
10
|
+
export type CommentThreadPartProps = ThreadPartProps;
|
|
11
|
+
/** What a proposed tree changes; `parentId` is where a reply actually attached after `maxDepth`. */
|
|
12
|
+
export type CommentThreadEvent = {
|
|
13
|
+
type: 'reply';
|
|
14
|
+
comment: ThreadComment;
|
|
15
|
+
parentId: string | null;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'edit';
|
|
18
|
+
id: string;
|
|
19
|
+
body: string;
|
|
20
|
+
} | {
|
|
21
|
+
type: 'delete';
|
|
22
|
+
id: string;
|
|
23
|
+
} | {
|
|
24
|
+
type: 'react';
|
|
25
|
+
id: string;
|
|
26
|
+
emoji: string;
|
|
27
|
+
added: boolean;
|
|
28
|
+
};
|
|
29
|
+
export interface CommentThreadLabels extends ThreadReactionLabels {
|
|
30
|
+
/** Region name when there is no `title`, `aria-label` or `aria-labelledby`. */
|
|
31
|
+
thread: string;
|
|
32
|
+
/** Accessible name of the new-comment field. */
|
|
33
|
+
composer: string;
|
|
34
|
+
placeholder: string;
|
|
35
|
+
resolve: string;
|
|
36
|
+
resolved: string;
|
|
37
|
+
reopen: string;
|
|
38
|
+
empty: string;
|
|
39
|
+
reply: string;
|
|
40
|
+
edit: string;
|
|
41
|
+
delete: string;
|
|
42
|
+
cancel: string;
|
|
43
|
+
send: string;
|
|
44
|
+
save: string;
|
|
45
|
+
edited: string;
|
|
46
|
+
/** Accessible name of the edit field. */
|
|
47
|
+
editComment: string;
|
|
48
|
+
/** Prompt that names the inline delete confirmation. */
|
|
49
|
+
deleteConfirm: string;
|
|
50
|
+
deletedText: string;
|
|
51
|
+
/** Name of a deleted comment's article. */
|
|
52
|
+
deletedComment: string;
|
|
53
|
+
hideReplies: string;
|
|
54
|
+
cancelReply: string;
|
|
55
|
+
/** Name of the mention suggestions list. */
|
|
56
|
+
mentions: string;
|
|
57
|
+
invalidTime: string;
|
|
58
|
+
/** Accessible name of a reply field. */
|
|
59
|
+
replyingTo: (name: string) => string;
|
|
60
|
+
showReplies: (count: number) => string;
|
|
61
|
+
commentCount: (count: number) => string;
|
|
62
|
+
peopleCount: (count: number) => string;
|
|
63
|
+
/** Announced when comments from others arrive. */
|
|
64
|
+
newComments: (count: number) => string;
|
|
65
|
+
}
|
|
66
|
+
type CommentThreadPart = 'header' | 'title' | 'list' | 'item' | 'article' | 'time' | 'body' | 'replies' | 'actions' | 'reaction' | 'composer' | 'resolved' | 'status';
|
|
67
|
+
export type CommentThreadSlotProps = Partial<Record<CommentThreadPart, CommentThreadPartProps>> & {
|
|
68
|
+
/** Extra Textarea props for every composer and editor; handlers are composed with the thread's. */
|
|
69
|
+
textarea?: ThreadTextareaProps;
|
|
70
|
+
/** Extra Button props for every Send/Save button; `onClick` runs first and may `preventDefault()`. */
|
|
71
|
+
send?: ThreadButtonProps;
|
|
72
|
+
};
|
|
73
|
+
export interface CommentThreadProps extends Omit<ComponentPropsWithRef<'section'>, 'defaultValue' | 'onChange' | 'children' | 'title'>, SxProps {
|
|
74
|
+
/** Comment tree (controlled). Treated as immutable. */
|
|
75
|
+
value?: readonly ThreadComment[];
|
|
76
|
+
defaultValue?: readonly ThreadComment[];
|
|
77
|
+
/** The full proposed tree plus what changed. */
|
|
78
|
+
onValueChange?: (next: ThreadComment[], event: CommentThreadEvent) => void;
|
|
79
|
+
/** Whose comments are editable; authorization stays on the server. */
|
|
80
|
+
currentUser: CommentAuthor;
|
|
81
|
+
/** Mention candidates; defaults to every author plus `currentUser`. Deduped by id. */
|
|
82
|
+
people?: readonly CommentAuthor[];
|
|
83
|
+
resolvedValue?: boolean;
|
|
84
|
+
defaultResolvedValue?: boolean;
|
|
85
|
+
onResolvedValueChange?: (resolved: boolean) => void;
|
|
86
|
+
/** Ids whose replies are shown (controlled). */
|
|
87
|
+
expandedValue?: readonly string[];
|
|
88
|
+
/** Defaults to every comment that has replies at first render. */
|
|
89
|
+
defaultExpandedValue?: readonly string[];
|
|
90
|
+
onExpandedValueChange?: (ids: string[]) => void;
|
|
91
|
+
title?: ReactNode;
|
|
92
|
+
headingLevel?: CommentThreadHeadingLevel;
|
|
93
|
+
/** Emoji offered by the picker, deduped; `[]` removes the picker. */
|
|
94
|
+
reactions?: readonly string[];
|
|
95
|
+
/** Maximum reply edges below a root comment; deeper replies attach to the deepest allowed ancestor. */
|
|
96
|
+
maxDepth?: number;
|
|
97
|
+
/** Reference instant in epoch ms for relative times. Pass the same value on server and client. */
|
|
98
|
+
now: number;
|
|
99
|
+
locale?: Intl.LocalesArgument;
|
|
100
|
+
/** IANA zone for full dates. */
|
|
101
|
+
timeZone?: string;
|
|
102
|
+
/** Id for a newly submitted comment; called once per accepted submit interaction. */
|
|
103
|
+
getNewId?: () => string;
|
|
104
|
+
placeholder?: string;
|
|
105
|
+
/** Accessible name of the new-comment field; defaults to `labels.composer`. */
|
|
106
|
+
composerLabel?: string;
|
|
107
|
+
/** Blocks every mutation. */
|
|
108
|
+
disabled?: boolean;
|
|
109
|
+
/** Hides mutation controls; reply disclosure still works. */
|
|
110
|
+
readOnly?: boolean;
|
|
111
|
+
size?: CommentThreadSize;
|
|
112
|
+
labels?: Partial<CommentThreadLabels>;
|
|
113
|
+
slotProps?: CommentThreadSlotProps;
|
|
114
|
+
}
|
|
115
|
+
export declare function CommentThread({ ref, value, defaultValue, onValueChange, currentUser, people: peopleProp, resolvedValue, defaultResolvedValue, onResolvedValueChange, expandedValue, defaultExpandedValue, onExpandedValueChange, title, headingLevel, reactions: offeredProp, maxDepth: maxDepthProp, now, locale, timeZone, getNewId, placeholder, composerLabel, disabled, readOnly, size, labels: labelProps, slotProps, className, sx, onFocus, onBlur, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...rest }: CommentThreadProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
116
|
+
export declare namespace CommentThread {
|
|
117
|
+
var displayName: string;
|
|
118
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CommentThread, type CommentAuthor, type CommentReaction, type CommentThreadEvent, type CommentThreadHeadingLevel, type CommentThreadLabels, type CommentThreadPartProps, type CommentThreadProps, type CommentThreadSize, type CommentThreadSlotProps, type ThreadComment, } from './comment-thread';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type SxProps } from '../../styling/sx';
|
|
3
|
+
import { type MenuItemTone } from '../menu/menu';
|
|
4
|
+
export type ContextMenuItemTone = MenuItemTone;
|
|
5
|
+
export interface ContextMenuProps {
|
|
6
|
+
open?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface ContextMenuTargetProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
12
|
+
/** Also open on a plain click or tap (and Enter/Space on the Target). Only for inert objects:
|
|
13
|
+
* interactive children would lose their own click. */
|
|
14
|
+
openOnClick?: boolean;
|
|
15
|
+
/** Leave the browser's native context menu alone. */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ContextMenuTriggerProps extends ComponentPropsWithRef<'button'>, SxProps {
|
|
19
|
+
}
|
|
20
|
+
export interface ContextMenuContentProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
21
|
+
}
|
|
22
|
+
export interface ContextMenuItemProps extends Omit<ComponentPropsWithRef<'button'>, 'onSelect'>, SxProps {
|
|
23
|
+
/** Called once when the item is activated. The menu then closes unless a click handler called
|
|
24
|
+
* `event.preventDefault()`. */
|
|
25
|
+
onSelect?: () => void;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
tone?: ContextMenuItemTone;
|
|
28
|
+
/** Decorative icon before the label. */
|
|
29
|
+
icon?: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export interface ContextMenuCheckboxItemProps extends Omit<ContextMenuItemProps, 'value' | 'defaultValue'> {
|
|
32
|
+
value?: boolean;
|
|
33
|
+
defaultValue?: boolean;
|
|
34
|
+
onValueChange?: (checked: boolean) => void;
|
|
35
|
+
/** Close the menu after toggling. Off by default so several options can be toggled in a row. */
|
|
36
|
+
closeOnSelect?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface ContextMenuSeparatorProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
39
|
+
}
|
|
40
|
+
declare function ContextMenuRoot({ open, defaultOpen, onOpenChange, children }: ContextMenuProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
|
+
declare function ContextMenuTarget({ ref, id, openOnClick, disabled, 'aria-labelledby': ariaLabelledBy, className, sx, ...rest }: ContextMenuTargetProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
42
|
+
declare function ContextMenuTrigger({ ref, id, className, sx, ...rest }: ContextMenuTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function ContextMenuContent({ ref, style, dir, onKeyDown, ...props }: ContextMenuContentProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare function ContextMenuItem({ tone, icon, children, ...props }: ContextMenuItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare function ContextMenuCheckboxItem({ value, defaultValue, onValueChange, onSelect, closeOnSelect, tone, icon, children, ...props }: ContextMenuCheckboxItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
46
|
+
declare function ContextMenuSeparator(props: ContextMenuSeparatorProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare const ContextMenu: typeof ContextMenuRoot & {
|
|
48
|
+
Target: typeof ContextMenuTarget;
|
|
49
|
+
Trigger: typeof ContextMenuTrigger;
|
|
50
|
+
Content: typeof ContextMenuContent;
|
|
51
|
+
Item: typeof ContextMenuItem;
|
|
52
|
+
CheckboxItem: typeof ContextMenuCheckboxItem;
|
|
53
|
+
Separator: typeof ContextMenuSeparator;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { ContextMenu } from './context-menu';
|
|
2
|
+
export type { ContextMenuCheckboxItemProps, ContextMenuContentProps, ContextMenuItemProps, ContextMenuItemTone, ContextMenuProps, ContextMenuSeparatorProps, ContextMenuTargetProps, ContextMenuTriggerProps, } from './context-menu';
|
|
@@ -94,7 +94,7 @@ export interface DateRangePickerContentProps extends Omit<ComponentPropsWithRef<
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
declare function DateRangePickerRoot(props: DateRangePickerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
97
|
-
declare function DateRangePickerTrigger({ ref, id: idProp, size, icon, placeholder, className, sx, onKeyDown, onKeyUp, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalidProp, ...rest }: DateRangePickerTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
97
|
+
declare function DateRangePickerTrigger({ ref, id: idProp, form, size, icon, placeholder, className, sx, onKeyDown, onKeyUp, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalidProp, ...rest }: DateRangePickerTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
98
98
|
declare function DateRangePickerContent(props: DateRangePickerContentProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
99
99
|
export declare const DateRangePicker: typeof DateRangePickerRoot & {
|
|
100
100
|
Trigger: typeof DateRangePickerTrigger;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type SurfaceAppearance } from '../../styling/surface';
|
|
2
3
|
import { type SxProps } from '../../styling/sx';
|
|
3
4
|
export type DrawerSide = 'inline-start' | 'inline-end' | 'top' | 'bottom';
|
|
4
5
|
export type DrawerSize = 'sm' | 'md' | 'lg';
|
|
@@ -21,6 +22,11 @@ export interface DrawerContentProps extends Omit<ComponentPropsWithRef<'dialog'>
|
|
|
21
22
|
withDescription?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export interface DrawerPanelProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
25
|
+
/**
|
|
26
|
+
* `contrast` (default) wears the dark theme plus the elevated-charcoal overrides on any page theme;
|
|
27
|
+
* `default` keeps whatever theme is in scope.
|
|
28
|
+
*/
|
|
29
|
+
appearance?: SurfaceAppearance;
|
|
24
30
|
}
|
|
25
31
|
export interface DrawerHeaderProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
26
32
|
}
|
|
@@ -38,7 +44,7 @@ export interface DrawerCloseProps extends ComponentPropsWithRef<'button'>, SxPro
|
|
|
38
44
|
declare function DrawerRoot({ open: openProp, defaultOpen, onOpenChange, side, size, draggable, children, }: DrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
45
|
declare function DrawerTrigger({ ref, onClick, className, sx, ...rest }: DrawerTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
40
46
|
declare function DrawerContent({ ref, className, sx, ...props }: DrawerContentProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
|
-
declare function DrawerPanel({ ref, className, sx, ...props }: DrawerPanelProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
47
|
+
declare function DrawerPanel({ ref, className, appearance, style, sx, ...props }: DrawerPanelProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
42
48
|
declare function DrawerHeader({ ref, className, sx, ...props }: DrawerHeaderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
43
49
|
declare function DrawerBody({ ref, className, sx, ...props }: DrawerBodyProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
44
50
|
declare function DrawerFooter({ ref, className, sx, ...props }: DrawerFooterProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type CSSProperties, type Ref } from 'react';
|
|
2
|
+
import { type SxProps } from '../../styling/sx';
|
|
3
|
+
import { type SearchFieldProps, type SearchFieldSize } from '../search-field';
|
|
4
|
+
export type ExpandingSearchInputProps = Omit<ComponentPropsWithRef<'input'>, 'ref' | 'type' | 'role' | 'size' | 'value' | 'defaultValue' | 'children' | 'disabled' | 'dir' | 'className'>;
|
|
5
|
+
export interface ExpandingSearchProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'defaultValue' | 'onChange'>, SxProps, Pick<SearchFieldProps, 'value' | 'defaultValue' | 'onValueChange' | 'label' | 'description' | 'error' | 'clearable' | 'messages' | 'searchIcon' | 'clearIcon' | 'slotProps'> {
|
|
6
|
+
/** Accessible name of the collapsed button; also the input's fallback name. */
|
|
7
|
+
triggerLabel: string;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
anchor?: 'start' | 'end';
|
|
12
|
+
expandedWidth?: CSSProperties['inlineSize'];
|
|
13
|
+
size?: SearchFieldSize;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Native attributes and events of the search input. */
|
|
16
|
+
inputProps?: ExpandingSearchInputProps;
|
|
17
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
18
|
+
}
|
|
19
|
+
export declare function ExpandingSearch({ ref, inputRef, triggerLabel, open: openProp, defaultOpen, onOpenChange, anchor, expandedWidth, size, disabled, value, defaultValue, onValueChange, label, description, error, clearable, messages, searchIcon, clearIcon, slotProps, inputProps, className, sx, dir, style, onKeyDown, onBlur, ...rootProps }: ExpandingSearchProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare namespace ExpandingSearch {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExpandingSearch, type ExpandingSearchInputProps, type ExpandingSearchProps } from './expanding-search';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export interface KeycapSpec {
|
|
5
|
+
code: string;
|
|
6
|
+
legend: ReactNode;
|
|
7
|
+
units?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface KeycapKeyboardSlotProps {
|
|
10
|
+
className?: string;
|
|
11
|
+
css?: Interpolation<Theme>;
|
|
12
|
+
}
|
|
13
|
+
export interface KeycapKeyboardProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'defaultValue' | 'onChange' | 'tabIndex' | 'role' | 'onKeyDown' | 'onKeyUp'>, SxProps {
|
|
14
|
+
layout?: 'compact' | 'letters';
|
|
15
|
+
rows?: readonly (readonly KeycapSpec[])[];
|
|
16
|
+
value?: readonly string[];
|
|
17
|
+
defaultValue?: readonly string[];
|
|
18
|
+
onValueChange?: (codes: readonly string[]) => void;
|
|
19
|
+
eventTarget?: HTMLInputElement | HTMLTextAreaElement | null;
|
|
20
|
+
tone?: 'neutral' | 'accent';
|
|
21
|
+
paused?: boolean;
|
|
22
|
+
slotProps?: {
|
|
23
|
+
row?: KeycapKeyboardSlotProps;
|
|
24
|
+
key?: KeycapKeyboardSlotProps;
|
|
25
|
+
legend?: KeycapKeyboardSlotProps;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Decorative physical keyboard; text, focus and shortcut descriptions belong to the consumer. */
|
|
29
|
+
export declare function KeycapKeyboard({ ref, layout, rows, value, defaultValue, onValueChange, eventTarget, tone, paused, slotProps, className, sx, style, ...rest }: KeycapKeyboardProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare namespace KeycapKeyboard {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { vars } from '@jfrader/tokens/vars';
|
|
3
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
4
|
+
import { type SxProps } from '../../styling/sx';
|
|
5
|
+
export interface LightboxGalleryImage {
|
|
6
|
+
id: string;
|
|
7
|
+
src: string;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
alt: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
caption?: ReactNode;
|
|
13
|
+
srcSet?: string;
|
|
14
|
+
sizes?: string;
|
|
15
|
+
}
|
|
16
|
+
type Slot<Tag extends keyof React.JSX.IntrinsicElements> = Omit<ComponentPropsWithRef<Tag>, 'children'> & {
|
|
17
|
+
css?: Interpolation<Theme>;
|
|
18
|
+
};
|
|
19
|
+
export interface LightboxGallerySlotProps {
|
|
20
|
+
grid?: Slot<'ul'>;
|
|
21
|
+
tile?: Omit<Slot<'button'>, 'type'>;
|
|
22
|
+
image?: Omit<Slot<'img'>, 'src' | 'srcSet' | 'sizes' | 'alt' | 'width' | 'height'>;
|
|
23
|
+
viewer?: Omit<Slot<'dialog'>, 'open'> & {
|
|
24
|
+
withDescription?: boolean;
|
|
25
|
+
};
|
|
26
|
+
stage?: Slot<'div'>;
|
|
27
|
+
title?: Slot<'h2'>;
|
|
28
|
+
caption?: Slot<'p'>;
|
|
29
|
+
thumbnails?: Slot<'div'>;
|
|
30
|
+
controls?: Slot<'div'>;
|
|
31
|
+
status?: Slot<'div'>;
|
|
32
|
+
}
|
|
33
|
+
export interface LightboxGalleryLabels {
|
|
34
|
+
open: string;
|
|
35
|
+
close: string;
|
|
36
|
+
previous: string;
|
|
37
|
+
next: string;
|
|
38
|
+
zoom: string;
|
|
39
|
+
zoomIn: string;
|
|
40
|
+
zoomOut: string;
|
|
41
|
+
reset: string;
|
|
42
|
+
panLeft: string;
|
|
43
|
+
panRight: string;
|
|
44
|
+
panUp: string;
|
|
45
|
+
panDown: string;
|
|
46
|
+
empty: string;
|
|
47
|
+
unavailable: string;
|
|
48
|
+
imageUnavailable: string;
|
|
49
|
+
loading: string;
|
|
50
|
+
thumbnails: string;
|
|
51
|
+
position: (position: string, total: string) => string;
|
|
52
|
+
zoomPercent: (percent: string) => string;
|
|
53
|
+
}
|
|
54
|
+
export interface LightboxGalleryProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'defaultValue'>, SxProps {
|
|
55
|
+
images: readonly LightboxGalleryImage[];
|
|
56
|
+
label: string;
|
|
57
|
+
minColumnWidth?: number;
|
|
58
|
+
gap?: keyof typeof vars.space;
|
|
59
|
+
value?: string | null;
|
|
60
|
+
defaultValue?: string | null;
|
|
61
|
+
onValueChange?: (id: string | null) => void;
|
|
62
|
+
open?: boolean;
|
|
63
|
+
defaultOpen?: boolean;
|
|
64
|
+
onOpenChange?: (open: boolean) => void;
|
|
65
|
+
maxZoom?: number;
|
|
66
|
+
labels?: Partial<LightboxGalleryLabels>;
|
|
67
|
+
locale?: Intl.LocalesArgument;
|
|
68
|
+
slotProps?: LightboxGallerySlotProps;
|
|
69
|
+
}
|
|
70
|
+
export declare function LightboxGallery({ ref, images, label, minColumnWidth, gap, value, defaultValue, onValueChange, open: openProp, defaultOpen, onOpenChange, maxZoom, labels: labelOverrides, locale, slotProps, className, sx, ...rest }: LightboxGalleryProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
71
|
+
export declare namespace LightboxGallery {
|
|
72
|
+
var displayName: string;
|
|
73
|
+
}
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export type LinkUnfurlPreviewStatus = 'pending' | 'ready' | 'none' | 'error';
|
|
5
|
+
export interface LinkUnfurlPreview {
|
|
6
|
+
/** The detected link this record belongs to (from `onPreviewRequest`'s context). */
|
|
7
|
+
linkId: string;
|
|
8
|
+
/** The request this record answers; records for any other request id are ignored. */
|
|
9
|
+
requestId: string;
|
|
10
|
+
url: string;
|
|
11
|
+
status: LinkUnfurlPreviewStatus;
|
|
12
|
+
site?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
/** Informative image; `alt` describes it, or pass `''` when the image adds nothing. */
|
|
16
|
+
image?: {
|
|
17
|
+
src: string;
|
|
18
|
+
alt: string;
|
|
19
|
+
};
|
|
20
|
+
/** Decorative site icon URL. */
|
|
21
|
+
favicon?: string;
|
|
22
|
+
/** Shown instead of `labels.noPreview` when the status is `error`. */
|
|
23
|
+
error?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface LinkUnfurlPreviewRequestContext {
|
|
26
|
+
linkId: string;
|
|
27
|
+
requestId: string;
|
|
28
|
+
signal: AbortSignal;
|
|
29
|
+
}
|
|
30
|
+
export interface LinkUnfurlSuggestion {
|
|
31
|
+
url: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}
|
|
34
|
+
export interface LinkUnfurlMessage {
|
|
35
|
+
text: string;
|
|
36
|
+
previews: LinkUnfurlPreview[];
|
|
37
|
+
}
|
|
38
|
+
export interface LinkUnfurlLabels {
|
|
39
|
+
send: string;
|
|
40
|
+
expand: string;
|
|
41
|
+
collapse: string;
|
|
42
|
+
remove: string;
|
|
43
|
+
retry: string;
|
|
44
|
+
pending: string;
|
|
45
|
+
noPreview: string;
|
|
46
|
+
sent: string;
|
|
47
|
+
error: string;
|
|
48
|
+
/** Keyboard description read with the field. */
|
|
49
|
+
hint: string;
|
|
50
|
+
}
|
|
51
|
+
interface SlotStyle {
|
|
52
|
+
className?: string;
|
|
53
|
+
css?: Interpolation<Theme>;
|
|
54
|
+
}
|
|
55
|
+
type PartProps<E extends 'div' | 'a' | 'img' | 'p' | 'button'> = Omit<ComponentPropsWithoutRef<E>, 'children' | 'id' | 'className' | 'dangerouslySetInnerHTML'> & SlotStyle;
|
|
56
|
+
export interface LinkUnfurlSlotProps {
|
|
57
|
+
field?: Omit<ComponentPropsWithRef<'textarea'>, 'children' | 'id' | 'value' | 'defaultValue' | 'readOnly' | 'className' | 'dangerouslySetInnerHTML'> & SlotStyle;
|
|
58
|
+
lane?: PartProps<'div'>;
|
|
59
|
+
/** Handlers that the item's layout animation owns are not accepted. */
|
|
60
|
+
chip?: Omit<PartProps<'div'>, 'onAnimationStart' | 'onDrag' | 'onDragStart' | 'onDragEnd'>;
|
|
61
|
+
card?: Omit<PartProps<'div'>, 'hidden' | 'inert'>;
|
|
62
|
+
title?: Omit<PartProps<'a'>, 'href'>;
|
|
63
|
+
image?: Omit<PartProps<'img'>, 'src' | 'alt'>;
|
|
64
|
+
controls?: PartProps<'div'>;
|
|
65
|
+
send?: Omit<PartProps<'button'>, 'type' | 'disabled'>;
|
|
66
|
+
status?: Omit<PartProps<'div'>, 'role' | 'aria-live' | 'aria-atomic'>;
|
|
67
|
+
error?: Omit<PartProps<'p'>, 'role'>;
|
|
68
|
+
}
|
|
69
|
+
export interface LinkUnfurlProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'defaultValue' | 'onChange'>, SxProps {
|
|
70
|
+
/** Visible label of the message field. */
|
|
71
|
+
label: string;
|
|
72
|
+
value?: string;
|
|
73
|
+
defaultValue?: string;
|
|
74
|
+
onValueChange?: (text: string) => void;
|
|
75
|
+
previews?: LinkUnfurlPreview[];
|
|
76
|
+
onPreviewRequest?: (url: string, context: LinkUnfurlPreviewRequestContext) => void;
|
|
77
|
+
expanded?: string[];
|
|
78
|
+
defaultExpanded?: string[];
|
|
79
|
+
onExpandedChange?: (ids: string[]) => void;
|
|
80
|
+
suggestions?: LinkUnfurlSuggestion[];
|
|
81
|
+
/** Enables sending; a returned promise keeps the composer pending until it settles. */
|
|
82
|
+
onSend?: (message: LinkUnfurlMessage) => void | Promise<unknown>;
|
|
83
|
+
labels?: Partial<LinkUnfurlLabels>;
|
|
84
|
+
/** Locale for the joined status announcements. */
|
|
85
|
+
locale?: Intl.LocalesArgument;
|
|
86
|
+
/** `'none'` commits every change without animation, on top of the user's reduced-motion setting. */
|
|
87
|
+
motion?: 'auto' | 'none';
|
|
88
|
+
slotProps?: LinkUnfurlSlotProps;
|
|
89
|
+
}
|
|
90
|
+
export declare function LinkUnfurl({ ref, label, value: valueProp, defaultValue, onValueChange, previews, onPreviewRequest, expanded: expandedProp, defaultExpanded, onExpandedChange, suggestions, onSend, labels: labelsProp, locale, motion: motionMode, slotProps, className, sx, ...rest }: LinkUnfurlProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
91
|
+
export declare namespace LinkUnfurl {
|
|
92
|
+
var displayName: string;
|
|
93
|
+
}
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type Placement } from '@floating-ui/react';
|
|
3
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
4
|
+
import { type SxProps } from '../../styling/sx';
|
|
5
|
+
export type LocaleSwitcherVariant = 'menu' | 'swap' | 'inline';
|
|
6
|
+
export type LocaleSwitcherSize = 'sm' | 'md' | 'lg';
|
|
7
|
+
/** Props an option's `render` callback spreads onto the link it returns. */
|
|
8
|
+
export interface LocaleSwitcherLinkProps extends Omit<ComponentPropsWithRef<'a'>, 'href' | 'children'> {
|
|
9
|
+
href: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
'data-ui': string;
|
|
12
|
+
}
|
|
13
|
+
export interface LocaleSwitcherOption {
|
|
14
|
+
value: string;
|
|
15
|
+
/** The language's native name ("Español", "English"). */
|
|
16
|
+
label: ReactNode;
|
|
17
|
+
/** BCP 47 tag of the label and of the linked page; rendered as `lang` and `hreflang`. */
|
|
18
|
+
lang?: string;
|
|
19
|
+
href: string;
|
|
20
|
+
/** Replaces the native <a> (e.g. with a router link). Spread ALL supplied props onto it. */
|
|
21
|
+
render?: (props: LocaleSwitcherLinkProps) => ReactNode;
|
|
22
|
+
}
|
|
23
|
+
type SlotStyle = {
|
|
24
|
+
className?: string;
|
|
25
|
+
css?: Interpolation<Theme>;
|
|
26
|
+
};
|
|
27
|
+
export interface LocaleSwitcherSlotProps {
|
|
28
|
+
/** Menu variant's trigger button. */
|
|
29
|
+
trigger?: Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'className' | 'aria-labelledby'> & SlotStyle;
|
|
30
|
+
/** Menu variant's popup. */
|
|
31
|
+
content?: Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className'> & SlotStyle;
|
|
32
|
+
/** Every option element (menu items, the swap link, inline links and the current label). */
|
|
33
|
+
option?: SlotStyle;
|
|
34
|
+
}
|
|
35
|
+
export interface LocaleSwitcherProps extends Omit<ComponentPropsWithRef<'nav'>, 'children'>, SxProps {
|
|
36
|
+
options: readonly LocaleSwitcherOption[];
|
|
37
|
+
/** The current option's value. */
|
|
38
|
+
value: string;
|
|
39
|
+
variant?: LocaleSwitcherVariant;
|
|
40
|
+
size?: LocaleSwitcherSize;
|
|
41
|
+
/** Menu: names the trigger's action ("Change language"); read before the current label. */
|
|
42
|
+
triggerLabel?: string;
|
|
43
|
+
/** Inline: accessible name of the navigation landmark. */
|
|
44
|
+
label?: string;
|
|
45
|
+
/** Menu: decorative icon before the current label; `null` removes it. */
|
|
46
|
+
icon?: ReactNode;
|
|
47
|
+
/** Menu open state. */
|
|
48
|
+
open?: boolean;
|
|
49
|
+
defaultOpen?: boolean;
|
|
50
|
+
onOpenChange?: (open: boolean) => void;
|
|
51
|
+
placement?: Placement;
|
|
52
|
+
slotProps?: LocaleSwitcherSlotProps;
|
|
53
|
+
}
|
|
54
|
+
export declare function LocaleSwitcher({ ref, options, value, variant, size, triggerLabel, label, icon, open, defaultOpen, onOpenChange, placement, slotProps, className, sx, ...rest }: LocaleSwitcherProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare namespace LocaleSwitcher {
|
|
56
|
+
var displayName: string;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
-
import { type Placement } from '@floating-ui/react';
|
|
3
|
-
import { type Interpolation, type Theme } from '../../styling/css';
|
|
1
|
+
import { type ComponentPropsWithRef, type CSSProperties, type HTMLAttributes, type HTMLProps, type MutableRefObject, type ReactNode, type RefCallback } from 'react';
|
|
2
|
+
import { type Placement, type UseInteractionsReturn } from '@floating-ui/react';
|
|
3
|
+
import { type Interpolation, type SerializedStyles, type Theme } from '../../styling/css';
|
|
4
4
|
import { type SxProps } from '../../styling/sx';
|
|
5
|
+
import { useOverlayFloating, type OverlayFloatingOptions } from '../../overlay/use-overlay-floating';
|
|
5
6
|
export interface MenuProps {
|
|
6
7
|
open?: boolean;
|
|
7
8
|
defaultOpen?: boolean;
|
|
@@ -21,6 +22,29 @@ export interface MenuItemProps extends Omit<ComponentPropsWithRef<'button'>, 'on
|
|
|
21
22
|
}
|
|
22
23
|
export interface MenuSeparatorProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
23
24
|
}
|
|
25
|
+
export type MenuItemTone = 'neutral' | 'danger';
|
|
26
|
+
/** Positioning options a family may set on the shared controller; Menu keeps the defaults. */
|
|
27
|
+
export type MenuPositioning = Pick<OverlayFloatingOptions, 'strategy' | 'gap' | 'transform' | 'onAvailableSize'>;
|
|
28
|
+
export interface MenuControllerProps extends MenuProps {
|
|
29
|
+
positioning?: MenuPositioning;
|
|
30
|
+
}
|
|
31
|
+
type OverlayFloating = ReturnType<typeof useOverlayFloating>;
|
|
32
|
+
interface MenuContextValue {
|
|
33
|
+
open: boolean;
|
|
34
|
+
nodeId: string | undefined;
|
|
35
|
+
requestOpen: () => void;
|
|
36
|
+
requestClose: (restoreFocus?: boolean) => void;
|
|
37
|
+
activeIndex: number | null;
|
|
38
|
+
refs: OverlayFloating['refs'];
|
|
39
|
+
floatingContext: OverlayFloating['context'];
|
|
40
|
+
floatingStyles: CSSProperties;
|
|
41
|
+
elementsRef: MutableRefObject<Array<HTMLElement | null>>;
|
|
42
|
+
labelsRef: MutableRefObject<Array<string | null>>;
|
|
43
|
+
disabledIndices: Set<number>;
|
|
44
|
+
getReferenceProps: UseInteractionsReturn['getReferenceProps'];
|
|
45
|
+
getFloatingProps: UseInteractionsReturn['getFloatingProps'];
|
|
46
|
+
getItemProps: UseInteractionsReturn['getItemProps'];
|
|
47
|
+
}
|
|
24
48
|
/**
|
|
25
49
|
* Private seam for component families built on the menu controller (Menu, SplitButton): the
|
|
26
50
|
* family names usage errors, `marker` is the part's data-ui and `styles` its own styles.
|
|
@@ -30,16 +54,59 @@ export interface MenuPartIdentity {
|
|
|
30
54
|
marker: string;
|
|
31
55
|
styles?: Interpolation<Theme>;
|
|
32
56
|
}
|
|
57
|
+
/** Props a menu item's `render` callback spreads onto the element it returns. */
|
|
58
|
+
export interface MenuItemRenderProps extends HTMLAttributes<HTMLElement> {
|
|
59
|
+
ref: RefCallback<HTMLElement> | null;
|
|
60
|
+
'data-ui': string;
|
|
61
|
+
}
|
|
62
|
+
/** Item behavior a family may change: the part name in usage errors, the item role, whether
|
|
63
|
+
* selection closes the menu, `busy` (an item that stays focusable and navigable but ignores
|
|
64
|
+
* activation, exposed as aria-busy and aria-disabled) and `render`, which replaces the native
|
|
65
|
+
* button (e.g. with an <a href>). */
|
|
66
|
+
export interface MenuItemPartBehavior {
|
|
67
|
+
part?: string;
|
|
68
|
+
itemRole?: 'menuitem' | 'menuitemcheckbox' | 'menuitemradio';
|
|
69
|
+
closeOnSelect?: boolean;
|
|
70
|
+
busy?: boolean;
|
|
71
|
+
render?: (props: MenuItemRenderProps) => ReactNode;
|
|
72
|
+
}
|
|
73
|
+
export declare function useMenuContext(family: string, part: string): MenuContextValue;
|
|
74
|
+
/**
|
|
75
|
+
* Runs each consumer handler before the matching interaction handler; a consumer
|
|
76
|
+
* `preventDefault()` vetoes the internal request (open, toggle, navigation).
|
|
77
|
+
*/
|
|
78
|
+
export declare function consumerHandlersFirst(props: HTMLProps<Element>, getProps: (userProps: HTMLProps<Element>) => Record<string, unknown>): Record<string, unknown>;
|
|
79
|
+
export declare const joinIds: (...ids: Array<string | undefined>) => string | undefined;
|
|
33
80
|
/** Own styles of a menu item, for families that layer their own item styles on top. */
|
|
34
|
-
export declare const menuItemStyles:
|
|
81
|
+
export declare const menuItemStyles: SerializedStyles[];
|
|
35
82
|
/** Own styles of a menu separator. */
|
|
36
|
-
export declare const menuSeparatorStyles:
|
|
83
|
+
export declare const menuSeparatorStyles: SerializedStyles;
|
|
84
|
+
/** Command tones for families whose items carry one (SplitButton, ContextMenu). */
|
|
85
|
+
export declare const menuItemToneStyles: Record<MenuItemTone, SerializedStyles>;
|
|
86
|
+
/**
|
|
87
|
+
* Returns focus to a closed overlay's trigger, unless the trigger left the document or became
|
|
88
|
+
* inert (its owner is being removed) or something else already holds focus.
|
|
89
|
+
*/
|
|
90
|
+
export declare function restoreTriggerFocus(trigger: HTMLElement | null): void;
|
|
91
|
+
/** The shared menu controller (state, positioning, navigation, dismissal, focus return). */
|
|
92
|
+
export declare function MenuController(props: MenuControllerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
37
93
|
declare function MenuRoot(props: MenuProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
38
94
|
export declare function MenuTriggerPart({ family, marker, styles, ref, className, sx, ...props }: MenuTriggerProps & MenuPartIdentity): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
95
|
declare function MenuTrigger(props: MenuTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
40
|
-
export declare function MenuContentPart({ family, marker, styles, ref, style, children, className, sx, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...rest }: MenuContentProps & MenuPartIdentity
|
|
96
|
+
export declare function MenuContentPart({ family, marker, styles, ref, style, children, className, sx, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, defaultLabelledBy, ...rest }: MenuContentProps & MenuPartIdentity & {
|
|
97
|
+
defaultLabelledBy?: string;
|
|
98
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
99
|
+
/**
|
|
100
|
+
* The menu's item collection: items rendered inside register with its list navigation and
|
|
101
|
+
* typeahead, and layers opened inside nest under the menu. Families that build their own surface
|
|
102
|
+
* around the menu element (UserMenu) render it inside the element carrying the floating props.
|
|
103
|
+
*/
|
|
104
|
+
export declare function MenuCollection({ family, children }: {
|
|
105
|
+
family: string;
|
|
106
|
+
children?: ReactNode;
|
|
107
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
108
|
declare function MenuContent(props: MenuContentProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
42
|
-
export declare function MenuItemPart({ family, marker, styles, ref, onSelect, disabled, onClick, className, sx, ...rest }: MenuItemProps & MenuPartIdentity): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
109
|
+
export declare function MenuItemPart({ family, marker, styles, ref, onSelect, disabled, part, itemRole, closeOnSelect, busy, render, onClick, onKeyDown, className, sx, ...rest }: MenuItemProps & MenuPartIdentity & MenuItemPartBehavior): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
43
110
|
declare function MenuItem(props: MenuItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
44
111
|
export declare function MenuSeparatorPart({ marker, styles, ref, className, sx, ...props }: MenuSeparatorProps & Omit<MenuPartIdentity, 'family'>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
112
|
declare function MenuSeparator(props: MenuSeparatorProps): import("@emotion/react/jsx-runtime").JSX.Element;
|