@simpli-route/apollo-ds 0.0.21 → 0.0.22
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/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/types.d.ts +6 -0
- package/dist/index.cjs12.js +1 -1
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs18.js +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs20.js +1 -1
- package/dist/index.cjs3.js +1 -1
- package/dist/index.cjs4.js +1 -1
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs7.js +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.es12.js +22 -173
- package/dist/index.es13.js +150 -20
- package/dist/index.es14.js +27 -76
- package/dist/index.es15.js +87 -17
- package/dist/index.es16.js +22 -22
- package/dist/index.es18.js +19 -131
- package/dist/index.es19.js +20 -19
- package/dist/index.es2.js +25 -16
- package/dist/index.es20.js +129 -18
- package/dist/index.es3.js +3 -3
- package/dist/index.es4.js +1 -1
- package/dist/index.es5.js +12 -12
- package/dist/index.es7.js +3 -3
- package/dist/index.es8.js +1 -1
- package/dist/index.es9.js +1 -1
- package/dist/stories/Accordion.stories.d.ts +3 -2
- package/dist/style.css +3 -0
- package/package.json +1 -1
package/dist/index.es14.js
CHANGED
|
@@ -1,94 +1,45 @@
|
|
|
1
|
-
import { cva as
|
|
2
|
-
const
|
|
3
|
-
|
|
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",
|
|
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",
|
|
57
4
|
{
|
|
58
5
|
variants: {
|
|
6
|
+
isHovered: {
|
|
7
|
+
true: ""
|
|
8
|
+
},
|
|
59
9
|
isSelected: {
|
|
60
|
-
true: "bg-primary-
|
|
61
|
-
false: "bg-
|
|
10
|
+
true: "border-primary-500 bg-primary-500",
|
|
11
|
+
false: "bg-white"
|
|
62
12
|
},
|
|
63
|
-
|
|
64
|
-
true: "
|
|
65
|
-
false: ""
|
|
13
|
+
isFocusVisible: {
|
|
14
|
+
true: "border-primary-500 group-active:border-primary-500"
|
|
66
15
|
},
|
|
67
|
-
|
|
68
|
-
true: "
|
|
69
|
-
false: ""
|
|
16
|
+
isDisabled: {
|
|
17
|
+
true: "border-neutral-500 cursor-not-allowed"
|
|
70
18
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
md: "w-[24px] h-[24px]"
|
|
19
|
+
label: {
|
|
20
|
+
true: "mr-2"
|
|
74
21
|
}
|
|
75
22
|
},
|
|
76
|
-
defaultVariants: {
|
|
77
|
-
size: "md",
|
|
78
|
-
isSelected: !1,
|
|
79
|
-
isDisabled: !1,
|
|
80
|
-
isHoveredWhenOff: !1
|
|
81
|
-
},
|
|
82
23
|
compoundVariants: [
|
|
83
24
|
{
|
|
25
|
+
isHovered: !0,
|
|
84
26
|
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
|
+
{
|
|
85
36
|
isDisabled: !0,
|
|
86
|
-
|
|
37
|
+
isSelected: !0,
|
|
38
|
+
class: "bg-neutral-500"
|
|
87
39
|
}
|
|
88
40
|
]
|
|
89
41
|
}
|
|
90
42
|
);
|
|
91
43
|
export {
|
|
92
|
-
|
|
93
|
-
s as switchVariants
|
|
44
|
+
i as checkboxVariants
|
|
94
45
|
};
|
package/dist/index.es15.js
CHANGED
|
@@ -1,24 +1,94 @@
|
|
|
1
|
-
import { cva as
|
|
2
|
-
const
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
const s = e("relative rounded-full transition-colors duration-300", {
|
|
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
|
+
},
|
|
4
20
|
size: {
|
|
5
|
-
|
|
6
|
-
|
|
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"
|
|
21
|
+
sm: "w-[42px] h-[24px]",
|
|
22
|
+
md: "w-[56px] h-[32px]"
|
|
11
23
|
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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"
|
|
18
53
|
}
|
|
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
|
+
]
|
|
19
89
|
}
|
|
20
|
-
|
|
90
|
+
);
|
|
21
91
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
92
|
+
a as indicatorVariants,
|
|
93
|
+
s as switchVariants
|
|
24
94
|
};
|
package/dist/index.es16.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
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
|
+
});
|
|
22
21
|
export {
|
|
23
|
-
|
|
22
|
+
n as textVariants,
|
|
23
|
+
o as titleVariants
|
|
24
24
|
};
|
package/dist/index.es18.js
CHANGED
|
@@ -1,133 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
|
|
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
|
-
);
|
|
1
|
+
import { j as t } from "./index.es10.js";
|
|
2
|
+
import { cn as c } from "./index.es11.js";
|
|
3
|
+
const i = ({
|
|
4
|
+
label: e,
|
|
5
|
+
description: x,
|
|
6
|
+
errorMessage: s,
|
|
7
|
+
isDisabled: l,
|
|
8
|
+
isInvalid: r,
|
|
9
|
+
children: n,
|
|
10
|
+
renderLabelIcon: m
|
|
11
|
+
}) => !e && !x && !n ? null : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col", children: [
|
|
12
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-x-1", children: [
|
|
13
|
+
/* @__PURE__ */ t.jsx("p", { className: c("text-sm font-semibold", l ? "text-neutral-600" : "text-neutral-900"), children: e }),
|
|
14
|
+
m ? /* @__PURE__ */ t.jsx(t.Fragment, { children: m }) : null
|
|
15
|
+
] }) : n,
|
|
16
|
+
x && !s && /* @__PURE__ */ t.jsx("p", { className: c("text-xs", l ? "text-neutral-600" : "text-neutral-800"), children: x }),
|
|
17
|
+
r && s && /* @__PURE__ */ t.jsx("p", { className: "text-sm text-red-500", children: s })
|
|
18
|
+
] });
|
|
131
19
|
export {
|
|
132
|
-
|
|
20
|
+
i as ContentSwitch
|
|
133
21
|
};
|
package/dist/index.es19.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { cn as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { j as i } from "./index.es10.js";
|
|
2
|
+
import { cn as m } from "./index.es11.js";
|
|
3
|
+
import { indicatorVariants as n } from "./index.es15.js";
|
|
4
|
+
const c = ({ isSelected: r, isDisabled: o, isHovered: f, size: a, dimensions: t }) => /* @__PURE__ */ i.jsx(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
className: m(
|
|
8
|
+
n({
|
|
9
|
+
isSelected: r,
|
|
10
|
+
isDisabled: o,
|
|
11
|
+
size: a,
|
|
12
|
+
isHoveredWhenOff: f && !r
|
|
13
|
+
})
|
|
14
|
+
),
|
|
15
|
+
style: {
|
|
16
|
+
left: r ? `${t.onLeft}px` : `${t.offLeft}px`
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
c as SwitchIndicator
|
|
21
22
|
};
|
package/dist/index.es2.js
CHANGED
|
@@ -1,25 +1,34 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { AccordionItem as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { j as m } from "./index.es10.js";
|
|
2
|
+
import { useState as g } from "react";
|
|
3
|
+
import { cn as j } from "./index.es11.js";
|
|
4
|
+
import { AccordionItem as h } from "./index.es12.js";
|
|
5
|
+
const C = ({
|
|
6
|
+
items: a,
|
|
7
|
+
accordionClassName: e,
|
|
8
|
+
itemClassName: l,
|
|
9
|
+
sectionClassName: c,
|
|
10
|
+
hasIcon: i,
|
|
11
|
+
allowMultipleOpen: n = !1
|
|
12
|
+
}) => {
|
|
13
|
+
const [f, r] = g([]), p = j("flex flex-col gap-y-4", e), u = (o) => {
|
|
14
|
+
r(
|
|
15
|
+
n ? (s) => s.includes(o) ? s.filter((t) => t !== o) : [...s, o] : (s) => s.includes(o) ? [] : [o]
|
|
16
|
+
);
|
|
8
17
|
};
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
|
|
18
|
+
return /* @__PURE__ */ m.jsx("div", { className: p, children: a.map(({ label: o, section: s }, t) => /* @__PURE__ */ m.jsx(
|
|
19
|
+
h,
|
|
11
20
|
{
|
|
12
|
-
hasIcon:
|
|
21
|
+
hasIcon: i,
|
|
13
22
|
label: o,
|
|
14
|
-
section:
|
|
15
|
-
active: t
|
|
23
|
+
section: s,
|
|
24
|
+
active: f.includes(t),
|
|
16
25
|
itemClassName: l,
|
|
17
|
-
sectionClassName:
|
|
18
|
-
onToggle: () =>
|
|
26
|
+
sectionClassName: c,
|
|
27
|
+
onToggle: () => u(t)
|
|
19
28
|
},
|
|
20
|
-
|
|
29
|
+
t
|
|
21
30
|
)) });
|
|
22
31
|
};
|
|
23
32
|
export {
|
|
24
|
-
|
|
33
|
+
C as Accordion
|
|
25
34
|
};
|
package/dist/index.es20.js
CHANGED
|
@@ -1,22 +1,133 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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 focus:outline-none",
|
|
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]
|
|
18
129
|
}
|
|
19
130
|
);
|
|
20
131
|
export {
|
|
21
|
-
|
|
132
|
+
a as buttonVariants
|
|
22
133
|
};
|