@spark-ui/components 10.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.
- package/CHANGELOG.md +15 -0
- package/LICENSE.md +21 -0
- package/README.md +19 -0
- package/dist/DialogTrigger-5SI4dvpK.d.mts +142 -0
- package/dist/DialogTrigger-5SI4dvpK.d.ts +142 -0
- package/dist/Input-g0LpWuv0.d.mts +17 -0
- package/dist/Input-g0LpWuv0.d.ts +17 -0
- package/dist/InputGroup-aoaZxCLk.d.mts +28 -0
- package/dist/InputGroup-aoaZxCLk.d.ts +28 -0
- package/dist/InputTrailingIcon-BBp7sE6D.d.mts +20 -0
- package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +20 -0
- package/dist/LabelRequiredIndicator-DRnCzHMU.d.mts +19 -0
- package/dist/LabelRequiredIndicator-DRnCzHMU.d.ts +19 -0
- package/dist/accordion/index.d.mts +85 -0
- package/dist/accordion/index.d.ts +85 -0
- package/dist/accordion/index.js +461 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/accordion/index.mjs +249 -0
- package/dist/accordion/index.mjs.map +1 -0
- package/dist/alert-dialog/index.d.mts +119 -0
- package/dist/alert-dialog/index.d.ts +119 -0
- package/dist/alert-dialog/index.js +1451 -0
- package/dist/alert-dialog/index.js.map +1 -0
- package/dist/alert-dialog/index.mjs +177 -0
- package/dist/alert-dialog/index.mjs.map +1 -0
- package/dist/badge/index.d.mts +47 -0
- package/dist/badge/index.d.ts +47 -0
- package/dist/badge/index.js +122 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/badge/index.mjs +95 -0
- package/dist/badge/index.mjs.map +1 -0
- package/dist/breadcrumb/index.d.mts +64 -0
- package/dist/breadcrumb/index.d.ts +64 -0
- package/dist/breadcrumb/index.js +326 -0
- package/dist/breadcrumb/index.js.map +1 -0
- package/dist/breadcrumb/index.mjs +149 -0
- package/dist/breadcrumb/index.mjs.map +1 -0
- package/dist/button/index.d.mts +40 -0
- package/dist/button/index.d.ts +40 -0
- package/dist/button/index.js +877 -0
- package/dist/button/index.js.map +1 -0
- package/dist/button/index.mjs +10 -0
- package/dist/button/index.mjs.map +1 -0
- package/dist/carousel/index.d.mts +253 -0
- package/dist/carousel/index.d.ts +253 -0
- package/dist/carousel/index.js +1678 -0
- package/dist/carousel/index.js.map +1 -0
- package/dist/carousel/index.mjs +716 -0
- package/dist/carousel/index.mjs.map +1 -0
- package/dist/checkbox/index.d.mts +120 -0
- package/dist/checkbox/index.d.ts +120 -0
- package/dist/checkbox/index.js +873 -0
- package/dist/checkbox/index.js.map +1 -0
- package/dist/checkbox/index.mjs +349 -0
- package/dist/checkbox/index.mjs.map +1 -0
- package/dist/chip/index.d.mts +97 -0
- package/dist/chip/index.d.ts +97 -0
- package/dist/chip/index.js +905 -0
- package/dist/chip/index.js.map +1 -0
- package/dist/chip/index.mjs +793 -0
- package/dist/chip/index.mjs.map +1 -0
- package/dist/chunk-2KPFQEAA.mjs +52 -0
- package/dist/chunk-2KPFQEAA.mjs.map +1 -0
- package/dist/chunk-4F5DOL57.mjs +26 -0
- package/dist/chunk-4F5DOL57.mjs.map +1 -0
- package/dist/chunk-6JOA37TZ.mjs +742 -0
- package/dist/chunk-6JOA37TZ.mjs.map +1 -0
- package/dist/chunk-7PMPYEHJ.mjs +379 -0
- package/dist/chunk-7PMPYEHJ.mjs.map +1 -0
- package/dist/chunk-AESXFMCC.mjs +68 -0
- package/dist/chunk-AESXFMCC.mjs.map +1 -0
- package/dist/chunk-B42LOFIZ.mjs +308 -0
- package/dist/chunk-B42LOFIZ.mjs.map +1 -0
- package/dist/chunk-FGOZHKBT.mjs +97 -0
- package/dist/chunk-FGOZHKBT.mjs.map +1 -0
- package/dist/chunk-HLXYG643.mjs +52 -0
- package/dist/chunk-HLXYG643.mjs.map +1 -0
- package/dist/chunk-JKNBJHD5.mjs +601 -0
- package/dist/chunk-JKNBJHD5.mjs.map +1 -0
- package/dist/chunk-K7VP7DH3.mjs +66 -0
- package/dist/chunk-K7VP7DH3.mjs.map +1 -0
- package/dist/chunk-MUNDKRAE.mjs +80 -0
- package/dist/chunk-MUNDKRAE.mjs.map +1 -0
- package/dist/chunk-NBZKMCHF.mjs +36 -0
- package/dist/chunk-NBZKMCHF.mjs.map +1 -0
- package/dist/chunk-PZWESKAR.mjs +314 -0
- package/dist/chunk-PZWESKAR.mjs.map +1 -0
- package/dist/collapsible/index.d.mts +60 -0
- package/dist/collapsible/index.d.ts +60 -0
- package/dist/collapsible/index.js +140 -0
- package/dist/collapsible/index.js.map +1 -0
- package/dist/collapsible/index.mjs +8 -0
- package/dist/collapsible/index.mjs.map +1 -0
- package/dist/combobox/index.d.mts +285 -0
- package/dist/combobox/index.d.ts +285 -0
- package/dist/combobox/index.js +2920 -0
- package/dist/combobox/index.js.map +1 -0
- package/dist/combobox/index.mjs +1267 -0
- package/dist/combobox/index.mjs.map +1 -0
- package/dist/dialog/index.d.mts +33 -0
- package/dist/dialog/index.d.ts +33 -0
- package/dist/dialog/index.js +1286 -0
- package/dist/dialog/index.js.map +1 -0
- package/dist/dialog/index.mjs +13 -0
- package/dist/dialog/index.mjs.map +1 -0
- package/dist/divider/index.d.mts +61 -0
- package/dist/divider/index.d.ts +61 -0
- package/dist/divider/index.js +223 -0
- package/dist/divider/index.js.map +1 -0
- package/dist/divider/index.mjs +196 -0
- package/dist/divider/index.mjs.map +1 -0
- package/dist/drawer/index.d.mts +148 -0
- package/dist/drawer/index.d.ts +148 -0
- package/dist/drawer/index.js +1266 -0
- package/dist/drawer/index.js.map +1 -0
- package/dist/drawer/index.mjs +299 -0
- package/dist/drawer/index.mjs.map +1 -0
- package/dist/dropdown/index.d.mts +233 -0
- package/dist/dropdown/index.d.ts +233 -0
- package/dist/dropdown/index.js +2402 -0
- package/dist/dropdown/index.js.map +1 -0
- package/dist/dropdown/index.mjs +741 -0
- package/dist/dropdown/index.mjs.map +1 -0
- package/dist/form-field/index.d.mts +176 -0
- package/dist/form-field/index.d.ts +176 -0
- package/dist/form-field/index.js +540 -0
- package/dist/form-field/index.js.map +1 -0
- package/dist/form-field/index.mjs +13 -0
- package/dist/form-field/index.mjs.map +1 -0
- package/dist/icon/index.d.mts +28 -0
- package/dist/icon/index.d.ts +28 -0
- package/dist/icon/index.js +127 -0
- package/dist/icon/index.js.map +1 -0
- package/dist/icon/index.mjs +9 -0
- package/dist/icon/index.mjs.map +1 -0
- package/dist/icon-button/index.d.mts +16 -0
- package/dist/icon-button/index.d.ts +16 -0
- package/dist/icon-button/index.js +921 -0
- package/dist/icon-button/index.js.map +1 -0
- package/dist/icon-button/index.mjs +11 -0
- package/dist/icon-button/index.mjs.map +1 -0
- package/dist/input/index.d.mts +78 -0
- package/dist/input/index.d.ts +78 -0
- package/dist/input/index.js +1119 -0
- package/dist/input/index.js.map +1 -0
- package/dist/input/index.mjs +16 -0
- package/dist/input/index.mjs.map +1 -0
- package/dist/kbd/index.d.mts +9 -0
- package/dist/kbd/index.d.ts +9 -0
- package/dist/kbd/index.js +46 -0
- package/dist/kbd/index.js.map +1 -0
- package/dist/kbd/index.mjs +19 -0
- package/dist/kbd/index.mjs.map +1 -0
- package/dist/label/index.d.mts +11 -0
- package/dist/label/index.d.ts +11 -0
- package/dist/label/index.js +78 -0
- package/dist/label/index.js.map +1 -0
- package/dist/label/index.mjs +7 -0
- package/dist/label/index.mjs.map +1 -0
- package/dist/link-box/index.d.mts +34 -0
- package/dist/link-box/index.d.ts +34 -0
- package/dist/link-box/index.js +92 -0
- package/dist/link-box/index.js.map +1 -0
- package/dist/link-box/index.mjs +58 -0
- package/dist/link-box/index.mjs.map +1 -0
- package/dist/pagination/index.d.mts +143 -0
- package/dist/pagination/index.d.ts +143 -0
- package/dist/pagination/index.js +1303 -0
- package/dist/pagination/index.js.map +1 -0
- package/dist/pagination/index.mjs +326 -0
- package/dist/pagination/index.mjs.map +1 -0
- package/dist/popover/index.d.mts +93 -0
- package/dist/popover/index.d.ts +93 -0
- package/dist/popover/index.js +1280 -0
- package/dist/popover/index.js.map +1 -0
- package/dist/popover/index.mjs +13 -0
- package/dist/popover/index.mjs.map +1 -0
- package/dist/portal/index.d.mts +13 -0
- package/dist/portal/index.d.ts +13 -0
- package/dist/portal/index.js +37 -0
- package/dist/portal/index.js.map +1 -0
- package/dist/portal/index.mjs +10 -0
- package/dist/portal/index.mjs.map +1 -0
- package/dist/progress/index.d.mts +48 -0
- package/dist/progress/index.d.ts +48 -0
- package/dist/progress/index.js +201 -0
- package/dist/progress/index.js.map +1 -0
- package/dist/progress/index.mjs +174 -0
- package/dist/progress/index.mjs.map +1 -0
- package/dist/progress-tracker/index.d.mts +81 -0
- package/dist/progress-tracker/index.d.ts +81 -0
- package/dist/progress-tracker/index.js +834 -0
- package/dist/progress-tracker/index.js.map +1 -0
- package/dist/progress-tracker/index.mjs +716 -0
- package/dist/progress-tracker/index.mjs.map +1 -0
- package/dist/radio-group/index.d.mts +100 -0
- package/dist/radio-group/index.d.ts +100 -0
- package/dist/radio-group/index.js +824 -0
- package/dist/radio-group/index.js.map +1 -0
- package/dist/radio-group/index.mjs +297 -0
- package/dist/radio-group/index.mjs.map +1 -0
- package/dist/rating/index.d.mts +78 -0
- package/dist/rating/index.d.ts +78 -0
- package/dist/rating/index.js +362 -0
- package/dist/rating/index.js.map +1 -0
- package/dist/rating/index.mjs +247 -0
- package/dist/rating/index.mjs.map +1 -0
- package/dist/scrolling-list/index.d.mts +105 -0
- package/dist/scrolling-list/index.d.ts +105 -0
- package/dist/scrolling-list/index.js +1367 -0
- package/dist/scrolling-list/index.js.map +1 -0
- package/dist/scrolling-list/index.mjs +407 -0
- package/dist/scrolling-list/index.mjs.map +1 -0
- package/dist/select/index.d.mts +167 -0
- package/dist/select/index.d.ts +167 -0
- package/dist/select/index.js +991 -0
- package/dist/select/index.js.map +1 -0
- package/dist/select/index.mjs +470 -0
- package/dist/select/index.mjs.map +1 -0
- package/dist/skeleton/index.d.mts +67 -0
- package/dist/skeleton/index.d.ts +67 -0
- package/dist/skeleton/index.js +206 -0
- package/dist/skeleton/index.js.map +1 -0
- package/dist/skeleton/index.mjs +147 -0
- package/dist/skeleton/index.mjs.map +1 -0
- package/dist/slider/index.d.mts +97 -0
- package/dist/slider/index.d.ts +97 -0
- package/dist/slider/index.js +209 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/slider/index.mjs +182 -0
- package/dist/slider/index.mjs.map +1 -0
- package/dist/slot/index.d.mts +17 -0
- package/dist/slot/index.d.ts +17 -0
- package/dist/slot/index.js +51 -0
- package/dist/slot/index.js.map +1 -0
- package/dist/slot/index.mjs +11 -0
- package/dist/slot/index.mjs.map +1 -0
- package/dist/snackbar/index.d.mts +158 -0
- package/dist/snackbar/index.d.ts +158 -0
- package/dist/snackbar/index.js +1693 -0
- package/dist/snackbar/index.js.map +1 -0
- package/dist/snackbar/index.mjs +733 -0
- package/dist/snackbar/index.mjs.map +1 -0
- package/dist/spinner/index.d.mts +21 -0
- package/dist/spinner/index.d.ts +21 -0
- package/dist/spinner/index.js +139 -0
- package/dist/spinner/index.js.map +1 -0
- package/dist/spinner/index.mjs +9 -0
- package/dist/spinner/index.mjs.map +1 -0
- package/dist/stepper/index.d.mts +82 -0
- package/dist/stepper/index.d.ts +82 -0
- package/dist/stepper/index.js +2178 -0
- package/dist/stepper/index.js.map +1 -0
- package/dist/stepper/index.mjs +229 -0
- package/dist/stepper/index.mjs.map +1 -0
- package/dist/switch/index.d.mts +64 -0
- package/dist/switch/index.d.ts +64 -0
- package/dist/switch/index.js +768 -0
- package/dist/switch/index.js.map +1 -0
- package/dist/switch/index.mjs +245 -0
- package/dist/switch/index.mjs.map +1 -0
- package/dist/tabs/index.d.mts +103 -0
- package/dist/tabs/index.d.ts +103 -0
- package/dist/tabs/index.js +1315 -0
- package/dist/tabs/index.js.map +1 -0
- package/dist/tabs/index.mjs +391 -0
- package/dist/tabs/index.mjs.map +1 -0
- package/dist/tag/index.d.mts +27 -0
- package/dist/tag/index.d.ts +27 -0
- package/dist/tag/index.js +269 -0
- package/dist/tag/index.js.map +1 -0
- package/dist/tag/index.mjs +237 -0
- package/dist/tag/index.mjs.map +1 -0
- package/dist/text-link/index.d.mts +20 -0
- package/dist/text-link/index.d.ts +20 -0
- package/dist/text-link/index.js +99 -0
- package/dist/text-link/index.js.map +1 -0
- package/dist/text-link/index.mjs +8 -0
- package/dist/text-link/index.mjs.map +1 -0
- package/dist/textarea/index.d.mts +47 -0
- package/dist/textarea/index.d.ts +47 -0
- package/dist/textarea/index.js +1180 -0
- package/dist/textarea/index.js.map +1 -0
- package/dist/textarea/index.mjs +77 -0
- package/dist/textarea/index.mjs.map +1 -0
- package/dist/visually-hidden/index.d.mts +16 -0
- package/dist/visually-hidden/index.d.ts +16 -0
- package/dist/visually-hidden/index.js +67 -0
- package/dist/visually-hidden/index.js.map +1 -0
- package/dist/visually-hidden/index.mjs +8 -0
- package/dist/visually-hidden/index.mjs.map +1 -0
- package/global.d.ts +12 -0
- package/package.json +75 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.json +9 -0
- package/tsup.config.ts +11 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TextLink
|
|
3
|
+
} from "../chunk-K7VP7DH3.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Icon
|
|
6
|
+
} from "../chunk-AESXFMCC.mjs";
|
|
7
|
+
import "../chunk-NBZKMCHF.mjs";
|
|
8
|
+
import {
|
|
9
|
+
Slot
|
|
10
|
+
} from "../chunk-4F5DOL57.mjs";
|
|
11
|
+
|
|
12
|
+
// src/breadcrumb/Breadcrumb.tsx
|
|
13
|
+
import { cx } from "class-variance-authority";
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var Breadcrumb = ({
|
|
16
|
+
className,
|
|
17
|
+
"aria-label": ariaLabel,
|
|
18
|
+
ref,
|
|
19
|
+
...rest
|
|
20
|
+
}) => {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
"nav",
|
|
23
|
+
{
|
|
24
|
+
"data-spark-component": "breadcrumb",
|
|
25
|
+
ref,
|
|
26
|
+
"aria-label": ariaLabel,
|
|
27
|
+
className: cx("text-caption text-neutral", className),
|
|
28
|
+
children: /* @__PURE__ */ jsx("ol", { className: cx("gap-sm flex flex-wrap items-center break-words"), ...rest })
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
Breadcrumb.displayName = "Breadcrumb.Breadcrumb";
|
|
33
|
+
|
|
34
|
+
// src/breadcrumb/BreadcrumbCurrentPage.tsx
|
|
35
|
+
import { cx as cx2 } from "class-variance-authority";
|
|
36
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
37
|
+
var CurrentPage = ({
|
|
38
|
+
asChild = false,
|
|
39
|
+
className,
|
|
40
|
+
children,
|
|
41
|
+
...rest
|
|
42
|
+
}) => {
|
|
43
|
+
const Component = asChild ? Slot : "span";
|
|
44
|
+
return /* @__PURE__ */ jsx2(
|
|
45
|
+
Component,
|
|
46
|
+
{
|
|
47
|
+
"data-spark-component": "breadcrumb-current-page",
|
|
48
|
+
role: "link",
|
|
49
|
+
"aria-disabled": true,
|
|
50
|
+
"aria-current": "page",
|
|
51
|
+
className: cx2(
|
|
52
|
+
"inline! overflow-hidden font-bold text-ellipsis whitespace-nowrap text-current",
|
|
53
|
+
className
|
|
54
|
+
),
|
|
55
|
+
...rest,
|
|
56
|
+
children
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
CurrentPage.displayName = "Breadcrumb.CurrentPage";
|
|
61
|
+
|
|
62
|
+
// src/breadcrumb/BreadcrumbItem.tsx
|
|
63
|
+
import { cx as cx3 } from "class-variance-authority";
|
|
64
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
65
|
+
var Item = ({ className, ...rest }) => {
|
|
66
|
+
return /* @__PURE__ */ jsx3(
|
|
67
|
+
"li",
|
|
68
|
+
{
|
|
69
|
+
"data-spark-component": "breadcrumb-item",
|
|
70
|
+
className: cx3("min-w-none gap-sm inline-flex items-center", className),
|
|
71
|
+
...rest
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
Item.displayName = "Breadcrumb.Item";
|
|
76
|
+
|
|
77
|
+
// src/breadcrumb/BreadcrumbLink.tsx
|
|
78
|
+
import { cx as cx4 } from "class-variance-authority";
|
|
79
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
80
|
+
var Link = ({
|
|
81
|
+
asChild = false,
|
|
82
|
+
className,
|
|
83
|
+
bold = true,
|
|
84
|
+
intent = "current",
|
|
85
|
+
underline = true,
|
|
86
|
+
href,
|
|
87
|
+
ref,
|
|
88
|
+
...rest
|
|
89
|
+
}) => {
|
|
90
|
+
const Component = asChild ? Slot : TextLink;
|
|
91
|
+
return /* @__PURE__ */ jsx4(
|
|
92
|
+
Component,
|
|
93
|
+
{
|
|
94
|
+
"data-spark-component": "breadcrumb-link",
|
|
95
|
+
href,
|
|
96
|
+
ref,
|
|
97
|
+
className: cx4("inline! overflow-hidden text-ellipsis whitespace-nowrap", className),
|
|
98
|
+
bold,
|
|
99
|
+
intent,
|
|
100
|
+
underline,
|
|
101
|
+
...rest
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
Link.displayName = "Breadcrumb.Link";
|
|
106
|
+
|
|
107
|
+
// src/breadcrumb/BreadcrumbSeparator.tsx
|
|
108
|
+
import { ArrowVerticalRight } from "@spark-ui/icons/ArrowVerticalRight";
|
|
109
|
+
import { cx as cx5 } from "class-variance-authority";
|
|
110
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
111
|
+
var Separator = ({
|
|
112
|
+
asChild = false,
|
|
113
|
+
className,
|
|
114
|
+
children,
|
|
115
|
+
ref,
|
|
116
|
+
...rest
|
|
117
|
+
}) => {
|
|
118
|
+
const Component = asChild ? Slot : "li";
|
|
119
|
+
return /* @__PURE__ */ jsx5(
|
|
120
|
+
Component,
|
|
121
|
+
{
|
|
122
|
+
role: "presentation",
|
|
123
|
+
"aria-hidden": true,
|
|
124
|
+
"data-spark-component": "breadcrumb-separator",
|
|
125
|
+
ref,
|
|
126
|
+
className: cx5("gap-sm inline-flex items-center", className),
|
|
127
|
+
...rest,
|
|
128
|
+
children: children ?? /* @__PURE__ */ jsx5(Icon, { children: /* @__PURE__ */ jsx5(ArrowVerticalRight, {}) })
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
Separator.displayName = "Breadcrumb.Separator";
|
|
133
|
+
|
|
134
|
+
// src/breadcrumb/index.ts
|
|
135
|
+
var Breadcrumb2 = Object.assign(Breadcrumb, {
|
|
136
|
+
Item,
|
|
137
|
+
Link,
|
|
138
|
+
CurrentPage,
|
|
139
|
+
Separator
|
|
140
|
+
});
|
|
141
|
+
Breadcrumb2.displayName = "Breadcrumb";
|
|
142
|
+
Item.displayName = "Breadcrumb.Item";
|
|
143
|
+
Link.displayName = "Breadcrumb.Link";
|
|
144
|
+
CurrentPage.displayName = "Breadcrumb.CurrentPage";
|
|
145
|
+
Separator.displayName = "Breadcrumb.Separator";
|
|
146
|
+
export {
|
|
147
|
+
Breadcrumb2 as Breadcrumb
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/breadcrumb/Breadcrumb.tsx","../../src/breadcrumb/BreadcrumbCurrentPage.tsx","../../src/breadcrumb/BreadcrumbItem.tsx","../../src/breadcrumb/BreadcrumbLink.tsx","../../src/breadcrumb/BreadcrumbSeparator.tsx","../../src/breadcrumb/index.ts"],"sourcesContent":["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 { 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 { 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 { 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"],"mappings":";;;;;;;;;;;;AAAA,SAAS,UAAU;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,WAAW,GAAG,6BAA6B,SAAS;AAAA,MAEpD,8BAAC,QAAG,WAAW,GAAG,gDAAgD,GAAI,GAAG,MAAM;AAAA;AAAA,EACjF;AAEJ;AAEA,WAAW,cAAc;;;AC3BzB,SAAS,MAAAA,WAAU;AAqBf,gBAAAC,YAAA;AATG,IAAM,cAAc,CAAC;AAAA,EAC1B,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAwB;AACtB,QAAM,YAAY,UAAU,OAAO;AAEnC,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,wBAAqB;AAAA,MACrB,MAAK;AAAA,MACL,iBAAa;AAAA,MACb,gBAAa;AAAA,MACb,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;;;ACrC1B,SAAS,MAAAC,WAAU;AAUf,gBAAAC,YAAA;AAFG,IAAM,OAAO,CAAC,EAAE,WAAW,GAAG,KAAK,MAAiB;AACzD,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,wBAAqB;AAAA,MACrB,WAAWD,IAAG,8CAA8C,SAAS;AAAA,MACpE,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,KAAK,cAAc;;;AClBnB,SAAS,MAAAE,WAAU;AA0Bf,gBAAAC,YAAA;AAbG,IAAM,OAAO,CAAC;AAAA,EACnB,UAAU;AAAA,EACV;AAAA,EACA,OAAO;AAAA,EACP,SAAS;AAAA,EACT,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAiB;AACf,QAAM,YAAY,UAAU,OAAO;AAEnC,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,wBAAqB;AAAA,MACrB;AAAA,MACA;AAAA,MACA,WAAWC,IAAG,2DAA2D,SAAS;AAAA,MAClF;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,KAAK,cAAc;;;ACvCnB,SAAS,0BAA0B;AACnC,SAAS,MAAAC,WAAU;AAgCT,gBAAAC,YAAA;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,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,eAAW;AAAA,MACX,wBAAqB;AAAA,MACrB;AAAA,MACA,WAAWC,IAAG,mCAAmC,SAAS;AAAA,MACzD,GAAG;AAAA,MAEH,sBACC,gBAAAD,KAAC,QACC,0BAAAA,KAAC,sBAAmB,GACtB;AAAA;AAAA,EAEJ;AAEJ;AAEA,UAAU,cAAc;;;AClCjB,IAAME,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":["cx","jsx","cx","cx","jsx","cx","jsx","cx","cx","jsx","cx","Breadcrumb"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
intent?: "main" | "alert" | "support" | "accent" | "basic" | "success" | "info" | "neutral" | "danger" | "surface" | null | undefined;
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
shape?: "square" | "rounded" | "pill" | null | undefined;
|
|
11
|
+
disabled?: boolean | null | undefined;
|
|
12
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
13
|
+
type ButtonStylesProps = VariantProps<typeof buttonStyles>;
|
|
14
|
+
|
|
15
|
+
interface ButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'disabled'>, ButtonStylesProps {
|
|
16
|
+
/**
|
|
17
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
18
|
+
*/
|
|
19
|
+
asChild?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Display a spinner to indicate to the user that the button is loading something after they interacted with it.
|
|
22
|
+
*/
|
|
23
|
+
isLoading?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* If your loading state should only display a spinner, it's better to specify a label for it (a11y).
|
|
26
|
+
*/
|
|
27
|
+
loadingLabel?: string;
|
|
28
|
+
/**
|
|
29
|
+
* If your loading state should also display a label, you can use this prop instead of `loadingLabel`.
|
|
30
|
+
* **Please note that using this can result in layout shifting when the Button goes from loading state to normal state.**
|
|
31
|
+
*/
|
|
32
|
+
loadingText?: string;
|
|
33
|
+
ref?: Ref<HTMLButtonElement>;
|
|
34
|
+
}
|
|
35
|
+
declare const Button: {
|
|
36
|
+
({ children, design, disabled, intent, isLoading, loadingLabel, loadingText, shape, size, asChild, className, ref, ...others }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { Button, type ButtonProps };
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
intent?: "main" | "alert" | "support" | "accent" | "basic" | "success" | "info" | "neutral" | "danger" | "surface" | null | undefined;
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
shape?: "square" | "rounded" | "pill" | null | undefined;
|
|
11
|
+
disabled?: boolean | null | undefined;
|
|
12
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
13
|
+
type ButtonStylesProps = VariantProps<typeof buttonStyles>;
|
|
14
|
+
|
|
15
|
+
interface ButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'disabled'>, ButtonStylesProps {
|
|
16
|
+
/**
|
|
17
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
18
|
+
*/
|
|
19
|
+
asChild?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Display a spinner to indicate to the user that the button is loading something after they interacted with it.
|
|
22
|
+
*/
|
|
23
|
+
isLoading?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* If your loading state should only display a spinner, it's better to specify a label for it (a11y).
|
|
26
|
+
*/
|
|
27
|
+
loadingLabel?: string;
|
|
28
|
+
/**
|
|
29
|
+
* If your loading state should also display a label, you can use this prop instead of `loadingLabel`.
|
|
30
|
+
* **Please note that using this can result in layout shifting when the Button goes from loading state to normal state.**
|
|
31
|
+
*/
|
|
32
|
+
loadingText?: string;
|
|
33
|
+
ref?: Ref<HTMLButtonElement>;
|
|
34
|
+
}
|
|
35
|
+
declare const Button: {
|
|
36
|
+
({ children, design, disabled, intent, isLoading, loadingLabel, loadingText, shape, size, asChild, className, ref, ...others }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { Button, type ButtonProps };
|