@simpli-route/apollo-ds 0.0.11 → 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 (70) 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.cjs15.js +1 -1
  14. package/dist/index.cjs16.js +1 -1
  15. package/dist/index.cjs17.js +1 -1
  16. package/dist/index.cjs18.js +1 -1
  17. package/dist/index.cjs19.js +1 -1
  18. package/dist/index.cjs2.js +1 -1
  19. package/dist/index.cjs20.js +1 -9
  20. package/dist/index.cjs21.js +1 -19
  21. package/dist/index.cjs22.js +1 -1
  22. package/dist/index.cjs23.js +9 -1
  23. package/dist/index.cjs24.js +19 -1
  24. package/dist/index.cjs25.js +1 -1
  25. package/dist/index.cjs26.js +1 -1
  26. package/dist/index.cjs27.js +1 -1
  27. package/dist/index.cjs28.js +1 -0
  28. package/dist/index.cjs29.js +1 -0
  29. package/dist/index.cjs3.js +1 -1
  30. package/dist/index.cjs30.js +1 -0
  31. package/dist/index.cjs4.js +1 -1
  32. package/dist/index.cjs5.js +1 -1
  33. package/dist/index.cjs6.js +1 -1
  34. package/dist/index.cjs7.js +1 -1
  35. package/dist/index.cjs8.js +1 -1
  36. package/dist/index.cjs9.js +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.es.js +12 -10
  39. package/dist/index.es10.js +6 -6
  40. package/dist/index.es11.js +6 -22
  41. package/dist/index.es12.js +2 -2
  42. package/dist/index.es13.js +2 -2
  43. package/dist/index.es15.js +28 -20
  44. package/dist/index.es16.js +38 -15
  45. package/dist/index.es17.js +22 -20
  46. package/dist/index.es18.js +15 -92
  47. package/dist/index.es19.js +20 -2
  48. package/dist/index.es2.js +3 -3
  49. package/dist/index.es20.js +91 -29
  50. package/dist/index.es21.js +22 -599
  51. package/dist/index.es22.js +2 -5
  52. package/dist/index.es23.js +29 -172
  53. package/dist/index.es24.js +599 -2
  54. package/dist/index.es25.js +5 -2
  55. package/dist/index.es26.js +173 -21
  56. package/dist/index.es27.js +2 -21
  57. package/dist/index.es28.js +4 -0
  58. package/dist/index.es29.js +23 -0
  59. package/dist/index.es3.js +24 -23
  60. package/dist/index.es30.js +23 -0
  61. package/dist/index.es4.js +46 -48
  62. package/dist/index.es5.js +45 -65
  63. package/dist/index.es6.js +70 -8
  64. package/dist/index.es7.js +7 -7
  65. package/dist/index.es8.js +8 -33
  66. package/dist/index.es9.js +33 -6
  67. package/dist/stories/Checkbox.stories.d.ts +17 -0
  68. package/dist/stories/Switch.stories.d.ts +4 -0
  69. package/dist/style.css +32 -0
  70. package/package.json +3 -3
@@ -1,17 +1,40 @@
1
- import { j as t } from "./index.es9.js";
2
- import { cn as m } from "./index.es10.js";
3
- const u = ({
4
- label: x,
5
- description: e,
6
- errorMessage: n,
7
- isDisabled: s,
8
- isInvalid: r,
9
- children: l
10
- }) => !x && !e && !l ? null : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col", children: [
11
- x ? /* @__PURE__ */ t.jsx("p", { className: m("text-sm font-semibold", s ? "text-neutral-600" : "text-neutral-900"), children: x }) : l,
12
- e && !n && /* @__PURE__ */ t.jsx("p", { className: m("text-xs", s ? "text-neutral-600" : "text-neutral-700"), children: e }),
13
- r && n && /* @__PURE__ */ t.jsx("p", { className: "text-sm text-red-500", children: n })
14
- ] });
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 bg-neutral-500"
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
+ }
37
+ );
15
38
  export {
16
- u as ContentSwitch
39
+ i as checkboxVariants
17
40
  };
@@ -1,22 +1,24 @@
1
- import { j as i } from "./index.es9.js";
2
- import { cn as m } from "./index.es10.js";
3
- import { indicatorVariants as n } from "./index.es18.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
- );
1
+ import { j as s } from "./index.es10.js";
2
+ import { MinusIcon as p, PlusIcon as u } from "./index.es25.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
+ };
20
22
  export {
21
- c as SwitchIndicator
23
+ f as AccordionItem
22
24
  };
@@ -1,94 +1,17 @@
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",
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
- }
90
- );
1
+ import { j as t } from "./index.es10.js";
2
+ import { cn as m } from "./index.es11.js";
3
+ const u = ({
4
+ label: x,
5
+ description: e,
6
+ errorMessage: n,
7
+ isDisabled: s,
8
+ isInvalid: r,
9
+ children: l
10
+ }) => !x && !e && !l ? null : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col", children: [
11
+ x ? /* @__PURE__ */ t.jsx("p", { className: m("text-sm font-semibold", s ? "text-neutral-600" : "text-neutral-900"), children: x }) : l,
12
+ e && !n && /* @__PURE__ */ t.jsx("p", { className: m("text-xs", s ? "text-neutral-600" : "text-neutral-700"), children: e }),
13
+ r && n && /* @__PURE__ */ t.jsx("p", { className: "text-sm text-red-500", children: n })
14
+ ] });
91
15
  export {
92
- a as indicatorVariants,
93
- s as switchVariants
16
+ u as ContentSwitch
94
17
  };
@@ -1,4 +1,22 @@
1
- var e = { exports: {} };
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.es20.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
+ );
2
20
  export {
3
- e as __module
21
+ c as SwitchIndicator
4
22
  };
package/dist/index.es2.js CHANGED
@@ -1,7 +1,7 @@
1
- import { j as e } from "./index.es9.js";
1
+ import { j as e } from "./index.es10.js";
2
2
  import { useState as u } from "react";
3
- import { cn as d } from "./index.es10.js";
4
- import { AccordionItem as f } from "./index.es11.js";
3
+ import { cn as d } from "./index.es11.js";
4
+ import { AccordionItem as f } from "./index.es17.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,32 +1,94 @@
1
- import { __exports as t } from "./index.es24.js";
2
- import R from "react";
3
- /**
4
- * @license React
5
- * react-jsx-runtime.production.min.js
6
- *
7
- * Copyright (c) Facebook, Inc. and its affiliates.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */
12
- var p;
13
- function v() {
14
- if (p)
15
- return t;
16
- p = 1;
17
- var s = R, m = Symbol.for("react.element"), l = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, d = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function i(o, r, u) {
19
- var e, n = {}, _ = null, f = null;
20
- u !== void 0 && (_ = "" + u), r.key !== void 0 && (_ = "" + r.key), r.ref !== void 0 && (f = r.ref);
21
- for (e in r)
22
- c.call(r, e) && !y.hasOwnProperty(e) && (n[e] = r[e]);
23
- if (o && o.defaultProps)
24
- for (e in r = o.defaultProps, r)
25
- n[e] === void 0 && (n[e] = r[e]);
26
- return { $$typeof: m, type: o, key: _, ref: f, props: n, _owner: d.current };
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",
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
+ ]
27
89
  }
28
- return t.Fragment = l, t.jsx = i, t.jsxs = i, t;
29
- }
90
+ );
30
91
  export {
31
- v as __require
92
+ a as indicatorVariants,
93
+ s as switchVariants
32
94
  };