@stokelp/ui 2.50.1 → 2.50.3

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/ui.js CHANGED
@@ -454,68 +454,79 @@ const { withProvider: Cc, withContext: v2 } = J(Td), ec = Cc(f(N.Root), "root",
454
454
  ...H
455
455
  }) => {
456
456
  const _ = o === "range";
457
- return /* @__PURE__ */ r(uc, { ...H, selectionMode: o, children: [
458
- /* @__PURE__ */ C(r1.Context, { children: (V) => /* @__PURE__ */ r(fc, { children: [
459
- /* @__PURE__ */ r(C0, { children: [
460
- /* @__PURE__ */ C(e0, { asChild: !0, index: 0, placeholder: h, children: /* @__PURE__ */ C(
461
- o9,
462
- {
463
- onInput: (m) => {
464
- const F = m.currentTarget.value;
465
- w && F === "" && V.clearValue();
466
- }
467
- }
468
- ) }),
469
- /* @__PURE__ */ r(Q7, { children: [
470
- /* @__PURE__ */ C(i0, { asChild: !0, children: /* @__PURE__ */ C("button", { children: /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ C(
471
- "path",
472
- {
473
- fillRule: "evenodd",
474
- clipRule: "evenodd",
475
- d: "M10 3.125C6.20304 3.125 3.125 6.20304 3.125 10C3.125 13.797 6.20304 16.875 10 16.875C13.797 16.875 16.875 13.797 16.875 10C16.875 6.20304 13.797 3.125 10 3.125ZM1.875 10C1.875 5.51269 5.51269 1.875 10 1.875C14.4873 1.875 18.125 5.51269 18.125 10C18.125 14.4873 14.4873 18.125 10 18.125C5.51269 18.125 1.875 14.4873 1.875 10ZM7.68306 7.68306C7.92714 7.43898 8.32286 7.43898 8.56694 7.68306L10 9.11612L11.4331 7.68306C11.6771 7.43898 12.0729 7.43898 12.3169 7.68306C12.561 7.92714 12.561 8.32286 12.3169 8.56694L10.8839 10L12.3169 11.4331C12.561 11.6771 12.561 12.0729 12.3169 12.3169C12.0729 12.561 11.6771 12.561 11.4331 12.3169L10 10.8839L8.56694 12.3169C8.32286 12.561 7.92714 12.561 7.68306 12.3169C7.43898 12.0729 7.43898 11.6771 7.68306 11.4331L9.11612 10L7.68306 8.56694C7.43898 8.32286 7.43898 7.92714 7.68306 7.68306Z",
476
- fill: "currentColor"
477
- }
478
- ) }) }) }),
479
- /* @__PURE__ */ C(t0, { style: { cursor: "pointer" }, children: /* @__PURE__ */ C(r0, {}) })
480
- ] })
481
- ] }),
482
- _ ? /* @__PURE__ */ r(C0, { children: [
483
- /* @__PURE__ */ C(e0, { asChild: !0, index: 1, placeholder: h, children: /* @__PURE__ */ C(
484
- o9,
485
- {
486
- onInput: (m) => {
487
- const F = m.currentTarget.value;
488
- w && F === "" && V.clearValue();
489
- }
490
- }
491
- ) }),
492
- /* @__PURE__ */ r(Q7, { children: [
493
- V.value.length === 2 ? /* @__PURE__ */ C(i0, { asChild: !0, children: /* @__PURE__ */ C("button", { children: /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ C(
494
- "path",
495
- {
496
- fillRule: "evenodd",
497
- clipRule: "evenodd",
498
- d: "M10 3.125C6.20304 3.125 3.125 6.20304 3.125 10C3.125 13.797 6.20304 16.875 10 16.875C13.797 16.875 16.875 13.797 16.875 10C16.875 6.20304 13.797 3.125 10 3.125ZM1.875 10C1.875 5.51269 5.51269 1.875 10 1.875C14.4873 1.875 18.125 5.51269 18.125 10C18.125 14.4873 14.4873 18.125 10 18.125C5.51269 18.125 1.875 14.4873 1.875 10ZM7.68306 7.68306C7.92714 7.43898 8.32286 7.43898 8.56694 7.68306L10 9.11612L11.4331 7.68306C11.6771 7.43898 12.0729 7.43898 12.3169 7.68306C12.561 7.92714 12.561 8.32286 12.3169 8.56694L10.8839 10L12.3169 11.4331C12.561 11.6771 12.561 12.0729 12.3169 12.3169C12.0729 12.561 11.6771 12.561 11.4331 12.3169L10 10.8839L8.56694 12.3169C8.32286 12.561 7.92714 12.561 7.68306 12.3169C7.43898 12.0729 7.43898 11.6771 7.68306 11.4331L9.11612 10L7.68306 8.56694C7.43898 8.32286 7.43898 7.92714 7.68306 7.68306Z",
499
- fill: "currentColor"
500
- }
501
- ) }) }) }) : null,
502
- /* @__PURE__ */ C(t0, { children: /* @__PURE__ */ C(r0, {}) })
503
- ] })
504
- ] }) : null
505
- ] }) }),
506
- /* @__PURE__ */ C(g5, { children: /* @__PURE__ */ C(Mc, { className: p, children: /* @__PURE__ */ C(pc, { children: /* @__PURE__ */ C(xc, { view: "day", children: /* @__PURE__ */ C(r1.Context, { children: (V) => /* @__PURE__ */ r(p2, { children: [
507
- /* @__PURE__ */ r(mc, { children: [
508
- /* @__PURE__ */ C(vc, { asChild: !0, children: /* @__PURE__ */ C(f2, { "aria-label": "prev", variant: "secondary", size: "md", children: /* @__PURE__ */ C(bc, {}) }) }),
509
- /* @__PURE__ */ C(Lc, {}),
510
- /* @__PURE__ */ C(_c, {}),
511
- /* @__PURE__ */ C(sc, { asChild: !0, children: /* @__PURE__ */ C(f2, { "aria-label": "next", variant: "secondary", size: "md", children: /* @__PURE__ */ C(yc, {}) }) })
512
- ] }),
513
- /* @__PURE__ */ r(Vc, { children: [
514
- /* @__PURE__ */ C(Rc, { children: /* @__PURE__ */ C(l0, { children: V.weekDays.map((m, F) => /* @__PURE__ */ C(Hc, { children: m.short }, F)) }) }),
515
- /* @__PURE__ */ C(gc, { children: V.weeks.map((m, F) => /* @__PURE__ */ C(l0, { children: m.map((P, W) => /* @__PURE__ */ C(Zc, { value: P, children: /* @__PURE__ */ C(wc, { asChild: !0, children: /* @__PURE__ */ C("button", { children: P.day }) }) }, W)) }, F)) })
516
- ] })
517
- ] }) }) }) }) }) })
518
- ] });
457
+ return /* @__PURE__ */ r(
458
+ uc,
459
+ {
460
+ ...H,
461
+ selectionMode: o,
462
+ onValueChange: (V) => {
463
+ var m;
464
+ return (m = H.onValueChange) == null ? void 0 : m.call(H, { ...V, valueAsString: [V.value.toString()] });
465
+ },
466
+ children: [
467
+ /* @__PURE__ */ C(r1.Context, { children: (V) => /* @__PURE__ */ r(fc, { children: [
468
+ /* @__PURE__ */ r(C0, { children: [
469
+ /* @__PURE__ */ C(e0, { asChild: !0, index: 0, placeholder: h, children: /* @__PURE__ */ C(
470
+ o9,
471
+ {
472
+ onInput: (m) => {
473
+ const F = m.currentTarget.value;
474
+ w && F === "" && V.clearValue();
475
+ }
476
+ }
477
+ ) }),
478
+ /* @__PURE__ */ r(Q7, { children: [
479
+ /* @__PURE__ */ C(i0, { asChild: !0, children: /* @__PURE__ */ C("button", { children: /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ C(
480
+ "path",
481
+ {
482
+ fillRule: "evenodd",
483
+ clipRule: "evenodd",
484
+ d: "M10 3.125C6.20304 3.125 3.125 6.20304 3.125 10C3.125 13.797 6.20304 16.875 10 16.875C13.797 16.875 16.875 13.797 16.875 10C16.875 6.20304 13.797 3.125 10 3.125ZM1.875 10C1.875 5.51269 5.51269 1.875 10 1.875C14.4873 1.875 18.125 5.51269 18.125 10C18.125 14.4873 14.4873 18.125 10 18.125C5.51269 18.125 1.875 14.4873 1.875 10ZM7.68306 7.68306C7.92714 7.43898 8.32286 7.43898 8.56694 7.68306L10 9.11612L11.4331 7.68306C11.6771 7.43898 12.0729 7.43898 12.3169 7.68306C12.561 7.92714 12.561 8.32286 12.3169 8.56694L10.8839 10L12.3169 11.4331C12.561 11.6771 12.561 12.0729 12.3169 12.3169C12.0729 12.561 11.6771 12.561 11.4331 12.3169L10 10.8839L8.56694 12.3169C8.32286 12.561 7.92714 12.561 7.68306 12.3169C7.43898 12.0729 7.43898 11.6771 7.68306 11.4331L9.11612 10L7.68306 8.56694C7.43898 8.32286 7.43898 7.92714 7.68306 7.68306Z",
485
+ fill: "currentColor"
486
+ }
487
+ ) }) }) }),
488
+ /* @__PURE__ */ C(t0, { style: { cursor: "pointer" }, children: /* @__PURE__ */ C(r0, {}) })
489
+ ] })
490
+ ] }),
491
+ _ ? /* @__PURE__ */ r(C0, { children: [
492
+ /* @__PURE__ */ C(e0, { asChild: !0, index: 1, placeholder: h, children: /* @__PURE__ */ C(
493
+ o9,
494
+ {
495
+ onInput: (m) => {
496
+ const F = m.currentTarget.value;
497
+ w && F === "" && V.clearValue();
498
+ }
499
+ }
500
+ ) }),
501
+ /* @__PURE__ */ r(Q7, { children: [
502
+ V.value.length === 2 ? /* @__PURE__ */ C(i0, { asChild: !0, children: /* @__PURE__ */ C("button", { children: /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ C(
503
+ "path",
504
+ {
505
+ fillRule: "evenodd",
506
+ clipRule: "evenodd",
507
+ d: "M10 3.125C6.20304 3.125 3.125 6.20304 3.125 10C3.125 13.797 6.20304 16.875 10 16.875C13.797 16.875 16.875 13.797 16.875 10C16.875 6.20304 13.797 3.125 10 3.125ZM1.875 10C1.875 5.51269 5.51269 1.875 10 1.875C14.4873 1.875 18.125 5.51269 18.125 10C18.125 14.4873 14.4873 18.125 10 18.125C5.51269 18.125 1.875 14.4873 1.875 10ZM7.68306 7.68306C7.92714 7.43898 8.32286 7.43898 8.56694 7.68306L10 9.11612L11.4331 7.68306C11.6771 7.43898 12.0729 7.43898 12.3169 7.68306C12.561 7.92714 12.561 8.32286 12.3169 8.56694L10.8839 10L12.3169 11.4331C12.561 11.6771 12.561 12.0729 12.3169 12.3169C12.0729 12.561 11.6771 12.561 11.4331 12.3169L10 10.8839L8.56694 12.3169C8.32286 12.561 7.92714 12.561 7.68306 12.3169C7.43898 12.0729 7.43898 11.6771 7.68306 11.4331L9.11612 10L7.68306 8.56694C7.43898 8.32286 7.43898 7.92714 7.68306 7.68306Z",
508
+ fill: "currentColor"
509
+ }
510
+ ) }) }) }) : null,
511
+ /* @__PURE__ */ C(t0, { children: /* @__PURE__ */ C(r0, {}) })
512
+ ] })
513
+ ] }) : null
514
+ ] }) }),
515
+ /* @__PURE__ */ C(g5, { children: /* @__PURE__ */ C(Mc, { className: p, children: /* @__PURE__ */ C(pc, { children: /* @__PURE__ */ C(xc, { view: "day", children: /* @__PURE__ */ C(r1.Context, { children: (V) => /* @__PURE__ */ r(p2, { children: [
516
+ /* @__PURE__ */ r(mc, { children: [
517
+ /* @__PURE__ */ C(vc, { asChild: !0, children: /* @__PURE__ */ C(f2, { "aria-label": "prev", variant: "secondary", size: "md", children: /* @__PURE__ */ C(bc, {}) }) }),
518
+ /* @__PURE__ */ C(Lc, {}),
519
+ /* @__PURE__ */ C(_c, {}),
520
+ /* @__PURE__ */ C(sc, { asChild: !0, children: /* @__PURE__ */ C(f2, { "aria-label": "next", variant: "secondary", size: "md", children: /* @__PURE__ */ C(yc, {}) }) })
521
+ ] }),
522
+ /* @__PURE__ */ r(Vc, { children: [
523
+ /* @__PURE__ */ C(Rc, { children: /* @__PURE__ */ C(l0, { children: V.weekDays.map((m, F) => /* @__PURE__ */ C(Hc, { children: m.short }, F)) }) }),
524
+ /* @__PURE__ */ C(gc, { children: V.weeks.map((m, F) => /* @__PURE__ */ C(l0, { children: m.map((P, W) => /* @__PURE__ */ C(Zc, { value: P, children: /* @__PURE__ */ C(wc, { asChild: !0, children: /* @__PURE__ */ C("button", { children: P.day }) }) }, W)) }, F)) })
525
+ ] })
526
+ ] }) }) }) }) }) })
527
+ ]
528
+ }
529
+ );
519
530
  }, us = K((h, p) => {
520
531
  const [o, w] = X7.splitVariantProps(h), [H, _] = j5(w), { children: V, className: m, ...F } = _, P = X7(o);
521
532
  return /* @__PURE__ */ r(D.div, { ref: p, className: X5(P.root, M2(H), m), ...F, children: [