@jfrader/ui 0.5.1 → 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-DLul6vIl.js → accordion-D6myONB9.js} +36 -35
- 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-Dlbq5-9D.js → announcement-bar-B5J33QUh.js} +132 -131
- package/dist/announcement-bar.js +1 -1
- package/dist/{avatar-CaGJHy1N.js → avatar-B6idYC59.js} +11 -10
- package/dist/{avatar-group-M1opAQEG.js → avatar-group-DvP8mAE-.js} +10 -9
- package/dist/avatar-group.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/{badge-CjM5Agqk.js → badge-CfhTcA-Z.js} +10 -9
- 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-DjZOPq4k.js → bottom-sheet-BFQKO0Wo.js} +282 -264
- package/dist/bottom-sheet.js +1 -1
- package/dist/{breadcrumbs-BDK_LiwH.js → breadcrumbs-CG3akw-b.js} +19 -18
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-NLY0h6EJ.js → button-C6OV0C7J.js} +14 -13
- 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-B7OrvD6J.js → carousel-lTH4Foke.js} +13 -12
- package/dist/carousel.js +1 -1
- package/dist/chat-thread-DVa17BRC.js +864 -0
- package/dist/chat-thread.js +2 -0
- package/dist/{checkbox-DKSzExj2.js → checkbox-CClE61GV.js} +9 -8
- package/dist/checkbox.js +1 -1
- package/dist/{chip-group-DjQ0_6Y9.js → chip-group-BZUX9KPF.js} +17 -16
- package/dist/chip-group.js +1 -1
- package/dist/{choice-control-5kJkLXgv.js → choice-control-BsWOZPc9.js} +1 -1
- package/dist/{code-block-B5we2lZa.js → code-block-CYP89_6h.js} +35 -34
- package/dist/code-block.js +1 -1
- package/dist/{combobox-DFFqOBCi.js → combobox-D2Oc-co7.js} +21 -20
- 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 +1 -1
- package/dist/{container-BOaSptJa.js → container-BxtwJSSD.js} +3 -2
- package/dist/container.js +1 -1
- package/dist/{context-menu-__1c2Dk9.js → context-menu-I4i0LRpm.js} +52 -51
- package/dist/context-menu.js +1 -1
- package/dist/{copy-button-DCSLcYS-.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-BiPN7yeK.js → date-picker-D-bn-iHs.js} +14 -13
- 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-Cp7aNbhM.js → divider-zOJzkcHh.js} +7 -6
- 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-rUATve0o.js → expandable-card-W97vjix9.js} +52 -51
- package/dist/expandable-card.js +1 -1
- package/dist/{expanding-search-BxOwtdwt.js → expanding-search-Bb2_YfNx.js} +16 -15
- package/dist/expanding-search.js +1 -1
- package/dist/{field-anatomy-COVdNpf5.js → field-anatomy-BDIP42MI.js} +2 -1
- package/dist/{file-dropzone-BuXm3Tea.js → file-dropzone-Bi5ikRIz.js} +14 -13
- package/dist/file-dropzone.js +1 -1
- package/dist/{filter-toolbar-Cy5Hqur-.js → filter-toolbar-QRnC4S_H.js} +33 -32
- 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-CoMJKg1g.js → hover-card-DN1EAlQA.js} +20 -19
- package/dist/hover-card.js +1 -1
- package/dist/{icon-wrapper-stN8sD7R.js → icon-wrapper-C-zMD0uL.js} +1 -1
- package/dist/{image-compare-BxY8Ykzt.js → image-compare-Ln2UUqTU.js} +20 -19
- package/dist/image-compare.js +1 -1
- package/dist/index.js +98 -83
- 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-DgWqyU75.js → json-viewer-Dro3WrjS.js} +31 -30
- 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-sq61si9L.js → mention-input-BjjAbJCf.js} +6 -6
- package/dist/mention-input.js +1 -1
- package/dist/{menu-DDKgmK2F.js → menu-CVzpsyXn.js} +113 -96
- package/dist/menu.js +1 -1
- package/dist/{metric-card--lVTz5Wn.js → metric-card-BnFssTXj.js} +12 -11
- package/dist/metric-card.js +1 -1
- package/dist/{multi-select-DG1BCFX7.js → multi-select-B3puEVo0.js} +67 -66
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-CC26JDr-.js → navigation-C_JD43gA.js} +41 -40
- 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-motion-Cr77ihn2.js +90 -0
- package/dist/{overlay-portal-C4JZFq2M.js → overlay-portal-C9igMHnC.js} +1 -1
- package/dist/{pagination-BfkeWbmP.js → pagination-Dkh4bJQh.js} +10 -9
- 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-BaS-uIbn.js → pill-Dd7pog19.js} +10 -9
- package/dist/pill.js +1 -1
- package/dist/{popover-CErIw2q3.js → popover-CUMOcMtj.js} +5 -4
- package/dist/popover.js +1 -1
- package/dist/presence-spring-4zwtUDQN.js +12 -0
- package/dist/{progress-DAQkfhPd.js → progress-Bcuz3Ob4.js} +11 -10
- package/dist/progress.js +1 -1
- package/dist/{radio-cards-Cu9cBssN.js → radio-cards-FkAhESb5.js} +35 -34
- package/dist/radio-cards.js +1 -1
- package/dist/{radio-group-TIK0-iPX.js → radio-group-DItMf2YM.js} +18 -17
- package/dist/radio-group.js +1 -1
- package/dist/{resizable-panels-DUpQEpwG.js → resizable-panels-61h9hA3B.js} +13 -12
- 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-DMvho0KQ.js → search-field-CbsajaZb.js} +93 -92
- package/dist/search-field.js +1 -1
- package/dist/{segmented-control-8ZUGnsZm.js → segmented-control-DCh-4ca-.js} +26 -25
- package/dist/segmented-control.js +1 -1
- package/dist/{select-D5rhJ8gi.js → select-SrcQqZjo.js} +27 -26
- 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-_bTeguN9.js → signature-pad-khL2yhQI.js} +15 -14
- 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-CYKT_Ng7.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-BCw4zZom.js → split-button-Bu41f2AY.js} +20 -19
- 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-CBuJREU1.js → swipe-actions-1H5UOZKE.js} +26 -25
- package/dist/swipe-actions.js +1 -1
- package/dist/{switch-C1WrKrf-.js → switch-79-hkQqg.js} +15 -14
- package/dist/switch.js +1 -1
- package/dist/sx-BJXJ2xJK.js +23 -0
- package/dist/{tabs-XluwRjgg.js → tabs-Bb5-noYE.js} +43 -42
- 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-hU72iSVS.js → text-field-D0VP7b4P.js} +3 -3
- package/dist/text-field.js +1 -1
- package/dist/{textarea-3k4Y0QQ3.js → textarea-D1YwEPmn.js} +3 -3
- 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-C505TtU8.js → theme-switch-CP42mVDb.js} +12 -11
- package/dist/theme-switch.js +1 -1
- package/dist/thread-parts-DfZNz70v.js +683 -0
- package/dist/{time-picker-CPlhW0tr.js → time-picker-Tnd-JBLC.js} +16 -15
- package/dist/time-picker.js +1 -1
- package/dist/{timeline-B0uAAVfT.js → timeline-DaldDMX7.js} +22 -21
- package/dist/timeline.js +1 -1
- package/dist/{toast-B7wo3sX1.js → toast-CSAbl5yK.js} +12 -11
- package/dist/{toast-stack-B40VpS4M.js → toast-stack-BCR4Cu7V.js} +10 -9
- package/dist/toast-stack.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-B2fpFZwV.js → toggle-group-C7ye1v4s.js} +23 -22
- package/dist/toggle-group.js +1 -1
- package/dist/{tooltip-BvgVTCTN.js → tooltip-IajLwdUb.js} +48 -39
- package/dist/tooltip.js +1 -1
- package/dist/{tree-view-j8qLqkb_.js → tree-view-CoW4oJIZ.js} +15 -14
- 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/comment-thread/comment-thread.d.ts +3 -3
- package/dist/types/components/drawer/drawer.d.ts +7 -1
- 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 +29 -5
- 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/photo-grid/index.d.ts +2 -0
- package/dist/types/components/photo-grid/photo-grid.d.ts +82 -0
- 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/stretch-refresh/index.d.ts +1 -0
- package/dist/types/components/stretch-refresh/stretch-refresh.d.ts +49 -0
- 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/{comment-thread → thread}/thread-parts.d.ts +7 -2
- package/dist/types/components/tooltip/tooltip.d.ts +8 -1
- 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 +14 -1
- package/dist/types/overlay/exit-motion.d.ts +24 -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/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-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 +72 -6
- package/dist/calendar-BzJdv_SZ.js +0 -449
- package/dist/card-Ca4KQKYQ.js +0 -154
- package/dist/command-palette-BmQu2w4H.js +0 -391
- package/dist/comment-thread-ASaXDcGo.js +0 -1410
- package/dist/date-range-picker-DQpUeKqV.js +0 -570
- package/dist/dialog-BX1zYMs-.js +0 -219
- package/dist/drawer-DsASTiP-.js +0 -553
- package/dist/elastic-slider-BG6K019r.js +0 -395
- package/dist/elastic-slider.js +0 -2
- package/dist/slider-DVG6-Awh.js +0 -308
- package/dist/sx-Dx9JUKp5.js +0 -23
- package/dist/theme-root-Bs1U3uPA.js +0 -46
- package/dist/theme-scope-t7nAKc2c.js +0 -27
- package/dist/types/components/elastic-slider/elastic-slider.d.ts +0 -53
- package/dist/types/components/elastic-slider/index.d.ts +0 -1
- package/dist/use-native-dialog-DWpIUVO1.js +0 -84
- package/dist/use-slider-interaction-ChL-208h.js +0 -234
- /package/dist/types/components/{comment-thread → thread}/thread-core.d.ts +0 -0
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef, type CSSProperties, type HTMLProps, type MutableRefObject, type ReactNode } from 'react';
|
|
1
|
+
import { type ComponentPropsWithRef, type CSSProperties, type HTMLAttributes, type HTMLProps, type MutableRefObject, type ReactNode, type RefCallback } from 'react';
|
|
2
2
|
import { type Placement, type UseInteractionsReturn } from '@floating-ui/react';
|
|
3
3
|
import { type Interpolation, type SerializedStyles, type Theme } from '../../styling/css';
|
|
4
4
|
import { type SxProps } from '../../styling/sx';
|
|
@@ -54,12 +54,21 @@ export interface MenuPartIdentity {
|
|
|
54
54
|
marker: string;
|
|
55
55
|
styles?: Interpolation<Theme>;
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
58
|
-
|
|
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>). */
|
|
59
66
|
export interface MenuItemPartBehavior {
|
|
60
67
|
part?: string;
|
|
61
|
-
itemRole?: 'menuitem' | 'menuitemcheckbox';
|
|
68
|
+
itemRole?: 'menuitem' | 'menuitemcheckbox' | 'menuitemradio';
|
|
62
69
|
closeOnSelect?: boolean;
|
|
70
|
+
busy?: boolean;
|
|
71
|
+
render?: (props: MenuItemRenderProps) => ReactNode;
|
|
63
72
|
}
|
|
64
73
|
export declare function useMenuContext(family: string, part: string): MenuContextValue;
|
|
65
74
|
/**
|
|
@@ -67,12 +76,18 @@ export declare function useMenuContext(family: string, part: string): MenuContex
|
|
|
67
76
|
* `preventDefault()` vetoes the internal request (open, toggle, navigation).
|
|
68
77
|
*/
|
|
69
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;
|
|
70
80
|
/** Own styles of a menu item, for families that layer their own item styles on top. */
|
|
71
81
|
export declare const menuItemStyles: SerializedStyles[];
|
|
72
82
|
/** Own styles of a menu separator. */
|
|
73
83
|
export declare const menuSeparatorStyles: SerializedStyles;
|
|
74
84
|
/** Command tones for families whose items carry one (SplitButton, ContextMenu). */
|
|
75
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;
|
|
76
91
|
/** The shared menu controller (state, positioning, navigation, dismissal, focus return). */
|
|
77
92
|
export declare function MenuController(props: MenuControllerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
78
93
|
declare function MenuRoot(props: MenuProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -81,8 +96,17 @@ declare function MenuTrigger(props: MenuTriggerProps): import("@emotion/react/js
|
|
|
81
96
|
export declare function MenuContentPart({ family, marker, styles, ref, style, children, className, sx, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, defaultLabelledBy, ...rest }: MenuContentProps & MenuPartIdentity & {
|
|
82
97
|
defaultLabelledBy?: string;
|
|
83
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;
|
|
84
108
|
declare function MenuContent(props: MenuContentProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
85
|
-
export declare function MenuItemPart({ family, marker, styles, ref, onSelect, disabled, part, itemRole, closeOnSelect, onClick, className, sx, ...rest }: MenuItemProps & MenuPartIdentity & MenuItemPartBehavior): 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;
|
|
86
110
|
declare function MenuItem(props: MenuItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
87
111
|
export declare function MenuSeparatorPart({ marker, styles, ref, className, sx, ...props }: MenuSeparatorProps & Omit<MenuPartIdentity, 'family'>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
88
112
|
declare function MenuSeparator(props: MenuSeparatorProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface EmotionRegistryProps {
|
|
3
|
+
/** Emotion cache key: the class name prefix and the `data-emotion` attribute value. */
|
|
4
|
+
cacheKey?: string;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Emotion SSR registry for the App Router: one shared cache and a flush that only
|
|
9
|
+
* sends the styles inserted since the last pass, so the server and client trees
|
|
10
|
+
* match on hydration. Without it, Emotion inserts <style> nodes inline during SSR
|
|
11
|
+
* and the hydration diff mismatches.
|
|
12
|
+
*/
|
|
13
|
+
export declare function EmotionRegistry({ cacheKey, children }: EmotionRegistryProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare namespace EmotionRegistry {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type EmotionCache } from '@emotion/cache';
|
|
2
|
+
export interface PendingStyle {
|
|
3
|
+
name: string;
|
|
4
|
+
isGlobal: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface CollectedStyles {
|
|
7
|
+
globals: {
|
|
8
|
+
name: string;
|
|
9
|
+
styles: string;
|
|
10
|
+
}[];
|
|
11
|
+
names: string[];
|
|
12
|
+
styles: string;
|
|
13
|
+
}
|
|
14
|
+
export interface EmotionRegistryCache {
|
|
15
|
+
cache: EmotionCache;
|
|
16
|
+
/** Returns the styles inserted since the previous call and forgets them. */
|
|
17
|
+
flush: () => PendingStyle[];
|
|
18
|
+
}
|
|
19
|
+
export declare function createEmotionRegistry(key: string): EmotionRegistryCache;
|
|
20
|
+
/** Splits flushed styles into one payload per global and one shared payload for scoped rules. */
|
|
21
|
+
export declare function collectStyles(pending: readonly PendingStyle[], inserted: EmotionCache['inserted']): CollectedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NowPlaying, NowPlayingLevels, type NowPlayingProps, type NowPlayingTrack, type NowPlayingLabels, type NowPlayingSlotProps, type NowPlayingLevelsProps, } from './now-playing';
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
import { type ButtonProps } from '../button';
|
|
5
|
+
import { type SliderProps } from '../slider';
|
|
6
|
+
export interface NowPlayingTrack {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
artist: string;
|
|
10
|
+
duration: number | null;
|
|
11
|
+
artwork?: string;
|
|
12
|
+
artworkAlt?: string;
|
|
13
|
+
}
|
|
14
|
+
type Part<T extends 'div' | 'span' | 'img'> = ComponentPropsWithRef<T> & {
|
|
15
|
+
css?: Interpolation<Theme>;
|
|
16
|
+
};
|
|
17
|
+
export interface NowPlayingSlotProps {
|
|
18
|
+
mini?: Part<'div'>;
|
|
19
|
+
full?: Part<'div'>;
|
|
20
|
+
artwork?: Part<'img'>;
|
|
21
|
+
title?: Part<'span'>;
|
|
22
|
+
artist?: Part<'span'>;
|
|
23
|
+
expand?: Omit<ButtonProps, 'sx' | 'render'>;
|
|
24
|
+
collapse?: Omit<ButtonProps, 'sx' | 'render'>;
|
|
25
|
+
seek?: Omit<Extract<SliderProps, {
|
|
26
|
+
type?: 'single';
|
|
27
|
+
}>, 'sx' | 'type' | 'value' | 'defaultValue' | 'onValueChange' | 'label' | 'dir' | 'min' | 'max' | 'step' | 'largeStep' | 'locale' | 'formatValue' | 'formatOptions' | 'showValue'>;
|
|
28
|
+
waveform?: Part<'div'>;
|
|
29
|
+
controls?: Part<'div'>;
|
|
30
|
+
status?: Part<'span'>;
|
|
31
|
+
error?: Part<'div'>;
|
|
32
|
+
}
|
|
33
|
+
export interface NowPlayingLabels {
|
|
34
|
+
play: string;
|
|
35
|
+
pause: string;
|
|
36
|
+
previous: string;
|
|
37
|
+
next: string;
|
|
38
|
+
expand: string;
|
|
39
|
+
collapse: string;
|
|
40
|
+
seek: string;
|
|
41
|
+
empty: string;
|
|
42
|
+
unavailable: string;
|
|
43
|
+
busy: string;
|
|
44
|
+
playing: string;
|
|
45
|
+
paused: string;
|
|
46
|
+
position: (elapsed: string, duration: string) => string;
|
|
47
|
+
}
|
|
48
|
+
export interface NowPlayingProps extends Omit<ComponentPropsWithRef<'section'>, 'defaultValue' | 'children' | 'onChange'>, SxProps {
|
|
49
|
+
tracks: readonly NowPlayingTrack[];
|
|
50
|
+
value?: number;
|
|
51
|
+
defaultValue?: number;
|
|
52
|
+
onValueChange?: (index: number) => void;
|
|
53
|
+
playing?: boolean;
|
|
54
|
+
defaultPlaying?: boolean;
|
|
55
|
+
onPlayingChange?: (playing: boolean) => void;
|
|
56
|
+
open?: boolean;
|
|
57
|
+
defaultOpen?: boolean;
|
|
58
|
+
onOpenChange?: (open: boolean) => void;
|
|
59
|
+
position?: number;
|
|
60
|
+
defaultPosition?: number;
|
|
61
|
+
onPositionChange?: (seconds: number) => void;
|
|
62
|
+
busy?: boolean;
|
|
63
|
+
error?: ReactNode;
|
|
64
|
+
waveform?: readonly number[];
|
|
65
|
+
label?: string;
|
|
66
|
+
labels?: Partial<NowPlayingLabels>;
|
|
67
|
+
locale?: Intl.LocalesArgument;
|
|
68
|
+
/**
|
|
69
|
+
* Seconds per arrow step. Slider requires the duration to be a whole number of steps, so a
|
|
70
|
+
* step that does not divide it is rounded to the nearest one that does (180s with 7 → 180/26).
|
|
71
|
+
* Defaults to the largest step of at most one second that divides the duration.
|
|
72
|
+
*/
|
|
73
|
+
seekStep?: number;
|
|
74
|
+
seekLargeStep?: number;
|
|
75
|
+
slotProps?: NowPlayingSlotProps;
|
|
76
|
+
}
|
|
77
|
+
export interface NowPlayingLevelsProps extends ComponentPropsWithRef<'span'>, SxProps {
|
|
78
|
+
playing?: boolean;
|
|
79
|
+
}
|
|
80
|
+
export declare function NowPlayingLevels({ ref, playing: playingProp, className, sx, ...rest }: NowPlayingLevelsProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
81
|
+
export declare namespace NowPlayingLevels {
|
|
82
|
+
var displayName: string;
|
|
83
|
+
}
|
|
84
|
+
declare function NowPlayingRoot({ ref, tracks, value, defaultValue, onValueChange, playing, defaultPlaying, onPlayingChange, open, defaultOpen, onOpenChange, position, defaultPosition, onPositionChange, busy, error, waveform, label, labels: labelsProp, locale, seekStep, seekLargeStep, slotProps, className, sx, onKeyDown, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...rest }: NowPlayingProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
85
|
+
export declare const NowPlaying: typeof NowPlayingRoot & {
|
|
86
|
+
Levels: typeof NowPlayingLevels;
|
|
87
|
+
};
|
|
88
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
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 PhotoGridPhoto {
|
|
5
|
+
id: string;
|
|
6
|
+
src: string;
|
|
7
|
+
srcSet?: string;
|
|
8
|
+
sizes?: string;
|
|
9
|
+
alt: string;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
title: string;
|
|
13
|
+
detail?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
type Slot<Tag extends keyof React.JSX.IntrinsicElements> = Omit<ComponentPropsWithRef<Tag>, 'children'> & {
|
|
16
|
+
css?: Interpolation<Theme>;
|
|
17
|
+
};
|
|
18
|
+
type ActionSlot = Omit<Slot<'button'>, 'type' | 'disabled' | 'aria-pressed'>;
|
|
19
|
+
export interface PhotoGridSlotProps {
|
|
20
|
+
header?: Slot<'header'>;
|
|
21
|
+
title?: Slot<'h2'>;
|
|
22
|
+
density?: Slot<'div'>;
|
|
23
|
+
list?: Slot<'ul'>;
|
|
24
|
+
item?: Slot<'li'>;
|
|
25
|
+
photo?: ActionSlot;
|
|
26
|
+
favorite?: ActionSlot;
|
|
27
|
+
viewer?: Omit<Slot<'dialog'>, 'open'>;
|
|
28
|
+
stage?: Slot<'div'>;
|
|
29
|
+
filmstrip?: Omit<Slot<'input'>, 'type' | 'value' | 'defaultValue' | 'min' | 'max' | 'step' | 'disabled'>;
|
|
30
|
+
controls?: Slot<'div'>;
|
|
31
|
+
status?: Slot<'div'>;
|
|
32
|
+
}
|
|
33
|
+
export interface PhotoGridLabels {
|
|
34
|
+
larger: string;
|
|
35
|
+
smaller: string;
|
|
36
|
+
density: string;
|
|
37
|
+
empty: string;
|
|
38
|
+
unavailable: string;
|
|
39
|
+
imageUnavailable: string;
|
|
40
|
+
close: string;
|
|
41
|
+
previous: string;
|
|
42
|
+
next: string;
|
|
43
|
+
filmstrip: string;
|
|
44
|
+
zoomIn: string;
|
|
45
|
+
zoomOut: string;
|
|
46
|
+
resetZoom: string;
|
|
47
|
+
panLeft: string;
|
|
48
|
+
panRight: string;
|
|
49
|
+
panUp: string;
|
|
50
|
+
panDown: string;
|
|
51
|
+
favorite: (title: string, favorite: boolean) => string;
|
|
52
|
+
openPhoto: (title: string, alt: string, favorite: boolean) => string;
|
|
53
|
+
position: (position: string, total: string, title: string) => string;
|
|
54
|
+
columns: (columns: string) => string;
|
|
55
|
+
}
|
|
56
|
+
export interface PhotoGridProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'defaultValue'>, SxProps {
|
|
57
|
+
photos: readonly PhotoGridPhoto[];
|
|
58
|
+
title: string;
|
|
59
|
+
/** Preferred columns. Narrow containers reduce effective columns without changing this axis. */
|
|
60
|
+
densitySteps?: readonly number[];
|
|
61
|
+
density?: number;
|
|
62
|
+
defaultDensity?: number;
|
|
63
|
+
onDensityChange?: (columns: number) => void;
|
|
64
|
+
favorites?: readonly string[];
|
|
65
|
+
defaultFavorites?: readonly string[];
|
|
66
|
+
onFavoritesChange?: (ids: string[]) => void;
|
|
67
|
+
onFavoriteChange?: (id: string, favorite: boolean) => void;
|
|
68
|
+
value?: string | null;
|
|
69
|
+
defaultValue?: string | null;
|
|
70
|
+
onValueChange?: (id: string | null) => void;
|
|
71
|
+
open?: boolean;
|
|
72
|
+
defaultOpen?: boolean;
|
|
73
|
+
onOpenChange?: (open: boolean) => void;
|
|
74
|
+
labels?: Partial<PhotoGridLabels>;
|
|
75
|
+
locale?: Intl.LocalesArgument;
|
|
76
|
+
slotProps?: PhotoGridSlotProps;
|
|
77
|
+
}
|
|
78
|
+
export declare function PhotoGrid({ ref, photos, title, densitySteps, density: densityProp, defaultDensity, onDensityChange, favorites: favoritesProp, defaultFavorites, onFavoritesChange, onFavoriteChange, value: valueProp, defaultValue, onValueChange, open: openProp, defaultOpen, onOpenChange, labels: labelOverrides, locale, slotProps, className, sx, onKeyDown, ...rest }: PhotoGridProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
79
|
+
export declare namespace PhotoGrid {
|
|
80
|
+
var displayName: string;
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { SheetStack, useSheetStack } from './sheet-stack';
|
|
2
|
+
export type { SheetStackActions, SheetStackBackProps, SheetStackCloseProps, SheetStackContentProps, SheetStackDescriptionProps, SheetStackFooterProps, SheetStackHeadingLevel, SheetStackProps, SheetStackTitleProps, SheetStackTriggerProps, SheetStackVariant, } from './sheet-stack';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type SxProps } from '../../styling/sx';
|
|
3
|
+
export type SheetStackVariant = 'auto' | 'sheet' | 'dialog';
|
|
4
|
+
export type SheetStackHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
export interface SheetStackProps {
|
|
6
|
+
/** Open sheet keys, bottom first. */
|
|
7
|
+
value?: readonly string[];
|
|
8
|
+
defaultValue?: readonly string[];
|
|
9
|
+
onValueChange?: (value: string[]) => void;
|
|
10
|
+
/** `auto` lays out as a sheet below `breakpoint` and as a centered dialog at or above it. */
|
|
11
|
+
variant?: SheetStackVariant;
|
|
12
|
+
/** Layer inline size in CSS px where `auto` switches to the dialog layout. */
|
|
13
|
+
breakpoint?: number;
|
|
14
|
+
/** Draws the layer inside the nearest positioned ancestor; modality stays document-wide. */
|
|
15
|
+
contained?: boolean;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export interface SheetStackTriggerProps extends ComponentPropsWithRef<'button'>, SxProps {
|
|
19
|
+
/** Key of the sheet this trigger pushes. */
|
|
20
|
+
value: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SheetStackContentProps extends Omit<ComponentPropsWithRef<'div'>, 'onCancel'>, SxProps {
|
|
23
|
+
/** Stable key, unique within the stack. */
|
|
24
|
+
value: string;
|
|
25
|
+
/** False refuses Escape, backdrop and drag dismissal; Back and Close still work. */
|
|
26
|
+
dismissible?: boolean;
|
|
27
|
+
/** Dismissal request (Escape, backdrop, drag) on this sheet while on top; `preventDefault()` vetoes it. */
|
|
28
|
+
onCancel?: (event: Event) => void;
|
|
29
|
+
/** Set false to keep structured content out of the sheet's accessible description. */
|
|
30
|
+
withDescription?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface SheetStackTitleProps extends ComponentPropsWithRef<'h2'>, SxProps {
|
|
33
|
+
level?: SheetStackHeadingLevel;
|
|
34
|
+
}
|
|
35
|
+
export interface SheetStackDescriptionProps extends ComponentPropsWithRef<'p'>, SxProps {
|
|
36
|
+
}
|
|
37
|
+
export interface SheetStackFooterProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
38
|
+
}
|
|
39
|
+
export interface SheetStackBackProps extends Omit<ComponentPropsWithRef<'button'>, 'aria-label'>, SxProps {
|
|
40
|
+
/** Localized accessible name, e.g. "Back to Settings". */
|
|
41
|
+
label: string;
|
|
42
|
+
}
|
|
43
|
+
export interface SheetStackCloseProps extends Omit<ComponentPropsWithRef<'button'>, 'aria-label'>, SxProps {
|
|
44
|
+
/** Localized accessible name, e.g. "Close all". */
|
|
45
|
+
label: string;
|
|
46
|
+
}
|
|
47
|
+
export interface SheetStackActions {
|
|
48
|
+
/** The open keys, bottom first. */
|
|
49
|
+
value: readonly string[];
|
|
50
|
+
/** Opens `key` on top; an open key truncates the stack back to it. */
|
|
51
|
+
push: (key: string) => void;
|
|
52
|
+
/** Closes the top sheet. */
|
|
53
|
+
pop: () => void;
|
|
54
|
+
/** Truncates the stack back to the open `key`. */
|
|
55
|
+
popTo: (key: string) => void;
|
|
56
|
+
/** Closes every sheet. */
|
|
57
|
+
close: () => void;
|
|
58
|
+
}
|
|
59
|
+
/** The stack's state and actions; throws outside `<SheetStack>`. */
|
|
60
|
+
export declare function useSheetStack(): SheetStackActions;
|
|
61
|
+
declare function SheetStackRoot({ value: valueProp, defaultValue, onValueChange, variant, breakpoint, contained, children, }: SheetStackProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
62
|
+
declare function SheetStackTrigger({ ref, value, onClick, className, sx, ...rest }: SheetStackTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
63
|
+
declare function SheetStackContent({ ref, value, className, sx, ...props }: SheetStackContentProps): import("react").ReactPortal | null;
|
|
64
|
+
declare function SheetStackTitle({ ref, level, className, sx, children, ...props }: SheetStackTitleProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
65
|
+
declare function SheetStackDescription({ ref, className, sx, children, ...props }: SheetStackDescriptionProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
66
|
+
declare function SheetStackFooter({ ref, className, sx, ...props }: SheetStackFooterProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
67
|
+
declare function SheetStackBack({ ref, label, onClick, className, sx, children, ...rest }: SheetStackBackProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
68
|
+
declare function SheetStackClose({ ref, label, onClick, className, sx, children, ...rest }: SheetStackCloseProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare const SheetStack: typeof SheetStackRoot & {
|
|
70
|
+
Trigger: typeof SheetStackTrigger;
|
|
71
|
+
Content: typeof SheetStackContent;
|
|
72
|
+
Title: typeof SheetStackTitle;
|
|
73
|
+
Description: typeof SheetStackDescription;
|
|
74
|
+
Footer: typeof SheetStackFooter;
|
|
75
|
+
Back: typeof SheetStackBack;
|
|
76
|
+
Close: typeof SheetStackClose;
|
|
77
|
+
};
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { ShortcutRecorder, normalizeShortcut, matchesShortcut, formatShortcut, useShortcutPlatform, usePressedShortcutKeys, defaultShortcutMessages, } from './shortcut-recorder';
|
|
2
|
+
export type { ShortcutRecorderProps, ShortcutKeysProps, ShortcutListProps, ShortcutPlatform, ShortcutBinding, ShortcutListGroup, ShortcutMessages, KeyboardEventLike, } from './shortcut-recorder';
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type SxProps } from '../../styling/sx';
|
|
3
|
+
import { type FieldPartProps } from '../field/field-anatomy';
|
|
4
|
+
export type ShortcutPlatform = 'mac' | 'other';
|
|
5
|
+
export interface ShortcutBinding {
|
|
6
|
+
shortcut: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ShortcutListGroup {
|
|
10
|
+
label: string;
|
|
11
|
+
items: readonly {
|
|
12
|
+
label: string;
|
|
13
|
+
shortcut: string;
|
|
14
|
+
keywords?: string;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
export interface ShortcutMessages {
|
|
18
|
+
placeholder: string;
|
|
19
|
+
recording: string;
|
|
20
|
+
canceled: string;
|
|
21
|
+
cleared: string;
|
|
22
|
+
noShortcut: string;
|
|
23
|
+
clearLabel: string;
|
|
24
|
+
cancelLabel: string;
|
|
25
|
+
confirmLabel: string;
|
|
26
|
+
reset: (spoken: string) => string;
|
|
27
|
+
set: (spoken: string) => string;
|
|
28
|
+
requireModifier: (platform: ShortcutPlatform) => string;
|
|
29
|
+
conflict: (spoken: string, binding: ShortcutBinding, reserved: boolean) => string;
|
|
30
|
+
listLabel: string;
|
|
31
|
+
searchLabel: string;
|
|
32
|
+
searchPlaceholder: string;
|
|
33
|
+
empty: string;
|
|
34
|
+
results: (count: number) => string;
|
|
35
|
+
keyName: (id: string, platform: ShortcutPlatform) => {
|
|
36
|
+
label: string;
|
|
37
|
+
spoken: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface KeyboardEventLike {
|
|
41
|
+
code: string;
|
|
42
|
+
key: string;
|
|
43
|
+
ctrlKey: boolean;
|
|
44
|
+
altKey: boolean;
|
|
45
|
+
shiftKey: boolean;
|
|
46
|
+
metaKey: boolean;
|
|
47
|
+
repeat?: boolean;
|
|
48
|
+
isComposing?: boolean;
|
|
49
|
+
getModifierState?: (key: string) => boolean;
|
|
50
|
+
}
|
|
51
|
+
export declare function normalizeShortcut(shortcut: string, platform: ShortcutPlatform): string | null;
|
|
52
|
+
export declare function matchesShortcut(event: KeyboardEventLike, shortcut: string, platform: ShortcutPlatform): boolean;
|
|
53
|
+
export declare const defaultShortcutMessages: ShortcutMessages;
|
|
54
|
+
export declare function formatShortcut(shortcut: string, platform: ShortcutPlatform, messages?: ShortcutMessages): {
|
|
55
|
+
text: string;
|
|
56
|
+
spoken: string;
|
|
57
|
+
};
|
|
58
|
+
export declare function useShortcutPlatform(override?: ShortcutPlatform): ShortcutPlatform;
|
|
59
|
+
export declare function usePressedShortcutKeys(enabled?: boolean): ReadonlySet<string>;
|
|
60
|
+
export interface ShortcutKeysProps extends ComponentPropsWithRef<'span'>, SxProps {
|
|
61
|
+
shortcut: string;
|
|
62
|
+
platform?: ShortcutPlatform;
|
|
63
|
+
pressed?: ReadonlySet<string>;
|
|
64
|
+
size?: 'sm' | 'md';
|
|
65
|
+
messages?: ShortcutMessages;
|
|
66
|
+
locale?: Intl.LocalesArgument;
|
|
67
|
+
slotProps?: {
|
|
68
|
+
key?: FieldPartProps;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
declare function ShortcutKeys({ shortcut, platform: platformProp, pressed, size, messages, locale: _locale, slotProps, className, sx, ...rest }: ShortcutKeysProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
72
|
+
type RecorderSlot = 'root' | 'label' | 'control' | 'recorder' | 'actions' | 'reset' | 'clear' | 'message' | 'confirm' | 'cancel' | 'description' | 'error' | 'status' | 'key';
|
|
73
|
+
export interface ShortcutRecorderProps extends Omit<ComponentPropsWithRef<'button'>, 'value' | 'defaultValue'>, SxProps {
|
|
74
|
+
value?: string | null;
|
|
75
|
+
defaultValue?: string | null;
|
|
76
|
+
onValueChange?: (value: string | null, details: {
|
|
77
|
+
replaced?: ShortcutBinding;
|
|
78
|
+
}) => void;
|
|
79
|
+
recording?: boolean;
|
|
80
|
+
defaultRecording?: boolean;
|
|
81
|
+
onRecordingChange?: (recording: boolean) => void;
|
|
82
|
+
resetValue?: string | null;
|
|
83
|
+
bindings?: readonly ShortcutBinding[];
|
|
84
|
+
reservedBindings?: readonly ShortcutBinding[];
|
|
85
|
+
warnReserved?: boolean;
|
|
86
|
+
requireModifier?: boolean;
|
|
87
|
+
platform?: ShortcutPlatform;
|
|
88
|
+
label?: ReactNode;
|
|
89
|
+
description?: ReactNode;
|
|
90
|
+
error?: ReactNode;
|
|
91
|
+
hideLabel?: boolean;
|
|
92
|
+
size?: 'sm' | 'md' | 'lg';
|
|
93
|
+
locale?: Intl.LocalesArgument;
|
|
94
|
+
messages?: ShortcutMessages;
|
|
95
|
+
readOnly?: boolean;
|
|
96
|
+
slotProps?: Partial<Record<RecorderSlot, FieldPartProps>>;
|
|
97
|
+
}
|
|
98
|
+
declare function ShortcutRecorderRoot({ ref, value, defaultValue, onValueChange, recording, defaultRecording, onRecordingChange, resetValue, bindings, reservedBindings, warnReserved, requireModifier, platform: platformProp, label, description, error, hideLabel, size, locale, messages, readOnly, disabled, name, dir, slotProps, className, sx, onClick, onKeyDown, onKeyUp, onBlur, onFocus, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, 'aria-invalid': invalid, id, children: _children, ...rest }: ShortcutRecorderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
99
|
+
type ListSlot = 'root' | 'search' | 'groups' | 'group' | 'heading' | 'item' | 'keys' | 'empty' | 'status';
|
|
100
|
+
export interface ShortcutListProps extends ComponentPropsWithRef<'section'>, SxProps {
|
|
101
|
+
groups: readonly ShortcutListGroup[];
|
|
102
|
+
searchable?: boolean;
|
|
103
|
+
highlightPressed?: boolean;
|
|
104
|
+
platform?: ShortcutPlatform;
|
|
105
|
+
locale?: Intl.LocalesArgument;
|
|
106
|
+
messages?: ShortcutMessages;
|
|
107
|
+
inputValue?: string;
|
|
108
|
+
defaultInputValue?: string;
|
|
109
|
+
onInputChange?: (value: string) => void;
|
|
110
|
+
slotProps?: Partial<Record<ListSlot, FieldPartProps>>;
|
|
111
|
+
}
|
|
112
|
+
declare function ShortcutList({ groups, searchable, highlightPressed, platform, locale, messages, inputValue, defaultInputValue, onInputChange, slotProps, className, sx, ref, ...rest }: ShortcutListProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
113
|
+
export declare const ShortcutRecorder: typeof ShortcutRecorderRoot & {
|
|
114
|
+
Keys: typeof ShortcutKeys;
|
|
115
|
+
List: typeof ShortcutList;
|
|
116
|
+
};
|
|
117
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StretchRefresh, type StretchRefreshProps, type StretchRefreshSlotProps, type StretchRefreshLabels, } from './stretch-refresh';
|