@chassis-ui/react 0.1.2 → 0.2.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/dist/accordion.d.ts +2 -0
- package/dist/accordion.js +1 -0
- package/dist/autocomplete.d.ts +2 -0
- package/dist/autocomplete.js +1 -0
- package/dist/avatar.d.ts +2 -0
- package/dist/avatar.js +1 -0
- package/dist/badge.d.ts +2 -0
- package/dist/badge.js +1 -0
- package/dist/breadcrumb.d.ts +2 -0
- package/dist/breadcrumb.js +1 -0
- package/dist/button-group.d.ts +2 -0
- package/dist/button-group.js +1 -0
- package/dist/button.d.ts +3 -0
- package/dist/button.js +1 -0
- package/dist/calendar.d.ts +3 -0
- package/dist/calendar.js +1 -0
- package/dist/card.d.ts +2 -0
- package/dist/card.js +1 -0
- package/dist/carousel.d.ts +2 -0
- package/dist/carousel.js +1 -0
- package/dist/checkbox.d.ts +3 -0
- package/dist/checkbox.js +1 -0
- package/dist/chip-input.d.ts +2 -0
- package/dist/chip-input.js +1 -0
- package/dist/chip.d.ts +2 -0
- package/dist/chip.js +1 -0
- package/dist/chunks/Button-Cptd4Yk7.d.ts +65 -0
- package/dist/chunks/Button-I0aUy5h-.js +1 -0
- package/dist/chunks/Chip-D0Cw0mAr.js +1 -0
- package/dist/chunks/CloseButton-DJM7FRKh.js +1 -0
- package/dist/chunks/ComboboxItem-C9TpoJOI.d.ts +54 -0
- package/dist/chunks/ComboboxListBox-BhO8uRNg.js +1 -0
- package/dist/chunks/FormHelp-Be2PQL0y.js +1 -0
- package/dist/chunks/FormLabel-CYcQiFUI.js +1 -0
- package/dist/chunks/Icon-BIwkD-kx.js +1 -0
- package/dist/chunks/Icon-CioraWLF.d.ts +36 -0
- package/dist/chunks/Link-B0Y1xgYi.d.ts +69 -0
- package/dist/chunks/Link-Cq7FNWpm.js +1 -0
- package/dist/chunks/MenuItemDef-D0VDtYIQ.d.ts +82 -0
- package/dist/chunks/RangeCalendar-COnSfurr.js +1 -0
- package/dist/chunks/accordion-okRicuG5.js +1 -0
- package/dist/chunks/autocomplete-B0xTc6kg.js +1 -0
- package/dist/chunks/avatar-Bjm0DlPO.js +1 -0
- package/dist/chunks/badge-Bj8mf8lu.js +1 -0
- package/dist/chunks/breadcrumb-DDxnx_iS.js +1 -0
- package/dist/chunks/breakpoints-SLMTNHF9.d.ts +5 -0
- package/dist/chunks/breakpoints-o_2Ev7ir.js +1 -0
- package/dist/chunks/button-group-CPZYA6aZ.js +1 -0
- package/dist/chunks/card-DfF2K_5p.js +1 -0
- package/dist/chunks/carousel-DEvwcA7H.js +1 -0
- package/dist/chunks/checkbox-BFPS0pD6.js +1 -0
- package/dist/chunks/chip-input-CB1lE6vP.js +1 -0
- package/dist/chunks/collapse-WifcChO8.js +1 -0
- package/dist/chunks/color-input-CyRaLR_G.js +1 -0
- package/dist/chunks/combobox-DWEj-Sv7.js +1 -0
- package/dist/chunks/datagrid-nbnNThsT.js +2 -0
- package/dist/chunks/dateRangePresets-R1FtA1zp.d.ts +41 -0
- package/dist/chunks/datepicker-CslLKMm1.js +1 -0
- package/dist/chunks/dialogTransition-i9vw0i2Z.js +1 -0
- package/dist/chunks/direction-CPhdeL3A.js +1 -0
- package/dist/chunks/drawer-zReFjoJG.js +1 -0
- package/dist/chunks/file-input-RRqZSzjH.js +1 -0
- package/dist/chunks/flex-BTvpgaRv.js +1 -0
- package/dist/chunks/floating-input-CIC9Lm2a.js +1 -0
- package/dist/chunks/focus-ring-SR_LwaN7.js +1 -0
- package/dist/chunks/focusRedirect-BrvK3U_o.js +1 -0
- package/dist/chunks/form-GpdAyWWi.js +1 -0
- package/dist/chunks/form-field-BjQ9SIjx.js +1 -0
- package/dist/chunks/grid-CuFw89yV.js +1 -0
- package/dist/chunks/icon-mxYpL5nL.js +1 -0
- package/dist/chunks/iconConfig-Bu6Pt9o3.d.ts +69 -0
- package/dist/chunks/iconSlot-BmWxJh27.js +1 -0
- package/dist/chunks/index--0_IpTDT.d.ts +17 -0
- package/dist/chunks/index-6uob77s9.d.ts +80 -0
- package/dist/chunks/index-8PhBSbNQ.d.ts +93 -0
- package/dist/chunks/index-B0-8n-Gs.d.ts +105 -0
- package/dist/chunks/index-B8uaSJA9.d.ts +95 -0
- package/dist/chunks/index-BA-raEMm.d.ts +28 -0
- package/dist/chunks/index-BDfh8YBc.d.ts +39 -0
- package/dist/chunks/index-BKMW0rkw.d.ts +80 -0
- package/dist/chunks/index-BO9jLOIb.d.ts +58 -0
- package/dist/chunks/index-BO_1MN66.d.ts +87 -0
- package/dist/chunks/index-BTDgfLxK.d.ts +94 -0
- package/dist/chunks/index-BTTeKpiE.d.ts +363 -0
- package/dist/chunks/index-BVGGIaPX.d.ts +110 -0
- package/dist/chunks/index-Bi8FFadV.d.ts +98 -0
- package/dist/chunks/index-Bkj17NEQ.d.ts +50 -0
- package/dist/chunks/index-BlgkO3dn.d.ts +280 -0
- package/dist/chunks/index-BxTlIaZu.d.ts +301 -0
- package/dist/chunks/index-C61tPIJ-.d.ts +50 -0
- package/dist/chunks/index-CCXJXToc.d.ts +52 -0
- package/dist/chunks/index-CJzKu7QI.d.ts +40 -0
- package/dist/chunks/index-COsIPd8L.d.ts +62 -0
- package/dist/chunks/index-COsYSDrz.d.ts +109 -0
- package/dist/chunks/index-CRfm7W6C.d.ts +230 -0
- package/dist/chunks/index-CVUMS0x7.d.ts +73 -0
- package/dist/chunks/index-CaQ1JY5D.d.ts +49 -0
- package/dist/chunks/index-Cf2n0l0U.d.ts +138 -0
- package/dist/chunks/index-CftERHnE.d.ts +24 -0
- package/dist/chunks/index-ClT3E_hv.d.ts +302 -0
- package/dist/chunks/index-CsMIgBsd.d.ts +39 -0
- package/dist/chunks/index-Ctuk1xBU.d.ts +99 -0
- package/dist/chunks/index-D2VVO8rx.d.ts +49 -0
- package/dist/chunks/index-D949AidR.d.ts +40 -0
- package/dist/chunks/index-D9PZHY_I.d.ts +135 -0
- package/dist/chunks/index-DAoPg59I.d.ts +80 -0
- package/dist/chunks/index-DB_ToPdz.d.ts +202 -0
- package/dist/chunks/index-DEb9zXlC.d.ts +210 -0
- package/dist/chunks/index-DHGgezXU.d.ts +58 -0
- package/dist/chunks/index-DJJocp_q.d.ts +132 -0
- package/dist/chunks/index-DKma0jQw.d.ts +104 -0
- package/dist/chunks/index-DPV62IdF.d.ts +118 -0
- package/dist/chunks/index-DR8sYtvd.d.ts +296 -0
- package/dist/chunks/index-Dcc_W6Kv.d.ts +146 -0
- package/dist/chunks/index-Dfg4Ftb8.d.ts +68 -0
- package/dist/chunks/index-Dfy1YW5j.d.ts +73 -0
- package/dist/chunks/index-Dh5CaHTP.d.ts +44 -0
- package/dist/chunks/index-DtbUXxjz.d.ts +53 -0
- package/dist/chunks/index-Dum6Y9XR.d.ts +187 -0
- package/dist/chunks/index-HrKN6s8z.d.ts +66 -0
- package/dist/chunks/index-JllMXhVx.d.ts +176 -0
- package/dist/chunks/index-XjLvaH4G.d.ts +67 -0
- package/dist/chunks/index-dh3TKanY.d.ts +235 -0
- package/dist/chunks/index-nklPDKlC.d.ts +137 -0
- package/dist/chunks/index-qgZ5VGmc.d.ts +177 -0
- package/dist/chunks/index-tOodmT36.d.ts +129 -0
- package/dist/chunks/index-t_x6jj7l.d.ts +96 -0
- package/dist/chunks/input-adorn-C_EHML68.js +1 -0
- package/dist/chunks/input-group-iI7azfvE.js +1 -0
- package/dist/chunks/list-CMr-wB9d.js +1 -0
- package/dist/chunks/menu-CXUc-Gva.js +1 -0
- package/dist/chunks/modal-ByIj71Mq.js +1 -0
- package/dist/chunks/nav-BldxFo_B.js +1 -0
- package/dist/chunks/navbar-BwcsQuBk.js +1 -0
- package/dist/chunks/notification-DdqigVB1.js +1 -0
- package/dist/chunks/otp-input-CXe_wkII.js +1 -0
- package/dist/chunks/overlayPlacement-B7843a-Q.d.ts +6 -0
- package/dist/chunks/overlayPlacement-BtS90IVf.js +1 -0
- package/dist/chunks/pagination-BOpEAYW2.js +1 -0
- package/dist/chunks/password-strength-BfLiYiGj.js +1 -0
- package/dist/chunks/placeholder-pg95KELl.js +1 -0
- package/dist/chunks/polymorphic-CACPOv1_.js +1 -0
- package/dist/chunks/polymorphic-CVHbTHSN.d.ts +40 -0
- package/dist/chunks/popover-BpSfnZzk.js +1 -0
- package/dist/chunks/progress-DlrZ71aV.js +1 -0
- package/dist/chunks/radio-BV7Sq6D1.js +1 -0
- package/dist/chunks/range-input-BN3430j-.js +1 -0
- package/dist/chunks/renderFormCheck-BXBs6_ov.js +1 -0
- package/dist/chunks/renderFormCheck-CYWG-Rbt.d.ts +23 -0
- package/dist/chunks/renderFormField-fBEny6JV.d.ts +14 -0
- package/dist/chunks/renderFormField-wiaxvvLG.js +1 -0
- package/dist/chunks/renderMenuItemContent-CmqT3YUQ.js +1 -0
- package/dist/chunks/select-CclIIux8.js +1 -0
- package/dist/chunks/skeleton-CKq76sE_.js +1 -0
- package/dist/chunks/spacingClassName-DVhk8m3P.js +1 -0
- package/dist/chunks/spinner-BEq4PAlu.js +1 -0
- package/dist/chunks/stack-D3retZ-W.js +1 -0
- package/dist/chunks/static-table-D0M4oc_t.js +1 -0
- package/dist/chunks/stepper-CTa6e8uv.js +1 -0
- package/dist/chunks/switch-BmHpq4tL.js +1 -0
- package/dist/chunks/table-Fme9GbAR.js +1 -0
- package/dist/chunks/tableClassName-CZA2Bse8.js +1 -0
- package/dist/chunks/tabs-BnbMJM_b.js +1 -0
- package/dist/chunks/text-input-DD3d08Yf.js +1 -0
- package/dist/chunks/textarea-C0qQdCcu.js +1 -0
- package/dist/chunks/toast-BQhZ2pv5.js +1 -0
- package/dist/chunks/tooltip-DHtVAYUo.js +1 -0
- package/dist/chunks/triggerElement-BIqA4KqZ.js +1 -0
- package/dist/chunks/types-CS_40Txv.d.ts +34 -0
- package/dist/chunks/useButtonSemantics-CILM_lhi.js +1 -0
- package/dist/chunks/useDialogElement-BRIU60cT.js +1 -0
- package/dist/chunks/useDisabledAnchorGuard-Cz58UCXy.js +1 -0
- package/dist/chunks/useFloatingOverlay-CcmDZKMK.js +1 -0
- package/dist/chunks/useForkedRef-DVEfT-KI.js +1 -0
- package/dist/chunks/useFormField-BOqmBTC4.js +1 -0
- package/dist/chunks/useIsomorphicLayoutEffect-BbqRwuqn.js +1 -0
- package/dist/chunks/useToastRegionQueue-BH6bWZ73.js +1 -0
- package/dist/chunks/validationClassName-gRGs4KBm.js +1 -0
- package/dist/close-button.d.ts +2 -0
- package/dist/close-button.js +1 -0
- package/dist/collapse.d.ts +2 -0
- package/dist/collapse.js +1 -0
- package/dist/color-input.d.ts +2 -0
- package/dist/color-input.js +1 -0
- package/dist/combobox.d.ts +3 -0
- package/dist/combobox.js +1 -0
- package/dist/datagrid.d.ts +2 -0
- package/dist/datagrid.js +1 -0
- package/dist/datepicker.d.ts +2 -0
- package/dist/datepicker.js +1 -0
- package/dist/drawer.d.ts +2 -0
- package/dist/drawer.js +1 -0
- package/dist/file-input.d.ts +2 -0
- package/dist/file-input.js +1 -0
- package/dist/flex.d.ts +2 -0
- package/dist/flex.js +1 -0
- package/dist/floating-input.d.ts +2 -0
- package/dist/floating-input.js +1 -0
- package/dist/form-field.d.ts +2 -0
- package/dist/form-field.js +1 -0
- package/dist/form.d.ts +2 -0
- package/dist/form.js +1 -0
- package/dist/grid.d.ts +2 -0
- package/dist/grid.js +1 -0
- package/dist/icon.d.ts +4 -0
- package/dist/icon.js +1 -0
- package/dist/index.d.ts +72 -6354
- package/dist/index.js +1 -2
- package/dist/input-adorn.d.ts +2 -0
- package/dist/input-adorn.js +1 -0
- package/dist/input-group.d.ts +2 -0
- package/dist/input-group.js +1 -0
- package/dist/link.d.ts +3 -0
- package/dist/link.js +1 -0
- package/dist/list.d.ts +2 -0
- package/dist/list.js +1 -0
- package/dist/menu.d.ts +3 -0
- package/dist/menu.js +1 -0
- package/dist/modal.d.ts +2 -0
- package/dist/modal.js +1 -0
- package/dist/nav.d.ts +2 -0
- package/dist/nav.js +1 -0
- package/dist/navbar.d.ts +2 -0
- package/dist/navbar.js +1 -0
- package/dist/notification.d.ts +2 -0
- package/dist/notification.js +1 -0
- package/dist/otp-input.d.ts +2 -0
- package/dist/otp-input.js +1 -0
- package/dist/pagination.d.ts +2 -0
- package/dist/pagination.js +1 -0
- package/dist/password-strength.d.ts +2 -0
- package/dist/password-strength.js +1 -0
- package/dist/placeholder.d.ts +2 -0
- package/dist/placeholder.js +1 -0
- package/dist/popover.d.ts +2 -0
- package/dist/popover.js +1 -0
- package/dist/progress.d.ts +2 -0
- package/dist/progress.js +1 -0
- package/dist/radio.d.ts +2 -0
- package/dist/radio.js +1 -0
- package/dist/range-input.d.ts +2 -0
- package/dist/range-input.js +1 -0
- package/dist/select.d.ts +2 -0
- package/dist/select.js +1 -0
- package/dist/skeleton.d.ts +2 -0
- package/dist/skeleton.js +1 -0
- package/dist/spinner.d.ts +2 -0
- package/dist/spinner.js +1 -0
- package/dist/stack.d.ts +2 -0
- package/dist/stack.js +1 -0
- package/dist/static-table.d.ts +2 -0
- package/dist/static-table.js +1 -0
- package/dist/stepper.d.ts +2 -0
- package/dist/stepper.js +1 -0
- package/dist/style.css +1 -1
- package/dist/switch.d.ts +2 -0
- package/dist/switch.js +1 -0
- package/dist/table.d.ts +2 -0
- package/dist/table.js +1 -0
- package/dist/tabs.d.ts +2 -0
- package/dist/tabs.js +1 -0
- package/dist/text-input.d.ts +2 -0
- package/dist/text-input.js +1 -0
- package/dist/textarea.d.ts +2 -0
- package/dist/textarea.js +1 -0
- package/dist/toast.d.ts +2 -0
- package/dist/toast.js +1 -0
- package/dist/tooltip.d.ts +2 -0
- package/dist/tooltip.js +1 -0
- package/package.json +62 -4
- package/src/components/accordion/index.ts +4 -0
- package/src/components/autocomplete/index.ts +4 -0
- package/src/components/avatar/index.ts +4 -0
- package/src/components/badge/index.ts +4 -0
- package/src/components/breadcrumb/index.ts +4 -0
- package/src/components/button/index.ts +4 -0
- package/src/components/button-group/index.ts +4 -0
- package/src/components/calendar/index.ts +4 -0
- package/src/components/card/index.ts +4 -0
- package/src/components/carousel/CarouselControlButton.tsx +11 -4
- package/src/components/carousel/CarouselControlNext.tsx +6 -0
- package/src/components/carousel/CarouselControlPrev.tsx +6 -0
- package/src/components/carousel/CarouselPlayPause.tsx +27 -4
- package/src/components/carousel/index.ts +4 -0
- package/src/components/checkbox/Checkbox.tsx +19 -4
- package/src/components/checkbox/index.ts +4 -0
- package/src/components/chip/index.ts +4 -0
- package/src/components/chip-input/index.ts +4 -0
- package/src/components/close-button/index.ts +4 -0
- package/src/components/collapse/index.ts +4 -0
- package/src/components/color-input/index.ts +4 -0
- package/src/components/combobox/ComboboxListBox.tsx +2 -2
- package/src/components/combobox/index.ts +4 -0
- package/src/components/datagrid/index.ts +4 -0
- package/src/components/datepicker/index.ts +4 -0
- package/src/components/drawer/index.ts +8 -0
- package/src/components/file-input/index.ts +4 -0
- package/src/components/flex/index.ts +4 -0
- package/src/components/floating-input/index.ts +4 -0
- package/src/components/form/index.ts +4 -0
- package/src/components/form-field/index.ts +4 -0
- package/src/components/grid/index.ts +4 -0
- package/src/components/icon/Icon.tsx +69 -38
- package/src/components/icon/IconProvider.tsx +40 -0
- package/src/components/icon/index.ts +7 -0
- package/src/components/input-adorn/index.ts +4 -0
- package/src/components/input-group/index.ts +4 -0
- package/src/components/link/index.ts +4 -0
- package/src/components/list/index.ts +4 -0
- package/src/components/menu/index.ts +4 -0
- package/src/components/modal/index.ts +8 -0
- package/src/components/nav/index.ts +4 -0
- package/src/components/navbar/NavbarToggler.tsx +9 -3
- package/src/components/navbar/index.ts +4 -0
- package/src/components/notification/Notification.tsx +6 -5
- package/src/components/notification/index.ts +8 -0
- package/src/components/otp-input/index.ts +4 -0
- package/src/components/pagination/Pagination.tsx +16 -3
- package/src/components/pagination/index.ts +8 -0
- package/src/components/password-strength/index.ts +4 -0
- package/src/components/placeholder/index.ts +4 -0
- package/src/components/popover/index.ts +4 -0
- package/src/components/progress/index.ts +4 -0
- package/src/components/radio/Radio.tsx +13 -3
- package/src/components/radio/index.ts +4 -0
- package/src/components/range-input/index.ts +4 -0
- package/src/components/select/index.ts +4 -0
- package/src/components/skeleton/SkeletonLoader.tsx +13 -6
- package/src/components/skeleton/index.ts +4 -0
- package/src/components/spinner/index.ts +4 -0
- package/src/components/stack/index.ts +4 -0
- package/src/components/static-table/StaticTable.tsx +78 -0
- package/src/components/static-table/index.ts +8 -0
- package/src/components/stepper/index.ts +4 -0
- package/src/components/switch/Switch.tsx +16 -3
- package/src/components/switch/index.ts +4 -0
- package/src/components/table/Table.tsx +14 -22
- package/src/components/table/index.ts +4 -0
- package/src/components/tabs/index.ts +4 -0
- package/src/components/text-input/index.ts +4 -0
- package/src/components/textarea/index.ts +4 -0
- package/src/components/toast/Toast.tsx +2 -1
- package/src/components/toast/ToastHeader.tsx +4 -3
- package/src/components/toast/index.ts +8 -0
- package/src/components/tooltip/index.ts +4 -0
- package/src/hooks/useIconConfig.ts +6 -0
- package/src/index.ts +24 -4
- package/src/utils/iconConfig.ts +88 -0
- package/src/utils/iconSlot.tsx +41 -0
- package/src/utils/polymorphic.ts +49 -2
- package/src/utils/renderMenuItemContent.tsx +4 -9
- package/src/utils/slot.tsx +78 -0
- package/src/utils/tableClassName.ts +93 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import "./focus-ring-SR_LwaN7.js";
|
|
2
|
+
import { n as PolymorphicRef, t as PolymorphicComponentProps } from "./polymorphic-CVHbTHSN.js";
|
|
3
|
+
import { n as ContextColor } from "./types-CS_40Txv.js";
|
|
4
|
+
import { n as IconProps } from "./Icon-CioraWLF.js";
|
|
5
|
+
import React, { ElementType, HTMLAttributes, ReactElement, ReactNode } from "react";
|
|
6
|
+
import { ToastQueue } from "react-stately";
|
|
7
|
+
//#region src/components/toast/Toast.d.ts
|
|
8
|
+
interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
9
|
+
/**
|
|
10
|
+
* Apply a CSS fade transition to the toast.
|
|
11
|
+
*/
|
|
12
|
+
animation?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Auto hide the toast. The timer starts once the show transition completes and pauses
|
|
15
|
+
* while the pointer is over the toast or focus is within it.
|
|
16
|
+
*/
|
|
17
|
+
autohide?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* A string of all className you want applied to the base component.
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Adds a close button — shorthand for `ToastHeader`'s/`ToastBody`'s `closeButton` prop.
|
|
24
|
+
* Placed in the header when `icon`/`title`/`time` is set; otherwise placed in the body
|
|
25
|
+
* alongside `message`, or in a header containing only the close button if `message` is
|
|
26
|
+
* also unset.
|
|
27
|
+
*/
|
|
28
|
+
closeButton?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Overrides the close button's accessible name (defaults to `'Close'`). Set this for
|
|
31
|
+
* non-English UIs. Shorthand for `ToastHeader`'s `closeLabel` prop.
|
|
32
|
+
*/
|
|
33
|
+
closeLabel?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Sets the color of the component to one of Chassis context colors.
|
|
36
|
+
*/
|
|
37
|
+
color?: ContextColor;
|
|
38
|
+
/**
|
|
39
|
+
* Delay hiding the toast (ms).
|
|
40
|
+
*/
|
|
41
|
+
delay?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Trailing content — typically a row of `Button`s — rendered via a single `ToastFooter`,
|
|
44
|
+
* after `message`/`children`. Pass a function to receive `close` directly, instead of
|
|
45
|
+
* calling `useToast()` from a child component to wire up a "Close" action.
|
|
46
|
+
*/
|
|
47
|
+
footer?: ReactNode | ((close: () => void) => ReactNode);
|
|
48
|
+
/**
|
|
49
|
+
* Leading icon for the header. A string is an icon name, rendered like
|
|
50
|
+
* `<ToastIcon name={icon} />` (or by `IconProvider`'s `component`); pass
|
|
51
|
+
* any other node for a fully custom icon (typically a logo or avatar). Shorthand for
|
|
52
|
+
* `ToastHeader`'s `icon` prop; hidden from assistive technology by default, since it
|
|
53
|
+
* duplicates `title` visually.
|
|
54
|
+
*/
|
|
55
|
+
icon?: string | ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* Message body, rendered via a single `ToastBody`. For multi-block content, compose
|
|
58
|
+
* `children` manually instead — `message` wraps everything in one element.
|
|
59
|
+
*/
|
|
60
|
+
message?: ReactNode;
|
|
61
|
+
/**
|
|
62
|
+
* Header timestamp, rendered after `title`. Shorthand for `ToastHeader`'s `time` prop.
|
|
63
|
+
*/
|
|
64
|
+
time?: ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
* Header heading, rendered before `time`. Shorthand for `ToastHeader`'s children. When set
|
|
67
|
+
* alongside `message`, wires the toast's `aria-labelledby`/`aria-describedby` to them
|
|
68
|
+
* automatically.
|
|
69
|
+
*/
|
|
70
|
+
title?: ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* Callback fired when the component requests to be closed.
|
|
73
|
+
*/
|
|
74
|
+
onClose?: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Callback fired when the component requests to be shown.
|
|
77
|
+
*/
|
|
78
|
+
onShow?: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* ARIA live-region role. Use `status` (the default) for confirmation, progress, and
|
|
81
|
+
* informational messages, which announce politely. Use `alert` for messages that need
|
|
82
|
+
* immediate attention — validation errors, failed operations — which interrupt speech.
|
|
83
|
+
*/
|
|
84
|
+
role?: 'status' | 'alert';
|
|
85
|
+
/**
|
|
86
|
+
* Apply a full-color background with inverted text. Only meaningful alongside `color`.
|
|
87
|
+
*/
|
|
88
|
+
solid?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Apply a semi-transparent background.
|
|
91
|
+
*/
|
|
92
|
+
translucent?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Toggle the visibility of component.
|
|
95
|
+
*/
|
|
96
|
+
visible?: boolean;
|
|
97
|
+
}
|
|
98
|
+
declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLDivElement>>;
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/components/toast/ToastBody.d.ts
|
|
101
|
+
type ToastBodyOwnProps<C extends ElementType> = {
|
|
102
|
+
/**
|
|
103
|
+
* A string of all className you want applied to the base component.
|
|
104
|
+
*/
|
|
105
|
+
className?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Adds a close button alongside the body content, so a toast composed without a
|
|
108
|
+
* `ToastHeader` still gets a dismiss control without any manual layout markup.
|
|
109
|
+
*/
|
|
110
|
+
closeButton?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Overrides the close button's accessible name (defaults to `'Close'`). Set this for
|
|
113
|
+
* non-English UIs.
|
|
114
|
+
*/
|
|
115
|
+
closeLabel?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
118
|
+
*/
|
|
119
|
+
component?: C;
|
|
120
|
+
};
|
|
121
|
+
type ToastBodyProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, ToastBodyOwnProps<C>>;
|
|
122
|
+
type ToastBodyComponent = (<C extends ElementType = 'div'>(props: ToastBodyProps<C> & {
|
|
123
|
+
ref?: PolymorphicRef<C>;
|
|
124
|
+
}) => ReactElement | null) & {
|
|
125
|
+
displayName?: string;
|
|
126
|
+
};
|
|
127
|
+
declare const ToastBody: ToastBodyComponent;
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/components/toast/ToastFooter.d.ts
|
|
130
|
+
type ToastFooterOwnProps<C extends ElementType> = {
|
|
131
|
+
/**
|
|
132
|
+
* A string of all className you want applied to the base component.
|
|
133
|
+
*/
|
|
134
|
+
className?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
137
|
+
*/
|
|
138
|
+
component?: C;
|
|
139
|
+
};
|
|
140
|
+
type ToastFooterProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, ToastFooterOwnProps<C>>;
|
|
141
|
+
type ToastFooterComponent = (<C extends ElementType = 'div'>(props: ToastFooterProps<C> & {
|
|
142
|
+
ref?: PolymorphicRef<C>;
|
|
143
|
+
}) => ReactElement | null) & {
|
|
144
|
+
displayName?: string;
|
|
145
|
+
};
|
|
146
|
+
declare const ToastFooter: ToastFooterComponent;
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/components/toast/ToastHeader.d.ts
|
|
149
|
+
type ToastHeaderOwnProps<C extends ElementType> = {
|
|
150
|
+
/**
|
|
151
|
+
* Heading, rendered before `time` as a `<strong>`.
|
|
152
|
+
*/
|
|
153
|
+
children?: ReactNode;
|
|
154
|
+
/**
|
|
155
|
+
* A string of all className you want applied to the base component.
|
|
156
|
+
*/
|
|
157
|
+
className?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Automatically add a close button to the header.
|
|
160
|
+
*/
|
|
161
|
+
closeButton?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Overrides the close button's accessible name (defaults to `'Close'`). Set this for
|
|
164
|
+
* non-English UIs.
|
|
165
|
+
*/
|
|
166
|
+
closeLabel?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
169
|
+
*/
|
|
170
|
+
component?: C;
|
|
171
|
+
/**
|
|
172
|
+
* Leading icon. A string is an icon name, rendered like `<ToastIcon name={icon} />` (or by
|
|
173
|
+
* `IconProvider`'s `component`) and hidden from
|
|
174
|
+
* assistive technology by default, since it duplicates the heading visually. Pass any other
|
|
175
|
+
* node for a fully custom icon (typically a logo or avatar) — a custom node is left as-is,
|
|
176
|
+
* since it may carry its own meaningful accessible name (e.g. an avatar's `alt` text).
|
|
177
|
+
*/
|
|
178
|
+
icon?: string | ReactNode;
|
|
179
|
+
/**
|
|
180
|
+
* Trailing timestamp, rendered after the heading.
|
|
181
|
+
*/
|
|
182
|
+
time?: ReactNode;
|
|
183
|
+
/**
|
|
184
|
+
* Sets the `id` on the rendered heading element, for `aria-labelledby` wiring. Set
|
|
185
|
+
* automatically by `Toast` when both `title` and `message` are used together; only needed
|
|
186
|
+
* here for manual wiring in a fully custom composition.
|
|
187
|
+
*/
|
|
188
|
+
titleId?: string;
|
|
189
|
+
};
|
|
190
|
+
type ToastHeaderProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, ToastHeaderOwnProps<C>>;
|
|
191
|
+
type ToastHeaderComponent = (<C extends ElementType = 'div'>(props: ToastHeaderProps<C> & {
|
|
192
|
+
ref?: PolymorphicRef<C>;
|
|
193
|
+
}) => ReactElement | null) & {
|
|
194
|
+
displayName?: string;
|
|
195
|
+
};
|
|
196
|
+
declare const ToastHeader: ToastHeaderComponent;
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/components/toast/ToastIcon.d.ts
|
|
199
|
+
type ToastIconProps = IconProps & {
|
|
200
|
+
/**
|
|
201
|
+
* A string of all className you want applied to the base component.
|
|
202
|
+
*/
|
|
203
|
+
className?: string;
|
|
204
|
+
};
|
|
205
|
+
declare const ToastIcon: React.ForwardRefExoticComponent<ToastIconProps & React.RefAttributes<HTMLSpanElement | SVGSVGElement>>;
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region src/components/toast/Toaster.d.ts
|
|
208
|
+
interface ToasterProps extends HTMLAttributes<HTMLDivElement> {
|
|
209
|
+
/**
|
|
210
|
+
* Overrides the toast region's accessible name (defaults to `'Notifications'`, per
|
|
211
|
+
* react-aria). Set this for non-English UIs, or to distinguish multiple toasters on the
|
|
212
|
+
* same page.
|
|
213
|
+
*/
|
|
214
|
+
'aria-label'?: string;
|
|
215
|
+
/**
|
|
216
|
+
* A string of all className you want applied to the base component.
|
|
217
|
+
*/
|
|
218
|
+
className?: string;
|
|
219
|
+
/**
|
|
220
|
+
* Describes the placement of your component.
|
|
221
|
+
*
|
|
222
|
+
* @type 'top-start' | 'top-center' | 'top-end' | 'middle-start' | 'middle-center' | 'middle-end' | 'bottom-start' | 'bottom-center' | 'bottom-end' | string
|
|
223
|
+
*/
|
|
224
|
+
placement?: 'top-start' | 'top-center' | 'top-end' | 'middle-start' | 'middle-center' | 'middle-end' | 'bottom-start' | 'bottom-center' | 'bottom-end' | string;
|
|
225
|
+
}
|
|
226
|
+
declare const Toaster: React.ForwardRefExoticComponent<ToasterProps & React.RefAttributes<HTMLDivElement>>;
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/components/toast/toastQueue.d.ts
|
|
229
|
+
interface ToastContent {
|
|
230
|
+
/**
|
|
231
|
+
* Apply a CSS fade transition to the toast.
|
|
232
|
+
*/
|
|
233
|
+
animation?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Auto hide the toast. The timer starts once the show transition completes and pauses
|
|
236
|
+
* while the pointer is over the toast or focus is within it.
|
|
237
|
+
*/
|
|
238
|
+
autohide?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Content of the toast — typically a `Toast.Header`/`Toast.Body`/`Toast.Footer`.
|
|
241
|
+
*/
|
|
242
|
+
children: ReactNode;
|
|
243
|
+
/**
|
|
244
|
+
* Sets the color of the component to one of Chassis context colors.
|
|
245
|
+
*/
|
|
246
|
+
color?: ContextColor;
|
|
247
|
+
/**
|
|
248
|
+
* Delay hiding the toast (ms).
|
|
249
|
+
*/
|
|
250
|
+
delay?: number;
|
|
251
|
+
/**
|
|
252
|
+
* Apply a full-color background with inverted text. Only meaningful alongside `color`.
|
|
253
|
+
*/
|
|
254
|
+
solid?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Apply a semi-transparent background.
|
|
257
|
+
*/
|
|
258
|
+
translucent?: boolean;
|
|
259
|
+
}
|
|
260
|
+
declare const toastQueue: ToastQueue<ToastContent>;
|
|
261
|
+
declare function addToast(children: ReactNode, options?: Omit<ToastContent, 'children'>): string;
|
|
262
|
+
declare function closeToast(key: string): void;
|
|
263
|
+
//#endregion
|
|
264
|
+
//#region src/components/toast/context.d.ts
|
|
265
|
+
interface ToastContextProps {
|
|
266
|
+
/**
|
|
267
|
+
* Whether the toast is currently visible.
|
|
268
|
+
*/
|
|
269
|
+
visible?: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* Dismisses the toast. Wire this to any element's `onClick` — see `useToast`.
|
|
272
|
+
*/
|
|
273
|
+
close: () => void;
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/hooks/useToast.d.ts
|
|
277
|
+
type UseToastResult = ToastContextProps;
|
|
278
|
+
declare const useToast: () => UseToastResult;
|
|
279
|
+
//#endregion
|
|
280
|
+
export { Toast as _, closeToast as a, ToasterProps as c, ToastHeader as d, ToastHeaderProps as f, ToastBodyProps as g, ToastBody as h, addToast as i, ToastIcon as l, ToastFooterProps as m, useToast as n, toastQueue as o, ToastFooter as p, ToastContent as r, Toaster as s, UseToastResult as t, ToastIconProps as u, ToastProps as v };
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import "./focus-ring-SR_LwaN7.js";
|
|
2
|
+
import { n as CalendarLabels, t as DateRangePreset } from "./dateRangePresets-R1FtA1zp.js";
|
|
3
|
+
import React, { HTMLAttributes, ReactNode } from "react";
|
|
4
|
+
import { RangeValue } from "react-aria";
|
|
5
|
+
import { DateValue as DateValue$1 } from "react-stately";
|
|
6
|
+
//#region src/components/datepicker/DatePicker.d.ts
|
|
7
|
+
interface DatePickerBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
8
|
+
/**
|
|
9
|
+
* An accessible label for the date picker, used when there's no visible `<label>`.
|
|
10
|
+
*/
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Identifies a visible `<label>` element for the date picker.
|
|
14
|
+
*/
|
|
15
|
+
'aria-labelledby'?: string;
|
|
16
|
+
/**
|
|
17
|
+
* A string of all className you want applied to the base component.
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the calendar popover is open by default (uncontrolled).
|
|
22
|
+
*
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
defaultOpen?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Prevents the date picker from being focused or interacted with.
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The day that starts the week in the calendar overlay, overriding the default set by the
|
|
32
|
+
* active locale.
|
|
33
|
+
*
|
|
34
|
+
* @default 'mon'
|
|
35
|
+
*/
|
|
36
|
+
firstDayOfWeek?: 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat';
|
|
37
|
+
/**
|
|
38
|
+
* A description for the field, rendered below the date picker.
|
|
39
|
+
*/
|
|
40
|
+
help?: ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* `id` forwarded to the field's grouping element — useful for pairing with a `<label for>`.
|
|
43
|
+
*/
|
|
44
|
+
id?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Set component validation state to invalid.
|
|
47
|
+
*/
|
|
48
|
+
invalid?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* An error message for the field, rendered below the date picker when `invalid` is set.
|
|
51
|
+
*/
|
|
52
|
+
invalidFeedback?: ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* Callback that is called for each date in the calendar. If it returns `true`, that date is
|
|
55
|
+
* shown but cannot be selected.
|
|
56
|
+
*/
|
|
57
|
+
isDateUnavailable?: (date: DateValue$1) => boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Overrides for the strings this component and its calendar render themselves rather than
|
|
60
|
+
* getting from the active locale — the calendar trigger, the clear adornment, and the calendar's
|
|
61
|
+
* own year-view arrows/announcements. Date segment order, month and weekday names all follow
|
|
62
|
+
* `I18nProvider`'s locale via react-aria and need no override. Merged over the English defaults,
|
|
63
|
+
* so passing one key leaves the rest alone.
|
|
64
|
+
*/
|
|
65
|
+
labels?: Partial<CalendarLabels>;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the calendar popover is open (controlled).
|
|
68
|
+
*/
|
|
69
|
+
isOpen?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* The field's caption, rendered as a `FormLabel` associated with the field group.
|
|
72
|
+
*/
|
|
73
|
+
label?: ReactNode;
|
|
74
|
+
/**
|
|
75
|
+
* The maximum allowed date that a user may select.
|
|
76
|
+
*/
|
|
77
|
+
maxValue?: DateValue$1 | null;
|
|
78
|
+
/**
|
|
79
|
+
* The minimum allowed date that a user may select.
|
|
80
|
+
*/
|
|
81
|
+
minValue?: DateValue$1 | null;
|
|
82
|
+
/**
|
|
83
|
+
* `name` of an auto-created hidden input, kept in sync with the selection, for native form
|
|
84
|
+
* submission — one input when `selectionMode` is `'single'`, one per selected date when it's
|
|
85
|
+
* `'multiple'` (same `name` on each, which browsers serialize as multiple form values). Omit to
|
|
86
|
+
* skip creating any.
|
|
87
|
+
*/
|
|
88
|
+
name?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Callback fired when the calendar popover's open state changes.
|
|
91
|
+
*/
|
|
92
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Size the component sm or lg.
|
|
95
|
+
*/
|
|
96
|
+
size?: 'sm' | 'lg';
|
|
97
|
+
/**
|
|
98
|
+
* ISO 8601 dates (`YYYY-MM-DD`) to mark unselectable, as a convenience alternative to
|
|
99
|
+
* `isDateUnavailable` for data-driven cases (e.g. booked dates fetched from an API). Composed
|
|
100
|
+
* with `isDateUnavailable` when both are given — a date unavailable by either is unavailable.
|
|
101
|
+
* Applies to both the calendar overlay and typing a date directly into the field.
|
|
102
|
+
*/
|
|
103
|
+
unavailableDates?: string[];
|
|
104
|
+
/**
|
|
105
|
+
* Set component validation state to valid.
|
|
106
|
+
*/
|
|
107
|
+
valid?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* A success message for the field, rendered below the date picker when `valid` is set.
|
|
110
|
+
*/
|
|
111
|
+
validFeedback?: ReactNode;
|
|
112
|
+
/**
|
|
113
|
+
* Number of months to display side by side in the calendar overlay.
|
|
114
|
+
*
|
|
115
|
+
* @default 1
|
|
116
|
+
*/
|
|
117
|
+
visibleMonths?: number;
|
|
118
|
+
}
|
|
119
|
+
interface DatePickerSingleProps extends DatePickerBaseProps {
|
|
120
|
+
/**
|
|
121
|
+
* The initial selected date (uncontrolled).
|
|
122
|
+
*/
|
|
123
|
+
defaultValue?: DateValue$1 | null;
|
|
124
|
+
/**
|
|
125
|
+
* Callback fired when the selected date changes.
|
|
126
|
+
*/
|
|
127
|
+
onChange?: (value: DateValue$1 | null) => void;
|
|
128
|
+
/**
|
|
129
|
+
* Whether a single date or multiple, independently toggled dates can be selected. Multiple
|
|
130
|
+
* selection replaces the editable segmented field with a read-only, comma-separated list of
|
|
131
|
+
* the selected dates — a segmented day/month/year field has no way to represent more than one
|
|
132
|
+
* date.
|
|
133
|
+
*
|
|
134
|
+
* @default 'single'
|
|
135
|
+
*/
|
|
136
|
+
selectionMode?: 'single';
|
|
137
|
+
/**
|
|
138
|
+
* The selected date (controlled).
|
|
139
|
+
*/
|
|
140
|
+
value?: DateValue$1 | null;
|
|
141
|
+
}
|
|
142
|
+
interface DatePickerMultipleProps extends DatePickerBaseProps {
|
|
143
|
+
/**
|
|
144
|
+
* The initial selected dates (uncontrolled).
|
|
145
|
+
*/
|
|
146
|
+
defaultValue?: DateValue$1[] | null;
|
|
147
|
+
/**
|
|
148
|
+
* Callback fired when the set of selected dates changes.
|
|
149
|
+
*/
|
|
150
|
+
onChange?: (value: DateValue$1[]) => void;
|
|
151
|
+
/**
|
|
152
|
+
* Whether a single date or multiple, independently toggled dates can be selected. Multiple
|
|
153
|
+
* selection replaces the editable segmented field with a read-only, comma-separated list of
|
|
154
|
+
* the selected dates — a segmented day/month/year field has no way to represent more than one
|
|
155
|
+
* date.
|
|
156
|
+
*
|
|
157
|
+
* @default 'single'
|
|
158
|
+
*/
|
|
159
|
+
selectionMode: 'multiple';
|
|
160
|
+
/**
|
|
161
|
+
* The selected dates (controlled).
|
|
162
|
+
*/
|
|
163
|
+
value?: DateValue$1[] | null;
|
|
164
|
+
}
|
|
165
|
+
type DatePickerProps = DatePickerSingleProps | DatePickerMultipleProps;
|
|
166
|
+
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/components/datepicker/DateRangePicker.d.ts
|
|
169
|
+
interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
170
|
+
/**
|
|
171
|
+
* An accessible label for the date range picker, used when there's no visible `<label>`.
|
|
172
|
+
*/
|
|
173
|
+
'aria-label'?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Identifies a visible `<label>` element for the date range picker.
|
|
176
|
+
*/
|
|
177
|
+
'aria-labelledby'?: string;
|
|
178
|
+
/**
|
|
179
|
+
* A string of all className you want applied to the base component.
|
|
180
|
+
*/
|
|
181
|
+
className?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Whether the calendar popover is open by default (uncontrolled).
|
|
184
|
+
*
|
|
185
|
+
* @default false
|
|
186
|
+
*/
|
|
187
|
+
defaultOpen?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* The initial selected date range (uncontrolled).
|
|
190
|
+
*/
|
|
191
|
+
defaultValue?: RangeValue<DateValue$1> | null;
|
|
192
|
+
/**
|
|
193
|
+
* Prevents the date range picker from being focused or interacted with.
|
|
194
|
+
*/
|
|
195
|
+
disabled?: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* The day that starts the week in the calendar overlay, overriding the default set by the
|
|
198
|
+
* active locale.
|
|
199
|
+
*
|
|
200
|
+
* @default 'mon'
|
|
201
|
+
*/
|
|
202
|
+
firstDayOfWeek?: 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat';
|
|
203
|
+
/**
|
|
204
|
+
* A description for the field, rendered below the date range picker.
|
|
205
|
+
*/
|
|
206
|
+
help?: ReactNode;
|
|
207
|
+
/**
|
|
208
|
+
* `id` forwarded to the field's grouping element — useful for pairing with a `<label for>`.
|
|
209
|
+
*/
|
|
210
|
+
id?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Set component validation state to invalid.
|
|
213
|
+
*/
|
|
214
|
+
invalid?: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* An error message for the field, rendered below the date range picker when `invalid` is set.
|
|
217
|
+
*/
|
|
218
|
+
invalidFeedback?: ReactNode;
|
|
219
|
+
/**
|
|
220
|
+
* Callback that is called for each date in the calendar. If it returns `true`, that date is
|
|
221
|
+
* shown but cannot be selected.
|
|
222
|
+
*/
|
|
223
|
+
isDateUnavailable?: (date: DateValue$1) => boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Overrides for the strings this component and its calendar render themselves rather than
|
|
226
|
+
* getting from the active locale — the clear adornment and the calendar's own year-view
|
|
227
|
+
* arrows/announcements. Date segment order, month and weekday names all follow `I18nProvider`'s
|
|
228
|
+
* locale via react-aria and need no override. Merged over the English defaults, so passing one
|
|
229
|
+
* key leaves the rest alone.
|
|
230
|
+
*/
|
|
231
|
+
labels?: Partial<CalendarLabels>;
|
|
232
|
+
/**
|
|
233
|
+
* Whether the calendar popover is open (controlled).
|
|
234
|
+
*/
|
|
235
|
+
isOpen?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* The field's caption, rendered as a `FormLabel` associated with the field group.
|
|
238
|
+
*/
|
|
239
|
+
label?: ReactNode;
|
|
240
|
+
/**
|
|
241
|
+
* The maximum allowed date that a user may select.
|
|
242
|
+
*/
|
|
243
|
+
maxValue?: DateValue$1 | null;
|
|
244
|
+
/**
|
|
245
|
+
* The minimum allowed date that a user may select.
|
|
246
|
+
*/
|
|
247
|
+
minValue?: DateValue$1 | null;
|
|
248
|
+
/**
|
|
249
|
+
* Base `name` for a pair of auto-created hidden inputs, kept in sync with the selection, for
|
|
250
|
+
* native form submission — rendered as `${name}Start` and `${name}End`. Omit to skip creating
|
|
251
|
+
* them.
|
|
252
|
+
*/
|
|
253
|
+
name?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Callback fired when the selected date range changes.
|
|
256
|
+
*/
|
|
257
|
+
onChange?: (value: RangeValue<DateValue$1> | null) => void;
|
|
258
|
+
/**
|
|
259
|
+
* Callback fired when the calendar popover's open state changes.
|
|
260
|
+
*/
|
|
261
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
262
|
+
/**
|
|
263
|
+
* A list of quick-select range presets shown in the overlay next to the calendar. Selecting a
|
|
264
|
+
* preset commits its range immediately, the same as picking a start and end date from the
|
|
265
|
+
* calendar. The preset matching the current selection (if any) is marked selected. Omit to not
|
|
266
|
+
* show a preset list.
|
|
267
|
+
*/
|
|
268
|
+
presets?: DateRangePreset[];
|
|
269
|
+
/**
|
|
270
|
+
* Size the component sm or lg.
|
|
271
|
+
*/
|
|
272
|
+
size?: 'sm' | 'lg';
|
|
273
|
+
/**
|
|
274
|
+
* ISO 8601 dates (`YYYY-MM-DD`) to mark unselectable, as a convenience alternative to
|
|
275
|
+
* `isDateUnavailable` for data-driven cases (e.g. booked dates fetched from an API). Composed
|
|
276
|
+
* with `isDateUnavailable` when both are given — a date unavailable by either is unavailable.
|
|
277
|
+
* Applies to both the calendar overlay and typing a date directly into either field.
|
|
278
|
+
*/
|
|
279
|
+
unavailableDates?: string[];
|
|
280
|
+
/**
|
|
281
|
+
* Set component validation state to valid.
|
|
282
|
+
*/
|
|
283
|
+
valid?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* A success message for the field, rendered below the date range picker when `valid` is set.
|
|
286
|
+
*/
|
|
287
|
+
validFeedback?: ReactNode;
|
|
288
|
+
/**
|
|
289
|
+
* The selected date range (controlled).
|
|
290
|
+
*/
|
|
291
|
+
value?: RangeValue<DateValue$1> | null;
|
|
292
|
+
/**
|
|
293
|
+
* Number of months to display side by side in the calendar overlay.
|
|
294
|
+
*
|
|
295
|
+
* @default 1
|
|
296
|
+
*/
|
|
297
|
+
visibleMonths?: number;
|
|
298
|
+
}
|
|
299
|
+
declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
300
|
+
//#endregion
|
|
301
|
+
export { DatePickerProps as a, DatePickerMultipleProps as i, DateRangePickerProps as n, DatePickerSingleProps as o, DatePicker as r, DateRangePicker as t };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import "./focus-ring-SR_LwaN7.js";
|
|
2
|
+
import { n as PolymorphicRef, t as PolymorphicComponentProps } from "./polymorphic-CVHbTHSN.js";
|
|
3
|
+
import { ElementType, ReactElement } from "react";
|
|
4
|
+
//#region src/components/button-group/ButtonGroup.d.ts
|
|
5
|
+
type ButtonGroupOwnProps<C extends ElementType> = {
|
|
6
|
+
/**
|
|
7
|
+
* A string of all className you want applied to the base component.
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
12
|
+
*/
|
|
13
|
+
component?: C;
|
|
14
|
+
/**
|
|
15
|
+
* Size the component sm or lg.
|
|
16
|
+
*/
|
|
17
|
+
size?: 'sm' | 'lg';
|
|
18
|
+
/**
|
|
19
|
+
* Create a set of buttons that appear vertically stacked rather than horizontally. Split button dropdowns are not supported here.
|
|
20
|
+
*/
|
|
21
|
+
vertical?: boolean;
|
|
22
|
+
};
|
|
23
|
+
type ButtonGroupProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, ButtonGroupOwnProps<C>>;
|
|
24
|
+
type ButtonGroupComponent = (<C extends ElementType = 'div'>(props: ButtonGroupProps<C> & {
|
|
25
|
+
ref?: PolymorphicRef<C>;
|
|
26
|
+
}) => ReactElement | null) & {
|
|
27
|
+
displayName?: string;
|
|
28
|
+
};
|
|
29
|
+
declare const ButtonGroup: ButtonGroupComponent;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/button-group/ButtonToolbar.d.ts
|
|
32
|
+
type ButtonToolbarOwnProps<C extends ElementType> = {
|
|
33
|
+
/**
|
|
34
|
+
* A string of all className you want applied to the base component.
|
|
35
|
+
*/
|
|
36
|
+
className?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
39
|
+
*/
|
|
40
|
+
component?: C;
|
|
41
|
+
};
|
|
42
|
+
type ButtonToolbarProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, ButtonToolbarOwnProps<C>>;
|
|
43
|
+
type ButtonToolbarComponent = (<C extends ElementType = 'div'>(props: ButtonToolbarProps<C> & {
|
|
44
|
+
ref?: PolymorphicRef<C>;
|
|
45
|
+
}) => ReactElement | null) & {
|
|
46
|
+
displayName?: string;
|
|
47
|
+
};
|
|
48
|
+
declare const ButtonToolbar: ButtonToolbarComponent;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { ButtonGroupProps as i, ButtonToolbarProps as n, ButtonGroup as r, ButtonToolbar as t };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import "./focus-ring-SR_LwaN7.js";
|
|
2
|
+
import React, { ChangeEventHandler, InputHTMLAttributes, ReactNode } from "react";
|
|
3
|
+
//#region src/components/file-input/FileInput.d.ts
|
|
4
|
+
interface FileInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
5
|
+
/**
|
|
6
|
+
* A string of all className you want applied to the component.
|
|
7
|
+
*/
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Toggle the disabled state for the component.
|
|
11
|
+
*/
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* A description for the field, rendered below the input.
|
|
15
|
+
*/
|
|
16
|
+
help?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Set component validation state to invalid.
|
|
19
|
+
*/
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* An error message for the field, rendered below the input when `invalid` is set.
|
|
23
|
+
*/
|
|
24
|
+
invalidFeedback?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* The field's caption, rendered as a `FormLabel` associated with this input.
|
|
27
|
+
*/
|
|
28
|
+
label?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Allows selecting more than one file.
|
|
31
|
+
*/
|
|
32
|
+
multiple?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Method called when the selected file(s) change.
|
|
35
|
+
*/
|
|
36
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
37
|
+
/**
|
|
38
|
+
* Size the component sm or lg.
|
|
39
|
+
*/
|
|
40
|
+
size?: 'sm' | 'lg';
|
|
41
|
+
/**
|
|
42
|
+
* Set component validation state to valid.
|
|
43
|
+
*/
|
|
44
|
+
valid?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* A success message for the field, rendered below the input when `valid` is set.
|
|
47
|
+
*/
|
|
48
|
+
validFeedback?: ReactNode;
|
|
49
|
+
}
|
|
50
|
+
declare const FileInput: React.ForwardRefExoticComponent<FileInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { FileInputProps as n, FileInput as t };
|