@sprawlify/react 0.0.106 → 0.0.108
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/{alert-dialog-anatomy-Jf75lz9b.d.mts → alert-dialog-anatomy-By6PefRf.d.mts} +1 -1
- package/dist/{alert-dialog-anatomy-TKcT7l5b.d.cts → alert-dialog-anatomy-uapD6K_0.d.cts} +1 -1
- package/dist/{anatomy-2HH29RZp.d.mts → anatomy-BRJkiMuc.d.mts} +8 -8
- package/dist/{anatomy-Amb62UHl.d.cts → anatomy-_hr4Zcnc.d.cts} +8 -8
- package/dist/{carousel-anatomy-B5070zv-.d.mts → carousel-anatomy-C04VJHAK.d.cts} +1 -1
- package/dist/{carousel-anatomy-BhwtT561.d.cts → carousel-anatomy-FfxlgZKR.d.mts} +1 -1
- package/dist/{collapsible-BQYUN_eV.cjs → collapsible-BCma5-fq.cjs} +2 -2
- package/dist/{collapsible-DmgD6PQY.mjs → collapsible-DcnLTV0k.mjs} +2 -2
- package/dist/{collection-DX1e_ZEq.mjs → collection-9ORmr4hT.mjs} +1 -1
- package/dist/{collection-xMr2Xl5X.cjs → collection-D-H1Ib2v.cjs} +1 -1
- package/dist/{color-picker-anatomy-DYWW7R7k.d.cts → color-picker-anatomy-BQ7z1Ywc.d.mts} +1 -1
- package/dist/{color-picker-anatomy-mrK3UpZ6.d.mts → color-picker-anatomy-BRWQsr1q.d.cts} +1 -1
- package/dist/{combobox-anatomy-AAXd35pQ.d.mts → combobox-anatomy-CTIx1djR.d.mts} +1 -1
- package/dist/{combobox-anatomy-C9NZvjEy.d.cts → combobox-anatomy-DkXLewOp.d.cts} +1 -1
- package/dist/components/accordion/index.cjs +3 -3
- package/dist/components/accordion/index.mjs +3 -3
- package/dist/components/alert-dialog/index.cjs +3 -3
- package/dist/components/alert-dialog/index.d.cts +2 -2
- package/dist/components/alert-dialog/index.d.mts +2 -2
- package/dist/components/alert-dialog/index.mjs +3 -3
- package/dist/components/anatomy.d.cts +9 -9
- package/dist/components/anatomy.d.mts +9 -9
- package/dist/components/angle-slider/index.cjs +2 -2
- package/dist/components/angle-slider/index.mjs +2 -2
- package/dist/components/aspect-ratio/index.cjs +2 -2
- package/dist/components/aspect-ratio/index.mjs +2 -2
- package/dist/components/avatar/index.cjs +2 -2
- package/dist/components/avatar/index.mjs +2 -2
- package/dist/components/bottom-sheet/index.cjs +3 -3
- package/dist/components/bottom-sheet/index.d.cts +1 -1
- package/dist/components/bottom-sheet/index.d.mts +1 -1
- package/dist/components/bottom-sheet/index.mjs +3 -3
- package/dist/components/carousel/index.cjs +2 -2
- package/dist/components/carousel/index.d.cts +1 -1
- package/dist/components/carousel/index.d.mts +1 -1
- package/dist/components/carousel/index.mjs +2 -2
- package/dist/components/checkbox/index.cjs +2 -2
- package/dist/components/checkbox/index.mjs +4 -4
- package/dist/components/clipboard/index.cjs +1 -1
- package/dist/components/clipboard/index.mjs +1 -1
- package/dist/components/collapsible/index.cjs +3 -3
- package/dist/components/collapsible/index.mjs +3 -3
- package/dist/components/collection/index.cjs +2 -2
- package/dist/components/collection/index.mjs +2 -2
- package/dist/components/color-picker/index.cjs +3 -3
- package/dist/components/color-picker/index.d.cts +2 -2
- package/dist/components/color-picker/index.d.mts +2 -2
- package/dist/components/color-picker/index.mjs +4 -4
- package/dist/components/combobox/index.cjs +4 -4
- package/dist/components/combobox/index.d.cts +2 -2
- package/dist/components/combobox/index.d.mts +2 -2
- package/dist/components/combobox/index.mjs +5 -5
- package/dist/components/date-picker/index.cjs +5 -3
- package/dist/components/date-picker/index.d.cts +2 -2
- package/dist/components/date-picker/index.d.mts +2 -2
- package/dist/components/date-picker/index.mjs +5 -3
- package/dist/components/dialog/index.cjs +3 -3
- package/dist/components/dialog/index.d.cts +1 -1
- package/dist/components/dialog/index.d.mts +1 -1
- package/dist/components/dialog/index.mjs +3 -3
- package/dist/components/download-trigger/index.cjs +1 -1
- package/dist/components/download-trigger/index.mjs +1 -1
- package/dist/components/dropdown-menu/index.cjs +3 -3
- package/dist/components/dropdown-menu/index.d.cts +2 -2
- package/dist/components/dropdown-menu/index.d.mts +2 -2
- package/dist/components/dropdown-menu/index.mjs +3 -3
- package/dist/components/editable/index.cjs +2 -2
- package/dist/components/editable/index.mjs +3 -3
- package/dist/components/field/index.cjs +2 -2
- package/dist/components/field/index.mjs +3 -3
- package/dist/components/fieldset/index.cjs +2 -2
- package/dist/components/fieldset/index.mjs +3 -3
- package/dist/components/file-upload/index.cjs +2 -2
- package/dist/components/file-upload/index.mjs +3 -3
- package/dist/components/floating-panel/index.cjs +3 -3
- package/dist/components/floating-panel/index.d.cts +1 -1
- package/dist/components/floating-panel/index.d.mts +1 -1
- package/dist/components/floating-panel/index.mjs +3 -3
- package/dist/components/format/index.cjs +1 -1
- package/dist/components/format/index.mjs +1 -1
- package/dist/components/frame/index.cjs +1 -1
- package/dist/components/frame/index.mjs +1 -1
- package/dist/components/hover-card/index.cjs +3 -3
- package/dist/components/hover-card/index.d.cts +1 -1
- package/dist/components/hover-card/index.d.mts +1 -1
- package/dist/components/hover-card/index.mjs +3 -3
- package/dist/components/image-cropper/index.cjs +2 -2
- package/dist/components/image-cropper/index.mjs +2 -2
- package/dist/components/json-tree-view/index.cjs +5 -5
- package/dist/components/json-tree-view/index.mjs +6 -5
- package/dist/components/listbox/index.cjs +3 -3
- package/dist/components/listbox/index.d.cts +1 -1
- package/dist/components/listbox/index.d.mts +1 -1
- package/dist/components/listbox/index.mjs +3 -3
- package/dist/components/marquee/index.cjs +2 -2
- package/dist/components/marquee/index.mjs +2 -2
- package/dist/components/navigation-menu/index.cjs +3 -3
- package/dist/components/navigation-menu/index.mjs +3 -3
- package/dist/components/number-input/index.cjs +2 -2
- package/dist/components/number-input/index.mjs +3 -3
- package/dist/components/pagination/index.cjs +2 -2
- package/dist/components/pagination/index.mjs +2 -2
- package/dist/components/password-input/index.cjs +2 -2
- package/dist/components/password-input/index.mjs +3 -3
- package/dist/components/pin-input/index.cjs +2 -2
- package/dist/components/pin-input/index.mjs +3 -3
- package/dist/components/popover/index.cjs +3 -3
- package/dist/components/popover/index.d.cts +1 -1
- package/dist/components/popover/index.d.mts +1 -1
- package/dist/components/popover/index.mjs +3 -3
- package/dist/components/portal/index.cjs +1 -1
- package/dist/components/portal/index.mjs +1 -1
- package/dist/components/presence/index.cjs +2 -2
- package/dist/components/presence/index.d.cts +1 -1
- package/dist/components/presence/index.d.mts +1 -1
- package/dist/components/presence/index.mjs +2 -2
- package/dist/components/progress/index.cjs +2 -2
- package/dist/components/progress/index.mjs +2 -2
- package/dist/components/qr-code/index.cjs +2 -2
- package/dist/components/qr-code/index.mjs +2 -2
- package/dist/components/radio-group/index.cjs +2 -2
- package/dist/components/radio-group/index.mjs +3 -3
- package/dist/components/rating-group/index.cjs +2 -2
- package/dist/components/rating-group/index.mjs +3 -3
- package/dist/components/scroll-area/index.cjs +2 -2
- package/dist/components/scroll-area/index.mjs +2 -2
- package/dist/components/segment-group/index.cjs +2 -2
- package/dist/components/segment-group/index.d.cts +1 -1
- package/dist/components/segment-group/index.d.mts +1 -1
- package/dist/components/segment-group/index.mjs +2 -2
- package/dist/components/select/index.cjs +4 -4
- package/dist/components/select/index.d.cts +1 -1
- package/dist/components/select/index.d.mts +1 -1
- package/dist/components/select/index.mjs +5 -5
- package/dist/components/separator/index.cjs +2 -2
- package/dist/components/separator/index.mjs +2 -2
- package/dist/components/signature-pad/index.cjs +2 -2
- package/dist/components/signature-pad/index.mjs +3 -3
- package/dist/components/slider/index.cjs +2 -2
- package/dist/components/slider/index.mjs +2 -2
- package/dist/components/splitter/index.cjs +2 -2
- package/dist/components/splitter/index.mjs +2 -2
- package/dist/components/steps/index.cjs +2 -2
- package/dist/components/steps/index.mjs +2 -2
- package/dist/components/switch/index.cjs +2 -2
- package/dist/components/switch/index.mjs +3 -3
- package/dist/components/tabs/index.cjs +3 -3
- package/dist/components/tabs/index.mjs +3 -3
- package/dist/components/tags-input/index.cjs +2 -2
- package/dist/components/tags-input/index.mjs +3 -3
- package/dist/components/timer/index.cjs +2 -2
- package/dist/components/timer/index.mjs +2 -2
- package/dist/components/toast/index.cjs +2 -2
- package/dist/components/toast/index.mjs +2 -2
- package/dist/components/toggle/index.cjs +1 -1
- package/dist/components/toggle/index.mjs +1 -1
- package/dist/components/toggle-group/index.cjs +2 -2
- package/dist/components/toggle-group/index.mjs +2 -2
- package/dist/components/tooltip/index.cjs +3 -3
- package/dist/components/tooltip/index.d.cts +1 -1
- package/dist/components/tooltip/index.d.mts +1 -1
- package/dist/components/tooltip/index.mjs +3 -3
- package/dist/components/tour/index.cjs +3 -3
- package/dist/components/tour/index.d.cts +2 -2
- package/dist/components/tour/index.d.mts +2 -2
- package/dist/components/tour/index.mjs +3 -3
- package/dist/components/tree-view/index.cjs +5 -5
- package/dist/components/tree-view/index.mjs +5 -5
- package/dist/{core-B2xe_H5d.cjs → core-D3VWpaVw.cjs} +1 -1
- package/dist/{core-C1rldtMa.mjs → core-Ds_Jbvzw.mjs} +1 -1
- package/dist/date-picker-anatomy-CDUTxoA5.d.mts +6 -0
- package/dist/date-picker-anatomy-Ca3lBZqS.d.cts +6 -0
- package/dist/{field-Bbi9izVu.mjs → field-D0DgA3nE.mjs} +1 -1
- package/dist/{fieldset-DlUDLf8o.mjs → fieldset-BTum5ZBg.mjs} +1 -1
- package/dist/{index-CU90OPxQ.d.mts → index-BMMqRY_h.d.mts} +36 -11
- package/dist/{index-7xBSN2zJ.d.cts → index-BhG5Lrxf.d.cts} +1 -1
- package/dist/{index-CpTZ6IsQ.d.cts → index-Cvkkyuy9.d.cts} +36 -11
- package/dist/{index-Fr3qYnA2.d.mts → index-DqNVkxGf.d.mts} +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +11 -11
- package/dist/index.d.mts +11 -11
- package/dist/index.mjs +3 -3
- package/dist/{listbox-anatomy-BfgzfKkb.d.mts → listbox-anatomy--KegOtbF.d.mts} +1 -1
- package/dist/{listbox-anatomy-Bhg-JGGG.d.cts → listbox-anatomy-Cmz8oVla.d.cts} +1 -1
- package/dist/locale-BOA439G-.mjs +160 -0
- package/dist/locale-Dc2Fyoa-.cjs +190 -0
- package/dist/{presence-DjN_fQcB.cjs → presence-W-p0Vh_B.cjs} +1 -1
- package/dist/{presence-Dj3TqYzy.mjs → presence-s8pNuusP.mjs} +1 -1
- package/dist/{segment-group-anatomy-BxkiJHLF.d.cts → segment-group-anatomy-BO-oXNAU.d.cts} +1 -1
- package/dist/{segment-group-anatomy-uVSRVyur.d.mts → segment-group-anatomy-BUdXtMrR.d.mts} +1 -1
- package/dist/{tour-anatomy-Bva1mq21.d.cts → tour-anatomy-CC7_IGM8.d.mts} +1 -1
- package/dist/{tour-anatomy-CZ-rbzgx.d.mts → tour-anatomy-sCXLaLH8.d.cts} +1 -1
- package/dist/{tree-view-C5sDOTFF.cjs → tree-view-CPza4iz0.cjs} +3 -3
- package/dist/{tree-view-BLSdhcfd.mjs → tree-view-dbAqFgCx.mjs} +3 -3
- package/package.json +9 -8
- package/dist/date-picker-anatomy-BvGflDHY.d.mts +0 -6
- package/dist/date-picker-anatomy-D5AqNLW8.d.cts +0 -6
- package/dist/locale-DenY029U.cjs +0 -73
- package/dist/locale-yswfGSTu.mjs +0 -49
package/dist/index.d.cts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as createContext, a as useFilter, b as useMachine, c as UseCollatorProps, d as LocaleProviderProps, f as EnvironmentProvider, g as useEnvironmentContext, h as UseEnvironmentContext, i as UseFilterReturn, l as useCollator, m as RootNode, n as useLocaleContext, o as UseDateFormatterProps, p as EnvironmentProviderProps, r as UseFilterProps, s as useDateFormatter, t as UseLocaleContext, u as LocaleProvider, v as Portal, y as PortalProps } from "./index-Cvkkyuy9.cjs";
|
|
2
2
|
import { n as normalizeProps, t as PropTypes } from "./normalize-props-Dpcw8dXq.cjs";
|
|
3
3
|
import { r as Optional, t as Assign } from "./types-DdMYkueB.cjs";
|
|
4
4
|
import { a as sprawlify, i as jsxFactory, n as HTMLSprawlifyProps, r as PolymorphicProps, t as HTMLProps } from "./factory-DdhIXHo8.cjs";
|
|
5
5
|
import { t as accordionAnatomy } from "./accordion-anatomy-BVqvSykU.cjs";
|
|
6
|
-
import { t as alertDialogAnatomy } from "./alert-dialog-anatomy-
|
|
6
|
+
import { t as alertDialogAnatomy } from "./alert-dialog-anatomy-uapD6K_0.cjs";
|
|
7
7
|
import { t as angleSliderAnatomy } from "./angle-slider-anatomy-0LPiV3HA.cjs";
|
|
8
|
-
import { n as aspectRatioAnatomy, t as dropdownMenuAnatomy } from "./anatomy-
|
|
8
|
+
import { n as aspectRatioAnatomy, t as dropdownMenuAnatomy } from "./anatomy-_hr4Zcnc.cjs";
|
|
9
9
|
import { t as avatarAnatomy } from "./avatar-anatomy-Ddj0XKJn.cjs";
|
|
10
10
|
import { t as bottomSheetAnatomy } from "./bottom-sheet-anatomy-BbFaDCy-.cjs";
|
|
11
|
-
import { t as carouselAnatomy } from "./carousel-anatomy-
|
|
11
|
+
import { t as carouselAnatomy } from "./carousel-anatomy-C04VJHAK.cjs";
|
|
12
12
|
import { t as checkboxAnatomy } from "./checkbox-anatomy-BuDM7LQO.cjs";
|
|
13
13
|
import { t as clipboardAnatomy } from "./clipboard-anatomy-Dz5Oirf8.cjs";
|
|
14
14
|
import { t as collapsibleAnatomy } from "./collapsible-anatomy-ZydXE9_Q.cjs";
|
|
15
|
-
import { t as colorPickerAnatomy } from "./color-picker-anatomy-
|
|
16
|
-
import { t as comboboxAnatomy } from "./combobox-anatomy-
|
|
17
|
-
import { t as datePickerAnatomy } from "./date-picker-anatomy-
|
|
15
|
+
import { t as colorPickerAnatomy } from "./color-picker-anatomy-BRWQsr1q.cjs";
|
|
16
|
+
import { t as comboboxAnatomy } from "./combobox-anatomy-DkXLewOp.cjs";
|
|
17
|
+
import { t as datePickerAnatomy } from "./date-picker-anatomy-Ca3lBZqS.cjs";
|
|
18
18
|
import { t as dialogAnatomy } from "./dialog-anatomy-DA3VpU4s.cjs";
|
|
19
19
|
import { t as editableAnatomy } from "./editable-anatomy-DTOd_jwJ.cjs";
|
|
20
20
|
import { t as fieldAnatomy } from "./field-anatomy-CH5cGfid.cjs";
|
|
@@ -23,7 +23,7 @@ import { t as fileUploadAnatomy } from "./file-upload-anatomy-BYHBw5Ha.cjs";
|
|
|
23
23
|
import { t as floatingPanelAnatomy } from "./floating-panel-anatomy-DEjVO2zn.cjs";
|
|
24
24
|
import { t as hoverCardAnatomy } from "./hover-card-anatomy-DLdlKr1w.cjs";
|
|
25
25
|
import { t as imageCropperAnatomy } from "./image-cropper-anatomy-C7W1zhxf.cjs";
|
|
26
|
-
import { t as listboxAnatomy } from "./listbox-anatomy-
|
|
26
|
+
import { t as listboxAnatomy } from "./listbox-anatomy-Cmz8oVla.cjs";
|
|
27
27
|
import { t as marqueeAnatomy } from "./marquee-anatomy-DPzEZk16.cjs";
|
|
28
28
|
import { t as navigationMenuAnatomy } from "./navigation-menu-anatomy-CX9x8mCS.cjs";
|
|
29
29
|
import { t as numberInputAnatomy } from "./number-input-anatomy-R10r0iHv.cjs";
|
|
@@ -36,7 +36,7 @@ import { t as qrCodeAnatomy } from "./qr-code-anatomy-B_OJvWcK.cjs";
|
|
|
36
36
|
import { t as radioGroupAnatomy } from "./radio-group-anatomy-DDNsi_yF.cjs";
|
|
37
37
|
import { t as ratingGroupAnatomy } from "./rating-group-anatomy-1iIXmtWp.cjs";
|
|
38
38
|
import { t as scrollAreaAnatomy } from "./scroll-area-anatomy-Bs1Z-Xv4.cjs";
|
|
39
|
-
import { t as segmentGroupAnatomy } from "./segment-group-anatomy-
|
|
39
|
+
import { t as segmentGroupAnatomy } from "./segment-group-anatomy-BO-oXNAU.cjs";
|
|
40
40
|
import { t as selectAnatomy } from "./select-anatomy-CROGNOrq.cjs";
|
|
41
41
|
import { t as separatorAnatomy } from "./separator-anatomy-JUP5oxgW.cjs";
|
|
42
42
|
import { t as signaturePadAnatomy } from "./signature-pad-anatomy-DaUfO-L_.cjs";
|
|
@@ -51,7 +51,7 @@ import { t as toastAnatomy } from "./toast-anatomy-BCUO5er0.cjs";
|
|
|
51
51
|
import { t as toggleAnatomy } from "./toggle-anatomy-D7EJTXBH.cjs";
|
|
52
52
|
import { t as toggleGroupAnatomy } from "./toggle-group-anatomy-7xvQhJxG.cjs";
|
|
53
53
|
import { t as tooltipAnatomy } from "./tooltip-anatomy-DQRlLh-B.cjs";
|
|
54
|
-
import { t as tourAnatomy } from "./tour-anatomy-
|
|
54
|
+
import { t as tourAnatomy } from "./tour-anatomy-sCXLaLH8.cjs";
|
|
55
55
|
import { t as treeViewAnatomy } from "./tree-view-anatomy-DdWK3r9W.cjs";
|
|
56
56
|
export * from "@sprawlify/primitives/anatomy";
|
|
57
|
-
export { Assign, EnvironmentProvider, EnvironmentProviderProps, HTMLProps, HTMLSprawlifyProps, LocaleProvider, LocaleProviderProps, Optional, PolymorphicProps, Portal, PortalProps, PropTypes, RootNode, UseCollatorProps, UseEnvironmentContext, UseFilterProps, UseFilterReturn, UseLocaleContext, accordionAnatomy, alertDialogAnatomy, angleSliderAnatomy, aspectRatioAnatomy, avatarAnatomy, bottomSheetAnatomy, carouselAnatomy, checkboxAnatomy, clipboardAnatomy, collapsibleAnatomy, colorPickerAnatomy, comboboxAnatomy, createContext, datePickerAnatomy, dialogAnatomy, dropdownMenuAnatomy, editableAnatomy, fieldAnatomy, fieldsetAnatomy, fileUploadAnatomy, floatingPanelAnatomy, hoverCardAnatomy, imageCropperAnatomy, jsxFactory, listboxAnatomy, marqueeAnatomy, navigationMenuAnatomy, normalizeProps, numberInputAnatomy, paginationAnatomy, passwordInputAnatomy, pinInputAnatomy, popoverAnatomy, progressAnatomy, qrCodeAnatomy, radioGroupAnatomy, ratingGroupAnatomy, scrollAreaAnatomy, segmentGroupAnatomy, selectAnatomy, separatorAnatomy, signaturePadAnatomy, sliderAnatomy, splitterAnatomy, sprawlify, stepsAnatomy, switchAnatomy, tabsAnatomy, tagsInputAnatomy, timerAnatomy, toastAnatomy, toggleAnatomy, toggleGroupAnatomy, tooltipAnatomy, tourAnatomy, treeViewAnatomy, useCollator, useEnvironmentContext, useFilter, useLocaleContext, useMachine };
|
|
57
|
+
export { Assign, EnvironmentProvider, EnvironmentProviderProps, HTMLProps, HTMLSprawlifyProps, LocaleProvider, LocaleProviderProps, Optional, PolymorphicProps, Portal, PortalProps, PropTypes, RootNode, UseCollatorProps, UseDateFormatterProps, UseEnvironmentContext, UseFilterProps, UseFilterReturn, UseLocaleContext, accordionAnatomy, alertDialogAnatomy, angleSliderAnatomy, aspectRatioAnatomy, avatarAnatomy, bottomSheetAnatomy, carouselAnatomy, checkboxAnatomy, clipboardAnatomy, collapsibleAnatomy, colorPickerAnatomy, comboboxAnatomy, createContext, datePickerAnatomy, dialogAnatomy, dropdownMenuAnatomy, editableAnatomy, fieldAnatomy, fieldsetAnatomy, fileUploadAnatomy, floatingPanelAnatomy, hoverCardAnatomy, imageCropperAnatomy, jsxFactory, listboxAnatomy, marqueeAnatomy, navigationMenuAnatomy, normalizeProps, numberInputAnatomy, paginationAnatomy, passwordInputAnatomy, pinInputAnatomy, popoverAnatomy, progressAnatomy, qrCodeAnatomy, radioGroupAnatomy, ratingGroupAnatomy, scrollAreaAnatomy, segmentGroupAnatomy, selectAnatomy, separatorAnatomy, signaturePadAnatomy, sliderAnatomy, splitterAnatomy, sprawlify, stepsAnatomy, switchAnatomy, tabsAnatomy, tagsInputAnatomy, timerAnatomy, toastAnatomy, toggleAnatomy, toggleGroupAnatomy, tooltipAnatomy, tourAnatomy, treeViewAnatomy, useCollator, useDateFormatter, useEnvironmentContext, useFilter, useLocaleContext, useMachine };
|
package/dist/index.d.mts
CHANGED
|
@@ -2,18 +2,18 @@ import { a as useMachine, i as normalizeProps, n as PortalProps, r as PropTypes,
|
|
|
2
2
|
import { r as Optional, t as Assign } from "./types-DtyXpcAD.mjs";
|
|
3
3
|
import { a as sprawlify, i as jsxFactory, n as HTMLSprawlifyProps, r as PolymorphicProps, t as HTMLProps } from "./factory-BKbIJj4p.mjs";
|
|
4
4
|
import { t as accordionAnatomy } from "./accordion-anatomy-CoLc1OWo.mjs";
|
|
5
|
-
import { t as alertDialogAnatomy } from "./alert-dialog-anatomy-
|
|
5
|
+
import { t as alertDialogAnatomy } from "./alert-dialog-anatomy-By6PefRf.mjs";
|
|
6
6
|
import { t as angleSliderAnatomy } from "./angle-slider-anatomy-NAAA6z4D.mjs";
|
|
7
|
-
import { n as aspectRatioAnatomy, t as dropdownMenuAnatomy } from "./anatomy-
|
|
7
|
+
import { n as aspectRatioAnatomy, t as dropdownMenuAnatomy } from "./anatomy-BRJkiMuc.mjs";
|
|
8
8
|
import { t as avatarAnatomy } from "./avatar-anatomy-CLqLTBn4.mjs";
|
|
9
9
|
import { t as bottomSheetAnatomy } from "./bottom-sheet-anatomy-C1brerV8.mjs";
|
|
10
|
-
import { t as carouselAnatomy } from "./carousel-anatomy-
|
|
10
|
+
import { t as carouselAnatomy } from "./carousel-anatomy-FfxlgZKR.mjs";
|
|
11
11
|
import { t as checkboxAnatomy } from "./checkbox-anatomy-B3UgGmJ5.mjs";
|
|
12
12
|
import { t as clipboardAnatomy } from "./clipboard-anatomy-BJgi2OHQ.mjs";
|
|
13
13
|
import { t as collapsibleAnatomy } from "./collapsible-anatomy-DKGgbFla.mjs";
|
|
14
|
-
import { t as colorPickerAnatomy } from "./color-picker-anatomy-
|
|
15
|
-
import { t as comboboxAnatomy } from "./combobox-anatomy-
|
|
16
|
-
import { t as datePickerAnatomy } from "./date-picker-anatomy-
|
|
14
|
+
import { t as colorPickerAnatomy } from "./color-picker-anatomy-BQ7z1Ywc.mjs";
|
|
15
|
+
import { t as comboboxAnatomy } from "./combobox-anatomy-CTIx1djR.mjs";
|
|
16
|
+
import { t as datePickerAnatomy } from "./date-picker-anatomy-CDUTxoA5.mjs";
|
|
17
17
|
import { t as dialogAnatomy } from "./dialog-anatomy-BxevLCvK.mjs";
|
|
18
18
|
import { t as editableAnatomy } from "./editable-anatomy-B2RopWau.mjs";
|
|
19
19
|
import { t as fieldAnatomy } from "./field-anatomy-BjS32o_1.mjs";
|
|
@@ -22,7 +22,7 @@ import { t as fileUploadAnatomy } from "./file-upload-anatomy-DXTF-W9w.mjs";
|
|
|
22
22
|
import { t as floatingPanelAnatomy } from "./floating-panel-anatomy-CO6ssdOe.mjs";
|
|
23
23
|
import { t as hoverCardAnatomy } from "./hover-card-anatomy-Bdh5gEX4.mjs";
|
|
24
24
|
import { t as imageCropperAnatomy } from "./image-cropper-anatomy-CGBoDtBI.mjs";
|
|
25
|
-
import { t as listboxAnatomy } from "./listbox-anatomy
|
|
25
|
+
import { t as listboxAnatomy } from "./listbox-anatomy--KegOtbF.mjs";
|
|
26
26
|
import { t as marqueeAnatomy } from "./marquee-anatomy-D1O9mn02.mjs";
|
|
27
27
|
import { t as navigationMenuAnatomy } from "./navigation-menu-anatomy-mW-gBV8T.mjs";
|
|
28
28
|
import { t as numberInputAnatomy } from "./number-input-anatomy-Bjjv_dS1.mjs";
|
|
@@ -35,7 +35,7 @@ import { t as qrCodeAnatomy } from "./qr-code-anatomy-2090isj7.mjs";
|
|
|
35
35
|
import { t as radioGroupAnatomy } from "./radio-group-anatomy-BMasah1F.mjs";
|
|
36
36
|
import { t as ratingGroupAnatomy } from "./rating-group-anatomy-DIrR1S1z.mjs";
|
|
37
37
|
import { t as scrollAreaAnatomy } from "./scroll-area-anatomy-07rhy4XY.mjs";
|
|
38
|
-
import { t as segmentGroupAnatomy } from "./segment-group-anatomy-
|
|
38
|
+
import { t as segmentGroupAnatomy } from "./segment-group-anatomy-BUdXtMrR.mjs";
|
|
39
39
|
import { t as selectAnatomy } from "./select-anatomy-CcilFZCa.mjs";
|
|
40
40
|
import { t as separatorAnatomy } from "./separator-anatomy-D0kCVh9f.mjs";
|
|
41
41
|
import { t as signaturePadAnatomy } from "./signature-pad-anatomy-CJa0piw7.mjs";
|
|
@@ -50,8 +50,8 @@ import { t as toastAnatomy } from "./toast-anatomy-BAbBrdqI.mjs";
|
|
|
50
50
|
import { t as toggleAnatomy } from "./toggle-anatomy-ByPoQM9T.mjs";
|
|
51
51
|
import { t as toggleGroupAnatomy } from "./toggle-group-anatomy-DVaY-S2H.mjs";
|
|
52
52
|
import { t as tooltipAnatomy } from "./tooltip-anatomy-Ck8CiUw9.mjs";
|
|
53
|
-
import { t as tourAnatomy } from "./tour-anatomy-
|
|
53
|
+
import { t as tourAnatomy } from "./tour-anatomy-CC7_IGM8.mjs";
|
|
54
54
|
import { t as treeViewAnatomy } from "./tree-view-anatomy-BUL7Xz9s.mjs";
|
|
55
|
-
import { a as useFilter, c as
|
|
55
|
+
import { _ as createContext, a as useFilter, c as UseCollatorProps, d as LocaleProviderProps, f as EnvironmentProvider, g as useEnvironmentContext, h as UseEnvironmentContext, i as UseFilterReturn, l as useCollator, m as RootNode, n as useLocaleContext, o as UseDateFormatterProps, p as EnvironmentProviderProps, r as UseFilterProps, s as useDateFormatter, t as UseLocaleContext, u as LocaleProvider } from "./index-BMMqRY_h.mjs";
|
|
56
56
|
export * from "@sprawlify/primitives/anatomy";
|
|
57
|
-
export { Assign, EnvironmentProvider, EnvironmentProviderProps, HTMLProps, HTMLSprawlifyProps, LocaleProvider, LocaleProviderProps, Optional, PolymorphicProps, Portal, PortalProps, PropTypes, RootNode, UseCollatorProps, UseEnvironmentContext, UseFilterProps, UseFilterReturn, UseLocaleContext, accordionAnatomy, alertDialogAnatomy, angleSliderAnatomy, aspectRatioAnatomy, avatarAnatomy, bottomSheetAnatomy, carouselAnatomy, checkboxAnatomy, clipboardAnatomy, collapsibleAnatomy, colorPickerAnatomy, comboboxAnatomy, createContext, datePickerAnatomy, dialogAnatomy, dropdownMenuAnatomy, editableAnatomy, fieldAnatomy, fieldsetAnatomy, fileUploadAnatomy, floatingPanelAnatomy, hoverCardAnatomy, imageCropperAnatomy, jsxFactory, listboxAnatomy, marqueeAnatomy, navigationMenuAnatomy, normalizeProps, numberInputAnatomy, paginationAnatomy, passwordInputAnatomy, pinInputAnatomy, popoverAnatomy, progressAnatomy, qrCodeAnatomy, radioGroupAnatomy, ratingGroupAnatomy, scrollAreaAnatomy, segmentGroupAnatomy, selectAnatomy, separatorAnatomy, signaturePadAnatomy, sliderAnatomy, splitterAnatomy, sprawlify, stepsAnatomy, switchAnatomy, tabsAnatomy, tagsInputAnatomy, timerAnatomy, toastAnatomy, toggleAnatomy, toggleGroupAnatomy, tooltipAnatomy, tourAnatomy, treeViewAnatomy, useCollator, useEnvironmentContext, useFilter, useLocaleContext, useMachine };
|
|
57
|
+
export { Assign, EnvironmentProvider, EnvironmentProviderProps, HTMLProps, HTMLSprawlifyProps, LocaleProvider, LocaleProviderProps, Optional, PolymorphicProps, Portal, PortalProps, PropTypes, RootNode, UseCollatorProps, UseDateFormatterProps, UseEnvironmentContext, UseFilterProps, UseFilterReturn, UseLocaleContext, accordionAnatomy, alertDialogAnatomy, angleSliderAnatomy, aspectRatioAnatomy, avatarAnatomy, bottomSheetAnatomy, carouselAnatomy, checkboxAnatomy, clipboardAnatomy, collapsibleAnatomy, colorPickerAnatomy, comboboxAnatomy, createContext, datePickerAnatomy, dialogAnatomy, dropdownMenuAnatomy, editableAnatomy, fieldAnatomy, fieldsetAnatomy, fileUploadAnatomy, floatingPanelAnatomy, hoverCardAnatomy, imageCropperAnatomy, jsxFactory, listboxAnatomy, marqueeAnatomy, navigationMenuAnatomy, normalizeProps, numberInputAnatomy, paginationAnatomy, passwordInputAnatomy, pinInputAnatomy, popoverAnatomy, progressAnatomy, qrCodeAnatomy, radioGroupAnatomy, ratingGroupAnatomy, scrollAreaAnatomy, segmentGroupAnatomy, selectAnatomy, separatorAnatomy, signaturePadAnatomy, sliderAnatomy, splitterAnatomy, sprawlify, stepsAnatomy, switchAnatomy, tabsAnatomy, tagsInputAnatomy, timerAnatomy, toastAnatomy, toggleAnatomy, toggleGroupAnatomy, tooltipAnatomy, tourAnatomy, treeViewAnatomy, useCollator, useDateFormatter, useEnvironmentContext, useFilter, useLocaleContext, useMachine };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./chunk-D1SwGrFN.mjs";
|
|
2
|
-
import { i as useMachine, n as Portal, r as normalizeProps } from "./core-
|
|
2
|
+
import { i as useMachine, n as Portal, r as normalizeProps } from "./core-Ds_Jbvzw.mjs";
|
|
3
3
|
import { t as createContext } from "./create-context-vbKnbgU_.mjs";
|
|
4
4
|
import { n as useEnvironmentContext, t as EnvironmentProvider } from "./environment-B_ip8ub2.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { a as useLocaleContext, i as LocaleProvider, n as useDateFormatter, r as useCollator, t as useFilter } from "./locale-BOA439G-.mjs";
|
|
6
6
|
import "./providers-Ddwg87SJ.mjs";
|
|
7
7
|
import { n as sprawlify, t as jsxFactory } from "./factory-B2jnWWga.mjs";
|
|
8
8
|
import { t as accordionAnatomy } from "./accordion-anatomy-kncFtA0-.mjs";
|
|
@@ -60,4 +60,4 @@ import { t as treeViewAnatomy } from "./tree-view-anatomy-CDC_q4ZI.mjs";
|
|
|
60
60
|
import "@sprawlify/primitives/core";
|
|
61
61
|
export * from "@sprawlify/primitives/anatomy";
|
|
62
62
|
//#endregion
|
|
63
|
-
export { EnvironmentProvider, LocaleProvider, Portal, accordionAnatomy, alertDialogAnatomy, angleSliderAnatomy, aspectRatioAnatomy, avatarAnatomy, bottomSheetAnatomy, carouselAnatomy, checkboxAnatomy, clipboardAnatomy, collapsibleAnatomy, colorPickerAnatomy, comboboxAnatomy, createContext, datePickerAnatomy, dialogAnatomy, dropdownMenuAnatomy, editableAnatomy, fieldAnatomy, fieldsetAnatomy, fileUploadAnatomy, floatingPanelAnatomy, hoverCardAnatomy, imageCropperAnatomy, jsxFactory, listboxAnatomy, marqueeAnatomy, navigationMenuAnatomy, normalizeProps, numberInputAnatomy, paginationAnatomy, passwordInputAnatomy, pinInputAnatomy, popoverAnatomy, progressAnatomy, qrCodeAnatomy, radioGroupAnatomy, ratingGroupAnatomy, scrollAreaAnatomy, segmentGroupAnatomy, selectAnatomy, separatorAnatomy, signaturePadAnatomy, sliderAnatomy, splitterAnatomy, sprawlify, stepsAnatomy, switchAnatomy, tabsAnatomy, tagsInputAnatomy, timerAnatomy, toastAnatomy, toggleAnatomy, toggleGroupAnatomy, tooltipAnatomy, tourAnatomy, treeViewAnatomy, useCollator, useEnvironmentContext, useFilter, useLocaleContext, useMachine };
|
|
63
|
+
export { EnvironmentProvider, LocaleProvider, Portal, accordionAnatomy, alertDialogAnatomy, angleSliderAnatomy, aspectRatioAnatomy, avatarAnatomy, bottomSheetAnatomy, carouselAnatomy, checkboxAnatomy, clipboardAnatomy, collapsibleAnatomy, colorPickerAnatomy, comboboxAnatomy, createContext, datePickerAnatomy, dialogAnatomy, dropdownMenuAnatomy, editableAnatomy, fieldAnatomy, fieldsetAnatomy, fileUploadAnatomy, floatingPanelAnatomy, hoverCardAnatomy, imageCropperAnatomy, jsxFactory, listboxAnatomy, marqueeAnatomy, navigationMenuAnatomy, normalizeProps, numberInputAnatomy, paginationAnatomy, passwordInputAnatomy, pinInputAnatomy, popoverAnatomy, progressAnatomy, qrCodeAnatomy, radioGroupAnatomy, ratingGroupAnatomy, scrollAreaAnatomy, segmentGroupAnatomy, selectAnatomy, separatorAnatomy, signaturePadAnatomy, sliderAnatomy, splitterAnatomy, sprawlify, stepsAnatomy, switchAnatomy, tabsAnatomy, tagsInputAnatomy, timerAnatomy, toastAnatomy, toggleAnatomy, toggleGroupAnatomy, tooltipAnatomy, tourAnatomy, treeViewAnatomy, useCollator, useDateFormatter, useEnvironmentContext, useFilter, useLocaleContext, useMachine };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _sprawlify_primitives_anatomy0 from "@sprawlify/primitives/anatomy";
|
|
2
2
|
|
|
3
3
|
//#region src/components/listbox/listbox-anatomy.d.ts
|
|
4
|
-
declare const listboxAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"input" | "label" | "content" | "
|
|
4
|
+
declare const listboxAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"input" | "label" | "content" | "item" | "root" | "itemIndicator" | "itemText" | "itemGroup" | "itemGroupLabel" | "empty" | "valueText">;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { listboxAnatomy as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _sprawlify_primitives_anatomy0 from "@sprawlify/primitives/anatomy";
|
|
2
2
|
|
|
3
3
|
//#region src/components/listbox/listbox-anatomy.d.ts
|
|
4
|
-
declare const listboxAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"input" | "label" | "content" | "
|
|
4
|
+
declare const listboxAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"input" | "label" | "content" | "item" | "root" | "itemIndicator" | "itemText" | "itemGroup" | "itemGroupLabel" | "empty" | "valueText">;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { listboxAnatomy as t };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { t as createContext$1 } from "./create-context-vbKnbgU_.mjs";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { createCollator, createFilter, isRTL } from "@sprawlify/primitives/i18n-utils";
|
|
5
|
+
//#region src/providers/locale/use-locale-context.ts
|
|
6
|
+
const [LocaleContextProvider, useLocaleContext] = createContext$1({
|
|
7
|
+
name: "LocaleContext",
|
|
8
|
+
hookName: "useLocaleContext",
|
|
9
|
+
providerName: "<LocaleProvider />",
|
|
10
|
+
strict: false,
|
|
11
|
+
defaultValue: {
|
|
12
|
+
dir: "ltr",
|
|
13
|
+
locale: "en-US"
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/providers/locale/locale-provider.tsx
|
|
18
|
+
const LocaleProvider = (props) => {
|
|
19
|
+
const { children, locale } = props;
|
|
20
|
+
return /* @__PURE__ */ jsx(LocaleContextProvider, {
|
|
21
|
+
value: {
|
|
22
|
+
locale,
|
|
23
|
+
dir: isRTL(locale) ? "rtl" : "ltr"
|
|
24
|
+
},
|
|
25
|
+
children
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/providers/locale/use-collator.ts
|
|
30
|
+
function useCollator(props = {}) {
|
|
31
|
+
const env = useLocaleContext();
|
|
32
|
+
const locale = props.locale ?? env.locale;
|
|
33
|
+
return useMemo(() => {
|
|
34
|
+
const { locale: _, ...options } = props;
|
|
35
|
+
return createCollator(locale, options);
|
|
36
|
+
}, [locale, props]);
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.0/node_modules/@internationalized/date/dist/DateFormatter.mjs
|
|
40
|
+
let $fb18d541ea1ad717$var$formatterCache = /* @__PURE__ */ new Map();
|
|
41
|
+
var $fb18d541ea1ad717$export$ad991b66133851cf = class {
|
|
42
|
+
/** Formats a date as a string according to the locale and format options passed to the constructor. */ format(value) {
|
|
43
|
+
return this.formatter.format(value);
|
|
44
|
+
}
|
|
45
|
+
/** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */ formatToParts(value) {
|
|
46
|
+
return this.formatter.formatToParts(value);
|
|
47
|
+
}
|
|
48
|
+
/** Formats a date range as a string. */ formatRange(start, end) {
|
|
49
|
+
if (typeof this.formatter.formatRange === "function") return this.formatter.formatRange(start, end);
|
|
50
|
+
if (end < start) throw new RangeError("End date must be >= start date");
|
|
51
|
+
return `${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`;
|
|
52
|
+
}
|
|
53
|
+
/** Formats a date range as an array of parts. */ formatRangeToParts(start, end) {
|
|
54
|
+
if (typeof this.formatter.formatRangeToParts === "function") return this.formatter.formatRangeToParts(start, end);
|
|
55
|
+
if (end < start) throw new RangeError("End date must be >= start date");
|
|
56
|
+
let startParts = this.formatter.formatToParts(start);
|
|
57
|
+
let endParts = this.formatter.formatToParts(end);
|
|
58
|
+
return [
|
|
59
|
+
...startParts.map((p) => ({
|
|
60
|
+
...p,
|
|
61
|
+
source: "startRange"
|
|
62
|
+
})),
|
|
63
|
+
{
|
|
64
|
+
type: "literal",
|
|
65
|
+
value: " – ",
|
|
66
|
+
source: "shared"
|
|
67
|
+
},
|
|
68
|
+
...endParts.map((p) => ({
|
|
69
|
+
...p,
|
|
70
|
+
source: "endRange"
|
|
71
|
+
}))
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
/** Returns the resolved formatting options based on the values passed to the constructor. */ resolvedOptions() {
|
|
75
|
+
let resolvedOptions = this.formatter.resolvedOptions();
|
|
76
|
+
if ($fb18d541ea1ad717$var$hasBuggyResolvedHourCycle()) {
|
|
77
|
+
if (!this.resolvedHourCycle) this.resolvedHourCycle = $fb18d541ea1ad717$var$getResolvedHourCycle(resolvedOptions.locale, this.options);
|
|
78
|
+
resolvedOptions.hourCycle = this.resolvedHourCycle;
|
|
79
|
+
resolvedOptions.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12";
|
|
80
|
+
}
|
|
81
|
+
if (resolvedOptions.calendar === "ethiopic-amete-alem") resolvedOptions.calendar = "ethioaa";
|
|
82
|
+
return resolvedOptions;
|
|
83
|
+
}
|
|
84
|
+
constructor(locale, options = {}) {
|
|
85
|
+
this.formatter = $fb18d541ea1ad717$var$getCachedDateFormatter(locale, options);
|
|
86
|
+
this.options = options;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const $fb18d541ea1ad717$var$hour12Preferences = {
|
|
90
|
+
true: { ja: "h11" },
|
|
91
|
+
false: {}
|
|
92
|
+
};
|
|
93
|
+
function $fb18d541ea1ad717$var$getCachedDateFormatter(locale, options = {}) {
|
|
94
|
+
if (typeof options.hour12 === "boolean" && $fb18d541ea1ad717$var$hasBuggyHour12Behavior()) {
|
|
95
|
+
options = { ...options };
|
|
96
|
+
let pref = $fb18d541ea1ad717$var$hour12Preferences[String(options.hour12)][locale.split("-")[0]];
|
|
97
|
+
let defaultHourCycle = options.hour12 ? "h12" : "h23";
|
|
98
|
+
options.hourCycle = pref !== null && pref !== void 0 ? pref : defaultHourCycle;
|
|
99
|
+
delete options.hour12;
|
|
100
|
+
}
|
|
101
|
+
let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
|
|
102
|
+
if ($fb18d541ea1ad717$var$formatterCache.has(cacheKey)) return $fb18d541ea1ad717$var$formatterCache.get(cacheKey);
|
|
103
|
+
let numberFormatter = new Intl.DateTimeFormat(locale, options);
|
|
104
|
+
$fb18d541ea1ad717$var$formatterCache.set(cacheKey, numberFormatter);
|
|
105
|
+
return numberFormatter;
|
|
106
|
+
}
|
|
107
|
+
let $fb18d541ea1ad717$var$_hasBuggyHour12Behavior = null;
|
|
108
|
+
function $fb18d541ea1ad717$var$hasBuggyHour12Behavior() {
|
|
109
|
+
if ($fb18d541ea1ad717$var$_hasBuggyHour12Behavior == null) $fb18d541ea1ad717$var$_hasBuggyHour12Behavior = new Intl.DateTimeFormat("en-US", {
|
|
110
|
+
hour: "numeric",
|
|
111
|
+
hour12: false
|
|
112
|
+
}).format(new Date(2020, 2, 3, 0)) === "24";
|
|
113
|
+
return $fb18d541ea1ad717$var$_hasBuggyHour12Behavior;
|
|
114
|
+
}
|
|
115
|
+
let $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle = null;
|
|
116
|
+
function $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle() {
|
|
117
|
+
if ($fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle == null) $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle = new Intl.DateTimeFormat("fr", {
|
|
118
|
+
hour: "numeric",
|
|
119
|
+
hour12: false
|
|
120
|
+
}).resolvedOptions().hourCycle === "h12";
|
|
121
|
+
return $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle;
|
|
122
|
+
}
|
|
123
|
+
function $fb18d541ea1ad717$var$getResolvedHourCycle(locale, options) {
|
|
124
|
+
if (!options.timeStyle && !options.hour) return void 0;
|
|
125
|
+
locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, "");
|
|
126
|
+
locale += (locale.includes("-u-") ? "" : "-u") + "-nu-latn";
|
|
127
|
+
let formatter = $fb18d541ea1ad717$var$getCachedDateFormatter(locale, {
|
|
128
|
+
...options,
|
|
129
|
+
timeZone: void 0
|
|
130
|
+
});
|
|
131
|
+
let min = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 0)).find((p) => p.type === "hour").value, 10);
|
|
132
|
+
let max = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 23)).find((p) => p.type === "hour").value, 10);
|
|
133
|
+
if (min === 0 && max === 23) return "h23";
|
|
134
|
+
if (min === 24 && max === 23) return "h24";
|
|
135
|
+
if (min === 0 && max === 11) return "h11";
|
|
136
|
+
if (min === 12 && max === 11) return "h12";
|
|
137
|
+
throw new Error("Unexpected hour cycle result");
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/providers/locale/use-date-formatter.ts
|
|
141
|
+
function useDateFormatter(props = {}) {
|
|
142
|
+
const env = useLocaleContext();
|
|
143
|
+
const locale = props.locale ?? env.locale;
|
|
144
|
+
return useMemo(() => {
|
|
145
|
+
const { locale: _, ...options } = props;
|
|
146
|
+
return new $fb18d541ea1ad717$export$ad991b66133851cf(locale, options);
|
|
147
|
+
}, [locale, props]);
|
|
148
|
+
}
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region src/providers/locale/use-filter.ts
|
|
151
|
+
function useFilter(props) {
|
|
152
|
+
const env = useLocaleContext();
|
|
153
|
+
const locale = props.locale ?? env.locale;
|
|
154
|
+
return useMemo(() => createFilter({
|
|
155
|
+
...props,
|
|
156
|
+
locale
|
|
157
|
+
}), [locale, props]);
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
export { useLocaleContext as a, LocaleProvider as i, useDateFormatter as n, useCollator as r, useFilter as t };
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
require("./chunk-DIRhrrdE.cjs");
|
|
2
|
+
const require_create_context = require("./create-context-DVfXoZgh.cjs");
|
|
3
|
+
let react = require("react");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let _sprawlify_primitives_i18n_utils = require("@sprawlify/primitives/i18n-utils");
|
|
6
|
+
//#region src/providers/locale/use-locale-context.ts
|
|
7
|
+
const [LocaleContextProvider, useLocaleContext] = require_create_context.createContext({
|
|
8
|
+
name: "LocaleContext",
|
|
9
|
+
hookName: "useLocaleContext",
|
|
10
|
+
providerName: "<LocaleProvider />",
|
|
11
|
+
strict: false,
|
|
12
|
+
defaultValue: {
|
|
13
|
+
dir: "ltr",
|
|
14
|
+
locale: "en-US"
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/providers/locale/locale-provider.tsx
|
|
19
|
+
const LocaleProvider = (props) => {
|
|
20
|
+
const { children, locale } = props;
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LocaleContextProvider, {
|
|
22
|
+
value: {
|
|
23
|
+
locale,
|
|
24
|
+
dir: (0, _sprawlify_primitives_i18n_utils.isRTL)(locale) ? "rtl" : "ltr"
|
|
25
|
+
},
|
|
26
|
+
children
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/providers/locale/use-collator.ts
|
|
31
|
+
function useCollator(props = {}) {
|
|
32
|
+
const env = useLocaleContext();
|
|
33
|
+
const locale = props.locale ?? env.locale;
|
|
34
|
+
return (0, react.useMemo)(() => {
|
|
35
|
+
const { locale: _, ...options } = props;
|
|
36
|
+
return (0, _sprawlify_primitives_i18n_utils.createCollator)(locale, options);
|
|
37
|
+
}, [locale, props]);
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.0/node_modules/@internationalized/date/dist/DateFormatter.mjs
|
|
41
|
+
let $fb18d541ea1ad717$var$formatterCache = /* @__PURE__ */ new Map();
|
|
42
|
+
var $fb18d541ea1ad717$export$ad991b66133851cf = class {
|
|
43
|
+
/** Formats a date as a string according to the locale and format options passed to the constructor. */ format(value) {
|
|
44
|
+
return this.formatter.format(value);
|
|
45
|
+
}
|
|
46
|
+
/** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */ formatToParts(value) {
|
|
47
|
+
return this.formatter.formatToParts(value);
|
|
48
|
+
}
|
|
49
|
+
/** Formats a date range as a string. */ formatRange(start, end) {
|
|
50
|
+
if (typeof this.formatter.formatRange === "function") return this.formatter.formatRange(start, end);
|
|
51
|
+
if (end < start) throw new RangeError("End date must be >= start date");
|
|
52
|
+
return `${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`;
|
|
53
|
+
}
|
|
54
|
+
/** Formats a date range as an array of parts. */ formatRangeToParts(start, end) {
|
|
55
|
+
if (typeof this.formatter.formatRangeToParts === "function") return this.formatter.formatRangeToParts(start, end);
|
|
56
|
+
if (end < start) throw new RangeError("End date must be >= start date");
|
|
57
|
+
let startParts = this.formatter.formatToParts(start);
|
|
58
|
+
let endParts = this.formatter.formatToParts(end);
|
|
59
|
+
return [
|
|
60
|
+
...startParts.map((p) => ({
|
|
61
|
+
...p,
|
|
62
|
+
source: "startRange"
|
|
63
|
+
})),
|
|
64
|
+
{
|
|
65
|
+
type: "literal",
|
|
66
|
+
value: " – ",
|
|
67
|
+
source: "shared"
|
|
68
|
+
},
|
|
69
|
+
...endParts.map((p) => ({
|
|
70
|
+
...p,
|
|
71
|
+
source: "endRange"
|
|
72
|
+
}))
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
/** Returns the resolved formatting options based on the values passed to the constructor. */ resolvedOptions() {
|
|
76
|
+
let resolvedOptions = this.formatter.resolvedOptions();
|
|
77
|
+
if ($fb18d541ea1ad717$var$hasBuggyResolvedHourCycle()) {
|
|
78
|
+
if (!this.resolvedHourCycle) this.resolvedHourCycle = $fb18d541ea1ad717$var$getResolvedHourCycle(resolvedOptions.locale, this.options);
|
|
79
|
+
resolvedOptions.hourCycle = this.resolvedHourCycle;
|
|
80
|
+
resolvedOptions.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12";
|
|
81
|
+
}
|
|
82
|
+
if (resolvedOptions.calendar === "ethiopic-amete-alem") resolvedOptions.calendar = "ethioaa";
|
|
83
|
+
return resolvedOptions;
|
|
84
|
+
}
|
|
85
|
+
constructor(locale, options = {}) {
|
|
86
|
+
this.formatter = $fb18d541ea1ad717$var$getCachedDateFormatter(locale, options);
|
|
87
|
+
this.options = options;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const $fb18d541ea1ad717$var$hour12Preferences = {
|
|
91
|
+
true: { ja: "h11" },
|
|
92
|
+
false: {}
|
|
93
|
+
};
|
|
94
|
+
function $fb18d541ea1ad717$var$getCachedDateFormatter(locale, options = {}) {
|
|
95
|
+
if (typeof options.hour12 === "boolean" && $fb18d541ea1ad717$var$hasBuggyHour12Behavior()) {
|
|
96
|
+
options = { ...options };
|
|
97
|
+
let pref = $fb18d541ea1ad717$var$hour12Preferences[String(options.hour12)][locale.split("-")[0]];
|
|
98
|
+
let defaultHourCycle = options.hour12 ? "h12" : "h23";
|
|
99
|
+
options.hourCycle = pref !== null && pref !== void 0 ? pref : defaultHourCycle;
|
|
100
|
+
delete options.hour12;
|
|
101
|
+
}
|
|
102
|
+
let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
|
|
103
|
+
if ($fb18d541ea1ad717$var$formatterCache.has(cacheKey)) return $fb18d541ea1ad717$var$formatterCache.get(cacheKey);
|
|
104
|
+
let numberFormatter = new Intl.DateTimeFormat(locale, options);
|
|
105
|
+
$fb18d541ea1ad717$var$formatterCache.set(cacheKey, numberFormatter);
|
|
106
|
+
return numberFormatter;
|
|
107
|
+
}
|
|
108
|
+
let $fb18d541ea1ad717$var$_hasBuggyHour12Behavior = null;
|
|
109
|
+
function $fb18d541ea1ad717$var$hasBuggyHour12Behavior() {
|
|
110
|
+
if ($fb18d541ea1ad717$var$_hasBuggyHour12Behavior == null) $fb18d541ea1ad717$var$_hasBuggyHour12Behavior = new Intl.DateTimeFormat("en-US", {
|
|
111
|
+
hour: "numeric",
|
|
112
|
+
hour12: false
|
|
113
|
+
}).format(new Date(2020, 2, 3, 0)) === "24";
|
|
114
|
+
return $fb18d541ea1ad717$var$_hasBuggyHour12Behavior;
|
|
115
|
+
}
|
|
116
|
+
let $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle = null;
|
|
117
|
+
function $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle() {
|
|
118
|
+
if ($fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle == null) $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle = new Intl.DateTimeFormat("fr", {
|
|
119
|
+
hour: "numeric",
|
|
120
|
+
hour12: false
|
|
121
|
+
}).resolvedOptions().hourCycle === "h12";
|
|
122
|
+
return $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle;
|
|
123
|
+
}
|
|
124
|
+
function $fb18d541ea1ad717$var$getResolvedHourCycle(locale, options) {
|
|
125
|
+
if (!options.timeStyle && !options.hour) return void 0;
|
|
126
|
+
locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, "");
|
|
127
|
+
locale += (locale.includes("-u-") ? "" : "-u") + "-nu-latn";
|
|
128
|
+
let formatter = $fb18d541ea1ad717$var$getCachedDateFormatter(locale, {
|
|
129
|
+
...options,
|
|
130
|
+
timeZone: void 0
|
|
131
|
+
});
|
|
132
|
+
let min = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 0)).find((p) => p.type === "hour").value, 10);
|
|
133
|
+
let max = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 23)).find((p) => p.type === "hour").value, 10);
|
|
134
|
+
if (min === 0 && max === 23) return "h23";
|
|
135
|
+
if (min === 24 && max === 23) return "h24";
|
|
136
|
+
if (min === 0 && max === 11) return "h11";
|
|
137
|
+
if (min === 12 && max === 11) return "h12";
|
|
138
|
+
throw new Error("Unexpected hour cycle result");
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/providers/locale/use-date-formatter.ts
|
|
142
|
+
function useDateFormatter(props = {}) {
|
|
143
|
+
const env = useLocaleContext();
|
|
144
|
+
const locale = props.locale ?? env.locale;
|
|
145
|
+
return (0, react.useMemo)(() => {
|
|
146
|
+
const { locale: _, ...options } = props;
|
|
147
|
+
return new $fb18d541ea1ad717$export$ad991b66133851cf(locale, options);
|
|
148
|
+
}, [locale, props]);
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/providers/locale/use-filter.ts
|
|
152
|
+
function useFilter(props) {
|
|
153
|
+
const env = useLocaleContext();
|
|
154
|
+
const locale = props.locale ?? env.locale;
|
|
155
|
+
return (0, react.useMemo)(() => (0, _sprawlify_primitives_i18n_utils.createFilter)({
|
|
156
|
+
...props,
|
|
157
|
+
locale
|
|
158
|
+
}), [locale, props]);
|
|
159
|
+
}
|
|
160
|
+
//#endregion
|
|
161
|
+
Object.defineProperty(exports, "LocaleProvider", {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
get: function() {
|
|
164
|
+
return LocaleProvider;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
Object.defineProperty(exports, "useCollator", {
|
|
168
|
+
enumerable: true,
|
|
169
|
+
get: function() {
|
|
170
|
+
return useCollator;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
Object.defineProperty(exports, "useDateFormatter", {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
get: function() {
|
|
176
|
+
return useDateFormatter;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
Object.defineProperty(exports, "useFilter", {
|
|
180
|
+
enumerable: true,
|
|
181
|
+
get: function() {
|
|
182
|
+
return useFilter;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
Object.defineProperty(exports, "useLocaleContext", {
|
|
186
|
+
enumerable: true,
|
|
187
|
+
get: function() {
|
|
188
|
+
return useLocaleContext;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-DIRhrrdE.cjs");
|
|
2
|
-
const require_core = require("./core-
|
|
2
|
+
const require_core = require("./core-D3VWpaVw.cjs");
|
|
3
3
|
const require_create_context = require("./create-context-DVfXoZgh.cjs");
|
|
4
4
|
const require_compose_refs = require("./compose-refs-CUN-PodG.cjs");
|
|
5
5
|
const require_factory = require("./factory-DNpyR-JO.cjs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as useMachine, r as normalizeProps } from "./core-
|
|
1
|
+
import { i as useMachine, r as normalizeProps } from "./core-Ds_Jbvzw.mjs";
|
|
2
2
|
import { t as createContext$1 } from "./create-context-vbKnbgU_.mjs";
|
|
3
3
|
import { t as composeRefs } from "./compose-refs-C1ZNInvv.mjs";
|
|
4
4
|
import { n as sprawlify } from "./factory-B2jnWWga.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _sprawlify_primitives_anatomy0 from "@sprawlify/primitives/anatomy";
|
|
2
2
|
|
|
3
3
|
//#region src/components/segment-group/segment-group-anatomy.d.ts
|
|
4
|
-
declare const segmentGroupAnatomy: _sprawlify_primitives_anatomy0.Anatomy<"label" | "
|
|
4
|
+
declare const segmentGroupAnatomy: _sprawlify_primitives_anatomy0.Anatomy<"label" | "item" | "root" | "itemText" | "indicator" | "itemControl">;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { segmentGroupAnatomy as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _sprawlify_primitives_anatomy0 from "@sprawlify/primitives/anatomy";
|
|
2
2
|
|
|
3
3
|
//#region src/components/segment-group/segment-group-anatomy.d.ts
|
|
4
|
-
declare const segmentGroupAnatomy: _sprawlify_primitives_anatomy0.Anatomy<"label" | "
|
|
4
|
+
declare const segmentGroupAnatomy: _sprawlify_primitives_anatomy0.Anatomy<"label" | "item" | "root" | "itemText" | "indicator" | "itemControl">;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { segmentGroupAnatomy as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _sprawlify_primitives_anatomy0 from "@sprawlify/primitives/anatomy";
|
|
2
2
|
|
|
3
3
|
//#region src/components/tour/tour-anatomy.d.ts
|
|
4
|
-
declare const tourAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"title" | "content" | "arrow" | "control" | "positioner" | "backdrop" | "
|
|
4
|
+
declare const tourAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"title" | "content" | "arrow" | "control" | "positioner" | "backdrop" | "closeTrigger" | "description" | "progressText" | "arrowTip" | "actionTrigger" | "spotlight">;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { tourAnatomy as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _sprawlify_primitives_anatomy0 from "@sprawlify/primitives/anatomy";
|
|
2
2
|
|
|
3
3
|
//#region src/components/tour/tour-anatomy.d.ts
|
|
4
|
-
declare const tourAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"title" | "content" | "arrow" | "control" | "positioner" | "backdrop" | "
|
|
4
|
+
declare const tourAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"title" | "content" | "arrow" | "control" | "positioner" | "backdrop" | "closeTrigger" | "description" | "progressText" | "arrowTip" | "actionTrigger" | "spotlight">;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { tourAnatomy as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-DIRhrrdE.cjs");
|
|
2
|
-
const require_core = require("./core-
|
|
2
|
+
const require_core = require("./core-D3VWpaVw.cjs");
|
|
3
3
|
const require_create_context = require("./create-context-DVfXoZgh.cjs");
|
|
4
4
|
const require_environment = require("./environment-DkPPGx5U.cjs");
|
|
5
|
-
const require_locale = require("./locale-
|
|
5
|
+
const require_locale = require("./locale-Dc2Fyoa-.cjs");
|
|
6
6
|
const require_factory = require("./factory-DNpyR-JO.cjs");
|
|
7
|
-
const require_collapsible = require("./collapsible-
|
|
7
|
+
const require_collapsible = require("./collapsible-BCma5-fq.cjs");
|
|
8
8
|
const require_create_split_props = require("./create-split-props-CUjqut2D.cjs");
|
|
9
9
|
const require_render_strategy = require("./render-strategy-C63iNoUN.cjs");
|
|
10
10
|
let react = require("react");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-D1SwGrFN.mjs";
|
|
2
|
-
import { i as useMachine, r as normalizeProps, t as mergeProps } from "./core-
|
|
2
|
+
import { i as useMachine, r as normalizeProps, t as mergeProps } from "./core-Ds_Jbvzw.mjs";
|
|
3
3
|
import { t as createContext$1 } from "./create-context-vbKnbgU_.mjs";
|
|
4
4
|
import { n as useEnvironmentContext } from "./environment-B_ip8ub2.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { a as useLocaleContext } from "./locale-BOA439G-.mjs";
|
|
6
6
|
import { n as sprawlify } from "./factory-B2jnWWga.mjs";
|
|
7
|
-
import { c as CollapsibleContent, i as CollapsibleRoot } from "./collapsible-
|
|
7
|
+
import { c as CollapsibleContent, i as CollapsibleRoot } from "./collapsible-DcnLTV0k.mjs";
|
|
8
8
|
import { t as createSplitProps } from "./create-split-props-B38DMyhW.mjs";
|
|
9
9
|
import { n as splitRenderStrategyProps, r as useRenderStrategyPropsContext, t as RenderStrategyPropsProvider } from "./render-strategy-BWa8NoRy.mjs";
|
|
10
10
|
import { forwardRef, useId } from "react";
|