reactigoded 1.0.0-beta.26

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 (177) hide show
  1. package/CHANGELOG.md +3001 -0
  2. package/LICENSE +21 -0
  3. package/README.md +556 -0
  4. package/dist/Toast-FZUdYH1L.js +594 -0
  5. package/dist/cn.js +7 -0
  6. package/dist/components/Accordion/Accordion.d.ts +49 -0
  7. package/dist/components/Accordion/AccordionContent.d.ts +15 -0
  8. package/dist/components/Accordion/AccordionContext.d.ts +59 -0
  9. package/dist/components/Accordion/AccordionHeader.d.ts +22 -0
  10. package/dist/components/Accordion/AccordionItem.d.ts +11 -0
  11. package/dist/components/Accordion/index.d.ts +8 -0
  12. package/dist/components/Alert/Alert.d.ts +39 -0
  13. package/dist/components/Alert/index.d.ts +2 -0
  14. package/dist/components/AlertDialog/AlertDialogClose.d.ts +64 -0
  15. package/dist/components/AlertDialog/AlertDialogContent.d.ts +58 -0
  16. package/dist/components/AlertDialog/index.d.ts +14 -0
  17. package/dist/components/Avatar/Avatar.d.ts +62 -0
  18. package/dist/components/Avatar/AvatarGroup.d.ts +13 -0
  19. package/dist/components/Avatar/index.d.ts +4 -0
  20. package/dist/components/Badge/Badge.d.ts +33 -0
  21. package/dist/components/Badge/index.d.ts +2 -0
  22. package/dist/components/Breadcrumb/Breadcrumb.d.ts +14 -0
  23. package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +21 -0
  24. package/dist/components/Breadcrumb/index.d.ts +4 -0
  25. package/dist/components/Button/Button.d.ts +61 -0
  26. package/dist/components/Button/IconButton.d.ts +48 -0
  27. package/dist/components/Button/index.d.ts +4 -0
  28. package/dist/components/Card/Card.d.ts +79 -0
  29. package/dist/components/Card/CardBody.d.ts +8 -0
  30. package/dist/components/Card/CardDivider.d.ts +8 -0
  31. package/dist/components/Card/CardFooter.d.ts +8 -0
  32. package/dist/components/Card/CardHeader.d.ts +8 -0
  33. package/dist/components/Card/CardImage.d.ts +15 -0
  34. package/dist/components/Card/index.d.ts +12 -0
  35. package/dist/components/Checkbox/Checkbox.d.ts +47 -0
  36. package/dist/components/Checkbox/index.d.ts +2 -0
  37. package/dist/components/Chip/Chip.d.ts +38 -0
  38. package/dist/components/Chip/index.d.ts +2 -0
  39. package/dist/components/Dialog/Dialog.d.ts +80 -0
  40. package/dist/components/Dialog/DialogBody.d.ts +8 -0
  41. package/dist/components/Dialog/DialogClose.d.ts +61 -0
  42. package/dist/components/Dialog/DialogContent.d.ts +36 -0
  43. package/dist/components/Dialog/DialogContext.d.ts +1 -0
  44. package/dist/components/Dialog/DialogFooter.d.ts +8 -0
  45. package/dist/components/Dialog/DialogHeader.d.ts +13 -0
  46. package/dist/components/Dialog/DialogTrigger.d.ts +44 -0
  47. package/dist/components/Dialog/index.d.ts +16 -0
  48. package/dist/components/Divider/Divider.d.ts +34 -0
  49. package/dist/components/Divider/index.d.ts +2 -0
  50. package/dist/components/Input/ErrorText.d.ts +13 -0
  51. package/dist/components/Input/Helper.d.ts +11 -0
  52. package/dist/components/Input/Input.d.ts +35 -0
  53. package/dist/components/Input/InputAddon.d.ts +8 -0
  54. package/dist/components/Input/InputGroup.d.ts +17 -0
  55. package/dist/components/Input/Label.d.ts +12 -0
  56. package/dist/components/Input/index.d.ts +12 -0
  57. package/dist/components/NativeSelect/NativeSelect.d.ts +41 -0
  58. package/dist/components/NativeSelect/index.d.ts +2 -0
  59. package/dist/components/Navbar/Navbar.d.ts +46 -0
  60. package/dist/components/Navbar/NavbarActions.d.ts +10 -0
  61. package/dist/components/Navbar/NavbarLink.d.ts +13 -0
  62. package/dist/components/Navbar/NavbarLogo.d.ts +22 -0
  63. package/dist/components/Navbar/NavbarMenuButton.d.ts +15 -0
  64. package/dist/components/Navbar/NavbarNav.d.ts +14 -0
  65. package/dist/components/Navbar/index.d.ts +12 -0
  66. package/dist/components/Pagination/Pagination.d.ts +77 -0
  67. package/dist/components/Pagination/index.d.ts +2 -0
  68. package/dist/components/Progress/Progress.d.ts +63 -0
  69. package/dist/components/Progress/index.d.ts +2 -0
  70. package/dist/components/Radio/Radio.d.ts +28 -0
  71. package/dist/components/Radio/index.d.ts +2 -0
  72. package/dist/components/Rating/Rating.d.ts +85 -0
  73. package/dist/components/Rating/index.d.ts +2 -0
  74. package/dist/components/Sidebar/Sidebar.d.ts +28 -0
  75. package/dist/components/Sidebar/SidebarContext.d.ts +32 -0
  76. package/dist/components/Sidebar/SidebarDivider.d.ts +8 -0
  77. package/dist/components/Sidebar/SidebarFooter.d.ts +8 -0
  78. package/dist/components/Sidebar/SidebarHeader.d.ts +13 -0
  79. package/dist/components/Sidebar/SidebarItem.d.ts +42 -0
  80. package/dist/components/Sidebar/SidebarNav.d.ts +13 -0
  81. package/dist/components/Sidebar/SidebarSection.d.ts +11 -0
  82. package/dist/components/Sidebar/SidebarToggle.d.ts +17 -0
  83. package/dist/components/Sidebar/index.d.ts +16 -0
  84. package/dist/components/Skeleton/Skeleton.d.ts +60 -0
  85. package/dist/components/Skeleton/index.d.ts +2 -0
  86. package/dist/components/Slider/Slider.d.ts +44 -0
  87. package/dist/components/Slider/index.d.ts +2 -0
  88. package/dist/components/Slot/Slot.d.ts +1 -0
  89. package/dist/components/Slot/composeEventHandlers.d.ts +1 -0
  90. package/dist/components/Slot/composeRefs.d.ts +1 -0
  91. package/dist/components/Slot/index.d.ts +3 -0
  92. package/dist/components/Spinner/Spinner.d.ts +31 -0
  93. package/dist/components/Spinner/index.d.ts +2 -0
  94. package/dist/components/Stepper/Step.d.ts +17 -0
  95. package/dist/components/Stepper/Stepper.d.ts +97 -0
  96. package/dist/components/Stepper/index.d.ts +4 -0
  97. package/dist/components/Switch/Switch.d.ts +53 -0
  98. package/dist/components/Switch/index.d.ts +2 -0
  99. package/dist/components/Table/Table.d.ts +74 -0
  100. package/dist/components/Table/index.d.ts +2 -0
  101. package/dist/components/Tabs/Tabs.d.ts +41 -0
  102. package/dist/components/Tabs/TabsContent.d.ts +15 -0
  103. package/dist/components/Tabs/TabsContext.d.ts +61 -0
  104. package/dist/components/Tabs/TabsList.d.ts +10 -0
  105. package/dist/components/Tabs/TabsTrigger.d.ts +15 -0
  106. package/dist/components/Tabs/index.d.ts +8 -0
  107. package/dist/components/Textarea/Textarea.d.ts +51 -0
  108. package/dist/components/Textarea/index.d.ts +2 -0
  109. package/dist/components/ThemeToggle/ThemeToggle.d.ts +43 -0
  110. package/dist/components/ThemeToggle/index.d.ts +2 -0
  111. package/dist/components/Timeline/Timeline.d.ts +20 -0
  112. package/dist/components/Timeline/TimelineItem.d.ts +32 -0
  113. package/dist/components/Timeline/index.d.ts +4 -0
  114. package/dist/components/Toast/Toast.d.ts +47 -0
  115. package/dist/components/Toast/ToastContext.d.ts +93 -0
  116. package/dist/components/Toast/ToastProvider.d.ts +116 -0
  117. package/dist/components/Toast/index.d.ts +6 -0
  118. package/dist/components/floating/Menu/Menu.d.ts +67 -0
  119. package/dist/components/floating/Menu/MenuContent.d.ts +60 -0
  120. package/dist/components/floating/Menu/MenuContext.d.ts +78 -0
  121. package/dist/components/floating/Menu/MenuItem.d.ts +47 -0
  122. package/dist/components/floating/Menu/MenuLabel.d.ts +6 -0
  123. package/dist/components/floating/Menu/MenuSeparator.d.ts +6 -0
  124. package/dist/components/floating/Menu/MenuTrigger.d.ts +53 -0
  125. package/dist/components/floating/Menu/index.d.ts +12 -0
  126. package/dist/components/floating/Menu/menuSelectors.d.ts +15 -0
  127. package/dist/components/floating/Tooltip/Tooltip.d.ts +194 -0
  128. package/dist/components/floating/Tooltip/index.d.ts +2 -0
  129. package/dist/components/floating/index.d.ts +3 -0
  130. package/dist/components/floating/primitives/FloatingTreeRoot.d.ts +55 -0
  131. package/dist/components/floating/primitives/index.d.ts +2 -0
  132. package/dist/components/floating/primitives/useFloatingNode.d.ts +1 -0
  133. package/dist/components/index.d.ts +38 -0
  134. package/dist/hooks/useControllableState.d.ts +152 -0
  135. package/dist/hooks/useTheme.d.ts +44 -0
  136. package/dist/index.d.ts +36 -0
  137. package/dist/index.js +1843 -0
  138. package/dist/server-safe.d.ts +69 -0
  139. package/dist/server-safe.js +47 -0
  140. package/dist/styles/igoded-base.css +1 -0
  141. package/dist/styles/igoded-components.css +1 -0
  142. package/dist/styles/igoded-design.css +1 -0
  143. package/dist/styles/igoded-fonts.css +1 -0
  144. package/dist/styles/igoded-reset.css +1 -0
  145. package/dist/styles/igoded-state-css.css +1 -0
  146. package/dist/styles/igoded-tokens.css +1 -0
  147. package/dist/styles/index.css +3 -0
  148. package/dist/styles/state/active.css +1 -0
  149. package/dist/styles/state/checked.css +1 -0
  150. package/dist/styles/state/default.css +1 -0
  151. package/dist/styles/state/disabled.css +1 -0
  152. package/dist/styles/state/empty.css +1 -0
  153. package/dist/styles/state/first-child.css +1 -0
  154. package/dist/styles/state/first-of-type.css +1 -0
  155. package/dist/styles/state/focus-visible.css +1 -0
  156. package/dist/styles/state/focus-within.css +1 -0
  157. package/dist/styles/state/focus.css +1 -0
  158. package/dist/styles/state/group-hover.css +1 -0
  159. package/dist/styles/state/hover.css +1 -0
  160. package/dist/styles/state/in-range.css +1 -0
  161. package/dist/styles/state/indeterminate.css +1 -0
  162. package/dist/styles/state/invalid.css +1 -0
  163. package/dist/styles/state/last-child.css +1 -0
  164. package/dist/styles/state/last-of-type.css +1 -0
  165. package/dist/styles/state/nth-child.css +1 -0
  166. package/dist/styles/state/only-child.css +1 -0
  167. package/dist/styles/state/optional.css +1 -0
  168. package/dist/styles/state/other.css +1 -0
  169. package/dist/styles/state/out-of-range.css +1 -0
  170. package/dist/styles/state/placeholder-shown.css +1 -0
  171. package/dist/styles/state/read-only.css +1 -0
  172. package/dist/styles/state/read-write.css +1 -0
  173. package/dist/styles/state/required.css +1 -0
  174. package/dist/styles/state/target.css +1 -0
  175. package/dist/styles/state/valid.css +1 -0
  176. package/dist/utils/cn.d.ts +11 -0
  177. package/package.json +282 -0
@@ -0,0 +1,594 @@
1
+ import { cn as s } from "./cn.js";
2
+ import "react";
3
+ import { Fragment as $, jsx as n, jsxs as f } from "react/jsx-runtime";
4
+ function T({ className: a, children: e, ref: i, ...r }) {
5
+ return /* @__PURE__ */ n("div", {
6
+ ref: i,
7
+ className: s("ig-dialog-body", a),
8
+ ...r,
9
+ children: e
10
+ });
11
+ }
12
+ function I({ className: a, children: e, ref: i, ...r }) {
13
+ return /* @__PURE__ */ n("div", {
14
+ ref: i,
15
+ className: s("ig-dialog-footer", a),
16
+ ...r,
17
+ children: e
18
+ });
19
+ }
20
+ function A({ className: a, children: e, ref: i, ...r }) {
21
+ return /* @__PURE__ */ n("div", {
22
+ ref: i,
23
+ className: s("ig-avatar-group", a),
24
+ ...r,
25
+ children: e
26
+ });
27
+ }
28
+ function B({ variant: a = "brand", size: e = "md", pill: i = !1, outline: r = !1, dot: t = !1, className: o, children: l, ref: c, role: d, "aria-label": g, ...u }) {
29
+ const b = t && !g && typeof l == "string" ? l : g;
30
+ return /* @__PURE__ */ n("span", {
31
+ ...u,
32
+ ref: c,
33
+ role: d ?? (t && b ? "img" : void 0),
34
+ className: s("ig-badge", r ? `ig-badge-outline-${a}` : `ig-badge-${a}`, e !== "md" && `ig-badge-${e}`, i && "ig-badge-pill", t && "ig-badge-dot", o),
35
+ "aria-label": b,
36
+ children: t ? null : l
37
+ });
38
+ }
39
+ function R(a) {
40
+ if (a.current) {
41
+ const { current: l, className: c, children: d, ref: g, ...u } = a;
42
+ return /* @__PURE__ */ n("span", {
43
+ ...u,
44
+ ref: g,
45
+ "aria-current": "page",
46
+ className: s("ig-breadcrumb-current", c),
47
+ children: d
48
+ });
49
+ }
50
+ const { current: e, className: i, children: r, ref: t, ...o } = a;
51
+ return /* @__PURE__ */ n("a", {
52
+ ...o,
53
+ ref: t,
54
+ className: s("ig-breadcrumb-item", i),
55
+ children: r
56
+ });
57
+ }
58
+ function y({ variant: a = "brand", appearance: e = "solid", size: i = "md", loading: r = !1, block: t = !1, icon: o = !1, disabled: l, className: c, children: d, ref: g, ...u }) {
59
+ const b = e === "link" ? "ig-btn-link" : e === "solid" ? `ig-btn-${a}` : `ig-btn-${e}-${a}`;
60
+ return /* @__PURE__ */ n("button", {
61
+ ...u,
62
+ ref: g,
63
+ type: u.type ?? "button",
64
+ disabled: l === !0 || r,
65
+ "aria-busy": r || void 0,
66
+ className: s("ig-btn", b, i !== "md" && `ig-btn-${i}`, r && "ig-btn-loading", t && "ig-btn-block", o && "ig-btn-icon", c),
67
+ children: d
68
+ });
69
+ }
70
+ function w({ children: a, ref: e, ...i }) {
71
+ return e !== void 0 ? /* @__PURE__ */ n(y, {
72
+ icon: !0,
73
+ ...i,
74
+ ref: e,
75
+ children: a
76
+ }) : /* @__PURE__ */ n(y, {
77
+ icon: !0,
78
+ ...i,
79
+ children: a
80
+ });
81
+ }
82
+ function L({ className: a, children: e, ref: i, ...r }) {
83
+ return /* @__PURE__ */ n("div", {
84
+ ref: i,
85
+ className: s("ig-card-header", a),
86
+ ...r,
87
+ children: e
88
+ });
89
+ }
90
+ function F({ className: a, children: e, ref: i, ...r }) {
91
+ return /* @__PURE__ */ n("div", {
92
+ ref: i,
93
+ className: s("ig-card-body", a),
94
+ ...r,
95
+ children: e
96
+ });
97
+ }
98
+ function M({ className: a, children: e, ref: i, ...r }) {
99
+ return /* @__PURE__ */ n("div", {
100
+ ref: i,
101
+ className: s("ig-card-footer", a),
102
+ ...r,
103
+ children: e
104
+ });
105
+ }
106
+ function E({ top: a = !1, alt: e, className: i, ref: r, ...t }) {
107
+ return /* @__PURE__ */ n("img", {
108
+ ref: r,
109
+ alt: e,
110
+ className: s(a ? "ig-card-image-top" : "ig-card-image", i),
111
+ ...t
112
+ });
113
+ }
114
+ function H({ className: a, ref: e, ...i }) {
115
+ return /* @__PURE__ */ n("hr", {
116
+ ref: e,
117
+ className: s("ig-card-divider", a),
118
+ ...i
119
+ });
120
+ }
121
+ function C(a, e) {
122
+ const i = [typeof a == "string" ? a.trim() : "", Array.isArray(e) ? e.filter((r) => typeof r == "string" && r.length > 0).join(" ") : typeof e == "string" ? e.trim() : ""].filter((r) => r.length > 0).join(" ");
123
+ return i.length > 0 ? i : void 0;
124
+ }
125
+ function j(a) {
126
+ const { variant: e, size: i = "md", selected: r = !1, onRemove: t, removeLabel: o = "Eliminar", children: l, className: c, selectable: d, ref: g, ...u } = a, b = s("ig-chip", e && `ig-chip-${e}`, i !== "md" && `ig-chip-${i}`, d && "ig-chip-selectable", r && "ig-chip-selected", c), p = t ? d ? /* @__PURE__ */ n("span", {
127
+ role: "button",
128
+ tabIndex: 0,
129
+ className: "ig-chip-close",
130
+ "aria-label": o,
131
+ onClick: (m) => {
132
+ m.stopPropagation(), t();
133
+ },
134
+ onKeyDown: (m) => {
135
+ (m.key === "Enter" || m.key === " ") && (m.preventDefault(), m.stopPropagation(), t());
136
+ },
137
+ children: "×"
138
+ }) : /* @__PURE__ */ n("button", {
139
+ type: "button",
140
+ className: "ig-chip-close",
141
+ onClick: (m) => {
142
+ m.stopPropagation(), t?.();
143
+ },
144
+ "aria-label": o,
145
+ children: "×"
146
+ }) : null;
147
+ return d ? /* @__PURE__ */ f("button", {
148
+ ...u,
149
+ ref: g,
150
+ type: "button",
151
+ "aria-pressed": r,
152
+ className: b,
153
+ children: [l, p]
154
+ }) : /* @__PURE__ */ f("span", {
155
+ ...u,
156
+ ref: g,
157
+ className: b,
158
+ children: [l, p]
159
+ });
160
+ }
161
+ function O({ vertical: a = !1, dashed: e = !1, variant: i = "default", children: r, className: t, ref: o, ...l }) {
162
+ const c = i !== "default" ? `ig-divider-${i}` : null;
163
+ return r !== void 0 ? /* @__PURE__ */ n("div", {
164
+ ...l,
165
+ ref: o,
166
+ className: s("ig-divider-with-text", c, e && "ig-divider-dashed", t),
167
+ children: r
168
+ }) : a ? /* @__PURE__ */ n("span", {
169
+ ...l,
170
+ ref: o,
171
+ role: "separator",
172
+ "aria-orientation": "vertical",
173
+ className: s("ig-divider-vertical", c, e && "ig-divider-dashed", t)
174
+ }) : /* @__PURE__ */ n("hr", {
175
+ ...l,
176
+ ref: o,
177
+ className: s("ig-divider", c, e && "ig-divider-dashed", t)
178
+ });
179
+ }
180
+ function P({ required: a = !1, className: e, children: i, ref: r, ...t }) {
181
+ return /* @__PURE__ */ f("label", {
182
+ ref: r,
183
+ className: s("ig-label", a && "ig-label-required", e),
184
+ ...t,
185
+ children: [i, a && /* @__PURE__ */ n("span", {
186
+ "aria-hidden": "true",
187
+ className: "ig-label-required-mark",
188
+ children: "*"
189
+ })]
190
+ });
191
+ }
192
+ function K({ className: a, children: e, ref: i, ...r }) {
193
+ return /* @__PURE__ */ n("p", {
194
+ ref: i,
195
+ className: s("ig-helper", a),
196
+ ...r,
197
+ children: e
198
+ });
199
+ }
200
+ function _({ className: a, children: e, ref: i, ...r }) {
201
+ return /* @__PURE__ */ n("p", {
202
+ ...r,
203
+ ref: i,
204
+ role: "alert",
205
+ "aria-live": "polite",
206
+ className: s("ig-error", a),
207
+ children: e
208
+ });
209
+ }
210
+ function G({ className: a, children: e, ref: i, ...r }) {
211
+ return /* @__PURE__ */ n("div", {
212
+ ref: i,
213
+ className: s("ig-input-group", a),
214
+ ...r,
215
+ children: e
216
+ });
217
+ }
218
+ function U({ className: a, children: e, ref: i, ...r }) {
219
+ return /* @__PURE__ */ n("span", {
220
+ ref: i,
221
+ className: s("ig-input-addon", a),
222
+ ...r,
223
+ children: e
224
+ });
225
+ }
226
+ function q(a) {
227
+ if (a.href !== void 0) {
228
+ const { className: o, ref: l, children: c, ...d } = a;
229
+ return /* @__PURE__ */ n("a", {
230
+ ref: l,
231
+ className: s("ig-navbar-logo", o),
232
+ ...d,
233
+ children: c
234
+ });
235
+ }
236
+ const { className: e, ref: i, children: r, ...t } = a;
237
+ return /* @__PURE__ */ n("div", {
238
+ ref: i,
239
+ className: s("ig-navbar-logo", e),
240
+ ...t,
241
+ children: r
242
+ });
243
+ }
244
+ function V({ className: a, active: e, ref: i, ...r }) {
245
+ return /* @__PURE__ */ n("a", {
246
+ ...r,
247
+ ref: i,
248
+ "aria-current": e ? "page" : void 0,
249
+ className: s("ig-navbar-link", e && "ig-navbar-link-active", a)
250
+ });
251
+ }
252
+ function W({ className: a, ref: e, ...i }) {
253
+ return /* @__PURE__ */ n("div", {
254
+ ref: e,
255
+ className: s("ig-navbar-actions", a),
256
+ ...i
257
+ });
258
+ }
259
+ function J({ className: a, expanded: e, controlsId: i, children: r, "aria-label": t = "Abrir menú", ref: o, ...l }) {
260
+ return /* @__PURE__ */ n("button", {
261
+ ...l,
262
+ ref: o,
263
+ type: "button",
264
+ "aria-label": t,
265
+ "aria-expanded": e,
266
+ "aria-controls": i,
267
+ className: s("ig-navbar-menu-btn", a),
268
+ children: r ?? /* @__PURE__ */ n("span", {
269
+ "aria-hidden": "true",
270
+ children: "☰"
271
+ })
272
+ });
273
+ }
274
+ function Q({ value: a = 0, max: e = 100, variant: i, size: r = "md", indeterminate: t = !1, loadingLabel: o = "Cargando", formatLabel: l, className: c, ref: d, ...g }) {
275
+ const u = Number.isFinite(e) && e > 0 ? e : 100, b = Math.min(Math.max(Number.isNaN(a) ? 0 : a, 0), u), v = b / u * 100, p = Math.round(v), { "aria-label": m, ...h } = g, N = m ?? (t ? o : l?.(Math.round(v)) ?? `${String(Math.round(v))} por ciento completado`);
276
+ return /* @__PURE__ */ n("div", {
277
+ ...h,
278
+ ref: d,
279
+ role: "progressbar",
280
+ "aria-label": N,
281
+ "aria-valuemin": 0,
282
+ "aria-valuemax": u,
283
+ "aria-valuenow": t ? void 0 : b,
284
+ className: s("ig-progress", i && `ig-progress-${i}`, r !== "md" && `ig-progress-${r}`, t && "ig-progress-indeterminate", c),
285
+ children: /* @__PURE__ */ n("div", {
286
+ className: "ig-progress-bar",
287
+ style: t ? void 0 : { "--ig-progress-percent": `${String(p)}%` }
288
+ })
289
+ });
290
+ }
291
+ function X({ variant: a = "brand", className: e, children: i, ref: r, disabled: t, describedBy: o, ...l }) {
292
+ const { "aria-describedby": c, ...d } = l, g = C(c, o);
293
+ return /* @__PURE__ */ f("label", {
294
+ className: s("ig-radio", `ig-radio-${a}`, e),
295
+ "data-disabled": t ? "true" : void 0,
296
+ children: [
297
+ /* @__PURE__ */ n("input", {
298
+ ...d,
299
+ ref: r,
300
+ type: "radio",
301
+ disabled: t,
302
+ "aria-describedby": g
303
+ }),
304
+ /* @__PURE__ */ n("span", {
305
+ className: "ig-radio-mark",
306
+ "aria-hidden": "true"
307
+ }),
308
+ i !== void 0 && /* @__PURE__ */ n("span", { children: i })
309
+ ]
310
+ });
311
+ }
312
+ function Y({ icon: a, className: e, children: i, ref: r, ...t }) {
313
+ return /* @__PURE__ */ f("div", {
314
+ ref: r,
315
+ className: s("ig-sidebar-header", e),
316
+ ...t,
317
+ children: [a, i !== void 0 && /* @__PURE__ */ n("span", { children: i })]
318
+ });
319
+ }
320
+ function Z({ className: a, children: e, ref: i, ...r }) {
321
+ return /* @__PURE__ */ n("div", {
322
+ ref: i,
323
+ className: s("ig-sidebar-footer", a),
324
+ ...r,
325
+ children: e
326
+ });
327
+ }
328
+ function z({ className: a, ref: e, ...i }) {
329
+ return /* @__PURE__ */ n("div", {
330
+ ...i,
331
+ ref: e,
332
+ role: "separator",
333
+ className: s("ig-sidebar-divider", a)
334
+ });
335
+ }
336
+ function ee({ className: a, children: e, ref: i, ...r }) {
337
+ return /* @__PURE__ */ n("div", {
338
+ ref: i,
339
+ className: s("ig-sidebar-section", a),
340
+ ...r,
341
+ children: e
342
+ });
343
+ }
344
+ function ae({ variant: a = "text", className: e, ref: i, ...r }) {
345
+ return /* @__PURE__ */ n("div", {
346
+ ...r,
347
+ ref: i,
348
+ role: "presentation",
349
+ "aria-hidden": "true",
350
+ className: s("ig-skeleton", `ig-skeleton-${a}`, e)
351
+ });
352
+ }
353
+ function ie({ label: a = "Cargando contenido…", children: e, className: i, ref: r, ...t }) {
354
+ const { "aria-label": o, ...l } = t;
355
+ return /* @__PURE__ */ n("div", {
356
+ ...l,
357
+ ref: r,
358
+ role: "status",
359
+ "aria-busy": "true",
360
+ "aria-live": "polite",
361
+ "aria-label": o ?? a,
362
+ className: s("ig-skeleton-container", i),
363
+ children: e
364
+ });
365
+ }
366
+ function re({ variant: a = "brand", size: e = "md", label: i, className: r, ref: t, ...o }) {
367
+ const { "aria-label": l, ...c } = o;
368
+ return /* @__PURE__ */ n("span", {
369
+ ...c,
370
+ ref: t,
371
+ role: "status",
372
+ "aria-label": l ?? i ?? "Cargando…",
373
+ className: s("ig-spinner", `ig-spinner-${a}`, e !== "md" && `ig-spinner-${e}`, r)
374
+ });
375
+ }
376
+ function ne(a) {
377
+ const { label: e, index: i, active: r = !1, complete: t = !1, labeled: o = !1, interactive: l = !1, onActivate: c, onStepKeyDown: d, className: g, ref: u, ...b } = a, v = r ? "step" : void 0, p = (N) => {
378
+ if (l) {
379
+ if (N.key === "Enter" || N.key === " ") {
380
+ N.preventDefault(), c?.();
381
+ return;
382
+ }
383
+ d?.(N);
384
+ }
385
+ }, m = l && i !== void 0 ? i - 1 : void 0, h = /* @__PURE__ */ n("span", {
386
+ "aria-current": v,
387
+ role: l ? "button" : void 0,
388
+ tabIndex: l ? r ? 0 : -1 : void 0,
389
+ "aria-label": l && i !== void 0 ? `Paso ${String(i)}` : void 0,
390
+ "data-step-index": m,
391
+ onClick: l ? c : void 0,
392
+ onKeyDown: l ? p : void 0,
393
+ className: s("ig-step", r && "ig-step-active", t && "ig-step-complete", l && "ig-step-interactive"),
394
+ children: t ? "✓" : i
395
+ });
396
+ return o ? /* @__PURE__ */ f("div", {
397
+ ...b,
398
+ ref: u,
399
+ className: s("ig-step-item", r && "ig-step-active", t && "ig-step-complete", g),
400
+ children: [h, e !== void 0 && /* @__PURE__ */ n("span", {
401
+ className: "ig-step-label",
402
+ children: e
403
+ })]
404
+ }) : /* @__PURE__ */ n("div", {
405
+ ...b,
406
+ ref: u,
407
+ className: g,
408
+ children: h
409
+ });
410
+ }
411
+ function te({ className: a, striped: e, hover: i, bordered: r, compact: t, layout: o, scrollable: l, scrollAreaLabel: c = "Tabla con scroll horizontal", ref: d, ...g }) {
412
+ const u = /* @__PURE__ */ n("table", {
413
+ ref: d,
414
+ className: s("ig-table", e && "ig-table-striped", i && "ig-table-hover", r && "ig-table-bordered", t && "ig-table-compact", o && `ig-table-${o}`, a),
415
+ ...g
416
+ });
417
+ return l ? /* @__PURE__ */ n("div", {
418
+ role: "region",
419
+ "aria-label": c,
420
+ tabIndex: 0,
421
+ className: "ig-table-scroll-region",
422
+ children: u
423
+ }) : u;
424
+ }
425
+ function se({ ref: a, ...e }) {
426
+ return /* @__PURE__ */ n("thead", {
427
+ ref: a,
428
+ ...e
429
+ });
430
+ }
431
+ function le({ ref: a, ...e }) {
432
+ return /* @__PURE__ */ n("tbody", {
433
+ ref: a,
434
+ ...e
435
+ });
436
+ }
437
+ function oe({ ref: a, ...e }) {
438
+ return /* @__PURE__ */ n("tfoot", {
439
+ ref: a,
440
+ ...e
441
+ });
442
+ }
443
+ function ce({ ref: a, ...e }) {
444
+ return /* @__PURE__ */ n("tr", {
445
+ ref: a,
446
+ ...e
447
+ });
448
+ }
449
+ function de({ ref: a, ...e }) {
450
+ return /* @__PURE__ */ n("th", {
451
+ ref: a,
452
+ ...e
453
+ });
454
+ }
455
+ function ue({ ref: a, ...e }) {
456
+ return /* @__PURE__ */ n("td", {
457
+ ref: a,
458
+ ...e
459
+ });
460
+ }
461
+ function ge({ className: a, side: e, ref: i, ...r }) {
462
+ return /* @__PURE__ */ n("caption", {
463
+ ...r,
464
+ ref: i,
465
+ className: s(e && `ig-caption-${e}`, a)
466
+ });
467
+ }
468
+ function be({ className: a, children: e, ref: i, ...r }) {
469
+ return /* @__PURE__ */ n("div", {
470
+ ...r,
471
+ ref: i,
472
+ role: "list",
473
+ className: s("ig-timeline", a),
474
+ children: e
475
+ });
476
+ }
477
+ function me({ className: a, date: e, title: i, description: r, dotVariant: t = "default", dotContent: o, children: l, ref: c, ...d }) {
478
+ return /* @__PURE__ */ f("div", {
479
+ ...d,
480
+ ref: c,
481
+ role: "listitem",
482
+ className: s("ig-timeline-item", a),
483
+ children: [/* @__PURE__ */ n("span", {
484
+ className: s("ig-timeline-dot", t !== "default" && `ig-timeline-dot-${t}`),
485
+ "aria-hidden": "true",
486
+ children: o
487
+ }), /* @__PURE__ */ n("div", {
488
+ className: "ig-timeline-content",
489
+ children: l ?? /* @__PURE__ */ f($, { children: [
490
+ e != null && /* @__PURE__ */ n("div", {
491
+ className: "ig-timeline-date",
492
+ children: e
493
+ }),
494
+ i != null && /* @__PURE__ */ n("div", {
495
+ className: "ig-timeline-title",
496
+ children: i
497
+ }),
498
+ r != null && /* @__PURE__ */ n("div", {
499
+ className: "ig-timeline-description",
500
+ children: r
501
+ })
502
+ ] })
503
+ })]
504
+ });
505
+ }
506
+ var k = {
507
+ success: "✓",
508
+ warning: "⚠︎",
509
+ danger: "✕",
510
+ info: "ℹ︎",
511
+ brand: "★",
512
+ secondary: "•"
513
+ };
514
+ function ve({ variant: a = "neutral", title: e, message: i, icon: r, dismissible: t = !0, onClose: o, closeLabel: l = "Cerrar", className: c, children: d, ref: g, ...u }) {
515
+ const b = a === "danger" || a === "warning", v = r === !1 ? null : r !== void 0 ? r : a === "neutral" ? null : k[a];
516
+ return /* @__PURE__ */ f("div", {
517
+ ...u,
518
+ ref: g,
519
+ role: b ? "alert" : "status",
520
+ "aria-live": b ? "assertive" : "polite",
521
+ className: s("ig-toast", a !== "neutral" && `ig-toast-${a}`, c),
522
+ children: [
523
+ v !== null && /* @__PURE__ */ n("span", {
524
+ className: "ig-toast-icon",
525
+ "aria-hidden": "true",
526
+ children: v
527
+ }),
528
+ /* @__PURE__ */ f("div", {
529
+ className: "ig-toast-content",
530
+ children: [e !== void 0 && /* @__PURE__ */ n("div", {
531
+ className: "ig-toast-title",
532
+ children: e
533
+ }), (i !== void 0 || d !== void 0) && /* @__PURE__ */ n("div", {
534
+ className: "ig-toast-message",
535
+ children: i ?? d
536
+ })]
537
+ }),
538
+ t && /* @__PURE__ */ n("button", {
539
+ type: "button",
540
+ className: "ig-toast-close",
541
+ "aria-label": l,
542
+ onClick: o,
543
+ children: "×"
544
+ })
545
+ ]
546
+ });
547
+ }
548
+ export {
549
+ P as A,
550
+ y as B,
551
+ W as C,
552
+ G as D,
553
+ U as E,
554
+ E as F,
555
+ T as G,
556
+ B as H,
557
+ M as I,
558
+ F as L,
559
+ j as M,
560
+ C as N,
561
+ _ as O,
562
+ H as P,
563
+ L as R,
564
+ J as S,
565
+ q as T,
566
+ A as U,
567
+ R as V,
568
+ I as W,
569
+ z as _,
570
+ le as a,
571
+ X as b,
572
+ oe as c,
573
+ ce as d,
574
+ ne as f,
575
+ ee as g,
576
+ ie as h,
577
+ te as i,
578
+ O as j,
579
+ K as k,
580
+ se as l,
581
+ ae as m,
582
+ me as n,
583
+ ge as o,
584
+ re as p,
585
+ be as r,
586
+ ue as s,
587
+ ve as t,
588
+ de as u,
589
+ Z as v,
590
+ V as w,
591
+ Q as x,
592
+ Y as y,
593
+ w as z
594
+ };
package/dist/cn.js ADDED
@@ -0,0 +1,7 @@
1
+ import n from "clsx";
2
+ function t(...r) {
3
+ return n(r);
4
+ }
5
+ export {
6
+ t as cn
7
+ };
@@ -0,0 +1,49 @@
1
+ import { HTMLAttributes, Ref } from 'react';
2
+ type SingleProps = {
3
+ /** Modo: solo un item abierto a la vez. */
4
+ type?: "single" | undefined;
5
+ /** Item abierto (modo controlado). */
6
+ value?: string | null | undefined;
7
+ /** Item inicial abierto (modo no controlado). */
8
+ defaultValue?: string | null | undefined;
9
+ /** Callback al cambiar el item abierto. */
10
+ onValueChange?: ((value: string | null) => void) | undefined;
11
+ /**
12
+ * Si `true`, permite cerrar el único item abierto pulsándolo de nuevo.
13
+ * En `false` (por defecto en single) siempre hay un item abierto.
14
+ */
15
+ collapsible?: boolean | undefined;
16
+ };
17
+ type MultipleProps = {
18
+ /** Modo: cualquier número de items abiertos. */
19
+ type: "multiple";
20
+ /** Items abiertos (modo controlado). */
21
+ value?: string[] | undefined;
22
+ /** Items iniciales abiertos (modo no controlado). */
23
+ defaultValue?: string[] | undefined;
24
+ /** Callback al cambiar la lista de items abiertos. */
25
+ onValueChange?: ((value: string[]) => void) | undefined;
26
+ collapsible?: never;
27
+ };
28
+ export type AccordionProps = (SingleProps | MultipleProps) & Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> & {
29
+ ref?: Ref<HTMLDivElement> | undefined;
30
+ };
31
+ /**
32
+ * Accordion — secciones colapsables.
33
+ *
34
+ * Compón con `AccordionItem` (envuelve `AccordionHeader` y `AccordionContent`).
35
+ * Modo `"single"` (default): un único item abierto a la vez; `collapsible`
36
+ * permite cerrarlo. Modo `"multiple"`: cualquier número.
37
+ *
38
+ * Soporta controlled (`value`+`onValueChange`) y uncontrolled (`defaultValue`).
39
+ *
40
+ * @example
41
+ * <Accordion type="single" defaultValue="a" collapsible>
42
+ * <AccordionItem value="a">
43
+ * <AccordionHeader>Pregunta 1</AccordionHeader>
44
+ * <AccordionContent>Respuesta 1</AccordionContent>
45
+ * </AccordionItem>
46
+ * </Accordion>
47
+ */
48
+ export declare function Accordion(props: AccordionProps): import("react").JSX.Element;
49
+ export {};
@@ -0,0 +1,15 @@
1
+ import { HTMLAttributes, Ref } from 'react';
2
+ export interface AccordionContentProps extends HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * Si `true`, mantiene el panel montado en el DOM aunque esté cerrado
5
+ * (útil para preservar estado o accesibilidad asistida).
6
+ * Por defecto el panel se desmonta cuando está cerrado.
7
+ */
8
+ forceMount?: boolean | undefined;
9
+ ref?: Ref<HTMLDivElement> | undefined;
10
+ }
11
+ /**
12
+ * AccordionContent — panel desplegable asociado a un AccordionItem.
13
+ * Tiene `role="region"` y `aria-labelledby` apuntando al header.
14
+ */
15
+ export declare function AccordionContent({ className, children, forceMount, hidden, ref, ...rest }: AccordionContentProps): import("react").JSX.Element | null;