@simpli-route/apollo-ds 0.0.22 → 0.1.0

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 (123) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +9 -0
  2. package/dist/components/Button/Button.d.ts +5 -0
  3. package/dist/components/Button/types.d.ts +3 -0
  4. package/dist/components/Checkbox/Checkbox.d.ts +5 -0
  5. package/dist/components/IconButton/IconButton.d.ts +9 -0
  6. package/dist/components/Input/Label.d.ts +13 -0
  7. package/dist/components/Input/index.d.ts +2 -0
  8. package/dist/components/Input/types.d.ts +24 -0
  9. package/dist/components/Loader/Loader.d.ts +9 -0
  10. package/dist/components/NumberField/CaptionNumberField.d.ts +9 -0
  11. package/dist/components/NumberField/NumberField.d.ts +12 -0
  12. package/dist/components/NumberField/NumberField.test.d.ts +1 -0
  13. package/dist/components/NumberField/StepperButton.d.ts +3 -0
  14. package/dist/components/NumberField/index.d.ts +2 -0
  15. package/dist/components/NumberField/types.d.ts +54 -0
  16. package/dist/components/NumberField/variants.d.ts +8 -0
  17. package/dist/components/Switch/Switch.d.ts +5 -0
  18. package/dist/components/Tooltip/Tooltip.d.ts +13 -0
  19. package/dist/components/Tooltip/Tooltip.test.d.ts +1 -0
  20. package/dist/components/Tooltip/TooltipTrigger.d.ts +3 -0
  21. package/dist/components/Tooltip/context.d.ts +12 -0
  22. package/dist/components/Tooltip/index.d.ts +3 -0
  23. package/dist/components/Tooltip/types.d.ts +30 -0
  24. package/dist/components/Tooltip/variants.d.ts +6 -0
  25. package/dist/components/index.d.ts +4 -0
  26. package/dist/index.cjs.js +1 -1
  27. package/dist/index.cjs10.js +1 -1
  28. package/dist/index.cjs11.js +1 -1
  29. package/dist/index.cjs12.js +1 -1
  30. package/dist/index.cjs13.js +1 -1
  31. package/dist/index.cjs14.js +1 -1
  32. package/dist/index.cjs15.js +1 -1
  33. package/dist/index.cjs16.js +1 -1
  34. package/dist/index.cjs17.js +1 -1
  35. package/dist/index.cjs18.js +1 -1
  36. package/dist/index.cjs19.js +1 -1
  37. package/dist/index.cjs2.js +1 -1
  38. package/dist/index.cjs20.js +1 -1
  39. package/dist/index.cjs21.js +1 -1
  40. package/dist/index.cjs22.js +1 -9
  41. package/dist/index.cjs23.js +1 -19
  42. package/dist/index.cjs24.js +1 -1
  43. package/dist/index.cjs25.js +1 -1
  44. package/dist/index.cjs26.js +1 -1
  45. package/dist/index.cjs27.js +1 -1
  46. package/dist/index.cjs28.js +1 -1
  47. package/dist/index.cjs29.js +1 -0
  48. package/dist/index.cjs3.js +1 -1
  49. package/dist/index.cjs30.js +1 -0
  50. package/dist/index.cjs31.js +1 -0
  51. package/dist/index.cjs32.js +1 -0
  52. package/dist/index.cjs33.js +1 -0
  53. package/dist/index.cjs34.js +1 -0
  54. package/dist/index.cjs35.js +1 -0
  55. package/dist/index.cjs36.js +9 -0
  56. package/dist/index.cjs37.js +19 -0
  57. package/dist/index.cjs38.js +1 -0
  58. package/dist/index.cjs39.js +1 -0
  59. package/dist/index.cjs4.js +1 -1
  60. package/dist/index.cjs40.js +1 -0
  61. package/dist/index.cjs41.js +1 -0
  62. package/dist/index.cjs42.js +1 -0
  63. package/dist/index.cjs43.js +1 -0
  64. package/dist/index.cjs44.js +1 -0
  65. package/dist/index.cjs5.js +1 -1
  66. package/dist/index.cjs6.js +1 -1
  67. package/dist/index.cjs7.js +1 -1
  68. package/dist/index.cjs8.js +1 -1
  69. package/dist/index.cjs9.js +1 -1
  70. package/dist/index.es.js +22 -12
  71. package/dist/index.es10.js +33 -6
  72. package/dist/index.es11.js +23 -5
  73. package/dist/index.es12.js +26 -20
  74. package/dist/index.es13.js +8 -173
  75. package/dist/index.es14.js +8 -43
  76. package/dist/index.es15.js +6 -92
  77. package/dist/index.es16.js +6 -22
  78. package/dist/index.es17.js +21 -29
  79. package/dist/index.es18.js +131 -19
  80. package/dist/index.es19.js +170 -17
  81. package/dist/index.es2.js +3 -3
  82. package/dist/index.es20.js +32 -120
  83. package/dist/index.es21.js +59 -2
  84. package/dist/index.es22.js +91 -29
  85. package/dist/index.es23.js +3 -599
  86. package/dist/index.es24.js +22 -5
  87. package/dist/index.es25.js +30 -2
  88. package/dist/index.es26.js +11 -2
  89. package/dist/index.es27.js +10 -21
  90. package/dist/index.es28.js +12 -21
  91. package/dist/index.es29.js +12 -0
  92. package/dist/index.es3.js +56 -49
  93. package/dist/index.es30.js +12 -0
  94. package/dist/index.es31.js +33 -0
  95. package/dist/index.es32.js +21 -0
  96. package/dist/index.es33.js +22 -0
  97. package/dist/index.es34.js +51 -0
  98. package/dist/index.es35.js +4 -0
  99. package/dist/index.es36.js +32 -0
  100. package/dist/index.es37.js +601 -0
  101. package/dist/index.es38.js +21 -0
  102. package/dist/index.es39.js +21 -0
  103. package/dist/index.es4.js +4 -4
  104. package/dist/index.es40.js +23 -0
  105. package/dist/index.es41.js +23 -0
  106. package/dist/index.es42.js +21 -0
  107. package/dist/index.es43.js +4 -0
  108. package/dist/index.es44.js +4 -0
  109. package/dist/index.es5.js +3 -3
  110. package/dist/index.es6.js +30 -49
  111. package/dist/index.es7.js +48 -76
  112. package/dist/index.es8.js +90 -8
  113. package/dist/index.es9.js +78 -8
  114. package/dist/stories/Button.stories.d.ts +3 -16
  115. package/dist/stories/Checkbox.stories.d.ts +1 -1
  116. package/dist/stories/IconButton.stories.d.ts +1 -1
  117. package/dist/stories/Label.stories.d.ts +23 -0
  118. package/dist/stories/NumberField.stories.d.ts +27 -0
  119. package/dist/stories/Switch.stories.d.ts +1 -1
  120. package/dist/stories/Text.stories.d.ts +1 -1
  121. package/dist/stories/Title.stories.d.ts +1 -1
  122. package/dist/style.css +344 -0
  123. package/package.json +13 -13
@@ -1,133 +1,45 @@
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",
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",
100
4
  {
101
5
  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"
6
+ isHovered: {
7
+ true: ""
8
+ },
9
+ isSelected: {
10
+ true: "border-primary-500 bg-primary-500",
11
+ false: "bg-white"
106
12
  },
107
- size: {
108
- xxs: "p-1",
109
- xs: "p-2",
110
- sm: "p-2.5",
111
- md: "p-3",
112
- lg: "p-4"
13
+ isFocusVisible: {
14
+ true: "border-primary-500 group-active:border-primary-500"
113
15
  },
114
16
  isDisabled: {
115
- true: "pointer-events-none cursor-not-allowed"
17
+ true: "border-neutral-500 cursor-not-allowed"
116
18
  },
117
- isHovered: {
118
- true: ""
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"
119
28
  },
120
- isActive: {
121
- true: ""
29
+ {
30
+ isHovered: !0,
31
+ isSelected: !1,
32
+ isDisabled: !1,
33
+ class: "border-primary-700 group-active:bg-primary-600"
122
34
  },
123
- isFocused: {
124
- false: "",
125
- true: "focus:outline-none focus:ring-offset-2 outline-none ring-2 ring-sky-400"
35
+ {
36
+ isDisabled: !0,
37
+ isSelected: !0,
38
+ class: "bg-neutral-500"
126
39
  }
127
- },
128
- compoundVariants: [...t, ...i, ...s]
40
+ ]
129
41
  }
130
42
  );
131
43
  export {
132
- a as buttonVariants
44
+ i as checkboxVariants
133
45
  };
@@ -1,4 +1,61 @@
1
- var e = { exports: {} };
1
+ import { cva as r } from "class-variance-authority";
2
+ const o = r(
3
+ "box-border w-full rounded border border-neutral-500 px-3 placeholder:text-neutral-700 focus:outline-none",
4
+ {
5
+ variants: {
6
+ size: {
7
+ xs: "py-1",
8
+ sm: "py-2",
9
+ md: "py-3",
10
+ lg: "py-4"
11
+ },
12
+ isHovered: {
13
+ true: ""
14
+ },
15
+ isFocused: {
16
+ true: ""
17
+ },
18
+ isDisabled: {
19
+ true: "border border-neutral-200 bg-neutral-200 cursor-not-allowed text-neutral-700",
20
+ false: "bg-neutral-50"
21
+ },
22
+ isReadOnly: {
23
+ true: "cursor-not-allowed"
24
+ },
25
+ validationState: {
26
+ default: "",
27
+ valid: "border border-success-500",
28
+ invalid: "border border-error-500"
29
+ }
30
+ },
31
+ compoundVariants: [
32
+ {
33
+ isHovered: !0,
34
+ isDisabled: !1,
35
+ validationState: "default",
36
+ class: "border border-neutral-900"
37
+ },
38
+ // default focus
39
+ {
40
+ isFocused: !0,
41
+ isDisabled: !1,
42
+ class: "border-2 focus-within:border-primary-500 focus-within:ring-1 focus-within:ring-primary-500 focus:border-primary-500 focus:ring-1 focus:ring-primary-500"
43
+ },
44
+ // success focused
45
+ {
46
+ validationState: "valid",
47
+ isFocused: !0,
48
+ class: "border-2 border-success-500 focus-within:ring-1 focus-within:ring-success-500 focus:border-success-500 focus:ring-1 focus:ring-success-500"
49
+ },
50
+ // error focused
51
+ {
52
+ validationState: "invalid",
53
+ isFocused: !0,
54
+ class: "border-2 border-error-500 focus-within:ring-1 focus-within:ring-error-500 focus:border-error-500 focus:ring-1 focus:ring-error-500"
55
+ }
56
+ ]
57
+ }
58
+ );
2
59
  export {
3
- e as __module
60
+ o as inputNumberVariant
4
61
  };
@@ -1,32 +1,94 @@
1
- import { __exports as t } from "./index.es25.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
  };