@wirecore/wirelayer-react 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button-Cd7lufvJ.js +60 -0
- package/dist/Checkbox-BMRax6m4.js +49 -0
- package/dist/ContextMenu-BD72S5n6.js +1452 -0
- package/dist/{Field-hc416yJx.js → Field-DkYxlVar.js} +5 -2
- package/dist/Highlight-43-H9459.js +302 -0
- package/dist/Input-C8T3WLd5.js +119 -0
- package/dist/{InputStatus-DS38XEkX.js → InputStatus-hVzkU_4q.js} +4 -1
- package/dist/PasswordInput-SjO66gZB.js +422 -0
- package/dist/Select-7rfeNmJb.js +242 -0
- package/dist/Slider-Bfm_jjYE.js +80 -0
- package/dist/{Tree-eqv4DIQn.js → Tree-DVjwp6FG.js} +2 -2
- package/dist/chart/Chart.d.ts +11 -5
- package/dist/chart/Chart.d.ts.map +1 -1
- package/dist/chart/index.d.ts +2 -0
- package/dist/chart/index.d.ts.map +1 -1
- package/dist/chart.js +44 -37
- package/dist/code.js +1 -1
- package/dist/components/AngleSlider/AngleSlider.d.ts +3 -1
- package/dist/components/AngleSlider/AngleSlider.d.ts.map +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts +3 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +6 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +3 -1
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/CascadeSelect/CascadeSelect.d.ts +3 -1
- package/dist/components/CascadeSelect/CascadeSelect.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/ChipGroup/ChipGroup.d.ts +1 -1
- package/dist/components/ChipGroup/ChipGroup.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +3 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.d.ts +7 -2
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/Confirm/ConfirmDialog.d.ts +6 -1
- package/dist/components/Confirm/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/Confirm/confirm.d.ts +7 -0
- package/dist/components/Confirm/confirm.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +5 -1
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerBase.d.ts +5 -1
- package/dist/components/DatePicker/DatePickerBase.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +5 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +8 -2
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +3 -1
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/DurationInput/DurationInput.d.ts +3 -1
- package/dist/components/DurationInput/DurationInput.d.ts.map +1 -1
- package/dist/components/Field/context.d.ts +3 -1
- package/dist/components/Field/context.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +9 -2
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +5 -1
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/Knob/Knob.d.ts +3 -1
- package/dist/components/Knob/Knob.d.ts.map +1 -1
- package/dist/components/Listbox/Listbox.d.ts +3 -1
- package/dist/components/Listbox/Listbox.d.ts.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.d.ts +5 -1
- package/dist/components/MonthPicker/MonthPicker.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +7 -2
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/PinInput/PinInput.d.ts +3 -1
- package/dist/components/PinInput/PinInput.d.ts.map +1 -1
- package/dist/components/QuarterPicker/QuarterPicker.d.ts +3 -1
- package/dist/components/QuarterPicker/QuarterPicker.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/Rating/Rating.d.ts +3 -1
- package/dist/components/Rating/Rating.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +3 -3
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +9 -2
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/list.d.ts +6 -1
- package/dist/components/Select/list.d.ts.map +1 -1
- package/dist/components/SelectionCard/SelectionCard.d.ts +1 -1
- package/dist/components/SelectionCard/SelectionCard.d.ts.map +1 -1
- package/dist/components/Slider/Slider.d.ts +3 -1
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/TagsInput/TagsInput.d.ts +3 -1
- package/dist/components/TagsInput/TagsInput.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.d.ts +3 -1
- package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/components/TimeRangePicker/TimeRangePicker.d.ts +3 -1
- package/dist/components/TimeRangePicker/TimeRangePicker.d.ts.map +1 -1
- package/dist/components/Toast/Toaster.d.ts +10 -2
- package/dist/components/Toast/Toaster.d.ts.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.d.ts +7 -1
- package/dist/components/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +3 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/TreeSelect/TreeSelect.d.ts +3 -1
- package/dist/components/TreeSelect/TreeSelect.d.ts.map +1 -1
- package/dist/components/YearPicker/YearPicker.d.ts +5 -1
- package/dist/components/YearPicker/YearPicker.d.ts.map +1 -1
- package/dist/data-table/DataTable.d.ts +28 -2
- package/dist/data-table/DataTable.d.ts.map +1 -1
- package/dist/data-table/FilterMenu.d.ts +7 -1
- package/dist/data-table/FilterMenu.d.ts.map +1 -1
- package/dist/data-table/ValueInput.d.ts +8 -1
- package/dist/data-table/ValueInput.d.ts.map +1 -1
- package/dist/data-table/index.d.ts +1 -1
- package/dist/data-table/index.d.ts.map +1 -1
- package/dist/data-table/types.d.ts +29 -1
- package/dist/data-table/types.d.ts.map +1 -1
- package/dist/data-table.js +1220 -1142
- package/dist/editor.js +2 -2
- package/dist/form/FormField.d.ts +5 -1
- package/dist/form/FormField.d.ts.map +1 -1
- package/dist/form.js +9 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3516 -3407
- package/dist/label-for-DYgV5EwH.js +9 -0
- package/dist/pdf.js +5 -5
- package/dist/sources/ActionBar.css +1 -0
- package/dist/sources/AppShell.css +1 -0
- package/dist/sources/ChatPrompt.css +1 -0
- package/dist/sources/Gallery.css +1 -0
- package/dist/sources/IconButton.css +1 -0
- package/dist/sources/Image.css +1 -0
- package/dist/sources/ImageCropper.css +1 -0
- package/dist/sources/InlineEdit.css +1 -0
- package/dist/sources/Marquee.css +1 -0
- package/dist/sources/MegaMenu.css +1 -0
- package/dist/sources/Menubar.css +1 -0
- package/dist/sources/OrderList.css +1 -0
- package/dist/sources/PickList.css +1 -0
- package/dist/sources/ScrollTop.css +1 -0
- package/dist/utils/label-for.d.ts +3 -0
- package/dist/utils/label-for.d.ts.map +1 -0
- package/dist/virtual/VirtualSelect.d.ts +1 -1
- package/dist/virtual/VirtualSelect.d.ts.map +1 -1
- package/dist/virtual.js +245 -236
- package/fonts.css +2 -0
- package/llms-full.txt +215 -14
- package/llms.txt +4 -1
- package/package.json +7 -3
- package/theme.css +14 -0
- package/dist/Button-DFVVqBuY.js +0 -58
- package/dist/Checkbox-CZTyKWId.js +0 -44
- package/dist/ContextMenu-qh-bB9Lw.js +0 -1426
- package/dist/Highlight-DdTridk2.js +0 -291
- package/dist/Input-OPRvjIYt.js +0 -108
- package/dist/PasswordInput-B9k0GuSx.js +0 -420
- package/dist/Select-PbxrUYi1.js +0 -233
- package/dist/Slider-x-SsBc1d.js +0 -74
|
@@ -1,420 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { a as e, n as t } from "./RecipesProvider-0idafuGm.js";
|
|
3
|
-
import { r as n, t as r } from "./InputStatus-DS38XEkX.js";
|
|
4
|
-
import { checkPasswordRequirements as i, clampDialogOffset as a, closeTab as o, dialog as s, dialogMoveForKey as c, dialogMoveKeys as l, passwordInput as u, passwordStrength as d, scrollEdges as f, setTextControlValue as p, tabs as m } from "@wirecore/wirelayer-recipes";
|
|
5
|
-
import { Check as h, ChevronLeft as g, ChevronRight as _, Circle as v, Eye as y, EyeOff as b, Maximize2 as x, Minimize2 as S, X as C } from "lucide-react";
|
|
6
|
-
import { createContext as w, useContext as T, useEffect as E, useId as D, useRef as O, useState as k } from "react";
|
|
7
|
-
import { jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
8
|
-
import { Portal as M } from "@ark-ui/react/portal";
|
|
9
|
-
import { useFieldContext as N } from "@ark-ui/react/field";
|
|
10
|
-
import { Tabs as P } from "@ark-ui/react/tabs";
|
|
11
|
-
import { Dialog as F, useDialogContext as I } from "@ark-ui/react/dialog";
|
|
12
|
-
import { PasswordInput as L } from "@ark-ui/react/password-input";
|
|
13
|
-
//#region src/components/Tabs/Tabs.tsx
|
|
14
|
-
function R({ classes: e, value: n, defaultValue: r, onValueChange: i, label: a, orientation: o, activationMode: s, lazyMount: c, unmountOnExit: l, className: u, ...d }) {
|
|
15
|
-
let f = t("tabs", m, e)();
|
|
16
|
-
return /* @__PURE__ */ A(P.Root, {
|
|
17
|
-
...d,
|
|
18
|
-
className: f.base({ class: u }),
|
|
19
|
-
value: n,
|
|
20
|
-
defaultValue: r,
|
|
21
|
-
onValueChange: (e) => i?.(e.value),
|
|
22
|
-
orientation: o,
|
|
23
|
-
activationMode: s,
|
|
24
|
-
lazyMount: c,
|
|
25
|
-
unmountOnExit: l,
|
|
26
|
-
translations: a ? { listLabel: a } : void 0
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function z({ scrollable: e = !1, className: n, children: r, ...i }) {
|
|
30
|
-
let a = t("tabs", m)(), o = O(null), [s, c] = k({
|
|
31
|
-
start: !1,
|
|
32
|
-
end: !1
|
|
33
|
-
}), l = () => o.current && c(f(o.current));
|
|
34
|
-
E(() => {
|
|
35
|
-
if (!e || !o.current) return;
|
|
36
|
-
l();
|
|
37
|
-
let t = new ResizeObserver(l);
|
|
38
|
-
return t.observe(o.current), () => t.disconnect();
|
|
39
|
-
}, [e]);
|
|
40
|
-
let u = (e) => {
|
|
41
|
-
let t = o.current;
|
|
42
|
-
if (!t) return;
|
|
43
|
-
let n = getComputedStyle(t).direction === "rtl", r = t.clientWidth * .8 * (e ? 1 : -1) * (n ? -1 : 1), i = !matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
44
|
-
t.scrollBy({
|
|
45
|
-
left: r,
|
|
46
|
-
behavior: i ? "smooth" : "auto"
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
return e ? /* @__PURE__ */ j("div", {
|
|
50
|
-
className: a.scroller(),
|
|
51
|
-
children: [
|
|
52
|
-
s.start && /* @__PURE__ */ A("button", {
|
|
53
|
-
type: "button",
|
|
54
|
-
tabIndex: -1,
|
|
55
|
-
"aria-hidden": "true",
|
|
56
|
-
"data-side": "start",
|
|
57
|
-
className: a.scrollButton(),
|
|
58
|
-
onClick: () => u(!1),
|
|
59
|
-
children: /* @__PURE__ */ A(g, { className: a.scrollIcon() })
|
|
60
|
-
}),
|
|
61
|
-
/* @__PURE__ */ A(P.List, {
|
|
62
|
-
...i,
|
|
63
|
-
ref: o,
|
|
64
|
-
className: a.list({ class: [a.scrollList(), n] }),
|
|
65
|
-
onScroll: (e) => {
|
|
66
|
-
l(), i.onScroll?.(e);
|
|
67
|
-
},
|
|
68
|
-
children: r
|
|
69
|
-
}),
|
|
70
|
-
s.end && /* @__PURE__ */ A("button", {
|
|
71
|
-
type: "button",
|
|
72
|
-
tabIndex: -1,
|
|
73
|
-
"aria-hidden": "true",
|
|
74
|
-
"data-side": "end",
|
|
75
|
-
className: a.scrollButton(),
|
|
76
|
-
onClick: () => u(!0),
|
|
77
|
-
children: /* @__PURE__ */ A(_, { className: a.scrollIcon() })
|
|
78
|
-
})
|
|
79
|
-
]
|
|
80
|
-
}) : /* @__PURE__ */ A(P.List, {
|
|
81
|
-
...i,
|
|
82
|
-
className: a.list({ class: n }),
|
|
83
|
-
children: r
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function B({ classes: e, value: n, icon: r, disabled: i, closable: a = !1, onClose: s, className: c, children: l, onKeyDown: u, ...d }) {
|
|
87
|
-
let f = t("tabs", m, e)({ closable: a }), p = /* @__PURE__ */ j(P.Trigger, {
|
|
88
|
-
...d,
|
|
89
|
-
className: f.trigger({ class: c }),
|
|
90
|
-
value: n,
|
|
91
|
-
disabled: i,
|
|
92
|
-
...a ? {
|
|
93
|
-
"aria-keyshortcuts": "Delete",
|
|
94
|
-
onKeyDown: (e) => {
|
|
95
|
-
u?.(e), !(e.key !== "Delete" || e.defaultPrevented || i) && (e.preventDefault(), o(e.currentTarget, () => s?.(n)));
|
|
96
|
-
}
|
|
97
|
-
} : { onKeyDown: u },
|
|
98
|
-
children: [r && /* @__PURE__ */ A(r, {
|
|
99
|
-
className: f.icon(),
|
|
100
|
-
"aria-hidden": "true"
|
|
101
|
-
}), l]
|
|
102
|
-
});
|
|
103
|
-
return a ? /* @__PURE__ */ j("span", {
|
|
104
|
-
role: "presentation",
|
|
105
|
-
className: f.tab(),
|
|
106
|
-
children: [p, /* @__PURE__ */ A("button", {
|
|
107
|
-
type: "button",
|
|
108
|
-
tabIndex: -1,
|
|
109
|
-
"aria-hidden": "true",
|
|
110
|
-
className: f.close(),
|
|
111
|
-
disabled: i,
|
|
112
|
-
onClick: (e) => {
|
|
113
|
-
let t = e.currentTarget.parentElement?.querySelector("[role=tab]");
|
|
114
|
-
t && o(t, () => s?.(n));
|
|
115
|
-
},
|
|
116
|
-
children: /* @__PURE__ */ A(C, { className: f.closeIcon() })
|
|
117
|
-
})]
|
|
118
|
-
}) : p;
|
|
119
|
-
}
|
|
120
|
-
function V({ classes: e, value: n, className: r, ...i }) {
|
|
121
|
-
let a = t("tabs", m, e)();
|
|
122
|
-
return /* @__PURE__ */ A(P.Content, {
|
|
123
|
-
...i,
|
|
124
|
-
className: a.content({ class: r }),
|
|
125
|
-
value: n
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
//#endregion
|
|
129
|
-
//#region src/components/Dialog/Dialog.tsx
|
|
130
|
-
var H = w({ modal: !0 });
|
|
131
|
-
function U({ open: e, defaultOpen: t, onOpenChange: n, role: r = "dialog", modal: i = !0, closeOnEscape: a = !0, closeOnInteractOutside: o, children: s }) {
|
|
132
|
-
return /* @__PURE__ */ A(H.Provider, {
|
|
133
|
-
value: { modal: i },
|
|
134
|
-
children: /* @__PURE__ */ A(F.Root, {
|
|
135
|
-
open: e,
|
|
136
|
-
defaultOpen: t,
|
|
137
|
-
onOpenChange: (e) => n?.(e.open),
|
|
138
|
-
role: r,
|
|
139
|
-
modal: i,
|
|
140
|
-
closeOnEscape: a,
|
|
141
|
-
closeOnInteractOutside: o,
|
|
142
|
-
lazyMount: !0,
|
|
143
|
-
unmountOnExit: !0,
|
|
144
|
-
children: s
|
|
145
|
-
})
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
function W({ children: e }) {
|
|
149
|
-
return /* @__PURE__ */ A(F.Trigger, {
|
|
150
|
-
asChild: !0,
|
|
151
|
-
children: e
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
function G({ children: e }) {
|
|
155
|
-
return /* @__PURE__ */ A(F.CloseTrigger, {
|
|
156
|
-
asChild: !0,
|
|
157
|
-
children: e
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
function K(e, t) {
|
|
161
|
-
let [n, r] = k({
|
|
162
|
-
x: 0,
|
|
163
|
-
y: 0
|
|
164
|
-
}), i = O(null), [o, s] = k(t);
|
|
165
|
-
o !== t && (s(t), t || r({
|
|
166
|
-
x: 0,
|
|
167
|
-
y: 0
|
|
168
|
-
}));
|
|
169
|
-
let l = (e, t, n) => {
|
|
170
|
-
let i = t.getBoundingClientRect(), o = {
|
|
171
|
-
x: i.x - n.x,
|
|
172
|
-
y: i.y - n.y,
|
|
173
|
-
width: i.width,
|
|
174
|
-
height: i.height
|
|
175
|
-
};
|
|
176
|
-
r(a(e, o, {
|
|
177
|
-
width: innerWidth,
|
|
178
|
-
height: innerHeight
|
|
179
|
-
}));
|
|
180
|
-
};
|
|
181
|
-
return {
|
|
182
|
-
header: {
|
|
183
|
-
onPointerDown(t) {
|
|
184
|
-
if (!e || t.button !== 0 || t.target.closest("button, a, input")) return;
|
|
185
|
-
let r = t.currentTarget.closest("[data-part=content]");
|
|
186
|
-
r && (i.current = {
|
|
187
|
-
id: t.pointerId,
|
|
188
|
-
x: t.clientX,
|
|
189
|
-
y: t.clientY,
|
|
190
|
-
origin: n,
|
|
191
|
-
content: r
|
|
192
|
-
}, t.currentTarget.setPointerCapture?.(t.pointerId), t.preventDefault());
|
|
193
|
-
},
|
|
194
|
-
onPointerMove(e) {
|
|
195
|
-
let t = i.current;
|
|
196
|
-
t && e.pointerId === t.id && l({
|
|
197
|
-
x: t.origin.x + e.clientX - t.x,
|
|
198
|
-
y: t.origin.y + e.clientY - t.y
|
|
199
|
-
}, t.content, n);
|
|
200
|
-
},
|
|
201
|
-
onPointerUp() {
|
|
202
|
-
i.current = null;
|
|
203
|
-
},
|
|
204
|
-
onPointerCancel() {
|
|
205
|
-
i.current = null;
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
onKeyDown: (t) => {
|
|
209
|
-
if (!e) return;
|
|
210
|
-
let r = c(t);
|
|
211
|
-
r && (t.preventDefault(), l({
|
|
212
|
-
x: n.x + r.x,
|
|
213
|
-
y: n.y + r.y
|
|
214
|
-
}, t.currentTarget, n));
|
|
215
|
-
},
|
|
216
|
-
style: e && (n.x || n.y) ? { translate: `${n.x}px ${n.y}px` } : void 0
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
function q({ classes: n, title: r, description: i, icon: a, status: o, size: c, position: u, fullscreen: d, maximizable: f, maximized: p, defaultMaximized: m, onMaximizedChange: h, draggable: g, closable: _ = !0, scrollBehavior: v, responsive: y = !0, closeLabel: b, maximizeLabel: w, restoreLabel: E, footer: D, portalTarget: O, className: N, style: P, onKeyDown: L, children: R, ...z }) {
|
|
220
|
-
let B = t("dialog", s, n), V = e(), { modal: U } = T(H), W = I(), [G, q] = k(m ?? !1), J = p ?? G, Y = () => {
|
|
221
|
-
q(!J), h?.(!J);
|
|
222
|
-
}, X = K(!!g && !J && !d, W.open), Z = B({
|
|
223
|
-
status: o,
|
|
224
|
-
size: c,
|
|
225
|
-
position: u,
|
|
226
|
-
scrollBehavior: v,
|
|
227
|
-
fullscreen: d || J,
|
|
228
|
-
responsive: y,
|
|
229
|
-
draggable: g && !J,
|
|
230
|
-
maximizable: f
|
|
231
|
-
}), Q = J ? S : x;
|
|
232
|
-
return /* @__PURE__ */ j(M, {
|
|
233
|
-
...O ? { container: { current: O } } : {},
|
|
234
|
-
children: [U && /* @__PURE__ */ A(F.Backdrop, { className: Z.backdrop() }), /* @__PURE__ */ A(F.Positioner, {
|
|
235
|
-
className: Z.positioner(),
|
|
236
|
-
children: /* @__PURE__ */ j(F.Content, {
|
|
237
|
-
...z,
|
|
238
|
-
...g ? { "aria-keyshortcuts": l } : {},
|
|
239
|
-
className: Z.content({ class: N }),
|
|
240
|
-
style: X.style ? {
|
|
241
|
-
...P,
|
|
242
|
-
...X.style
|
|
243
|
-
} : P,
|
|
244
|
-
onKeyDown: (e) => {
|
|
245
|
-
L?.(e), g && X.onKeyDown(e);
|
|
246
|
-
},
|
|
247
|
-
children: [
|
|
248
|
-
/* @__PURE__ */ j("div", {
|
|
249
|
-
className: Z.header(),
|
|
250
|
-
...g ? X.header : {},
|
|
251
|
-
children: [
|
|
252
|
-
a && /* @__PURE__ */ A("span", {
|
|
253
|
-
className: Z.iconBox(),
|
|
254
|
-
children: /* @__PURE__ */ A(a, {
|
|
255
|
-
className: Z.icon(),
|
|
256
|
-
"aria-hidden": "true"
|
|
257
|
-
})
|
|
258
|
-
}),
|
|
259
|
-
f && /* @__PURE__ */ A("button", {
|
|
260
|
-
type: "button",
|
|
261
|
-
className: Z.maximize(),
|
|
262
|
-
"aria-label": J ? E ?? V.dialog.restore : w ?? V.dialog.maximize,
|
|
263
|
-
onClick: Y,
|
|
264
|
-
children: /* @__PURE__ */ A(Q, {
|
|
265
|
-
className: Z.maximizeIcon(),
|
|
266
|
-
"aria-hidden": "true"
|
|
267
|
-
})
|
|
268
|
-
}),
|
|
269
|
-
_ && /* @__PURE__ */ A(F.CloseTrigger, {
|
|
270
|
-
className: Z.close(),
|
|
271
|
-
"aria-label": b ?? V.common.close,
|
|
272
|
-
children: /* @__PURE__ */ A(C, {
|
|
273
|
-
className: Z.closeIcon(),
|
|
274
|
-
"aria-hidden": "true"
|
|
275
|
-
})
|
|
276
|
-
})
|
|
277
|
-
]
|
|
278
|
-
}),
|
|
279
|
-
/* @__PURE__ */ j("div", {
|
|
280
|
-
className: Z.body(),
|
|
281
|
-
children: [
|
|
282
|
-
/* @__PURE__ */ A(F.Title, {
|
|
283
|
-
className: Z.title(),
|
|
284
|
-
children: r
|
|
285
|
-
}),
|
|
286
|
-
i && /* @__PURE__ */ A(F.Description, {
|
|
287
|
-
className: Z.description(),
|
|
288
|
-
children: i
|
|
289
|
-
}),
|
|
290
|
-
R
|
|
291
|
-
]
|
|
292
|
-
}),
|
|
293
|
-
D && /* @__PURE__ */ A("div", {
|
|
294
|
-
className: Z.footer(),
|
|
295
|
-
children: D
|
|
296
|
-
})
|
|
297
|
-
]
|
|
298
|
-
})
|
|
299
|
-
})]
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
//#endregion
|
|
303
|
-
//#region src/components/PasswordInput/PasswordInput.tsx
|
|
304
|
-
function J({ classes: a, size: o, invalid: s, success: c, disabled: l, readOnly: f, required: m, name: g, defaultVisible: _, visible: x, onVisibleChange: S, autoComplete: C = "current-password", strength: w = !1, requirements: T, loading: E = !1, clearable: M = !1, clearLabel: P, className: F, style: I, ...R }) {
|
|
305
|
-
let z = t("passwordInput", u, a), B = e(), V = N(), H = n(), U = !(s || V?.invalid) && (!!c || H.success), W = z({
|
|
306
|
-
size: o,
|
|
307
|
-
success: U
|
|
308
|
-
}), G = D(), [K, q] = k(String(R.defaultValue ?? "")), J = R.value === void 0 ? K : String(R.value), Y = d(J), X = J ? B.passwordStrength.levels[Y] : "", Z = i(J, T ?? []), Q = w || T?.length ? [
|
|
309
|
-
V?.ariaDescribedby,
|
|
310
|
-
w && `${G}strength`,
|
|
311
|
-
T?.length && `${G}requirements`
|
|
312
|
-
].filter(Boolean).join(" ") : void 0, $ = O(null), ee = () => {
|
|
313
|
-
let e = $.current?.querySelector("input");
|
|
314
|
-
e && (p(e), e.focus());
|
|
315
|
-
};
|
|
316
|
-
return /* @__PURE__ */ j(L.Root, {
|
|
317
|
-
className: W.base({ class: F }),
|
|
318
|
-
style: I,
|
|
319
|
-
invalid: s,
|
|
320
|
-
disabled: l,
|
|
321
|
-
readOnly: f,
|
|
322
|
-
required: m,
|
|
323
|
-
name: g,
|
|
324
|
-
defaultVisible: _,
|
|
325
|
-
visible: x,
|
|
326
|
-
onVisibilityChange: (e) => S?.(e.visible),
|
|
327
|
-
autoComplete: C,
|
|
328
|
-
translations: B.passwordInput,
|
|
329
|
-
children: [
|
|
330
|
-
/* @__PURE__ */ j(L.Control, {
|
|
331
|
-
ref: $,
|
|
332
|
-
className: W.control(),
|
|
333
|
-
children: [
|
|
334
|
-
/* @__PURE__ */ A(L.Input, {
|
|
335
|
-
...R,
|
|
336
|
-
"aria-describedby": Q,
|
|
337
|
-
"aria-busy": E || void 0,
|
|
338
|
-
className: W.input(),
|
|
339
|
-
onChange: (e) => {
|
|
340
|
-
q(e.target.value), R.onChange?.(e);
|
|
341
|
-
}
|
|
342
|
-
}),
|
|
343
|
-
(E || M || U) && /* @__PURE__ */ A(r, {
|
|
344
|
-
loading: E,
|
|
345
|
-
clear: M && !!J && !(l || V?.disabled) && !(f || V?.readOnly),
|
|
346
|
-
clearLabel: P ?? B.field.clear,
|
|
347
|
-
onClear: ee,
|
|
348
|
-
success: U,
|
|
349
|
-
classes: {
|
|
350
|
-
spinner: W.spinner(),
|
|
351
|
-
clear: W.clear(),
|
|
352
|
-
clearIcon: W.clearIcon(),
|
|
353
|
-
statusIcon: W.statusIcon()
|
|
354
|
-
}
|
|
355
|
-
}),
|
|
356
|
-
/* @__PURE__ */ A(L.VisibilityTrigger, {
|
|
357
|
-
className: W.toggle(),
|
|
358
|
-
children: /* @__PURE__ */ A(L.Indicator, {
|
|
359
|
-
fallback: /* @__PURE__ */ A(y, {
|
|
360
|
-
className: W.toggleIcon(),
|
|
361
|
-
"aria-hidden": "true"
|
|
362
|
-
}),
|
|
363
|
-
children: /* @__PURE__ */ A(b, {
|
|
364
|
-
className: W.toggleIcon(),
|
|
365
|
-
"aria-hidden": "true"
|
|
366
|
-
})
|
|
367
|
-
})
|
|
368
|
-
})
|
|
369
|
-
]
|
|
370
|
-
}),
|
|
371
|
-
w && /* @__PURE__ */ j("div", {
|
|
372
|
-
className: W.strength(),
|
|
373
|
-
children: [/* @__PURE__ */ A("div", {
|
|
374
|
-
className: W.meter(),
|
|
375
|
-
"aria-hidden": "true",
|
|
376
|
-
children: [
|
|
377
|
-
1,
|
|
378
|
-
2,
|
|
379
|
-
3,
|
|
380
|
-
4
|
|
381
|
-
].map((e) => /* @__PURE__ */ A("span", {
|
|
382
|
-
className: W.bar(),
|
|
383
|
-
"data-level": Y,
|
|
384
|
-
"data-filled": e <= Y || void 0
|
|
385
|
-
}, e))
|
|
386
|
-
}), /* @__PURE__ */ A("span", {
|
|
387
|
-
id: `${G}strength`,
|
|
388
|
-
className: W.strengthText(),
|
|
389
|
-
"aria-live": "polite",
|
|
390
|
-
children: X && B.passwordStrength.label(X)
|
|
391
|
-
})]
|
|
392
|
-
}),
|
|
393
|
-
!!T?.length && /* @__PURE__ */ A("ul", {
|
|
394
|
-
id: `${G}requirements`,
|
|
395
|
-
className: W.requirements(),
|
|
396
|
-
"aria-label": B.passwordRequirements.label,
|
|
397
|
-
children: T.map((e, t) => /* @__PURE__ */ j("li", {
|
|
398
|
-
className: W.requirement(),
|
|
399
|
-
"data-met": Z[t] || void 0,
|
|
400
|
-
children: [
|
|
401
|
-
Z[t] ? /* @__PURE__ */ A(h, {
|
|
402
|
-
className: W.requirementIcon(),
|
|
403
|
-
"aria-hidden": "true"
|
|
404
|
-
}) : /* @__PURE__ */ A(v, {
|
|
405
|
-
className: W.requirementIcon(),
|
|
406
|
-
"aria-hidden": "true"
|
|
407
|
-
}),
|
|
408
|
-
e.label,
|
|
409
|
-
/* @__PURE__ */ A("span", {
|
|
410
|
-
className: W.requirementState(),
|
|
411
|
-
children: `: ${Z[t] ? B.passwordRequirements.met : B.passwordRequirements.unmet}`
|
|
412
|
-
})
|
|
413
|
-
]
|
|
414
|
-
}, e.label))
|
|
415
|
-
})
|
|
416
|
-
]
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
//#endregion
|
|
420
|
-
export { H as a, V as c, q as i, z as l, U as n, W as o, G as r, R as s, J as t, B as u };
|
package/dist/Select-PbxrUYi1.js
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { a as e, n as t } from "./RecipesProvider-0idafuGm.js";
|
|
3
|
-
import { a as n, c as r, n as i, o as a } from "./Highlight-DdTridk2.js";
|
|
4
|
-
import { select as o, spinner as s } from "@wirecore/wirelayer-recipes";
|
|
5
|
-
import { ChevronDown as c, LoaderCircle as l, X as u } from "lucide-react";
|
|
6
|
-
import { useEffect as d, useId as f, useMemo as p, useState as ee } from "react";
|
|
7
|
-
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
8
|
-
import { Portal as te } from "@ark-ui/react/portal";
|
|
9
|
-
import { createListCollection as ne } from "@ark-ui/react/collection";
|
|
10
|
-
import { Select as _ } from "@ark-ui/react/select";
|
|
11
|
-
//#region src/components/Spinner/Spinner.tsx
|
|
12
|
-
var v = 2 * Math.PI * 9;
|
|
13
|
-
function y({ classes: n, size: r, label: i, value: a, className: o, ...c }) {
|
|
14
|
-
let u = t("spinner", s, n), d = e(), f = u({ size: r });
|
|
15
|
-
if (a !== void 0) {
|
|
16
|
-
let e = Math.min(100, Math.max(0, a));
|
|
17
|
-
return /* @__PURE__ */ h("span", {
|
|
18
|
-
...c,
|
|
19
|
-
className: f.base({ class: o }),
|
|
20
|
-
role: "progressbar",
|
|
21
|
-
"aria-label": i ?? d.common.loading,
|
|
22
|
-
"aria-valuemin": 0,
|
|
23
|
-
"aria-valuemax": 100,
|
|
24
|
-
"aria-valuenow": e,
|
|
25
|
-
"aria-valuetext": `${Math.round(e)} %`,
|
|
26
|
-
children: /* @__PURE__ */ g("svg", {
|
|
27
|
-
className: f.ring(),
|
|
28
|
-
viewBox: "0 0 24 24",
|
|
29
|
-
"aria-hidden": "true",
|
|
30
|
-
children: [/* @__PURE__ */ h("circle", {
|
|
31
|
-
className: f.ringTrack(),
|
|
32
|
-
cx: "12",
|
|
33
|
-
cy: "12",
|
|
34
|
-
r: "9",
|
|
35
|
-
strokeWidth: "3"
|
|
36
|
-
}), /* @__PURE__ */ h("circle", {
|
|
37
|
-
className: f.ringRange(),
|
|
38
|
-
cx: "12",
|
|
39
|
-
cy: "12",
|
|
40
|
-
r: "9",
|
|
41
|
-
strokeWidth: "3",
|
|
42
|
-
strokeLinecap: "round",
|
|
43
|
-
strokeDasharray: `${e / 100 * v} ${v}`
|
|
44
|
-
})]
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return /* @__PURE__ */ g("span", {
|
|
49
|
-
...c,
|
|
50
|
-
className: f.base({ class: o }),
|
|
51
|
-
role: "status",
|
|
52
|
-
children: [/* @__PURE__ */ h(l, {
|
|
53
|
-
className: f.icon(),
|
|
54
|
-
"aria-hidden": "true"
|
|
55
|
-
}), /* @__PURE__ */ h("span", {
|
|
56
|
-
className: f.label(),
|
|
57
|
-
children: i ?? d.common.loading
|
|
58
|
-
})]
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/components/Select/Select.tsx
|
|
63
|
-
function b({ classes: s, items: v, value: y, defaultValue: b, onValueChange: re, placeholder: ie, disabled: ae, invalid: x, required: S, name: oe, itemValue: se, itemLabel: ce, itemDisabled: le, itemGroup: ue, valueKey: de, clearable: C, loading: w, loadingText: fe, size: pe, filter: T, manualFilter: E, onFilterChange: D, emptyText: me, hasMore: he, onLoadMore: ge, dataSource: O, minSearchLength: _e, pageSize: ve, standalone: ye, renderItem: k, renderValue: A, className: j, style: M, onKeyDown: N, ...P }) {
|
|
64
|
-
let F = t("select", o, s)({
|
|
65
|
-
size: pe,
|
|
66
|
-
clearable: C
|
|
67
|
-
}), I = e(), L = I.select, R = {
|
|
68
|
-
itemValue: se,
|
|
69
|
-
itemLabel: ce,
|
|
70
|
-
itemDisabled: le,
|
|
71
|
-
itemGroup: ue,
|
|
72
|
-
valueKey: de
|
|
73
|
-
}, [z, B] = ee(""), V = r({
|
|
74
|
-
items: v,
|
|
75
|
-
source: O,
|
|
76
|
-
accessors: R,
|
|
77
|
-
pageSize: ve,
|
|
78
|
-
minSearchLength: _e
|
|
79
|
-
}), { options: H, groups: be, ordered: U, firstFor: xe } = n(V.items, R, T && !E && !O ? z : ""), W = p(() => [...H, ...V.resolvedOptions], [H, V.resolvedOptions]), { selected: G, keys: K, commit: q, commitKeys: Se } = a({
|
|
80
|
-
multiple: !1,
|
|
81
|
-
value: y,
|
|
82
|
-
defaultValue: b,
|
|
83
|
-
accessors: R,
|
|
84
|
-
items: W,
|
|
85
|
-
onChange: re
|
|
86
|
-
}), Ce = K.join("\0");
|
|
87
|
-
d(() => {
|
|
88
|
-
V.resolve(K, W);
|
|
89
|
-
}, [Ce, O]);
|
|
90
|
-
let J = w || V.loading, Y = G[0], X = p(() => ne({
|
|
91
|
-
items: U,
|
|
92
|
-
itemToString: (e) => e.label,
|
|
93
|
-
itemToValue: (e) => e.key,
|
|
94
|
-
isItemDisabled: (e) => e.disabled
|
|
95
|
-
}), [U]), Z = f(), Q = Y?.icon, we = {
|
|
96
|
-
item: F.item(),
|
|
97
|
-
itemText: F.itemText(),
|
|
98
|
-
icon: F.icon(),
|
|
99
|
-
itemIndicator: F.itemIndicator(),
|
|
100
|
-
itemBody: F.itemBody(),
|
|
101
|
-
itemDescription: F.itemDescription(),
|
|
102
|
-
group: F.group(),
|
|
103
|
-
groupLabel: F.groupLabel(),
|
|
104
|
-
loading: F.loading(),
|
|
105
|
-
loadingIcon: F.loadingIcon(),
|
|
106
|
-
sentinel: F.sentinel(),
|
|
107
|
-
empty: F.empty()
|
|
108
|
-
}, $ = /* @__PURE__ */ h(i, {
|
|
109
|
-
parts: _,
|
|
110
|
-
groups: be,
|
|
111
|
-
classes: we,
|
|
112
|
-
loading: J,
|
|
113
|
-
loadingText: fe ?? I.common.loading,
|
|
114
|
-
hasMore: he || V.hasMore,
|
|
115
|
-
onLoadMore: () => O ? V.loadMore() : ge?.(),
|
|
116
|
-
emptyText: me ?? V.emptyText ?? (z ? I.common.noResults : I.common.empty),
|
|
117
|
-
renderItem: k
|
|
118
|
-
});
|
|
119
|
-
function Te(e) {
|
|
120
|
-
N?.(e), C && G.length && (e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), q([]));
|
|
121
|
-
}
|
|
122
|
-
function Ee(e, t) {
|
|
123
|
-
B(t), D?.(t), O && V.search(t);
|
|
124
|
-
let n = E || O ? void 0 : xe(t);
|
|
125
|
-
n && requestAnimationFrame(() => e.setHighlightValue(n.key));
|
|
126
|
-
}
|
|
127
|
-
return /* @__PURE__ */ g(_.Root, {
|
|
128
|
-
className: F.base({ class: j }),
|
|
129
|
-
style: M,
|
|
130
|
-
collection: X,
|
|
131
|
-
value: K,
|
|
132
|
-
onValueChange: (e) => Se(e.value, e.items),
|
|
133
|
-
onOpenChange: (e) => {
|
|
134
|
-
e.open && V.open(), !e.open && z && (B(""), D?.(""), O && V.search(""));
|
|
135
|
-
},
|
|
136
|
-
disabled: ae,
|
|
137
|
-
invalid: x,
|
|
138
|
-
required: S,
|
|
139
|
-
name: oe,
|
|
140
|
-
...ye ? { ids: {} } : {},
|
|
141
|
-
positioning: {
|
|
142
|
-
sameWidth: !0,
|
|
143
|
-
gutter: 4
|
|
144
|
-
},
|
|
145
|
-
composite: !T,
|
|
146
|
-
lazyMount: !0,
|
|
147
|
-
unmountOnExit: !0,
|
|
148
|
-
children: [
|
|
149
|
-
/* @__PURE__ */ g(_.Control, {
|
|
150
|
-
...C ? { className: F.control() } : {},
|
|
151
|
-
children: [/* @__PURE__ */ g(_.Trigger, {
|
|
152
|
-
...P,
|
|
153
|
-
className: F.trigger(),
|
|
154
|
-
"aria-busy": w || void 0,
|
|
155
|
-
onKeyDown: Te,
|
|
156
|
-
children: [/* @__PURE__ */ h("span", {
|
|
157
|
-
className: F.value(),
|
|
158
|
-
children: A && Y ? A(Y.item) : /* @__PURE__ */ g(m, { children: [Q && /* @__PURE__ */ h(Q, {
|
|
159
|
-
className: F.icon(),
|
|
160
|
-
"aria-hidden": "true"
|
|
161
|
-
}), /* @__PURE__ */ h(_.ValueText, {
|
|
162
|
-
placeholder: ie ?? I.common.placeholder,
|
|
163
|
-
children: Y?.label || void 0
|
|
164
|
-
})] })
|
|
165
|
-
}), /* @__PURE__ */ h(_.Indicator, {
|
|
166
|
-
className: F.indicator(),
|
|
167
|
-
children: w ? /* @__PURE__ */ h(l, {
|
|
168
|
-
className: F.spinner(),
|
|
169
|
-
"aria-hidden": "true"
|
|
170
|
-
}) : /* @__PURE__ */ h(c, {
|
|
171
|
-
className: F.indicatorIcon(),
|
|
172
|
-
"aria-hidden": "true"
|
|
173
|
-
})
|
|
174
|
-
})]
|
|
175
|
-
}), C && /* @__PURE__ */ h(_.Context, { children: (e) => Y && !e.disabled && /* @__PURE__ */ h("button", {
|
|
176
|
-
type: "button",
|
|
177
|
-
tabIndex: -1,
|
|
178
|
-
className: F.clear(),
|
|
179
|
-
"aria-label": L.clear,
|
|
180
|
-
onClick: () => {
|
|
181
|
-
q([]), e.focus();
|
|
182
|
-
},
|
|
183
|
-
children: /* @__PURE__ */ h(u, {
|
|
184
|
-
className: F.clearIcon(),
|
|
185
|
-
"aria-hidden": "true"
|
|
186
|
-
})
|
|
187
|
-
}) })]
|
|
188
|
-
}),
|
|
189
|
-
/* @__PURE__ */ h(te, { children: /* @__PURE__ */ h(_.Positioner, { children: /* @__PURE__ */ h(_.Content, {
|
|
190
|
-
className: F.content(),
|
|
191
|
-
"aria-busy": J || void 0,
|
|
192
|
-
"aria-label": T ? P["aria-label"] : void 0,
|
|
193
|
-
children: T ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
|
|
194
|
-
className: F.header(),
|
|
195
|
-
children: /* @__PURE__ */ h(_.Context, { children: (e) => /* @__PURE__ */ h("input", {
|
|
196
|
-
type: "text",
|
|
197
|
-
role: "combobox",
|
|
198
|
-
autoComplete: "off",
|
|
199
|
-
"aria-autocomplete": "list",
|
|
200
|
-
"aria-expanded": "true",
|
|
201
|
-
"data-autofocus": "",
|
|
202
|
-
"aria-controls": Z,
|
|
203
|
-
"aria-activedescendant": e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0,
|
|
204
|
-
"aria-label": L.filter,
|
|
205
|
-
placeholder: I.combobox.search,
|
|
206
|
-
value: z,
|
|
207
|
-
className: F.search(),
|
|
208
|
-
onChange: (t) => Ee(e, t.target.value),
|
|
209
|
-
onKeyDown: (e) => {
|
|
210
|
-
[
|
|
211
|
-
" ",
|
|
212
|
-
"Home",
|
|
213
|
-
"End"
|
|
214
|
-
].includes(e.key) && e.stopPropagation();
|
|
215
|
-
}
|
|
216
|
-
}) })
|
|
217
|
-
}), /* @__PURE__ */ h(_.List, {
|
|
218
|
-
id: Z,
|
|
219
|
-
className: F.list(),
|
|
220
|
-
children: $
|
|
221
|
-
})] }) : $
|
|
222
|
-
}) }) }),
|
|
223
|
-
/* @__PURE__ */ h(_.HiddenSelect, {}),
|
|
224
|
-
O && /* @__PURE__ */ h("span", {
|
|
225
|
-
role: "status",
|
|
226
|
-
className: F.status(),
|
|
227
|
-
children: V.announcement
|
|
228
|
-
})
|
|
229
|
-
]
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
//#endregion
|
|
233
|
-
export { y as n, b as t };
|