jaguar-form 1.0.6 → 1.0.8

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.
Files changed (37) hide show
  1. package/README.md +8 -0
  2. package/dist/{Cascader-ZIkXvvC3.js → Cascader-COGUcdDS.js} +4 -4
  3. package/dist/{Select-BIBk_TT6.js → Select-BxwT7MHH.js} +118 -107
  4. package/dist/{TreeSelect-BQCyCCqa.js → TreeSelect-W5sgU5nW.js} +4 -4
  5. package/dist/{compound-BX_PoTK5.js → compound-nXxRSVJu.js} +27 -27
  6. package/dist/compound.js +1 -1
  7. package/dist/core.js +1 -1
  8. package/dist/date-time.js +1 -1
  9. package/dist/{form-CSfUExUT.js → form-D6O5PqrZ.js} +62 -49
  10. package/dist/form.js +3 -3
  11. package/dist/{icons-BwE05e0C.js → icons-B1dOXz-r.js} +1 -1
  12. package/dist/{image-upload-D9oPG0Eh.js → image-upload-BFVs81x3.js} +46 -42
  13. package/dist/image-upload.js +1 -1
  14. package/dist/index.js +15 -15
  15. package/dist/input.js +1 -1
  16. package/dist/inputs-w_es2t_C.js +862 -0
  17. package/dist/{lazy-tree-NCX3ntYm.js → lazy-tree-DNvNf_Yv.js} +51 -43
  18. package/dist/{pickers-Bci1y8cc.js → pickers-5zLmSrsp.js} +3 -3
  19. package/dist/select.js +2 -2
  20. package/dist/selection-CA_66JX9.js +223 -0
  21. package/dist/{slider-AM0Egz9P.js → slider-Bhd1Z4LP.js} +35 -35
  22. package/dist/slider.js +1 -1
  23. package/dist/{store-CFSQW-Fv.js → store-C9eBd8Y7.js} +205 -194
  24. package/dist/style.css +1 -1
  25. package/dist/tree-select.js +1 -1
  26. package/dist/types/components/extended-inputs.d.ts +4 -1
  27. package/dist/types/components/image-upload/index.d.ts +1 -1
  28. package/dist/types/components/inputs.d.ts +28 -8
  29. package/dist/types/config/index.d.ts +32 -1
  30. package/dist/types/entries/input.d.ts +2 -2
  31. package/dist/types/form/index.d.ts +3 -0
  32. package/dist/types/form/store.d.ts +1 -0
  33. package/dist/types/primitives/Control.d.ts +7 -2
  34. package/dist/{useControllable-QDX_UWRh.js → useControllable-Dt38Jg9E.js} +54 -21
  35. package/package.json +1 -1
  36. package/dist/inputs-Dx3xOy9q.js +0 -718
  37. package/dist/selection-DCIzhR5q.js +0 -197
package/README.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  Modern React 19 form controls and schema-driven forms with validation, value adapters, internationalization and customizable themes.
4
4
 
5
+ ## 1.0.8
6
+
7
+ Switch now supports round and rounded shapes, asynchronous confirmation, optional optimistic updates, and loading indicators. Component defaults, form selector subscriptions, synchronous batching, repeated numeric steps, textarea auto-sizing and fixed-height virtual list arithmetic are available. See [1.0.8 guide](docs/release-1.0.8.md) and [changelog](docs/CHANGELOG-1.0.8.md).
8
+
9
+ ## 1.0.7
10
+
11
+ Choice buttons use a transparent resting surface and a theme-tinted selected state. Select option indexing, selection membership and remote cache recency are optimized. See [1.0.7 changelog](docs/CHANGELOG-1.0.7.md).
12
+
5
13
  ## 1.0.6
6
14
 
7
15
  Single-image capacity fixes, mixed image management, broader floating labels, compound child state, async defaults, container grids, decimal bounds, remote label resolution and Cascader. See the [1.0.6 usage guide](docs/release-1.0.6.md), [changelog](docs/CHANGELOG-1.0.6.md) and [release verification](docs/RELEASE.md).
@@ -1,8 +1,8 @@
1
1
  import { useEffect as e, useId as t, useMemo as n, useRef as r, useState as i } from "react";
2
- import { o as a, r as o, s } from "./selection-DCIzhR5q.js";
3
- import { t as c } from "./icons-BwE05e0C.js";
4
- import { a as l, t as u } from "./useControllable-QDX_UWRh.js";
5
- import { n as d, r as f, t as p } from "./lazy-tree-NCX3ntYm.js";
2
+ import { o as a, r as o, s } from "./selection-CA_66JX9.js";
3
+ import { t as c } from "./icons-B1dOXz-r.js";
4
+ import { c as l, t as u } from "./useControllable-Dt38Jg9E.js";
5
+ import { n as d, r as f, t as p } from "./lazy-tree-DNvNf_Yv.js";
6
6
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
7
7
  // src/utils/cascader.ts
8
8
  function _(e) {
@@ -1,11 +1,11 @@
1
1
  import { useEffect as e, useId as t, useMemo as n, useRef as r, useState as i } from "react";
2
- import { n as a, o, r as s, s as c } from "./selection-DCIzhR5q.js";
3
- import { a as l, d as u, f as d, p as f, u as p } from "./lazy-tree-NCX3ntYm.js";
4
- import { t as m } from "./icons-BwE05e0C.js";
5
- import { a as h } from "./useControllable-QDX_UWRh.js";
6
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
2
+ import { n as a, o, r as s, s as c } from "./selection-CA_66JX9.js";
3
+ import { a as l, d as u, f as d, p as f, u as p } from "./lazy-tree-DNvNf_Yv.js";
4
+ import { t as m } from "./icons-B1dOXz-r.js";
5
+ import { c as h, s as g } from "./useControllable-Dt38Jg9E.js";
6
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
7
7
  // src/utils/remote-options.ts
8
- function y(e, t, n, r = 0) {
8
+ function b(e, t, n, r = 0) {
9
9
  let i = {
10
10
  options: [],
11
11
  loading: !1,
@@ -56,7 +56,7 @@ function y(e, t, n, r = 0) {
56
56
  search(e, t = 0) {
57
57
  d(), o = e;
58
58
  let n = a.get(e);
59
- n && n.expires > Date.now() ? u(n.state) : (u({
59
+ n && n.expires > Date.now() ? (a.delete(e), a.set(e, n), u(n.state)) : (n && a.delete(e), u({
60
60
  options: [],
61
61
  page: 0,
62
62
  hasMore: !1,
@@ -79,14 +79,14 @@ function y(e, t, n, r = 0) {
79
79
  };
80
80
  }
81
81
  // src/components/select/useRemoteOptions.ts
82
- function b(t, a, o, s, c, l, u = {}) {
82
+ function x(t, a, o, s, c, l, u = {}) {
83
83
  let [d, f] = i({
84
84
  options: [],
85
85
  loading: !1,
86
86
  error: !1,
87
87
  hasMore: !1,
88
88
  page: 0
89
- }), p = !!t, m = n(() => y((e) => t(e), (e) => e.value, f, u.cacheTime), [
89
+ }), p = !!t, m = n(() => b((e) => t(e), (e) => e.value, f, u.cacheTime), [
90
90
  t,
91
91
  u.cacheTime,
92
92
  u.reloadKey
@@ -106,7 +106,7 @@ function b(t, a, o, s, c, l, u = {}) {
106
106
  u.minSearchLength,
107
107
  u.reloadKey
108
108
  ]);
109
- let h = r(/* @__PURE__ */ new Map()), [g, _] = i([]), v = JSON.stringify([...new Set(c)]), b = new Set([...l, ...d.options].map((e) => e.value)), x = [...new Set(c)].filter((e) => !b.has(e) && !h.current.has(e)), S = JSON.stringify(x);
109
+ let h = r(/* @__PURE__ */ new Map()), [g, _] = i([]), v = JSON.stringify([...new Set(c)]), y = n(() => new Set([...l, ...d.options].map((e) => e.value)), [l, d.options]), x = [...new Set(c)].filter((e) => !y.has(e) && !h.current.has(e)), S = JSON.stringify(x);
110
110
  e(() => {
111
111
  if (!u.resolveOptions || !x.length) return;
112
112
  let e = new AbortController();
@@ -119,25 +119,28 @@ function b(t, a, o, s, c, l, u = {}) {
119
119
  S,
120
120
  u.reloadKey
121
121
  ]);
122
- let C = p ? d.options : l, w = /* @__PURE__ */ new Map();
123
- for (let e of c) {
124
- let t = h.current.get(e);
125
- t && w.set(e, t);
126
- }
127
- for (let e of g) c.includes(e.value) && w.set(e.value, e);
128
- for (let e of l) w.set(e.value, e);
129
- for (let e of C) w.set(e.value, e);
122
+ let C = p ? d.options : l, w = n(() => {
123
+ let e = /* @__PURE__ */ new Map(), t = new Set(c);
124
+ for (let n of t) {
125
+ let t = h.current.get(n);
126
+ t && e.set(n, t);
127
+ }
128
+ for (let n of g) t.has(n.value) && e.set(n.value, n);
129
+ for (let t of l) e.set(t.value, t);
130
+ if (C !== l) for (let t of C) e.set(t.value, t);
131
+ return e;
132
+ }, [
133
+ v,
134
+ l,
135
+ C,
136
+ g
137
+ ]);
130
138
  return e(() => {
131
139
  h.current = new Map(c.flatMap((e) => {
132
140
  let t = w.get(e);
133
141
  return t ? [[e, t]] : [];
134
142
  }));
135
- }, [
136
- c,
137
- l,
138
- C,
139
- g
140
- ]), {
143
+ }, [v, w]), {
141
144
  options: C,
142
145
  map: w,
143
146
  loading: p && a && d.loading,
@@ -148,24 +151,32 @@ function b(t, a, o, s, c, l, u = {}) {
148
151
  };
149
152
  }
150
153
  // src/components/select/Select.tsx
151
- function x(e) {
152
- return /* @__PURE__ */ _(w, {
154
+ function S(e) {
155
+ let t = g();
156
+ return /* @__PURE__ */ v(T, {
157
+ ...t.components?.Select,
153
158
  ...e,
154
159
  multiple: !1
155
160
  });
156
161
  }
157
- function S(e) {
158
- return /* @__PURE__ */ _(w, {
162
+ function C(e) {
163
+ let t = g();
164
+ return /* @__PURE__ */ v(T, {
165
+ ...t.components?.MultiSelect,
159
166
  ...e,
160
167
  multiple: !0
161
168
  });
162
169
  }
163
- var C = (e) => e.value;
164
- function w(r) {
165
- let { text: y, t: x } = h(), { open: S, changeOpen: w, committed: T, selected: E, update: D, confirm: ee, blocked: O, triggerReadOnly: k } = l(r), [A, j] = i(""), [M, N] = i(!1), [P, F] = i(-1), I = t(), L = `${I}-options`, R = (e) => `${I}-option-${e}`, z = r["aria-label"] ?? r.floatingLabel ?? y.choose, B = b(r.loadOptions, S, A, r.searchDebounce ?? 300, T.concat(E), r.options, r), V = B.map, H = r.optionsLoading || B.loading, U = n(() => new Set(E), [E]), W = (e) => V.get(e) ?? {
170
+ var w = (e) => e.value;
171
+ function T(r) {
172
+ let { text: g, t: b } = h(), { open: S, changeOpen: C, committed: T, selected: E, update: D, confirm: ee, blocked: O, triggerReadOnly: k } = l(r), [A, j] = i(""), [M, N] = i(!1), [P, F] = i(-1), I = t(), L = `${I}-options`, R = (e) => `${I}-option-${e}`, z = r["aria-label"] ?? r.floatingLabel ?? g.choose, te = n(() => T === E ? T : T.concat(E), [T, E]), B = x(r.loadOptions, S, A, r.searchDebounce ?? 300, te, r.options, r), V = B.map, H = r.optionsLoading || B.loading, U = n(() => new Set(E), [E]), W = (e) => V.get(e) ?? {
166
173
  value: e,
167
174
  label: String(e)
168
- }, te = n(() => E.map(W), [E, V]), G = n(() => T.map(W), [T, V]), K = n(() => B.options.filter((e) => (e.searchText ?? (typeof e.label == "string" ? e.label : String(e.value))).toLocaleLowerCase().includes(A.toLocaleLowerCase()) || !!r.loadOptions), [
175
+ }, ne = n(() => E.map(W), [E, V]), G = n(() => T.map(W), [T, V]), K = n(() => {
176
+ if (r.loadOptions || !A) return B.options;
177
+ let e = A.toLocaleLowerCase();
178
+ return B.options.filter((t) => (t.searchText ?? (typeof t.label == "string" ? t.label : String(t.value))).toLocaleLowerCase().includes(e));
179
+ }, [
169
180
  B.options,
170
181
  A,
171
182
  r.loadOptions
@@ -173,19 +184,19 @@ function w(r) {
173
184
  B.options,
174
185
  K,
175
186
  r.selectAllScope
176
- ]), X = Y.filter((e) => U.has(e)).length, Z = Y.length > 0 && X === Y.length, ne = !Z && U.size + Y.length - X > (r.maxCount ?? 1e400), Q = Z ? "all" : X ? "partial" : "none";
187
+ ]), X = n(() => Y.reduce((e, t) => e + Number(U.has(t)), 0), [Y, U]), Z = Y.length > 0 && X === Y.length, re = !Z && U.size + Y.length - X > (r.maxCount ?? 1e400), Q = Z ? "all" : X ? "partial" : "none";
177
188
  e(() => {
178
189
  S || (j(""), F(-1), N(!1));
179
190
  }, [S]);
180
- let re = (e) => {
181
- O || r.readOnly || e.disabled || (r.multiple ? D(p(E, [e.value], r.maxCount)) : (D([e.value]), r.needConfirm || w(!1)));
182
- }, $ = () => D(E.filter((e) => V.get(e)?.disabled)), ie = (e) => {
191
+ let ie = (e) => {
192
+ O || r.readOnly || e.disabled || (r.multiple ? D(p(E, [e.value], r.maxCount)) : (D([e.value]), r.needConfirm || C(!1)));
193
+ }, $ = () => D(E.filter((e) => V.get(e)?.disabled)), ae = (e) => {
183
194
  V.get(e)?.disabled || D(E.filter((t) => t !== e));
184
- }, ae = () => {
185
- O || (S || w(!0), N(!0));
186
- }, oe = (e) => {
187
- !e.nativeEvent.isComposing && e.target instanceof HTMLElement && e.target.matches(".rfe-trigger-arrow") && ["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(), F(a(K.length, -1, e.key, q)), w(!0));
195
+ }, oe = () => {
196
+ O || (S || C(!0), N(!0));
188
197
  }, se = (e) => {
198
+ !e.nativeEvent.isComposing && e.target instanceof HTMLElement && e.target.matches(".rfe-trigger-arrow") && ["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(), F(a(K.length, -1, e.key, q)), C(!0));
199
+ }, ce = (e) => {
189
200
  if (e.nativeEvent.isComposing || e.keyCode === 229 || M) return;
190
201
  let t = e.target;
191
202
  t instanceof HTMLElement && t.matches(".rfe-search,.rfe-list,.rfe-option") && (t instanceof HTMLInputElement && [
@@ -197,35 +208,35 @@ function w(r) {
197
208
  "ArrowUp",
198
209
  "Home",
199
210
  "End"
200
- ].includes(e.key) ? (e.preventDefault(), F(a(K.length, J, e.key, q))) : ["Enter", " "].includes(e.key) && J >= 0 && (e.preventDefault(), re(K[J]))));
211
+ ].includes(e.key) ? (e.preventDefault(), F(a(K.length, J, e.key, q))) : ["Enter", " "].includes(e.key) && J >= 0 && (e.preventDefault(), ie(K[J]))));
201
212
  };
202
- return /* @__PURE__ */ _(s, {
213
+ return /* @__PURE__ */ v(s, {
203
214
  ...r,
204
215
  layout: "selection",
205
216
  open: S,
206
- onOpenChange: w,
217
+ onOpenChange: C,
207
218
  label: z,
208
- trigger: (e, t) => /* @__PURE__ */ _("div", {
219
+ trigger: (e, t) => /* @__PURE__ */ v("div", {
209
220
  ref: t,
210
221
  className: "rfe-anchor",
211
- onKeyDown: oe,
222
+ onKeyDown: se,
212
223
  onBlur: (e) => {
213
224
  !S && !e.currentTarget.contains(e.relatedTarget) && r.onBlur?.();
214
225
  },
215
- children: /* @__PURE__ */ _(c, {
226
+ children: /* @__PURE__ */ v(c, {
216
227
  ...r,
217
228
  id: r.id ?? I,
218
229
  disabled: r.disabled || r.loading,
219
230
  floatingFilled: T.length > 0,
220
231
  floatingOpen: S,
221
- actions: /* @__PURE__ */ v(g, { children: [r.clearable !== !1 && /* @__PURE__ */ _(o, {
232
+ actions: /* @__PURE__ */ y(_, { children: [r.clearable !== !1 && /* @__PURE__ */ v(o, {
222
233
  name: "clear",
223
234
  source: r.icons?.clear,
224
- label: y.clear,
235
+ label: g.clear,
225
236
  hidden: !T.length,
226
237
  disabled: k,
227
238
  onClick: $
228
- }), /* @__PURE__ */ _("button", {
239
+ }), /* @__PURE__ */ v("button", {
229
240
  type: "button",
230
241
  ...e,
231
242
  id: r.id ?? I,
@@ -234,92 +245,92 @@ function w(r) {
234
245
  "aria-invalid": r["aria-invalid"] ?? r.status === "error",
235
246
  "aria-describedby": r["aria-describedby"],
236
247
  "aria-label": z,
237
- onClick: () => w(!S),
248
+ onClick: () => C(!S),
238
249
  "data-open": S,
239
- children: /* @__PURE__ */ _(m, {
250
+ children: /* @__PURE__ */ v(m, {
240
251
  name: "dropdown",
241
252
  source: r.icons?.dropdown
242
253
  })
243
254
  })] }),
244
- children: /* @__PURE__ */ _("div", {
255
+ children: /* @__PURE__ */ v("div", {
245
256
  className: "rfe-value",
246
- onClick: () => w(!S),
247
- children: r.multiple ? /* @__PURE__ */ _(d, {
257
+ onClick: () => C(!S),
258
+ children: r.multiple ? /* @__PURE__ */ v(d, {
248
259
  options: G,
249
260
  mode: r.displayMode,
250
261
  maxTagCount: r.maxTagCount,
251
262
  maxTagRows: r.maxTagRows,
252
- onRemove: ie,
253
- onInspect: ae,
263
+ onRemove: ae,
264
+ onInspect: oe,
254
265
  readOnly: k,
255
266
  placeholder: r.placeholder
256
- }) : /* @__PURE__ */ _("span", {
267
+ }) : /* @__PURE__ */ v("span", {
257
268
  className: G.length ? "rfe-single-value" : "rfe-placeholder",
258
- children: G[0]?.label ?? r.placeholder ?? y.choose
269
+ children: G[0]?.label ?? r.placeholder ?? g.choose
259
270
  })
260
271
  })
261
272
  })
262
273
  }),
263
- children: /* @__PURE__ */ v("div", {
274
+ children: /* @__PURE__ */ y("div", {
264
275
  className: "rfe-selection-body",
265
- onKeyDown: se,
276
+ onKeyDown: ce,
266
277
  "data-selection-style": r.selectionStyle ?? (r.multiple ? "subtle" : "accent"),
267
- children: [r.multiple && M ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("button", {
278
+ children: [r.multiple && M ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("button", {
268
279
  type: "button",
269
280
  className: "rfe-link",
270
281
  onClick: () => N(!1),
271
- children: [/* @__PURE__ */ _(m, { name: "previous" }), y.choose]
272
- }), /* @__PURE__ */ _(u, {
273
- options: te,
274
- onRemove: ie,
282
+ children: [/* @__PURE__ */ v(m, { name: "previous" }), g.choose]
283
+ }), /* @__PURE__ */ v(u, {
284
+ options: ne,
285
+ onRemove: ae,
275
286
  onClear: $,
276
287
  readOnly: r.readOnly
277
- })] }) : /* @__PURE__ */ v(g, { children: [
278
- r.searchable !== !1 && /* @__PURE__ */ _("input", {
288
+ })] }) : /* @__PURE__ */ y(_, { children: [
289
+ r.searchable !== !1 && /* @__PURE__ */ v("input", {
279
290
  className: "rfe-search",
280
291
  role: "combobox",
281
292
  "aria-expanded": "true",
282
293
  "aria-controls": K.length ? L : void 0,
283
294
  "aria-activedescendant": J >= 0 ? R(J) : void 0,
284
295
  "aria-autocomplete": "list",
285
- "aria-label": y.search,
286
- placeholder: y.search,
296
+ "aria-label": g.search,
297
+ placeholder: g.search,
287
298
  value: A,
288
299
  onChange: (e) => {
289
300
  j(e.target.value), F(-1);
290
301
  }
291
302
  }),
292
- r.multiple && r.showSelectAll && !r.readOnly && /* @__PURE__ */ v("div", {
303
+ r.multiple && r.showSelectAll && !r.readOnly && /* @__PURE__ */ y("div", {
293
304
  className: "rfe-toolbar",
294
- children: [/* @__PURE__ */ v("button", {
305
+ children: [/* @__PURE__ */ y("button", {
295
306
  type: "button",
296
307
  className: "rfe-select-all",
297
308
  role: "checkbox",
298
309
  "aria-checked": Z ? !0 : X ? "mixed" : !1,
299
- "aria-label": y.all,
300
- title: ne ? x("max", { max: r.maxCount ?? 0 }) : void 0,
301
- disabled: !Y.length || ne,
310
+ "aria-label": g.all,
311
+ title: re ? b("max", { max: r.maxCount ?? 0 }) : void 0,
312
+ disabled: !Y.length || re,
302
313
  onClick: () => D(p(E, Y, r.maxCount)),
303
- children: [/* @__PURE__ */ _("span", {
314
+ children: [/* @__PURE__ */ v("span", {
304
315
  className: "rfe-option-check",
305
316
  "data-checked": Q !== "none",
306
- children: Q !== "none" && /* @__PURE__ */ _(m, { name: Q === "all" ? "check" : "minus" })
307
- }), Z ? y.deselectAll : y.all]
308
- }), /* @__PURE__ */ _("button", {
317
+ children: Q !== "none" && /* @__PURE__ */ v(m, { name: Q === "all" ? "check" : "minus" })
318
+ }), Z ? g.deselectAll : g.all]
319
+ }), /* @__PURE__ */ v("button", {
309
320
  type: "button",
310
321
  className: "rfe-link",
311
322
  onClick: $,
312
- children: y.clear
323
+ children: g.clear
313
324
  })]
314
325
  }),
315
- H && /* @__PURE__ */ v("div", {
326
+ H && /* @__PURE__ */ y("div", {
316
327
  className: "rfe-options-loading",
317
328
  role: "status",
318
- children: [/* @__PURE__ */ _(m, { name: "loading" }), y.loading]
329
+ children: [/* @__PURE__ */ v(m, { name: "loading" }), g.loading]
319
330
  }),
320
- K.length ? /* @__PURE__ */ _(f, {
331
+ K.length ? /* @__PURE__ */ v(f, {
321
332
  items: K,
322
- getKey: C,
333
+ getKey: w,
323
334
  id: L,
324
335
  role: "listbox",
325
336
  label: z,
@@ -328,7 +339,7 @@ function w(r) {
328
339
  activeIndex: J,
329
340
  activeId: J >= 0 ? R(J) : void 0,
330
341
  variableHeight: r.variableHeight,
331
- render: (e, t) => /* @__PURE__ */ v("button", {
342
+ render: (e, t) => /* @__PURE__ */ y("button", {
332
343
  id: R(t),
333
344
  type: "button",
334
345
  role: "option",
@@ -341,75 +352,75 @@ function w(r) {
341
352
  className: "rfe-option",
342
353
  disabled: e.disabled || r.readOnly || O,
343
354
  onMouseEnter: () => F(t),
344
- onClick: () => re(e),
355
+ onClick: () => ie(e),
345
356
  children: [
346
- r.multiple && /* @__PURE__ */ _("span", {
357
+ r.multiple && /* @__PURE__ */ v("span", {
347
358
  className: "rfe-option-check",
348
359
  "data-checked": U.has(e.value),
349
- children: U.has(e.value) && /* @__PURE__ */ _(m, { name: "check" })
360
+ children: U.has(e.value) && /* @__PURE__ */ v(m, { name: "check" })
350
361
  }),
351
- /* @__PURE__ */ _("span", {
362
+ /* @__PURE__ */ v("span", {
352
363
  className: "rfe-option-label",
353
- children: r.renderOption ? r.renderOption(e, U.has(e.value)) : /* @__PURE__ */ v(g, { children: [
364
+ children: r.renderOption ? r.renderOption(e, U.has(e.value)) : /* @__PURE__ */ y(_, { children: [
354
365
  e.icon,
355
366
  e.label,
356
- e.description && /* @__PURE__ */ _("small", { children: e.description })
367
+ e.description && /* @__PURE__ */ v("small", { children: e.description })
357
368
  ] })
358
369
  }),
359
- !r.multiple && U.has(e.value) && /* @__PURE__ */ _(m, {
370
+ !r.multiple && U.has(e.value) && /* @__PURE__ */ v(m, {
360
371
  name: "check",
361
372
  source: r.icons?.check
362
373
  })
363
374
  ]
364
375
  })
365
- }) : !H && !B.error && /* @__PURE__ */ v("div", {
376
+ }) : !H && !B.error && /* @__PURE__ */ y("div", {
366
377
  className: "rfe-empty",
367
378
  role: "status",
368
- children: [/* @__PURE__ */ _(m, { name: "empty" }), y.empty]
379
+ children: [/* @__PURE__ */ v(m, { name: "empty" }), g.empty]
369
380
  }),
370
- B.error && /* @__PURE__ */ _("button", {
381
+ B.error && /* @__PURE__ */ v("button", {
371
382
  type: "button",
372
383
  className: "rfe-link",
373
384
  onClick: () => void B.retry(),
374
- children: y.retry
385
+ children: g.retry
375
386
  }),
376
- B.hasMore && !B.error && /* @__PURE__ */ _("button", {
387
+ B.hasMore && !B.error && /* @__PURE__ */ v("button", {
377
388
  type: "button",
378
389
  className: "rfe-link",
379
390
  disabled: B.loading,
380
391
  onClick: () => void B.more(),
381
- children: y.next
392
+ children: g.next
382
393
  })
383
- ] }), (r.multiple || r.needConfirm) && /* @__PURE__ */ v("div", {
394
+ ] }), (r.multiple || r.needConfirm) && /* @__PURE__ */ y("div", {
384
395
  className: "rfe-footer",
385
396
  children: [
386
- /* @__PURE__ */ v("button", {
397
+ /* @__PURE__ */ y("button", {
387
398
  type: "button",
388
399
  className: "rfe-link",
389
400
  onClick: () => N(!M),
390
401
  children: [
391
- y.selected,
402
+ g.selected,
392
403
  " ",
393
404
  E.length
394
405
  ]
395
406
  }),
396
- /* @__PURE__ */ _("span", { className: "rfe-spacer" }),
397
- r.needConfirm && /* @__PURE__ */ _("button", {
407
+ /* @__PURE__ */ v("span", { className: "rfe-spacer" }),
408
+ r.needConfirm && /* @__PURE__ */ v("button", {
398
409
  type: "button",
399
410
  className: "rfe-link",
400
- onClick: () => w(!1),
401
- children: y.cancel
411
+ onClick: () => C(!1),
412
+ children: g.cancel
402
413
  }),
403
- /* @__PURE__ */ _("button", {
414
+ /* @__PURE__ */ v("button", {
404
415
  className: "rfe-button",
405
416
  "data-variant": "primary",
406
417
  type: "button",
407
418
  onClick: ee,
408
- children: y.done
419
+ children: g.done
409
420
  })
410
421
  ]
411
422
  })]
412
423
  })
413
424
  });
414
425
  }
415
- export { x as n, S as t };
426
+ export { S as n, C as t };
@@ -1,8 +1,8 @@
1
1
  import { useEffect as e, useId as t, useLayoutEffect as n, useMemo as r, useRef as i, useState as a } from "react";
2
- import { n as o, o as s, r as c, s as l } from "./selection-DCIzhR5q.js";
3
- import { a as u, c as d, d as ee, f as te, i as ne, l as re, n as f, o as ie, p as ae, r as p, s as oe, t as m, u as h } from "./lazy-tree-NCX3ntYm.js";
4
- import { t as g } from "./icons-BwE05e0C.js";
5
- import { a as se } from "./useControllable-QDX_UWRh.js";
2
+ import { n as o, o as s, r as c, s as l } from "./selection-CA_66JX9.js";
3
+ import { a as u, c as d, d as ee, f as te, i as ne, l as re, n as f, o as ie, p as ae, r as p, s as oe, t as m, u as h } from "./lazy-tree-DNvNf_Yv.js";
4
+ import { t as g } from "./icons-B1dOXz-r.js";
5
+ import { c as se } from "./useControllable-Dt38Jg9E.js";
6
6
  import { Fragment as ce, jsx as _, jsxs as v } from "react/jsx-runtime";
7
7
  // src/components/select/TreeSelect.tsx
8
8
  var le = (e) => e.node.value, y = (e) => e.searchText ?? (typeof e.label == "string" ? e.label : String(e.value));
@@ -1,10 +1,10 @@
1
1
  import { Children as e, cloneElement as t, isValidElement as n, useCallback as r, useEffect as i, useId as a, useMemo as o, useRef as s, useState as c } from "react";
2
- import { i as l, o as u, s as d, t as f } from "./useControllable-QDX_UWRh.js";
3
- import { c as p, o as m, s as h, t as g } from "./inputs-Dx3xOy9q.js";
4
- import { n as _, t as v } from "./Select-BIBk_TT6.js";
5
- import { t as y } from "./TreeSelect-BQCyCCqa.js";
6
- import { s as b, t as x } from "./pickers-Bci1y8cc.js";
7
- import { a as S, i as C } from "./selection-DCIzhR5q.js";
2
+ import { l, s as u, t as d, u as f } from "./useControllable-Dt38Jg9E.js";
3
+ import { c as p, o as m, s as h, t as g } from "./inputs-w_es2t_C.js";
4
+ import { n as _, t as v } from "./Select-BxwT7MHH.js";
5
+ import { t as y } from "./TreeSelect-W5sgU5nW.js";
6
+ import { s as b, t as x } from "./pickers-5zLmSrsp.js";
7
+ import { a as S, i as C } from "./selection-CA_66JX9.js";
8
8
  import { jsx as w, jsxs as T } from "react/jsx-runtime";
9
9
  import { n as E } from "./validation-D6vk5NAv.js";
10
10
  // src/components/compound/ControlGroup.tsx
@@ -15,11 +15,11 @@ var D = (e) => typeof e == "number" ? `${e}px` : {
15
15
  large: "12px",
16
16
  full: "999px"
17
17
  }[e ?? ""] ?? e;
18
- function O({ children: e, width: t, minWidth: n, maxWidth: r, flex: i, radius: a, background: o, padding: s, divider: c, className: l, style: u, fieldName: f }) {
18
+ function O({ children: e, width: t, minWidth: n, maxWidth: r, flex: i, radius: a, background: o, padding: s, divider: c, className: l, style: u, fieldName: d }) {
19
19
  return /* @__PURE__ */ w("div", {
20
- className: d("rfe-control-group-item", l),
20
+ className: f("rfe-control-group-item", l),
21
21
  "data-divider": c,
22
- "data-compound-field": f,
22
+ "data-compound-field": d,
23
23
  "data-auto-width": t === "auto" || void 0,
24
24
  style: {
25
25
  width: t,
@@ -35,19 +35,19 @@ function O({ children: e, width: t, minWidth: n, maxWidth: r, flex: i, radius: a
35
35
  children: e
36
36
  });
37
37
  }
38
- function k({ children: a, disabled: u, readOnly: f, error: p, status: m, id: h, floatingLabel: g, floatingFilled: _, className: v, style: y, onFocus: b, onBlur: x, "aria-label": E, "aria-describedby": k, "aria-invalid": A, ...j }) {
39
- let M = l(), N = S(), { layout: P = "connected", direction: F = "horizontal", focusMode: I = P === "separated" ? "individual" : "group", radius: L, gap: R, padding: z, size: B = M.size, variant: V = M.variant, divider: H = !0, block: U = !0 } = {
38
+ function k({ children: a, disabled: l, readOnly: d, error: p, status: m, id: h, floatingLabel: g, floatingFilled: _, className: v, style: y, onFocus: b, onBlur: x, "aria-label": E, "aria-describedby": k, "aria-invalid": A, ...j }) {
39
+ let M = u(), N = S(), { layout: P = "connected", direction: F = "horizontal", focusMode: I = P === "separated" ? "individual" : "group", radius: L, gap: R, padding: z, size: B = M.size, variant: V = M.variant, divider: H = !0, block: U = !0 } = {
40
40
  ...M.controlGroup,
41
41
  ...j
42
42
  }, W = s(null), G = s(/* @__PURE__ */ new Set()), K = s(!1), q = s(null), [J, ee] = c(!1), Y = s({
43
43
  onFocus: b,
44
44
  onBlur: x,
45
- disabled: u
45
+ disabled: l
46
46
  });
47
47
  Y.current = {
48
48
  onFocus: b,
49
49
  onBlur: x,
50
- disabled: u
50
+ disabled: l
51
51
  };
52
52
  let X = r(() => {
53
53
  let e = W.current;
@@ -66,7 +66,7 @@ function k({ children: a, disabled: u, readOnly: f, error: p, status: m, id: h,
66
66
  };
67
67
  }, [X, Z]), i(() => {
68
68
  X();
69
- }, [u, X]);
69
+ }, [l, X]);
70
70
  let Q = r((e) => {
71
71
  G.current.add(e);
72
72
  let t = N?.registerPopup(e);
@@ -81,14 +81,14 @@ function k({ children: a, disabled: u, readOnly: f, error: p, status: m, id: h,
81
81
  "textarea",
82
82
  "button"
83
83
  ].includes(e.type) ? t(e, {
84
- ...u ? { disabled: !0 } : {},
85
- ...f ? e.type === "input" || e.type === "textarea" ? { readOnly: !0 } : { disabled: !0 } : {}
84
+ ...l ? { disabled: !0 } : {},
85
+ ...d ? e.type === "input" || e.type === "textarea" ? { readOnly: !0 } : { disabled: !0 } : {}
86
86
  }) : e;
87
87
  let r = e;
88
88
  return t(r, {
89
89
  size: P === "separated" ? r.props.size ?? B : B,
90
- ...u ? { disabled: !0 } : {},
91
- ...f ? { readOnly: !0 } : {}
90
+ ...l ? { disabled: !0 } : {},
91
+ ...d ? { readOnly: !0 } : {}
92
92
  });
93
93
  }, ne = e.toArray(a).map((r, i) => {
94
94
  if (n(r) && r.type === O) {
@@ -110,15 +110,15 @@ function k({ children: a, disabled: u, readOnly: f, error: p, status: m, id: h,
110
110
  "aria-label": E ?? g,
111
111
  "aria-describedby": k,
112
112
  "aria-invalid": A || p || m === "error" || void 0,
113
- "aria-disabled": u || void 0,
114
- className: d("rfe-control-group", !!g && "rfe-floating-shell", v),
113
+ "aria-disabled": l || void 0,
114
+ className: f("rfe-control-group", !!g && "rfe-floating-shell", v),
115
115
  "data-layout": P,
116
116
  "data-direction": F,
117
117
  "data-focus-mode": I,
118
118
  "data-focused": J,
119
119
  "data-floating-filled": _ || void 0,
120
120
  "data-status": A || p ? "error" : m ?? "default",
121
- "data-disabled": u || void 0,
121
+ "data-disabled": l || void 0,
122
122
  "data-size": B,
123
123
  "data-variant": V,
124
124
  "data-divider": H,
@@ -179,15 +179,15 @@ var I = {
179
179
  date: x,
180
180
  time: b
181
181
  };
182
- function L({ fields: e, value: t, defaultValue: n, onChange: r, name: i, loading: o, disabled: s, id: c, partStates: l, onPartChange: u, onPartBlur: d, ...p }) {
183
- let m = a(), [h, g] = f(t, M(e, n), r), _ = M(e, h);
182
+ function L({ fields: e, value: t, defaultValue: n, onChange: r, name: i, loading: o, disabled: s, id: c, partStates: l, onPartChange: u, onPartBlur: f, ...p }) {
183
+ let m = a(), [h, g] = d(t, M(e, n), r), _ = M(e, h);
184
184
  return /* @__PURE__ */ w(A, {
185
185
  ...p,
186
186
  floatingFilled: Object.values(_).some((e) => e != null && e !== "" && (!Array.isArray(e) || e.length > 0)),
187
187
  disabled: s || o,
188
188
  "aria-label": p["aria-label"] ?? i,
189
189
  children: e.filter((e) => N(e, _)).map((e, t) => {
190
- let n = I[e.type], { width: r, minWidth: a, maxWidth: f, flex: h, radius: v, background: y, padding: b, divider: x } = e, S = {
190
+ let n = I[e.type], { width: r, minWidth: a, maxWidth: d, flex: h, radius: v, background: y, padding: b, divider: x } = e, S = {
191
191
  ...e.componentProps,
192
192
  id: t === 0 ? c ?? m : `${c ?? m}-${t}`,
193
193
  name: e.name,
@@ -200,7 +200,7 @@ function L({ fields: e, value: t, defaultValue: n, onChange: r, name: i, loading
200
200
  [e.name]: t
201
201
  }),
202
202
  onBlur: () => {
203
- typeof e.componentProps?.onBlur == "function" && e.componentProps.onBlur(), d?.(e.name);
203
+ typeof e.componentProps?.onBlur == "function" && e.componentProps.onBlur(), f?.(e.name);
204
204
  },
205
205
  disabled: s || o || P(e, _) || e.componentProps?.disabled === !0,
206
206
  readOnly: p.readOnly || (typeof e.readOnly == "function" ? e.readOnly(_) : e.readOnly) || e.componentProps?.readOnly === !0
@@ -209,7 +209,7 @@ function L({ fields: e, value: t, defaultValue: n, onChange: r, name: i, loading
209
209
  fieldName: i ? `${i}.${e.name}` : void 0,
210
210
  width: r,
211
211
  minWidth: a,
212
- maxWidth: f,
212
+ maxWidth: d,
213
213
  flex: h,
214
214
  radius: v,
215
215
  background: y,
@@ -288,7 +288,7 @@ function H(e) {
288
288
  });
289
289
  }
290
290
  function U({ onSearch: e, buttonLabel: t, ...n }) {
291
- let r = u(), [i, a] = f(n.value, n.defaultValue ?? {
291
+ let r = l(), [i, a] = d(n.value, n.defaultValue ?? {
292
292
  value: "",
293
293
  option: null
294
294
  }, n.onChange);
package/dist/compound.js CHANGED
@@ -1 +1 @@
1
- export { t as CompoundField, f as ControlGroup, n as InputRange, r as InputSelect, i as NumberSelect, a as NumberUnit, o as SearchGroup, s as compoundDefaults, c as compoundRule, l as compoundValues, u as partDisabled, d as partVisible } from "./compound-BX_PoTK5.js";
1
+ export { t as CompoundField, f as ControlGroup, n as InputRange, r as InputSelect, i as NumberSelect, a as NumberUnit, o as SearchGroup, s as compoundDefaults, c as compoundRule, l as compoundValues, u as partDisabled, d as partVisible } from "./compound-nXxRSVJu.js";
package/dist/core.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { n as e, r as t, t as n } from "./validation-D6vk5NAv.js";
2
- import { _ as r, a as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, y as x } from "./store-CFSQW-Fv.js";
2
+ import { _ as r, a as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, y as x } from "./store-C9eBd8Y7.js";
3
3
  export { m as changedOutputValues, _ as cloneValues, v as createFormStore, g as createPathAdapter, a as defineValueAdapter, o as editArray, p as equalValue, u as expandPaths, s as fieldSegments, i as getPathValue, h as hasPath, d as inputValues, f as isArrayIndex, n as isEmpty, l as isPlainRecord, c as normalizePaths, r as omitPaths, y as outputValues, b as readPath, e as validateRuleIssue, t as validateRules, x as writePath };
package/dist/date-time.js CHANGED
@@ -1 +1 @@
1
- export { t as DatePicker, n as DateRangePicker, r as DateTimePicker, i as DateTimeRangePicker, a as MonthPicker, o as MonthRangePicker, s as TimePicker, c as TimeRangePicker, l as YearPicker, u as YearRangePicker } from "./pickers-Bci1y8cc.js";
1
+ export { t as DatePicker, n as DateRangePicker, r as DateTimePicker, i as DateTimeRangePicker, a as MonthPicker, o as MonthRangePicker, s as TimePicker, c as TimeRangePicker, l as YearPicker, u as YearRangePicker } from "./pickers-5zLmSrsp.js";