@arkitektbedriftene/fe-lib 1.2.1 → 1.4.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/ui.es.js CHANGED
@@ -1,34 +1,35 @@
1
1
  import { k as p, s as n, c as f } from "./stitches.config-00c23cdb.js";
2
- import { a as He, g as Fe } from "./stitches.config-00c23cdb.js";
3
- import { jsx as t, jsxs as c, Fragment as G } from "react/jsx-runtime";
4
- import { forwardRef as u, createContext as K, useMemo as k, useContext as B, isValidElement as U, cloneElement as q, useState as J, useId as C } from "react";
5
- import { useFloating as Q, autoUpdate as Z, offset as _, flip as oo, shift as eo, useTransitionStyles as ro, useClick as to, useHover as no, safePolygon as ao, useDismiss as io, useRole as so, useInteractions as lo, FloatingPortal as co } from "@floating-ui/react";
2
+ import { a as We, g as Ve } from "./stitches.config-00c23cdb.js";
3
+ import { jsx as t, jsxs as c, Fragment as K } from "react/jsx-runtime";
4
+ import { forwardRef as g, createContext as U, useMemo as w, useContext as B, isValidElement as q, cloneElement as J, useState as Q, useId as k } from "react";
5
+ import { useFloating as Z, autoUpdate as _, offset as oo, flip as eo, shift as ro, useTransitionStyles as to, useClick as no, useHover as ao, safePolygon as io, useDismiss as so, useRole as lo, useInteractions as co, FloatingPortal as $o } from "@floating-ui/react";
6
6
  import * as y from "@radix-ui/react-toolbar";
7
- import { b as $o, c as mo, d as uo } from "./index.esm-ab03d8db.js";
7
+ import { b as mo, c as go, d as uo } from "./index.esm-ab03d8db.js";
8
8
  import * as b from "@radix-ui/react-dialog";
9
9
  import * as m from "@radix-ui/react-dropdown-menu";
10
- import { f as go, g as H } from "./index.esm-67eba761.js";
11
- import po from "react-select";
10
+ import { f as po, g as H } from "./index.esm-67eba761.js";
11
+ import ho from "react-select";
12
12
  import * as F from "@radix-ui/react-checkbox";
13
+ import * as M from "@radix-ui/react-switch";
13
14
  import "@stitches/react";
14
- const ho = p({
15
+ const bo = p({
15
16
  "0%": {
16
17
  transform: "rotate(0)"
17
18
  },
18
19
  "100%": {
19
20
  transform: "rotate(360deg)"
20
21
  }
21
- }), bo = p({
22
+ }), fo = p({
22
23
  "0%": {
23
24
  strokeDashoffset: 600
24
25
  },
25
26
  "100%": {
26
27
  strokeDashoffset: 0
27
28
  }
28
- }), fo = n("svg", {
29
- animation: `${ho} 2s linear infinite`
30
- }), yo = n("circle", {
31
- animation: `${bo} 1.6s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite`,
29
+ }), yo = n("svg", {
30
+ animation: `${bo} 2s linear infinite`
31
+ }), xo = n("circle", {
32
+ animation: `${fo} 1.6s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite`,
32
33
  fill: "transparent",
33
34
  stroke: "currentColor",
34
35
  strokeDasharray: 300,
@@ -36,7 +37,7 @@ const ho = p({
36
37
  strokeLinecap: "round",
37
38
  strokeMiterlimit: 10,
38
39
  strokeWidth: 12
39
- }), xo = n("div", {
40
+ }), vo = n("div", {
40
41
  lineHeight: 0,
41
42
  flexShrink: 0,
42
43
  variants: {
@@ -74,20 +75,20 @@ const ho = p({
74
75
  size: "sm",
75
76
  color: "dark"
76
77
  }
77
- }), vo = u(
78
+ }), wo = g(
78
79
  (o, e) => /* @__PURE__ */ t(
79
- xo,
80
+ vo,
80
81
  {
81
82
  ref: e,
82
83
  ...o,
83
84
  children: /* @__PURE__ */ t(
84
- fo,
85
+ yo,
85
86
  {
86
87
  x: "0px",
87
88
  y: "0px",
88
89
  viewBox: "0 0 150 150",
89
90
  children: /* @__PURE__ */ t(
90
- yo,
91
+ xo,
91
92
  {
92
93
  cx: "75",
93
94
  cy: "75",
@@ -256,7 +257,7 @@ const ho = p({
256
257
  color: "secondary",
257
258
  size: "md"
258
259
  }
259
- }), M = u(
260
+ }), P = g(
260
261
  ({ children: o, disabled: e, isLoading: r, variant: a, color: i, ...s }, l) => (!i && a === "primary" && (i = "primary"), /* @__PURE__ */ c(
261
262
  ko,
262
263
  {
@@ -269,7 +270,7 @@ const ho = p({
269
270
  ...s,
270
271
  children: [
271
272
  o,
272
- r && /* @__PURE__ */ t(vo, { color: "inherit" })
273
+ r && /* @__PURE__ */ t(wo, { color: "inherit" })
273
274
  ]
274
275
  }
275
276
  ))
@@ -312,7 +313,7 @@ const ho = p({
312
313
  color: "info",
313
314
  size: "md"
314
315
  }
315
- }), ne = u(
316
+ }), de = g(
316
317
  ({ children: o, ...e }, r) => /* @__PURE__ */ t(
317
318
  Co,
318
319
  {
@@ -322,19 +323,19 @@ const ho = p({
322
323
  children: o
323
324
  }
324
325
  )
325
- ), wo = p({
326
+ ), So = p({
326
327
  "0%": { opacity: 0, transform: "translateY(0.5rem)" },
327
328
  "100%": { opacity: 1, transform: "translateY(0)" }
328
- }), So = p({
329
+ }), zo = p({
329
330
  "0%": { opacity: 0, transform: "translateX(-0.5rem)" },
330
331
  "100%": { opacity: 1, transform: "translateX(0)" }
331
332
  }), Io = p({
332
333
  "0%": { opacity: 0, transform: "translateY(-0.5rem)" },
333
334
  "100%": { opacity: 1, transform: "translateY(0)" }
334
- }), zo = p({
335
+ }), Ro = p({
335
336
  "0%": { opacity: 0, transform: "translateX(0.5rem)" },
336
337
  "100%": { opacity: 1, transform: "translateX(0)" }
337
- }), Ro = f({
338
+ }), To = f({
338
339
  backgroundColor: "white",
339
340
  boxShadow: "$overlayCard",
340
341
  borderRadius: "$sm",
@@ -344,23 +345,23 @@ const ho = p({
344
345
  // so for other popups that uses `OverlayCard` to work
345
346
  // we need to explicitly set this.
346
347
  pointerEvents: "auto"
347
- }), To = f({
348
+ }), Do = f({
348
349
  animationDuration: "400ms",
349
350
  animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
350
351
  willChange: "transform, opacity",
351
352
  '&[data-state="open"]': {
352
353
  '&[data-side="top"]': { animationName: Io },
353
- '&[data-side="right"]': { animationName: zo },
354
- '&[data-side="bottom"]': { animationName: wo },
355
- '&[data-side="left"]': { animationName: So }
354
+ '&[data-side="right"]': { animationName: Ro },
355
+ '&[data-side="bottom"]': { animationName: So },
356
+ '&[data-side="left"]': { animationName: zo }
356
357
  }
357
- }), P = n(
358
+ }), A = n(
358
359
  "div",
359
- Ro,
360
- To
361
- ), d = n("div"), w = K(
360
+ To,
361
+ Do
362
+ ), d = n("div"), C = U(
362
363
  {}
363
- ), Do = ({
364
+ ), Bo = ({
364
365
  children: o,
365
366
  offset: e,
366
367
  open: r,
@@ -370,65 +371,65 @@ const ho = p({
370
371
  placement: l = "bottom",
371
372
  role: $ = "dialog"
372
373
  }) => {
373
- const { refs: g, floatingStyles: x, context: h } = Q({
374
+ const { refs: u, floatingStyles: x, context: h } = Z({
374
375
  open: r,
375
376
  onOpenChange: a,
376
377
  placement: l,
377
- whileElementsMounted: Z,
378
- middleware: [_(e), oo(), eo()]
379
- }), { isMounted: I, styles: z } = ro(h, {
380
- initial: ({ side: L }) => ({
378
+ whileElementsMounted: _,
379
+ middleware: [oo(e), eo(), ro()]
380
+ }), { isMounted: z, styles: I } = to(h, {
381
+ initial: ({ side: G }) => ({
381
382
  opacity: 0,
382
383
  transform: {
383
384
  top: "translateY(-0.5rem)",
384
385
  right: "translateX(0.5rem)",
385
386
  bottom: "translateY(0.5rem)",
386
387
  left: "translateX(-0.5rem)"
387
- }[L]
388
+ }[G]
388
389
  })
389
- }), j = to(h, { enabled: i === "click" }), N = no(h, {
390
+ }), j = no(h, { enabled: i === "click" }), L = ao(h, {
390
391
  enabled: i === "hover",
391
392
  delay: s,
392
- handleClose: ao()
393
- }), X = io(h), Y = so(h, { role: $ }), { getFloatingProps: R, getReferenceProps: T } = lo([
393
+ handleClose: io()
394
+ }), N = so(h), Y = lo(h, { role: $ }), { getFloatingProps: R, getReferenceProps: T } = co([
394
395
  j,
396
+ L,
395
397
  N,
396
- X,
397
398
  Y
398
- ]), E = k(
399
+ ]), E = w(
399
400
  () => ({
400
401
  getFloatingProps: R,
401
402
  getReferenceProps: T,
402
403
  floatingStyles: x,
403
- refs: g,
404
- isMounted: I,
405
- transitionStyles: z
404
+ refs: u,
405
+ isMounted: z,
406
+ transitionStyles: I
406
407
  }),
407
408
  [
408
409
  R,
409
410
  T,
410
- I,
411
- g,
411
+ z,
412
+ u,
412
413
  x,
413
- z
414
+ I
414
415
  ]
415
416
  );
416
- return /* @__PURE__ */ t(w.Provider, { value: E, children: o });
417
- }, Bo = ({ children: o }) => {
418
- const { getReferenceProps: e, refs: r } = B(w);
419
- return /* @__PURE__ */ t(G, { children: U(o) && q(o, {
417
+ return /* @__PURE__ */ t(C.Provider, { value: E, children: o });
418
+ }, Ho = ({ children: o }) => {
419
+ const { getReferenceProps: e, refs: r } = B(C);
420
+ return /* @__PURE__ */ t(K, { children: q(o) && J(o, {
420
421
  ref: r.setReference,
421
422
  ...e()
422
423
  }) });
423
- }, Ho = ({ children: o, overlayCardProps: e }) => {
424
+ }, Fo = ({ children: o, overlayCardProps: e }) => {
424
425
  const {
425
426
  getFloatingProps: r,
426
427
  isMounted: a,
427
428
  refs: i,
428
429
  floatingStyles: s,
429
430
  transitionStyles: l
430
- } = B(w);
431
- return a ? /* @__PURE__ */ t(co, { children: /* @__PURE__ */ t(
431
+ } = B(C);
432
+ return a ? /* @__PURE__ */ t($o, { children: /* @__PURE__ */ t(
432
433
  d,
433
434
  {
434
435
  ref: i.setFloating,
@@ -437,13 +438,13 @@ const ho = p({
437
438
  css: {
438
439
  zIndex: "$overlayCard"
439
440
  },
440
- children: /* @__PURE__ */ t(P, { ...e, style: l, children: o })
441
+ children: /* @__PURE__ */ t(A, { ...e, style: l, children: o })
441
442
  }
442
443
  ) }) : null;
443
- }, ae = ({ children: o, content: e }) => {
444
- const [r, a] = J(!1);
444
+ }, ce = ({ children: o, content: e }) => {
445
+ const [r, a] = Q(!1);
445
446
  return /* @__PURE__ */ c(
446
- Do,
447
+ Bo,
447
448
  {
448
449
  open: r,
449
450
  onOpenChange: a,
@@ -452,8 +453,8 @@ const ho = p({
452
453
  offset: { mainAxis: 8 },
453
454
  role: "tooltip",
454
455
  children: [
455
- /* @__PURE__ */ t(Bo, { children: o }),
456
- /* @__PURE__ */ t(Ho, { overlayCardProps: {
456
+ /* @__PURE__ */ t(Ho, { children: o }),
457
+ /* @__PURE__ */ t(Fo, { overlayCardProps: {
457
458
  css: {
458
459
  background: "rgba(0,0,0, 0.9)",
459
460
  color: "#fff",
@@ -464,7 +465,7 @@ const ho = p({
464
465
  ]
465
466
  }
466
467
  );
467
- }, ie = n("span", {
468
+ }, $e = n("span", {
468
469
  flex: "0 0 auto",
469
470
  display: "inline-flex",
470
471
  padding: "$1 $2",
@@ -501,24 +502,24 @@ const ho = p({
501
502
  defaultVariants: {
502
503
  color: "primary"
503
504
  }
504
- }), se = n(y.Root, {
505
+ }), me = n(y.Root, {
505
506
  backgroundColor: "$gray50",
506
507
  display: "flex",
507
508
  alignItems: "center",
508
509
  padding: "$1",
509
510
  gap: "$1"
510
- }), le = n(y.ToggleGroup, {
511
+ }), ge = n(y.ToggleGroup, {
511
512
  display: "flex",
512
513
  gap: "$1",
513
514
  alignItems: "center"
514
- }), de = n(y.Separator, {
515
+ }), ue = n(y.Separator, {
515
516
  width: "1px",
516
517
  height: "1.5rem",
517
518
  my: "$1",
518
519
  mx: "$1",
519
520
  backgroundColor: "$border"
520
- }), A = u(({ css: o, ...e }, r) => /* @__PURE__ */ t(
521
- M,
521
+ }), W = g(({ css: o, ...e }, r) => /* @__PURE__ */ t(
522
+ P,
522
523
  {
523
524
  ref: r,
524
525
  icon: !0,
@@ -532,27 +533,27 @@ const ho = p({
532
533
  },
533
534
  ...e
534
535
  }
535
- )), ce = u(
536
+ )), pe = g(
536
537
  ({ children: o, dropdown: e, ...r }, a) => /* @__PURE__ */ t(
537
538
  y.Button,
538
539
  {
539
540
  asChild: !0,
540
541
  ref: a,
541
542
  children: /* @__PURE__ */ c(
542
- A,
543
+ W,
543
544
  {
544
545
  variant: "transparent",
545
546
  color: "primary",
546
547
  ...r,
547
548
  children: [
548
549
  o,
549
- e && /* @__PURE__ */ t($o, {})
550
+ e && /* @__PURE__ */ t(mo, {})
550
551
  ]
551
552
  }
552
553
  )
553
554
  }
554
555
  )
555
- ), $e = u(({
556
+ ), he = g(({
556
557
  children: o,
557
558
  value: e,
558
559
  ...r
@@ -563,7 +564,7 @@ const ho = p({
563
564
  asChild: !0,
564
565
  ref: a,
565
566
  children: /* @__PURE__ */ t(
566
- A,
567
+ W,
567
568
  {
568
569
  variant: "transparent",
569
570
  color: "primary",
@@ -573,7 +574,7 @@ const ho = p({
573
574
  }
574
575
  )
575
576
  }
576
- )), me = n("div", {
577
+ )), be = n("div", {
577
578
  color: "$$cardText",
578
579
  backgroundColor: "$$cardBackground",
579
580
  borderRadius: "$md",
@@ -598,7 +599,7 @@ const ho = p({
598
599
  variant: "primary",
599
600
  elevation: "raised"
600
601
  }
601
- }), Fo = n("div", {
602
+ }), Mo = n("div", {
602
603
  borderRadius: "$md",
603
604
  padding: "$1",
604
605
  border: "2px solid $blue100",
@@ -606,12 +607,12 @@ const ho = p({
606
607
  display: "flex",
607
608
  alignItems: "center",
608
609
  gap: "$1"
609
- }), ue = (o) => /* @__PURE__ */ t(Fo, { ...o }), ge = ({
610
+ }), fe = (o) => /* @__PURE__ */ t(Mo, { ...o }), ye = ({
610
611
  children: o,
611
612
  active: e = !1,
612
613
  ...r
613
614
  }) => /* @__PURE__ */ t(
614
- M,
615
+ P,
615
616
  {
616
617
  variant: "transparent",
617
618
  color: "primary",
@@ -624,12 +625,12 @@ const ho = p({
624
625
  ...r,
625
626
  children: o
626
627
  }
627
- ), Mo = n(b.Overlay, {
628
+ ), Po = n(b.Overlay, {
628
629
  backgroundColor: "rgba(0, 0, 0, 0.7)",
629
630
  position: "fixed",
630
631
  zIndex: "$overlayCard",
631
632
  inset: 0
632
- }), Po = n(b.Content, {
633
+ }), Ao = n(b.Content, {
633
634
  backgroundColor: "white",
634
635
  borderRadius: "$md",
635
636
  position: "fixed",
@@ -643,7 +644,7 @@ const ho = p({
643
644
  maxHeight: "85vh",
644
645
  padding: "$8",
645
646
  "&:focus": { outline: "none" }
646
- }), pe = ({
647
+ }), xe = ({
647
648
  children: o,
648
649
  open: e,
649
650
  onOpenChange: r,
@@ -653,14 +654,14 @@ const ho = p({
653
654
  }) => /* @__PURE__ */ c(b.Root, { open: e, onOpenChange: r, children: [
654
655
  a && /* @__PURE__ */ t(b.Trigger, { asChild: !0, children: a }),
655
656
  /* @__PURE__ */ c(b.Portal, { children: [
656
- /* @__PURE__ */ t(Mo, {}),
657
- /* @__PURE__ */ t(Po, { css: i, ...s, children: o })
657
+ /* @__PURE__ */ t(Po, {}),
658
+ /* @__PURE__ */ t(Ao, { css: i, ...s, children: o })
658
659
  ] })
659
- ] }), he = n("h2", {
660
+ ] }), ve = n("h2", {
660
661
  fontSize: "$xl",
661
662
  fontWeight: "$medium",
662
663
  marginBottom: "$6"
663
- }), be = n("div", {
664
+ }), we = n("div", {
664
665
  display: "flex",
665
666
  gap: "$2",
666
667
  justifyContent: "flex-end",
@@ -669,7 +670,7 @@ const ho = p({
669
670
  padding: "$4",
670
671
  borderBottomRightRadius: "$md",
671
672
  borderBottomLeftRadius: "$md"
672
- }), fe = n("div", {
673
+ }), Wo = n("div", {
673
674
  display: "flex",
674
675
  variants: {
675
676
  direction: {
@@ -704,7 +705,7 @@ const ho = p({
704
705
  direction: "column",
705
706
  gap: 4
706
707
  }
707
- }), D = /* @__PURE__ */ new Map(), Ao = (o) => {
708
+ }), D = /* @__PURE__ */ new Map(), Vo = (o) => {
708
709
  const e = D.get(o);
709
710
  if (e)
710
711
  return e;
@@ -713,7 +714,7 @@ const ho = p({
713
714
  r = o.charCodeAt($) + ((r << 5) - r);
714
715
  const l = `hsl(${r % 360}, 80%, 40%)`;
715
716
  return D.set(o, l), l;
716
- }, Wo = n("div", {
717
+ }, Oo = n("div", {
717
718
  flex: "0 0 auto",
718
719
  display: "inline-flex",
719
720
  alignItems: "center",
@@ -744,17 +745,17 @@ const ho = p({
744
745
  defaultVariants: {
745
746
  size: "md"
746
747
  }
747
- }), ye = ({
748
+ }), ke = ({
748
749
  css: o,
749
750
  colorString: e,
750
751
  ...r
751
752
  }) => {
752
- const a = k(
753
- () => e ? Ao(e) : "$gray200",
753
+ const a = w(
754
+ () => e ? Vo(e) : "$gray200",
754
755
  [e]
755
756
  );
756
- return /* @__PURE__ */ t(Wo, { css: { backgroundColor: a, ...o }, ...r });
757
- }, Vo = n(P, {
757
+ return /* @__PURE__ */ t(Oo, { css: { backgroundColor: a, ...o }, ...r });
758
+ }, Xo = n(A, {
758
759
  minWidth: "max(var(--radix-popper-anchor-width), 12rem)",
759
760
  padding: "$1"
760
761
  }), S = f({
@@ -780,7 +781,7 @@ const ho = p({
780
781
  backgroundColor: "transparent"
781
782
  }
782
783
  }
783
- }), xe = ({
784
+ }), Ce = ({
784
785
  side: o = "bottom",
785
786
  align: e = "center",
786
787
  trigger: r,
@@ -797,10 +798,10 @@ const ho = p({
797
798
  align: e,
798
799
  collisionPadding: 10,
799
800
  sideOffset: i,
800
- children: /* @__PURE__ */ t(Vo, { children: a })
801
+ children: /* @__PURE__ */ t(Xo, { children: a })
801
802
  }
802
803
  ) })
803
- ] }), Oo = n(m.ItemIndicator, {
804
+ ] }), jo = n(m.ItemIndicator, {
804
805
  position: "absolute",
805
806
  left: 0,
806
807
  top: 0,
@@ -809,26 +810,26 @@ const ho = p({
809
810
  display: "flex",
810
811
  justifyContent: "center",
811
812
  alignItems: "center"
812
- }), ve = n(m.Separator, {
813
+ }), Se = n(m.Separator, {
813
814
  height: 1,
814
815
  backgroundColor: "$gray200",
815
816
  margin: 1
816
- }), ke = n(m.Item, S), Ce = n(m.Item, S, {
817
+ }), ze = n(m.Item, S), Ie = n(m.Item, S, {
817
818
  padding: "$2",
818
819
  display: "flex",
819
820
  alignItems: "center",
820
821
  gap: "$2"
821
- }), jo = n(m.CheckboxItem, S), we = ({
822
+ }), Lo = n(m.CheckboxItem, S), Re = ({
822
823
  value: o,
823
824
  onChange: e,
824
825
  children: r
825
826
  }) => /* @__PURE__ */ c(
826
- jo,
827
+ Lo,
827
828
  {
828
829
  checked: o,
829
830
  onCheckedChange: e,
830
831
  children: [
831
- /* @__PURE__ */ t(Oo, { children: /* @__PURE__ */ t(go, { size: "0.75rem" }) }),
832
+ /* @__PURE__ */ t(jo, { children: /* @__PURE__ */ t(po, { size: "0.75rem" }) }),
832
833
  r
833
834
  ]
834
835
  }
@@ -892,30 +893,30 @@ const ho = p({
892
893
  boxShadow: e.isFocused ? "0 0 0 4px var(--colors-red100)" : "none"
893
894
  };
894
895
  }
895
- }, Xo = {
896
+ }, Yo = {
896
897
  IndicatorSeparator: () => null
897
- }, W = ({
898
+ }, V = ({
898
899
  styles: o,
899
900
  components: e,
900
901
  error: r,
901
902
  ...a
902
903
  }) => {
903
- const i = k(
904
+ const i = w(
904
905
  () => ({
905
906
  ...v,
906
907
  ...o,
907
908
  ...r ? No : void 0
908
909
  }),
909
910
  [o, r]
910
- ), s = k(
911
+ ), s = w(
911
912
  () => ({
912
- ...Xo,
913
+ ...Yo,
913
914
  ...e
914
915
  }),
915
916
  [e]
916
917
  );
917
- return /* @__PURE__ */ t(po, { components: s, styles: i, ...a });
918
- }, Se = (o) => /* @__PURE__ */ t(W, { ...o, isSearchable: !0 }), Ie = ({
918
+ return /* @__PURE__ */ t(ho, { components: s, styles: i, ...a });
919
+ }, Te = (o) => /* @__PURE__ */ t(V, { ...o, isSearchable: !0 }), De = ({
919
920
  label: o,
920
921
  css: e,
921
922
  error: r,
@@ -934,7 +935,7 @@ const ho = p({
934
935
  }
935
936
  ),
936
937
  /* @__PURE__ */ t(
937
- W,
938
+ V,
938
939
  {
939
940
  ...a,
940
941
  error: r,
@@ -943,7 +944,7 @@ const ho = p({
943
944
  }
944
945
  ),
945
946
  typeof r == "string" && /* @__PURE__ */ t(d, { css: { color: "$red600", fontSize: "$sm", marginTop: "$2" }, children: r })
946
- ] }), V = f({
947
+ ] }), O = f({
947
948
  display: "block",
948
949
  width: "100%",
949
950
  padding: "0.5rem 0.75rem",
@@ -955,7 +956,7 @@ const ho = p({
955
956
  "-webkit-appearance": "none",
956
957
  "-moz-appearance": "none",
957
958
  appearance: "none"
958
- }), O = f({
959
+ }), X = f({
959
960
  display: "block",
960
961
  width: "100%",
961
962
  background: "#fff",
@@ -979,14 +980,14 @@ const ho = p({
979
980
  }
980
981
  }
981
982
  }
982
- }), Yo = n("input", V), Eo = n("div", O, {
983
+ }), Eo = n("input", O), Go = n("div", X, {
983
984
  display: "flex",
984
985
  alignItems: "center",
985
986
  gap: "$2",
986
987
  width: "100%"
987
- }), ze = u(
988
- ({ type: o = "text", label: e, error: r, style: a, css: i, suffix: s, id: l, ...$ }, g) => {
989
- const x = C();
988
+ }), Be = g(
989
+ ({ type: o = "text", label: e, error: r, style: a, css: i, suffix: s, id: l, ...$ }, u) => {
990
+ const x = k();
990
991
  return l = l || x, /* @__PURE__ */ c(d, { css: i, children: [
991
992
  e && /* @__PURE__ */ t(
992
993
  d,
@@ -1001,12 +1002,12 @@ const ho = p({
1001
1002
  children: e
1002
1003
  }
1003
1004
  ),
1004
- /* @__PURE__ */ c(Eo, { error: !!r, children: [
1005
+ /* @__PURE__ */ c(Go, { error: !!r, children: [
1005
1006
  /* @__PURE__ */ t(
1006
- Yo,
1007
+ Eo,
1007
1008
  {
1008
1009
  id: l,
1009
- ref: g,
1010
+ ref: u,
1010
1011
  type: o,
1011
1012
  "aria-invalid": r ? "true" : "false",
1012
1013
  ...$
@@ -1035,15 +1036,15 @@ const ho = p({
1035
1036
  typeof r == "string" && /* @__PURE__ */ t(d, { css: { color: "$red600", fontSize: "$sm", marginTop: "$2" }, children: r })
1036
1037
  ] });
1037
1038
  }
1038
- ), Lo = n("textarea", V), Go = n("div", O, {
1039
+ ), Ko = n("textarea", O), Uo = n("div", X, {
1039
1040
  display: "flex",
1040
1041
  alignItems: "center",
1041
1042
  gap: "$2",
1042
1043
  width: "100%"
1043
- }), Re = u(
1044
+ }), He = g(
1044
1045
  ({ label: o, error: e, style: r, css: a, suffix: i, id: s, ...l }, $) => {
1045
- const g = C();
1046
- return s = s || g, /* @__PURE__ */ c(d, { css: a, children: [
1046
+ const u = k();
1047
+ return s = s || u, /* @__PURE__ */ c(d, { css: a, children: [
1047
1048
  o && /* @__PURE__ */ t(
1048
1049
  d,
1049
1050
  {
@@ -1057,9 +1058,9 @@ const ho = p({
1057
1058
  children: o
1058
1059
  }
1059
1060
  ),
1060
- /* @__PURE__ */ c(Go, { error: !!e, children: [
1061
+ /* @__PURE__ */ c(Uo, { error: !!e, children: [
1061
1062
  /* @__PURE__ */ t(
1062
- Lo,
1063
+ Ko,
1063
1064
  {
1064
1065
  id: s,
1065
1066
  ref: $,
@@ -1090,7 +1091,7 @@ const ho = p({
1090
1091
  typeof e == "string" && /* @__PURE__ */ t(d, { css: { color: "$red600", fontSize: "$sm", marginTop: "$2" }, children: e })
1091
1092
  ] });
1092
1093
  }
1093
- ), Ko = n(F.Root, {
1094
+ ), qo = n(F.Root, {
1094
1095
  display: "flex",
1095
1096
  alignItems: "center",
1096
1097
  justifyContent: "center",
@@ -1126,14 +1127,14 @@ const ho = p({
1126
1127
  defaultVariants: {
1127
1128
  size: "md"
1128
1129
  }
1129
- }), Uo = n(F.Indicator, {
1130
+ }), Jo = n(F.Indicator, {
1130
1131
  "[data-icon]": {
1131
1132
  display: "none"
1132
1133
  },
1133
1134
  "&[data-state=checked] [data-icon=checked], &[data-state=indeterminate] [data-icon=indeterminate]": {
1134
1135
  display: "block"
1135
1136
  }
1136
- }), qo = n("label", {
1137
+ }), Qo = n("label", {
1137
1138
  flex: "0 1 auto",
1138
1139
  variants: {
1139
1140
  size: {
@@ -1151,60 +1152,115 @@ const ho = p({
1151
1152
  defaultVariants: {
1152
1153
  size: "md"
1153
1154
  }
1154
- }), Te = ({
1155
+ }), Fe = ({
1155
1156
  id: o,
1156
1157
  size: e,
1157
1158
  label: r,
1158
1159
  ...a
1159
1160
  }) => {
1160
- const i = C();
1161
+ const i = k();
1161
1162
  return o = o || i, /* @__PURE__ */ c(d, { css: { display: "flex", alignItems: "center", gap: "$2" }, children: [
1162
- /* @__PURE__ */ t(Ko, { id: o, size: e, ...a, children: /* @__PURE__ */ c(Uo, { children: [
1163
- /* @__PURE__ */ t(mo, { "data-icon": "indeterminate" }),
1163
+ /* @__PURE__ */ t(qo, { id: o, size: e, ...a, children: /* @__PURE__ */ c(Jo, { children: [
1164
+ /* @__PURE__ */ t(go, { "data-icon": "indeterminate" }),
1164
1165
  /* @__PURE__ */ t(uo, { "data-icon": "checked" })
1165
1166
  ] }) }),
1166
- r && /* @__PURE__ */ t(qo, { htmlFor: o, size: e, children: r })
1167
+ r && /* @__PURE__ */ t(Qo, { htmlFor: o, size: e, children: r })
1167
1168
  ] });
1168
- };
1169
+ }, Zo = n(M.Root, {
1170
+ width: "42px",
1171
+ height: "25px",
1172
+ backgroundColor: "$gray200",
1173
+ borderRadius: "9999px",
1174
+ position: "relative",
1175
+ border: "none",
1176
+ "-webkit-tap-highlight-color": "rgba(0, 0, 0, 0)",
1177
+ "&:focus": {
1178
+ boxShadow: "0 0 0 2px $gray100"
1179
+ },
1180
+ "&[data-state='checked']": {
1181
+ backgroundColor: "$green400"
1182
+ }
1183
+ }), _o = n(M.Thumb, {
1184
+ display: "block",
1185
+ width: "21px",
1186
+ height: "21px",
1187
+ backgroundColor: "white",
1188
+ borderRadius: "9999px",
1189
+ boxShadow: "0 2px 2px $gray600",
1190
+ transition: "transform 100ms",
1191
+ transform: "translateX(2px)",
1192
+ willChange: "transform",
1193
+ "&[data-state='checked']": {
1194
+ transform: "translateX(19px)"
1195
+ }
1196
+ }), oe = n("div", {
1197
+ fontWeight: "$bold",
1198
+ variants: {
1199
+ size: {
1200
+ sm: {
1201
+ fontSize: "$sm"
1202
+ },
1203
+ md: {
1204
+ fontSize: "$md"
1205
+ },
1206
+ lg: {
1207
+ fontSize: "$lg"
1208
+ }
1209
+ }
1210
+ },
1211
+ defaultVariants: {
1212
+ size: "md"
1213
+ }
1214
+ }), Me = ({
1215
+ label: o,
1216
+ stackProps: e,
1217
+ labelProps: r,
1218
+ size: a,
1219
+ ...i
1220
+ }) => /* @__PURE__ */ c(Wo, { direction: "row", align: "center", ...e, children: [
1221
+ o && /* @__PURE__ */ t(oe, { size: a, ...r, children: o }),
1222
+ /* @__PURE__ */ t(Zo, { ...i, children: /* @__PURE__ */ t(_o, {}) })
1223
+ ] });
1169
1224
  export {
1170
- ne as Alert,
1171
- ye as Avatar,
1172
- ie as Badge,
1225
+ de as Alert,
1226
+ ke as Avatar,
1227
+ $e as Badge,
1173
1228
  d as Box,
1174
- M as Button,
1175
- A as ButtonInToolbar,
1176
- me as Card,
1177
- Te as Checkbox,
1178
- Se as Combobox,
1179
- pe as Dialog,
1180
- be as DialogActions,
1181
- he as DialogHeader,
1182
- xe as DropdownMenu,
1183
- we as DropdownMenuCheckboxItem,
1184
- Ce as DropdownMenuIconItem,
1185
- ke as DropdownMenuItem,
1186
- ve as DropdownMenuSeparator,
1187
- Vo as MenuOverlayCard,
1188
- ue as NavBar,
1189
- ge as NavBarItem,
1190
- P as OverlayCard,
1191
- Do as Popover,
1192
- Ho as PopoverContent,
1193
- Bo as PopoverTrigger,
1194
- Ie as Select,
1195
- vo as Spinner,
1196
- fe as Stack,
1197
- Re as TextArea,
1198
- ze as TextInput,
1199
- se as Toolbar,
1200
- ce as ToolbarButton,
1201
- de as ToolbarSeparator,
1202
- le as ToolbarToggleGroup,
1203
- $e as ToolbarToggleItem,
1204
- ae as Tooltip,
1229
+ P as Button,
1230
+ W as ButtonInToolbar,
1231
+ be as Card,
1232
+ Fe as Checkbox,
1233
+ Te as Combobox,
1234
+ xe as Dialog,
1235
+ we as DialogActions,
1236
+ ve as DialogHeader,
1237
+ Ce as DropdownMenu,
1238
+ Re as DropdownMenuCheckboxItem,
1239
+ Ie as DropdownMenuIconItem,
1240
+ ze as DropdownMenuItem,
1241
+ Se as DropdownMenuSeparator,
1242
+ Xo as MenuOverlayCard,
1243
+ fe as NavBar,
1244
+ ye as NavBarItem,
1245
+ A as OverlayCard,
1246
+ Bo as Popover,
1247
+ Fo as PopoverContent,
1248
+ Ho as PopoverTrigger,
1249
+ De as Select,
1250
+ wo as Spinner,
1251
+ Wo as Stack,
1252
+ Me as Switch,
1253
+ He as TextArea,
1254
+ Be as TextInput,
1255
+ me as Toolbar,
1256
+ pe as ToolbarButton,
1257
+ ue as ToolbarSeparator,
1258
+ ge as ToolbarToggleGroup,
1259
+ he as ToolbarToggleItem,
1260
+ ce as Tooltip,
1205
1261
  f as css,
1206
- He as getCssText,
1207
- Fe as globalCss,
1262
+ We as getCssText,
1263
+ Ve as globalCss,
1208
1264
  p as keyframes,
1209
1265
  S as menuItemStyles,
1210
1266
  n as styled