@simpli-route/apollo-ds 0.0.12 → 0.0.13

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 (72) hide show
  1. package/dist/components/Checkbox/Checkbox.d.ts +7 -0
  2. package/dist/components/Checkbox/Checkbox.test.d.ts +1 -0
  3. package/dist/components/Checkbox/MarkIcon.d.ts +3 -0
  4. package/dist/components/Checkbox/index.d.ts +2 -0
  5. package/dist/components/Checkbox/types.d.ts +24 -0
  6. package/dist/components/Checkbox/variants.d.ts +7 -0
  7. package/dist/components/index.d.ts +1 -0
  8. package/dist/index.cjs.js +1 -1
  9. package/dist/index.cjs10.js +1 -1
  10. package/dist/index.cjs11.js +1 -1
  11. package/dist/index.cjs12.js +1 -1
  12. package/dist/index.cjs13.js +1 -1
  13. package/dist/index.cjs14.js +1 -1
  14. package/dist/index.cjs15.js +1 -1
  15. package/dist/index.cjs16.js +1 -1
  16. package/dist/index.cjs17.js +1 -1
  17. package/dist/index.cjs18.js +1 -1
  18. package/dist/index.cjs19.js +1 -1
  19. package/dist/index.cjs2.js +1 -1
  20. package/dist/index.cjs20.js +1 -9
  21. package/dist/index.cjs21.js +1 -19
  22. package/dist/index.cjs22.js +1 -1
  23. package/dist/index.cjs23.js +9 -1
  24. package/dist/index.cjs24.js +19 -1
  25. package/dist/index.cjs25.js +1 -1
  26. package/dist/index.cjs26.js +1 -1
  27. package/dist/index.cjs27.js +1 -1
  28. package/dist/index.cjs28.js +1 -0
  29. package/dist/index.cjs29.js +1 -0
  30. package/dist/index.cjs3.js +1 -1
  31. package/dist/index.cjs30.js +1 -0
  32. package/dist/index.cjs4.js +1 -1
  33. package/dist/index.cjs5.js +1 -1
  34. package/dist/index.cjs6.js +1 -1
  35. package/dist/index.cjs7.js +1 -1
  36. package/dist/index.cjs8.js +1 -1
  37. package/dist/index.cjs9.js +1 -1
  38. package/dist/index.d.ts +1 -0
  39. package/dist/index.es.js +12 -10
  40. package/dist/index.es10.js +6 -6
  41. package/dist/index.es11.js +6 -22
  42. package/dist/index.es12.js +10 -15
  43. package/dist/index.es13.js +10 -20
  44. package/dist/index.es14.js +20 -81
  45. package/dist/index.es15.js +28 -20
  46. package/dist/index.es16.js +38 -10
  47. package/dist/index.es17.js +21 -9
  48. package/dist/index.es18.js +15 -31
  49. package/dist/index.es19.js +20 -2
  50. package/dist/index.es2.js +3 -3
  51. package/dist/index.es20.js +91 -29
  52. package/dist/index.es21.js +22 -599
  53. package/dist/index.es22.js +2 -5
  54. package/dist/index.es23.js +29 -172
  55. package/dist/index.es24.js +599 -2
  56. package/dist/index.es25.js +5 -2
  57. package/dist/index.es26.js +173 -21
  58. package/dist/index.es27.js +2 -21
  59. package/dist/index.es28.js +4 -0
  60. package/dist/index.es29.js +23 -0
  61. package/dist/index.es3.js +24 -23
  62. package/dist/index.es30.js +23 -0
  63. package/dist/index.es4.js +46 -48
  64. package/dist/index.es5.js +45 -65
  65. package/dist/index.es6.js +70 -8
  66. package/dist/index.es7.js +7 -7
  67. package/dist/index.es8.js +8 -33
  68. package/dist/index.es9.js +33 -6
  69. package/dist/stories/Checkbox.stories.d.ts +17 -0
  70. package/dist/stories/Switch.stories.d.ts +2 -0
  71. package/dist/style.css +32 -0
  72. package/package.json +2 -2
@@ -1,23 +1,175 @@
1
- import t from "react";
2
- const e = t, a = ({
3
- title: r,
4
- titleId: n,
5
- ...l
6
- }, o) => /* @__PURE__ */ e.createElement("svg", Object.assign({
7
- fill: "currentColor",
8
- "aria-hidden": "true",
9
- viewBox: "0 0 24 24",
10
- xmlns: "http://www.w3.org/2000/svg",
11
- ref: o,
12
- "aria-labelledby": n
13
- }, l), r ? /* @__PURE__ */ e.createElement("title", {
14
- id: n
15
- }, r) : null, /* @__PURE__ */ e.createElement("path", {
16
- fillRule: "evenodd",
17
- d: "M2 11.85c0-.47.35-.85.783-.85h18.434c.432 0 .783.38.783.85s-.35.85-.783.85H2.783c-.432 0-.783-.38-.783-.85",
18
- clipRule: "evenodd"
19
- })), c = e.forwardRef(a);
20
- var s = c;
1
+ import { cva as r } from "class-variance-authority";
2
+ const t = r(
3
+ "inline-flex select-none items-center justify-center text-center text-base font-semibold leading-6 transition duration-150 ease-in-out focus:outline-none",
4
+ {
5
+ variants: {
6
+ intent: {
7
+ primary: "bg-primary-500 text-primary-50",
8
+ secondary: "border border-primary-500 bg-primary-50 text-primary-500",
9
+ tertiary: "text-primary-500",
10
+ outline: "border border-primary-500 text-primary-500",
11
+ success: "border bg-success-500 text-success-50",
12
+ error: "border bg-error-500 text-error-50",
13
+ orangeWarning: "border bg-orange-warning-500 text-orange-warning-50",
14
+ yellowWarning: "border bg-yellow-warning-500 text-[#6F5711]",
15
+ //TODO: Este color yellow-warning-900 esta mal en @simpli-route/tailwind-preset, debe borrarse la 'h' al final del color
16
+ info: "border bg-blue-500 text-blue-50"
17
+ },
18
+ size: {
19
+ xs: "rounded px-3 py-1",
20
+ sm: "rounded px-3 py-2",
21
+ md: "rounded-lg px-4 py-3",
22
+ lg: "rounded-lg px-6 py-4"
23
+ },
24
+ isDisabled: {
25
+ true: "pointer-events-none cursor-not-allowed border-none bg-neutral-400 text-neutral-600"
26
+ },
27
+ isHovered: {
28
+ true: ""
29
+ },
30
+ isActive: {
31
+ true: ""
32
+ },
33
+ fullWidth: {
34
+ true: "w-full",
35
+ false: "w-fit"
36
+ },
37
+ isLoading: {
38
+ true: "pointer-events-none cursor-not-allowed opacity-70"
39
+ },
40
+ isFocused: {
41
+ true: "focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-[0.4px] border-none",
42
+ false: ""
43
+ }
44
+ },
45
+ defaultVariants: {
46
+ intent: "primary",
47
+ size: "md"
48
+ },
49
+ compoundVariants: [
50
+ /* Hover State */
51
+ {
52
+ intent: "primary",
53
+ isHovered: !0,
54
+ class: "bg-primary-700"
55
+ },
56
+ {
57
+ intent: "secondary",
58
+ isHovered: !0,
59
+ class: "bg-primary-200"
60
+ },
61
+ {
62
+ intent: "tertiary",
63
+ isHovered: !0,
64
+ class: "bg-primary-300 text-primary-800"
65
+ },
66
+ {
67
+ intent: "outline",
68
+ isHovered: !0,
69
+ class: "bg-primary-500 text-primary-50"
70
+ },
71
+ {
72
+ intent: "success",
73
+ isHovered: !0,
74
+ class: "bg-success-700 text-neutral-50"
75
+ },
76
+ {
77
+ intent: "error",
78
+ isHovered: !0,
79
+ class: "bg-error-700 text-error-50"
80
+ },
81
+ {
82
+ intent: "orangeWarning",
83
+ isHovered: !0,
84
+ class: "bg-orange-warning-700 text-orange-warning-50"
85
+ },
86
+ {
87
+ intent: "yellowWarning",
88
+ isHovered: !0,
89
+ class: "bg-yellow-warning-700 text-neutral-50"
90
+ },
91
+ {
92
+ intent: "info",
93
+ isHovered: !0,
94
+ class: "bg-blue-700 text-blue-50"
95
+ },
96
+ /* /Focus State */
97
+ {
98
+ intent: "success",
99
+ isFocused: !0,
100
+ class: "border-[1.5px] focus:ring-success-500"
101
+ },
102
+ {
103
+ intent: "error",
104
+ isFocused: !0,
105
+ class: "border-[1.5px] focus:ring-error-500"
106
+ },
107
+ {
108
+ intent: "orangeWarning",
109
+ isFocused: !0,
110
+ class: "border-[1.5px] focus:ring-orange-500"
111
+ },
112
+ {
113
+ intent: "yellowWarning",
114
+ isFocused: !0,
115
+ class: "border-[1.5px] focus:ring-yellow-500"
116
+ },
117
+ {
118
+ intent: "info",
119
+ isFocused: !0,
120
+ class: "border-[1.5px] focus:ring-blue-500"
121
+ },
122
+ /* Active State */
123
+ {
124
+ intent: "primary",
125
+ isActive: !0,
126
+ class: "bg-primary-900"
127
+ },
128
+ {
129
+ intent: "secondary",
130
+ isActive: !0,
131
+ class: "bg-primary-300"
132
+ },
133
+ {
134
+ intent: "tertiary",
135
+ isActive: !0,
136
+ class: "bg-primary-500 text-white"
137
+ },
138
+ {
139
+ intent: "outline",
140
+ isActive: !0,
141
+ class: "border border-primary-500 bg-primary-300 text-primary-500"
142
+ },
143
+ {
144
+ intent: "success",
145
+ isActive: !0,
146
+ class: "border border-transparent bg-success-300 text-success-900"
147
+ },
148
+ {
149
+ intent: "error",
150
+ isActive: !0,
151
+ class: "border border-transparent bg-error-300 text-error-900"
152
+ },
153
+ {
154
+ intent: "orangeWarning",
155
+ isActive: !0,
156
+ class: "border border-transparent bg-orange-warning-300 text-orange-warning-900"
157
+ },
158
+ {
159
+ intent: "yellowWarning",
160
+ isActive: !0,
161
+ class: "border border-transparent bg-yellow-warning-300 text-[#6F5711]"
162
+ //TODO: Este color yellow-warning-900 esta mal en @simpli-route/tailwind-preset, debe borrarse la 'h' al final del color
163
+ },
164
+ {
165
+ intent: "info",
166
+ isActive: !0,
167
+ class: "border border-transparent bg-blue-200 text-blue-900"
168
+ }
169
+ /* /Active State */
170
+ ]
171
+ }
172
+ );
21
173
  export {
22
- s as M
174
+ t as buttonVariants
23
175
  };
@@ -1,23 +1,4 @@
1
- import t from "react";
2
- const e = t, n = ({
3
- title: r,
4
- titleId: a,
5
- ...l
6
- }, o) => /* @__PURE__ */ e.createElement("svg", Object.assign({
7
- fill: "currentColor",
8
- "aria-hidden": "true",
9
- viewBox: "0 0 24 24",
10
- xmlns: "http://www.w3.org/2000/svg",
11
- ref: o,
12
- "aria-labelledby": a
13
- }, l), r ? /* @__PURE__ */ e.createElement("title", {
14
- id: a
15
- }, r) : null, /* @__PURE__ */ e.createElement("path", {
16
- fillRule: "evenodd",
17
- d: "M11.885 2c.433 0 .783.35.783.783v8.434h8.549a.783.783 0 1 1 0 1.566h-8.549v8.434a.783.783 0 1 1-1.567 0v-8.434H2.783a.783.783 0 1 1 0-1.566h8.318V2.783c0-.432.351-.783.784-.783",
18
- clipRule: "evenodd"
19
- })), c = e.forwardRef(n);
20
- var d = c;
1
+ var r = {};
21
2
  export {
22
- d as P
3
+ r as __exports
23
4
  };
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
@@ -0,0 +1,23 @@
1
+ import t from "react";
2
+ const e = t, a = ({
3
+ title: r,
4
+ titleId: n,
5
+ ...l
6
+ }, o) => /* @__PURE__ */ e.createElement("svg", Object.assign({
7
+ fill: "currentColor",
8
+ "aria-hidden": "true",
9
+ viewBox: "0 0 24 24",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ ref: o,
12
+ "aria-labelledby": n
13
+ }, l), r ? /* @__PURE__ */ e.createElement("title", {
14
+ id: n
15
+ }, r) : null, /* @__PURE__ */ e.createElement("path", {
16
+ fillRule: "evenodd",
17
+ d: "M2 11.85c0-.47.35-.85.783-.85h18.434c.432 0 .783.38.783.85s-.35.85-.783.85H2.783c-.432 0-.783-.38-.783-.85",
18
+ clipRule: "evenodd"
19
+ })), c = e.forwardRef(a);
20
+ var s = c;
21
+ export {
22
+ s as M
23
+ };
package/dist/index.es3.js CHANGED
@@ -1,11 +1,12 @@
1
- import { j as s } from "./index.es9.js";
1
+ import { j as s } from "./index.es10.js";
2
2
  import { Button as I } from "react-aria-components";
3
- import { cn as x } from "./index.es10.js";
3
+ import { cn as x } from "./index.es11.js";
4
4
  import "react";
5
- import { buttonVariants as B } from "./index.es23.js";
6
- import { Loader as y } from "./index.es4.js";
7
- import "./index.es14.js";
8
- import "./index.es15.js";
5
+ import { buttonVariants as B } from "./index.es26.js";
6
+ import "./index.es16.js";
7
+ import { Loader as y } from "./index.es5.js";
8
+ import "./index.es20.js";
9
+ import "./index.es21.js";
9
10
  const j = ({
10
11
  renderPosition: t,
11
12
  leftIcon: m,
@@ -14,20 +15,20 @@ const j = ({
14
15
  loaderPosition: r,
15
16
  loaderProps: e
16
17
  }) => {
17
- const a = t === "left" ? m : t === "right" ? f : null;
18
- return a || l && r === t ? /* @__PURE__ */ s.jsx("span", { className: t === "left" ? "mr-1" : "ml-1", children: l && r === t ? /* @__PURE__ */ s.jsx(y, { size: "sm", ...e }) : a }) : null;
19
- }, L = (t) => {
18
+ const o = t === "left" ? m : t === "right" ? f : null;
19
+ return o || l && r === t ? /* @__PURE__ */ s.jsx("span", { className: t === "left" ? "mr-1" : "ml-1", children: l && r === t ? /* @__PURE__ */ s.jsx(y, { size: "sm", ...e }) : o }) : null;
20
+ }, M = (t) => {
20
21
  const {
21
22
  intent: m = "primary",
22
23
  size: f = "md",
23
24
  leftIcon: l,
24
25
  rightIcon: r,
25
26
  isDisabled: e,
26
- children: a,
27
+ children: o,
27
28
  className: N,
28
- isLoading: o,
29
- loaderPosition: u = "left",
30
- loaderProps: p,
29
+ isLoading: a,
30
+ loaderPosition: p = "left",
31
+ loaderProps: u,
31
32
  fullWidth: b = !1,
32
33
  unstyled: c = !1,
33
34
  focus: h = !0,
@@ -42,7 +43,7 @@ const j = ({
42
43
  isDisabled: e,
43
44
  isFocused: h || !c ? n : !1,
44
45
  fullWidth: b,
45
- isLoading: o
46
+ isLoading: a
46
47
  }),
47
48
  N
48
49
  );
@@ -50,7 +51,7 @@ const j = ({
50
51
  I,
51
52
  {
52
53
  "data-disabled": e || void 0,
53
- "data-loading": o || void 0,
54
+ "data-loading": a || void 0,
54
55
  isDisabled: e,
55
56
  className: ({ isPressed: d, isHovered: i, isFocusVisible: n }) => w(d, i, n),
56
57
  ...v,
@@ -59,9 +60,9 @@ const j = ({
59
60
  j,
60
61
  {
61
62
  renderPosition: "left",
62
- loaderPosition: u,
63
- loaderProps: p,
64
- isLoading: o,
63
+ loaderPosition: p,
64
+ loaderProps: u,
65
+ isLoading: a,
65
66
  leftIcon: l
66
67
  }
67
68
  ),
@@ -69,16 +70,16 @@ const j = ({
69
70
  "span",
70
71
  {
71
72
  className: x("flex h-full items-center overflow-hidden whitespace-nowrap", g ? "w-full" : ""),
72
- children: a
73
+ children: o
73
74
  }
74
75
  ),
75
76
  /* @__PURE__ */ s.jsx(
76
77
  j,
77
78
  {
78
79
  renderPosition: "right",
79
- loaderPosition: u,
80
- loaderProps: p,
81
- isLoading: o,
80
+ loaderPosition: p,
81
+ loaderProps: u,
82
+ isLoading: a,
82
83
  rightIcon: r
83
84
  }
84
85
  )
@@ -87,5 +88,5 @@ const j = ({
87
88
  );
88
89
  };
89
90
  export {
90
- L as Button
91
+ M as Button
91
92
  };
@@ -0,0 +1,23 @@
1
+ import t from "react";
2
+ const e = t, n = ({
3
+ title: r,
4
+ titleId: a,
5
+ ...l
6
+ }, o) => /* @__PURE__ */ e.createElement("svg", Object.assign({
7
+ fill: "currentColor",
8
+ "aria-hidden": "true",
9
+ viewBox: "0 0 24 24",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ ref: o,
12
+ "aria-labelledby": a
13
+ }, l), r ? /* @__PURE__ */ e.createElement("title", {
14
+ id: a
15
+ }, r) : null, /* @__PURE__ */ e.createElement("path", {
16
+ fillRule: "evenodd",
17
+ d: "M11.885 2c.433 0 .783.35.783.783v8.434h8.549a.783.783 0 1 1 0 1.566h-8.549v8.434a.783.783 0 1 1-1.567 0v-8.434H2.783a.783.783 0 1 1 0-1.566h8.318V2.783c0-.432.351-.783.784-.783",
18
+ clipRule: "evenodd"
19
+ })), c = e.forwardRef(n);
20
+ var d = c;
21
+ export {
22
+ d as P
23
+ };
package/dist/index.es4.js CHANGED
@@ -1,52 +1,50 @@
1
- import { j as e } from "./index.es9.js";
2
- import { useVisuallyHidden as a } from "react-aria";
3
- import { cn as l } from "./index.es10.js";
4
- const d = ({ className: s, label: r, size: t = "sm" }) => {
5
- const i = (() => {
6
- switch (t) {
7
- case "xs":
8
- return "h-4 w-4 ";
9
- case "sm":
10
- return "h-8 w-8";
11
- case "md":
12
- return "h-12 w-12";
13
- case "lg":
14
- return "h-16 w-16";
15
- default:
16
- return "h-8 w-8";
1
+ import { j as e } from "./index.es10.js";
2
+ import { Checkbox as i } from "react-aria-components";
3
+ import { cn as m } from "./index.es11.js";
4
+ import { MarkIcon as h } from "./index.es15.js";
5
+ import { checkboxVariants as j } from "./index.es16.js";
6
+ const g = ({
7
+ isIndeterminate: x = !1,
8
+ isDisabled: r = !1,
9
+ className: c,
10
+ children: a,
11
+ onChange: l,
12
+ isSelected: s,
13
+ id: n,
14
+ ...p
15
+ }) => {
16
+ const f = (t, o) => m(
17
+ j({
18
+ isDisabled: r,
19
+ isFocusVisible: t,
20
+ isHovered: o,
21
+ isSelected: s,
22
+ label: !!a
23
+ })
24
+ );
25
+ return /* @__PURE__ */ e.jsx(
26
+ i,
27
+ {
28
+ className: m("group flex items-center", c),
29
+ isSelected: s,
30
+ isDisabled: r,
31
+ id: n,
32
+ onChange: l,
33
+ ...p,
34
+ children: ({ isFocusVisible: t, isHovered: o }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
35
+ /* @__PURE__ */ e.jsx("div", { className: f(t, o), "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(h, { isIndeterminate: x, isSelected: s, className: "size-3" }) }),
36
+ a && /* @__PURE__ */ e.jsx(
37
+ "span",
38
+ {
39
+ className: m("select-none text-base leading-6", r ? "text-neutral-500" : "text-primary-900"),
40
+ id: n,
41
+ children: a
42
+ }
43
+ )
44
+ ] })
17
45
  }
18
- })(), { visuallyHiddenProps: n } = a();
19
- return /* @__PURE__ */ e.jsxs("div", { role: "status", className: "flex flex-col items-center justify-center gap-1", children: [
20
- /* @__PURE__ */ e.jsxs(
21
- "svg",
22
- {
23
- "aria-hidden": "true",
24
- className: l(i, "mr-2 animate-spin fill-primary-500 text-neutral-500", s),
25
- viewBox: "0 0 100 101",
26
- fill: "none",
27
- xmlns: "http://www.w3.org/2000/svg",
28
- children: [
29
- /* @__PURE__ */ e.jsx(
30
- "path",
31
- {
32
- d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
33
- fill: "currentColor"
34
- }
35
- ),
36
- /* @__PURE__ */ e.jsx(
37
- "path",
38
- {
39
- d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
40
- fill: "currentFill"
41
- }
42
- )
43
- ]
44
- }
45
- ),
46
- r && /* @__PURE__ */ e.jsx("span", { className: "text-base leading-6 text-primary-900", children: r }),
47
- /* @__PURE__ */ e.jsx("span", { ...n, children: "..." })
48
- ] });
46
+ );
49
47
  };
50
48
  export {
51
- d as Loader
49
+ g as Checkbox
52
50
  };
package/dist/index.es5.js CHANGED
@@ -1,72 +1,52 @@
1
- import { j as t } from "./index.es9.js";
2
- import { Switch as d } from "react-aria-components";
3
- import { cn as f } from "./index.es10.js";
4
- import { ContentSwitch as y } from "./index.es12.js";
5
- import { SwitchIndicator as L } from "./index.es13.js";
6
- import { switchVariants as u } from "./index.es14.js";
7
- const C = ({
8
- children: c,
9
- label: i,
10
- description: m,
11
- errorMessage: e,
12
- validationState: p,
13
- size: a = "md",
14
- isDisabled: r = !1,
15
- isSelected: o = !1,
16
- onChange: s,
17
- "aria-label": h,
18
- "aria-describedby": x
19
- }) => {
20
- const l = p === "invalid" && !r, j = a === "sm" ? { offLeft: 3, onLeft: 19 } : { offLeft: 4, onLeft: 28 };
21
- return /* @__PURE__ */ t.jsxs("label", { className: f("group flex flex-row items-center gap-2", r ? "opacity-40" : "opacity-100"), children: [
22
- /* @__PURE__ */ t.jsx(
23
- d,
1
+ import { j as e } from "./index.es10.js";
2
+ import { useVisuallyHidden as a } from "react-aria";
3
+ import { cn as l } from "./index.es11.js";
4
+ const d = ({ className: s, label: r, size: t = "sm" }) => {
5
+ const i = (() => {
6
+ switch (t) {
7
+ case "xs":
8
+ return "h-4 w-4 ";
9
+ case "sm":
10
+ return "h-8 w-8";
11
+ case "md":
12
+ return "h-12 w-12";
13
+ case "lg":
14
+ return "h-16 w-16";
15
+ default:
16
+ return "h-8 w-8";
17
+ }
18
+ })(), { visuallyHiddenProps: n } = a();
19
+ return /* @__PURE__ */ e.jsxs("div", { role: "status", className: "flex flex-col items-center justify-center gap-1", children: [
20
+ /* @__PURE__ */ e.jsxs(
21
+ "svg",
24
22
  {
25
- isDisabled: r,
26
- isSelected: o,
27
- "aria-checked": o,
28
- "aria-label": h,
29
- "aria-describedby": x,
30
- onChange: s,
31
- children: ({ isFocusVisible: w, isHovered: n }) => /* @__PURE__ */ t.jsx(
32
- "div",
33
- {
34
- className: f(
35
- u({
36
- isSelected: o,
37
- isDisabled: r,
38
- isFocusVisible: w,
39
- size: a,
40
- isHoveredWhenOff: n && !o
41
- })
42
- ),
43
- children: /* @__PURE__ */ t.jsx(
44
- L,
45
- {
46
- isSelected: o,
47
- isDisabled: r,
48
- isHovered: n,
49
- size: a,
50
- dimensions: j
51
- }
52
- )
53
- }
54
- )
23
+ "aria-hidden": "true",
24
+ className: l(i, "mr-2 animate-spin fill-primary-500 text-neutral-500", s),
25
+ viewBox: "0 0 100 101",
26
+ fill: "none",
27
+ xmlns: "http://www.w3.org/2000/svg",
28
+ children: [
29
+ /* @__PURE__ */ e.jsx(
30
+ "path",
31
+ {
32
+ d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
33
+ fill: "currentColor"
34
+ }
35
+ ),
36
+ /* @__PURE__ */ e.jsx(
37
+ "path",
38
+ {
39
+ d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
40
+ fill: "currentFill"
41
+ }
42
+ )
43
+ ]
55
44
  }
56
45
  ),
57
- /* @__PURE__ */ t.jsx(
58
- y,
59
- {
60
- label: i,
61
- description: m,
62
- errorMessage: e,
63
- isDisabled: r,
64
- isInvalid: l,
65
- children: c
66
- }
67
- )
46
+ r && /* @__PURE__ */ e.jsx("span", { className: "text-base leading-6 text-primary-900", children: r }),
47
+ /* @__PURE__ */ e.jsx("span", { ...n, children: "..." })
68
48
  ] });
69
49
  };
70
50
  export {
71
- C as Switch
51
+ d as Loader
72
52
  };