@simpli-route/apollo-ds 0.0.16 → 0.0.17

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 (65) hide show
  1. package/dist/components/IconButton/IconButton.d.ts +4 -0
  2. package/dist/components/IconButton/IconButton.test.d.ts +1 -0
  3. package/dist/components/IconButton/index.d.ts +2 -0
  4. package/dist/components/IconButton/types.d.ts +9 -0
  5. package/dist/components/IconButton/variants.d.ts +8 -0
  6. package/dist/components/index.d.ts +1 -0
  7. package/dist/index.cjs.js +1 -1
  8. package/dist/index.cjs10.js +1 -1
  9. package/dist/index.cjs11.js +1 -1
  10. package/dist/index.cjs12.js +1 -1
  11. package/dist/index.cjs13.js +1 -1
  12. package/dist/index.cjs15.js +1 -1
  13. package/dist/index.cjs16.js +1 -1
  14. package/dist/index.cjs17.js +1 -1
  15. package/dist/index.cjs19.js +1 -1
  16. package/dist/index.cjs2.js +1 -1
  17. package/dist/index.cjs20.js +1 -1
  18. package/dist/index.cjs22.js +1 -1
  19. package/dist/index.cjs23.js +1 -9
  20. package/dist/index.cjs24.js +3 -13
  21. package/dist/index.cjs25.js +19 -1
  22. package/dist/index.cjs26.js +1 -1
  23. package/dist/index.cjs27.js +1 -1
  24. package/dist/index.cjs29.js +1 -1
  25. package/dist/index.cjs3.js +1 -1
  26. package/dist/index.cjs30.js +1 -1
  27. package/dist/index.cjs31.js +1 -0
  28. package/dist/index.cjs32.js +1 -0
  29. package/dist/index.cjs4.js +1 -1
  30. package/dist/index.cjs5.js +1 -1
  31. package/dist/index.cjs6.js +1 -1
  32. package/dist/index.cjs7.js +1 -1
  33. package/dist/index.cjs8.js +1 -1
  34. package/dist/index.cjs9.js +1 -1
  35. package/dist/index.es.js +17 -16
  36. package/dist/index.es10.js +33 -6
  37. package/dist/index.es11.js +6 -6
  38. package/dist/index.es12.js +6 -22
  39. package/dist/index.es13.js +2 -2
  40. package/dist/index.es15.js +22 -22
  41. package/dist/index.es16.js +2 -2
  42. package/dist/index.es17.js +2 -2
  43. package/dist/index.es19.js +2 -2
  44. package/dist/index.es2.js +3 -3
  45. package/dist/index.es20.js +2 -2
  46. package/dist/index.es22.js +22 -2
  47. package/dist/index.es23.js +2 -30
  48. package/dist/index.es24.js +21 -590
  49. package/dist/index.es25.js +599 -5
  50. package/dist/index.es26.js +5 -2
  51. package/dist/index.es27.js +152 -2
  52. package/dist/index.es29.js +2 -21
  53. package/dist/index.es3.js +7 -6
  54. package/dist/index.es30.js +2 -21
  55. package/dist/index.es31.js +23 -0
  56. package/dist/index.es32.js +23 -0
  57. package/dist/index.es4.js +2 -2
  58. package/dist/index.es5.js +36 -51
  59. package/dist/index.es6.js +48 -78
  60. package/dist/index.es7.js +80 -8
  61. package/dist/index.es8.js +7 -7
  62. package/dist/index.es9.js +8 -33
  63. package/dist/stories/IconButton.stories.d.ts +23 -0
  64. package/dist/style.css +47 -0
  65. package/package.json +10 -8
@@ -1,4 +1,154 @@
1
- var e = {};
1
+ import { cva as e } from "class-variance-authority";
2
+ const i = [
3
+ {
4
+ intent: "primary",
5
+ isHovered: !0,
6
+ isDisabled: !1,
7
+ isActive: !1,
8
+ class: "bg-primary-100"
9
+ },
10
+ {
11
+ intent: "primary",
12
+ isHovered: !0,
13
+ isDisabled: !1,
14
+ isActive: !0,
15
+ class: "bg-primary-700 text-primary-50"
16
+ },
17
+ {
18
+ intent: "secondary",
19
+ isHovered: !0,
20
+ isDisabled: !1,
21
+ isActive: !1,
22
+ class: "bg-primary-300"
23
+ },
24
+ {
25
+ intent: "secondary",
26
+ isHovered: !0,
27
+ isDisabled: !1,
28
+ isActive: !0,
29
+ class: "bg-primary-700 text-primary-50"
30
+ },
31
+ {
32
+ intent: "minimal",
33
+ isHovered: !0,
34
+ isDisabled: !1,
35
+ isActive: !1,
36
+ class: "bg-neutral-200 text-neutral-800"
37
+ },
38
+ {
39
+ intent: "minimal",
40
+ isHovered: !0,
41
+ isDisabled: !1,
42
+ isActive: !0,
43
+ class: "bg-neutral-200 text-primary-700"
44
+ }
45
+ ], t = [
46
+ {
47
+ intent: "primary",
48
+ isActive: !0,
49
+ isDisabled: !1,
50
+ class: "bg-primary-500 text-primary-50"
51
+ },
52
+ {
53
+ intent: "primary",
54
+ isActive: !0,
55
+ isDisabled: !0,
56
+ class: "bg-primary-300 text-primary-100"
57
+ },
58
+ {
59
+ intent: "secondary",
60
+ isActive: !0,
61
+ isDisabled: !1,
62
+ class: "bg-primary-700 text-primary-50"
63
+ },
64
+ {
65
+ intent: "secondary",
66
+ isActive: !0,
67
+ isDisabled: !0,
68
+ class: "bg-primary-100 text-primary-300"
69
+ },
70
+ {
71
+ intent: "minimal",
72
+ isActive: !0,
73
+ isDisabled: !1,
74
+ class: "text-primary-500"
75
+ },
76
+ {
77
+ intent: "minimal",
78
+ isActive: !0,
79
+ isDisabled: !0,
80
+ class: "text-neutral-700"
81
+ }
82
+ ], s = [
83
+ {
84
+ intent: "primary",
85
+ isDisabled: !0,
86
+ isActive: !1,
87
+ class: "text-neutral-600"
88
+ },
89
+ {
90
+ intent: "primary",
91
+ isDisabled: !0,
92
+ isActive: !0,
93
+ class: "bg-primary-300 text-primary-100"
94
+ },
95
+ {
96
+ intent: "secondary",
97
+ isDisabled: !0,
98
+ isActive: !1,
99
+ class: "bg-neutral-400 text-neutral-600"
100
+ },
101
+ {
102
+ intent: "secondary",
103
+ isDisabled: !0,
104
+ isActive: !0,
105
+ class: "bg-primary-100 text-primary-300"
106
+ },
107
+ {
108
+ intent: "minimal",
109
+ isDisabled: !0,
110
+ isActive: !1,
111
+ class: "text-neutral-600"
112
+ },
113
+ {
114
+ intent: "minimal",
115
+ isDisabled: !0,
116
+ isActive: !0,
117
+ class: "text-neutral-700"
118
+ }
119
+ ], a = e(
120
+ "inline-flex items-center justify-center border border-transparent transition duration-150 ease-in-out",
121
+ {
122
+ variants: {
123
+ intent: {
124
+ primary: "bg-transparent text-primary-500",
125
+ secondary: "bg-primary-200 text-primary-500",
126
+ minimal: "bg-transparent text-neutral-700"
127
+ },
128
+ size: {
129
+ xxs: "p-1",
130
+ xs: "p-2",
131
+ sm: "p-2.5",
132
+ md: "p-3",
133
+ lg: "p-4"
134
+ },
135
+ isDisabled: {
136
+ true: "pointer-events-none cursor-not-allowed"
137
+ },
138
+ isHovered: {
139
+ true: ""
140
+ },
141
+ isActive: {
142
+ true: ""
143
+ },
144
+ isFocused: {
145
+ false: "",
146
+ true: "focus:outline-none focus:ring-offset-2 outline-none ring-2 ring-sky-400"
147
+ }
148
+ },
149
+ compoundVariants: [...i, ...t, ...s]
150
+ }
151
+ );
2
152
  export {
3
- e as __exports
153
+ a as buttonVariants
4
154
  };
@@ -1,23 +1,4 @@
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
+ var r = {};
21
2
  export {
22
- s as M
3
+ r as __exports
23
4
  };
package/dist/index.es3.js CHANGED
@@ -1,12 +1,13 @@
1
- import { j as s } from "./index.es10.js";
1
+ import { j as s } from "./index.es11.js";
2
2
  import { Button as I } from "react-aria-components";
3
- import { cn as x } from "./index.es11.js";
3
+ import { cn as x } from "./index.es12.js";
4
4
  import "react";
5
5
  import { buttonVariants as B } from "./index.es28.js";
6
6
  import "./index.es14.js";
7
- import { Loader as y } from "./index.es5.js";
7
+ import "./index.es5.js";
8
+ import { Loader as y } from "./index.es6.js";
8
9
  import "./index.es18.js";
9
- import "./index.es15.js";
10
+ import "./index.es22.js";
10
11
  const j = ({
11
12
  renderPosition: t,
12
13
  leftIcon: m,
@@ -17,7 +18,7 @@ const j = ({
17
18
  }) => {
18
19
  const o = t === "left" ? m : t === "right" ? f : null;
19
20
  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) => {
21
+ }, V = (t) => {
21
22
  const {
22
23
  intent: m = "primary",
23
24
  size: f = "md",
@@ -88,5 +89,5 @@ const j = ({
88
89
  );
89
90
  };
90
91
  export {
91
- M as Button
92
+ V as Button
92
93
  };
@@ -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 e = {};
21
2
  export {
22
- d as P
3
+ e as __exports
23
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
+ };
@@ -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,6 +1,6 @@
1
- import { j as e } from "./index.es10.js";
1
+ import { j as e } from "./index.es11.js";
2
2
  import { Checkbox as h } from "react-aria-components";
3
- import { cn as m } from "./index.es11.js";
3
+ import { cn as m } from "./index.es12.js";
4
4
  import { MarkIcon as i } from "./index.es13.js";
5
5
  import { checkboxVariants as j } from "./index.es14.js";
6
6
  const g = ({
package/dist/index.es5.js CHANGED
@@ -1,52 +1,37 @@
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";
1
+ import { j as t } from "./index.es11.js";
2
+ import { forwardRef as j } from "react";
3
+ import { useContextProps as w, ButtonContext as C, Button as N } from "react-aria-components";
4
+ import { cn as g } from "./index.es12.js";
5
+ import { buttonVariants as v } from "./index.es27.js";
6
+ function B(r, i) {
7
+ const [a, c] = w(r, i, C), {
8
+ intent: m = "secondary",
9
+ size: f = "lg",
10
+ isDisabled: o = !1,
11
+ isActive: l = !1,
12
+ children: e,
13
+ className: p,
14
+ ...d
15
+ } = a, n = "flex h-full items-center overflow-hidden whitespace-nowrap";
16
+ return /* @__PURE__ */ t.jsx(
17
+ N,
18
+ {
19
+ ref: c,
20
+ className: ({ isPressed: s, isHovered: u, isFocusVisible: x, isFocused: h }) => g(
21
+ v({
22
+ intent: m,
23
+ size: f,
24
+ isDisabled: o,
25
+ isActive: l || s,
26
+ isHovered: u,
27
+ isFocused: x || h
28
+ }),
29
+ p
30
+ ),
31
+ isDisabled: o,
32
+ ...d,
33
+ children: typeof e == "function" ? (s) => /* @__PURE__ */ t.jsx("span", { className: n + "p-2.", children: e(s) }) : /* @__PURE__ */ t.jsx("span", { className: n, children: e })
17
34
  }
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
- ] });
49
- };
50
- export {
51
- d as Loader
52
- };
35
+ );
36
+ }
37
+ j(B);
package/dist/index.es6.js CHANGED
@@ -1,82 +1,52 @@
1
- import { j as o } from "./index.es10.js";
2
- import { Switch as y } from "react-aria-components";
3
- import { cn as i } from "./index.es11.js";
4
- import { ContentSwitch as L } from "./index.es16.js";
5
- import { SwitchIndicator as d } from "./index.es17.js";
6
- import { switchVariants as u } from "./index.es18.js";
7
- const C = ({
8
- children: f,
9
- label: m,
10
- description: n,
11
- errorMessage: s,
12
- validationState: p,
13
- size: a = "md",
14
- isDisabled: r = !1,
15
- isSelected: t = !1,
16
- onChange: e,
17
- "aria-label": h,
18
- "aria-describedby": x
19
- }) => {
20
- const j = p === "invalid" && !r, w = a === "sm" ? { offLeft: 3, onLeft: 19 } : { offLeft: 4, onLeft: 28 };
21
- return /* @__PURE__ */ o.jsxs(
22
- "label",
23
- {
24
- className: i(
25
- "group flex flex-row gap-2",
26
- r ? "opacity-40" : "opacity-100",
27
- (m || f) && n ? "items-start" : "items-center"
28
- ),
29
- children: [
30
- /* @__PURE__ */ o.jsx(
31
- y,
32
- {
33
- isDisabled: r,
34
- isSelected: t,
35
- "aria-checked": t,
36
- "aria-label": h,
37
- "aria-describedby": x,
38
- onChange: e,
39
- children: ({ isFocusVisible: l, isHovered: c }) => /* @__PURE__ */ o.jsx(
40
- "div",
41
- {
42
- className: i(
43
- u({
44
- isSelected: t,
45
- isDisabled: r,
46
- isFocusVisible: l,
47
- size: a,
48
- isHoveredWhenOff: c && !t
49
- })
50
- ),
51
- children: /* @__PURE__ */ o.jsx(
52
- d,
53
- {
54
- isSelected: t,
55
- isDisabled: r,
56
- isHovered: c,
57
- size: a,
58
- dimensions: w
59
- }
60
- )
61
- }
62
- )
63
- }
64
- ),
65
- /* @__PURE__ */ o.jsx(
66
- L,
67
- {
68
- label: m,
69
- description: n,
70
- errorMessage: s,
71
- isDisabled: r,
72
- isInvalid: j,
73
- children: f
74
- }
75
- )
76
- ]
1
+ import { j as e } from "./index.es11.js";
2
+ import { useVisuallyHidden as a } from "react-aria";
3
+ import { cn as l } from "./index.es12.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";
77
17
  }
78
- );
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
+ ] });
79
49
  };
80
50
  export {
81
- C as Switch
51
+ d as Loader
82
52
  };
package/dist/index.es7.js CHANGED
@@ -1,10 +1,82 @@
1
- import { j as m } from "./index.es10.js";
2
- import { cn as n } from "./index.es11.js";
3
- import { textVariants as a } from "./index.es15.js";
4
- function x(t) {
5
- const { children: s, type: o = "body", className: r } = t, e = n(a({ type: o }), r);
6
- return /* @__PURE__ */ m.jsx("p", { className: e, children: s });
7
- }
1
+ import { j as o } from "./index.es11.js";
2
+ import { Switch as y } from "react-aria-components";
3
+ import { cn as i } from "./index.es12.js";
4
+ import { ContentSwitch as L } from "./index.es16.js";
5
+ import { SwitchIndicator as d } from "./index.es17.js";
6
+ import { switchVariants as u } from "./index.es18.js";
7
+ const C = ({
8
+ children: f,
9
+ label: m,
10
+ description: n,
11
+ errorMessage: s,
12
+ validationState: p,
13
+ size: a = "md",
14
+ isDisabled: r = !1,
15
+ isSelected: t = !1,
16
+ onChange: e,
17
+ "aria-label": h,
18
+ "aria-describedby": x
19
+ }) => {
20
+ const j = p === "invalid" && !r, w = a === "sm" ? { offLeft: 3, onLeft: 19 } : { offLeft: 4, onLeft: 28 };
21
+ return /* @__PURE__ */ o.jsxs(
22
+ "label",
23
+ {
24
+ className: i(
25
+ "group flex flex-row gap-2",
26
+ r ? "opacity-40" : "opacity-100",
27
+ (m || f) && n ? "items-start" : "items-center"
28
+ ),
29
+ children: [
30
+ /* @__PURE__ */ o.jsx(
31
+ y,
32
+ {
33
+ isDisabled: r,
34
+ isSelected: t,
35
+ "aria-checked": t,
36
+ "aria-label": h,
37
+ "aria-describedby": x,
38
+ onChange: e,
39
+ children: ({ isFocusVisible: l, isHovered: c }) => /* @__PURE__ */ o.jsx(
40
+ "div",
41
+ {
42
+ className: i(
43
+ u({
44
+ isSelected: t,
45
+ isDisabled: r,
46
+ isFocusVisible: l,
47
+ size: a,
48
+ isHoveredWhenOff: c && !t
49
+ })
50
+ ),
51
+ children: /* @__PURE__ */ o.jsx(
52
+ d,
53
+ {
54
+ isSelected: t,
55
+ isDisabled: r,
56
+ isHovered: c,
57
+ size: a,
58
+ dimensions: w
59
+ }
60
+ )
61
+ }
62
+ )
63
+ }
64
+ ),
65
+ /* @__PURE__ */ o.jsx(
66
+ L,
67
+ {
68
+ label: m,
69
+ description: n,
70
+ errorMessage: s,
71
+ isDisabled: r,
72
+ isInvalid: j,
73
+ children: f
74
+ }
75
+ )
76
+ ]
77
+ }
78
+ );
79
+ };
8
80
  export {
9
- x as Text
81
+ C as Switch
10
82
  };
package/dist/index.es8.js CHANGED
@@ -1,10 +1,10 @@
1
- import { j as m } from "./index.es10.js";
2
- import { cn as c } from "./index.es11.js";
3
- import { titleVariants as l } from "./index.es15.js";
4
- function j(s) {
5
- const { children: e, type: t = "h1", size: r = t, className: i, ...o } = s, n = t, a = c(l({ size: r }), i);
6
- return /* @__PURE__ */ m.jsx(n, { className: a, ...o, children: e });
1
+ import { j as m } from "./index.es11.js";
2
+ import { cn as n } from "./index.es12.js";
3
+ import { textVariants as a } from "./index.es22.js";
4
+ function x(t) {
5
+ const { children: s, type: o = "body", className: r } = t, e = n(a({ type: o }), r);
6
+ return /* @__PURE__ */ m.jsx("p", { className: e, children: s });
7
7
  }
8
8
  export {
9
- j as Title
9
+ x as Text
10
10
  };
package/dist/index.es9.js CHANGED
@@ -1,35 +1,10 @@
1
- import { j as s } from "./index.es10.js";
2
- import { useRef as x } from "react";
3
- import { useTabList as b } from "react-aria";
4
- import { useTabListState as d, Item as N } from "react-stately";
5
- import { cn as e } from "./index.es11.js";
6
- import { Tab as j } from "./index.es19.js";
7
- import { TabPanel as u } from "./index.es20.js";
8
- import { tabsVariants as h } from "./index.es21.js";
9
- const T = (a) => {
10
- var m;
11
- const { rootClassName: i, tabClassName: n, tabPanelClassName: c, orientation: o = "horizontal", id: f = void 0 } = a, t = d(a), r = x(null), { tabListProps: p } = b(a, t, r);
12
- return /* @__PURE__ */ s.jsxs("div", { className: e(h({ orientation: o }), i), children: [
13
- /* @__PURE__ */ s.jsx(
14
- "div",
15
- {
16
- ...p,
17
- ref: r,
18
- className: e("flex", o === "horizontal" ? "flex-row flex-wrap" : "flex-col"),
19
- children: [...t.collection].map((l) => /* @__PURE__ */ s.jsx(j, { item: l, state: t, orientation: o, className: n, id: f }, l.key))
20
- }
21
- ),
22
- /* @__PURE__ */ s.jsx(
23
- u,
24
- {
25
- state: t,
26
- className: e("p-2", o === "horizontal" ? "pl-2" : "pt-2", c)
27
- },
28
- (m = t.selectedItem) == null ? void 0 : m.key
29
- )
30
- ] });
31
- };
32
- T.Item = N;
1
+ import { j as m } from "./index.es11.js";
2
+ import { cn as c } from "./index.es12.js";
3
+ import { titleVariants as l } from "./index.es22.js";
4
+ function j(s) {
5
+ const { children: e, type: t = "h1", size: r = t, className: i, ...o } = s, n = t, a = c(l({ size: r }), i);
6
+ return /* @__PURE__ */ m.jsx(n, { className: a, ...o, children: e });
7
+ }
33
8
  export {
34
- T as Tabs
9
+ j as Title
35
10
  };