@spark-ui/components 10.22.1 → 11.0.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 (143) hide show
  1. package/package.json +5 -5
  2. package/dist/DialogTrigger-woU7vsJi.d.ts +0 -142
  3. package/dist/Input-N8AWWSmt.d.ts +0 -41
  4. package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +0 -20
  5. package/dist/LabelRequiredIndicator-DRnCzHMU.d.ts +0 -19
  6. package/dist/accordion/index.d.ts +0 -73
  7. package/dist/accordion/index.js +0 -325
  8. package/dist/accordion/index.js.map +0 -1
  9. package/dist/alert-dialog/index.d.ts +0 -119
  10. package/dist/alert-dialog/index.js +0 -1554
  11. package/dist/alert-dialog/index.js.map +0 -1
  12. package/dist/avatar/index.d.ts +0 -66
  13. package/dist/avatar/index.js +0 -1303
  14. package/dist/avatar/index.js.map +0 -1
  15. package/dist/badge/index.d.ts +0 -47
  16. package/dist/badge/index.js +0 -122
  17. package/dist/badge/index.js.map +0 -1
  18. package/dist/breadcrumb/index.d.ts +0 -64
  19. package/dist/breadcrumb/index.js +0 -327
  20. package/dist/breadcrumb/index.js.map +0 -1
  21. package/dist/button/index.d.ts +0 -41
  22. package/dist/button/index.js +0 -935
  23. package/dist/button/index.js.map +0 -1
  24. package/dist/card/index.d.ts +0 -61
  25. package/dist/card/index.js +0 -502
  26. package/dist/card/index.js.map +0 -1
  27. package/dist/carousel/index.d.ts +0 -261
  28. package/dist/carousel/index.js +0 -1801
  29. package/dist/carousel/index.js.map +0 -1
  30. package/dist/checkbox/index.d.ts +0 -120
  31. package/dist/checkbox/index.js +0 -511
  32. package/dist/checkbox/index.js.map +0 -1
  33. package/dist/chip/index.d.ts +0 -97
  34. package/dist/chip/index.js +0 -908
  35. package/dist/chip/index.js.map +0 -1
  36. package/dist/collapsible/index.d.ts +0 -43
  37. package/dist/collapsible/index.js +0 -109
  38. package/dist/collapsible/index.js.map +0 -1
  39. package/dist/combobox/index.d.ts +0 -287
  40. package/dist/combobox/index.js +0 -2588
  41. package/dist/combobox/index.js.map +0 -1
  42. package/dist/dialog/index.d.ts +0 -33
  43. package/dist/dialog/index.js +0 -1389
  44. package/dist/dialog/index.js.map +0 -1
  45. package/dist/divider/index.d.ts +0 -61
  46. package/dist/divider/index.js +0 -224
  47. package/dist/divider/index.js.map +0 -1
  48. package/dist/drawer/index.d.ts +0 -152
  49. package/dist/drawer/index.js +0 -1400
  50. package/dist/drawer/index.js.map +0 -1
  51. package/dist/dropdown/index.d.ts +0 -233
  52. package/dist/dropdown/index.js +0 -2051
  53. package/dist/dropdown/index.js.map +0 -1
  54. package/dist/form-field/index.d.ts +0 -186
  55. package/dist/form-field/index.js +0 -553
  56. package/dist/form-field/index.js.map +0 -1
  57. package/dist/icon/index.d.ts +0 -28
  58. package/dist/icon/index.js +0 -127
  59. package/dist/icon/index.js.map +0 -1
  60. package/dist/icon-button/index.d.ts +0 -16
  61. package/dist/icon-button/index.js +0 -980
  62. package/dist/icon-button/index.js.map +0 -1
  63. package/dist/input/index.d.ts +0 -78
  64. package/dist/input/index.js +0 -724
  65. package/dist/input/index.js.map +0 -1
  66. package/dist/kbd/index.d.ts +0 -9
  67. package/dist/kbd/index.js +0 -47
  68. package/dist/kbd/index.js.map +0 -1
  69. package/dist/label/index.d.ts +0 -11
  70. package/dist/label/index.js +0 -78
  71. package/dist/label/index.js.map +0 -1
  72. package/dist/link-box/index.d.ts +0 -34
  73. package/dist/link-box/index.js +0 -92
  74. package/dist/link-box/index.js.map +0 -1
  75. package/dist/pagination/index.d.ts +0 -143
  76. package/dist/pagination/index.js +0 -1353
  77. package/dist/pagination/index.js.map +0 -1
  78. package/dist/popover/index.d.ts +0 -93
  79. package/dist/popover/index.js +0 -1339
  80. package/dist/popover/index.js.map +0 -1
  81. package/dist/portal/index.d.ts +0 -13
  82. package/dist/portal/index.js +0 -37
  83. package/dist/portal/index.js.map +0 -1
  84. package/dist/progress/index.d.ts +0 -48
  85. package/dist/progress/index.js +0 -223
  86. package/dist/progress/index.js.map +0 -1
  87. package/dist/progress-tracker/index.d.ts +0 -80
  88. package/dist/progress-tracker/index.js +0 -571
  89. package/dist/progress-tracker/index.js.map +0 -1
  90. package/dist/radio-group/index.d.ts +0 -100
  91. package/dist/radio-group/index.js +0 -318
  92. package/dist/radio-group/index.js.map +0 -1
  93. package/dist/rating/index.d.ts +0 -78
  94. package/dist/rating/index.js +0 -363
  95. package/dist/rating/index.js.map +0 -1
  96. package/dist/scrolling-list/index.d.ts +0 -118
  97. package/dist/scrolling-list/index.js +0 -1426
  98. package/dist/scrolling-list/index.js.map +0 -1
  99. package/dist/segmented-gauge/index.d.ts +0 -100
  100. package/dist/segmented-gauge/index.js +0 -277
  101. package/dist/segmented-gauge/index.js.map +0 -1
  102. package/dist/select/index.d.ts +0 -167
  103. package/dist/select/index.js +0 -581
  104. package/dist/select/index.js.map +0 -1
  105. package/dist/skeleton/index.d.ts +0 -67
  106. package/dist/skeleton/index.js +0 -206
  107. package/dist/skeleton/index.js.map +0 -1
  108. package/dist/slider/index.d.ts +0 -97
  109. package/dist/slider/index.js +0 -220
  110. package/dist/slider/index.js.map +0 -1
  111. package/dist/slot/index.d.ts +0 -16
  112. package/dist/slot/index.js +0 -51
  113. package/dist/slot/index.js.map +0 -1
  114. package/dist/snackbar/index.d.ts +0 -158
  115. package/dist/snackbar/index.js +0 -1756
  116. package/dist/snackbar/index.js.map +0 -1
  117. package/dist/spinner/index.d.ts +0 -21
  118. package/dist/spinner/index.js +0 -139
  119. package/dist/spinner/index.js.map +0 -1
  120. package/dist/stepper/index.d.ts +0 -81
  121. package/dist/stepper/index.js +0 -1847
  122. package/dist/stepper/index.js.map +0 -1
  123. package/dist/switch/index.d.ts +0 -64
  124. package/dist/switch/index.js +0 -327
  125. package/dist/switch/index.js.map +0 -1
  126. package/dist/tabs/index.d.ts +0 -103
  127. package/dist/tabs/index.js +0 -1376
  128. package/dist/tabs/index.js.map +0 -1
  129. package/dist/tag/index.d.ts +0 -29
  130. package/dist/tag/index.js +0 -283
  131. package/dist/tag/index.js.map +0 -1
  132. package/dist/text-link/index.d.ts +0 -20
  133. package/dist/text-link/index.js +0 -100
  134. package/dist/text-link/index.js.map +0 -1
  135. package/dist/textarea/index.d.ts +0 -57
  136. package/dist/textarea/index.js +0 -797
  137. package/dist/textarea/index.js.map +0 -1
  138. package/dist/toast/index.d.ts +0 -56
  139. package/dist/toast/index.js +0 -1412
  140. package/dist/toast/index.js.map +0 -1
  141. package/dist/visually-hidden/index.d.ts +0 -16
  142. package/dist/visually-hidden/index.js +0 -67
  143. package/dist/visually-hidden/index.js.map +0 -1
@@ -1,327 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/breadcrumb/index.ts
21
- var breadcrumb_exports = {};
22
- __export(breadcrumb_exports, {
23
- Breadcrumb: () => Breadcrumb2
24
- });
25
- module.exports = __toCommonJS(breadcrumb_exports);
26
-
27
- // src/breadcrumb/Breadcrumb.tsx
28
- var import_class_variance_authority = require("class-variance-authority");
29
- var import_jsx_runtime = require("react/jsx-runtime");
30
- var Breadcrumb = ({
31
- className,
32
- "aria-label": ariaLabel,
33
- ref,
34
- ...rest
35
- }) => {
36
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
37
- "nav",
38
- {
39
- "data-spark-component": "breadcrumb",
40
- ref,
41
- "aria-label": ariaLabel,
42
- className: (0, import_class_variance_authority.cx)("text-caption text-neutral", className),
43
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { className: (0, import_class_variance_authority.cx)("gap-sm flex flex-wrap items-center break-words"), ...rest })
44
- }
45
- );
46
- };
47
- Breadcrumb.displayName = "Breadcrumb.Breadcrumb";
48
-
49
- // src/breadcrumb/BreadcrumbCurrentPage.tsx
50
- var import_class_variance_authority2 = require("class-variance-authority");
51
-
52
- // src/slot/Slot.tsx
53
- var import_radix_ui = require("radix-ui");
54
- var import_react = require("react");
55
- var import_jsx_runtime2 = require("react/jsx-runtime");
56
- var Slottable = import_radix_ui.Slot.Slottable;
57
- var Slot = ({ ref, ...props }) => {
58
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_radix_ui.Slot.Root, { ref, ...props });
59
- };
60
-
61
- // src/breadcrumb/BreadcrumbCurrentPage.tsx
62
- var import_jsx_runtime3 = require("react/jsx-runtime");
63
- var CurrentPage = ({
64
- asChild = false,
65
- className,
66
- children,
67
- ...rest
68
- }) => {
69
- const Component = asChild ? Slot : "span";
70
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
71
- Component,
72
- {
73
- "data-spark-component": "breadcrumb-current-page",
74
- role: "link",
75
- "aria-disabled": true,
76
- "aria-current": "page",
77
- className: (0, import_class_variance_authority2.cx)(
78
- "inline! overflow-hidden font-bold text-ellipsis whitespace-nowrap text-current",
79
- className
80
- ),
81
- ...rest,
82
- children
83
- }
84
- );
85
- };
86
- CurrentPage.displayName = "Breadcrumb.CurrentPage";
87
-
88
- // src/breadcrumb/BreadcrumbItem.tsx
89
- var import_class_variance_authority3 = require("class-variance-authority");
90
- var import_jsx_runtime4 = require("react/jsx-runtime");
91
- var Item = ({ className, ...rest }) => {
92
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
93
- "li",
94
- {
95
- "data-spark-component": "breadcrumb-item",
96
- className: (0, import_class_variance_authority3.cx)("min-w-none gap-sm inline-flex items-center", className),
97
- ...rest
98
- }
99
- );
100
- };
101
- Item.displayName = "Breadcrumb.Item";
102
-
103
- // src/breadcrumb/BreadcrumbLink.tsx
104
- var import_class_variance_authority5 = require("class-variance-authority");
105
-
106
- // src/text-link/TextLink.tsx
107
- var import_class_variance_authority4 = require("class-variance-authority");
108
- var import_jsx_runtime5 = require("react/jsx-runtime");
109
- var textLinkStyles = (0, import_class_variance_authority4.cva)(["inline-flex items-center focus-visible:u-outline"], {
110
- variants: {
111
- intent: {
112
- current: "text-current hover:opacity-dim-1",
113
- main: "text-main hover:text-main-hovered",
114
- support: "text-support hover:text-support-hovered",
115
- accent: "text-accent hover:text-accent-hovered",
116
- basic: "text-basic hover:text-basic-hovered",
117
- success: "text-success hover:text-success-hovered",
118
- alert: "text-alert hover:text-alert-hovered",
119
- danger: "text-error hover:text-error-hovered",
120
- info: "text-info hover:text-info-hovered",
121
- neutral: "text-neutral hover:text-neutral-hovered"
122
- },
123
- /** By default, TextLink inherits the current font weight. Use `bold` to highlight it. */
124
- bold: {
125
- true: "font-bold"
126
- },
127
- /**
128
- * Underline is enabled by default.
129
- * You can remove it, but be careful about a11y, as you should make obvious to users what is a link or not.
130
- */
131
- underline: {
132
- true: "underline",
133
- false: "hover:underline focus:underline"
134
- }
135
- },
136
- defaultVariants: {
137
- intent: "current",
138
- bold: false,
139
- underline: true
140
- }
141
- });
142
- var TextLink = ({
143
- asChild = false,
144
- bold = false,
145
- children,
146
- className,
147
- intent = "current",
148
- underline = true,
149
- ref,
150
- ...props
151
- }) => {
152
- const Component = asChild ? Slot : "a";
153
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
154
- Component,
155
- {
156
- "data-spark-component": "text-link",
157
- ref,
158
- className: textLinkStyles({ className, bold, intent, underline }),
159
- ...props,
160
- children
161
- }
162
- );
163
- };
164
-
165
- // src/breadcrumb/BreadcrumbLink.tsx
166
- var import_jsx_runtime6 = require("react/jsx-runtime");
167
- var Link = ({
168
- asChild = false,
169
- className,
170
- bold = true,
171
- intent = "current",
172
- underline = true,
173
- href,
174
- ref,
175
- ...rest
176
- }) => {
177
- const Component = asChild ? Slot : TextLink;
178
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
179
- Component,
180
- {
181
- "data-spark-component": "breadcrumb-link",
182
- href,
183
- ref,
184
- className: (0, import_class_variance_authority5.cx)("inline! overflow-hidden text-ellipsis whitespace-nowrap", className),
185
- bold,
186
- intent,
187
- underline,
188
- ...rest
189
- }
190
- );
191
- };
192
- Link.displayName = "Breadcrumb.Link";
193
-
194
- // src/breadcrumb/BreadcrumbSeparator.tsx
195
- var import_ArrowVerticalRight = require("@spark-ui/icons/ArrowVerticalRight");
196
- var import_class_variance_authority7 = require("class-variance-authority");
197
-
198
- // src/icon/Icon.tsx
199
- var import_react2 = require("react");
200
-
201
- // src/visually-hidden/VisuallyHidden.tsx
202
- var import_jsx_runtime7 = require("react/jsx-runtime");
203
- var VisuallyHidden = ({ asChild = false, ref, ...props }) => {
204
- const Component = asChild ? Slot : "span";
205
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
206
- Component,
207
- {
208
- ...props,
209
- ref,
210
- style: {
211
- // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
212
- position: "absolute",
213
- border: 0,
214
- width: 1,
215
- height: 1,
216
- padding: 0,
217
- margin: -1,
218
- overflow: "hidden",
219
- clip: "rect(0, 0, 0, 0)",
220
- whiteSpace: "nowrap",
221
- wordWrap: "normal",
222
- ...props.style
223
- }
224
- }
225
- );
226
- };
227
- VisuallyHidden.displayName = "VisuallyHidden";
228
-
229
- // src/icon/Icon.styles.tsx
230
- var import_internal_utils = require("@spark-ui/internal-utils");
231
- var import_class_variance_authority6 = require("class-variance-authority");
232
- var iconStyles = (0, import_class_variance_authority6.cva)(["fill-current shrink-0"], {
233
- variants: {
234
- /**
235
- * Color scheme of the icon.
236
- */
237
- intent: (0, import_internal_utils.makeVariants)({
238
- current: ["text-current"],
239
- main: ["text-main"],
240
- support: ["text-support"],
241
- accent: ["text-accent"],
242
- basic: ["text-basic"],
243
- success: ["text-success"],
244
- alert: ["text-alert"],
245
- error: ["text-error"],
246
- info: ["text-info"],
247
- neutral: ["text-neutral"]
248
- }),
249
- /**
250
- * Sets the size of the icon.
251
- */
252
- size: (0, import_internal_utils.makeVariants)({
253
- current: ["u-current-font-size"],
254
- sm: ["w-sz-16", "h-sz-16"],
255
- md: ["w-sz-24", "h-sz-24"],
256
- lg: ["w-sz-32", "h-sz-32"],
257
- xl: ["w-sz-40", "h-sz-40"]
258
- })
259
- }
260
- });
261
-
262
- // src/icon/Icon.tsx
263
- var import_jsx_runtime8 = require("react/jsx-runtime");
264
- var Icon = ({
265
- label,
266
- className,
267
- size = "current",
268
- intent = "current",
269
- children,
270
- ...others
271
- }) => {
272
- const child = import_react2.Children.only(children);
273
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
274
- (0, import_react2.cloneElement)(child, {
275
- className: iconStyles({ className, size, intent }),
276
- "data-spark-component": "icon",
277
- "aria-hidden": "true",
278
- focusable: "false",
279
- ...others
280
- }),
281
- label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(VisuallyHidden, { children: label })
282
- ] });
283
- };
284
- Icon.displayName = "Icon";
285
-
286
- // src/breadcrumb/BreadcrumbSeparator.tsx
287
- var import_jsx_runtime9 = require("react/jsx-runtime");
288
- var Separator = ({
289
- asChild = false,
290
- className,
291
- children,
292
- ref,
293
- ...rest
294
- }) => {
295
- const Component = asChild ? Slot : "li";
296
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
297
- Component,
298
- {
299
- role: "presentation",
300
- "aria-hidden": true,
301
- "data-spark-component": "breadcrumb-separator",
302
- ref,
303
- className: (0, import_class_variance_authority7.cx)("gap-sm inline-flex items-center", className),
304
- ...rest,
305
- children: children ?? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ArrowVerticalRight.ArrowVerticalRight, {}) })
306
- }
307
- );
308
- };
309
- Separator.displayName = "Breadcrumb.Separator";
310
-
311
- // src/breadcrumb/index.ts
312
- var Breadcrumb2 = Object.assign(Breadcrumb, {
313
- Item,
314
- Link,
315
- CurrentPage,
316
- Separator
317
- });
318
- Breadcrumb2.displayName = "Breadcrumb";
319
- Item.displayName = "Breadcrumb.Item";
320
- Link.displayName = "Breadcrumb.Link";
321
- CurrentPage.displayName = "Breadcrumb.CurrentPage";
322
- Separator.displayName = "Breadcrumb.Separator";
323
- // Annotate the CommonJS export names for ESM import in node:
324
- 0 && (module.exports = {
325
- Breadcrumb
326
- });
327
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/breadcrumb/index.ts","../../src/breadcrumb/Breadcrumb.tsx","../../src/breadcrumb/BreadcrumbCurrentPage.tsx","../../src/slot/Slot.tsx","../../src/breadcrumb/BreadcrumbItem.tsx","../../src/breadcrumb/BreadcrumbLink.tsx","../../src/text-link/TextLink.tsx","../../src/breadcrumb/BreadcrumbSeparator.tsx","../../src/icon/Icon.tsx","../../src/visually-hidden/VisuallyHidden.tsx","../../src/icon/Icon.styles.tsx"],"sourcesContent":["import { Breadcrumb as Root } from './Breadcrumb'\nimport { CurrentPage } from './BreadcrumbCurrentPage'\nimport { Item } from './BreadcrumbItem'\nimport { Link } from './BreadcrumbLink'\nimport { Separator } from './BreadcrumbSeparator'\n\nexport const Breadcrumb: typeof Root & {\n Item: typeof Item\n Link: typeof Link\n CurrentPage: typeof CurrentPage\n Separator: typeof Separator\n} = Object.assign(Root, {\n Item,\n Link,\n CurrentPage,\n Separator,\n})\n\nBreadcrumb.displayName = 'Breadcrumb'\nItem.displayName = 'Breadcrumb.Item'\nLink.displayName = 'Breadcrumb.Link'\nCurrentPage.displayName = 'Breadcrumb.CurrentPage'\nSeparator.displayName = 'Breadcrumb.Separator'\n\nexport type { BreadcrumbProps } from './Breadcrumb'\n","import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nexport interface BreadcrumbProps extends ComponentPropsWithoutRef<'nav'> {\n className?: string\n ['aria-label']: string\n ref?: Ref<HTMLElement>\n}\n\nexport const Breadcrumb = ({\n className,\n 'aria-label': ariaLabel,\n ref,\n ...rest\n}: BreadcrumbProps) => {\n return (\n <nav\n data-spark-component=\"breadcrumb\"\n ref={ref}\n aria-label={ariaLabel}\n className={cx('text-caption text-neutral', className)}\n >\n <ol className={cx('gap-sm flex flex-wrap items-center break-words')} {...rest} />\n </nav>\n )\n}\n\nBreadcrumb.displayName = 'Breadcrumb.Breadcrumb'\n","import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Slot } from '../slot'\nimport { TextLink } from '../text-link'\n\nexport interface CurrentPageProps extends ComponentPropsWithoutRef<typeof TextLink> {\n asChild?: boolean\n className?: string\n ref?: Ref<HTMLAnchorElement>\n}\n\nexport const CurrentPage = ({\n asChild = false,\n className,\n children,\n ...rest\n}: CurrentPageProps) => {\n const Component = asChild ? Slot : 'span'\n\n return (\n <Component\n data-spark-component=\"breadcrumb-current-page\"\n role=\"link\"\n aria-disabled\n aria-current=\"page\"\n className={cx(\n 'inline! overflow-hidden font-bold text-ellipsis whitespace-nowrap text-current',\n className\n )}\n {...rest}\n >\n {children}\n </Component>\n )\n}\n\nCurrentPage.displayName = 'Breadcrumb.CurrentPage'\n","import { Slot as RadixSlot } from 'radix-ui'\nimport {\n cloneElement,\n HTMLAttributes,\n isValidElement,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react'\n\nexport const Slottable: typeof RadixSlot.Slottable = RadixSlot.Slottable\n\nexport type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n ref?: Ref<HTMLElement>\n}\n\nexport const Slot = ({ ref, ...props }: SlotProps) => {\n return <RadixSlot.Root ref={ref} {...props} />\n}\n\n/**\n * When using Radix `Slot` component, it will consider its first child to merge its props with.\n * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour.\n */\nexport const wrapPolymorphicSlot = (\n asChild: boolean | undefined,\n children: ReactNode,\n callback: (children: ReactNode) => ReactNode\n) => {\n if (!asChild) return callback(children) // If polymorphic behaviour is not used, we keep the original children\n\n return isValidElement(children)\n ? cloneElement(\n children,\n undefined,\n callback((children.props as { children: ReactNode }).children)\n )\n : null\n}\n","import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nexport interface ItemProps extends ComponentPropsWithoutRef<'li'> {\n className?: string\n ref?: Ref<HTMLLIElement>\n}\n\nexport const Item = ({ className, ...rest }: ItemProps) => {\n return (\n <li\n data-spark-component=\"breadcrumb-item\"\n className={cx('min-w-none gap-sm inline-flex items-center', className)}\n {...rest}\n />\n )\n}\n\nItem.displayName = 'Breadcrumb.Item'\n","import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Slot } from '../slot'\nimport { TextLink } from '../text-link'\n\nexport interface LinkProps extends ComponentPropsWithoutRef<typeof TextLink> {\n asChild?: boolean\n className?: string\n href?: string\n ref?: Ref<HTMLAnchorElement>\n}\n\nexport const Link = ({\n asChild = false,\n className,\n bold = true,\n intent = 'current',\n underline = true,\n href,\n ref,\n ...rest\n}: LinkProps) => {\n const Component = asChild ? Slot : TextLink\n\n return (\n <Component\n data-spark-component=\"breadcrumb-link\"\n href={href}\n ref={ref}\n className={cx('inline! overflow-hidden text-ellipsis whitespace-nowrap', className)}\n bold={bold}\n intent={intent}\n underline={underline}\n {...rest}\n />\n )\n}\n\nLink.displayName = 'Breadcrumb.Link'\n","import { cva, VariantProps } from 'class-variance-authority'\nimport { type ComponentPropsWithRef } from 'react'\n\nimport { Slot } from '../slot'\n\nconst textLinkStyles = cva(['inline-flex items-center focus-visible:u-outline'], {\n variants: {\n intent: {\n current: 'text-current hover:opacity-dim-1',\n main: 'text-main hover:text-main-hovered',\n support: 'text-support hover:text-support-hovered',\n accent: 'text-accent hover:text-accent-hovered',\n basic: 'text-basic hover:text-basic-hovered',\n success: 'text-success hover:text-success-hovered',\n alert: 'text-alert hover:text-alert-hovered',\n danger: 'text-error hover:text-error-hovered',\n info: 'text-info hover:text-info-hovered',\n neutral: 'text-neutral hover:text-neutral-hovered',\n },\n /** By default, TextLink inherits the current font weight. Use `bold` to highlight it. */\n bold: {\n true: 'font-bold',\n },\n /**\n * Underline is enabled by default.\n * You can remove it, but be careful about a11y, as you should make obvious to users what is a link or not.\n */\n underline: {\n true: 'underline',\n false: 'hover:underline focus:underline',\n },\n },\n defaultVariants: {\n intent: 'current',\n bold: false,\n underline: true,\n },\n})\n\nexport type StylesProps = VariantProps<typeof textLinkStyles>\n\nexport type TextLinkProps = ComponentPropsWithRef<'a'> &\n StylesProps & {\n /**\n * Change the component to the HTML tag or custom component of the only child.\n */\n asChild?: boolean\n }\n\nexport const TextLink = ({\n asChild = false,\n bold = false,\n children,\n className,\n intent = 'current',\n underline = true,\n ref,\n ...props\n}: TextLinkProps) => {\n const Component = asChild ? Slot : 'a'\n\n return (\n <Component\n data-spark-component=\"text-link\"\n ref={ref}\n className={textLinkStyles({ className, bold, intent, underline })}\n {...props}\n >\n {children}\n </Component>\n )\n}\n","import { ArrowVerticalRight } from '@spark-ui/icons/ArrowVerticalRight'\nimport { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { Slot } from '../slot'\n\nexport interface SeparatorProps extends ComponentPropsWithoutRef<'li'> {\n asChild?: boolean\n className?: string\n ref?: Ref<HTMLLIElement>\n}\n\nexport const Separator = ({\n asChild = false,\n className,\n children,\n ref,\n ...rest\n}: SeparatorProps) => {\n const Component = asChild ? Slot : 'li'\n\n return (\n <Component\n role=\"presentation\"\n aria-hidden\n data-spark-component=\"breadcrumb-separator\"\n ref={ref}\n className={cx('gap-sm inline-flex items-center', className)}\n {...rest}\n >\n {children ?? (\n <Icon>\n <ArrowVerticalRight />\n </Icon>\n )}\n </Component>\n )\n}\n\nSeparator.displayName = 'Breadcrumb.Separator'\n","import { Children, cloneElement, ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { iconStyles, IconVariantsProps } from './Icon.styles'\n\nexport interface IconProps extends IconVariantsProps, ComponentPropsWithoutRef<'svg'> {\n /**\n * The svg icon that will be wrapped\n */\n children: ReactNode\n /**\n * The accessible label for the icon. This label will be visually hidden but announced to screen\n * reader users, similar to `alt` text for `img` tags.\n */\n label?: string\n}\n\nexport const Icon = ({\n label,\n className,\n size = 'current',\n intent = 'current',\n children,\n ...others\n}: IconProps) => {\n const child = Children.only(children)\n\n return (\n <>\n {cloneElement(child as ReactElement<Record<string, any>>, {\n className: iconStyles({ className, size, intent }),\n 'data-spark-component': 'icon',\n 'aria-hidden': 'true',\n focusable: 'false',\n ...others,\n })}\n\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </>\n )\n}\n\nIcon.displayName = 'Icon'\n","import { HTMLAttributes, PropsWithChildren, Ref } from 'react'\n\nimport { Slot } from '../slot'\n\nexport type VisuallyHiddenProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLElement>\n}\n\nexport const VisuallyHidden = ({ asChild = false, ref, ...props }: VisuallyHiddenProps) => {\n const Component = asChild ? Slot : 'span'\n\n return (\n <Component\n {...props}\n ref={ref}\n style={{\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: 'absolute',\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n ...props.style,\n }}\n />\n )\n}\n\nVisuallyHidden.displayName = 'VisuallyHidden'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const iconStyles = cva(['fill-current shrink-0'], {\n variants: {\n /**\n * Color scheme of the icon.\n */\n intent: makeVariants<\n 'intent',\n [\n 'current',\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'error',\n 'info',\n 'neutral',\n ]\n >({\n current: ['text-current'],\n main: ['text-main'],\n support: ['text-support'],\n accent: ['text-accent'],\n basic: ['text-basic'],\n success: ['text-success'],\n alert: ['text-alert'],\n error: ['text-error'],\n info: ['text-info'],\n neutral: ['text-neutral'],\n }),\n /**\n * Sets the size of the icon.\n */\n size: makeVariants<'size', ['current', 'sm', 'md', 'lg', 'xl']>({\n current: ['u-current-font-size'],\n sm: ['w-sz-16', 'h-sz-16'],\n md: ['w-sz-24', 'h-sz-24'],\n lg: ['w-sz-32', 'h-sz-32'],\n xl: ['w-sz-40', 'h-sz-40'],\n }),\n },\n})\n\nexport type IconVariantsProps = VariantProps<typeof iconStyles>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAAAA;AAAA;AAAA;;;ACAA,sCAAmB;AAsBb;AAbC,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA,GAAG;AACL,MAAuB;AACrB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,wBAAqB;AAAA,MACrB;AAAA,MACA,cAAY;AAAA,MACZ,eAAW,oCAAG,6BAA6B,SAAS;AAAA,MAEpD,sDAAC,QAAG,eAAW,oCAAG,gDAAgD,GAAI,GAAG,MAAM;AAAA;AAAA,EACjF;AAEJ;AAEA,WAAW,cAAc;;;AC3BzB,IAAAC,mCAAmB;;;ACAnB,sBAAkC;AAClC,mBAOO;AASE,IAAAC,sBAAA;AAPF,IAAM,YAAwC,gBAAAC,KAAU;AAMxD,IAAM,OAAO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AAA,IACL,CAAC;AAAA,IAEA,SAAS,6CAAC,kBAAgB,iBAAM;AAAA,KACnC;AAEJ;AAEA,KAAK,cAAc;;;ADTT,IAAAC,sBAAA;AApBH,IAAM,YAAY,CAAC;AAAA,EACxB,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAsB;AACpB,QAAM,YAAY,UAAU,OAAO;AAEnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,eAAW;AAAA,MACX,wBAAqB;AAAA,MACrB;AAAA,MACA,eAAW,qCAAG,mCAAmC,SAAS;AAAA,MACzD,GAAG;AAAA,MAEH,sBACC,6CAAC,QACC,uDAAC,gDAAmB,GACtB;AAAA;AAAA,EAEJ;AAEJ;AAEA,UAAU,cAAc;;;APlCjB,IAAMC,cAKT,OAAO,OAAO,YAAM;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEDA,YAAW,cAAc;AACzB,KAAK,cAAc;AACnB,KAAK,cAAc;AACnB,YAAY,cAAc;AAC1B,UAAU,cAAc;","names":["Breadcrumb","import_class_variance_authority","import_jsx_runtime","RadixSlot","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_class_variance_authority","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","import_class_variance_authority","import_react","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","Breadcrumb"]}
@@ -1,41 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ComponentPropsWithoutRef, Ref } from 'react';
3
- import * as class_variance_authority_types from 'class-variance-authority/types';
4
- import { VariantProps } from 'class-variance-authority';
5
-
6
- declare const buttonStyles: (props?: ({
7
- design?: "filled" | "ghost" | "outlined" | "tinted" | "contrast" | null | undefined;
8
- underline?: boolean | null | undefined;
9
- intent?: "main" | "alert" | "support" | "accent" | "basic" | "success" | "info" | "neutral" | "danger" | "surface" | "surfaceInverse" | null | undefined;
10
- size?: "sm" | "md" | "lg" | null | undefined;
11
- shape?: "square" | "rounded" | "pill" | null | undefined;
12
- disabled?: boolean | null | undefined;
13
- } & class_variance_authority_types.ClassProp) | undefined) => string;
14
- type ButtonStylesProps = VariantProps<typeof buttonStyles>;
15
-
16
- interface ButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'disabled'>, ButtonStylesProps {
17
- /**
18
- * Change the component to the HTML tag or custom component of the only child.
19
- */
20
- asChild?: boolean;
21
- /**
22
- * Display a spinner to indicate to the user that the button is loading something after they interacted with it.
23
- */
24
- isLoading?: boolean;
25
- /**
26
- * If your loading state should only display a spinner, it's better to specify a label for it (a11y).
27
- */
28
- loadingLabel?: string;
29
- /**
30
- * If your loading state should also display a label, you can use this prop instead of `loadingLabel`.
31
- * **Please note that using this can result in layout shifting when the Button goes from loading state to normal state.**
32
- */
33
- loadingText?: string;
34
- ref?: Ref<HTMLButtonElement>;
35
- }
36
- declare const Button: {
37
- ({ children, design, disabled, intent, isLoading, loadingLabel, loadingText, shape, size, asChild, className, underline, ref, ...others }: ButtonProps): react_jsx_runtime.JSX.Element;
38
- displayName: string;
39
- };
40
-
41
- export { Button, type ButtonProps };