@wirekyt/react 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.cjs +209 -0
- package/dist/accordion.d.cts +69 -0
- package/dist/accordion.d.ts +69 -0
- package/dist/accordion.js +184 -0
- package/dist/angle-slider.cjs +193 -0
- package/dist/angle-slider.d.cts +73 -0
- package/dist/angle-slider.d.ts +73 -0
- package/dist/angle-slider.js +168 -0
- package/dist/avatar.cjs +120 -0
- package/dist/avatar.d.cts +48 -0
- package/dist/avatar.d.ts +48 -0
- package/dist/avatar.js +100 -0
- package/dist/carousel.cjs +246 -0
- package/dist/carousel.d.cts +94 -0
- package/dist/carousel.d.ts +94 -0
- package/dist/carousel.js +223 -0
- package/dist/checkbox.cjs +284 -0
- package/dist/checkbox.d.cts +115 -0
- package/dist/checkbox.d.ts +115 -0
- package/dist/checkbox.js +263 -0
- package/dist/client-only.cjs +12 -0
- package/dist/client-only.d.cts +8 -0
- package/dist/client-only.d.ts +8 -0
- package/dist/client-only.js +11 -0
- package/dist/clipboard.cjs +174 -0
- package/dist/clipboard.d.cts +70 -0
- package/dist/clipboard.d.ts +70 -0
- package/dist/clipboard.js +150 -0
- package/dist/collapsible-B62i_oPJ.cjs +185 -0
- package/dist/collapsible-CiTNjCNf.js +131 -0
- package/dist/collapsible.cjs +23 -0
- package/dist/collapsible.d.cts +56 -0
- package/dist/collapsible.d.ts +56 -0
- package/dist/collapsible.js +2 -0
- package/dist/collection-BFjWNdUS.cjs +223 -0
- package/dist/collection-BJOl6a4H.js +180 -0
- package/dist/collection.cjs +9 -0
- package/dist/collection.d.cts +2 -0
- package/dist/collection.d.ts +2 -0
- package/dist/collection.js +2 -0
- package/dist/color-picker.cjs +575 -0
- package/dist/color-picker.d.cts +179 -0
- package/dist/color-picker.d.ts +179 -0
- package/dist/color-picker.js +530 -0
- package/dist/combobox.cjs +390 -0
- package/dist/combobox.d.cts +128 -0
- package/dist/combobox.d.ts +128 -0
- package/dist/combobox.js +359 -0
- package/dist/core-CBFAnVIP.cjs +375 -0
- package/dist/core-CEYOEcVI.js +357 -0
- package/dist/date-input.cjs +217 -0
- package/dist/date-input.d.cts +69 -0
- package/dist/date-input.d.ts +69 -0
- package/dist/date-input.js +193 -0
- package/dist/date-picker.cjs +588 -0
- package/dist/date-picker.d.cts +190 -0
- package/dist/date-picker.d.ts +190 -0
- package/dist/date-picker.js +543 -0
- package/dist/dialog.cjs +199 -0
- package/dist/dialog.d.cts +78 -0
- package/dist/dialog.d.ts +78 -0
- package/dist/dialog.js +174 -0
- package/dist/download-trigger.cjs +53 -0
- package/dist/download-trigger.d.cts +22 -0
- package/dist/download-trigger.d.ts +22 -0
- package/dist/download-trigger.js +51 -0
- package/dist/drawer.cjs +296 -0
- package/dist/drawer.d.cts +115 -0
- package/dist/drawer.d.ts +115 -0
- package/dist/drawer.js +264 -0
- package/dist/editable.cjs +228 -0
- package/dist/editable.d.cts +79 -0
- package/dist/editable.d.ts +79 -0
- package/dist/editable.js +202 -0
- package/dist/environment-B6IaCAuQ.cjs +59 -0
- package/dist/environment-BTgKwk5E.js +42 -0
- package/dist/factory--dkoVnFK.d.cts +14 -0
- package/dist/factory--dkoVnFK.d.ts +14 -0
- package/dist/factory-CFFufs5e.cjs +59 -0
- package/dist/factory-Nm__-4xn.js +48 -0
- package/dist/field-Cy1E02DH.js +349 -0
- package/dist/field-x8H5uXB9.cjs +438 -0
- package/dist/field.cjs +22 -0
- package/dist/field.d.cts +129 -0
- package/dist/field.d.ts +129 -0
- package/dist/field.js +2 -0
- package/dist/fieldset-DWZXj1t5.cjs +232 -0
- package/dist/fieldset-fx44GCtM.js +178 -0
- package/dist/fieldset.cjs +18 -0
- package/dist/fieldset.d.cts +71 -0
- package/dist/fieldset.d.ts +71 -0
- package/dist/fieldset.js +3 -0
- package/dist/file-upload.cjs +328 -0
- package/dist/file-upload.d.cts +101 -0
- package/dist/file-upload.d.ts +101 -0
- package/dist/file-upload.js +298 -0
- package/dist/floating-panel.cjs +271 -0
- package/dist/floating-panel.d.cts +98 -0
- package/dist/floating-panel.d.ts +98 -0
- package/dist/floating-panel.js +242 -0
- package/dist/format.cjs +64 -0
- package/dist/format.d.cts +44 -0
- package/dist/format.d.ts +44 -0
- package/dist/format.js +54 -0
- package/dist/frame.cjs +85 -0
- package/dist/frame.d.cts +12 -0
- package/dist/frame.d.ts +12 -0
- package/dist/frame.js +84 -0
- package/dist/highlight.cjs +29 -0
- package/dist/highlight.d.cts +13 -0
- package/dist/highlight.d.ts +13 -0
- package/dist/highlight.js +27 -0
- package/dist/hover-card.cjs +154 -0
- package/dist/hover-card.d.cts +68 -0
- package/dist/hover-card.d.ts +68 -0
- package/dist/hover-card.js +131 -0
- package/dist/image-cropper.cjs +0 -0
- package/dist/image-cropper.d.cts +1 -0
- package/dist/image-cropper.d.ts +1 -0
- package/dist/image-cropper.js +0 -0
- package/dist/index-3Al0R5bH.d.cts +73 -0
- package/dist/index-B7wAg5Wf.d.ts +146 -0
- package/dist/index-BAn8qiCM.d.ts +73 -0
- package/dist/index-BSX88T_g.d.cts +146 -0
- package/dist/index-CQAbOgb7.d.cts +23 -0
- package/dist/index-CUyHBXOI.d.cts +33 -0
- package/dist/index-CW-Aj6aT.d.ts +95 -0
- package/dist/index-CxWYgVJk.d.ts +23 -0
- package/dist/index-D7JH9e9E.d.ts +33 -0
- package/dist/index-DTLK6Fuh.d.cts +95 -0
- package/dist/index-srZfUQNt.d.cts +20 -0
- package/dist/index-srZfUQNt.d.ts +20 -0
- package/dist/index.cjs +45 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/json-tree-view.cjs +244 -0
- package/dist/json-tree-view.d.cts +45 -0
- package/dist/json-tree-view.d.ts +45 -0
- package/dist/json-tree-view.js +234 -0
- package/dist/listbox.cjs +290 -0
- package/dist/listbox.d.cts +109 -0
- package/dist/listbox.d.ts +109 -0
- package/dist/listbox.js +264 -0
- package/dist/marquee.cjs +164 -0
- package/dist/marquee.d.cts +60 -0
- package/dist/marquee.d.ts +60 -0
- package/dist/marquee.js +142 -0
- package/dist/menu.cjs +506 -0
- package/dist/menu.d.cts +162 -0
- package/dist/menu.d.ts +162 -0
- package/dist/menu.js +469 -0
- package/dist/navigation-menu.cjs +331 -0
- package/dist/navigation-menu.d.cts +89 -0
- package/dist/navigation-menu.d.ts +89 -0
- package/dist/navigation-menu.js +303 -0
- package/dist/number-input.cjs +222 -0
- package/dist/number-input.d.cts +73 -0
- package/dist/number-input.d.ts +73 -0
- package/dist/number-input.js +197 -0
- package/dist/pagination.cjs +183 -0
- package/dist/pagination.d.cts +68 -0
- package/dist/pagination.d.ts +68 -0
- package/dist/pagination.js +159 -0
- package/dist/password-input.cjs +179 -0
- package/dist/password-input.d.cts +65 -0
- package/dist/password-input.d.ts +65 -0
- package/dist/password-input.js +156 -0
- package/dist/pin-input.cjs +180 -0
- package/dist/pin-input.d.cts +58 -0
- package/dist/pin-input.d.ts +58 -0
- package/dist/pin-input.js +158 -0
- package/dist/popover.cjs +222 -0
- package/dist/popover.d.cts +93 -0
- package/dist/popover.d.ts +93 -0
- package/dist/popover.js +194 -0
- package/dist/portal-6_XzBXiA.cjs +33 -0
- package/dist/portal-QYL_2wB0.js +28 -0
- package/dist/portal.cjs +3 -0
- package/dist/portal.d.cts +9 -0
- package/dist/portal.d.ts +9 -0
- package/dist/portal.js +2 -0
- package/dist/presence-BOs-D6Cv.cjs +96 -0
- package/dist/presence-I8Rceflw.js +65 -0
- package/dist/presence.cjs +7 -0
- package/dist/presence.d.cts +2 -0
- package/dist/presence.d.ts +2 -0
- package/dist/presence.js +2 -0
- package/dist/progress.cjs +206 -0
- package/dist/progress.d.cts +78 -0
- package/dist/progress.d.ts +78 -0
- package/dist/progress.js +180 -0
- package/dist/providers-DrJEJcrE.cjs +128 -0
- package/dist/providers-FEHnDTvb.js +87 -0
- package/dist/qr-code.cjs +154 -0
- package/dist/qr-code.d.cts +58 -0
- package/dist/qr-code.d.ts +58 -0
- package/dist/qr-code.js +132 -0
- package/dist/radio-group.cjs +222 -0
- package/dist/radio-group.d.cts +78 -0
- package/dist/radio-group.d.ts +78 -0
- package/dist/radio-group.js +196 -0
- package/dist/rating-group.cjs +186 -0
- package/dist/rating-group.d.cts +68 -0
- package/dist/rating-group.d.ts +68 -0
- package/dist/rating-group.js +162 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/rolldown-runtime-DakpK96I.cjs +43 -0
- package/dist/scroll-area.cjs +166 -0
- package/dist/scroll-area.d.cts +67 -0
- package/dist/scroll-area.d.ts +67 -0
- package/dist/scroll-area.js +143 -0
- package/dist/segment-group.cjs +215 -0
- package/dist/segment-group.d.cts +81 -0
- package/dist/segment-group.d.ts +81 -0
- package/dist/segment-group.js +194 -0
- package/dist/select.cjs +395 -0
- package/dist/select.d.cts +132 -0
- package/dist/select.d.ts +132 -0
- package/dist/select.js +358 -0
- package/dist/signature-pad.cjs +197 -0
- package/dist/signature-pad.d.cts +68 -0
- package/dist/signature-pad.d.ts +68 -0
- package/dist/signature-pad.js +173 -0
- package/dist/slider.cjs +260 -0
- package/dist/slider.d.cts +88 -0
- package/dist/slider.d.ts +88 -0
- package/dist/slider.js +232 -0
- package/dist/steps.cjs +271 -0
- package/dist/steps.d.cts +104 -0
- package/dist/steps.d.ts +104 -0
- package/dist/steps.js +241 -0
- package/dist/swap.cjs +134 -0
- package/dist/swap.d.cts +49 -0
- package/dist/swap.d.ts +49 -0
- package/dist/swap.js +121 -0
- package/dist/switch.cjs +166 -0
- package/dist/switch.d.cts +58 -0
- package/dist/switch.d.ts +58 -0
- package/dist/switch.js +144 -0
- package/dist/tabs.cjs +177 -0
- package/dist/tabs.d.cts +59 -0
- package/dist/tabs.d.ts +59 -0
- package/dist/tabs.js +155 -0
- package/dist/tags-input.cjs +298 -0
- package/dist/tags-input.d.cts +98 -0
- package/dist/tags-input.d.ts +98 -0
- package/dist/tags-input.js +268 -0
- package/dist/timer.cjs +167 -0
- package/dist/timer.d.cts +63 -0
- package/dist/timer.d.ts +63 -0
- package/dist/timer.js +144 -0
- package/dist/toast.cjs +154 -0
- package/dist/toast.d.cts +59 -0
- package/dist/toast.d.ts +59 -0
- package/dist/toast.js +132 -0
- package/dist/toggle-group.cjs +118 -0
- package/dist/toggle-group.d.cts +43 -0
- package/dist/toggle-group.d.ts +43 -0
- package/dist/toggle-group.js +99 -0
- package/dist/toggle.cjs +85 -0
- package/dist/toggle.d.cts +38 -0
- package/dist/toggle.d.ts +38 -0
- package/dist/toggle.js +71 -0
- package/dist/tooltip.cjs +154 -0
- package/dist/tooltip.d.cts +68 -0
- package/dist/tooltip.d.ts +68 -0
- package/dist/tooltip.js +131 -0
- package/dist/tour.cjs +290 -0
- package/dist/tour.d.cts +112 -0
- package/dist/tour.d.ts +112 -0
- package/dist/tour.js +246 -0
- package/dist/tree-view-CNTEWXlu.js +339 -0
- package/dist/tree-view-CU4Hl5X1.cjs +484 -0
- package/dist/tree-view.cjs +41 -0
- package/dist/tree-view.d.cts +3 -0
- package/dist/tree-view.d.ts +3 -0
- package/dist/tree-view.js +3 -0
- package/dist/types-BQQfrr86.d.cts +6 -0
- package/dist/types-BQQfrr86.d.ts +6 -0
- package/dist/use-context-38DKWHsx.cjs +20 -0
- package/dist/use-context-CITa6pn9.js +10 -0
- package/dist/utils-Cfwm9WW1.cjs +166 -0
- package/dist/utils-CqLmqrgj.js +107 -0
- package/package.json +274 -6
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
|
|
3
|
+
const require_utils = require("./utils-Cfwm9WW1.cjs");
|
|
4
|
+
const require_environment = require("./environment-B6IaCAuQ.cjs");
|
|
5
|
+
const require_core = require("./core-CBFAnVIP.cjs");
|
|
6
|
+
const require_factory = require("./factory-CFFufs5e.cjs");
|
|
7
|
+
const require_providers = require("./providers-DrJEJcrE.cjs");
|
|
8
|
+
const require_field = require("./field-x8H5uXB9.cjs");
|
|
9
|
+
let react = require("react");
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
let _wirekyt_dom_machines_pin_input = require("@wirekyt/dom/machines/pin-input");
|
|
12
|
+
_wirekyt_dom_machines_pin_input = require_rolldown_runtime.__toESM(_wirekyt_dom_machines_pin_input, 1);
|
|
13
|
+
let _wirekyt_dom = require("@wirekyt/dom");
|
|
14
|
+
//#region src/components/pin-input/use-context.ts
|
|
15
|
+
const [PinInputProvider, usePinInputContext] = require_utils.createContext({
|
|
16
|
+
name: "PinInputContext",
|
|
17
|
+
hookName: "usePinInputContext",
|
|
18
|
+
providerName: "<PinInputProvider />"
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/pin-input/context.tsx
|
|
22
|
+
const PinInputContext = (props) => props.children(usePinInputContext());
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/components/pin-input/control.tsx
|
|
25
|
+
const PinInputControl = (0, react.forwardRef)((props, ref) => {
|
|
26
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePinInputContext().getControlProps(), props);
|
|
27
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
28
|
+
...mergedProps,
|
|
29
|
+
ref
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
PinInputControl.displayName = "PinInputControl";
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/pin-input/hidden-input.tsx
|
|
35
|
+
const PinInputHiddenInput = (0, react.forwardRef)((props, ref) => {
|
|
36
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePinInputContext().getHiddenInputProps(), props);
|
|
37
|
+
const field = require_field.useFieldContext();
|
|
38
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.input, {
|
|
39
|
+
"aria-describedby": field?.ariaDescribedby,
|
|
40
|
+
...mergedProps,
|
|
41
|
+
ref
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
PinInputHiddenInput.displayName = "PinInputHiddenInput";
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/components/pin-input/input.tsx
|
|
47
|
+
const splitInputProps = require_utils.createSplitProps();
|
|
48
|
+
const PinInputInput = (0, react.forwardRef)((props, ref) => {
|
|
49
|
+
const [inputProps, localProps] = splitInputProps(props, ["index"]);
|
|
50
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePinInputContext().getInputProps(inputProps), localProps);
|
|
51
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.input, {
|
|
52
|
+
...mergedProps,
|
|
53
|
+
ref
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
PinInputInput.displayName = "PinInputInput";
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/components/pin-input/label.tsx
|
|
59
|
+
const PinInputLabel = (0, react.forwardRef)((props, ref) => {
|
|
60
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePinInputContext().getLabelProps(), props);
|
|
61
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.label, {
|
|
62
|
+
...mergedProps,
|
|
63
|
+
ref
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
PinInputLabel.displayName = "PinInputLabel";
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/components/pin-input/use.ts
|
|
69
|
+
const usePinInput = (props) => {
|
|
70
|
+
const id = (0, react.useId)();
|
|
71
|
+
const { getRootNode } = require_environment.useEnvironmentContext();
|
|
72
|
+
const { dir } = require_providers.useLocaleContext();
|
|
73
|
+
const field = require_field.useFieldContext();
|
|
74
|
+
const machineProps = {
|
|
75
|
+
id,
|
|
76
|
+
ids: {
|
|
77
|
+
label: field?.ids.label,
|
|
78
|
+
hiddenInput: field?.ids.control
|
|
79
|
+
},
|
|
80
|
+
disabled: field?.disabled,
|
|
81
|
+
readOnly: field?.readOnly,
|
|
82
|
+
required: field?.required,
|
|
83
|
+
invalid: field?.invalid,
|
|
84
|
+
dir,
|
|
85
|
+
getRootNode,
|
|
86
|
+
...props
|
|
87
|
+
};
|
|
88
|
+
const service = require_core.useMachine(_wirekyt_dom_machines_pin_input.machine, machineProps);
|
|
89
|
+
return _wirekyt_dom_machines_pin_input.connect(service, require_core.normalizeProps);
|
|
90
|
+
};
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/components/pin-input/root.tsx
|
|
93
|
+
const splitRootProps = require_utils.createSplitProps();
|
|
94
|
+
const PinInputRoot = (0, react.forwardRef)((props, ref) => {
|
|
95
|
+
const [usePinInputProps, localProps] = splitRootProps(props, [
|
|
96
|
+
"autoFocus",
|
|
97
|
+
"autoSubmit",
|
|
98
|
+
"blurOnComplete",
|
|
99
|
+
"count",
|
|
100
|
+
"defaultValue",
|
|
101
|
+
"disabled",
|
|
102
|
+
"form",
|
|
103
|
+
"id",
|
|
104
|
+
"ids",
|
|
105
|
+
"invalid",
|
|
106
|
+
"mask",
|
|
107
|
+
"name",
|
|
108
|
+
"onValueChange",
|
|
109
|
+
"onValueComplete",
|
|
110
|
+
"onValueInvalid",
|
|
111
|
+
"otp",
|
|
112
|
+
"pattern",
|
|
113
|
+
"placeholder",
|
|
114
|
+
"readOnly",
|
|
115
|
+
"required",
|
|
116
|
+
"sanitizeValue",
|
|
117
|
+
"selectOnFocus",
|
|
118
|
+
"translations",
|
|
119
|
+
"type",
|
|
120
|
+
"value"
|
|
121
|
+
]);
|
|
122
|
+
const pinInput = usePinInput(usePinInputProps);
|
|
123
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(pinInput.getRootProps(), localProps);
|
|
124
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PinInputProvider, {
|
|
125
|
+
value: pinInput,
|
|
126
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
127
|
+
...mergedProps,
|
|
128
|
+
ref
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
PinInputRoot.displayName = "PinInputRoot";
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/components/pin-input/root-provider.tsx
|
|
135
|
+
const splitRootProviderProps = require_utils.createSplitProps();
|
|
136
|
+
const PinInputRootProvider = (0, react.forwardRef)((props, ref) => {
|
|
137
|
+
const [{ value: pinInput }, localProps] = splitRootProviderProps(props, ["value"]);
|
|
138
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(pinInput.getRootProps(), localProps);
|
|
139
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PinInputProvider, {
|
|
140
|
+
value: pinInput,
|
|
141
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
142
|
+
...mergedProps,
|
|
143
|
+
ref
|
|
144
|
+
})
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
PinInputRootProvider.displayName = "PinInputRootProvider";
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/components/pin-input/pin-input.ts
|
|
150
|
+
var pin_input_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
151
|
+
Context: () => PinInputContext,
|
|
152
|
+
Control: () => PinInputControl,
|
|
153
|
+
HiddenInput: () => PinInputHiddenInput,
|
|
154
|
+
Input: () => PinInputInput,
|
|
155
|
+
Label: () => PinInputLabel,
|
|
156
|
+
Root: () => PinInputRoot,
|
|
157
|
+
RootProvider: () => PinInputRootProvider
|
|
158
|
+
});
|
|
159
|
+
//#endregion
|
|
160
|
+
Object.defineProperty(exports, "PinInput", {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
get: function() {
|
|
163
|
+
return pin_input_exports;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
exports.PinInputContext = PinInputContext;
|
|
167
|
+
exports.PinInputControl = PinInputControl;
|
|
168
|
+
exports.PinInputHiddenInput = PinInputHiddenInput;
|
|
169
|
+
exports.PinInputInput = PinInputInput;
|
|
170
|
+
exports.PinInputLabel = PinInputLabel;
|
|
171
|
+
exports.PinInputRoot = PinInputRoot;
|
|
172
|
+
exports.PinInputRootProvider = PinInputRootProvider;
|
|
173
|
+
Object.defineProperty(exports, "pinInputAnatomy", {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
get: function() {
|
|
176
|
+
return _wirekyt_dom_machines_pin_input.anatomy;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
exports.usePinInput = usePinInput;
|
|
180
|
+
exports.usePinInputContext = usePinInputContext;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { a as PropTypes } from "./index-CQAbOgb7.cjs";
|
|
2
|
+
import { r as Optional, t as Assign } from "./types-BQQfrr86.cjs";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "./factory--dkoVnFK.cjs";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
import * as pinInput from "@wirekyt/dom/machines/pin-input";
|
|
6
|
+
import { InputProps, ValueChangeDetails, ValueChangeDetails as PinInputValueChangeDetails, ValueInvalidDetails, ValueInvalidDetails as PinInputValueInvalidDetails, anatomy as pinInputAnatomy } from "@wirekyt/dom/machines/pin-input";
|
|
7
|
+
//#region src/components/pin-input/use.d.ts
|
|
8
|
+
interface UsePinInputProps extends Optional<Omit<pinInput.Props, "dir" | "getRootNode">, "id"> {}
|
|
9
|
+
interface UsePinInputReturn extends pinInput.Api<PropTypes> {}
|
|
10
|
+
declare const usePinInput: (props?: UsePinInputProps) => UsePinInputReturn;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/components/pin-input/use-context.d.ts
|
|
13
|
+
interface UsePinInputContext extends UsePinInputReturn {}
|
|
14
|
+
declare const PinInputProvider: import("react").Provider<UsePinInputContext>, usePinInputContext: () => UsePinInputContext;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/pin-input/context.d.ts
|
|
17
|
+
interface PinInputContextProps {
|
|
18
|
+
children: (context: UsePinInputContext) => ReactNode;
|
|
19
|
+
}
|
|
20
|
+
declare const PinInputContext: (props: PinInputContextProps) => ReactNode;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/pin-input/control.d.ts
|
|
23
|
+
interface PinInputControlBaseProps extends PolymorphicProps {}
|
|
24
|
+
interface PinInputControlProps extends HTMLProps<"div">, PinInputControlBaseProps {}
|
|
25
|
+
declare const PinInputControl: import("react").ForwardRefExoticComponent<PinInputControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/pin-input/hidden-input.d.ts
|
|
28
|
+
interface PinInputHiddenInputBaseProps extends PolymorphicProps {}
|
|
29
|
+
interface PinInputHiddenInputProps extends HTMLProps<"input">, PinInputHiddenInputBaseProps {}
|
|
30
|
+
declare const PinInputHiddenInput: import("react").ForwardRefExoticComponent<PinInputHiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/pin-input/input.d.ts
|
|
33
|
+
interface PinInputInputBaseProps extends InputProps, PolymorphicProps {}
|
|
34
|
+
interface PinInputInputProps extends HTMLProps<"input">, PinInputInputBaseProps {}
|
|
35
|
+
declare const PinInputInput: import("react").ForwardRefExoticComponent<PinInputInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/pin-input/label.d.ts
|
|
38
|
+
interface PinInputLabelBaseProps extends PolymorphicProps {}
|
|
39
|
+
interface PinInputLabelProps extends HTMLProps<"label">, PinInputLabelBaseProps {}
|
|
40
|
+
declare const PinInputLabel: import("react").ForwardRefExoticComponent<PinInputLabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/components/pin-input/root.d.ts
|
|
43
|
+
interface PinInputRootBaseProps extends UsePinInputProps, PolymorphicProps {}
|
|
44
|
+
interface PinInputRootProps extends Assign<HTMLProps<"div">, PinInputRootBaseProps> {}
|
|
45
|
+
declare const PinInputRoot: import("react").ForwardRefExoticComponent<PinInputRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/pin-input/root-provider.d.ts
|
|
48
|
+
interface RootProviderProps {
|
|
49
|
+
value: UsePinInputReturn;
|
|
50
|
+
}
|
|
51
|
+
interface PinInputRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
52
|
+
interface PinInputRootProviderProps extends HTMLProps<"div">, PinInputRootProviderBaseProps {}
|
|
53
|
+
declare const PinInputRootProvider: import("react").ForwardRefExoticComponent<PinInputRootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
54
|
+
declare namespace pin_input_d_exports {
|
|
55
|
+
export { PinInputContext as Context, PinInputContextProps as ContextProps, PinInputControl as Control, PinInputControlBaseProps as ControlBaseProps, PinInputControlProps as ControlProps, PinInputHiddenInput as HiddenInput, PinInputHiddenInputBaseProps as HiddenInputBaseProps, PinInputHiddenInputProps as HiddenInputProps, PinInputInput as Input, PinInputInputBaseProps as InputBaseProps, PinInputInputProps as InputProps, PinInputLabel as Label, PinInputLabelBaseProps as LabelBaseProps, PinInputLabelProps as LabelProps, PinInputRoot as Root, PinInputRootBaseProps as RootBaseProps, PinInputRootProps as RootProps, PinInputRootProvider as RootProvider, PinInputRootProviderBaseProps as RootProviderBaseProps, PinInputRootProviderProps as RootProviderProps, ValueChangeDetails, ValueInvalidDetails };
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { pin_input_d_exports as PinInput, PinInputContext, type PinInputContextProps, PinInputControl, type PinInputControlBaseProps, type PinInputControlProps, PinInputHiddenInput, type PinInputHiddenInputBaseProps, type PinInputHiddenInputProps, PinInputInput, type PinInputInputBaseProps, type PinInputInputProps, PinInputLabel, type PinInputLabelBaseProps, type PinInputLabelProps, PinInputRoot, type PinInputRootBaseProps, type PinInputRootProps, PinInputRootProvider, type PinInputRootProviderBaseProps, type PinInputRootProviderProps, type PinInputValueChangeDetails, type PinInputValueInvalidDetails, type UsePinInputContext, type UsePinInputProps, type UsePinInputReturn, pinInputAnatomy, usePinInput, usePinInputContext };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { a as PropTypes } from "./index-CxWYgVJk.js";
|
|
2
|
+
import { r as Optional, t as Assign } from "./types-BQQfrr86.js";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "./factory--dkoVnFK.js";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
import * as pinInput from "@wirekyt/dom/machines/pin-input";
|
|
6
|
+
import { InputProps, ValueChangeDetails, ValueChangeDetails as PinInputValueChangeDetails, ValueInvalidDetails, ValueInvalidDetails as PinInputValueInvalidDetails, anatomy as pinInputAnatomy } from "@wirekyt/dom/machines/pin-input";
|
|
7
|
+
//#region src/components/pin-input/use.d.ts
|
|
8
|
+
interface UsePinInputProps extends Optional<Omit<pinInput.Props, "dir" | "getRootNode">, "id"> {}
|
|
9
|
+
interface UsePinInputReturn extends pinInput.Api<PropTypes> {}
|
|
10
|
+
declare const usePinInput: (props?: UsePinInputProps) => UsePinInputReturn;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/components/pin-input/use-context.d.ts
|
|
13
|
+
interface UsePinInputContext extends UsePinInputReturn {}
|
|
14
|
+
declare const PinInputProvider: import("react").Provider<UsePinInputContext>, usePinInputContext: () => UsePinInputContext;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/pin-input/context.d.ts
|
|
17
|
+
interface PinInputContextProps {
|
|
18
|
+
children: (context: UsePinInputContext) => ReactNode;
|
|
19
|
+
}
|
|
20
|
+
declare const PinInputContext: (props: PinInputContextProps) => ReactNode;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/pin-input/control.d.ts
|
|
23
|
+
interface PinInputControlBaseProps extends PolymorphicProps {}
|
|
24
|
+
interface PinInputControlProps extends HTMLProps<"div">, PinInputControlBaseProps {}
|
|
25
|
+
declare const PinInputControl: import("react").ForwardRefExoticComponent<PinInputControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/pin-input/hidden-input.d.ts
|
|
28
|
+
interface PinInputHiddenInputBaseProps extends PolymorphicProps {}
|
|
29
|
+
interface PinInputHiddenInputProps extends HTMLProps<"input">, PinInputHiddenInputBaseProps {}
|
|
30
|
+
declare const PinInputHiddenInput: import("react").ForwardRefExoticComponent<PinInputHiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/pin-input/input.d.ts
|
|
33
|
+
interface PinInputInputBaseProps extends InputProps, PolymorphicProps {}
|
|
34
|
+
interface PinInputInputProps extends HTMLProps<"input">, PinInputInputBaseProps {}
|
|
35
|
+
declare const PinInputInput: import("react").ForwardRefExoticComponent<PinInputInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/pin-input/label.d.ts
|
|
38
|
+
interface PinInputLabelBaseProps extends PolymorphicProps {}
|
|
39
|
+
interface PinInputLabelProps extends HTMLProps<"label">, PinInputLabelBaseProps {}
|
|
40
|
+
declare const PinInputLabel: import("react").ForwardRefExoticComponent<PinInputLabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/components/pin-input/root.d.ts
|
|
43
|
+
interface PinInputRootBaseProps extends UsePinInputProps, PolymorphicProps {}
|
|
44
|
+
interface PinInputRootProps extends Assign<HTMLProps<"div">, PinInputRootBaseProps> {}
|
|
45
|
+
declare const PinInputRoot: import("react").ForwardRefExoticComponent<PinInputRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/pin-input/root-provider.d.ts
|
|
48
|
+
interface RootProviderProps {
|
|
49
|
+
value: UsePinInputReturn;
|
|
50
|
+
}
|
|
51
|
+
interface PinInputRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
52
|
+
interface PinInputRootProviderProps extends HTMLProps<"div">, PinInputRootProviderBaseProps {}
|
|
53
|
+
declare const PinInputRootProvider: import("react").ForwardRefExoticComponent<PinInputRootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
54
|
+
declare namespace pin_input_d_exports {
|
|
55
|
+
export { PinInputContext as Context, PinInputContextProps as ContextProps, PinInputControl as Control, PinInputControlBaseProps as ControlBaseProps, PinInputControlProps as ControlProps, PinInputHiddenInput as HiddenInput, PinInputHiddenInputBaseProps as HiddenInputBaseProps, PinInputHiddenInputProps as HiddenInputProps, PinInputInput as Input, PinInputInputBaseProps as InputBaseProps, PinInputInputProps as InputProps, PinInputLabel as Label, PinInputLabelBaseProps as LabelBaseProps, PinInputLabelProps as LabelProps, PinInputRoot as Root, PinInputRootBaseProps as RootBaseProps, PinInputRootProps as RootProps, PinInputRootProvider as RootProvider, PinInputRootProviderBaseProps as RootProviderBaseProps, PinInputRootProviderProps as RootProviderProps, ValueChangeDetails, ValueInvalidDetails };
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { pin_input_d_exports as PinInput, PinInputContext, type PinInputContextProps, PinInputControl, type PinInputControlBaseProps, type PinInputControlProps, PinInputHiddenInput, type PinInputHiddenInputBaseProps, type PinInputHiddenInputProps, PinInputInput, type PinInputInputBaseProps, type PinInputInputProps, PinInputLabel, type PinInputLabelBaseProps, type PinInputLabelProps, PinInputRoot, type PinInputRootBaseProps, type PinInputRootProps, PinInputRootProvider, type PinInputRootProviderBaseProps, type PinInputRootProviderProps, type PinInputValueChangeDetails, type PinInputValueInvalidDetails, type UsePinInputContext, type UsePinInputProps, type UsePinInputReturn, pinInputAnatomy, usePinInput, usePinInputContext };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { c as createSplitProps, u as createContext$1 } from "./utils-CqLmqrgj.js";
|
|
3
|
+
import { n as useEnvironmentContext } from "./environment-BTgKwk5E.js";
|
|
4
|
+
import { a as useMachine, i as normalizeProps, t as mergeProps } from "./core-CEYOEcVI.js";
|
|
5
|
+
import { n as wire } from "./factory-Nm__-4xn.js";
|
|
6
|
+
import { a as useLocaleContext } from "./providers-FEHnDTvb.js";
|
|
7
|
+
import { h as useFieldContext } from "./field-Cy1E02DH.js";
|
|
8
|
+
import { forwardRef, useId } from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import * as pinInput from "@wirekyt/dom/machines/pin-input";
|
|
11
|
+
import { anatomy as pinInputAnatomy } from "@wirekyt/dom/machines/pin-input";
|
|
12
|
+
//#region src/components/pin-input/use-context.ts
|
|
13
|
+
const [PinInputProvider, usePinInputContext] = createContext$1({
|
|
14
|
+
name: "PinInputContext",
|
|
15
|
+
hookName: "usePinInputContext",
|
|
16
|
+
providerName: "<PinInputProvider />"
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/components/pin-input/context.tsx
|
|
20
|
+
const PinInputContext = (props) => props.children(usePinInputContext());
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/pin-input/control.tsx
|
|
23
|
+
const PinInputControl = forwardRef((props, ref) => {
|
|
24
|
+
const mergedProps = mergeProps(usePinInputContext().getControlProps(), props);
|
|
25
|
+
return /* @__PURE__ */ jsx(wire.div, {
|
|
26
|
+
...mergedProps,
|
|
27
|
+
ref
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
PinInputControl.displayName = "PinInputControl";
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/pin-input/hidden-input.tsx
|
|
33
|
+
const PinInputHiddenInput = forwardRef((props, ref) => {
|
|
34
|
+
const mergedProps = mergeProps(usePinInputContext().getHiddenInputProps(), props);
|
|
35
|
+
const field = useFieldContext();
|
|
36
|
+
return /* @__PURE__ */ jsx(wire.input, {
|
|
37
|
+
"aria-describedby": field?.ariaDescribedby,
|
|
38
|
+
...mergedProps,
|
|
39
|
+
ref
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
PinInputHiddenInput.displayName = "PinInputHiddenInput";
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/pin-input/input.tsx
|
|
45
|
+
const splitInputProps = createSplitProps();
|
|
46
|
+
const PinInputInput = forwardRef((props, ref) => {
|
|
47
|
+
const [inputProps, localProps] = splitInputProps(props, ["index"]);
|
|
48
|
+
const mergedProps = mergeProps(usePinInputContext().getInputProps(inputProps), localProps);
|
|
49
|
+
return /* @__PURE__ */ jsx(wire.input, {
|
|
50
|
+
...mergedProps,
|
|
51
|
+
ref
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
PinInputInput.displayName = "PinInputInput";
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/components/pin-input/label.tsx
|
|
57
|
+
const PinInputLabel = forwardRef((props, ref) => {
|
|
58
|
+
const mergedProps = mergeProps(usePinInputContext().getLabelProps(), props);
|
|
59
|
+
return /* @__PURE__ */ jsx(wire.label, {
|
|
60
|
+
...mergedProps,
|
|
61
|
+
ref
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
PinInputLabel.displayName = "PinInputLabel";
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/pin-input/use.ts
|
|
67
|
+
const usePinInput = (props) => {
|
|
68
|
+
const id = useId();
|
|
69
|
+
const { getRootNode } = useEnvironmentContext();
|
|
70
|
+
const { dir } = useLocaleContext();
|
|
71
|
+
const field = useFieldContext();
|
|
72
|
+
const machineProps = {
|
|
73
|
+
id,
|
|
74
|
+
ids: {
|
|
75
|
+
label: field?.ids.label,
|
|
76
|
+
hiddenInput: field?.ids.control
|
|
77
|
+
},
|
|
78
|
+
disabled: field?.disabled,
|
|
79
|
+
readOnly: field?.readOnly,
|
|
80
|
+
required: field?.required,
|
|
81
|
+
invalid: field?.invalid,
|
|
82
|
+
dir,
|
|
83
|
+
getRootNode,
|
|
84
|
+
...props
|
|
85
|
+
};
|
|
86
|
+
const service = useMachine(pinInput.machine, machineProps);
|
|
87
|
+
return pinInput.connect(service, normalizeProps);
|
|
88
|
+
};
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/components/pin-input/root.tsx
|
|
91
|
+
const splitRootProps = createSplitProps();
|
|
92
|
+
const PinInputRoot = forwardRef((props, ref) => {
|
|
93
|
+
const [usePinInputProps, localProps] = splitRootProps(props, [
|
|
94
|
+
"autoFocus",
|
|
95
|
+
"autoSubmit",
|
|
96
|
+
"blurOnComplete",
|
|
97
|
+
"count",
|
|
98
|
+
"defaultValue",
|
|
99
|
+
"disabled",
|
|
100
|
+
"form",
|
|
101
|
+
"id",
|
|
102
|
+
"ids",
|
|
103
|
+
"invalid",
|
|
104
|
+
"mask",
|
|
105
|
+
"name",
|
|
106
|
+
"onValueChange",
|
|
107
|
+
"onValueComplete",
|
|
108
|
+
"onValueInvalid",
|
|
109
|
+
"otp",
|
|
110
|
+
"pattern",
|
|
111
|
+
"placeholder",
|
|
112
|
+
"readOnly",
|
|
113
|
+
"required",
|
|
114
|
+
"sanitizeValue",
|
|
115
|
+
"selectOnFocus",
|
|
116
|
+
"translations",
|
|
117
|
+
"type",
|
|
118
|
+
"value"
|
|
119
|
+
]);
|
|
120
|
+
const pinInput = usePinInput(usePinInputProps);
|
|
121
|
+
const mergedProps = mergeProps(pinInput.getRootProps(), localProps);
|
|
122
|
+
return /* @__PURE__ */ jsx(PinInputProvider, {
|
|
123
|
+
value: pinInput,
|
|
124
|
+
children: /* @__PURE__ */ jsx(wire.div, {
|
|
125
|
+
...mergedProps,
|
|
126
|
+
ref
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
PinInputRoot.displayName = "PinInputRoot";
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/components/pin-input/root-provider.tsx
|
|
133
|
+
const splitRootProviderProps = createSplitProps();
|
|
134
|
+
const PinInputRootProvider = forwardRef((props, ref) => {
|
|
135
|
+
const [{ value: pinInput }, localProps] = splitRootProviderProps(props, ["value"]);
|
|
136
|
+
const mergedProps = mergeProps(pinInput.getRootProps(), localProps);
|
|
137
|
+
return /* @__PURE__ */ jsx(PinInputProvider, {
|
|
138
|
+
value: pinInput,
|
|
139
|
+
children: /* @__PURE__ */ jsx(wire.div, {
|
|
140
|
+
...mergedProps,
|
|
141
|
+
ref
|
|
142
|
+
})
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
PinInputRootProvider.displayName = "PinInputRootProvider";
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/components/pin-input/pin-input.ts
|
|
148
|
+
var pin_input_exports = /* @__PURE__ */ __exportAll({
|
|
149
|
+
Context: () => PinInputContext,
|
|
150
|
+
Control: () => PinInputControl,
|
|
151
|
+
HiddenInput: () => PinInputHiddenInput,
|
|
152
|
+
Input: () => PinInputInput,
|
|
153
|
+
Label: () => PinInputLabel,
|
|
154
|
+
Root: () => PinInputRoot,
|
|
155
|
+
RootProvider: () => PinInputRootProvider
|
|
156
|
+
});
|
|
157
|
+
//#endregion
|
|
158
|
+
export { pin_input_exports as PinInput, PinInputContext, PinInputControl, PinInputHiddenInput, PinInputInput, PinInputLabel, PinInputRoot, PinInputRootProvider, pinInputAnatomy, usePinInput, usePinInputContext };
|
package/dist/popover.cjs
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
|
|
3
|
+
const require_utils = require("./utils-Cfwm9WW1.cjs");
|
|
4
|
+
const require_environment = require("./environment-B6IaCAuQ.cjs");
|
|
5
|
+
const require_core = require("./core-CBFAnVIP.cjs");
|
|
6
|
+
const require_factory = require("./factory-CFFufs5e.cjs");
|
|
7
|
+
const require_providers = require("./providers-DrJEJcrE.cjs");
|
|
8
|
+
const require_presence = require("./presence-BOs-D6Cv.cjs");
|
|
9
|
+
let react = require("react");
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
let _wirekyt_dom_machines_popover = require("@wirekyt/dom/machines/popover");
|
|
12
|
+
_wirekyt_dom_machines_popover = require_rolldown_runtime.__toESM(_wirekyt_dom_machines_popover, 1);
|
|
13
|
+
let _wirekyt_dom = require("@wirekyt/dom");
|
|
14
|
+
//#region src/components/popover/use-context.ts
|
|
15
|
+
const [PopoverProvider, usePopoverContext] = require_utils.createContext({
|
|
16
|
+
name: "PopoverContext",
|
|
17
|
+
hookName: "usePopoverContext",
|
|
18
|
+
providerName: "<PopoverProvider />"
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/popover/anchor.tsx
|
|
22
|
+
const PopoverAnchor = (0, react.forwardRef)((props, ref) => {
|
|
23
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePopoverContext().getAnchorProps(), props);
|
|
24
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
25
|
+
...mergedProps,
|
|
26
|
+
ref
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
PopoverAnchor.displayName = "PopoverAnchor";
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/popover/arrow.tsx
|
|
32
|
+
const PopoverArrow = (0, react.forwardRef)((props, ref) => {
|
|
33
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePopoverContext().getArrowProps(), props);
|
|
34
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
35
|
+
...mergedProps,
|
|
36
|
+
ref
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
PopoverArrow.displayName = "PopoverArrow";
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/components/popover/arrow-tip.tsx
|
|
42
|
+
const PopoverArrowTip = (0, react.forwardRef)((props, ref) => {
|
|
43
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePopoverContext().getArrowTipProps(), props);
|
|
44
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
45
|
+
...mergedProps,
|
|
46
|
+
ref
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
PopoverArrowTip.displayName = "PopoverArrowTip";
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/components/popover/close-trigger.tsx
|
|
52
|
+
const PopoverCloseTrigger = (0, react.forwardRef)((props, ref) => {
|
|
53
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePopoverContext().getCloseTriggerProps(), props);
|
|
54
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.button, {
|
|
55
|
+
...mergedProps,
|
|
56
|
+
ref
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
PopoverCloseTrigger.displayName = "PopoverCloseTrigger";
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/popover/content.tsx
|
|
62
|
+
const PopoverContent = (0, react.forwardRef)((props, ref) => {
|
|
63
|
+
const popover = usePopoverContext();
|
|
64
|
+
const presence = require_presence.usePresenceContext();
|
|
65
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(popover.getContentProps(), presence.getPresenceProps(), props);
|
|
66
|
+
const composedRefs = require_utils.useComposedRefs(presence.ref, ref);
|
|
67
|
+
if (presence.unmounted) return null;
|
|
68
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
69
|
+
...mergedProps,
|
|
70
|
+
ref: composedRefs
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
PopoverContent.displayName = "PopoverContent";
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/components/popover/context.tsx
|
|
76
|
+
const PopoverContext = (props) => props.children(usePopoverContext());
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/popover/description.tsx
|
|
79
|
+
const PopoverDescription = (0, react.forwardRef)((props, ref) => {
|
|
80
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePopoverContext().getDescriptionProps(), props);
|
|
81
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
82
|
+
...mergedProps,
|
|
83
|
+
ref
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
PopoverDescription.displayName = "PopoverDescription";
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/components/popover/indicator.tsx
|
|
89
|
+
const PopoverIndicator = (0, react.forwardRef)((props, ref) => {
|
|
90
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePopoverContext().getIndicatorProps(), props);
|
|
91
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
92
|
+
...mergedProps,
|
|
93
|
+
ref
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
PopoverIndicator.displayName = "PopoverIndicator";
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/components/popover/positioner.tsx
|
|
99
|
+
const PopoverPositioner = (0, react.forwardRef)((props, ref) => {
|
|
100
|
+
const popover = usePopoverContext();
|
|
101
|
+
const presence = require_presence.usePresenceContext();
|
|
102
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(popover.getPositionerProps(), props);
|
|
103
|
+
if (presence.unmounted) return null;
|
|
104
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
105
|
+
...mergedProps,
|
|
106
|
+
ref
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
PopoverPositioner.displayName = "PopoverPositioner";
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/components/popover/use.ts
|
|
112
|
+
const usePopover = (props) => {
|
|
113
|
+
const id = (0, react.useId)();
|
|
114
|
+
const { getRootNode } = require_environment.useEnvironmentContext();
|
|
115
|
+
const { dir } = require_providers.useLocaleContext();
|
|
116
|
+
const machineProps = {
|
|
117
|
+
id,
|
|
118
|
+
dir,
|
|
119
|
+
getRootNode,
|
|
120
|
+
...props
|
|
121
|
+
};
|
|
122
|
+
const service = require_core.useMachine(_wirekyt_dom_machines_popover.machine, machineProps);
|
|
123
|
+
return _wirekyt_dom_machines_popover.connect(service, require_core.normalizeProps);
|
|
124
|
+
};
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/components/popover/root.tsx
|
|
127
|
+
const PopoverRoot = (props) => {
|
|
128
|
+
const [presenceProps, { children, ...localProps }] = require_presence.splitPresenceProps(props);
|
|
129
|
+
const popover = usePopover(localProps);
|
|
130
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverProvider, {
|
|
131
|
+
value: popover,
|
|
132
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_presence.PresenceProvider, {
|
|
133
|
+
value: require_presence.usePresence((0, _wirekyt_dom.mergeProps)({ present: popover.open }, presenceProps)),
|
|
134
|
+
children
|
|
135
|
+
})
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/components/popover/root-provider.tsx
|
|
140
|
+
const PopoverRootProvider = (props) => {
|
|
141
|
+
const [presenceProps, { value: popover, children }] = require_presence.splitPresenceProps(props);
|
|
142
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverProvider, {
|
|
143
|
+
value: popover,
|
|
144
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_presence.PresenceProvider, {
|
|
145
|
+
value: require_presence.usePresence((0, _wirekyt_dom.mergeProps)({ present: popover.open }, presenceProps)),
|
|
146
|
+
children
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/components/popover/title.tsx
|
|
152
|
+
const PopoverTitle = (0, react.forwardRef)((props, ref) => {
|
|
153
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)(usePopoverContext().getTitleProps(), props);
|
|
154
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.div, {
|
|
155
|
+
...mergedProps,
|
|
156
|
+
ref
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
PopoverTitle.displayName = "PopoverTitle";
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region src/components/popover/trigger.tsx
|
|
162
|
+
const splitTriggerProps = require_utils.createSplitProps();
|
|
163
|
+
const PopoverTrigger = (0, react.forwardRef)((props, ref) => {
|
|
164
|
+
const [triggerProps, localProps] = splitTriggerProps(props, ["value"]);
|
|
165
|
+
const popover = usePopoverContext();
|
|
166
|
+
const presence = require_presence.usePresenceContext();
|
|
167
|
+
const triggerPropsRaw = popover.getTriggerProps(triggerProps);
|
|
168
|
+
const mergedProps = (0, _wirekyt_dom.mergeProps)({
|
|
169
|
+
...triggerPropsRaw,
|
|
170
|
+
"aria-controls": presence.unmounted ? void 0 : triggerPropsRaw["aria-controls"]
|
|
171
|
+
}, localProps);
|
|
172
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.wire.button, {
|
|
173
|
+
...mergedProps,
|
|
174
|
+
ref
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region src/components/popover/popover.ts
|
|
180
|
+
var popover_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
181
|
+
Anchor: () => PopoverAnchor,
|
|
182
|
+
Arrow: () => PopoverArrow,
|
|
183
|
+
ArrowTip: () => PopoverArrowTip,
|
|
184
|
+
CloseTrigger: () => PopoverCloseTrigger,
|
|
185
|
+
Content: () => PopoverContent,
|
|
186
|
+
Context: () => PopoverContext,
|
|
187
|
+
Description: () => PopoverDescription,
|
|
188
|
+
Indicator: () => PopoverIndicator,
|
|
189
|
+
Positioner: () => PopoverPositioner,
|
|
190
|
+
Root: () => PopoverRoot,
|
|
191
|
+
RootProvider: () => PopoverRootProvider,
|
|
192
|
+
Title: () => PopoverTitle,
|
|
193
|
+
Trigger: () => PopoverTrigger
|
|
194
|
+
});
|
|
195
|
+
//#endregion
|
|
196
|
+
Object.defineProperty(exports, "Popover", {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
get: function() {
|
|
199
|
+
return popover_exports;
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
203
|
+
exports.PopoverArrow = PopoverArrow;
|
|
204
|
+
exports.PopoverArrowTip = PopoverArrowTip;
|
|
205
|
+
exports.PopoverCloseTrigger = PopoverCloseTrigger;
|
|
206
|
+
exports.PopoverContent = PopoverContent;
|
|
207
|
+
exports.PopoverContext = PopoverContext;
|
|
208
|
+
exports.PopoverDescription = PopoverDescription;
|
|
209
|
+
exports.PopoverIndicator = PopoverIndicator;
|
|
210
|
+
exports.PopoverPositioner = PopoverPositioner;
|
|
211
|
+
exports.PopoverRoot = PopoverRoot;
|
|
212
|
+
exports.PopoverRootProvider = PopoverRootProvider;
|
|
213
|
+
exports.PopoverTitle = PopoverTitle;
|
|
214
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
215
|
+
Object.defineProperty(exports, "popoverAnatomy", {
|
|
216
|
+
enumerable: true,
|
|
217
|
+
get: function() {
|
|
218
|
+
return _wirekyt_dom_machines_popover.anatomy;
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
exports.usePopover = usePopover;
|
|
222
|
+
exports.usePopoverContext = usePopoverContext;
|