@simpli-route/apollo-ds 0.0.19 → 0.0.21

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.
@@ -1,45 +1,94 @@
1
- import { cva as r } from "class-variance-authority";
2
- const i = r(
3
- "flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded border-2 border-primary-200 text-white transition duration-150 ease-in-out",
1
+ import { cva as e } from "class-variance-authority";
2
+ const s = e("relative rounded-full transition-colors duration-300", {
3
+ variants: {
4
+ isSelected: {
5
+ true: "bg-primary-500",
6
+ false: "bg-neutral-50 border border-primary-200"
7
+ },
8
+ isDisabled: {
9
+ true: "cursor-not-allowed bg-neutral-400 border-none",
10
+ false: "cursor-pointer"
11
+ },
12
+ isHoveredWhenOff: {
13
+ true: "bg-neutral-200 border-primary-700",
14
+ false: ""
15
+ },
16
+ isFocusVisible: {
17
+ true: "ring-2 ring-sky-400 ring-offset-2",
18
+ false: ""
19
+ },
20
+ size: {
21
+ sm: "w-[42px] h-[24px]",
22
+ md: "w-[56px] h-[32px]"
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ size: "md",
27
+ isSelected: !1,
28
+ isDisabled: !1,
29
+ isFocusVisible: !1,
30
+ isHoveredWhenOff: !1
31
+ },
32
+ compoundVariants: [
33
+ // Hover cuando el switch está apagado y no deshabilitado
34
+ {
35
+ isSelected: !1,
36
+ isDisabled: !1,
37
+ class: "hover:bg-neutral-200 hover:border-primary-700"
38
+ },
39
+ {
40
+ isSelected: !0,
41
+ isDisabled: !1,
42
+ class: "hover:bg-primary-700"
43
+ },
44
+ {
45
+ isSelected: !1,
46
+ isDisabled: !0,
47
+ class: "bg-neutral-400 border-none"
48
+ },
49
+ {
50
+ isSelected: !0,
51
+ isDisabled: !0,
52
+ class: "bg-neutral-500"
53
+ }
54
+ ]
55
+ }), a = e(
56
+ "absolute top-1/2 transform -translate-y-1/2 transition-all duration-300 rounded-full",
4
57
  {
5
58
  variants: {
6
- isHovered: {
7
- true: ""
8
- },
9
59
  isSelected: {
10
- true: "border-primary-500 bg-primary-500",
11
- false: "bg-white"
12
- },
13
- isFocusVisible: {
14
- true: "border-primary-500 group-active:border-primary-500"
60
+ true: "bg-primary-50",
61
+ false: "bg-primary-200 border border-primary-200"
15
62
  },
16
63
  isDisabled: {
17
- true: "border-neutral-500"
64
+ true: "bg-neutral-600 border-none",
65
+ false: ""
66
+ },
67
+ isHoveredWhenOff: {
68
+ true: "bg-primary-700 border-primary-700",
69
+ false: ""
18
70
  },
19
- label: {
20
- true: "mr-2"
71
+ size: {
72
+ sm: "w-[20px] h-[20px]",
73
+ md: "w-[24px] h-[24px]"
21
74
  }
22
75
  },
76
+ defaultVariants: {
77
+ size: "md",
78
+ isSelected: !1,
79
+ isDisabled: !1,
80
+ isHoveredWhenOff: !1
81
+ },
23
82
  compoundVariants: [
24
83
  {
25
- isHovered: !0,
26
84
  isSelected: !0,
27
- class: "border-none bg-primary-600 group-active:bg-primary-600"
28
- },
29
- {
30
- isHovered: !0,
31
- isSelected: !1,
32
- isDisabled: !1,
33
- class: "border-primary-700 group-active:bg-primary-600"
34
- },
35
- {
36
85
  isDisabled: !0,
37
- isSelected: !0,
38
- class: "bg-neutral-500"
86
+ class: "bg-neutral-400"
39
87
  }
40
88
  ]
41
89
  }
42
90
  );
43
91
  export {
44
- i as checkboxVariants
92
+ a as indicatorVariants,
93
+ s as switchVariants
45
94
  };
@@ -1,94 +1,24 @@
1
- import { cva as e } from "class-variance-authority";
2
- const s = e("relative rounded-full transition-colors duration-300", {
1
+ import { cva as t } from "class-variance-authority";
2
+ const o = t("scroll-m-12 text-neutral-900", {
3
3
  variants: {
4
- isSelected: {
5
- true: "bg-primary-500",
6
- false: "bg-neutral-50 border border-primary-200"
7
- },
8
- isDisabled: {
9
- true: "cursor-not-allowed bg-neutral-400 border-none",
10
- false: "cursor-pointer"
11
- },
12
- isHoveredWhenOff: {
13
- true: "bg-neutral-200 border-primary-700",
14
- false: ""
15
- },
16
- isFocusVisible: {
17
- true: "ring-2 ring-sky-400 ring-offset-2",
18
- false: ""
19
- },
20
4
  size: {
21
- sm: "w-[42px] h-[24px]",
22
- md: "w-[56px] h-[32px]"
5
+ h1: "text-[2rem] font-bold leading-10",
6
+ h2: "text-[1.75rem] font-bold leading-9",
7
+ h3: "text-2xl font-semibold",
8
+ h4: "text-[1.375rem] font-semibold leading-7",
9
+ h5: "text-xl font-semibold",
10
+ h6: "text-lg font-semibold"
23
11
  }
24
- },
25
- defaultVariants: {
26
- size: "md",
27
- isSelected: !1,
28
- isDisabled: !1,
29
- isFocusVisible: !1,
30
- isHoveredWhenOff: !1
31
- },
32
- compoundVariants: [
33
- // Hover cuando el switch está apagado y no deshabilitado
34
- {
35
- isSelected: !1,
36
- isDisabled: !1,
37
- class: "hover:bg-neutral-200 hover:border-primary-700"
38
- },
39
- {
40
- isSelected: !0,
41
- isDisabled: !1,
42
- class: "hover:bg-primary-700"
43
- },
44
- {
45
- isSelected: !1,
46
- isDisabled: !0,
47
- class: "bg-neutral-400 border-none"
48
- },
49
- {
50
- isSelected: !0,
51
- isDisabled: !0,
52
- class: "bg-neutral-500"
12
+ }
13
+ }), n = t("", {
14
+ variants: {
15
+ type: {
16
+ body: "text-base text-neutral-900",
17
+ caption: "text-xs text-neutral-700"
53
18
  }
54
- ]
55
- }), a = e(
56
- "absolute top-1/2 transform -translate-y-1/2 transition-all duration-300 rounded-full",
57
- {
58
- variants: {
59
- isSelected: {
60
- true: "bg-primary-50",
61
- false: "bg-primary-200 border border-primary-200"
62
- },
63
- isDisabled: {
64
- true: "bg-neutral-600 border-none",
65
- false: ""
66
- },
67
- isHoveredWhenOff: {
68
- true: "bg-primary-700 border-primary-700",
69
- false: ""
70
- },
71
- size: {
72
- sm: "w-[20px] h-[20px]",
73
- md: "w-[24px] h-[24px]"
74
- }
75
- },
76
- defaultVariants: {
77
- size: "md",
78
- isSelected: !1,
79
- isDisabled: !1,
80
- isHoveredWhenOff: !1
81
- },
82
- compoundVariants: [
83
- {
84
- isSelected: !0,
85
- isDisabled: !0,
86
- class: "bg-neutral-400"
87
- }
88
- ]
89
19
  }
90
- );
20
+ });
91
21
  export {
92
- a as indicatorVariants,
93
- s as switchVariants
22
+ n as textVariants,
23
+ o as titleVariants
94
24
  };
@@ -1,24 +1,24 @@
1
- import { cva as t } from "class-variance-authority";
2
- const o = t("scroll-m-12 text-neutral-900", {
3
- variants: {
4
- size: {
5
- h1: "text-[2rem] font-bold leading-10",
6
- h2: "text-[1.75rem] font-bold leading-9",
7
- h3: "text-2xl font-semibold",
8
- h4: "text-[1.375rem] font-semibold leading-7",
9
- h5: "text-xl font-semibold",
10
- h6: "text-lg font-semibold"
11
- }
12
- }
13
- }), n = t("", {
14
- variants: {
15
- type: {
16
- body: "text-base text-neutral-900",
17
- caption: "text-xs text-neutral-700"
18
- }
19
- }
20
- });
1
+ import { j as s } from "./index.es10.js";
2
+ import { MinusIcon as p, PlusIcon as u } from "./index.es24.js";
3
+ import { cn as e } from "./index.es11.js";
4
+ const f = ({
5
+ label: o,
6
+ section: n,
7
+ active: r,
8
+ onToggle: l,
9
+ itemClassName: t,
10
+ sectionClassName: c,
11
+ hasIcon: i = !0
12
+ }) => {
13
+ const a = e("rounded-md border border-solid border-purple-200 bg-gray-100", t), d = e("px-4 pb-4", c), m = r ? p : u;
14
+ return /* @__PURE__ */ s.jsxs("div", { className: a, children: [
15
+ /* @__PURE__ */ s.jsxs("button", { className: "flex w-full cursor-pointer items-center gap-x-4 p-4", onClick: l, children: [
16
+ /* @__PURE__ */ s.jsx("div", { className: "flex-1", children: o }),
17
+ i ? /* @__PURE__ */ s.jsx("span", { className: `shrink-0 transition duration-300 ${r ? "-rotate-180" : "rotate-0"}`, children: /* @__PURE__ */ s.jsx(m, { className: "size-6" }) }) : null
18
+ ] }),
19
+ r ? /* @__PURE__ */ s.jsx("div", { className: d, children: n }) : null
20
+ ] });
21
+ };
21
22
  export {
22
- n as textVariants,
23
- o as titleVariants
23
+ f as AccordionItem
24
24
  };
@@ -1,154 +1,32 @@
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
- );
1
+ import { j as e } from "./index.es10.js";
2
+ import { cn as l } from "./index.es11.js";
3
+ const m = (r) => {
4
+ const { isIndeterminate: t, isSelected: s, className: n, isHovered: a } = r, o = a && !s && !t ? "text-neutral-500" : "", i = !!(o || s);
5
+ return /* @__PURE__ */ e.jsx("svg", { className: l("stroke-current", o, n), viewBox: "-1 1 17 17", children: t ? /* @__PURE__ */ e.jsx(
6
+ "line",
7
+ {
8
+ x1: 1,
9
+ y1: 10,
10
+ x2: 14,
11
+ y2: 10,
12
+ fill: "none",
13
+ strokeWidth: 2,
14
+ strokeDasharray: 14,
15
+ strokeDashoffset: s ? 28 : 42,
16
+ style: { transition: "all 400ms" }
17
+ }
18
+ ) : /* @__PURE__ */ e.jsx(
19
+ "polyline",
20
+ {
21
+ points: "1 9 7 14 15 4",
22
+ fill: "none",
23
+ strokeWidth: 2,
24
+ strokeDasharray: 22,
25
+ strokeDashoffset: i ? 44 : 66,
26
+ style: { transition: "all 400ms" }
27
+ }
28
+ ) });
29
+ };
152
30
  export {
153
- a as buttonVariants
31
+ m as MarkIcon
154
32
  };
@@ -1,32 +1,133 @@
1
- import { j as e } from "./index.es10.js";
2
- import { cn as l } from "./index.es11.js";
3
- const m = (r) => {
4
- const { isIndeterminate: t, isSelected: s, className: n, isHovered: a } = r, o = a && !s && !t ? "text-neutral-500" : "", i = !!(o || s);
5
- return /* @__PURE__ */ e.jsx("svg", { className: l("stroke-current", o, n), viewBox: "-1 1 17 17", children: t ? /* @__PURE__ */ e.jsx(
6
- "line",
7
- {
8
- x1: 1,
9
- y1: 10,
10
- x2: 14,
11
- y2: 10,
12
- fill: "none",
13
- strokeWidth: 2,
14
- strokeDasharray: 14,
15
- strokeDashoffset: s ? 28 : 42,
16
- style: { transition: "all 400ms" }
17
- }
18
- ) : /* @__PURE__ */ e.jsx(
19
- "polyline",
20
- {
21
- points: "1 9 7 14 15 4",
22
- fill: "none",
23
- strokeWidth: 2,
24
- strokeDasharray: 22,
25
- strokeDashoffset: i ? 44 : 66,
26
- style: { transition: "all 400ms" }
27
- }
28
- ) });
29
- };
1
+ import { cva as e } from "class-variance-authority";
2
+ const t = [
3
+ {
4
+ intent: "primary",
5
+ isHovered: !0,
6
+ isDisabled: !1,
7
+ isActive: !1,
8
+ class: "bg-primary-100"
9
+ },
10
+ {
11
+ intent: "secondary",
12
+ isHovered: !0,
13
+ isDisabled: !1,
14
+ isActive: !1,
15
+ class: "bg-primary-500 text-primary-50"
16
+ },
17
+ {
18
+ intent: "minimal",
19
+ isHovered: !0,
20
+ isDisabled: !1,
21
+ isActive: !1,
22
+ class: "bg-neutral-200 text-neutral-800"
23
+ }
24
+ ], i = [
25
+ {
26
+ intent: "primary",
27
+ isActive: !0,
28
+ isDisabled: !1,
29
+ class: "bg-primary-500 text-primary-50"
30
+ },
31
+ {
32
+ intent: "primary",
33
+ isActive: !0,
34
+ isDisabled: !0,
35
+ class: "bg-primary-300 text-primary-100"
36
+ },
37
+ {
38
+ intent: "secondary",
39
+ isActive: !0,
40
+ isDisabled: !1,
41
+ class: "bg-primary-500 text-primary-50"
42
+ },
43
+ {
44
+ intent: "secondary",
45
+ isActive: !0,
46
+ isDisabled: !0,
47
+ class: "bg-primary-100 text-primary-300"
48
+ },
49
+ {
50
+ intent: "minimal",
51
+ isActive: !0,
52
+ isDisabled: !1,
53
+ class: "text-primary-500"
54
+ },
55
+ {
56
+ intent: "minimal",
57
+ isActive: !0,
58
+ isDisabled: !0,
59
+ class: "text-neutral-700"
60
+ }
61
+ ], s = [
62
+ {
63
+ intent: "primary",
64
+ isDisabled: !0,
65
+ isActive: !1,
66
+ class: "text-neutral-600"
67
+ },
68
+ {
69
+ intent: "primary",
70
+ isDisabled: !0,
71
+ isActive: !0,
72
+ class: "bg-primary-300 text-primary-100"
73
+ },
74
+ {
75
+ intent: "secondary",
76
+ isDisabled: !0,
77
+ isActive: !1,
78
+ class: "bg-neutral-400 text-neutral-600"
79
+ },
80
+ {
81
+ intent: "secondary",
82
+ isDisabled: !0,
83
+ isActive: !0,
84
+ class: "bg-primary-100 text-primary-300"
85
+ },
86
+ {
87
+ intent: "minimal",
88
+ isDisabled: !0,
89
+ isActive: !1,
90
+ class: "text-neutral-600"
91
+ },
92
+ {
93
+ intent: "minimal",
94
+ isDisabled: !0,
95
+ isActive: !0,
96
+ class: "text-neutral-700"
97
+ }
98
+ ], a = e(
99
+ "inline-flex items-center justify-center border border-transparent transition duration-150 ease-in-out",
100
+ {
101
+ variants: {
102
+ intent: {
103
+ primary: "bg-transparent text-primary-500",
104
+ secondary: "bg-primary-200 text-primary-500",
105
+ minimal: "bg-transparent text-neutral-700"
106
+ },
107
+ size: {
108
+ xxs: "p-1",
109
+ xs: "p-2",
110
+ sm: "p-2.5",
111
+ md: "p-3",
112
+ lg: "p-4"
113
+ },
114
+ isDisabled: {
115
+ true: "pointer-events-none cursor-not-allowed"
116
+ },
117
+ isHovered: {
118
+ true: ""
119
+ },
120
+ isActive: {
121
+ true: ""
122
+ },
123
+ isFocused: {
124
+ false: "",
125
+ true: "focus:outline-none focus:ring-offset-2 outline-none ring-2 ring-sky-400"
126
+ }
127
+ },
128
+ compoundVariants: [...t, ...i, ...s]
129
+ }
130
+ );
30
131
  export {
31
- m as MarkIcon
132
+ a as buttonVariants
32
133
  };
package/dist/index.es2.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { j as e } from "./index.es10.js";
2
2
  import { useState as u } from "react";
3
3
  import { cn as d } from "./index.es11.js";
4
- import { AccordionItem as f } from "./index.es12.js";
4
+ import { AccordionItem as f } from "./index.es16.js";
5
5
  const A = ({ items: s, accordionClassName: c, itemClassName: l, sectionClassName: m, hasIcon: a }) => {
6
6
  const [t, i] = u(null), p = d("flex flex-col gap-y-4", c), x = (o) => {
7
7
  i(o === t ? null : o);
@@ -1,6 +1,6 @@
1
1
  import { j as i } from "./index.es10.js";
2
2
  import { cn as m } from "./index.es11.js";
3
- import { indicatorVariants as n } from "./index.es15.js";
3
+ import { indicatorVariants as n } from "./index.es14.js";
4
4
  const c = ({ isSelected: r, isDisabled: o, isHovered: f, size: a, dimensions: t }) => /* @__PURE__ */ i.jsx(
5
5
  "div",
6
6
  {
package/dist/index.es3.js CHANGED
@@ -2,12 +2,12 @@ import { j as s } from "./index.es10.js";
2
2
  import { Button as I } from "react-aria-components";
3
3
  import { cn as x } from "./index.es11.js";
4
4
  import "react";
5
- import { buttonVariants as B } from "./index.es13.js";
6
- import "./index.es14.js";
5
+ import { buttonVariants as B } from "./index.es12.js";
6
+ import "./index.es13.js";
7
7
  import "./index.es5.js";
8
8
  import { Loader as y } from "./index.es6.js";
9
+ import "./index.es14.js";
9
10
  import "./index.es15.js";
10
- import "./index.es16.js";
11
11
  const j = ({
12
12
  renderPosition: t,
13
13
  leftIcon: m,
package/dist/index.es4.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { j as e } from "./index.es10.js";
2
2
  import { Checkbox as h } from "react-aria-components";
3
3
  import { cn as m } from "./index.es11.js";
4
- import { MarkIcon as i } from "./index.es18.js";
5
- import { checkboxVariants as j } from "./index.es14.js";
4
+ import { MarkIcon as i } from "./index.es17.js";
5
+ import { checkboxVariants as j } from "./index.es13.js";
6
6
  const g = ({
7
7
  isIndeterminate: x = !1,
8
8
  isDisabled: a = !1,
package/dist/index.es5.js CHANGED
@@ -2,7 +2,7 @@ import { j as s } from "./index.es10.js";
2
2
  import { forwardRef as j } from "react";
3
3
  import { useContextProps as B, ButtonContext as w, Button as C } from "react-aria-components";
4
4
  import { cn as N } from "./index.es11.js";
5
- import { buttonVariants as g } from "./index.es17.js";
5
+ import { buttonVariants as g } from "./index.es18.js";
6
6
  function v(r, i) {
7
7
  const [c, a] = B(r, i, w), {
8
8
  intent: m = "secondary",