@sprawlify/react 0.0.7 → 0.0.9
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/chunk-BYnRvbsk.cjs +53 -0
- package/dist/{collapsible-D5kle6Bc.cjs → collapsible-aFKYmVbP.cjs} +10 -9
- package/dist/{collapsible-B06GGGE7.mjs → collapsible-vqmKK3px.mjs} +7 -7
- package/dist/{collection-DEsp9z6X.mjs → collection-BYYMj_V8.mjs} +2 -2
- package/dist/{collection-BKabYqpE.cjs → collection-DGEUORi5.cjs} +4 -3
- package/dist/components/accordion/index.cjs +13 -11
- package/dist/components/accordion/index.d.cts +11 -11
- package/dist/components/accordion/index.d.mts +11 -11
- package/dist/components/accordion/index.mjs +10 -9
- package/dist/components/angle-slider/index.cjs +11 -9
- package/dist/components/angle-slider/index.d.cts +13 -13
- package/dist/components/angle-slider/index.d.mts +13 -13
- package/dist/components/angle-slider/index.mjs +8 -7
- package/dist/components/avatar/index.cjs +11 -9
- package/dist/components/avatar/index.d.cts +8 -8
- package/dist/components/avatar/index.d.mts +8 -8
- package/dist/components/avatar/index.mjs +8 -7
- package/dist/components/bottom-sheet/index.cjs +17 -14
- package/dist/components/bottom-sheet/index.d.cts +15 -15
- package/dist/components/bottom-sheet/index.d.mts +13 -13
- package/dist/components/bottom-sheet/index.mjs +12 -10
- package/dist/components/carousel/index.cjs +11 -9
- package/dist/components/carousel/index.d.cts +18 -18
- package/dist/components/carousel/index.d.mts +18 -18
- package/dist/components/carousel/index.mjs +8 -7
- package/dist/components/checkbox/index.cjs +17 -14
- package/dist/components/checkbox/index.d.cts +14 -14
- package/dist/components/checkbox/index.d.mts +14 -14
- package/dist/components/checkbox/index.mjs +13 -11
- package/dist/components/client-only/index.cjs +1 -1
- package/dist/components/clipboard/index.cjs +8 -7
- package/dist/components/clipboard/index.d.cts +12 -12
- package/dist/components/clipboard/index.d.mts +12 -12
- package/dist/components/clipboard/index.mjs +6 -6
- package/dist/components/collapsible/index.cjs +8 -6
- package/dist/components/collapsible/index.d.cts +10 -10
- package/dist/components/collapsible/index.d.mts +10 -10
- package/dist/components/collapsible/index.mjs +7 -6
- package/dist/components/collection/index.cjs +3 -3
- package/dist/components/collection/index.d.cts +1 -1
- package/dist/components/collection/index.d.mts +1 -1
- package/dist/components/collection/index.mjs +3 -3
- package/dist/components/color-picker/index.cjs +19 -15
- package/dist/components/color-picker/index.d.cts +35 -35
- package/dist/components/color-picker/index.d.mts +36 -36
- package/dist/components/color-picker/index.mjs +14 -11
- package/dist/components/combobox/index.cjs +19 -15
- package/dist/components/combobox/index.d.cts +22 -22
- package/dist/components/combobox/index.d.mts +23 -23
- package/dist/components/combobox/index.mjs +15 -12
- package/dist/components/date-picker/index.cjs +567 -0
- package/dist/components/date-picker/index.d.cts +164 -0
- package/dist/components/date-picker/index.d.mts +165 -0
- package/dist/components/date-picker/index.mjs +526 -0
- package/dist/components/dialog/index.cjs +211 -0
- package/dist/components/dialog/index.d.cts +80 -0
- package/dist/components/dialog/index.d.mts +81 -0
- package/dist/components/dialog/index.mjs +187 -0
- package/dist/components/download-trigger/index.cjs +43 -0
- package/dist/components/download-trigger/index.d.cts +16 -0
- package/dist/components/download-trigger/index.d.mts +16 -0
- package/dist/components/download-trigger/index.mjs +42 -0
- package/dist/components/editable/index.cjs +246 -0
- package/dist/components/editable/index.d.cts +79 -0
- package/dist/components/editable/index.d.mts +79 -0
- package/dist/components/editable/index.mjs +221 -0
- package/dist/components/field/index.cjs +9 -7
- package/dist/components/field/index.d.cts +12 -12
- package/dist/components/field/index.d.mts +14 -14
- package/dist/components/field/index.mjs +9 -7
- package/dist/components/fieldset/index.cjs +10 -8
- package/dist/components/fieldset/index.d.cts +10 -10
- package/dist/components/fieldset/index.d.mts +10 -10
- package/dist/components/fieldset/index.mjs +9 -7
- package/dist/components/file-upload/index.cjs +351 -0
- package/dist/components/file-upload/index.d.cts +102 -0
- package/dist/components/file-upload/index.d.mts +102 -0
- package/dist/components/file-upload/index.mjs +322 -0
- package/dist/components/floating-panel/index.cjs +287 -0
- package/dist/components/floating-panel/index.d.cts +100 -0
- package/dist/components/floating-panel/index.d.mts +101 -0
- package/dist/components/floating-panel/index.mjs +259 -0
- package/dist/components/focus-trap/index.cjs +36 -0
- package/dist/components/focus-trap/index.d.cts +14 -0
- package/dist/components/focus-trap/index.d.mts +14 -0
- package/dist/components/focus-trap/index.mjs +35 -0
- package/dist/components/format/index.cjs +57 -0
- package/dist/components/format/index.d.cts +36 -0
- package/dist/components/format/index.d.mts +36 -0
- package/dist/components/format/index.mjs +49 -0
- package/dist/components/frame/index.cjs +90 -0
- package/dist/components/frame/index.d.cts +13 -0
- package/dist/components/frame/index.d.mts +13 -0
- package/dist/components/frame/index.mjs +89 -0
- package/dist/components/highlight/index.cjs +2 -2
- package/dist/components/highlight/index.d.cts +3 -3
- package/dist/components/highlight/index.d.mts +3 -3
- package/dist/components/highlight/index.mjs +1 -1
- package/dist/components/hover-card/index.cjs +165 -0
- package/dist/components/hover-card/index.d.cts +70 -0
- package/dist/components/hover-card/index.d.mts +71 -0
- package/dist/components/hover-card/index.mjs +143 -0
- package/dist/components/image-cropper/index.cjs +197 -0
- package/dist/components/image-cropper/index.d.cts +64 -0
- package/dist/components/image-cropper/index.d.mts +64 -0
- package/dist/components/image-cropper/index.mjs +175 -0
- package/dist/components/json-tree-view/index.cjs +246 -0
- package/dist/components/json-tree-view/index.d.cts +43 -0
- package/dist/components/json-tree-view/index.d.mts +48 -0
- package/dist/components/json-tree-view/index.mjs +237 -0
- package/dist/components/listbox/index.cjs +314 -0
- package/dist/components/listbox/index.d.cts +110 -0
- package/dist/components/listbox/index.d.mts +110 -0
- package/dist/components/listbox/index.mjs +289 -0
- package/dist/components/marquee/index.cjs +176 -0
- package/dist/components/marquee/index.d.cts +61 -0
- package/dist/components/marquee/index.d.mts +61 -0
- package/dist/components/marquee/index.mjs +155 -0
- package/dist/components/menu/index.cjs +548 -0
- package/dist/components/menu/index.d.cts +159 -0
- package/dist/components/menu/index.d.mts +162 -0
- package/dist/components/menu/index.mjs +512 -0
- package/dist/components/navigation-menu/index.cjs +339 -0
- package/dist/components/navigation-menu/index.d.cts +90 -0
- package/dist/components/navigation-menu/index.d.mts +90 -0
- package/dist/components/navigation-menu/index.mjs +312 -0
- package/dist/components/number-input/index.cjs +237 -0
- package/dist/components/number-input/index.d.cts +74 -0
- package/dist/components/number-input/index.d.mts +74 -0
- package/dist/components/number-input/index.mjs +213 -0
- package/dist/components/pagination/index.cjs +197 -0
- package/dist/components/pagination/index.d.cts +69 -0
- package/dist/components/pagination/index.d.mts +69 -0
- package/dist/components/pagination/index.mjs +174 -0
- package/dist/components/password-input/index.cjs +193 -0
- package/dist/components/password-input/index.d.cts +66 -0
- package/dist/components/password-input/index.d.mts +66 -0
- package/dist/components/password-input/index.mjs +171 -0
- package/dist/components/pin-input/index.cjs +192 -0
- package/dist/components/pin-input/index.d.cts +59 -0
- package/dist/components/pin-input/index.d.mts +59 -0
- package/dist/components/pin-input/index.mjs +171 -0
- package/dist/components/popover/index.cjs +237 -0
- package/dist/components/popover/index.d.cts +95 -0
- package/dist/components/popover/index.d.mts +96 -0
- package/dist/components/popover/index.mjs +210 -0
- package/dist/components/portal/index.cjs +6 -31
- package/dist/components/portal/index.d.cts +2 -2
- package/dist/components/portal/index.d.mts +2 -2
- package/dist/components/portal/index.mjs +5 -29
- package/dist/components/presence/index.cjs +5 -5
- package/dist/components/presence/index.d.cts +1 -1
- package/dist/components/presence/index.d.mts +3 -3
- package/dist/components/presence/index.mjs +5 -5
- package/dist/components/select/index.cjs +19 -15
- package/dist/components/select/index.d.cts +21 -21
- package/dist/components/select/index.d.mts +22 -22
- package/dist/components/select/index.mjs +15 -12
- package/dist/components/tree-view/index.cjs +51 -0
- package/dist/components/tree-view/index.d.cts +3 -0
- package/dist/components/tree-view/index.d.mts +6 -0
- package/dist/components/tree-view/index.mjs +13 -0
- package/dist/compose-refs-C5QNDywq.cjs +22 -0
- package/dist/compose-refs-Cl5LpASY.mjs +16 -0
- package/dist/{core-CPLjF6nm.cjs → core-DCWyxy9D.cjs} +2 -53
- package/dist/{create-context-D6DyFRSf.cjs → create-context-CQ4U0lLj.cjs} +1 -1
- package/dist/{environment-BXkWNF2O.mjs → environment-Cc02I6aF.mjs} +1 -1
- package/dist/{environment-DLPiALpf.cjs → environment-CvilmfQt.cjs} +2 -2
- package/dist/{factory-DQlmCPH2.mjs → factory-7ydMApfi.mjs} +2 -16
- package/dist/{factory-CDX-oCN5.cjs → factory-C166evrS.cjs} +3 -23
- package/dist/{field-CGCTFCx2.mjs → field-BXY6su53.mjs} +9 -7
- package/dist/{field-CXhpW6zO.cjs → field-C-57Gj2E.cjs} +12 -10
- package/dist/{fieldset-CuSSYZxV.cjs → fieldset-B-MkM2Ms.cjs} +15 -13
- package/dist/{fieldset-poJ8RDvB.mjs → fieldset-BeHm9oxe.mjs} +8 -6
- package/dist/{index-DtdZfcpz.d.mts → index-BLd57Y0z.d.mts} +3 -3
- package/dist/index-BcXWsxRa.d.mts +40 -0
- package/dist/{index-BUN9wyVM.d.mts → index-Bkxp7VrU.d.mts} +7 -7
- package/dist/index-Cquz7y70.d.cts +52 -0
- package/dist/index-DTzLUoop.d.cts +150 -0
- package/dist/{index-DqRXPiW_.d.cts → index-aYGfRRLA.d.cts} +7 -7
- package/dist/index-wlpTZGhs.d.mts +150 -0
- package/dist/index.cjs +12 -10
- package/dist/index.d.cts +6 -56
- package/dist/index.d.mts +6 -44
- package/dist/index.mjs +7 -6
- package/dist/{providers-Bk3ALTxZ.cjs → locale-BcnWD1Hf.cjs} +2 -2
- package/dist/{providers-CyTYcOU1.mjs → locale-D4LX0eEq.mjs} +1 -1
- package/dist/{normalize-props-sqcs77GC.d.cts → normalize-props-Dw0EepzR.d.cts} +3 -3
- package/dist/portal-BOhFScBS.mjs +29 -0
- package/dist/portal-DRyJqgA1.cjs +35 -0
- package/dist/{presence-2A4loEJY.mjs → presence-C9BcvdTf.mjs} +6 -5
- package/dist/{presence-BX1tNsGA.cjs → presence-CPov8wyU.cjs} +9 -7
- package/dist/providers-BNAArubQ.cjs +0 -0
- package/dist/providers-CoJceYkV.mjs +1 -0
- package/dist/{render-strategy-D3w8btTD.mjs → render-strategy-BgIBKraZ.mjs} +2 -2
- package/dist/{render-strategy-k1JmEGnq.cjs → render-strategy-BywM_IvB.cjs} +2 -2
- package/dist/tree-view-CzJvwlYQ.mjs +365 -0
- package/dist/tree-view-DsOPEocd.cjs +509 -0
- package/dist/{types-FLvjyw__.d.mts → types-CrwpJrFp.d.mts} +2 -1
- package/dist/{types-DYWV3uAj.d.cts → types-DcUAwTQC.d.cts} +2 -1
- package/dist/{use-event-CGMgV6xB.cjs → use-event-CLH8zHoJ.cjs} +1 -1
- package/dist/use-fieldset-context-6GRSrrlt.mjs +12 -0
- package/dist/{use-safe-layout-effect-vuYaDIpT.cjs → use-fieldset-context-CCQLmNLL.cjs} +1 -13
- package/dist/use-safe-layout-effect-C2GgvNT3.cjs +13 -0
- package/dist/use-safe-layout-effect-DPn_9-dD.mjs +7 -0
- package/dist/utils/index.cjs +3 -3
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +222 -2
- package/dist/use-safe-layout-effect-BlOhFUAp.mjs +0 -17
- /package/dist/{chunk-DLP0tNsH.mjs → chunk-BU8PiJgx.mjs} +0 -0
- /package/dist/{core-C0F-4KYH.mjs → core-79NSyZp-.mjs} +0 -0
- /package/dist/{create-context-CdjrBhu7.mjs → create-context-DbhrVE2B.mjs} +0 -0
- /package/dist/{create-split-props-BJQdOyld.mjs → create-split-props-BJdRM9I_.mjs} +0 -0
- /package/dist/{create-split-props-CSkzaUOy.cjs → create-split-props-Dp4TWOyM.cjs} +0 -0
- /package/dist/{factory-BbbIuDqa.d.mts → factory-DaVlp4Ba.d.mts} +0 -0
- /package/dist/{factory-DaNWFLLN.d.cts → factory-fcFI3pbG.d.cts} +0 -0
- /package/dist/{index-BwTxN5vG.d.mts → index-BoLg0FWF.d.mts} +0 -0
- /package/dist/{index-DsZldSch.d.cts → index-CReeoTjv.d.cts} +0 -0
- /package/dist/{index-Dhthtdz_.d.mts → index-DPoOdvOg.d.mts} +0 -0
- /package/dist/{index-zOmANnUL.d.cts → index-r8rv70-L.d.cts} +0 -0
- /package/dist/{render-strategy-GetMScNK.d.mts → render-strategy-CRwPcG33.d.mts} +0 -0
- /package/dist/{render-strategy-CdpAg9jb.d.cts → render-strategy-M8NkD01w.d.cts} +0 -0
- /package/dist/{use-event-BcyNH29h.mjs → use-event-B4e6iJDK.mjs} +0 -0
- /package/dist/{utils-DflO0-3U.mjs → utils-BQJFlkDE.mjs} +0 -0
- /package/dist/{utils-Cb5K29pi.cjs → utils-B_Ojepvp.cjs} +0 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-BU8PiJgx.mjs";
|
|
2
|
+
import { i as useMachine, r as normalizeProps, t as mergeProps } from "../../core-79NSyZp-.mjs";
|
|
3
|
+
import { t as createContext$1 } from "../../create-context-DbhrVE2B.mjs";
|
|
4
|
+
import { n as useEnvironmentContext } from "../../environment-Cc02I6aF.mjs";
|
|
5
|
+
import { i as useLocaleContext } from "../../locale-D4LX0eEq.mjs";
|
|
6
|
+
import "../../providers-CoJceYkV.mjs";
|
|
7
|
+
import { n as sprawlify } from "../../factory-7ydMApfi.mjs";
|
|
8
|
+
import { t as createSplitProps } from "../../create-split-props-BJdRM9I_.mjs";
|
|
9
|
+
import { forwardRef, useId } from "react";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
import * as pagination from "@sprawlify/primitives/machines/pagination";
|
|
12
|
+
import { anatomy as paginationAnatomy } from "@sprawlify/primitives/machines/pagination";
|
|
13
|
+
|
|
14
|
+
//#region src/components/pagination/use-pagination-context.ts
|
|
15
|
+
const [PaginationProvider, usePaginationContext] = createContext$1({
|
|
16
|
+
name: "PaginationContext",
|
|
17
|
+
hookName: "usePaginationContext",
|
|
18
|
+
providerName: "<PaginationProvider />"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/pagination/pagination-context.tsx
|
|
23
|
+
const PaginationContext = (props) => props.children(usePaginationContext());
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/pagination/pagination-ellipsis.tsx
|
|
27
|
+
const splitEllipsisProps = createSplitProps();
|
|
28
|
+
const PaginationEllipsis = forwardRef((props, ref) => {
|
|
29
|
+
const [ellipsisProps, localProps] = splitEllipsisProps(props, ["index"]);
|
|
30
|
+
const mergedProps = mergeProps(usePaginationContext().getEllipsisProps(ellipsisProps), localProps);
|
|
31
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
32
|
+
...mergedProps,
|
|
33
|
+
ref
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/pagination/pagination-first-trigger.tsx
|
|
40
|
+
const PaginationFirstTrigger = forwardRef((props, ref) => {
|
|
41
|
+
const mergedProps = mergeProps(usePaginationContext().getFirstTriggerProps(), props);
|
|
42
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
43
|
+
...mergedProps,
|
|
44
|
+
ref
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
PaginationFirstTrigger.displayName = "PaginationFirstTrigger";
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/pagination/pagination-item.tsx
|
|
51
|
+
const splitItemProps = createSplitProps();
|
|
52
|
+
const PaginationItem = forwardRef((props, ref) => {
|
|
53
|
+
const [itemProps, localProps] = splitItemProps(props, ["value", "type"]);
|
|
54
|
+
const mergedProps = mergeProps(usePaginationContext().getItemProps(itemProps), localProps);
|
|
55
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
56
|
+
...mergedProps,
|
|
57
|
+
ref
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
PaginationItem.displayName = "PaginationItem";
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/components/pagination/pagination-last-trigger.tsx
|
|
64
|
+
const PaginationLastTrigger = forwardRef((props, ref) => {
|
|
65
|
+
const mergedProps = mergeProps(usePaginationContext().getLastTriggerProps(), props);
|
|
66
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
67
|
+
...mergedProps,
|
|
68
|
+
ref
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
PaginationLastTrigger.displayName = "PaginationLastTrigger";
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/components/pagination/pagination-next-trigger.tsx
|
|
75
|
+
const PaginationNextTrigger = forwardRef((props, ref) => {
|
|
76
|
+
const mergedProps = mergeProps(usePaginationContext().getNextTriggerProps(), props);
|
|
77
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
78
|
+
...mergedProps,
|
|
79
|
+
ref
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
PaginationNextTrigger.displayName = "PaginationNextTrigger";
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/components/pagination/pagination-prev-trigger.tsx
|
|
86
|
+
const PaginationPrevTrigger = forwardRef((props, ref) => {
|
|
87
|
+
const mergedProps = mergeProps(usePaginationContext().getPrevTriggerProps(), props);
|
|
88
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
89
|
+
...mergedProps,
|
|
90
|
+
ref
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
PaginationPrevTrigger.displayName = "PaginationPrevTrigger";
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/components/pagination/use-pagination.ts
|
|
97
|
+
const usePagination = (props) => {
|
|
98
|
+
const id = useId();
|
|
99
|
+
const { getRootNode } = useEnvironmentContext();
|
|
100
|
+
const { dir } = useLocaleContext();
|
|
101
|
+
const machineProps = {
|
|
102
|
+
id,
|
|
103
|
+
dir,
|
|
104
|
+
getRootNode,
|
|
105
|
+
...props
|
|
106
|
+
};
|
|
107
|
+
const service = useMachine(pagination.machine, machineProps);
|
|
108
|
+
return pagination.connect(service, normalizeProps);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/components/pagination/pagination-root.tsx
|
|
113
|
+
const splitRootProps = createSplitProps();
|
|
114
|
+
const PaginationRoot = forwardRef((props, ref) => {
|
|
115
|
+
const [paginationProps, localProps] = splitRootProps(props, [
|
|
116
|
+
"boundaryCount",
|
|
117
|
+
"count",
|
|
118
|
+
"defaultPage",
|
|
119
|
+
"defaultPageSize",
|
|
120
|
+
"getPageUrl",
|
|
121
|
+
"id",
|
|
122
|
+
"ids",
|
|
123
|
+
"onPageChange",
|
|
124
|
+
"onPageSizeChange",
|
|
125
|
+
"page",
|
|
126
|
+
"pageSize",
|
|
127
|
+
"siblingCount",
|
|
128
|
+
"translations",
|
|
129
|
+
"type"
|
|
130
|
+
]);
|
|
131
|
+
const pagination$1 = usePagination(paginationProps);
|
|
132
|
+
const mergedProps = mergeProps(pagination$1.getRootProps(), localProps);
|
|
133
|
+
return /* @__PURE__ */ jsx(PaginationProvider, {
|
|
134
|
+
value: pagination$1,
|
|
135
|
+
children: /* @__PURE__ */ jsx(sprawlify.nav, {
|
|
136
|
+
...mergedProps,
|
|
137
|
+
ref
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
PaginationRoot.displayName = "PaginationRoot";
|
|
142
|
+
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/components/pagination/pagination-root-provider.tsx
|
|
145
|
+
const splitRootProviderProps = createSplitProps();
|
|
146
|
+
const PaginationRootProvider = forwardRef((props, ref) => {
|
|
147
|
+
const [{ value: pagination$1 }, localProps] = splitRootProviderProps(props, ["value"]);
|
|
148
|
+
const mergedProps = mergeProps(pagination$1.getRootProps(), localProps);
|
|
149
|
+
return /* @__PURE__ */ jsx(PaginationProvider, {
|
|
150
|
+
value: pagination$1,
|
|
151
|
+
children: /* @__PURE__ */ jsx(sprawlify.nav, {
|
|
152
|
+
...mergedProps,
|
|
153
|
+
ref
|
|
154
|
+
})
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
PaginationRootProvider.displayName = "PaginationRootProvider";
|
|
158
|
+
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region src/components/pagination/pagination.ts
|
|
161
|
+
var pagination_exports = /* @__PURE__ */ __export({
|
|
162
|
+
Context: () => PaginationContext,
|
|
163
|
+
Ellipsis: () => PaginationEllipsis,
|
|
164
|
+
FirstTrigger: () => PaginationFirstTrigger,
|
|
165
|
+
Item: () => PaginationItem,
|
|
166
|
+
LastTrigger: () => PaginationLastTrigger,
|
|
167
|
+
NextTrigger: () => PaginationNextTrigger,
|
|
168
|
+
PrevTrigger: () => PaginationPrevTrigger,
|
|
169
|
+
Root: () => PaginationRoot,
|
|
170
|
+
RootProvider: () => PaginationRootProvider
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
//#endregion
|
|
174
|
+
export { pagination_exports as Pagination, PaginationContext, PaginationEllipsis, PaginationFirstTrigger, PaginationItem, PaginationLastTrigger, PaginationNextTrigger, PaginationPrevTrigger, PaginationRoot, PaginationRootProvider, paginationAnatomy, usePagination, usePaginationContext };
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
const require_chunk = require('../../chunk-BYnRvbsk.cjs');
|
|
2
|
+
const require_core = require('../../core-DCWyxy9D.cjs');
|
|
3
|
+
const require_create_context = require('../../create-context-CQ4U0lLj.cjs');
|
|
4
|
+
const require_environment = require('../../environment-CvilmfQt.cjs');
|
|
5
|
+
const require_locale = require('../../locale-BcnWD1Hf.cjs');
|
|
6
|
+
require('../../providers-BNAArubQ.cjs');
|
|
7
|
+
const require_factory = require('../../factory-C166evrS.cjs');
|
|
8
|
+
const require_create_split_props = require('../../create-split-props-Dp4TWOyM.cjs');
|
|
9
|
+
require('../../use-fieldset-context-CCQLmNLL.cjs');
|
|
10
|
+
require('../../use-safe-layout-effect-C2GgvNT3.cjs');
|
|
11
|
+
const require_field = require('../../field-C-57Gj2E.cjs');
|
|
12
|
+
let react = require("react");
|
|
13
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
|
+
let __sprawlify_primitives_machines_password_input = require("@sprawlify/primitives/machines/password-input");
|
|
15
|
+
__sprawlify_primitives_machines_password_input = require_chunk.__toESM(__sprawlify_primitives_machines_password_input);
|
|
16
|
+
let __sprawlify_primitives_core = require("@sprawlify/primitives/core");
|
|
17
|
+
|
|
18
|
+
//#region src/components/password-input/use-password-input-context.ts
|
|
19
|
+
const [PasswordInputProvider, usePasswordInputContext] = require_create_context.createContext({
|
|
20
|
+
name: "PasswordInputContext",
|
|
21
|
+
hookName: "usePasswordInputContext",
|
|
22
|
+
providerName: "<PasswordInputProvider />"
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/password-input/password-input-context.tsx
|
|
27
|
+
const PasswordInputContext = (props) => {
|
|
28
|
+
return props.children(usePasswordInputContext());
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/password-input/password-input-control.tsx
|
|
33
|
+
const PasswordInputControl = (0, react.forwardRef)((props, ref) => {
|
|
34
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(usePasswordInputContext().getControlProps(), props);
|
|
35
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.div, {
|
|
36
|
+
...mergedProps,
|
|
37
|
+
ref
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
PasswordInputControl.displayName = "PasswordInputControl";
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/components/password-input/password-input-indicator.tsx
|
|
44
|
+
const PasswordInputIndicator = (0, react.forwardRef)((props, ref) => {
|
|
45
|
+
const passwordInput = usePasswordInputContext();
|
|
46
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(passwordInput.getIndicatorProps(), props);
|
|
47
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.span, {
|
|
48
|
+
...mergedProps,
|
|
49
|
+
ref,
|
|
50
|
+
children: passwordInput.visible ? props.children : props.fallback
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
PasswordInputIndicator.displayName = "PasswordInputIndicator";
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/components/password-input/password-input-input.tsx
|
|
57
|
+
const PasswordInputInput = (0, react.forwardRef)((props, ref) => {
|
|
58
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(usePasswordInputContext().getInputProps(), props);
|
|
59
|
+
const field = require_field.useFieldContext();
|
|
60
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.input, {
|
|
61
|
+
"aria-describedby": field?.ariaDescribedby,
|
|
62
|
+
...mergedProps,
|
|
63
|
+
ref
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
PasswordInputInput.displayName = "PasswordInputInput";
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/components/password-input/password-input-label.tsx
|
|
70
|
+
const PasswordInputLabel = (0, react.forwardRef)((props, ref) => {
|
|
71
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(usePasswordInputContext().getLabelProps(), props);
|
|
72
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.label, {
|
|
73
|
+
...mergedProps,
|
|
74
|
+
ref
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
PasswordInputLabel.displayName = "PasswordInputLabel";
|
|
78
|
+
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/components/password-input/use-password-input.ts
|
|
81
|
+
const usePasswordInput = (props) => {
|
|
82
|
+
const id = (0, react.useId)();
|
|
83
|
+
const { getRootNode } = require_environment.useEnvironmentContext();
|
|
84
|
+
const { dir } = require_locale.useLocaleContext();
|
|
85
|
+
const field = require_field.useFieldContext();
|
|
86
|
+
const machineProps = {
|
|
87
|
+
id,
|
|
88
|
+
ids: { input: field?.ids.control },
|
|
89
|
+
disabled: field?.disabled,
|
|
90
|
+
readOnly: field?.readOnly,
|
|
91
|
+
required: field?.required,
|
|
92
|
+
invalid: field?.invalid,
|
|
93
|
+
dir,
|
|
94
|
+
getRootNode,
|
|
95
|
+
...props
|
|
96
|
+
};
|
|
97
|
+
const service = require_core.useMachine(__sprawlify_primitives_machines_password_input.machine, machineProps);
|
|
98
|
+
return __sprawlify_primitives_machines_password_input.connect(service, require_core.normalizeProps);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/components/password-input/password-input-root.tsx
|
|
103
|
+
const splitRootProps = require_create_split_props.createSplitProps();
|
|
104
|
+
const PasswordInputRoot = (0, react.forwardRef)((props, ref) => {
|
|
105
|
+
const [usePasswordInputProps, localProps] = splitRootProps(props, [
|
|
106
|
+
"autoComplete",
|
|
107
|
+
"defaultVisible",
|
|
108
|
+
"disabled",
|
|
109
|
+
"id",
|
|
110
|
+
"ids",
|
|
111
|
+
"ignorePasswordManagers",
|
|
112
|
+
"invalid",
|
|
113
|
+
"name",
|
|
114
|
+
"onVisibilityChange",
|
|
115
|
+
"readOnly",
|
|
116
|
+
"required",
|
|
117
|
+
"translations",
|
|
118
|
+
"visible"
|
|
119
|
+
]);
|
|
120
|
+
const passwordInput = usePasswordInput(usePasswordInputProps);
|
|
121
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(passwordInput.getRootProps(), localProps);
|
|
122
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PasswordInputProvider, {
|
|
123
|
+
value: passwordInput,
|
|
124
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.div, {
|
|
125
|
+
...mergedProps,
|
|
126
|
+
ref
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
PasswordInputRoot.displayName = "PasswordInputRoot";
|
|
131
|
+
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/components/password-input/password-input-root-provider.tsx
|
|
134
|
+
const PasswordInputRootProvider = (0, react.forwardRef)((props, ref) => {
|
|
135
|
+
const { value: passwordInput, ...localProps } = props;
|
|
136
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(passwordInput.getRootProps(), localProps);
|
|
137
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PasswordInputProvider, {
|
|
138
|
+
value: passwordInput,
|
|
139
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.div, {
|
|
140
|
+
...mergedProps,
|
|
141
|
+
ref
|
|
142
|
+
})
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
PasswordInputRootProvider.displayName = "PasswordInputRootProvider";
|
|
146
|
+
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/components/password-input/password-input-visibility-trigger.tsx
|
|
149
|
+
const PasswordInputVisibilityTrigger = (0, react.forwardRef)((props, ref) => {
|
|
150
|
+
const mergedProps = (0, __sprawlify_primitives_core.mergeProps)(usePasswordInputContext().getVisibilityTriggerProps(), props);
|
|
151
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.sprawlify.button, {
|
|
152
|
+
...mergedProps,
|
|
153
|
+
ref
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
PasswordInputVisibilityTrigger.displayName = "PasswordInputVisibilityTrigger";
|
|
157
|
+
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/components/password-input/password-input.ts
|
|
160
|
+
var password_input_exports = /* @__PURE__ */ require_chunk.__export({
|
|
161
|
+
Context: () => PasswordInputContext,
|
|
162
|
+
Control: () => PasswordInputControl,
|
|
163
|
+
Indicator: () => PasswordInputIndicator,
|
|
164
|
+
Input: () => PasswordInputInput,
|
|
165
|
+
Label: () => PasswordInputLabel,
|
|
166
|
+
Root: () => PasswordInputRoot,
|
|
167
|
+
RootProvider: () => PasswordInputRootProvider,
|
|
168
|
+
VisibilityTrigger: () => PasswordInputVisibilityTrigger
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
//#endregion
|
|
172
|
+
Object.defineProperty(exports, 'PasswordInput', {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
get: function () {
|
|
175
|
+
return password_input_exports;
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
exports.PasswordInputContext = PasswordInputContext;
|
|
179
|
+
exports.PasswordInputControl = PasswordInputControl;
|
|
180
|
+
exports.PasswordInputIndicator = PasswordInputIndicator;
|
|
181
|
+
exports.PasswordInputInput = PasswordInputInput;
|
|
182
|
+
exports.PasswordInputLabel = PasswordInputLabel;
|
|
183
|
+
exports.PasswordInputRoot = PasswordInputRoot;
|
|
184
|
+
exports.PasswordInputRootProvider = PasswordInputRootProvider;
|
|
185
|
+
exports.PasswordInputVisibilityTrigger = PasswordInputVisibilityTrigger;
|
|
186
|
+
Object.defineProperty(exports, 'passwordInputAnatomy', {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function () {
|
|
189
|
+
return __sprawlify_primitives_machines_password_input.anatomy;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
exports.usePasswordInput = usePasswordInput;
|
|
193
|
+
exports.usePasswordInputContext = usePasswordInputContext;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { t as PropTypes } from "../../normalize-props-Dw0EepzR.cjs";
|
|
2
|
+
import { r as Optional, t as Assign } from "../../types-DcUAwTQC.cjs";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-fcFI3pbG.cjs";
|
|
4
|
+
import * as react43 from "react";
|
|
5
|
+
import { ReactNode } from "react";
|
|
6
|
+
import * as passwordInput from "@sprawlify/primitives/machines/password-input";
|
|
7
|
+
import { VisibilityChangeDetails, VisibilityChangeDetails as PasswordInputVisibilityChangeDetails, anatomy as passwordInputAnatomy } from "@sprawlify/primitives/machines/password-input";
|
|
8
|
+
|
|
9
|
+
//#region src/components/password-input/use-password-input.d.ts
|
|
10
|
+
interface UsePasswordInputProps extends Optional<Omit<passwordInput.Props, "dir" | "getRootNode">, "id"> {}
|
|
11
|
+
interface UsePasswordInputReturn extends passwordInput.Api<PropTypes> {}
|
|
12
|
+
declare const usePasswordInput: (props?: UsePasswordInputProps) => UsePasswordInputReturn;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/components/password-input/password-input-context.d.ts
|
|
15
|
+
interface PasswordInputContextProps {
|
|
16
|
+
children: (context: UsePasswordInputReturn) => ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const PasswordInputContext: (props: PasswordInputContextProps) => ReactNode;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/components/password-input/password-input-control.d.ts
|
|
21
|
+
interface PasswordInputControlBaseProps extends PolymorphicProps {}
|
|
22
|
+
interface PasswordInputControlProps extends HTMLProps<"div">, PasswordInputControlBaseProps {}
|
|
23
|
+
declare const PasswordInputControl: react43.ForwardRefExoticComponent<PasswordInputControlProps & react43.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/components/password-input/password-input-indicator.d.ts
|
|
26
|
+
interface PasswordInputIndicatorBaseProps extends PolymorphicProps {
|
|
27
|
+
fallback?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
interface PasswordInputIndicatorProps extends HTMLProps<"span">, PasswordInputIndicatorBaseProps {}
|
|
30
|
+
declare const PasswordInputIndicator: react43.ForwardRefExoticComponent<PasswordInputIndicatorProps & react43.RefAttributes<HTMLSpanElement>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/password-input/password-input-input.d.ts
|
|
33
|
+
interface PasswordInputInputBaseProps extends PolymorphicProps {}
|
|
34
|
+
interface PasswordInputInputProps extends HTMLProps<"input">, PasswordInputInputBaseProps {}
|
|
35
|
+
declare const PasswordInputInput: react43.ForwardRefExoticComponent<PasswordInputInputProps & react43.RefAttributes<HTMLInputElement>>;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/password-input/password-input-label.d.ts
|
|
38
|
+
interface PasswordInputLabelBaseProps extends PolymorphicProps {}
|
|
39
|
+
interface PasswordInputLabelProps extends HTMLProps<"label">, PasswordInputLabelBaseProps {}
|
|
40
|
+
declare const PasswordInputLabel: react43.ForwardRefExoticComponent<PasswordInputLabelProps & react43.RefAttributes<HTMLLabelElement>>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/components/password-input/password-input-root.d.ts
|
|
43
|
+
interface PasswordInputRootBaseProps extends UsePasswordInputProps, PolymorphicProps {}
|
|
44
|
+
interface PasswordInputRootProps extends Assign<HTMLProps<"div">, PasswordInputRootBaseProps> {}
|
|
45
|
+
declare const PasswordInputRoot: react43.ForwardRefExoticComponent<PasswordInputRootProps & react43.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/password-input/password-input-root-provider.d.ts
|
|
48
|
+
interface RootProviderProps {
|
|
49
|
+
value: UsePasswordInputReturn;
|
|
50
|
+
}
|
|
51
|
+
interface PasswordInputRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
52
|
+
interface PasswordInputRootProviderProps extends HTMLProps<"div">, PasswordInputRootProviderBaseProps {}
|
|
53
|
+
declare const PasswordInputRootProvider: react43.ForwardRefExoticComponent<PasswordInputRootProviderProps & react43.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/password-input/password-input-visibility-trigger.d.ts
|
|
56
|
+
interface PasswordInputVisibilityTriggerBaseProps extends PolymorphicProps {}
|
|
57
|
+
interface PasswordInputVisibilityTriggerProps extends HTMLProps<"button">, PasswordInputVisibilityTriggerBaseProps {}
|
|
58
|
+
declare const PasswordInputVisibilityTrigger: react43.ForwardRefExoticComponent<PasswordInputVisibilityTriggerProps & react43.RefAttributes<HTMLButtonElement>>;
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/password-input/use-password-input-context.d.ts
|
|
61
|
+
interface UsePasswordInputContext extends UsePasswordInputReturn {}
|
|
62
|
+
declare namespace password_input_d_exports {
|
|
63
|
+
export { PasswordInputContext as Context, PasswordInputContextProps as ContextProps, PasswordInputControl as Control, PasswordInputControlBaseProps as ControlBaseProps, PasswordInputControlProps as ControlProps, PasswordInputIndicator as Indicator, PasswordInputIndicatorBaseProps as IndicatorBaseProps, PasswordInputIndicatorProps as IndicatorProps, PasswordInputInput as Input, PasswordInputInputBaseProps as InputBaseProps, PasswordInputInputProps as InputProps, PasswordInputLabel as Label, PasswordInputLabelBaseProps as LabelBaseProps, PasswordInputLabelProps as LabelProps, PasswordInputRoot as Root, PasswordInputRootBaseProps as RootBaseProps, PasswordInputRootProps as RootProps, PasswordInputRootProvider as RootProvider, PasswordInputRootProviderBaseProps as RootProviderBaseProps, PasswordInputRootProviderProps as RootProviderProps, VisibilityChangeDetails, PasswordInputVisibilityTrigger as VisibilityTrigger, PasswordInputVisibilityTriggerBaseProps as VisibilityTriggerBaseProps, PasswordInputVisibilityTriggerProps as VisibilityTriggerProps };
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { password_input_d_exports as PasswordInput, PasswordInputContext, type PasswordInputContextProps, PasswordInputControl, type PasswordInputControlBaseProps, type PasswordInputControlProps, PasswordInputIndicator, type PasswordInputIndicatorBaseProps, type PasswordInputIndicatorProps, PasswordInputInput, type PasswordInputInputBaseProps, type PasswordInputInputProps, PasswordInputLabel, type PasswordInputLabelBaseProps, type PasswordInputLabelProps, PasswordInputRoot, type PasswordInputRootBaseProps, type PasswordInputRootProps, PasswordInputRootProvider, type PasswordInputRootProviderBaseProps, type PasswordInputRootProviderProps, type PasswordInputVisibilityChangeDetails, PasswordInputVisibilityTrigger, type PasswordInputVisibilityTriggerBaseProps, type PasswordInputVisibilityTriggerProps, type UsePasswordInputContext, type UsePasswordInputProps, type UsePasswordInputReturn, passwordInputAnatomy, usePasswordInput, usePasswordInputContext };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { r as PropTypes } from "../../index-BLd57Y0z.mjs";
|
|
2
|
+
import { r as Optional, t as Assign } from "../../types-CrwpJrFp.mjs";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-DaVlp4Ba.mjs";
|
|
4
|
+
import * as react302 from "react";
|
|
5
|
+
import { ReactNode } from "react";
|
|
6
|
+
import * as passwordInput from "@sprawlify/primitives/machines/password-input";
|
|
7
|
+
import { VisibilityChangeDetails, VisibilityChangeDetails as PasswordInputVisibilityChangeDetails, anatomy as passwordInputAnatomy } from "@sprawlify/primitives/machines/password-input";
|
|
8
|
+
|
|
9
|
+
//#region src/components/password-input/use-password-input.d.ts
|
|
10
|
+
interface UsePasswordInputProps extends Optional<Omit<passwordInput.Props, "dir" | "getRootNode">, "id"> {}
|
|
11
|
+
interface UsePasswordInputReturn extends passwordInput.Api<PropTypes> {}
|
|
12
|
+
declare const usePasswordInput: (props?: UsePasswordInputProps) => UsePasswordInputReturn;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/components/password-input/password-input-context.d.ts
|
|
15
|
+
interface PasswordInputContextProps {
|
|
16
|
+
children: (context: UsePasswordInputReturn) => ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const PasswordInputContext: (props: PasswordInputContextProps) => ReactNode;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/components/password-input/password-input-control.d.ts
|
|
21
|
+
interface PasswordInputControlBaseProps extends PolymorphicProps {}
|
|
22
|
+
interface PasswordInputControlProps extends HTMLProps<"div">, PasswordInputControlBaseProps {}
|
|
23
|
+
declare const PasswordInputControl: react302.ForwardRefExoticComponent<PasswordInputControlProps & react302.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/components/password-input/password-input-indicator.d.ts
|
|
26
|
+
interface PasswordInputIndicatorBaseProps extends PolymorphicProps {
|
|
27
|
+
fallback?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
interface PasswordInputIndicatorProps extends HTMLProps<"span">, PasswordInputIndicatorBaseProps {}
|
|
30
|
+
declare const PasswordInputIndicator: react302.ForwardRefExoticComponent<PasswordInputIndicatorProps & react302.RefAttributes<HTMLSpanElement>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/password-input/password-input-input.d.ts
|
|
33
|
+
interface PasswordInputInputBaseProps extends PolymorphicProps {}
|
|
34
|
+
interface PasswordInputInputProps extends HTMLProps<"input">, PasswordInputInputBaseProps {}
|
|
35
|
+
declare const PasswordInputInput: react302.ForwardRefExoticComponent<PasswordInputInputProps & react302.RefAttributes<HTMLInputElement>>;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/password-input/password-input-label.d.ts
|
|
38
|
+
interface PasswordInputLabelBaseProps extends PolymorphicProps {}
|
|
39
|
+
interface PasswordInputLabelProps extends HTMLProps<"label">, PasswordInputLabelBaseProps {}
|
|
40
|
+
declare const PasswordInputLabel: react302.ForwardRefExoticComponent<PasswordInputLabelProps & react302.RefAttributes<HTMLLabelElement>>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/components/password-input/password-input-root.d.ts
|
|
43
|
+
interface PasswordInputRootBaseProps extends UsePasswordInputProps, PolymorphicProps {}
|
|
44
|
+
interface PasswordInputRootProps extends Assign<HTMLProps<"div">, PasswordInputRootBaseProps> {}
|
|
45
|
+
declare const PasswordInputRoot: react302.ForwardRefExoticComponent<PasswordInputRootProps & react302.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/password-input/password-input-root-provider.d.ts
|
|
48
|
+
interface RootProviderProps {
|
|
49
|
+
value: UsePasswordInputReturn;
|
|
50
|
+
}
|
|
51
|
+
interface PasswordInputRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
52
|
+
interface PasswordInputRootProviderProps extends HTMLProps<"div">, PasswordInputRootProviderBaseProps {}
|
|
53
|
+
declare const PasswordInputRootProvider: react302.ForwardRefExoticComponent<PasswordInputRootProviderProps & react302.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/password-input/password-input-visibility-trigger.d.ts
|
|
56
|
+
interface PasswordInputVisibilityTriggerBaseProps extends PolymorphicProps {}
|
|
57
|
+
interface PasswordInputVisibilityTriggerProps extends HTMLProps<"button">, PasswordInputVisibilityTriggerBaseProps {}
|
|
58
|
+
declare const PasswordInputVisibilityTrigger: react302.ForwardRefExoticComponent<PasswordInputVisibilityTriggerProps & react302.RefAttributes<HTMLButtonElement>>;
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/password-input/use-password-input-context.d.ts
|
|
61
|
+
interface UsePasswordInputContext extends UsePasswordInputReturn {}
|
|
62
|
+
declare namespace password_input_d_exports {
|
|
63
|
+
export { PasswordInputContext as Context, PasswordInputContextProps as ContextProps, PasswordInputControl as Control, PasswordInputControlBaseProps as ControlBaseProps, PasswordInputControlProps as ControlProps, PasswordInputIndicator as Indicator, PasswordInputIndicatorBaseProps as IndicatorBaseProps, PasswordInputIndicatorProps as IndicatorProps, PasswordInputInput as Input, PasswordInputInputBaseProps as InputBaseProps, PasswordInputInputProps as InputProps, PasswordInputLabel as Label, PasswordInputLabelBaseProps as LabelBaseProps, PasswordInputLabelProps as LabelProps, PasswordInputRoot as Root, PasswordInputRootBaseProps as RootBaseProps, PasswordInputRootProps as RootProps, PasswordInputRootProvider as RootProvider, PasswordInputRootProviderBaseProps as RootProviderBaseProps, PasswordInputRootProviderProps as RootProviderProps, VisibilityChangeDetails, PasswordInputVisibilityTrigger as VisibilityTrigger, PasswordInputVisibilityTriggerBaseProps as VisibilityTriggerBaseProps, PasswordInputVisibilityTriggerProps as VisibilityTriggerProps };
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { password_input_d_exports as PasswordInput, PasswordInputContext, type PasswordInputContextProps, PasswordInputControl, type PasswordInputControlBaseProps, type PasswordInputControlProps, PasswordInputIndicator, type PasswordInputIndicatorBaseProps, type PasswordInputIndicatorProps, PasswordInputInput, type PasswordInputInputBaseProps, type PasswordInputInputProps, PasswordInputLabel, type PasswordInputLabelBaseProps, type PasswordInputLabelProps, PasswordInputRoot, type PasswordInputRootBaseProps, type PasswordInputRootProps, PasswordInputRootProvider, type PasswordInputRootProviderBaseProps, type PasswordInputRootProviderProps, type PasswordInputVisibilityChangeDetails, PasswordInputVisibilityTrigger, type PasswordInputVisibilityTriggerBaseProps, type PasswordInputVisibilityTriggerProps, type UsePasswordInputContext, type UsePasswordInputProps, type UsePasswordInputReturn, passwordInputAnatomy, usePasswordInput, usePasswordInputContext };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-BU8PiJgx.mjs";
|
|
2
|
+
import { i as useMachine, r as normalizeProps, t as mergeProps } from "../../core-79NSyZp-.mjs";
|
|
3
|
+
import { t as createContext$1 } from "../../create-context-DbhrVE2B.mjs";
|
|
4
|
+
import { n as useEnvironmentContext } from "../../environment-Cc02I6aF.mjs";
|
|
5
|
+
import { i as useLocaleContext } from "../../locale-D4LX0eEq.mjs";
|
|
6
|
+
import "../../providers-CoJceYkV.mjs";
|
|
7
|
+
import { n as sprawlify } from "../../factory-7ydMApfi.mjs";
|
|
8
|
+
import { t as createSplitProps } from "../../create-split-props-BJdRM9I_.mjs";
|
|
9
|
+
import "../../use-fieldset-context-6GRSrrlt.mjs";
|
|
10
|
+
import "../../use-safe-layout-effect-DPn_9-dD.mjs";
|
|
11
|
+
import { m as useFieldContext } from "../../field-BXY6su53.mjs";
|
|
12
|
+
import { forwardRef, useId } from "react";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as passwordInput from "@sprawlify/primitives/machines/password-input";
|
|
15
|
+
import { anatomy as passwordInputAnatomy } from "@sprawlify/primitives/machines/password-input";
|
|
16
|
+
|
|
17
|
+
//#region src/components/password-input/use-password-input-context.ts
|
|
18
|
+
const [PasswordInputProvider, usePasswordInputContext] = createContext$1({
|
|
19
|
+
name: "PasswordInputContext",
|
|
20
|
+
hookName: "usePasswordInputContext",
|
|
21
|
+
providerName: "<PasswordInputProvider />"
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/components/password-input/password-input-context.tsx
|
|
26
|
+
const PasswordInputContext = (props) => {
|
|
27
|
+
return props.children(usePasswordInputContext());
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/password-input/password-input-control.tsx
|
|
32
|
+
const PasswordInputControl = forwardRef((props, ref) => {
|
|
33
|
+
const mergedProps = mergeProps(usePasswordInputContext().getControlProps(), props);
|
|
34
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
35
|
+
...mergedProps,
|
|
36
|
+
ref
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
PasswordInputControl.displayName = "PasswordInputControl";
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/components/password-input/password-input-indicator.tsx
|
|
43
|
+
const PasswordInputIndicator = forwardRef((props, ref) => {
|
|
44
|
+
const passwordInput$1 = usePasswordInputContext();
|
|
45
|
+
const mergedProps = mergeProps(passwordInput$1.getIndicatorProps(), props);
|
|
46
|
+
return /* @__PURE__ */ jsx(sprawlify.span, {
|
|
47
|
+
...mergedProps,
|
|
48
|
+
ref,
|
|
49
|
+
children: passwordInput$1.visible ? props.children : props.fallback
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
PasswordInputIndicator.displayName = "PasswordInputIndicator";
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/password-input/password-input-input.tsx
|
|
56
|
+
const PasswordInputInput = forwardRef((props, ref) => {
|
|
57
|
+
const mergedProps = mergeProps(usePasswordInputContext().getInputProps(), props);
|
|
58
|
+
const field = useFieldContext();
|
|
59
|
+
return /* @__PURE__ */ jsx(sprawlify.input, {
|
|
60
|
+
"aria-describedby": field?.ariaDescribedby,
|
|
61
|
+
...mergedProps,
|
|
62
|
+
ref
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
PasswordInputInput.displayName = "PasswordInputInput";
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/components/password-input/password-input-label.tsx
|
|
69
|
+
const PasswordInputLabel = forwardRef((props, ref) => {
|
|
70
|
+
const mergedProps = mergeProps(usePasswordInputContext().getLabelProps(), props);
|
|
71
|
+
return /* @__PURE__ */ jsx(sprawlify.label, {
|
|
72
|
+
...mergedProps,
|
|
73
|
+
ref
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
PasswordInputLabel.displayName = "PasswordInputLabel";
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/components/password-input/use-password-input.ts
|
|
80
|
+
const usePasswordInput = (props) => {
|
|
81
|
+
const id = useId();
|
|
82
|
+
const { getRootNode } = useEnvironmentContext();
|
|
83
|
+
const { dir } = useLocaleContext();
|
|
84
|
+
const field = useFieldContext();
|
|
85
|
+
const machineProps = {
|
|
86
|
+
id,
|
|
87
|
+
ids: { input: field?.ids.control },
|
|
88
|
+
disabled: field?.disabled,
|
|
89
|
+
readOnly: field?.readOnly,
|
|
90
|
+
required: field?.required,
|
|
91
|
+
invalid: field?.invalid,
|
|
92
|
+
dir,
|
|
93
|
+
getRootNode,
|
|
94
|
+
...props
|
|
95
|
+
};
|
|
96
|
+
const service = useMachine(passwordInput.machine, machineProps);
|
|
97
|
+
return passwordInput.connect(service, normalizeProps);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/components/password-input/password-input-root.tsx
|
|
102
|
+
const splitRootProps = createSplitProps();
|
|
103
|
+
const PasswordInputRoot = forwardRef((props, ref) => {
|
|
104
|
+
const [usePasswordInputProps, localProps] = splitRootProps(props, [
|
|
105
|
+
"autoComplete",
|
|
106
|
+
"defaultVisible",
|
|
107
|
+
"disabled",
|
|
108
|
+
"id",
|
|
109
|
+
"ids",
|
|
110
|
+
"ignorePasswordManagers",
|
|
111
|
+
"invalid",
|
|
112
|
+
"name",
|
|
113
|
+
"onVisibilityChange",
|
|
114
|
+
"readOnly",
|
|
115
|
+
"required",
|
|
116
|
+
"translations",
|
|
117
|
+
"visible"
|
|
118
|
+
]);
|
|
119
|
+
const passwordInput$1 = usePasswordInput(usePasswordInputProps);
|
|
120
|
+
const mergedProps = mergeProps(passwordInput$1.getRootProps(), localProps);
|
|
121
|
+
return /* @__PURE__ */ jsx(PasswordInputProvider, {
|
|
122
|
+
value: passwordInput$1,
|
|
123
|
+
children: /* @__PURE__ */ jsx(sprawlify.div, {
|
|
124
|
+
...mergedProps,
|
|
125
|
+
ref
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
PasswordInputRoot.displayName = "PasswordInputRoot";
|
|
130
|
+
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/components/password-input/password-input-root-provider.tsx
|
|
133
|
+
const PasswordInputRootProvider = forwardRef((props, ref) => {
|
|
134
|
+
const { value: passwordInput$1, ...localProps } = props;
|
|
135
|
+
const mergedProps = mergeProps(passwordInput$1.getRootProps(), localProps);
|
|
136
|
+
return /* @__PURE__ */ jsx(PasswordInputProvider, {
|
|
137
|
+
value: passwordInput$1,
|
|
138
|
+
children: /* @__PURE__ */ jsx(sprawlify.div, {
|
|
139
|
+
...mergedProps,
|
|
140
|
+
ref
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
PasswordInputRootProvider.displayName = "PasswordInputRootProvider";
|
|
145
|
+
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/components/password-input/password-input-visibility-trigger.tsx
|
|
148
|
+
const PasswordInputVisibilityTrigger = forwardRef((props, ref) => {
|
|
149
|
+
const mergedProps = mergeProps(usePasswordInputContext().getVisibilityTriggerProps(), props);
|
|
150
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
151
|
+
...mergedProps,
|
|
152
|
+
ref
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
PasswordInputVisibilityTrigger.displayName = "PasswordInputVisibilityTrigger";
|
|
156
|
+
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/components/password-input/password-input.ts
|
|
159
|
+
var password_input_exports = /* @__PURE__ */ __export({
|
|
160
|
+
Context: () => PasswordInputContext,
|
|
161
|
+
Control: () => PasswordInputControl,
|
|
162
|
+
Indicator: () => PasswordInputIndicator,
|
|
163
|
+
Input: () => PasswordInputInput,
|
|
164
|
+
Label: () => PasswordInputLabel,
|
|
165
|
+
Root: () => PasswordInputRoot,
|
|
166
|
+
RootProvider: () => PasswordInputRootProvider,
|
|
167
|
+
VisibilityTrigger: () => PasswordInputVisibilityTrigger
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
//#endregion
|
|
171
|
+
export { password_input_exports as PasswordInput, PasswordInputContext, PasswordInputControl, PasswordInputIndicator, PasswordInputInput, PasswordInputLabel, PasswordInputRoot, PasswordInputRootProvider, PasswordInputVisibilityTrigger, passwordInputAnatomy, usePasswordInput, usePasswordInputContext };
|