@simpli-route/apollo-ds 0.1.4 → 0.1.5

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 (125) hide show
  1. package/dist/components/Chips/AssistChip.d.ts +3 -0
  2. package/dist/components/Chips/Chips.test.d.ts +1 -0
  3. package/dist/components/Chips/index.d.ts +2 -0
  4. package/dist/components/Chips/types.d.ts +43 -0
  5. package/dist/components/Chips/variants.d.ts +9 -0
  6. package/dist/components/IconButton/types.d.ts +1 -1
  7. package/dist/components/IconButton/variants.d.ts +1 -1
  8. package/dist/components/LoadingOverlay/LoadingOverlay.d.ts +4 -0
  9. package/dist/components/LoadingOverlay/LoadingOverlay.test.d.ts +1 -0
  10. package/dist/components/LoadingOverlay/Overlay.d.ts +4 -0
  11. package/dist/components/LoadingOverlay/index.d.ts +2 -0
  12. package/dist/components/LoadingOverlay/types.d.ts +47 -0
  13. package/dist/components/LoadingOverlay/variants.d.ts +6 -0
  14. package/dist/components/index.d.ts +2 -0
  15. package/dist/index.cjs.js +1 -1
  16. package/dist/index.cjs10.js +1 -1
  17. package/dist/index.cjs11.js +1 -1
  18. package/dist/index.cjs12.js +1 -1
  19. package/dist/index.cjs13.js +1 -1
  20. package/dist/index.cjs14.js +1 -1
  21. package/dist/index.cjs15.js +1 -1
  22. package/dist/index.cjs16.js +1 -1
  23. package/dist/index.cjs17.js +1 -1
  24. package/dist/index.cjs18.js +1 -1
  25. package/dist/index.cjs19.js +1 -1
  26. package/dist/index.cjs2.js +1 -1
  27. package/dist/index.cjs20.js +1 -1
  28. package/dist/index.cjs21.js +1 -1
  29. package/dist/index.cjs22.js +1 -1
  30. package/dist/index.cjs23.js +1 -1
  31. package/dist/index.cjs24.js +1 -1
  32. package/dist/index.cjs25.js +1 -1
  33. package/dist/index.cjs26.js +1 -1
  34. package/dist/index.cjs27.js +1 -1
  35. package/dist/index.cjs28.js +1 -1
  36. package/dist/index.cjs29.js +1 -1
  37. package/dist/index.cjs3.js +1 -1
  38. package/dist/index.cjs30.js +1 -1
  39. package/dist/index.cjs31.js +1 -1
  40. package/dist/index.cjs32.js +1 -1
  41. package/dist/index.cjs33.js +1 -1
  42. package/dist/index.cjs34.js +1 -1
  43. package/dist/index.cjs35.js +1 -1
  44. package/dist/index.cjs36.js +1 -1
  45. package/dist/index.cjs37.js +1 -1
  46. package/dist/index.cjs38.js +1 -1
  47. package/dist/index.cjs39.js +1 -9
  48. package/dist/index.cjs4.js +1 -1
  49. package/dist/index.cjs40.js +1 -19
  50. package/dist/index.cjs41.js +1 -1
  51. package/dist/index.cjs42.js +1 -1
  52. package/dist/index.cjs43.js +9 -1
  53. package/dist/index.cjs44.js +19 -1
  54. package/dist/index.cjs45.js +1 -1
  55. package/dist/index.cjs46.js +1 -1
  56. package/dist/index.cjs47.js +1 -1
  57. package/dist/index.cjs48.js +1 -1
  58. package/dist/index.cjs49.js +1 -0
  59. package/dist/index.cjs5.js +1 -1
  60. package/dist/index.cjs50.js +1 -0
  61. package/dist/index.cjs51.js +1 -0
  62. package/dist/index.cjs52.js +1 -0
  63. package/dist/index.cjs53.js +1 -0
  64. package/dist/index.cjs6.js +1 -1
  65. package/dist/index.cjs7.js +1 -1
  66. package/dist/index.cjs8.js +1 -1
  67. package/dist/index.cjs9.js +1 -1
  68. package/dist/index.es.js +26 -22
  69. package/dist/index.es10.js +78 -66
  70. package/dist/index.es11.js +68 -30
  71. package/dist/index.es12.js +77 -23
  72. package/dist/index.es13.js +28 -23
  73. package/dist/index.es14.js +24 -8
  74. package/dist/index.es15.js +28 -8
  75. package/dist/index.es16.js +8 -6
  76. package/dist/index.es17.js +7 -5
  77. package/dist/index.es18.js +6 -22
  78. package/dist/index.es19.js +6 -173
  79. package/dist/index.es2.js +3 -3
  80. package/dist/index.es20.js +22 -43
  81. package/dist/index.es21.js +143 -29
  82. package/dist/index.es22.js +43 -3
  83. package/dist/index.es23.js +25 -83
  84. package/dist/index.es24.js +58 -21
  85. package/dist/index.es25.js +3 -30
  86. package/dist/index.es26.js +92 -11
  87. package/dist/index.es27.js +22 -10
  88. package/dist/index.es28.js +29 -11
  89. package/dist/index.es29.js +37 -5
  90. package/dist/index.es3.js +16 -14
  91. package/dist/index.es30.js +11 -19
  92. package/dist/index.es31.js +10 -20
  93. package/dist/index.es32.js +10 -96
  94. package/dist/index.es33.js +11 -12
  95. package/dist/index.es34.js +96 -10
  96. package/dist/index.es35.js +12 -9
  97. package/dist/index.es36.js +19 -31
  98. package/dist/index.es37.js +17 -42
  99. package/dist/index.es38.js +10 -2
  100. package/dist/index.es39.js +10 -30
  101. package/dist/index.es4.js +4 -4
  102. package/dist/index.es40.js +31 -599
  103. package/dist/index.es41.js +45 -19
  104. package/dist/index.es42.js +2 -19
  105. package/dist/index.es43.js +30 -21
  106. package/dist/index.es44.js +599 -21
  107. package/dist/index.es45.js +8 -8
  108. package/dist/index.es46.js +19 -56
  109. package/dist/index.es47.js +21 -2
  110. package/dist/index.es48.js +21 -2
  111. package/dist/index.es49.js +21 -0
  112. package/dist/index.es5.js +42 -38
  113. package/dist/index.es50.js +32 -0
  114. package/dist/index.es51.js +58 -0
  115. package/dist/index.es52.js +4 -0
  116. package/dist/index.es53.js +4 -0
  117. package/dist/index.es6.js +38 -31
  118. package/dist/index.es7.js +31 -49
  119. package/dist/index.es8.js +46 -86
  120. package/dist/index.es9.js +36 -69
  121. package/dist/stories/Chips.stories.d.ts +22 -0
  122. package/dist/stories/IconButton.stories.d.ts +1 -0
  123. package/dist/stories/LoadingOverlay.stories.d.ts +17 -0
  124. package/dist/style.css +174 -0
  125. package/package.json +2 -2
@@ -1,26 +1,80 @@
1
- import { j as s } from "./index.es16.js";
2
- import { forwardRef as u, useContext as T } from "react";
3
- import { useTooltip as h, mergeProps as j } from "react-aria";
4
- import { cn as e } from "./index.es17.js";
5
- import { TooltipContext as N } from "./index.es22.js";
6
- import { tooltipVariants as P } from "./index.es37.js";
7
- const C = u((p, i) => {
8
- const { placement: m = "bottom", size: l = "md", className: a, mode: o = "dark", supportText: t, children: n, ...r } = p, { state: c, ...x } = T(N), { tooltipProps: d } = h(r, c), f = e(P({ placement: m, size: l, mode: o, hasSupportText: !!t }), a);
9
- return /* @__PURE__ */ s.jsxs("span", { className: f, ...j(r, d, x), ref: i, children: [
10
- n,
11
- t ? /* @__PURE__ */ s.jsx(
12
- "div",
13
- {
14
- className: e(
15
- "!text-sm !font-normal !leading-[19.07px]",
16
- o === "dark" ? "!text-blue-50" : "!text-neutral-700"
1
+ import { j as o } from "./index.es18.js";
2
+ import { Switch as u } from "react-aria-components";
3
+ import { cn as c } from "./index.es19.js";
4
+ import { ContentSwitch as L } from "./index.es36.js";
5
+ import { SwitchIndicator as v } from "./index.es37.js";
6
+ import { switchVariants as b } from "./index.es26.js";
7
+ const E = ({
8
+ children: f,
9
+ label: m,
10
+ description: n,
11
+ errorMessage: s,
12
+ validationState: e,
13
+ size: a = "md",
14
+ isDisabled: r = !1,
15
+ isSelected: t = !1,
16
+ onChange: h,
17
+ renderLabelIcon: x = null,
18
+ "aria-label": p,
19
+ "aria-describedby": l
20
+ }) => {
21
+ const j = e === "invalid" && !r, w = a === "sm" ? { offLeft: 3, onLeft: 19 } : { offLeft: 4, onLeft: 28 };
22
+ return /* @__PURE__ */ o.jsxs(
23
+ "label",
24
+ {
25
+ className: c("group flex flex-row gap-2", (m || f) && n ? "items-start" : "items-center"),
26
+ children: [
27
+ /* @__PURE__ */ o.jsx(
28
+ u,
29
+ {
30
+ isDisabled: r,
31
+ isSelected: t,
32
+ "aria-checked": t,
33
+ "aria-label": p,
34
+ "aria-describedby": l,
35
+ onChange: h,
36
+ children: ({ isFocusVisible: d, isHovered: i }) => /* @__PURE__ */ o.jsx(
37
+ "div",
38
+ {
39
+ className: c(
40
+ b({
41
+ isSelected: t,
42
+ isDisabled: r,
43
+ isFocusVisible: d,
44
+ size: a,
45
+ isHoveredWhenOff: i && !t
46
+ })
47
+ ),
48
+ children: /* @__PURE__ */ o.jsx(
49
+ v,
50
+ {
51
+ isSelected: t,
52
+ isDisabled: r,
53
+ isHovered: i,
54
+ size: a,
55
+ dimensions: w
56
+ }
57
+ )
58
+ }
59
+ )
60
+ }
17
61
  ),
18
- children: t
19
- }
20
- ) : null
21
- ] });
22
- });
23
- C.displayName = "Tooltip";
62
+ /* @__PURE__ */ o.jsx(
63
+ L,
64
+ {
65
+ label: m,
66
+ description: n,
67
+ errorMessage: s,
68
+ isDisabled: r,
69
+ isInvalid: j,
70
+ renderLabelIcon: x,
71
+ children: f
72
+ }
73
+ )
74
+ ]
75
+ }
76
+ );
77
+ };
24
78
  export {
25
- C as Tooltip
79
+ E as Switch
26
80
  };
@@ -1,30 +1,35 @@
1
- import { j as i } from "./index.es16.js";
2
- import { useRef as a, Children as f, cloneElement as u } from "react";
3
- import { useTooltipTrigger as T } from "react-aria";
4
- import { useTooltipTriggerState as h } from "react-stately";
5
- import { cn as x } from "./index.es17.js";
6
- import { TooltipContext as d } from "./index.es22.js";
7
- const w = (e) => {
8
- const { children: r, isDisabled: s, trigger: l, className: n } = e, t = h(e), o = a(null), { triggerProps: g, tooltipProps: m } = T({ isDisabled: s, trigger: l }, t, o), [c, p] = f.toArray(r);
9
- if (!Array.isArray(r) || r.length > 2)
10
- throw new Error("TooltipTrigger must have exactly 2 children");
11
- return /* @__PURE__ */ i.jsxs("span", { className: x("relative inline-flex items-center", n), children: [
12
- u(c, {
13
- ...g,
14
- ref: o
15
- }),
16
- /* @__PURE__ */ i.jsx(
17
- d.Provider,
1
+ import { j as s } from "./index.es18.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.es19.js";
6
+ import { Tab as j } from "./index.es38.js";
7
+ import { TabPanel as u } from "./index.es39.js";
8
+ import { tabsVariants as h } from "./index.es40.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",
18
15
  {
19
- value: {
20
- state: t,
21
- ...m
22
- },
23
- children: t.isOpen ? p : null
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))
24
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
25
29
  )
26
30
  ] });
27
31
  };
32
+ T.Item = N;
28
33
  export {
29
- w as TooltipTrigger
34
+ T as Tabs
30
35
  };
@@ -1,10 +1,26 @@
1
- import { j as m } from "./index.es16.js";
2
- import { cn as n } from "./index.es17.js";
3
- import { textVariants as a } from "./index.es24.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 s } from "./index.es18.js";
2
+ import { forwardRef as u, useContext as T } from "react";
3
+ import { useTooltip as h, mergeProps as j } from "react-aria";
4
+ import { cn as e } from "./index.es19.js";
5
+ import { TooltipContext as N } from "./index.es25.js";
6
+ import { tooltipVariants as P } from "./index.es41.js";
7
+ const C = u((p, i) => {
8
+ const { placement: m = "bottom", size: l = "md", className: a, mode: o = "dark", supportText: t, children: n, ...r } = p, { state: c, ...x } = T(N), { tooltipProps: d } = h(r, c), f = e(P({ placement: m, size: l, mode: o, hasSupportText: !!t }), a);
9
+ return /* @__PURE__ */ s.jsxs("span", { className: f, ...j(r, d, x), ref: i, children: [
10
+ n,
11
+ t ? /* @__PURE__ */ s.jsx(
12
+ "div",
13
+ {
14
+ className: e(
15
+ "!text-sm !font-normal !leading-[19.07px]",
16
+ o === "dark" ? "!text-blue-50" : "!text-neutral-700"
17
+ ),
18
+ children: t
19
+ }
20
+ ) : null
21
+ ] });
22
+ });
23
+ C.displayName = "Tooltip";
8
24
  export {
9
- x as Text
25
+ C as Tooltip
10
26
  };
@@ -1,10 +1,30 @@
1
- import { j as m } from "./index.es16.js";
2
- import { cn as c } from "./index.es17.js";
3
- import { titleVariants as l } from "./index.es24.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
- }
1
+ import { j as i } from "./index.es18.js";
2
+ import { useRef as a, Children as f, cloneElement as u } from "react";
3
+ import { useTooltipTrigger as T } from "react-aria";
4
+ import { useTooltipTriggerState as h } from "react-stately";
5
+ import { cn as x } from "./index.es19.js";
6
+ import { TooltipContext as d } from "./index.es25.js";
7
+ const w = (e) => {
8
+ const { children: r, isDisabled: s, trigger: l, className: n } = e, t = h(e), o = a(null), { triggerProps: g, tooltipProps: m } = T({ isDisabled: s, trigger: l }, t, o), [c, p] = f.toArray(r);
9
+ if (!Array.isArray(r) || r.length > 2)
10
+ throw new Error("TooltipTrigger must have exactly 2 children");
11
+ return /* @__PURE__ */ i.jsxs("span", { className: x("relative inline-flex items-center", n), children: [
12
+ u(c, {
13
+ ...g,
14
+ ref: o
15
+ }),
16
+ /* @__PURE__ */ i.jsx(
17
+ d.Provider,
18
+ {
19
+ value: {
20
+ state: t,
21
+ ...m
22
+ },
23
+ children: t.isOpen ? p : null
24
+ }
25
+ )
26
+ ] });
27
+ };
8
28
  export {
9
- j as Title
29
+ w as TooltipTrigger
10
30
  };
@@ -1,8 +1,10 @@
1
- import { __module as e } from "./index.es38.js";
2
- import { __require as r } from "./index.es39.js";
3
- import { __require as o } from "./index.es40.js";
4
- process.env.NODE_ENV === "production" ? e.exports = r() : e.exports = o();
5
- var m = e.exports;
1
+ import { j as m } from "./index.es18.js";
2
+ import { cn as n } from "./index.es19.js";
3
+ import { textVariants as a } from "./index.es27.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
+ }
6
8
  export {
7
- m as j
9
+ x as Text
8
10
  };
@@ -1,8 +1,10 @@
1
- import { clsx as o } from "clsx";
2
- import { twMerge as t } from "tailwind-merge";
3
- function n(...r) {
4
- return t(o(r));
1
+ import { j as m } from "./index.es18.js";
2
+ import { cn as c } from "./index.es19.js";
3
+ import { titleVariants as l } from "./index.es27.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 });
5
7
  }
6
8
  export {
7
- n as cn
9
+ j as Title
8
10
  };
@@ -1,24 +1,8 @@
1
- import { j as s } from "./index.es16.js";
2
- import { MinusIcon as p, PlusIcon as u } from "./index.es26.js";
3
- import { cn as e } from "./index.es17.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
- };
1
+ import { __module as e } from "./index.es42.js";
2
+ import { __require as r } from "./index.es43.js";
3
+ import { __require as o } from "./index.es44.js";
4
+ process.env.NODE_ENV === "production" ? e.exports = r() : e.exports = o();
5
+ var m = e.exports;
22
6
  export {
23
- f as AccordionItem
7
+ m as j
24
8
  };
@@ -1,175 +1,8 @@
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
- );
1
+ import { clsx as o } from "clsx";
2
+ import { twMerge as t } from "tailwind-merge";
3
+ function n(...r) {
4
+ return t(o(r));
5
+ }
173
6
  export {
174
- t as buttonVariants
7
+ n as cn
175
8
  };
package/dist/index.es2.js CHANGED
@@ -1,7 +1,7 @@
1
- import { j as m } from "./index.es16.js";
1
+ import { j as m } from "./index.es18.js";
2
2
  import { useState as g } from "react";
3
- import { cn as j } from "./index.es17.js";
4
- import { AccordionItem as h } from "./index.es18.js";
3
+ import { cn as j } from "./index.es19.js";
4
+ import { AccordionItem as h } from "./index.es20.js";
5
5
  const C = ({
6
6
  items: a,
7
7
  accordionClassName: e,
@@ -1,45 +1,24 @@
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",
4
- {
5
- variants: {
6
- isHovered: {
7
- true: ""
8
- },
9
- 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"
15
- },
16
- isDisabled: {
17
- true: "border-neutral-500 cursor-not-allowed"
18
- },
19
- label: {
20
- true: "mr-2"
21
- }
22
- },
23
- compoundVariants: [
24
- {
25
- isHovered: !0,
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
- {
36
- isDisabled: !0,
37
- isSelected: !0,
38
- class: "bg-neutral-500"
39
- }
40
- ]
41
- }
42
- );
1
+ import { j as s } from "./index.es18.js";
2
+ import { MinusIcon as p, PlusIcon as u } from "./index.es30.js";
3
+ import { cn as e } from "./index.es19.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
+ };
43
22
  export {
44
- i as checkboxVariants
23
+ f as AccordionItem
45
24
  };