@jfrader/ui 0.4.0 → 0.5.1
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 +2 -0
- package/dist/accordion-DLul6vIl.js +205 -0
- package/dist/accordion.js +1 -1
- package/dist/{alert-BBqaKI4k.js → alert-DS_einpy.js} +1 -1
- package/dist/alert.js +1 -1
- package/dist/announcement-bar-Dlbq5-9D.js +382 -0
- package/dist/announcement-bar.js +2 -0
- package/dist/avatar-CaGJHy1N.js +145 -0
- package/dist/avatar-group-M1opAQEG.js +138 -0
- package/dist/avatar-group.js +2 -0
- package/dist/avatar.js +1 -1
- package/dist/badge-CjM5Agqk.js +119 -0
- package/dist/badge.js +1 -1
- package/dist/bottom-sheet-DjZOPq4k.js +674 -0
- package/dist/bottom-sheet.js +2 -0
- package/dist/{breadcrumbs-DVAOxfvL.js → breadcrumbs-BDK_LiwH.js} +11 -4
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-P2e7_44z.js → button-NLY0h6EJ.js} +8 -8
- package/dist/button.js +1 -1
- package/dist/calendar-BzJdv_SZ.js +449 -0
- package/dist/calendar.js +1 -1
- package/dist/card-Ca4KQKYQ.js +154 -0
- package/dist/card.js +1 -1
- package/dist/carousel-B7OrvD6J.js +474 -0
- package/dist/carousel.js +2 -0
- package/dist/{checkbox-COYG6L7d.js → checkbox-DKSzExj2.js} +17 -16
- package/dist/checkbox.js +1 -1
- package/dist/chip-group-DjQ0_6Y9.js +290 -0
- package/dist/chip-group.js +2 -0
- package/dist/code-block/shiki.js +147 -0
- package/dist/code-block-B5we2lZa.js +293 -0
- package/dist/code-block.js +2 -0
- package/dist/collection-registry-k6JcD3Jr.js +44 -0
- package/dist/combobox-DFFqOBCi.js +339 -0
- package/dist/combobox.js +1 -1
- package/dist/command-palette-BmQu2w4H.js +391 -0
- package/dist/command-palette.js +1 -1
- package/dist/comment-thread-ASaXDcGo.js +1410 -0
- package/dist/comment-thread.js +2 -0
- package/dist/context-menu-__1c2Dk9.js +370 -0
- package/dist/context-menu.js +2 -0
- package/dist/copy-button-DCSLcYS-.js +252 -0
- package/dist/copy-button.js +2 -0
- package/dist/countdown-Dp_TD1VP.js +293 -0
- package/dist/countdown.js +2 -0
- package/dist/date-picker-BiPN7yeK.js +255 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-DQpUeKqV.js +570 -0
- package/dist/date-range-picker.js +2 -0
- package/dist/{dialog-xaydbXl2.js → dialog-BX1zYMs-.js} +21 -20
- package/dist/dialog.js +1 -1
- package/dist/{divider-DYoJf0I_.js → divider-Cp7aNbhM.js} +21 -20
- package/dist/divider.js +1 -1
- package/dist/drawer-DsASTiP-.js +553 -0
- package/dist/drawer.js +2 -0
- package/dist/elastic-slider-BG6K019r.js +395 -0
- package/dist/elastic-slider.js +2 -0
- package/dist/empty-state-CDgrjPPf.js +142 -0
- package/dist/empty-state.js +2 -0
- package/dist/expandable-card-rUATve0o.js +347 -0
- package/dist/expandable-card.js +2 -0
- package/dist/expanding-search-BxOwtdwt.js +238 -0
- package/dist/expanding-search.js +2 -0
- package/dist/field-anatomy-COVdNpf5.js +84 -0
- package/dist/file-dropzone-BuXm3Tea.js +457 -0
- package/dist/file-dropzone.js +2 -0
- package/dist/filter-toolbar-Cy5Hqur-.js +314 -0
- package/dist/filter-toolbar.js +2 -0
- package/dist/hold-to-confirm-DjB2EVjM.js +294 -0
- package/dist/hold-to-confirm.js +2 -0
- package/dist/hover-card-CoMJKg1g.js +347 -0
- package/dist/hover-card.js +2 -0
- package/dist/image-compare-BxY8Ykzt.js +415 -0
- package/dist/image-compare.js +2 -0
- package/dist/index.js +84 -38
- package/dist/inline-edit-C0eeml65.js +535 -0
- package/dist/inline-edit.js +2 -0
- package/dist/input-control-DmMuAuPS.js +34 -0
- package/dist/json-viewer-DgWqyU75.js +802 -0
- package/dist/json-viewer.js +2 -0
- package/dist/listbox-style-WX-RASp1.js +59 -0
- package/dist/{media-D_eA_I-e.js → media-8yrN85VT.js} +2 -2
- package/dist/mention-input-sq61si9L.js +600 -0
- package/dist/mention-input.js +2 -0
- package/dist/menu-DDKgmK2F.js +295 -0
- package/dist/menu.js +1 -1
- package/dist/metric-card--lVTz5Wn.js +118 -0
- package/dist/metric-card.js +2 -0
- package/dist/multi-select-DG1BCFX7.js +598 -0
- package/dist/multi-select.js +2 -0
- package/dist/{navigation-DhnKriOp.js → navigation-CC26JDr-.js} +24 -18
- package/dist/navigation.js +1 -1
- package/dist/overlay-layer-qEbpEtb8.js +78 -0
- package/dist/overlay-portal-C4JZFq2M.js +15 -0
- package/dist/{pagination-DYdwsxwe.js → pagination-BfkeWbmP.js} +24 -23
- package/dist/pagination.js +1 -1
- package/dist/password-field-03pWRkuY.js +250 -0
- package/dist/password-field.js +2 -0
- package/dist/pill-BaS-uIbn.js +58 -0
- package/dist/pill.js +1 -1
- package/dist/popover-CErIw2q3.js +125 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-BpJswTG4.js → progress-DAQkfhPd.js} +5 -5
- package/dist/progress.js +1 -1
- package/dist/radio-cards-Cu9cBssN.js +456 -0
- package/dist/radio-cards.js +2 -0
- package/dist/{radio-group-Ce0_IWQr.js → radio-group-TIK0-iPX.js} +22 -19
- package/dist/radio-group.js +1 -1
- package/dist/resizable-panels-DUpQEpwG.js +520 -0
- package/dist/resizable-panels.js +2 -0
- package/dist/scroll-area-CcZyiSOQ.js +371 -0
- package/dist/scroll-area.js +2 -0
- package/dist/search-field-DMvho0KQ.js +274 -0
- package/dist/search-field.js +2 -0
- package/dist/segmented-control-8ZUGnsZm.js +327 -0
- package/dist/segmented-control.js +2 -0
- package/dist/select-D5rhJ8gi.js +293 -0
- package/dist/select.js +1 -1
- package/dist/signature-pad-_bTeguN9.js +645 -0
- package/dist/signature-pad.js +2 -0
- package/dist/{skeleton-OoFlOEXO.js → skeleton-XQQDkCHd.js} +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/slider-DVG6-Awh.js +308 -0
- package/dist/slider.js +2 -0
- package/dist/sortable-data-table-CYKT_Ng7.js +365 -0
- package/dist/sortable-data-table.js +2 -0
- package/dist/{spinner-C2YDoiMn.js → spinner-DtxvDPdM.js} +1 -1
- package/dist/spinner.js +1 -1
- package/dist/split-button-BCw4zZom.js +262 -0
- package/dist/split-button.js +2 -0
- package/dist/stepper-CruHbXxX.js +480 -0
- package/dist/stepper.js +2 -0
- package/dist/swipe-actions-CBuJREU1.js +420 -0
- package/dist/swipe-actions.js +2 -0
- package/dist/switch-C1WrKrf-.js +145 -0
- package/dist/switch.js +1 -1
- package/dist/tabs-XluwRjgg.js +210 -0
- package/dist/tabs.js +1 -1
- package/dist/tag-input-DSRCyrX2.js +418 -0
- package/dist/tag-input.js +2 -0
- package/dist/{text-field-D60ok14S.js → text-field-hU72iSVS.js} +20 -17
- package/dist/text-field.js +1 -1
- package/dist/{textarea-DyfjtP0A.js → textarea-3k4Y0QQ3.js} +23 -20
- package/dist/textarea.js +1 -1
- package/dist/theme-root.js +1 -1
- package/dist/theme-switch-C505TtU8.js +166 -0
- package/dist/theme-switch.js +2 -0
- package/dist/time-picker-CPlhW0tr.js +311 -0
- package/dist/time-picker.js +2 -0
- package/dist/timeline-B0uAAVfT.js +624 -0
- package/dist/timeline.js +2 -0
- package/dist/toast-B7wo3sX1.js +371 -0
- package/dist/toast-stack-B40VpS4M.js +197 -0
- package/dist/toast-stack.js +2 -0
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-CI0e7hFm.js → toggle-group-B2fpFZwV.js} +5 -5
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-BvgVTCTN.js +120 -0
- package/dist/tooltip.js +1 -1
- package/dist/tree-view-j8qLqkb_.js +364 -0
- package/dist/tree-view.js +2 -0
- package/dist/types/components/announcement-bar/announcement-bar.d.ts +75 -0
- package/dist/types/components/announcement-bar/index.d.ts +2 -0
- package/dist/types/components/avatar-group/avatar-group.d.ts +43 -0
- package/dist/types/components/avatar-group/index.d.ts +2 -0
- package/dist/types/components/bottom-sheet/bottom-sheet.d.ts +60 -0
- package/dist/types/components/bottom-sheet/index.d.ts +2 -0
- package/dist/types/components/calendar/calendar.d.ts +25 -1
- package/dist/types/components/calendar/index.d.ts +1 -1
- package/dist/types/components/carousel/carousel.d.ts +73 -0
- package/dist/types/components/carousel/index.d.ts +2 -0
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/chip-group/chip-group.d.ts +54 -0
- package/dist/types/components/chip-group/index.d.ts +1 -0
- package/dist/types/components/code-block/code-block.d.ts +58 -0
- package/dist/types/components/code-block/index.d.ts +1 -0
- package/dist/types/components/code-block/shiki.d.ts +3 -0
- package/dist/types/components/combobox/combobox.d.ts +1 -1
- package/dist/types/components/command-palette/command-palette.d.ts +2 -2
- 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/comment-thread/thread-core.d.ts +96 -0
- package/dist/types/components/comment-thread/thread-parts.d.ts +114 -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/copy-button/copy-button.d.ts +49 -0
- package/dist/types/components/copy-button/index.d.ts +2 -0
- package/dist/types/components/countdown/countdown.d.ts +37 -0
- package/dist/types/components/countdown/index.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +1 -1
- package/dist/types/components/date-range-picker/date-range-picker.d.ts +103 -0
- package/dist/types/components/date-range-picker/index.d.ts +2 -0
- package/dist/types/components/drawer/drawer.d.ts +59 -0
- package/dist/types/components/drawer/index.d.ts +2 -0
- package/dist/types/components/elastic-slider/elastic-slider.d.ts +53 -0
- package/dist/types/components/elastic-slider/index.d.ts +1 -0
- package/dist/types/components/empty-state/empty-state.d.ts +36 -0
- package/dist/types/components/empty-state/index.d.ts +2 -0
- package/dist/types/components/expandable-card/expandable-card.d.ts +28 -0
- package/dist/types/components/expandable-card/index.d.ts +2 -0
- 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/field/field-anatomy.d.ts +4 -2
- package/dist/types/components/file-dropzone/file-dropzone.d.ts +93 -0
- package/dist/types/components/file-dropzone/index.d.ts +2 -0
- package/dist/types/components/filter-toolbar/filter-toolbar.d.ts +70 -0
- package/dist/types/components/filter-toolbar/index.d.ts +1 -0
- package/dist/types/components/hold-to-confirm/hold-to-confirm.d.ts +32 -0
- package/dist/types/components/hold-to-confirm/index.d.ts +2 -0
- package/dist/types/components/hover-card/hover-card.d.ts +97 -0
- package/dist/types/components/hover-card/index.d.ts +2 -0
- package/dist/types/components/image-compare/image-compare.d.ts +54 -0
- package/dist/types/components/image-compare/index.d.ts +1 -0
- package/dist/types/components/inline-edit/index.d.ts +2 -0
- package/dist/types/components/inline-edit/inline-edit.d.ts +93 -0
- package/dist/types/components/json-viewer/index.d.ts +2 -0
- package/dist/types/components/json-viewer/json-viewer.d.ts +82 -0
- package/dist/types/components/mention-input/index.d.ts +2 -0
- package/dist/types/components/mention-input/mention-input.d.ts +87 -0
- package/dist/types/components/menu/menu.d.ts +68 -7
- package/dist/types/components/metric-card/index.d.ts +1 -0
- package/dist/types/components/metric-card/metric-card.d.ts +37 -0
- package/dist/types/components/multi-select/index.d.ts +2 -0
- package/dist/types/components/multi-select/multi-select.d.ts +73 -0
- package/dist/types/components/pagination/pagination.d.ts +1 -1
- package/dist/types/components/password-field/index.d.ts +2 -0
- package/dist/types/components/password-field/password-field.d.ts +34 -0
- package/dist/types/components/popover/popover.d.ts +1 -1
- package/dist/types/components/radio-cards/index.d.ts +1 -0
- package/dist/types/components/radio-cards/radio-cards.d.ts +42 -0
- package/dist/types/components/radio-group/radio-group.d.ts +1 -1
- package/dist/types/components/resizable-panels/index.d.ts +2 -0
- package/dist/types/components/resizable-panels/resizable-panels.d.ts +42 -0
- package/dist/types/components/scroll-area/index.d.ts +2 -0
- package/dist/types/components/scroll-area/scroll-area.d.ts +34 -0
- package/dist/types/components/search-field/index.d.ts +1 -0
- package/dist/types/components/search-field/search-field.d.ts +31 -0
- package/dist/types/components/segmented-control/index.d.ts +2 -0
- package/dist/types/components/segmented-control/segmented-control.d.ts +32 -0
- package/dist/types/components/select/select.d.ts +1 -1
- package/dist/types/components/signature-pad/index.d.ts +2 -0
- package/dist/types/components/signature-pad/signature-pad.d.ts +104 -0
- package/dist/types/components/slider/index.d.ts +1 -0
- package/dist/types/components/slider/slider-style.d.ts +14 -0
- package/dist/types/components/slider/slider.d.ts +62 -0
- package/dist/types/components/slider/use-slider-interaction.d.ts +79 -0
- package/dist/types/components/sortable-data-table/index.d.ts +1 -0
- package/dist/types/components/sortable-data-table/sortable-data-table.d.ts +76 -0
- package/dist/types/components/split-button/index.d.ts +2 -0
- package/dist/types/components/split-button/split-button.d.ts +55 -0
- package/dist/types/components/stepper/index.d.ts +2 -0
- package/dist/types/components/stepper/stepper.d.ts +85 -0
- package/dist/types/components/swipe-actions/index.d.ts +2 -0
- package/dist/types/components/swipe-actions/swipe-actions.d.ts +44 -0
- package/dist/types/components/tabs/tabs.d.ts +1 -1
- package/dist/types/components/tag-input/index.d.ts +2 -0
- package/dist/types/components/tag-input/tag-input.d.ts +66 -0
- 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-switch/index.d.ts +1 -0
- package/dist/types/components/theme-switch/theme-switch.d.ts +33 -0
- package/dist/types/components/time-picker/index.d.ts +2 -0
- package/dist/types/components/time-picker/time-picker.d.ts +48 -0
- package/dist/types/components/timeline/index.d.ts +2 -0
- package/dist/types/components/timeline/timeline.d.ts +66 -0
- package/dist/types/components/toast/toast.d.ts +37 -2
- package/dist/types/components/toast-stack/index.d.ts +2 -0
- package/dist/types/components/toast-stack/toast-stack.d.ts +28 -0
- package/dist/types/components/tooltip/tooltip.d.ts +2 -2
- package/dist/types/components/tree-view/index.d.ts +1 -0
- package/dist/types/components/tree-view/tree-view.d.ts +47 -0
- package/dist/types/components/usage-meter/index.d.ts +2 -0
- package/dist/types/components/usage-meter/usage-meter.d.ts +83 -0
- package/dist/types/index.d.ts +45 -0
- package/dist/types/overlay/overlay-layer.d.ts +53 -0
- package/dist/types/overlay/use-overlay-floating.d.ts +19 -2
- package/dist/types/styling/media.d.ts +1 -0
- package/dist/types/styling/theme.d.ts +12 -0
- package/dist/types/utils/use-controlled-state.d.ts +2 -1
- package/dist/usage-meter-qyQ3rYVv.js +463 -0
- package/dist/usage-meter.js +2 -0
- package/dist/use-controlled-state-DpeVQZNR.js +20 -0
- package/dist/use-latest-callback-cj1OOQL6.js +11 -0
- package/dist/use-overlay-floating-Bx2jBKAA.js +33 -0
- package/dist/use-slider-interaction-ChL-208h.js +234 -0
- package/package.json +195 -3
- package/dist/accordion-Bd-j04hW.js +0 -198
- package/dist/avatar-BahDVO9t.js +0 -132
- package/dist/badge-B_sLygxU.js +0 -108
- package/dist/calendar-C9Yad_-w.js +0 -394
- package/dist/card-D-aI2QHx.js +0 -158
- package/dist/collection-registry-BTYi6zGh.js +0 -98
- package/dist/combobox-DiMC2g_u.js +0 -327
- package/dist/command-palette-V_2pEay7.js +0 -379
- package/dist/date-picker-C29Uo4Tx.js +0 -250
- package/dist/field-anatomy-D2ToMeRa.js +0 -109
- package/dist/menu-CGPTNRnF.js +0 -216
- package/dist/pill-DO2gHzMb.js +0 -56
- package/dist/popover-CdRXjQqI.js +0 -113
- package/dist/select-BgG7WgSh.js +0 -286
- package/dist/switch-Dr-qjmT4.js +0 -142
- package/dist/tabs-CK_g1RKa.js +0 -203
- package/dist/toast-CjmELMZZ.js +0 -283
- package/dist/tooltip-CaL3rKbV.js +0 -108
- package/dist/use-controlled-state-CVXDa-qM.js +0 -21
- package/dist/use-overlay-floating-Bit-f0FU.js +0 -31
- package/dist/{theme-root-BbTBuLMQ.js → theme-root-Bs1U3uPA.js} +2 -2
|
@@ -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';
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
import { type ButtonSize, type ButtonTone, type ButtonVariant } from '../button';
|
|
5
|
+
export type CopyButtonValue = 'idle' | 'pending' | 'copied' | 'error';
|
|
6
|
+
export type CopyButtonIcons = Partial<Record<CopyButtonValue, ReactNode>>;
|
|
7
|
+
export interface CopyButtonSlotPartProps extends ComponentPropsWithoutRef<'span'> {
|
|
8
|
+
css?: Interpolation<Theme>;
|
|
9
|
+
}
|
|
10
|
+
export interface CopyButtonSlotProps {
|
|
11
|
+
icon?: CopyButtonSlotPartProps;
|
|
12
|
+
label?: CopyButtonSlotPartProps;
|
|
13
|
+
status?: CopyButtonSlotPartProps;
|
|
14
|
+
}
|
|
15
|
+
export interface CopyButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children' | 'value' | 'defaultValue' | 'color' | 'type'>, SxProps {
|
|
16
|
+
/** The string written to the clipboard. An empty string is a valid payload. */
|
|
17
|
+
text: string;
|
|
18
|
+
/** Accessible name and idle face, e.g. "Copy command". */
|
|
19
|
+
label: string;
|
|
20
|
+
/** Face and announcement while the write is in flight. */
|
|
21
|
+
pendingLabel: string;
|
|
22
|
+
/** Face and announcement after a successful write. */
|
|
23
|
+
copiedLabel: string;
|
|
24
|
+
/** Face and announcement after a failed or unavailable write. */
|
|
25
|
+
errorLabel: string;
|
|
26
|
+
/** Hides the visible label; the accessible name and announcements stay. */
|
|
27
|
+
iconOnly?: boolean;
|
|
28
|
+
/** Decorative icon per face; a supplied key replaces the default, including `null` for none. */
|
|
29
|
+
icons?: CopyButtonIcons;
|
|
30
|
+
value?: CopyButtonValue;
|
|
31
|
+
defaultValue?: CopyButtonValue;
|
|
32
|
+
onValueChange?: (value: CopyButtonValue) => void;
|
|
33
|
+
/** Called once per successful write with the text captured at activation. */
|
|
34
|
+
onCopied?: (text: string) => void;
|
|
35
|
+
/** Called once per failed write, including a missing Clipboard API. */
|
|
36
|
+
onCopyError?: (error: unknown) => void;
|
|
37
|
+
/** Milliseconds before `copied`/`error` request `idle`; 0 keeps the result face. */
|
|
38
|
+
resetAfterMs?: number;
|
|
39
|
+
variant?: ButtonVariant;
|
|
40
|
+
tone?: ButtonTone;
|
|
41
|
+
size?: ButtonSize;
|
|
42
|
+
slotProps?: CopyButtonSlotProps;
|
|
43
|
+
/** Consumer style overrides, merged after the component's own styles. */
|
|
44
|
+
css?: Interpolation<Theme>;
|
|
45
|
+
}
|
|
46
|
+
export declare function CopyButton({ ref, text, label, pendingLabel, copiedLabel, errorLabel, iconOnly, icons, value, defaultValue, onValueChange, onCopied, onCopyError, resetAfterMs, variant, tone, size, slotProps, disabled, onClick, className, css: cssProp, sx, ...rest }: CopyButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare namespace CopyButton {
|
|
48
|
+
var displayName: string;
|
|
49
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 type CountdownUnit = 'days' | 'hours' | 'minutes' | 'seconds';
|
|
5
|
+
export type CountdownVariant = 'display' | 'compact';
|
|
6
|
+
export interface CountdownPartProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
css?: Interpolation<Theme>;
|
|
9
|
+
}
|
|
10
|
+
export interface CountdownProps extends Omit<ComponentPropsWithRef<'div'>, 'children'>, SxProps {
|
|
11
|
+
/** Exact instant: epoch milliseconds, Date, or an ISO date-time with Z or an explicit offset. */
|
|
12
|
+
target: Date | number | string;
|
|
13
|
+
variant?: CountdownVariant;
|
|
14
|
+
units?: readonly CountdownUnit[];
|
|
15
|
+
label?: ReactNode;
|
|
16
|
+
locale?: Intl.LocalesArgument;
|
|
17
|
+
unitDisplay?: 'long' | 'short' | 'narrow';
|
|
18
|
+
completeLabel?: ReactNode;
|
|
19
|
+
completeText?: string;
|
|
20
|
+
pendingLabel?: ReactNode;
|
|
21
|
+
invalidLabel?: ReactNode;
|
|
22
|
+
invalidText?: string;
|
|
23
|
+
/** Authoritative epoch-ms source. Background callbacks run at the first executable wake-up. */
|
|
24
|
+
clock?: () => number;
|
|
25
|
+
/** Shared server snapshot for identical SSR and hydration output. */
|
|
26
|
+
initialNow?: number;
|
|
27
|
+
/** Once per resolved target identity, including a target already elapsed at mount. */
|
|
28
|
+
onComplete?: (targetEpochMs: number) => void;
|
|
29
|
+
announceCompletion?: boolean;
|
|
30
|
+
completionIcon?: ReactNode;
|
|
31
|
+
slotProps?: Partial<Record<'label' | 'content' | 'unit' | 'number' | 'complete' | 'icon' | 'description', CountdownPartProps>>;
|
|
32
|
+
}
|
|
33
|
+
/** Noninteractive ARIA timer. Tab and every other key pass through; no focus or editable state. */
|
|
34
|
+
export declare function Countdown({ ref, target, variant, units, label, locale, unitDisplay, completeLabel, completeText, pendingLabel, invalidLabel, invalidText, clock, initialNow, onComplete, announceCompletion, completionIcon, slotProps, className, sx, 'aria-labelledby': externalLabel, 'aria-describedby': externalDescription, 'aria-label': ariaLabel, ...rest }: CountdownProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare namespace Countdown {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Countdown, type CountdownProps, type CountdownUnit, type CountdownVariant, type CountdownPartProps, } from './countdown';
|
|
@@ -32,7 +32,7 @@ export interface DatePickerInputProps extends Omit<TextFieldProps, 'value' | 'de
|
|
|
32
32
|
}
|
|
33
33
|
/** The popup renders its own calendar. */
|
|
34
34
|
export type DatePickerPopupProps = Omit<ComponentPropsWithRef<'div'>, 'children'> & SxProps;
|
|
35
|
-
declare function DatePickerRoot(
|
|
35
|
+
declare function DatePickerRoot(props: DatePickerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
36
|
declare function DatePickerInput({ ref, label, id: idProp, disabled: disabledProp, slotProps, onKeyDown, onKeyUp, ...rest }: DatePickerInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
37
37
|
declare function DatePickerPopup({ ref, style, className, sx, ...rest }: DatePickerPopupProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
38
38
|
export declare const DatePicker: typeof DatePickerRoot & {
|
|
@@ -0,0 +1,103 @@
|
|
|
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 CalendarRange, type CalendarWeekday } from '../calendar';
|
|
5
|
+
/** Inclusive range of 'YYYY-MM-DD' dates. */
|
|
6
|
+
export type DateRangeValue = CalendarRange;
|
|
7
|
+
export type DateRangePickerMonths = 'auto' | 1 | 2;
|
|
8
|
+
export type DateRangePickerSize = 'sm' | 'md' | 'lg';
|
|
9
|
+
export interface DateRangePreset {
|
|
10
|
+
id: string;
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
/** The preset's range for the given 'YYYY-MM-DD' today. Out-of-bounds results disable the preset. */
|
|
13
|
+
range: (today: string) => DateRangeValue;
|
|
14
|
+
}
|
|
15
|
+
export interface DateRangePickerSummaryDetails {
|
|
16
|
+
/** The range as Intl formats it, e.g. "Oct 3 – 9, 2026". */
|
|
17
|
+
range: string;
|
|
18
|
+
/** Inclusive day count, for plural selection. */
|
|
19
|
+
days: number;
|
|
20
|
+
/** `days` as Intl.NumberFormat formats it in the locale. */
|
|
21
|
+
formattedDays: string;
|
|
22
|
+
}
|
|
23
|
+
export interface DateRangePickerMessages {
|
|
24
|
+
apply: ReactNode;
|
|
25
|
+
cancel: ReactNode;
|
|
26
|
+
/** Summary while no range is drafted. */
|
|
27
|
+
empty: ReactNode;
|
|
28
|
+
/** Description of the range's first day. */
|
|
29
|
+
start: string;
|
|
30
|
+
/** Description of the range's last day. */
|
|
31
|
+
end: string;
|
|
32
|
+
/** Summary of the drafted (or previewed) range; select plurals from `days`. */
|
|
33
|
+
summary: (details: DateRangePickerSummaryDetails) => ReactNode;
|
|
34
|
+
/** Accessible name of the preset group. */
|
|
35
|
+
presets?: string;
|
|
36
|
+
/** Alert shown next to the trigger while the field is invalid. */
|
|
37
|
+
error?: ReactNode;
|
|
38
|
+
/** Joined to the trigger's name when `required` is set. */
|
|
39
|
+
required?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface DateRangePickerProps {
|
|
42
|
+
value?: DateRangeValue | null;
|
|
43
|
+
defaultValue?: DateRangeValue | null;
|
|
44
|
+
/** Apply request; a structurally unchanged range is not requested. Controlled values may reject it. */
|
|
45
|
+
onValueChange?: (range: DateRangeValue | null) => void;
|
|
46
|
+
open?: boolean;
|
|
47
|
+
defaultOpen?: boolean;
|
|
48
|
+
onOpenChange?: (open: boolean) => void;
|
|
49
|
+
/** Earliest selectable date, 'YYYY-MM-DD'. */
|
|
50
|
+
min?: string;
|
|
51
|
+
/** Latest selectable date, 'YYYY-MM-DD'. */
|
|
52
|
+
max?: string;
|
|
53
|
+
/** BCP 47 tag. Defaults to `navigator.language` (the Intl default on the server). */
|
|
54
|
+
locale?: string;
|
|
55
|
+
/** Defaults to the locale's week start. */
|
|
56
|
+
firstDayOfWeek?: CalendarWeekday;
|
|
57
|
+
/** 'YYYY-MM-DD' used for presets and the today marker. Defaults to the local civil date. */
|
|
58
|
+
today?: string;
|
|
59
|
+
/** `auto` shows two months when the boundary leaves at least 712px. */
|
|
60
|
+
months?: DateRangePickerMonths;
|
|
61
|
+
/** Collision boundary of the dialog. Defaults to the clipping ancestors and the viewport. */
|
|
62
|
+
boundary?: HTMLElement | null;
|
|
63
|
+
presets?: readonly DateRangePreset[];
|
|
64
|
+
/** Blocks the popup, even with controlled open=true, and omits the form fields. */
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
/** The dialog opens for inspection; days, presets and Apply change nothing. */
|
|
67
|
+
readOnly?: boolean;
|
|
68
|
+
required?: boolean;
|
|
69
|
+
/** Hidden form field carrying the start date ('' when empty). */
|
|
70
|
+
startName?: string;
|
|
71
|
+
/** Hidden form field carrying the end date ('' when empty). */
|
|
72
|
+
endName?: string;
|
|
73
|
+
messages: DateRangePickerMessages;
|
|
74
|
+
/** One Trigger and one Content. */
|
|
75
|
+
children?: ReactNode;
|
|
76
|
+
}
|
|
77
|
+
export interface DateRangePickerTriggerProps extends Omit<ComponentPropsWithRef<'button'>, 'value' | 'defaultValue' | 'children'>, SxProps {
|
|
78
|
+
size?: DateRangePickerSize;
|
|
79
|
+
/** Decorative icon before the range text. */
|
|
80
|
+
icon?: ReactNode;
|
|
81
|
+
/** Shown while no valid range is committed. */
|
|
82
|
+
placeholder?: ReactNode;
|
|
83
|
+
}
|
|
84
|
+
export interface DateRangePickerSlotProps {
|
|
85
|
+
className?: string;
|
|
86
|
+
css?: Interpolation<Theme>;
|
|
87
|
+
}
|
|
88
|
+
export interface DateRangePickerContentProps extends Omit<ComponentPropsWithRef<'div'>, 'children'>, SxProps {
|
|
89
|
+
slotProps?: {
|
|
90
|
+
presets?: DateRangePickerSlotProps;
|
|
91
|
+
calendars?: DateRangePickerSlotProps;
|
|
92
|
+
summary?: DateRangePickerSlotProps;
|
|
93
|
+
actions?: DateRangePickerSlotProps;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
declare function DateRangePickerRoot(props: DateRangePickerProps): 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
|
+
declare function DateRangePickerContent(props: DateRangePickerContentProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
99
|
+
export declare const DateRangePicker: typeof DateRangePickerRoot & {
|
|
100
|
+
Trigger: typeof DateRangePickerTrigger;
|
|
101
|
+
Content: typeof DateRangePickerContent;
|
|
102
|
+
};
|
|
103
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { DateRangePicker } from './date-range-picker';
|
|
2
|
+
export type { DateRangePickerContentProps, DateRangePickerMessages, DateRangePickerMonths, DateRangePickerProps, DateRangePickerSize, DateRangePickerSlotProps, DateRangePickerSummaryDetails, DateRangePickerTriggerProps, DateRangePreset, DateRangeValue, } from './date-range-picker';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type SxProps } from '../../styling/sx';
|
|
3
|
+
export type DrawerSide = 'inline-start' | 'inline-end' | 'top' | 'bottom';
|
|
4
|
+
export type DrawerSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface DrawerProps {
|
|
6
|
+
open?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
/** Viewport edge the panel attaches to. Inline sides follow the drawer's effective direction. */
|
|
10
|
+
side?: DrawerSide;
|
|
11
|
+
/** Inline size cap for inline sides. Top/bottom panels span the viewport and ignore it. */
|
|
12
|
+
size?: DrawerSize;
|
|
13
|
+
/** Lets the header drag the panel toward its edge to dismiss. Ignored under reduced motion. */
|
|
14
|
+
draggable?: boolean;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface DrawerTriggerProps extends ComponentPropsWithRef<'button'>, SxProps {
|
|
18
|
+
}
|
|
19
|
+
export interface DrawerContentProps extends Omit<ComponentPropsWithRef<'dialog'>, 'open'>, SxProps {
|
|
20
|
+
/** Set false to keep structured content out of the drawer's accessible description. */
|
|
21
|
+
withDescription?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface DrawerPanelProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
24
|
+
}
|
|
25
|
+
export interface DrawerHeaderProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
26
|
+
}
|
|
27
|
+
export interface DrawerBodyProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
28
|
+
}
|
|
29
|
+
export interface DrawerFooterProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
30
|
+
}
|
|
31
|
+
export interface DrawerTitleProps extends ComponentPropsWithRef<'h2'>, SxProps {
|
|
32
|
+
}
|
|
33
|
+
export interface DrawerDescriptionProps extends ComponentPropsWithRef<'p'>, SxProps {
|
|
34
|
+
}
|
|
35
|
+
/** Needs visible children or a localized `aria-label`; the library ships no default label. */
|
|
36
|
+
export interface DrawerCloseProps extends ComponentPropsWithRef<'button'>, SxProps {
|
|
37
|
+
}
|
|
38
|
+
declare function DrawerRoot({ open: openProp, defaultOpen, onOpenChange, side, size, draggable, children, }: DrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare function DrawerTrigger({ ref, onClick, className, sx, ...rest }: DrawerTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
40
|
+
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;
|
|
42
|
+
declare function DrawerHeader({ ref, className, sx, ...props }: DrawerHeaderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function DrawerBody({ ref, className, sx, ...props }: DrawerBodyProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare function DrawerFooter({ ref, className, sx, ...props }: DrawerFooterProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare function DrawerTitle({ ref, className, sx, children, ...props }: DrawerTitleProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
46
|
+
declare function DrawerDescription({ ref, className, sx, children, ...props }: DrawerDescriptionProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
47
|
+
declare function DrawerClose({ ref, onClick, className, sx, ...rest }: DrawerCloseProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare const Drawer: typeof DrawerRoot & {
|
|
49
|
+
Trigger: typeof DrawerTrigger;
|
|
50
|
+
Content: typeof DrawerContent;
|
|
51
|
+
Panel: typeof DrawerPanel;
|
|
52
|
+
Header: typeof DrawerHeader;
|
|
53
|
+
Body: typeof DrawerBody;
|
|
54
|
+
Footer: typeof DrawerFooter;
|
|
55
|
+
Title: typeof DrawerTitle;
|
|
56
|
+
Description: typeof DrawerDescription;
|
|
57
|
+
Close: typeof DrawerClose;
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Drawer } from './drawer';
|
|
2
|
+
export type { DrawerBodyProps, DrawerCloseProps, DrawerContentProps, DrawerDescriptionProps, DrawerFooterProps, DrawerHeaderProps, DrawerPanelProps, DrawerProps, DrawerSide, DrawerSize, DrawerTitleProps, DrawerTriggerProps, } from './drawer';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type SxProps } from '../../styling/sx';
|
|
3
|
+
import { type SliderMark, type SliderPart as Part } from '../slider/use-slider-interaction';
|
|
4
|
+
export type ElasticSliderMark = SliderMark;
|
|
5
|
+
export type ElasticSliderSize = 'sm' | 'md';
|
|
6
|
+
export interface ElasticSliderSlotProps {
|
|
7
|
+
label?: Part<'span'>;
|
|
8
|
+
readout?: Part<'span'>;
|
|
9
|
+
description?: Part<'div'>;
|
|
10
|
+
error?: Part<'div'>;
|
|
11
|
+
control?: Part<'div'>;
|
|
12
|
+
rail?: Part<'div'>;
|
|
13
|
+
track?: Part<'div'>;
|
|
14
|
+
fill?: Part<'div'>;
|
|
15
|
+
thumb?: Part<'div'>;
|
|
16
|
+
bubble?: Part<'span'>;
|
|
17
|
+
tick?: Part<'span'> | ((index: number) => Part<'span'>);
|
|
18
|
+
mark?: Part<'button'> | ((index: number) => Part<'button'>);
|
|
19
|
+
start?: Part<'div'>;
|
|
20
|
+
end?: Part<'div'>;
|
|
21
|
+
}
|
|
22
|
+
export interface ElasticSliderProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange' | 'children'>, SxProps {
|
|
23
|
+
label: ReactNode;
|
|
24
|
+
value?: number;
|
|
25
|
+
defaultValue?: number;
|
|
26
|
+
onValueChange?: (value: number) => void;
|
|
27
|
+
onValueCommit?: (value: number) => void;
|
|
28
|
+
description?: ReactNode;
|
|
29
|
+
error?: ReactNode;
|
|
30
|
+
invalid?: boolean;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
min?: number;
|
|
33
|
+
max?: number;
|
|
34
|
+
step?: number;
|
|
35
|
+
largeStep?: number;
|
|
36
|
+
/** Detents. Normalized to the step lattice; invalid or out-of-domain marks are ignored. */
|
|
37
|
+
marks?: readonly ElasticSliderMark[];
|
|
38
|
+
locale?: Intl.LocalesArgument;
|
|
39
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
40
|
+
formatValue?: (value: number, formatter: Intl.NumberFormat) => string;
|
|
41
|
+
showValue?: boolean;
|
|
42
|
+
start?: ReactNode;
|
|
43
|
+
end?: ReactNode;
|
|
44
|
+
/** Short vibration when a touch drag latches onto a detent, where supported. Off under reduced motion. */
|
|
45
|
+
haptics?: boolean;
|
|
46
|
+
name?: string;
|
|
47
|
+
size?: ElasticSliderSize;
|
|
48
|
+
slotProps?: ElasticSliderSlotProps;
|
|
49
|
+
}
|
|
50
|
+
export declare function ElasticSlider(props: ElasticSliderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare namespace ElasticSlider {
|
|
52
|
+
var displayName: string;
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ElasticSlider, type ElasticSliderProps, type ElasticSliderMark, type ElasticSliderSize, type ElasticSliderSlotProps, } from './elastic-slider';
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { CardHeadingLevel } from '../card';
|
|
5
|
+
export type EmptyStateVariant = 'centered' | 'inline';
|
|
6
|
+
export interface EmptyStatePartProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
css?: Interpolation<Theme>;
|
|
9
|
+
}
|
|
10
|
+
export interface EmptyStateSlotProps {
|
|
11
|
+
icon?: EmptyStatePartProps;
|
|
12
|
+
content?: EmptyStatePartProps;
|
|
13
|
+
title?: EmptyStatePartProps;
|
|
14
|
+
description?: EmptyStatePartProps;
|
|
15
|
+
action?: EmptyStatePartProps;
|
|
16
|
+
}
|
|
17
|
+
export interface EmptyStateProps extends Omit<ComponentPropsWithRef<'section'>, 'title' | 'children'>, SxProps {
|
|
18
|
+
/** Visible heading. */
|
|
19
|
+
title: ReactNode;
|
|
20
|
+
description?: ReactNode;
|
|
21
|
+
/** Decorative; hidden from assistive tech. Never put interactive content here. */
|
|
22
|
+
icon?: ReactNode;
|
|
23
|
+
/** Caller-owned controls (Button, link), rendered as given. */
|
|
24
|
+
action?: ReactNode;
|
|
25
|
+
headingLevel?: CardHeadingLevel;
|
|
26
|
+
variant?: EmptyStateVariant;
|
|
27
|
+
slotProps?: EmptyStateSlotProps;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Empty view with a literal next action. Use Skeleton while content is pending and Alert for an
|
|
31
|
+
* error next to existing content. The caller owns copy, translations and result announcements.
|
|
32
|
+
*/
|
|
33
|
+
export declare function EmptyState({ ref, title, description, icon, action, headingLevel, variant, slotProps, className, sx, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...rest }: EmptyStateProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare namespace EmptyState {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { type SxProps } from '../../styling/sx';
|
|
3
|
+
export interface ExpandableCardProps extends Omit<ComponentPropsWithRef<'article'>, 'defaultValue' | 'onChange'>, SxProps {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
collapsedInlineSize?: number;
|
|
8
|
+
expandedInlineSize?: number;
|
|
9
|
+
size?: 'sm' | 'md';
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
headingLevel?: 2 | 3 | 4;
|
|
12
|
+
}
|
|
13
|
+
export type ExpandableCardTriggerProps = ComponentPropsWithRef<'button'> & SxProps;
|
|
14
|
+
export type ExpandableCardTitleProps = ComponentPropsWithRef<'span'> & SxProps;
|
|
15
|
+
export type ExpandableCardDescriptionProps = ComponentPropsWithRef<'span'> & SxProps;
|
|
16
|
+
export type ExpandableCardContentProps = Omit<ComponentPropsWithRef<'div'>, 'hidden'> & SxProps;
|
|
17
|
+
declare function ExpandableCardRoot({ ref, open: openProp, defaultOpen, onOpenChange, collapsedInlineSize, expandedInlineSize, size, disabled, headingLevel, className, sx, onKeyDown, children, ...rest }: ExpandableCardProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function ExpandableCardTrigger({ ref, className, sx, onClick, disabled, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...rest }: ExpandableCardTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function ExpandableCardTitle({ ref, className, sx, children, ...rest }: ExpandableCardTitleProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
declare function ExpandableCardDescription({ ref, className, sx, children, ...rest }: ExpandableCardDescriptionProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
declare function ExpandableCardContent({ ref, className, sx, children, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...rest }: ExpandableCardContentProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const ExpandableCard: typeof ExpandableCardRoot & {
|
|
23
|
+
Trigger: typeof ExpandableCardTrigger;
|
|
24
|
+
Title: typeof ExpandableCardTitle;
|
|
25
|
+
Description: typeof ExpandableCardDescription;
|
|
26
|
+
Content: typeof ExpandableCardContent;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -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';
|
|
@@ -29,17 +29,19 @@ export declare function useFieldAnatomy({ id: idProp, description, error, 'aria-
|
|
|
29
29
|
interface FieldRootProps extends SxProps {
|
|
30
30
|
'data-ui': string;
|
|
31
31
|
className?: string;
|
|
32
|
+
dir?: string;
|
|
32
33
|
part?: FieldPartProps;
|
|
33
34
|
children: ReactNode;
|
|
34
35
|
}
|
|
35
|
-
export declare function FieldRoot({ 'data-ui': dataUi, className, sx, part, children }: FieldRootProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function FieldRoot({ 'data-ui': dataUi, className, dir, sx, part, children }: FieldRootProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
37
|
interface FieldLabelProps {
|
|
38
|
+
id?: string;
|
|
37
39
|
htmlFor: string;
|
|
38
40
|
required?: boolean;
|
|
39
41
|
part?: FieldPartProps;
|
|
40
42
|
children: ReactNode;
|
|
41
43
|
}
|
|
42
|
-
export declare function FieldLabel({ htmlFor, required, part, children }: FieldLabelProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
44
|
+
export declare function FieldLabel({ id, htmlFor, required, part, children }: FieldLabelProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
43
45
|
interface FieldMessageProps {
|
|
44
46
|
id: string;
|
|
45
47
|
part?: FieldPartProps;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export type FileDropzoneSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export type FileDropzoneUploadStatus = 'idle' | 'uploading' | 'uploaded' | 'failed';
|
|
6
|
+
export interface FileDropzoneItem {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
size: number;
|
|
10
|
+
file?: File;
|
|
11
|
+
preview?: string;
|
|
12
|
+
uploaded?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface FileRejection {
|
|
15
|
+
file: File;
|
|
16
|
+
code: 'type' | 'size' | 'count' | 'custom';
|
|
17
|
+
message: string;
|
|
18
|
+
}
|
|
19
|
+
export type FileDropzoneUpload = (item: FileDropzoneItem, context: {
|
|
20
|
+
signal: AbortSignal;
|
|
21
|
+
onProgress: (percent: number) => void;
|
|
22
|
+
}) => Promise<void>;
|
|
23
|
+
export interface FileDropzoneMessages {
|
|
24
|
+
browse: string;
|
|
25
|
+
files: string;
|
|
26
|
+
remove: (name: string) => string;
|
|
27
|
+
retry: (name: string) => string;
|
|
28
|
+
rejection: (code: Exclude<FileRejection['code'], 'custom'>, file: File) => string;
|
|
29
|
+
status: (status: FileDropzoneUploadStatus, name: string) => string;
|
|
30
|
+
added: (count: number) => string;
|
|
31
|
+
removed: (name: string) => string;
|
|
32
|
+
count: (count: number) => string;
|
|
33
|
+
uploadError: string;
|
|
34
|
+
}
|
|
35
|
+
type Slot<E extends keyof React.JSX.IntrinsicElements> = Omit<ComponentPropsWithRef<E>, 'ref' | 'children'> & {
|
|
36
|
+
css?: Interpolation<Theme>;
|
|
37
|
+
};
|
|
38
|
+
export interface FileDropzoneSlotProps {
|
|
39
|
+
root?: Slot<'div'>;
|
|
40
|
+
input?: Slot<'input'>;
|
|
41
|
+
target?: Slot<'div'>;
|
|
42
|
+
/** The native label: the clickable drop surface that names and opens the input. */
|
|
43
|
+
label?: Slot<'label'>;
|
|
44
|
+
browse?: Slot<'span'>;
|
|
45
|
+
description?: Slot<'div'>;
|
|
46
|
+
note?: Slot<'div'>;
|
|
47
|
+
list?: Slot<'ul'>;
|
|
48
|
+
item?: Slot<'li'>;
|
|
49
|
+
preview?: Slot<'img'>;
|
|
50
|
+
progress?: Slot<'div'>;
|
|
51
|
+
action?: Slot<'button'>;
|
|
52
|
+
error?: Slot<'div'>;
|
|
53
|
+
status?: Slot<'div'>;
|
|
54
|
+
}
|
|
55
|
+
export interface FileDropzoneProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange' | 'children'>, SxProps {
|
|
56
|
+
value?: FileDropzoneItem[];
|
|
57
|
+
defaultValue?: FileDropzoneItem[];
|
|
58
|
+
onValueChange?: (items: FileDropzoneItem[]) => void;
|
|
59
|
+
onReject?: (rejections: FileRejection[]) => void;
|
|
60
|
+
accept?: string;
|
|
61
|
+
multiple?: boolean;
|
|
62
|
+
maxFiles?: number;
|
|
63
|
+
maxSize?: number;
|
|
64
|
+
validate?: (file: File) => string | null;
|
|
65
|
+
onUpload?: FileDropzoneUpload;
|
|
66
|
+
listPlacement?: 'below' | 'inside';
|
|
67
|
+
compactAt?: number;
|
|
68
|
+
label?: ReactNode;
|
|
69
|
+
description?: ReactNode;
|
|
70
|
+
note?: ReactNode;
|
|
71
|
+
dropLabel?: ReactNode;
|
|
72
|
+
error?: ReactNode;
|
|
73
|
+
messages: FileDropzoneMessages;
|
|
74
|
+
locale?: string;
|
|
75
|
+
disabled?: boolean;
|
|
76
|
+
readOnly?: boolean;
|
|
77
|
+
required?: boolean;
|
|
78
|
+
size?: FileDropzoneSize;
|
|
79
|
+
paste?: boolean;
|
|
80
|
+
renderFileIcon?: (item: FileDropzoneItem) => ReactNode;
|
|
81
|
+
name?: string;
|
|
82
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
83
|
+
slotProps?: FileDropzoneSlotProps;
|
|
84
|
+
}
|
|
85
|
+
/** The visible surface is the native label of an operable file input; no custom dropzone role.
|
|
86
|
+
* Submit canonical value items, not input.files: drops and accumulated batches are not
|
|
87
|
+
* reflected in native FormData/required. Client validation is a convenience; validate uploads
|
|
88
|
+
* independently on the server. */
|
|
89
|
+
export declare function FileDropzone({ ref, value, defaultValue, onValueChange, onReject, accept, multiple, maxFiles, maxSize, validate, onUpload, listPlacement, compactAt, label, description, note, dropLabel, error, messages, locale, disabled, readOnly, required, size, paste, renderFileIcon, name, inputRef, slotProps, className, sx, onDragEnter, onDragOver, onDragLeave, onDrop, onPaste, ...rest }: FileDropzoneProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
90
|
+
export declare namespace FileDropzone {
|
|
91
|
+
var displayName: string;
|
|
92
|
+
}
|
|
93
|
+
export {};
|