@sprawlify/react 0.0.106 → 0.0.107
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/{anatomy-Amb62UHl.d.cts → anatomy-Bp37tNqs.d.cts} +7 -7
- package/dist/{anatomy-2HH29RZp.d.mts → anatomy-D7ejjpDx.d.mts} +7 -7
- package/dist/{carousel-anatomy-B5070zv-.d.mts → carousel-anatomy-B9cQNolB.d.mts} +1 -1
- package/dist/{carousel-anatomy-BhwtT561.d.cts → carousel-anatomy-DdNhuLfJ.d.cts} +1 -1
- package/dist/{checkbox-anatomy-B3UgGmJ5.d.mts → checkbox-anatomy-8Vf0VCHG.d.cts} +1 -1
- package/dist/{checkbox-anatomy-BuDM7LQO.d.cts → checkbox-anatomy-_OLisOer.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--NJVbmTS.d.cts} +1 -1
- package/dist/{color-picker-anatomy-mrK3UpZ6.d.mts → color-picker-anatomy-D4WKuLMN.d.mts} +1 -1
- package/dist/{combobox-anatomy-AAXd35pQ.d.mts → combobox-anatomy-8FahQpQ3.d.cts} +1 -1
- package/dist/{combobox-anatomy-C9NZvjEy.d.cts → combobox-anatomy-BlQq-b8P.d.mts} +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.mjs +3 -3
- package/dist/components/anatomy.d.cts +8 -8
- package/dist/components/anatomy.d.mts +8 -8
- 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.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.d.cts +1 -1
- package/dist/components/checkbox/index.d.mts +1 -1
- 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 +1 -1
- package/dist/components/color-picker/index.d.mts +1 -1
- package/dist/components/color-picker/index.mjs +4 -4
- package/dist/components/combobox/index.cjs +4 -4
- package/dist/components/combobox/index.d.cts +1 -1
- package/dist/components/combobox/index.d.mts +1 -1
- package/dist/components/combobox/index.mjs +5 -5
- package/dist/components/date-picker/index.cjs +3 -3
- package/dist/components/date-picker/index.d.cts +1 -1
- package/dist/components/date-picker/index.d.mts +1 -1
- package/dist/components/date-picker/index.mjs +3 -3
- package/dist/components/dialog/index.cjs +3 -3
- 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 +1 -1
- package/dist/components/dropdown-menu/index.d.mts +1 -1
- 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.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.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 +5 -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.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.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.mjs +2 -2
- package/dist/components/select/index.cjs +4 -4
- 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.mjs +3 -3
- package/dist/components/tour/index.cjs +3 -3
- package/dist/components/tour/index.d.cts +1 -1
- package/dist/components/tour/index.d.mts +1 -1
- 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-CR-zf9Uu.d.cts +6 -0
- package/dist/date-picker-anatomy-dyI6XVYb.d.mts +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-CRJn4i7D.d.mts} +35 -10
- package/dist/{index-CpTZ6IsQ.d.cts → index-ys7B7svO.d.cts} +35 -10
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +10 -10
- package/dist/index.d.mts +10 -10
- package/dist/index.mjs +3 -3
- package/dist/{listbox-anatomy-BfgzfKkb.d.mts → listbox-anatomy-DHCNIr_E.d.cts} +1 -1
- package/dist/{listbox-anatomy-Bhg-JGGG.d.cts → listbox-anatomy-DhG9XXxL.d.mts} +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/{tour-anatomy-Bva1mq21.d.cts → tour-anatomy-W3ivVKHh.d.mts} +1 -1
- package/dist/{tour-anatomy-CZ-rbzgx.d.mts → tour-anatomy-Yp290aAw.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
|
@@ -82,7 +82,7 @@ const useTrack = (deps, effect) => {
|
|
|
82
82
|
useEffect(() => {
|
|
83
83
|
if (render.current && called.current) return effect();
|
|
84
84
|
called.current = true;
|
|
85
|
-
},
|
|
85
|
+
}, (deps ?? []).map((d) => typeof d === "function" ? d() : d));
|
|
86
86
|
useEffect(() => {
|
|
87
87
|
render.current = true;
|
|
88
88
|
return () => {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as _sprawlify_primitives_anatomy0 from "@sprawlify/primitives/anatomy";
|
|
2
|
+
|
|
3
|
+
//#region src/components/date-picker/date-picker-anatomy.d.ts
|
|
4
|
+
declare const datePickerAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"content" | "input" | "label" | "table" | "view" | "root" | "trigger" | "clearTrigger" | "control" | "positioner" | "nextTrigger" | "prevTrigger" | "monthSelect" | "presetTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect" | "valueText">;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { datePickerAnatomy as t };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as _sprawlify_primitives_anatomy0 from "@sprawlify/primitives/anatomy";
|
|
2
|
+
|
|
3
|
+
//#region src/components/date-picker/date-picker-anatomy.d.ts
|
|
4
|
+
declare const datePickerAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"content" | "input" | "label" | "table" | "view" | "root" | "trigger" | "clearTrigger" | "control" | "positioner" | "nextTrigger" | "prevTrigger" | "monthSelect" | "presetTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect" | "valueText">;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { datePickerAnatomy as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-D1SwGrFN.mjs";
|
|
2
|
-
import { t as mergeProps$1 } from "./core-
|
|
2
|
+
import { t as mergeProps$1 } 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
5
|
import { t as composeRefs } from "./compose-refs-C1ZNInvv.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-D1SwGrFN.mjs";
|
|
2
|
-
import { t as mergeProps } from "./core-
|
|
2
|
+
import { t as mergeProps } from "./core-Ds_Jbvzw.mjs";
|
|
3
3
|
import { n as useEnvironmentContext } from "./environment-B_ip8ub2.mjs";
|
|
4
4
|
import { t as composeRefs } from "./compose-refs-C1ZNInvv.mjs";
|
|
5
5
|
import { n as sprawlify } from "./factory-B2jnWWga.mjs";
|
|
@@ -4,16 +4,16 @@ import { a as sprawlify, i as jsxFactory, n as HTMLSprawlifyProps, r as Polymorp
|
|
|
4
4
|
import { t as accordionAnatomy } from "./accordion-anatomy-CoLc1OWo.mjs";
|
|
5
5
|
import { t as alertDialogAnatomy } from "./alert-dialog-anatomy-Jf75lz9b.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-D7ejjpDx.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-
|
|
11
|
-
import { t as checkboxAnatomy } from "./checkbox-anatomy-
|
|
10
|
+
import { t as carouselAnatomy } from "./carousel-anatomy-B9cQNolB.mjs";
|
|
11
|
+
import { t as checkboxAnatomy } from "./checkbox-anatomy-_OLisOer.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-D4WKuLMN.mjs";
|
|
15
|
+
import { t as comboboxAnatomy } from "./combobox-anatomy-BlQq-b8P.mjs";
|
|
16
|
+
import { t as datePickerAnatomy } from "./date-picker-anatomy-dyI6XVYb.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-DhG9XXxL.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";
|
|
@@ -50,7 +50,7 @@ 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-W3ivVKHh.mjs";
|
|
54
54
|
import { t as treeViewAnatomy } from "./tree-view-anatomy-BUL7Xz9s.mjs";
|
|
55
55
|
import { PropsWithChildren, ReactNode } from "react";
|
|
56
56
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -95,6 +95,31 @@ interface UseCollatorProps extends Intl.CollatorOptions {
|
|
|
95
95
|
}
|
|
96
96
|
declare function useCollator(props?: UseCollatorProps): Intl.Collator;
|
|
97
97
|
//#endregion
|
|
98
|
+
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.0/node_modules/@internationalized/date/dist/types.d.ts
|
|
99
|
+
interface DateRangeFormatPart extends Intl.DateTimeFormatPart {
|
|
100
|
+
source: 'startRange' | 'endRange' | 'shared';
|
|
101
|
+
}
|
|
102
|
+
/** A wrapper around Intl.DateTimeFormat that fixes various browser bugs, and polyfills new features. */
|
|
103
|
+
declare class DateFormatter implements Intl.DateTimeFormat {
|
|
104
|
+
constructor(locale: string, options?: Intl.DateTimeFormatOptions);
|
|
105
|
+
/** Formats a date as a string according to the locale and format options passed to the constructor. */
|
|
106
|
+
format(value: Date): string;
|
|
107
|
+
/** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */
|
|
108
|
+
formatToParts(value: Date): Intl.DateTimeFormatPart[];
|
|
109
|
+
/** Formats a date range as a string. */
|
|
110
|
+
formatRange(start: Date, end: Date): string;
|
|
111
|
+
/** Formats a date range as an array of parts. */
|
|
112
|
+
formatRangeToParts(start: Date, end: Date): DateRangeFormatPart[];
|
|
113
|
+
/** Returns the resolved formatting options based on the values passed to the constructor. */
|
|
114
|
+
resolvedOptions(): Intl.ResolvedDateTimeFormatOptions;
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/providers/locale/use-date-formatter.d.ts
|
|
118
|
+
interface UseDateFormatterProps extends Intl.DateTimeFormatOptions {
|
|
119
|
+
locale?: string;
|
|
120
|
+
}
|
|
121
|
+
declare function useDateFormatter(props?: UseDateFormatterProps): DateFormatter;
|
|
122
|
+
//#endregion
|
|
98
123
|
//#region src/providers/locale/use-filter.d.ts
|
|
99
124
|
interface UseFilterProps extends FilterOptions {}
|
|
100
125
|
declare function useFilter(props: UseFilterProps): UseFilterReturn;
|
|
@@ -103,7 +128,7 @@ interface UseFilterReturn extends FilterReturn {}
|
|
|
103
128
|
//#region src/providers/locale/use-locale-context.d.ts
|
|
104
129
|
interface UseLocaleContext extends Locale {}
|
|
105
130
|
declare namespace index_d_exports {
|
|
106
|
-
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$1 as 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 };
|
|
131
|
+
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$1 as 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 };
|
|
107
132
|
}
|
|
108
133
|
//#endregion
|
|
109
|
-
export { useFilter as a,
|
|
134
|
+
export { createContext$1 as _, useFilter as a, UseCollatorProps as c, LocaleProviderProps as d, EnvironmentProvider as f, useEnvironmentContext as g, UseEnvironmentContext as h, UseFilterReturn as i, useCollator as l, RootNode as m, useLocaleContext as n, UseDateFormatterProps as o, EnvironmentProviderProps as p, UseFilterProps as r, useDateFormatter as s, UseLocaleContext as t, LocaleProvider as u };
|
|
@@ -4,16 +4,16 @@ import { a as sprawlify, i as jsxFactory, n as HTMLSprawlifyProps, r as Polymorp
|
|
|
4
4
|
import { t as accordionAnatomy } from "./accordion-anatomy-BVqvSykU.cjs";
|
|
5
5
|
import { t as alertDialogAnatomy } from "./alert-dialog-anatomy-TKcT7l5b.cjs";
|
|
6
6
|
import { t as angleSliderAnatomy } from "./angle-slider-anatomy-0LPiV3HA.cjs";
|
|
7
|
-
import { n as aspectRatioAnatomy, t as dropdownMenuAnatomy } from "./anatomy-
|
|
7
|
+
import { n as aspectRatioAnatomy, t as dropdownMenuAnatomy } from "./anatomy-Bp37tNqs.cjs";
|
|
8
8
|
import { t as avatarAnatomy } from "./avatar-anatomy-Ddj0XKJn.cjs";
|
|
9
9
|
import { t as bottomSheetAnatomy } from "./bottom-sheet-anatomy-BbFaDCy-.cjs";
|
|
10
|
-
import { t as carouselAnatomy } from "./carousel-anatomy-
|
|
11
|
-
import { t as checkboxAnatomy } from "./checkbox-anatomy-
|
|
10
|
+
import { t as carouselAnatomy } from "./carousel-anatomy-DdNhuLfJ.cjs";
|
|
11
|
+
import { t as checkboxAnatomy } from "./checkbox-anatomy-8Vf0VCHG.cjs";
|
|
12
12
|
import { t as clipboardAnatomy } from "./clipboard-anatomy-Dz5Oirf8.cjs";
|
|
13
13
|
import { t as collapsibleAnatomy } from "./collapsible-anatomy-ZydXE9_Q.cjs";
|
|
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--NJVbmTS.cjs";
|
|
15
|
+
import { t as comboboxAnatomy } from "./combobox-anatomy-8FahQpQ3.cjs";
|
|
16
|
+
import { t as datePickerAnatomy } from "./date-picker-anatomy-CR-zf9Uu.cjs";
|
|
17
17
|
import { t as dialogAnatomy } from "./dialog-anatomy-DA3VpU4s.cjs";
|
|
18
18
|
import { t as editableAnatomy } from "./editable-anatomy-DTOd_jwJ.cjs";
|
|
19
19
|
import { t as fieldAnatomy } from "./field-anatomy-CH5cGfid.cjs";
|
|
@@ -22,7 +22,7 @@ import { t as fileUploadAnatomy } from "./file-upload-anatomy-BYHBw5Ha.cjs";
|
|
|
22
22
|
import { t as floatingPanelAnatomy } from "./floating-panel-anatomy-DEjVO2zn.cjs";
|
|
23
23
|
import { t as hoverCardAnatomy } from "./hover-card-anatomy-DLdlKr1w.cjs";
|
|
24
24
|
import { t as imageCropperAnatomy } from "./image-cropper-anatomy-C7W1zhxf.cjs";
|
|
25
|
-
import { t as listboxAnatomy } from "./listbox-anatomy-
|
|
25
|
+
import { t as listboxAnatomy } from "./listbox-anatomy-DHCNIr_E.cjs";
|
|
26
26
|
import { t as marqueeAnatomy } from "./marquee-anatomy-DPzEZk16.cjs";
|
|
27
27
|
import { t as navigationMenuAnatomy } from "./navigation-menu-anatomy-CX9x8mCS.cjs";
|
|
28
28
|
import { t as numberInputAnatomy } from "./number-input-anatomy-R10r0iHv.cjs";
|
|
@@ -50,7 +50,7 @@ import { t as toastAnatomy } from "./toast-anatomy-BCUO5er0.cjs";
|
|
|
50
50
|
import { t as toggleAnatomy } from "./toggle-anatomy-D7EJTXBH.cjs";
|
|
51
51
|
import { t as toggleGroupAnatomy } from "./toggle-group-anatomy-7xvQhJxG.cjs";
|
|
52
52
|
import { t as tooltipAnatomy } from "./tooltip-anatomy-DQRlLh-B.cjs";
|
|
53
|
-
import { t as tourAnatomy } from "./tour-anatomy-
|
|
53
|
+
import { t as tourAnatomy } from "./tour-anatomy-Yp290aAw.cjs";
|
|
54
54
|
import { t as treeViewAnatomy } from "./tree-view-anatomy-DdWK3r9W.cjs";
|
|
55
55
|
import { JSX, PropsWithChildren, ReactNode, RefObject } from "react";
|
|
56
56
|
import { Machine, MachineSchema, Service } from "@sprawlify/primitives/core";
|
|
@@ -107,6 +107,31 @@ interface UseCollatorProps extends Intl.CollatorOptions {
|
|
|
107
107
|
}
|
|
108
108
|
declare function useCollator(props?: UseCollatorProps): Intl.Collator;
|
|
109
109
|
//#endregion
|
|
110
|
+
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.0/node_modules/@internationalized/date/dist/types.d.ts
|
|
111
|
+
interface DateRangeFormatPart extends Intl.DateTimeFormatPart {
|
|
112
|
+
source: 'startRange' | 'endRange' | 'shared';
|
|
113
|
+
}
|
|
114
|
+
/** A wrapper around Intl.DateTimeFormat that fixes various browser bugs, and polyfills new features. */
|
|
115
|
+
declare class DateFormatter implements Intl.DateTimeFormat {
|
|
116
|
+
constructor(locale: string, options?: Intl.DateTimeFormatOptions);
|
|
117
|
+
/** Formats a date as a string according to the locale and format options passed to the constructor. */
|
|
118
|
+
format(value: Date): string;
|
|
119
|
+
/** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */
|
|
120
|
+
formatToParts(value: Date): Intl.DateTimeFormatPart[];
|
|
121
|
+
/** Formats a date range as a string. */
|
|
122
|
+
formatRange(start: Date, end: Date): string;
|
|
123
|
+
/** Formats a date range as an array of parts. */
|
|
124
|
+
formatRangeToParts(start: Date, end: Date): DateRangeFormatPart[];
|
|
125
|
+
/** Returns the resolved formatting options based on the values passed to the constructor. */
|
|
126
|
+
resolvedOptions(): Intl.ResolvedDateTimeFormatOptions;
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/providers/locale/use-date-formatter.d.ts
|
|
130
|
+
interface UseDateFormatterProps extends Intl.DateTimeFormatOptions {
|
|
131
|
+
locale?: string;
|
|
132
|
+
}
|
|
133
|
+
declare function useDateFormatter(props?: UseDateFormatterProps): DateFormatter;
|
|
134
|
+
//#endregion
|
|
110
135
|
//#region src/providers/locale/use-filter.d.ts
|
|
111
136
|
interface UseFilterProps extends FilterOptions {}
|
|
112
137
|
declare function useFilter(props: UseFilterProps): UseFilterReturn;
|
|
@@ -115,7 +140,7 @@ interface UseFilterReturn extends FilterReturn {}
|
|
|
115
140
|
//#region src/providers/locale/use-locale-context.d.ts
|
|
116
141
|
interface UseLocaleContext extends Locale {}
|
|
117
142
|
declare namespace index_d_exports {
|
|
118
|
-
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 };
|
|
143
|
+
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 };
|
|
119
144
|
}
|
|
120
145
|
//#endregion
|
|
121
|
-
export {
|
|
146
|
+
export { createContext as _, useFilter as a, useMachine as b, UseCollatorProps as c, LocaleProviderProps as d, EnvironmentProvider as f, useEnvironmentContext as g, UseEnvironmentContext as h, UseFilterReturn as i, useCollator as l, RootNode as m, useLocaleContext as n, UseDateFormatterProps as o, EnvironmentProviderProps as p, UseFilterProps as r, useDateFormatter as s, UseLocaleContext as t, LocaleProvider as u, Portal as v, PortalProps as y };
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./chunk-DIRhrrdE.cjs");
|
|
3
|
-
const require_core = require("./core-
|
|
3
|
+
const require_core = require("./core-D3VWpaVw.cjs");
|
|
4
4
|
const require_create_context = require("./create-context-DVfXoZgh.cjs");
|
|
5
5
|
const require_environment = require("./environment-DkPPGx5U.cjs");
|
|
6
|
-
const require_locale = require("./locale-
|
|
6
|
+
const require_locale = require("./locale-Dc2Fyoa-.cjs");
|
|
7
7
|
require("./providers-jI8f-g2w.cjs");
|
|
8
8
|
const require_factory = require("./factory-DNpyR-JO.cjs");
|
|
9
9
|
require("./accordion-anatomy-Bs2Sqlk7.cjs");
|
|
@@ -360,6 +360,7 @@ Object.defineProperty(exports, "treeViewAnatomy", {
|
|
|
360
360
|
}
|
|
361
361
|
});
|
|
362
362
|
exports.useCollator = require_locale.useCollator;
|
|
363
|
+
exports.useDateFormatter = require_locale.useDateFormatter;
|
|
363
364
|
exports.useEnvironmentContext = require_environment.useEnvironmentContext;
|
|
364
365
|
exports.useFilter = require_locale.useFilter;
|
|
365
366
|
exports.useLocaleContext = require_locale.useLocaleContext;
|
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-ys7B7svO.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
6
|
import { t as alertDialogAnatomy } from "./alert-dialog-anatomy-TKcT7l5b.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-Bp37tNqs.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-
|
|
12
|
-
import { t as checkboxAnatomy } from "./checkbox-anatomy-
|
|
11
|
+
import { t as carouselAnatomy } from "./carousel-anatomy-DdNhuLfJ.cjs";
|
|
12
|
+
import { t as checkboxAnatomy } from "./checkbox-anatomy-8Vf0VCHG.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--NJVbmTS.cjs";
|
|
16
|
+
import { t as comboboxAnatomy } from "./combobox-anatomy-8FahQpQ3.cjs";
|
|
17
|
+
import { t as datePickerAnatomy } from "./date-picker-anatomy-CR-zf9Uu.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-DHCNIr_E.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";
|
|
@@ -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-Yp290aAw.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
|
@@ -4,16 +4,16 @@ import { a as sprawlify, i as jsxFactory, n as HTMLSprawlifyProps, r as Polymorp
|
|
|
4
4
|
import { t as accordionAnatomy } from "./accordion-anatomy-CoLc1OWo.mjs";
|
|
5
5
|
import { t as alertDialogAnatomy } from "./alert-dialog-anatomy-Jf75lz9b.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-D7ejjpDx.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-
|
|
11
|
-
import { t as checkboxAnatomy } from "./checkbox-anatomy-
|
|
10
|
+
import { t as carouselAnatomy } from "./carousel-anatomy-B9cQNolB.mjs";
|
|
11
|
+
import { t as checkboxAnatomy } from "./checkbox-anatomy-_OLisOer.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-D4WKuLMN.mjs";
|
|
15
|
+
import { t as comboboxAnatomy } from "./combobox-anatomy-BlQq-b8P.mjs";
|
|
16
|
+
import { t as datePickerAnatomy } from "./date-picker-anatomy-dyI6XVYb.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-DhG9XXxL.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";
|
|
@@ -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-W3ivVKHh.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-CRJn4i7D.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<"
|
|
4
|
+
declare const listboxAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"content" | "input" | "label" | "root" | "valueText" | "item" | "itemGroup" | "itemGroupLabel" | "itemIndicator" | "itemText" | "empty">;
|
|
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<"
|
|
4
|
+
declare const listboxAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"content" | "input" | "label" | "root" | "valueText" | "item" | "itemGroup" | "itemGroupLabel" | "itemIndicator" | "itemText" | "empty">;
|
|
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 };
|