@cloudflare/kumo 1.3.0 → 1.4.1
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 +17 -0
- package/ai/USAGE.md +193 -0
- package/ai/component-registry.json +1425 -237
- package/ai/component-registry.md +531 -67
- package/ai/schemas.ts +366 -107
- package/dist/.build-complete +1 -1
- package/dist/badge-Dc99vsfo.js.map +1 -1
- package/dist/banner-4fkH6Sbt.js.map +1 -1
- package/dist/breadcrumbs-DyKi7BcP.js.map +1 -1
- package/dist/button-Bh96oxRL.js.map +1 -1
- package/dist/catalog.js +1 -1
- package/dist/checkbox-C1LPq8eL.js.map +1 -1
- package/dist/clipboard-text-CJSI9X2m.js.map +1 -1
- package/dist/cloudflare-logo-Dqd1VD9z.js +166 -0
- package/dist/cloudflare-logo-Dqd1VD9z.js.map +1 -0
- package/dist/code-T2wPDiM0.js.map +1 -1
- package/dist/collapsible-OBNkTO48.js.map +1 -1
- package/dist/combobox-CWxn5aHA.js.map +1 -1
- package/dist/command-line/cli.js +46 -21
- package/dist/command-line/commands/ai.js +23 -0
- package/dist/command-line/commands/blocks.js +2 -2
- package/dist/command-line/commands/doc.js +3 -3
- package/dist/command-line/commands/ls.js +4 -4
- package/dist/{command-palette-BxmGYxBv.js → command-palette-J50WKjS7.js} +14 -8
- package/dist/command-palette-J50WKjS7.js.map +1 -0
- package/dist/components/cloudflare-logo.js +10 -0
- package/dist/components/cloudflare-logo.js.map +1 -0
- package/dist/components/command-palette.js +1 -1
- package/dist/date-range-picker-CbKEQ9pi.js.map +1 -1
- package/dist/dialog-x9n9wI13.js.map +1 -1
- package/dist/dropdown-BAyk1knz.js.map +1 -1
- package/dist/empty-D03cbzRS.js.map +1 -1
- package/dist/field-B7ORz5ej.js.map +1 -1
- package/dist/grid-DKajRHh8.js.map +1 -1
- package/dist/index.js +67 -61
- package/dist/index.js.map +1 -1
- package/dist/input-D6YgDfDG.js.map +1 -1
- package/dist/label-B4FY8MX_.js.map +1 -1
- package/dist/layer-card-C8j5Hkkj.js.map +1 -1
- package/dist/link-CcuZKqob.js.map +1 -1
- package/dist/loader-DHGMYlC6.js.map +1 -1
- package/dist/menubar-CzimiryS.js.map +1 -1
- package/dist/meter-BrJnHJ3Q.js.map +1 -1
- package/dist/pagination-D0x9KQSk.js.map +1 -1
- package/dist/popover-CtKDH8Yc.js.map +1 -1
- package/dist/radio-CYejLANA.js.map +1 -1
- package/dist/schemas-DCw6TIy0.js +3859 -0
- package/dist/{schemas-C2YJKpDC.js.map → schemas-DCw6TIy0.js.map} +1 -1
- package/dist/select-D4rKQAax.js.map +1 -1
- package/dist/sensitive-input-DYvAmxkN.js.map +1 -1
- package/dist/src/command-line/commands/ai.d.ts +10 -0
- package/dist/src/command-line/commands/ai.d.ts.map +1 -0
- package/dist/src/components/badge/badge.d.ts +31 -4
- package/dist/src/components/badge/badge.d.ts.map +1 -1
- package/dist/src/components/banner/banner.d.ts +39 -4
- package/dist/src/components/banner/banner.d.ts.map +1 -1
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts +35 -0
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/src/components/button/button.d.ts +86 -0
- package/dist/src/components/button/button.d.ts.map +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +7 -0
- package/dist/src/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/src/components/clipboard-text/clipboard-text.d.ts +28 -3
- package/dist/src/components/clipboard-text/clipboard-text.d.ts.map +1 -1
- package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts +133 -0
- package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts.map +1 -0
- package/dist/src/components/cloudflare-logo/index.d.ts +2 -0
- package/dist/src/components/cloudflare-logo/index.d.ts.map +1 -0
- package/dist/src/components/code/code.d.ts +38 -6
- package/dist/src/components/code/code.d.ts.map +1 -1
- package/dist/src/components/collapsible/collapsible.d.ts +10 -0
- package/dist/src/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/src/components/combobox/combobox.d.ts +61 -0
- package/dist/src/components/combobox/combobox.d.ts.map +1 -1
- package/dist/src/components/command-palette/command-palette.d.ts +41 -6
- package/dist/src/components/command-palette/command-palette.d.ts.map +1 -1
- package/dist/src/components/date-range-picker/date-range-picker.d.ts +57 -4
- package/dist/src/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/src/components/dialog/dialog.d.ts +27 -0
- package/dist/src/components/dialog/dialog.d.ts.map +1 -1
- package/dist/src/components/dropdown/dropdown.d.ts +33 -0
- package/dist/src/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/src/components/empty/empty.d.ts +35 -0
- package/dist/src/components/empty/empty.d.ts.map +1 -1
- package/dist/src/components/field/field.d.ts +34 -4
- package/dist/src/components/field/field.d.ts.map +1 -1
- package/dist/src/components/grid/grid.d.ts +45 -17
- package/dist/src/components/grid/grid.d.ts.map +1 -1
- package/dist/src/components/input/input.d.ts +15 -0
- package/dist/src/components/input/input.d.ts.map +1 -1
- package/dist/src/components/label/label.d.ts +16 -5
- package/dist/src/components/label/label.d.ts.map +1 -1
- package/dist/src/components/layer-card/layer-card.d.ts +13 -0
- package/dist/src/components/layer-card/layer-card.d.ts.map +1 -1
- package/dist/src/components/link/link.d.ts +20 -0
- package/dist/src/components/link/link.d.ts.map +1 -1
- package/dist/src/components/loader/loader.d.ts +34 -0
- package/dist/src/components/loader/loader.d.ts.map +1 -1
- package/dist/src/components/menubar/menubar.d.ts +44 -0
- package/dist/src/components/menubar/menubar.d.ts.map +1 -1
- package/dist/src/components/meter/meter.d.ts +26 -0
- package/dist/src/components/meter/meter.d.ts.map +1 -1
- package/dist/src/components/pagination/pagination.d.ts +25 -0
- package/dist/src/components/pagination/pagination.d.ts.map +1 -1
- package/dist/src/components/popover/popover.d.ts +33 -5
- package/dist/src/components/popover/popover.d.ts.map +1 -1
- package/dist/src/components/radio/radio.d.ts +22 -0
- package/dist/src/components/radio/radio.d.ts.map +1 -1
- package/dist/src/components/select/select.d.ts +42 -20
- package/dist/src/components/select/select.d.ts.map +1 -1
- package/dist/src/components/sensitive-input/sensitive-input.d.ts +30 -6
- package/dist/src/components/sensitive-input/sensitive-input.d.ts.map +1 -1
- package/dist/src/components/surface/surface.d.ts +18 -6
- package/dist/src/components/surface/surface.d.ts.map +1 -1
- package/dist/src/components/switch/switch.d.ts +14 -0
- package/dist/src/components/switch/switch.d.ts.map +1 -1
- package/dist/src/components/table/table.d.ts +33 -0
- package/dist/src/components/table/table.d.ts.map +1 -1
- package/dist/src/components/tabs/tabs.d.ts +48 -9
- package/dist/src/components/tabs/tabs.d.ts.map +1 -1
- package/dist/src/components/text/text.d.ts +35 -7
- package/dist/src/components/text/text.d.ts.map +1 -1
- package/dist/src/components/toast/toast.d.ts +34 -0
- package/dist/src/components/toast/toast.d.ts.map +1 -1
- package/dist/src/components/tooltip/tooltip.d.ts +41 -0
- package/dist/src/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/src/index.d.ts +30 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/surface-BIC6CXiz.js.map +1 -1
- package/dist/switch-z7FE1nQE.js.map +1 -1
- package/dist/table-Sd2Etb1N.js.map +1 -1
- package/dist/tabs-DAEeuQLd.js.map +1 -1
- package/dist/text-BEhqwMfe.js.map +1 -1
- package/dist/toast-B8ebpHaU.js.map +1 -1
- package/dist/tooltip-C4DRhJi1.js.map +1 -1
- package/package.json +7 -3
- package/dist/command-palette-BxmGYxBv.js.map +0 -1
- package/dist/schemas-C2YJKpDC.js +0 -3543
package/dist/index.js
CHANGED
|
@@ -9,17 +9,17 @@ import { C as ia } from "./checkbox-C1LPq8eL.js";
|
|
|
9
9
|
import { C as na } from "./clipboard-text-CJSI9X2m.js";
|
|
10
10
|
import { C as pa, a as fa } from "./code-T2wPDiM0.js";
|
|
11
11
|
import { C as ca } from "./combobox-CWxn5aHA.js";
|
|
12
|
-
import { a as N, D as
|
|
13
|
-
import { d as ua, b as
|
|
12
|
+
import { a as N, D as O, c as U, e as T } from "./dialog-x9n9wI13.js";
|
|
13
|
+
import { d as ua, b as Aa } from "./dialog-x9n9wI13.js";
|
|
14
14
|
import { D as _a } from "./dropdown-BAyk1knz.js";
|
|
15
|
-
import { C as
|
|
16
|
-
import { F as
|
|
17
|
-
import { b as Na, K as
|
|
15
|
+
import { C as Ca } from "./collapsible-OBNkTO48.js";
|
|
16
|
+
import { F as La, a as Ra, K as Ea, f as ha } from "./field-B7ORz5ej.js";
|
|
17
|
+
import { b as Na, K as Oa, L as Ua, a as ga, l as Da } from "./label-B4FY8MX_.js";
|
|
18
18
|
import { I as g } from "./input-D6YgDfDG.js";
|
|
19
|
-
import { i as
|
|
19
|
+
import { i as Ka } from "./input-D6YgDfDG.js";
|
|
20
20
|
import { I as ka } from "./input-area-DN_Ncliw.js";
|
|
21
21
|
import { I as ya } from "./input-group-BXzBwH4p.js";
|
|
22
|
-
import { L as
|
|
22
|
+
import { L as Fa } from "./layer-card-C8j5Hkkj.js";
|
|
23
23
|
import { L as wa } from "./loader-DHGMYlC6.js";
|
|
24
24
|
import { S as Ga } from "./skeleton-line-CtpS1u1J.js";
|
|
25
25
|
import { M as $a, u as qa } from "./menubar-CzimiryS.js";
|
|
@@ -33,21 +33,22 @@ import { T as ie } from "./table-Sd2Etb1N.js";
|
|
|
33
33
|
import { T as ne } from "./text-BEhqwMfe.js";
|
|
34
34
|
import { T as pe, u as fe } from "./toast-B8ebpHaU.js";
|
|
35
35
|
import { T as ce, a as xe } from "./tooltip-C4DRhJi1.js";
|
|
36
|
-
import { g as
|
|
37
|
-
import { a as
|
|
38
|
-
import { b as
|
|
39
|
-
import { C as
|
|
40
|
-
import { a as
|
|
36
|
+
import { g as Ae, K as Te, P as _e } from "./popover-CtKDH8Yc.js";
|
|
37
|
+
import { a as Ce, K as be, S as Le } from "./sensitive-input-DYvAmxkN.js";
|
|
38
|
+
import { b as Ee, K as he, R as Se, a as Ne } from "./radio-CYejLANA.js";
|
|
39
|
+
import { C as Ue, a as ge, K as De } from "./command-palette-J50WKjS7.js";
|
|
40
|
+
import { a as Ke, K as Me, L as ke, l as ve } from "./link-CcuZKqob.js";
|
|
41
41
|
import { B as Pe } from "./breadcrumbs-DyKi7BcP.js";
|
|
42
|
-
import { E as
|
|
42
|
+
import { E as Be } from "./empty-D03cbzRS.js";
|
|
43
43
|
import { G as ze, a as Ge, c as je, K as $e, b as qe, g as We } from "./grid-DKajRHh8.js";
|
|
44
|
+
import { C as He, a as Je, K as Qe, P as Ye, g as Ze } from "./cloudflare-logo-Dqd1VD9z.js";
|
|
44
45
|
import { c as D } from "./cn-Bhsu1vx2.js";
|
|
45
|
-
import { s as
|
|
46
|
-
import { L as
|
|
46
|
+
import { s as eo } from "./cn-Bhsu1vx2.js";
|
|
47
|
+
import { L as ro, u as to } from "./link-provider-DPBGo-0n.js";
|
|
47
48
|
import { jsx as a, jsxs as e } from "react/jsx-runtime";
|
|
48
|
-
import { useState as _, useEffect as
|
|
49
|
-
import { XIcon as
|
|
50
|
-
import { i as
|
|
49
|
+
import { useState as _, useEffect as V, useCallback as m } from "react";
|
|
50
|
+
import { XIcon as K, WarningCircleIcon as M, CheckIcon as k, CopyIcon as v } from "@phosphor-icons/react";
|
|
51
|
+
import { i as io } from "./vendor-base-ui-kX0wjdav.js";
|
|
51
52
|
const W = {
|
|
52
53
|
size: {
|
|
53
54
|
sm: {
|
|
@@ -70,30 +71,30 @@ function P({
|
|
|
70
71
|
onDelete: f,
|
|
71
72
|
isDeleting: r = !1,
|
|
72
73
|
caseSensitive: d = !0,
|
|
73
|
-
deleteButtonText:
|
|
74
|
-
size:
|
|
74
|
+
deleteButtonText: C,
|
|
75
|
+
size: b = y.size,
|
|
75
76
|
errorMessage: c,
|
|
76
|
-
className:
|
|
77
|
+
className: L
|
|
77
78
|
}) {
|
|
78
79
|
const [x, u] = _(""), [R, i] = _(!1);
|
|
79
|
-
|
|
80
|
+
V(() => {
|
|
80
81
|
s || (u(""), i(!1));
|
|
81
82
|
}, [s]);
|
|
82
|
-
const
|
|
83
|
+
const A = m(
|
|
83
84
|
(t) => d ? t : t.toLowerCase(),
|
|
84
85
|
[d]
|
|
85
|
-
), l =
|
|
86
|
+
), l = A(x) === A(o), E = m(async () => {
|
|
86
87
|
!l || r || await f();
|
|
87
|
-
}, [l, r, f]),
|
|
88
|
+
}, [l, r, f]), h = m(async () => {
|
|
88
89
|
await navigator.clipboard.writeText(o), i(!0), setTimeout(() => i(!1), 1500);
|
|
89
90
|
}, [o]);
|
|
90
|
-
return /* @__PURE__ */ a(N, { open: s, onOpenChange: I, children: /* @__PURE__ */ e(
|
|
91
|
+
return /* @__PURE__ */ a(N, { open: s, onOpenChange: I, children: /* @__PURE__ */ e(O, { size: b, className: D("p-0", L), children: [
|
|
91
92
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between border-b border-kumo-line px-6 py-4", children: [
|
|
92
|
-
/* @__PURE__ */ e(
|
|
93
|
+
/* @__PURE__ */ e(U, { className: "text-lg font-semibold", children: [
|
|
93
94
|
"Delete ",
|
|
94
95
|
o
|
|
95
96
|
] }),
|
|
96
|
-
/* @__PURE__ */ a(
|
|
97
|
+
/* @__PURE__ */ a(T, { children: /* @__PURE__ */ a(
|
|
97
98
|
n,
|
|
98
99
|
{
|
|
99
100
|
variant: "ghost",
|
|
@@ -101,13 +102,13 @@ function P({
|
|
|
101
102
|
size: "sm",
|
|
102
103
|
"aria-label": "Close",
|
|
103
104
|
disabled: r,
|
|
104
|
-
children: /* @__PURE__ */ a(
|
|
105
|
+
children: /* @__PURE__ */ a(K, { size: 18 })
|
|
105
106
|
}
|
|
106
107
|
) })
|
|
107
108
|
] }),
|
|
108
109
|
/* @__PURE__ */ e("div", { className: "flex flex-col p-6 gap-4", children: [
|
|
109
110
|
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: [
|
|
110
|
-
c && /* @__PURE__ */ a(S, { icon: /* @__PURE__ */ a(
|
|
111
|
+
c && /* @__PURE__ */ a(S, { icon: /* @__PURE__ */ a(M, {}), variant: "error", children: c }),
|
|
111
112
|
/* @__PURE__ */ e("p", { className: "text-base text-kumo-subtle max-w-prose text-pretty", children: [
|
|
112
113
|
"This action cannot be undone. This will permanently delete the",
|
|
113
114
|
" ",
|
|
@@ -125,7 +126,7 @@ function P({
|
|
|
125
126
|
"button",
|
|
126
127
|
{
|
|
127
128
|
className: "font-mono text-sm inline font-semibold bg-kumo-tint hover:bg-kumo-fill rounded-md px-2 py-1 group hover:cursor-pointer",
|
|
128
|
-
onClick:
|
|
129
|
+
onClick: h,
|
|
129
130
|
"aria-label": `Copy ${o} to clipboard`,
|
|
130
131
|
children: [
|
|
131
132
|
o,
|
|
@@ -168,15 +169,15 @@ function P({
|
|
|
168
169
|
] })
|
|
169
170
|
] }),
|
|
170
171
|
/* @__PURE__ */ e("div", { className: "flex justify-end gap-3 border-t border-kumo-line px-6 py-4", children: [
|
|
171
|
-
/* @__PURE__ */ a(
|
|
172
|
+
/* @__PURE__ */ a(T, { children: /* @__PURE__ */ a(n, { variant: "secondary", disabled: r, children: "Cancel" }) }),
|
|
172
173
|
/* @__PURE__ */ a(
|
|
173
174
|
n,
|
|
174
175
|
{
|
|
175
176
|
variant: "destructive",
|
|
176
|
-
onClick:
|
|
177
|
+
onClick: E,
|
|
177
178
|
disabled: !l || r,
|
|
178
179
|
loading: r,
|
|
179
|
-
children:
|
|
180
|
+
children: C || `Delete ${p}`
|
|
180
181
|
}
|
|
181
182
|
)
|
|
182
183
|
] })
|
|
@@ -191,82 +192,87 @@ export {
|
|
|
191
192
|
n as Button,
|
|
192
193
|
ia as Checkbox,
|
|
193
194
|
na as ClipboardText,
|
|
195
|
+
He as CloudflareLogo,
|
|
194
196
|
pa as Code,
|
|
195
197
|
fa as CodeBlock,
|
|
196
|
-
|
|
198
|
+
Ca as Collapsible,
|
|
197
199
|
ca as Combobox,
|
|
198
|
-
|
|
200
|
+
Ue as CommandPalette,
|
|
199
201
|
ta as DateRangePicker,
|
|
200
202
|
P as DeleteResource,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
+
O as Dialog,
|
|
204
|
+
T as DialogClose,
|
|
203
205
|
ua as DialogDescription,
|
|
204
206
|
N as DialogRoot,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
+
U as DialogTitle,
|
|
208
|
+
Aa as DialogTrigger,
|
|
207
209
|
_a as DropdownMenu,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
Be as Empty,
|
|
211
|
+
La as Field,
|
|
210
212
|
ze as Grid,
|
|
211
213
|
Ge as GridItem,
|
|
212
214
|
g as Input,
|
|
213
215
|
ka as InputArea,
|
|
214
216
|
ya as InputGroup,
|
|
217
|
+
Je as KUMO_CLOUDFLARE_LOGO_DEFAULT_VARIANTS,
|
|
218
|
+
Qe as KUMO_CLOUDFLARE_LOGO_VARIANTS,
|
|
215
219
|
ge as KUMO_COMMAND_PALETTE_DEFAULT_VARIANTS,
|
|
216
220
|
De as KUMO_COMMAND_PALETTE_VARIANTS,
|
|
217
221
|
y as KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS,
|
|
218
222
|
W as KUMO_DELETE_RESOURCE_VARIANTS,
|
|
219
223
|
Ra as KUMO_FIELD_DEFAULT_VARIANTS,
|
|
220
|
-
|
|
224
|
+
Ea as KUMO_FIELD_VARIANTS,
|
|
221
225
|
je as KUMO_GRID_DEFAULT_VARIANTS,
|
|
222
226
|
$e as KUMO_GRID_VARIANTS,
|
|
223
227
|
Na as KUMO_LABEL_DEFAULT_VARIANTS,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
228
|
+
Oa as KUMO_LABEL_VARIANTS,
|
|
229
|
+
Ke as KUMO_LINK_DEFAULT_VARIANTS,
|
|
230
|
+
Me as KUMO_LINK_VARIANTS,
|
|
231
|
+
Ae as KUMO_POPOVER_DEFAULT_VARIANTS,
|
|
232
|
+
Te as KUMO_POPOVER_VARIANTS,
|
|
233
|
+
Ee as KUMO_RADIO_DEFAULT_VARIANTS,
|
|
234
|
+
he as KUMO_RADIO_VARIANTS,
|
|
235
|
+
Ce as KUMO_SENSITIVE_INPUT_DEFAULT_VARIANTS,
|
|
236
|
+
be as KUMO_SENSITIVE_INPUT_VARIANTS,
|
|
237
|
+
Ua as Label,
|
|
238
|
+
Fa as LayerCard,
|
|
235
239
|
ke as Link,
|
|
236
240
|
aa as LinkButton,
|
|
237
|
-
|
|
241
|
+
ro as LinkProvider,
|
|
238
242
|
wa as Loader,
|
|
239
243
|
$a as MenuBar,
|
|
240
244
|
Xa as Meter,
|
|
241
245
|
Ja as Pagination,
|
|
242
246
|
_e as Popover,
|
|
247
|
+
Ye as PoweredByCloudflare,
|
|
243
248
|
Se as Radio,
|
|
244
249
|
Ne as RadioGroup,
|
|
245
250
|
ea as RefreshButton,
|
|
246
251
|
Ya as Select,
|
|
247
|
-
|
|
252
|
+
Le as SensitiveInput,
|
|
248
253
|
Ga as SkeletonLine,
|
|
249
254
|
ae as Surface,
|
|
250
255
|
oe as Switch,
|
|
251
256
|
ie as Table,
|
|
252
257
|
te as Tabs,
|
|
253
258
|
ne as Text,
|
|
254
|
-
|
|
259
|
+
io as Toast,
|
|
255
260
|
pe as Toasty,
|
|
256
261
|
ce as Tooltip,
|
|
257
262
|
xe as TooltipProvider,
|
|
258
263
|
oa as buttonVariants,
|
|
259
264
|
D as cn,
|
|
260
|
-
|
|
265
|
+
ha as fieldVariants,
|
|
266
|
+
Ze as generateCloudflareLogoSvg,
|
|
261
267
|
qe as gridItemVariants,
|
|
262
268
|
We as gridVariants,
|
|
263
|
-
|
|
269
|
+
Ka as inputVariants,
|
|
264
270
|
ga as labelContentVariants,
|
|
265
271
|
Da as labelVariants,
|
|
266
272
|
ve as linkVariants,
|
|
267
|
-
|
|
273
|
+
eo as safeRandomId,
|
|
268
274
|
fe as useKumoToastManager,
|
|
269
|
-
|
|
275
|
+
to as useLinkComponent,
|
|
270
276
|
qa as useMenuNavigation
|
|
271
277
|
};
|
|
272
278
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/blocks/delete-resource/delete-resource.tsx"],"sourcesContent":["import { useState, useCallback, useEffect } from \"react\";\nimport {\n Dialog,\n DialogRoot,\n DialogTitle,\n DialogClose,\n} from \"../../components/dialog\";\nimport { Input } from \"../../components/input\";\nimport { Button } from \"../../components/button\";\nimport { cn } from \"../../utils/cn\";\nimport {\n CheckIcon,\n CopyIcon,\n WarningCircleIcon,\n XIcon,\n} from \"@phosphor-icons/react\";\nimport { Banner } from \"../../components/banner\";\n\nexport const KUMO_DELETE_RESOURCE_VARIANTS = {\n size: {\n sm: {\n classes: \"\",\n description: \"Small dialog for simple delete confirmations\",\n },\n base: {\n classes: \"\",\n description: \"Default delete confirmation dialog size\",\n },\n },\n} as const;\n\nexport const KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS = {\n size: \"base\",\n} as const;\n\nexport type KumoDeleteResourceSize =\n keyof typeof KUMO_DELETE_RESOURCE_VARIANTS.size;\n\nexport interface KumoDeleteResourceVariantsProps {\n size?: KumoDeleteResourceSize;\n}\n\nexport interface DeleteResourceProps extends KumoDeleteResourceVariantsProps {\n /** Whether the dialog is open */\n open: boolean;\n /** Callback when open state changes */\n onOpenChange: (open: boolean) => void;\n /** The type of resource being deleted (e.g., \"Zone\", \"Worker\", \"KV Namespace\") */\n resourceType: string;\n /** The name of the specific resource being deleted */\n resourceName: string;\n /** Callback when delete is confirmed */\n onDelete: () => void | Promise<void>;\n /** Whether the delete action is in progress */\n isDeleting?: boolean;\n /** Whether the confirmation input should be case-sensitive (default: true) */\n caseSensitive?: boolean;\n /** Custom delete button text (defaults to \"Delete {resourceType}\") */\n deleteButtonText?: string;\n /** Additional className for the dialog */\n className?: string;\n /** Error message to display if the delete action fails */\n errorMessage?: string;\n}\n\nexport function DeleteResource({\n open,\n onOpenChange,\n resourceType,\n resourceName,\n onDelete,\n isDeleting = false,\n caseSensitive = true,\n deleteButtonText,\n size = KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS.size,\n errorMessage,\n className,\n}: DeleteResourceProps) {\n const [confirmationInput, setConfirmationInput] = useState(\"\");\n const [copied, setCopied] = useState(false);\n\n useEffect(() => {\n if (!open) {\n setConfirmationInput(\"\");\n setCopied(false);\n }\n }, [open]);\n\n const normalizeForComparison = useCallback(\n (str: string) => (caseSensitive ? str : str.toLowerCase()),\n [caseSensitive],\n );\n\n const isConfirmed =\n normalizeForComparison(confirmationInput) ===\n normalizeForComparison(resourceName);\n\n const handleDelete = useCallback(async () => {\n if (!isConfirmed || isDeleting) return;\n await onDelete();\n }, [isConfirmed, isDeleting, onDelete]);\n\n const handleCopy = useCallback(async () => {\n await navigator.clipboard.writeText(resourceName);\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n }, [resourceName]);\n\n return (\n <DialogRoot open={open} onOpenChange={onOpenChange}>\n <Dialog size={size} className={cn(\"p-0\", className)}>\n <div className=\"flex items-center justify-between border-b border-kumo-line px-6 py-4\">\n <DialogTitle className=\"text-lg font-semibold\">\n Delete {resourceName}\n </DialogTitle>\n <DialogClose>\n <Button\n variant=\"ghost\"\n shape=\"square\"\n size=\"sm\"\n aria-label=\"Close\"\n disabled={isDeleting}\n >\n <XIcon size={18} />\n </Button>\n </DialogClose>\n </div>\n\n <div className=\"flex flex-col p-6 gap-4\">\n <div className=\"flex flex-col gap-2\">\n {errorMessage && (\n <Banner icon={<WarningCircleIcon />} variant=\"error\">\n {errorMessage}\n </Banner>\n )}\n <p className=\"text-base text-kumo-subtle max-w-prose text-pretty\">\n This action cannot be undone. This will permanently delete the{\" \"}\n <span className=\"font-medium text-kumo-default\">\n {resourceName}\n </span>{\" \"}\n {resourceType.toLowerCase()}.\n </p>\n </div>\n\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex items-center gap-1.5 text-base\">\n <span>\n Type{\" \"}\n <button\n className=\"font-mono text-sm inline font-semibold bg-kumo-tint hover:bg-kumo-fill rounded-md px-2 py-1 group hover:cursor-pointer\"\n onClick={handleCopy}\n aria-label={`Copy ${resourceName} to clipboard`}\n >\n {resourceName}\n\n {copied ? (\n <CheckIcon\n size={12}\n weight=\"bold\"\n className=\"inline ml-1.5\"\n />\n ) : (\n <CopyIcon\n size={12}\n weight=\"bold\"\n className=\"inline text-kumo-subtle group-hover:text-kumo-default ml-1.5\"\n />\n )}\n </button>{\" \"}\n to confirm:\n </span>\n </div>\n <Input\n placeholder={resourceName}\n value={confirmationInput}\n onChange={(e) => setConfirmationInput(e.target.value)}\n disabled={isDeleting}\n autoComplete=\"off\"\n autoCorrect=\"off\"\n autoCapitalize=\"off\"\n spellCheck={false}\n aria-label={`Type ${resourceName} to confirm deletion`}\n className=\"w-full\"\n />\n </div>\n </div>\n\n <div className=\"flex justify-end gap-3 border-t border-kumo-line px-6 py-4\">\n <DialogClose>\n <Button variant=\"secondary\" disabled={isDeleting}>\n Cancel\n </Button>\n </DialogClose>\n <Button\n variant=\"destructive\"\n onClick={handleDelete}\n disabled={!isConfirmed || isDeleting}\n loading={isDeleting}\n >\n {deleteButtonText || `Delete ${resourceType}`}\n </Button>\n </div>\n </Dialog>\n </DialogRoot>\n );\n}\n\nDeleteResource.displayName = \"DeleteResource\";\n"],"names":["KUMO_DELETE_RESOURCE_VARIANTS","KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS","DeleteResource","open","onOpenChange","resourceType","resourceName","onDelete","isDeleting","caseSensitive","deleteButtonText","size","errorMessage","className","confirmationInput","setConfirmationInput","useState","copied","setCopied","useEffect","normalizeForComparison","useCallback","str","isConfirmed","handleDelete","handleCopy","jsx","DialogRoot","jsxs","Dialog","cn","DialogTitle","DialogClose","Button","XIcon","Banner","WarningCircleIcon","CheckIcon","CopyIcon","Input","e"],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EAH,EAAe,cAAc;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/blocks/delete-resource/delete-resource.tsx"],"sourcesContent":["import { useState, useCallback, useEffect } from \"react\";\nimport {\n Dialog,\n DialogRoot,\n DialogTitle,\n DialogClose,\n} from \"../../components/dialog\";\nimport { Input } from \"../../components/input\";\nimport { Button } from \"../../components/button\";\nimport { cn } from \"../../utils/cn\";\nimport {\n CheckIcon,\n CopyIcon,\n WarningCircleIcon,\n XIcon,\n} from \"@phosphor-icons/react\";\nimport { Banner } from \"../../components/banner\";\n\nexport const KUMO_DELETE_RESOURCE_VARIANTS = {\n size: {\n sm: {\n classes: \"\",\n description: \"Small dialog for simple delete confirmations\",\n },\n base: {\n classes: \"\",\n description: \"Default delete confirmation dialog size\",\n },\n },\n} as const;\n\nexport const KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS = {\n size: \"base\",\n} as const;\n\nexport type KumoDeleteResourceSize =\n keyof typeof KUMO_DELETE_RESOURCE_VARIANTS.size;\n\nexport interface KumoDeleteResourceVariantsProps {\n size?: KumoDeleteResourceSize;\n}\n\nexport interface DeleteResourceProps extends KumoDeleteResourceVariantsProps {\n /** Whether the dialog is open */\n open: boolean;\n /** Callback when open state changes */\n onOpenChange: (open: boolean) => void;\n /** The type of resource being deleted (e.g., \"Zone\", \"Worker\", \"KV Namespace\") */\n resourceType: string;\n /** The name of the specific resource being deleted */\n resourceName: string;\n /** Callback when delete is confirmed */\n onDelete: () => void | Promise<void>;\n /** Whether the delete action is in progress */\n isDeleting?: boolean;\n /** Whether the confirmation input should be case-sensitive (default: true) */\n caseSensitive?: boolean;\n /** Custom delete button text (defaults to \"Delete {resourceType}\") */\n deleteButtonText?: string;\n /** Additional className for the dialog */\n className?: string;\n /** Error message to display if the delete action fails */\n errorMessage?: string;\n}\n\nexport function DeleteResource({\n open,\n onOpenChange,\n resourceType,\n resourceName,\n onDelete,\n isDeleting = false,\n caseSensitive = true,\n deleteButtonText,\n size = KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS.size,\n errorMessage,\n className,\n}: DeleteResourceProps) {\n const [confirmationInput, setConfirmationInput] = useState(\"\");\n const [copied, setCopied] = useState(false);\n\n useEffect(() => {\n if (!open) {\n setConfirmationInput(\"\");\n setCopied(false);\n }\n }, [open]);\n\n const normalizeForComparison = useCallback(\n (str: string) => (caseSensitive ? str : str.toLowerCase()),\n [caseSensitive],\n );\n\n const isConfirmed =\n normalizeForComparison(confirmationInput) ===\n normalizeForComparison(resourceName);\n\n const handleDelete = useCallback(async () => {\n if (!isConfirmed || isDeleting) return;\n await onDelete();\n }, [isConfirmed, isDeleting, onDelete]);\n\n const handleCopy = useCallback(async () => {\n await navigator.clipboard.writeText(resourceName);\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n }, [resourceName]);\n\n return (\n <DialogRoot open={open} onOpenChange={onOpenChange}>\n <Dialog size={size} className={cn(\"p-0\", className)}>\n <div className=\"flex items-center justify-between border-b border-kumo-line px-6 py-4\">\n <DialogTitle className=\"text-lg font-semibold\">\n Delete {resourceName}\n </DialogTitle>\n <DialogClose>\n <Button\n variant=\"ghost\"\n shape=\"square\"\n size=\"sm\"\n aria-label=\"Close\"\n disabled={isDeleting}\n >\n <XIcon size={18} />\n </Button>\n </DialogClose>\n </div>\n\n <div className=\"flex flex-col p-6 gap-4\">\n <div className=\"flex flex-col gap-2\">\n {errorMessage && (\n <Banner icon={<WarningCircleIcon />} variant=\"error\">\n {errorMessage}\n </Banner>\n )}\n <p className=\"text-base text-kumo-subtle max-w-prose text-pretty\">\n This action cannot be undone. This will permanently delete the{\" \"}\n <span className=\"font-medium text-kumo-default\">\n {resourceName}\n </span>{\" \"}\n {resourceType.toLowerCase()}.\n </p>\n </div>\n\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex items-center gap-1.5 text-base\">\n <span>\n Type{\" \"}\n <button\n className=\"font-mono text-sm inline font-semibold bg-kumo-tint hover:bg-kumo-fill rounded-md px-2 py-1 group hover:cursor-pointer\"\n onClick={handleCopy}\n aria-label={`Copy ${resourceName} to clipboard`}\n >\n {resourceName}\n\n {copied ? (\n <CheckIcon\n size={12}\n weight=\"bold\"\n className=\"inline ml-1.5\"\n />\n ) : (\n <CopyIcon\n size={12}\n weight=\"bold\"\n className=\"inline text-kumo-subtle group-hover:text-kumo-default ml-1.5\"\n />\n )}\n </button>{\" \"}\n to confirm:\n </span>\n </div>\n <Input\n placeholder={resourceName}\n value={confirmationInput}\n onChange={(e) => setConfirmationInput(e.target.value)}\n disabled={isDeleting}\n autoComplete=\"off\"\n autoCorrect=\"off\"\n autoCapitalize=\"off\"\n spellCheck={false}\n aria-label={`Type ${resourceName} to confirm deletion`}\n className=\"w-full\"\n />\n </div>\n </div>\n\n <div className=\"flex justify-end gap-3 border-t border-kumo-line px-6 py-4\">\n <DialogClose>\n <Button variant=\"secondary\" disabled={isDeleting}>\n Cancel\n </Button>\n </DialogClose>\n <Button\n variant=\"destructive\"\n onClick={handleDelete}\n disabled={!isConfirmed || isDeleting}\n loading={isDeleting}\n >\n {deleteButtonText || `Delete ${resourceType}`}\n </Button>\n </div>\n </Dialog>\n </DialogRoot>\n );\n}\n\nDeleteResource.displayName = \"DeleteResource\";\n"],"names":["KUMO_DELETE_RESOURCE_VARIANTS","KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS","DeleteResource","open","onOpenChange","resourceType","resourceName","onDelete","isDeleting","caseSensitive","deleteButtonText","size","errorMessage","className","confirmationInput","setConfirmationInput","useState","copied","setCopied","useEffect","normalizeForComparison","useCallback","str","isConfirmed","handleDelete","handleCopy","jsx","DialogRoot","jsxs","Dialog","cn","DialogTitle","DialogClose","Button","XIcon","Banner","WarningCircleIcon","CheckIcon","CopyIcon","Input","e"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,MAAMA,IAAgC;AAAA,EAC3C,MAAM;AAAA,IACJ,IAAI;AAAA,MACF,SAAS;AAAA,MACT,aAAa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AAA,kBAAA;AAAA,oBACC,MAAM;AAAA,oBACN,QAAO;AAAA,oBACP,WAAU;AAAA,kBAAA;AAAA,gBAAA,IAGZ,gBAAAX;AAAA,kBAACY;AAAA,kBAAA;AAAA,oBACC,MAAM;AAAA,oBACN,QAAO;AAAA,oBACP,WAAU;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACZ;AAAA,YAAA;AAAA,UAAA;AAAA,UAEM;AAAA,UAAI;AAAA,QAAA,EAAA,CAEhB,EAAA,CACF;AAAA,QACA,gBAAAZ;AAAA,UAACa;AAAA,UAAA;AAAA,YACC,aAAajC;AAAA,YACb,OAAOQ;AAAA,YACP,UAAU,CAAC0B,MAAMzB,EAAqByB,EAAE,OAAO,KAAK;AAAA,YACpD,UAAUhC;AAAA,YACV,cAAa;AAAA,YACb,aAAY;AAAA,YACZ,gBAAe;AAAA,YACf,YAAY;AAAA,YACZ,cAAY,QAAQF,CAAY;AAAA,YAChC,WAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MACZ,EAAA,CACF;AAAA,IAAA,GACF;AAAA,IAEA,gBAAAsB,EAAC,OAAA,EAAI,WAAU,8DACb,UAAA;AAAA,MAAA,gBAAAF,EAACM,GAAA,EACC,4BAACC,GAAA,EAAO,SAAQ,aAAY,UAAUzB,GAAY,oBAElD,EAAA,CACF;AAAA,MACA,gBAAAkB;AAAA,QAACO;AAAA,QAAA;AAAA,UACC,SAAQ;AAAA,UACR,SAAST;AAAA,UACT,UAAU,CAACD,KAAef;AAAA,UAC1B,SAASA;AAAA,UAER,UAAAE,KAAoB,UAAUL,CAAY;AAAA,QAAA;AAAA,MAAA;AAAA,IAC7C,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;AAEAH,EAAe,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-D6YgDfDG.js","sources":["../src/components/input/input.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn\";\nimport {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from \"react\";\nimport { Input as BaseInput } from \"@base-ui/react/input\";\nimport { Field, type FieldErrorMatch } from \"../field/field\";\n\nexport const KUMO_INPUT_VARIANTS = {\n size: {\n xs: {\n classes: \"h-5 gap-1 rounded-sm px-1.5 text-xs\",\n description: \"Extra small input for compact UIs\",\n },\n sm: {\n classes: \"h-6.5 gap-1 rounded-md px-2 text-xs\",\n description: \"Small input for secondary fields\",\n },\n base: {\n classes: \"h-9 gap-1.5 rounded-lg px-3 text-base\",\n description: \"Default input size\",\n },\n lg: {\n classes: \"h-10 gap-2 rounded-lg px-4 text-base\",\n description: \"Large input for prominent fields\",\n },\n },\n variant: {\n default: {\n classes: \"focus:ring-kumo-ring\",\n description: \"Default input appearance\",\n },\n error: {\n classes: \"!ring-kumo-danger focus:ring-kumo-danger\",\n description: \"Error state for validation failures\",\n },\n },\n} as const;\n\nexport const KUMO_INPUT_DEFAULT_VARIANTS = {\n size: \"base\",\n variant: \"default\",\n} as const;\n\nexport const KUMO_INPUT_STYLING = {\n dimensions: {\n xs: { height: 20, paddingX: 6, fontSize: 12, borderRadius: 2, width: 160 },\n sm: { height: 26, paddingX: 8, fontSize: 12, borderRadius: 6, width: 200 },\n base: {\n height: 36,\n paddingX: 12,\n fontSize: 16,\n borderRadius: 8,\n width: 280,\n },\n lg: { height: 40, paddingX: 16, fontSize: 16, borderRadius: 8, width: 320 },\n },\n baseTokens: {\n background: \"color-secondary\",\n text: \"text-color-surface\",\n placeholder: \"text-color-muted\",\n ring: \"color-border\",\n },\n stateTokens: {\n focus: { ring: \"color-active\" },\n error: { ring: \"color-error\" },\n disabled: { opacity: 0.5, text: \"text-color-muted\" },\n },\n} as const;\n\n// Derived types from KUMO_INPUT_VARIANTS\nexport type KumoInputSize = keyof typeof KUMO_INPUT_VARIANTS.size;\nexport type KumoInputVariant = keyof typeof KUMO_INPUT_VARIANTS.variant;\n\nexport interface KumoInputVariantsProps {\n size?: KumoInputSize;\n variant?: KumoInputVariant;\n parentFocusIndicator?: boolean;\n focusIndicator?: boolean;\n}\n\n// Omit native `size` attribute (number) to avoid conflict with our custom `size` variant\ntype BaseInputProps = Omit<ComponentPropsWithoutRef<typeof BaseInput>, \"size\">;\n\nexport function inputVariants({\n variant = KUMO_INPUT_DEFAULT_VARIANTS.variant,\n size = KUMO_INPUT_DEFAULT_VARIANTS.size,\n parentFocusIndicator = false,\n focusIndicator = false,\n}: KumoInputVariantsProps = {}) {\n return cn(\n // Base styles\n \"border-0 bg-kumo-control text-kumo-default ring ring-kumo-line\",\n // Disabled state and placeholder styles\n \"outline-none placeholder:text-kumo-subtle disabled:text-kumo-subtle\",\n // Apply size styles from KUMO_INPUT_VARIANTS\n KUMO_INPUT_VARIANTS.size[size].classes,\n // Apply variant styles from KUMO_INPUT_VARIANTS\n KUMO_INPUT_VARIANTS.variant[variant].classes,\n // Focus state handling\n parentFocusIndicator && \"[&:has(:focus-within)]:ring-kumo-ring\",\n focusIndicator && \"focus:ring-kumo-ring\",\n );\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>((props, ref) => {\n const {\n className,\n size = \"base\",\n variant = \"default\",\n label,\n labelTooltip,\n description,\n error,\n ...inputProps\n } = props;\n\n // Extract required from inputProps to pass to Field for label decoration\n const { required } = inputProps;\n\n // A11y enforcement: warn in dev if no accessible name provided\n if (process.env.NODE_ENV !== \"production\") {\n const hasLabel = Boolean(label);\n const hasPlaceholderAndAriaLabel = Boolean(\n inputProps.placeholder && inputProps[\"aria-label\"],\n );\n const hasAriaLabelledBy = Boolean(inputProps[\"aria-labelledby\"]);\n\n if (!hasLabel && !hasPlaceholderAndAriaLabel && !hasAriaLabelledBy) {\n console.warn(\n \"[Kumo Input]: Input must have an accessible name. Provide either:\\n\" +\n \" - label prop: <Input label='Email' />\\n\" +\n \" - placeholder + aria-label: <Input placeholder='Email' aria-label='Email address' />\\n\" +\n \" - aria-labelledby for custom label association\",\n );\n }\n }\n\n const input = (\n <BaseInput\n ref={ref}\n className={cn(\n inputVariants({ size, variant, focusIndicator: true }),\n className,\n )}\n {...inputProps}\n />\n );\n\n // Render with Field wrapper if label is provided\n if (label) {\n return (\n <Field\n label={label}\n required={required}\n labelTooltip={labelTooltip}\n description={description}\n error={\n error\n ? typeof error === \"string\"\n ? { message: error, match: true }\n : error\n : undefined\n }\n >\n {input}\n </Field>\n );\n }\n\n // Render bare input without Field wrapper\n return input;\n});\n\nInput.displayName = \"Input\";\n\n/**\n * Input component props with accessibility guidance.\n *\n * **Accessible Name Required:** Input should have one of:\n * 1. `label` prop (recommended) - enables Field wrapper with label/description/error\n * 2. `placeholder` + `aria-label` - for bare inputs with visual placeholder\n * 3. `aria-labelledby` - for custom label association\n *\n * Missing accessible names will trigger console warnings in development.\n *\n * @example\n * // Recommended: Built-in Field wrapper\n * <Input label=\"Email\" placeholder=\"you@example.com\" />\n *\n * @example\n * // Bare input with placeholder and aria-label\n * <Input placeholder=\"Search...\" aria-label=\"Search products\" />\n *\n * @example\n * // Custom label association\n * <label id=\"email-label\">Email</label>\n * <Input aria-labelledby=\"email-label\" />\n *\n * @example\n * // With description and error\n * <Input\n * label=\"Password\"\n * description=\"Must be at least 8 characters\"\n * error=\"Password is too short\"\n * variant=\"error\"\n * />\n */\nexport type InputProps = Pick<KumoInputVariantsProps, \"size\" | \"variant\"> &\n BaseInputProps & {\n /** Label content for the input (enables Field wrapper) - can be a string or any React node */\n label?: ReactNode;\n /** Tooltip content to display next to the label via an info icon */\n labelTooltip?: ReactNode;\n /** Helper text displayed below the input */\n description?: ReactNode;\n /** Error message or validation error object */\n error?: string | { message: ReactNode; match: FieldErrorMatch };\n };\n"],"names":["KUMO_INPUT_VARIANTS","KUMO_INPUT_DEFAULT_VARIANTS","inputVariants","variant","size","parentFocusIndicator","focusIndicator","cn","Input","forwardRef","props","ref","className","label","labelTooltip","description","error","inputProps","required","hasLabel","hasPlaceholderAndAriaLabel","hasAriaLabelledBy","input","jsx","BaseInput","Field"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"input-D6YgDfDG.js","sources":["../src/components/input/input.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn\";\nimport {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from \"react\";\nimport { Input as BaseInput } from \"@base-ui/react/input\";\nimport { Field, type FieldErrorMatch } from \"../field/field\";\n\n/** Input size and variant definitions mapping names to their Tailwind classes. */\nexport const KUMO_INPUT_VARIANTS = {\n size: {\n xs: {\n classes: \"h-5 gap-1 rounded-sm px-1.5 text-xs\",\n description: \"Extra small input for compact UIs\",\n },\n sm: {\n classes: \"h-6.5 gap-1 rounded-md px-2 text-xs\",\n description: \"Small input for secondary fields\",\n },\n base: {\n classes: \"h-9 gap-1.5 rounded-lg px-3 text-base\",\n description: \"Default input size\",\n },\n lg: {\n classes: \"h-10 gap-2 rounded-lg px-4 text-base\",\n description: \"Large input for prominent fields\",\n },\n },\n variant: {\n default: {\n classes: \"focus:ring-kumo-ring\",\n description: \"Default input appearance\",\n },\n error: {\n classes: \"!ring-kumo-danger focus:ring-kumo-danger\",\n description: \"Error state for validation failures\",\n },\n },\n} as const;\n\nexport const KUMO_INPUT_DEFAULT_VARIANTS = {\n size: \"base\",\n variant: \"default\",\n} as const;\n\nexport const KUMO_INPUT_STYLING = {\n dimensions: {\n xs: { height: 20, paddingX: 6, fontSize: 12, borderRadius: 2, width: 160 },\n sm: { height: 26, paddingX: 8, fontSize: 12, borderRadius: 6, width: 200 },\n base: {\n height: 36,\n paddingX: 12,\n fontSize: 16,\n borderRadius: 8,\n width: 280,\n },\n lg: { height: 40, paddingX: 16, fontSize: 16, borderRadius: 8, width: 320 },\n },\n baseTokens: {\n background: \"color-secondary\",\n text: \"text-color-surface\",\n placeholder: \"text-color-muted\",\n ring: \"color-border\",\n },\n stateTokens: {\n focus: { ring: \"color-active\" },\n error: { ring: \"color-error\" },\n disabled: { opacity: 0.5, text: \"text-color-muted\" },\n },\n} as const;\n\n// Derived types from KUMO_INPUT_VARIANTS\nexport type KumoInputSize = keyof typeof KUMO_INPUT_VARIANTS.size;\nexport type KumoInputVariant = keyof typeof KUMO_INPUT_VARIANTS.variant;\n\nexport interface KumoInputVariantsProps {\n /**\n * Input size.\n * - `\"xs\"` — Extra small for compact UIs\n * - `\"sm\"` — Small for secondary fields\n * - `\"base\"` — Default size\n * - `\"lg\"` — Large for prominent fields\n * @default \"base\"\n */\n size?: KumoInputSize;\n /**\n * Visual variant.\n * - `\"default\"` — Standard input\n * - `\"error\"` — Error state for validation failures\n * @default \"default\"\n */\n variant?: KumoInputVariant;\n parentFocusIndicator?: boolean;\n focusIndicator?: boolean;\n}\n\n// Omit native `size` attribute (number) to avoid conflict with our custom `size` variant\ntype BaseInputProps = Omit<ComponentPropsWithoutRef<typeof BaseInput>, \"size\">;\n\nexport function inputVariants({\n variant = KUMO_INPUT_DEFAULT_VARIANTS.variant,\n size = KUMO_INPUT_DEFAULT_VARIANTS.size,\n parentFocusIndicator = false,\n focusIndicator = false,\n}: KumoInputVariantsProps = {}) {\n return cn(\n // Base styles\n \"border-0 bg-kumo-control text-kumo-default ring ring-kumo-line\",\n // Disabled state and placeholder styles\n \"outline-none placeholder:text-kumo-subtle disabled:text-kumo-subtle\",\n // Apply size styles from KUMO_INPUT_VARIANTS\n KUMO_INPUT_VARIANTS.size[size].classes,\n // Apply variant styles from KUMO_INPUT_VARIANTS\n KUMO_INPUT_VARIANTS.variant[variant].classes,\n // Focus state handling\n parentFocusIndicator && \"[&:has(:focus-within)]:ring-kumo-ring\",\n focusIndicator && \"focus:ring-kumo-ring\",\n );\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>((props, ref) => {\n const {\n className,\n size = \"base\",\n variant = \"default\",\n label,\n labelTooltip,\n description,\n error,\n ...inputProps\n } = props;\n\n // Extract required from inputProps to pass to Field for label decoration\n const { required } = inputProps;\n\n // A11y enforcement: warn in dev if no accessible name provided\n if (process.env.NODE_ENV !== \"production\") {\n const hasLabel = Boolean(label);\n const hasPlaceholderAndAriaLabel = Boolean(\n inputProps.placeholder && inputProps[\"aria-label\"],\n );\n const hasAriaLabelledBy = Boolean(inputProps[\"aria-labelledby\"]);\n\n if (!hasLabel && !hasPlaceholderAndAriaLabel && !hasAriaLabelledBy) {\n console.warn(\n \"[Kumo Input]: Input must have an accessible name. Provide either:\\n\" +\n \" - label prop: <Input label='Email' />\\n\" +\n \" - placeholder + aria-label: <Input placeholder='Email' aria-label='Email address' />\\n\" +\n \" - aria-labelledby for custom label association\",\n );\n }\n }\n\n const input = (\n <BaseInput\n ref={ref}\n className={cn(\n inputVariants({ size, variant, focusIndicator: true }),\n className,\n )}\n {...inputProps}\n />\n );\n\n // Render with Field wrapper if label is provided\n if (label) {\n return (\n <Field\n label={label}\n required={required}\n labelTooltip={labelTooltip}\n description={description}\n error={\n error\n ? typeof error === \"string\"\n ? { message: error, match: true }\n : error\n : undefined\n }\n >\n {input}\n </Field>\n );\n }\n\n // Render bare input without Field wrapper\n return input;\n});\n\nInput.displayName = \"Input\";\n\n/**\n * Input component props with accessibility guidance.\n *\n * **Accessible Name Required:** Input should have one of:\n * 1. `label` prop (recommended) - enables Field wrapper with label/description/error\n * 2. `placeholder` + `aria-label` - for bare inputs with visual placeholder\n * 3. `aria-labelledby` - for custom label association\n *\n * Missing accessible names will trigger console warnings in development.\n *\n * @example\n * // Recommended: Built-in Field wrapper\n * <Input label=\"Email\" placeholder=\"you@example.com\" />\n *\n * @example\n * // Bare input with placeholder and aria-label\n * <Input placeholder=\"Search...\" aria-label=\"Search products\" />\n *\n * @example\n * // Custom label association\n * <label id=\"email-label\">Email</label>\n * <Input aria-labelledby=\"email-label\" />\n *\n * @example\n * // With description and error\n * <Input\n * label=\"Password\"\n * description=\"Must be at least 8 characters\"\n * error=\"Password is too short\"\n * variant=\"error\"\n * />\n */\nexport type InputProps = Pick<KumoInputVariantsProps, \"size\" | \"variant\"> &\n BaseInputProps & {\n /** Label content for the input (enables Field wrapper) - can be a string or any React node */\n label?: ReactNode;\n /** Tooltip content to display next to the label via an info icon */\n labelTooltip?: ReactNode;\n /** Helper text displayed below the input */\n description?: ReactNode;\n /** Error message or validation error object */\n error?: string | { message: ReactNode; match: FieldErrorMatch };\n };\n"],"names":["KUMO_INPUT_VARIANTS","KUMO_INPUT_DEFAULT_VARIANTS","inputVariants","variant","size","parentFocusIndicator","focusIndicator","cn","Input","forwardRef","props","ref","className","label","labelTooltip","description","error","inputProps","required","hasLabel","hasPlaceholderAndAriaLabel","hasAriaLabelledBy","input","jsx","BaseInput","Field"],"mappings":";;;;;;AAUO,MAAMA,IAAsB;AAAA,EACjC,MAAM;AAAA,IACJ,IAAI;AAAA,MACF,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,IAAI;AAAA,MACF,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,IAAI;AAAA,MACF,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,EACf;AAAA,EAEF,SAAS;AAAA,IACP,SAAS;AAAA,MACP,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,IAEf,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GAEaC,IAA8B;AAAA,EACzC,MAAM;AAAA,EACN,SAAS;AACX;AAwDO,SAASC,EAAc;AAAA,EAC5B,SAAAC,IAAUF,EAA4B;AAAA,EACtC,MAAAG,IAAOH,EAA4B;AAAA,EACnC,sBAAAI,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AACnB,IAA4B,IAAI;AAC9B,SAAOC;AAAA;AAAA,IAEL;AAAA;AAAA,IAEA;AAAA;AAAA,IAEAP,EAAoB,KAAKI,CAAI,EAAE;AAAA;AAAA,IAE/BJ,EAAoB,QAAQG,CAAO,EAAE;AAAA;AAAA,IAErCE,KAAwB;AAAA,IACxBC,KAAkB;AAAA,EAAA;AAEtB;AAEO,MAAME,IAAQC,EAAyC,CAACC,GAAOC,MAAQ;AAC5E,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,MAAAR,IAAO;AAAA,IACP,SAAAD,IAAU;AAAA,IACV,OAAAU;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDP,GAGE,EAAE,UAAAQ,MAAaD;AAGrB,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,UAAME,IAAW,EAAQN,GACnBO,IAA6B,GACjCH,EAAW,eAAeA,EAAW,YAAY,IAE7CI,IAAoB,EAAQJ,EAAW,iBAAiB;AAE9D,IAAI,CAACE,KAAY,CAACC,KAA8B,CAACC,KAC/C,QAAQ;AAAA,MACN;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,EAMN;AAEA,QAAMC,IACJ,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,KAAAb;AAAA,MACA,WAAWJ;AAAA,QACTL,EAAc,EAAE,MAAAE,GAAM,SAAAD,GAAS,gBAAgB,IAAM;AAAA,QACrDS;AAAA,MAAA;AAAA,MAED,GAAGK;AAAA,IAAA;AAAA,EAAA;AAKR,SAAIJ,IAEA,gBAAAU;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAAZ;AAAA,MACA,UAAAK;AAAA,MACA,cAAAJ;AAAA,MACA,aAAAC;AAAA,MACA,OACEC,IACI,OAAOA,KAAU,WACf,EAAE,SAASA,GAAO,OAAO,GAAA,IACzBA,IACF;AAAA,MAGL,UAAAM;AAAA,IAAA;AAAA,EAAA,IAMAA;AACT,CAAC;AAEDd,EAAM,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-B4FY8MX_.js","sources":["../src/components/label/label.tsx"],"sourcesContent":["import { Info } from \"@phosphor-icons/react\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Tooltip } from \"../tooltip\";\n\nexport const KUMO_LABEL_VARIANTS = {\n // Label currently has no variant options but structure is ready for future additions\n} as const;\n\nexport const KUMO_LABEL_DEFAULT_VARIANTS = {} as const;\n\n// Derived types from KUMO_LABEL_VARIANTS\nexport interface KumoLabelVariantsProps {}\n\nexport function labelVariants(_props: KumoLabelVariantsProps = {}) {\n return cn(\n // Base styles - when used standalone, apply text styling\n // When used inside Field, the parent FieldBase.Label provides these styles\n \"text-base font-medium text-kumo-default\",\n );\n}\n\nexport function labelContentVariants() {\n return cn(\n // Content wrapper styles - always applied\n \"inline-flex items-center gap-1\",\n );\n}\n\nexport interface LabelProps extends KumoLabelVariantsProps {\n /** The label content
|
|
1
|
+
{"version":3,"file":"label-B4FY8MX_.js","sources":["../src/components/label/label.tsx"],"sourcesContent":["import { Info } from \"@phosphor-icons/react\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Tooltip } from \"../tooltip\";\n\n/** Label variant definitions (currently empty, reserved for future additions). */\nexport const KUMO_LABEL_VARIANTS = {\n // Label currently has no variant options but structure is ready for future additions\n} as const;\n\nexport const KUMO_LABEL_DEFAULT_VARIANTS = {} as const;\n\n// Derived types from KUMO_LABEL_VARIANTS\nexport interface KumoLabelVariantsProps {}\n\nexport function labelVariants(_props: KumoLabelVariantsProps = {}) {\n return cn(\n // Base styles - when used standalone, apply text styling\n // When used inside Field, the parent FieldBase.Label provides these styles\n \"text-base font-medium text-kumo-default\",\n );\n}\n\nexport function labelContentVariants() {\n return cn(\n // Content wrapper styles - always applied\n \"inline-flex items-center gap-1\",\n );\n}\n\n/**\n * Label component props.\n *\n * @example\n * ```tsx\n * <Label>Email</Label>\n * <Label showOptional>Middle Name</Label>\n * <Label tooltip=\"We'll use this to send you updates\">Email</Label>\n * ```\n */\nexport interface LabelProps extends KumoLabelVariantsProps {\n /** The label content — can be a string or any React node. */\n children: ReactNode;\n /** When `true`, shows gray \"(optional)\" text after the label. */\n showOptional?: boolean;\n /** Tooltip content displayed next to the label via an info icon. */\n tooltip?: ReactNode;\n /** Additional CSS classes merged via `cn()`. */\n className?: string;\n /**\n * When `true`, only renders the inline content (indicators, tooltip) without\n * the outer span with font styling. Useful when composed inside another\n * label element that already provides the text styling.\n * @default false\n */\n asContent?: boolean;\n}\n\n/**\n * Label component for form fields.\n *\n * Provides a standardized way to display labels with optional indicators:\n * - Optional indicator: gray \"(optional)\" text when `showOptional={true}`\n * - Tooltip: info icon with hover tooltip for additional context\n *\n * @example\n * // Basic label\n * <Label>Email</Label>\n *\n * @example\n * // Optional field with indicator\n * <Label showOptional>Middle Name</Label>\n *\n * @example\n * // With tooltip\n * <Label tooltip=\"We'll use this to send you updates\">Email</Label>\n *\n * @example\n * // With ReactNode children\n * <Label>\n * <span>Custom label with <strong>bold</strong> text</span>\n * </Label>\n */\nexport function Label({\n children,\n showOptional = false,\n tooltip,\n className,\n asContent = false,\n}: LabelProps) {\n const content = (\n <>\n {children}\n {showOptional && (\n <span className=\"font-normal text-kumo-strong\">(optional)</span>\n )}\n {tooltip && (\n <Tooltip content={tooltip}>\n <Info\n className=\"size-4 cursor-help text-kumo-strong\"\n aria-label=\"More information\"\n />\n </Tooltip>\n )}\n </>\n );\n\n // When used as content inside another styled element, just render inline\n if (asContent) {\n return (\n <span className={cn(labelContentVariants(), className)}>{content}</span>\n );\n }\n\n // When used standalone, apply full label styling\n return (\n <span className={cn(labelVariants(), labelContentVariants(), className)}>\n {content}\n </span>\n );\n}\n\nLabel.displayName = \"Label\";\n"],"names":["KUMO_LABEL_VARIANTS","KUMO_LABEL_DEFAULT_VARIANTS","labelVariants","_props","cn","labelContentVariants","Label","children","showOptional","tooltip","className","asContent","content","jsxs","Fragment","jsx","Tooltip","Info"],"mappings":";;;;;AAMO,MAAMA,IAAsB;AAAA;AAEnC,GAEaC,IAA8B,CAAA;AAKpC,SAASC,EAAcC,IAAiC,IAAI;AACjE,SAAOC;AAAA;AAAA;AAAA,IAGL;AAAA,EAAA;AAEJ;AAEO,SAASC,IAAuB;AACrC,SAAOD;AAAA;AAAA,IAEL;AAAA,EAAA;AAEJ;AAuDO,SAASE,EAAM;AAAA,EACpB,UAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAAe;AACb,QAAMC,IACJ,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAP;AAAA,IACAC,KACC,gBAAAO,EAAC,QAAA,EAAK,WAAU,gCAA+B,UAAA,cAAU;AAAA,IAE1DN,KACC,gBAAAM,EAACC,GAAA,EAAQ,SAASP,GAChB,UAAA,gBAAAM;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,cAAW;AAAA,MAAA;AAAA,IAAA,EACb,CACF;AAAA,EAAA,GAEJ;AAIF,SAAIN,IAEA,gBAAAI,EAAC,UAAK,WAAWX,EAAGC,KAAwBK,CAAS,GAAI,UAAAE,GAAQ,IAMnE,gBAAAG,EAAC,QAAA,EAAK,WAAWX,EAAGF,KAAiBG,EAAA,GAAwBK,CAAS,GACnE,UAAAE,EAAA,CACH;AAEJ;AAEAN,EAAM,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-card-C8j5Hkkj.js","sources":["../src/components/layer-card/layer-card.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nexport const KUMO_LAYER_CARD_VARIANTS = {\n // LayerCard currently has no variant options but structure is ready for future additions\n} as const;\n\nexport const KUMO_LAYER_CARD_DEFAULT_VARIANTS = {} as const;\n\n// Derived types from KUMO_LAYER_CARD_VARIANTS\nexport interface KumoLayerCardVariantsProps {}\n\nexport function layerCardVariants(_props: KumoLayerCardVariantsProps = {}) {\n return cn(\n // Base styles\n \"flex w-full flex-col overflow-hidden rounded-lg bg-kumo-elevated text-base ring ring-kumo-line\",\n );\n}\n\nexport type LayerCardProps = PropsWithChildren<\n KumoLayerCardVariantsProps & { className?: string
|
|
1
|
+
{"version":3,"file":"layer-card-C8j5Hkkj.js","sources":["../src/components/layer-card/layer-card.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** LayerCard variant definitions (currently empty, reserved for future additions). */\nexport const KUMO_LAYER_CARD_VARIANTS = {\n // LayerCard currently has no variant options but structure is ready for future additions\n} as const;\n\nexport const KUMO_LAYER_CARD_DEFAULT_VARIANTS = {} as const;\n\n// Derived types from KUMO_LAYER_CARD_VARIANTS\nexport interface KumoLayerCardVariantsProps {}\n\nexport function layerCardVariants(_props: KumoLayerCardVariantsProps = {}) {\n return cn(\n // Base styles\n \"flex w-full flex-col overflow-hidden rounded-lg bg-kumo-elevated text-base ring ring-kumo-line\",\n );\n}\n\n/**\n * LayerCard component props.\n *\n * @example\n * ```tsx\n * <LayerCard>\n * <LayerCard.Secondary>Next Steps</LayerCard.Secondary>\n * <LayerCard.Primary>Get started with Kumo</LayerCard.Primary>\n * </LayerCard>\n * ```\n */\nexport type LayerCardProps = PropsWithChildren<\n KumoLayerCardVariantsProps & {\n /** Additional CSS classes merged via `cn()`. */\n className?: string;\n }\n>;\n\n/**\n * Elevated card with primary/secondary content layers for dashboard widgets.\n *\n * @example\n * ```tsx\n * <LayerCard>\n * <LayerCard.Secondary>Getting Started</LayerCard.Secondary>\n * <LayerCard.Primary>Quick start guide</LayerCard.Primary>\n * </LayerCard>\n * ```\n */\nfunction LayerCardRoot({ children, className }: LayerCardProps) {\n return <div className={cn(layerCardVariants(), className)}>{children}</div>;\n}\n\nfunction LayerCardSecondary({ children, className }: LayerCardProps) {\n return (\n <div\n className={cn(\n \"flex items-center gap-2 p-2 text-base font-medium text-kumo-strong\",\n className,\n )}\n >\n {children}\n </div>\n );\n}\n\nfunction LayerCardPrimary({ children, className }: LayerCardProps) {\n return (\n <div\n className={cn(\n \"flex flex-col gap-2 overflow-hidden rounded-lg bg-kumo-base p-4 pr-3 text-inherit no-underline ring ring-kumo-fill\",\n className,\n )}\n >\n {children}\n </div>\n );\n}\n\ntype LayerCardComponent = FC<LayerCardProps> & {\n Primary: FC<LayerCardProps>;\n Secondary: FC<LayerCardProps>;\n};\n\nconst LayerCard = Object.assign(LayerCardRoot, {\n Primary: LayerCardPrimary,\n Secondary: LayerCardSecondary,\n}) as LayerCardComponent;\n\nexport { LayerCard };\n"],"names":["layerCardVariants","_props","cn","LayerCardRoot","children","className","jsx","LayerCardSecondary","LayerCardPrimary","LayerCard"],"mappings":";;;AAaO,SAASA,EAAkBC,IAAqC,IAAI;AACzE,SAAOC;AAAA;AAAA,IAEL;AAAA,EAAA;AAEJ;AA+BA,SAASC,EAAc,EAAE,UAAAC,GAAU,WAAAC,KAA6B;AAC9D,SAAO,gBAAAC,EAAC,SAAI,WAAWJ,EAAGF,KAAqBK,CAAS,GAAI,UAAAD,GAAS;AACvE;AAEA,SAASG,EAAmB,EAAE,UAAAH,GAAU,WAAAC,KAA6B;AACnE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWJ;AAAA,QACT;AAAA,QACAG;AAAA,MAAA;AAAA,MAGD,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASI,EAAiB,EAAE,UAAAJ,GAAU,WAAAC,KAA6B;AACjE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWJ;AAAA,QACT;AAAA,QACAG;AAAA,MAAA;AAAA,MAGD,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;AAOA,MAAMK,IAAY,OAAO,OAAON,GAAe;AAAA,EAC7C,SAASK;AAAA,EACT,WAAWD;AACb,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-CcuZKqob.js","sources":["../src/components/link/link.tsx"],"sourcesContent":["import { forwardRef, type SVGProps } from \"react\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { cn } from \"../../utils/cn\";\nimport {\n useLinkComponent,\n type LinkComponentProps,\n} from \"../../utils/link-provider\";\n\n/**\n * ExternalIcon - Visual indicator for links that open in a new tab/window.\n *\n * Use this as a child of Link to indicate external navigation:\n * ```tsx\n * <Link href=\"https://example.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit Example <Link.ExternalIcon />\n * </Link>\n * ```\n */\nconst ExternalIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className=\"link-external-icon\"\n {...props}\n >\n <path d=\"M9 4H8.8C7.11984 4 6.27976 4 5.63803 4.32698C5.07354 4.6146 4.6146 5.07354 4.32698 5.63803C4 6.27976 4 7.11984 4 8.8V15.2C4 16.8802 4 17.7202 4.32698 18.362C4.6146 18.9265 5.07354 19.3854 5.63803 19.673C6.27976 20 7.11984 20 8.8 20H15.2C16.8802 20 17.7202 20 18.362 19.673C18.9265 19.3854 19.3854 18.9265 19.673 18.362C20 17.7202 20 16.8802 20 15.2V15\" />\n <path d=\"M14 4H20M20 4V10M20 4L11 13\" />\n </svg>\n);\n\nExternalIcon.displayName = \"Link.ExternalIcon\";\n\nexport const KUMO_LINK_VARIANTS = {\n variant: {\n inline: {\n classes:\n \"text-primary underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors\",\n description: \"Inline text link that flows with content\",\n },\n current: {\n classes:\n \"text-current underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors\",\n description: \"Link that inherits color from parent text\",\n },\n plain: {\n classes: \"text-primary hover:text-primary/70 transition-colors\",\n description: \"Link without underline decoration\",\n },\n },\n} as const;\n\nexport const KUMO_LINK_DEFAULT_VARIANTS = {\n variant: \"inline\",\n} as const;\n\nexport type KumoLinkVariant = keyof typeof KUMO_LINK_VARIANTS.variant;\n\nexport interface KumoLinkVariantsProps {\n variant?: KumoLinkVariant;\n}\n\nexport function linkVariants({\n variant = KUMO_LINK_DEFAULT_VARIANTS.variant,\n}: KumoLinkVariantsProps = {}) {\n return cn(KUMO_LINK_VARIANTS.variant[variant].classes);\n}\n\nexport type LinkProps = useRender.ComponentProps<\"a\"> &\n LinkComponentProps &\n KumoLinkVariantsProps;\n\n/**\n * Link component for consistent inline text links.\n *\n * Supports composition via `render` prop for framework-specific routing:\n * - Without render: renders via LinkProvider (default anchor or configured component)\n * - With render: merges props onto the provided element with proper ref/event handling\n *\n * @example Basic usage\n * ```tsx\n * <Link href=\"/docs\">Learn more</Link>\n * ```\n *\n * @example External link with icon\n * ```tsx\n * <Link href=\"https://cloudflare.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit Cloudflare <Link.ExternalIcon />\n * </Link>\n * ```\n *\n * @example Composition with React Router\n * ```tsx\n * <Link render={<RouterLink to=\"/dashboard\" />} variant=\"inline\">\n * Dashboard\n * </Link>\n * ```\n */\nconst LinkBase = forwardRef<HTMLAnchorElement, LinkProps>(function Link(\n { className, variant = \"inline\", render, ...props },\n ref,\n) {\n const LinkComponent = useLinkComponent();\n\n const defaultProps: useRender.ElementProps<\"a\"> = {\n className: cn(\n linkVariants({ variant }),\n \"group/link inline-flex items-center gap-[0.1875em]\",\n ),\n };\n\n const element = useRender({\n render: render ?? <LinkComponent />,\n ref,\n props: mergeProps<\"a\">(defaultProps, props, { className }),\n });\n\n return element;\n});\n\nLinkBase.displayName = \"Link\";\n\n// Compound component with ExternalIcon subcomponent\nexport const Link = Object.assign(LinkBase, {\n ExternalIcon,\n});\n"],"names":["ExternalIcon","props","jsxs","jsx","KUMO_LINK_VARIANTS","KUMO_LINK_DEFAULT_VARIANTS","linkVariants","variant","cn","LinkBase","forwardRef","className","render","ref","LinkComponent","useLinkComponent","defaultProps","useRender","mergeProps","Link"],"mappings":";;;;;;AAmBA,MAAMA,IAAe,CAACC,MACpB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,eAAc;AAAA,IACd,gBAAe;AAAA,IACf,eAAY;AAAA,IACZ,WAAU;AAAA,IACT,GAAGD;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAE,EAAC,QAAA,EAAK,GAAE,kWAAA,CAAkW;AAAA,MAC1W,gBAAAA,EAAC,QAAA,EAAK,GAAE,8BAAA,CAA8B;AAAA,IAAA;AAAA,EAAA;AACxC;AAGFH,EAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"link-CcuZKqob.js","sources":["../src/components/link/link.tsx"],"sourcesContent":["import { forwardRef, type SVGProps } from \"react\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { cn } from \"../../utils/cn\";\nimport {\n useLinkComponent,\n type LinkComponentProps,\n} from \"../../utils/link-provider\";\n\n/**\n * ExternalIcon - Visual indicator for links that open in a new tab/window.\n *\n * Use this as a child of Link to indicate external navigation:\n * ```tsx\n * <Link href=\"https://example.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit Example <Link.ExternalIcon />\n * </Link>\n * ```\n */\nconst ExternalIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className=\"link-external-icon\"\n {...props}\n >\n <path d=\"M9 4H8.8C7.11984 4 6.27976 4 5.63803 4.32698C5.07354 4.6146 4.6146 5.07354 4.32698 5.63803C4 6.27976 4 7.11984 4 8.8V15.2C4 16.8802 4 17.7202 4.32698 18.362C4.6146 18.9265 5.07354 19.3854 5.63803 19.673C6.27976 20 7.11984 20 8.8 20H15.2C16.8802 20 17.7202 20 18.362 19.673C18.9265 19.3854 19.3854 18.9265 19.673 18.362C20 17.7202 20 16.8802 20 15.2V15\" />\n <path d=\"M14 4H20M20 4V10M20 4L11 13\" />\n </svg>\n);\n\nExternalIcon.displayName = \"Link.ExternalIcon\";\n\n/** Link variant definitions mapping variant names to their Tailwind classes. */\nexport const KUMO_LINK_VARIANTS = {\n variant: {\n inline: {\n classes:\n \"text-primary underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors\",\n description: \"Inline text link that flows with content\",\n },\n current: {\n classes:\n \"text-current underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors\",\n description: \"Link that inherits color from parent text\",\n },\n plain: {\n classes: \"text-primary hover:text-primary/70 transition-colors\",\n description: \"Link without underline decoration\",\n },\n },\n} as const;\n\nexport const KUMO_LINK_DEFAULT_VARIANTS = {\n variant: \"inline\",\n} as const;\n\nexport type KumoLinkVariant = keyof typeof KUMO_LINK_VARIANTS.variant;\n\nexport interface KumoLinkVariantsProps {\n /**\n * Visual style of the link.\n * - `\"inline\"` — Inline text link that flows with content\n * - `\"current\"` — Link that inherits color from parent text\n * - `\"plain\"` — Link without underline decoration\n * @default \"inline\"\n */\n variant?: KumoLinkVariant;\n}\n\nexport function linkVariants({\n variant = KUMO_LINK_DEFAULT_VARIANTS.variant,\n}: KumoLinkVariantsProps = {}) {\n return cn(KUMO_LINK_VARIANTS.variant[variant].classes);\n}\n\n/**\n * Link component props.\n *\n * @example\n * ```tsx\n * <Link href=\"/docs\">Learn more</Link>\n * <Link href=\"https://cloudflare.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit Cloudflare <Link.ExternalIcon />\n * </Link>\n * <Link render={<RouterLink to=\"/dashboard\" />}>Dashboard</Link>\n * ```\n */\nexport type LinkProps = useRender.ComponentProps<\"a\"> &\n LinkComponentProps &\n KumoLinkVariantsProps;\n\n/**\n * Link component for consistent inline text links.\n *\n * Supports composition via `render` prop for framework-specific routing:\n * - Without render: renders via LinkProvider (default anchor or configured component)\n * - With render: merges props onto the provided element with proper ref/event handling\n *\n * @example Basic usage\n * ```tsx\n * <Link href=\"/docs\">Learn more</Link>\n * ```\n *\n * @example External link with icon\n * ```tsx\n * <Link href=\"https://cloudflare.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit Cloudflare <Link.ExternalIcon />\n * </Link>\n * ```\n *\n * @example Composition with React Router\n * ```tsx\n * <Link render={<RouterLink to=\"/dashboard\" />} variant=\"inline\">\n * Dashboard\n * </Link>\n * ```\n */\nconst LinkBase = forwardRef<HTMLAnchorElement, LinkProps>(function Link(\n { className, variant = \"inline\", render, ...props },\n ref,\n) {\n const LinkComponent = useLinkComponent();\n\n const defaultProps: useRender.ElementProps<\"a\"> = {\n className: cn(\n linkVariants({ variant }),\n \"group/link inline-flex items-center gap-[0.1875em]\",\n ),\n };\n\n const element = useRender({\n render: render ?? <LinkComponent />,\n ref,\n props: mergeProps<\"a\">(defaultProps, props, { className }),\n });\n\n return element;\n});\n\nLinkBase.displayName = \"Link\";\n\n// Compound component with ExternalIcon subcomponent\nexport const Link = Object.assign(LinkBase, {\n ExternalIcon,\n});\n"],"names":["ExternalIcon","props","jsxs","jsx","KUMO_LINK_VARIANTS","KUMO_LINK_DEFAULT_VARIANTS","linkVariants","variant","cn","LinkBase","forwardRef","className","render","ref","LinkComponent","useLinkComponent","defaultProps","useRender","mergeProps","Link"],"mappings":";;;;;;AAmBA,MAAMA,IAAe,CAACC,MACpB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,eAAc;AAAA,IACd,gBAAe;AAAA,IACf,eAAY;AAAA,IACZ,WAAU;AAAA,IACT,GAAGD;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAE,EAAC,QAAA,EAAK,GAAE,kWAAA,CAAkW;AAAA,MAC1W,gBAAAA,EAAC,QAAA,EAAK,GAAE,8BAAA,CAA8B;AAAA,IAAA;AAAA,EAAA;AACxC;AAGFH,EAAa,cAAc;AAGpB,MAAMI,IAAqB;AAAA,EAChC,SAAS;AAAA,IACP,QAAQ;AAAA,MACN,SACE;AAAA,MACF,aAAa;AAAA,IAAA;AAAA,IAEf,SAAS;AAAA,MACP,SACE;AAAA,MACF,aAAa;AAAA,IAAA;AAAA,IAEf,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GAEaC,IAA6B;AAAA,EACxC,SAAS;AACX;AAeO,SAASC,EAAa;AAAA,EAC3B,SAAAC,IAAUF,EAA2B;AACvC,IAA2B,IAAI;AAC7B,SAAOG,EAAGJ,EAAmB,QAAQG,CAAO,EAAE,OAAO;AACvD;AA4CA,MAAME,IAAWC,EAAyC,SACxD,EAAE,WAAAC,GAAW,SAAAJ,IAAU,UAAU,QAAAK,GAAQ,GAAGX,EAAA,GAC5CY,GACA;AACA,QAAMC,IAAgBC,EAAA,GAEhBC,IAA4C;AAAA,IAChD,WAAWR;AAAA,MACTF,EAAa,EAAE,SAAAC,GAAS;AAAA,MACxB;AAAA,IAAA;AAAA,EACF;AASF,SANgBU,EAAU;AAAA,IACxB,QAAQL,KAAU,gBAAAT,EAACW,GAAA,CAAA,CAAc;AAAA,IACjC,KAAAD;AAAA,IACA,OAAOK,EAAgBF,GAAcf,GAAO,EAAE,WAAAU,GAAW;AAAA,EAAA,CAC1D;AAGH,CAAC;AAEDF,EAAS,cAAc;AAGhB,MAAMU,IAAO,OAAO,OAAOV,GAAU;AAAA,EAC1C,cAAAT;AACF,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-DHGMYlC6.js","sources":["../src/components/loader/loader.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"loader-DHGMYlC6.js","sources":["../src/components/loader/loader.tsx"],"sourcesContent":["/** Loader size variant definitions mapping sizes to their pixel values. */\nexport const KUMO_LOADER_VARIANTS = {\n size: {\n sm: {\n value: 16,\n description: \"Small loader for inline use\",\n },\n base: {\n value: 24,\n description: \"Default loader size\",\n },\n lg: {\n value: 32,\n description: \"Large loader for prominent loading states\",\n },\n },\n} as const;\n\nexport const KUMO_LOADER_DEFAULT_VARIANTS = {\n size: \"base\",\n} as const;\n\n// Derived types from KUMO_LOADER_VARIANTS\nexport type KumoLoaderSize = keyof typeof KUMO_LOADER_VARIANTS.size;\n\nexport interface KumoLoaderVariantsProps {\n /**\n * Size of the loader. Use a preset name or a custom pixel number.\n * - `\"sm\"` — 16px, small loader for inline use\n * - `\"base\"` — 24px, default loader size\n * - `\"lg\"` — 32px, large loader for prominent loading states\n * @default \"base\"\n */\n size?: KumoLoaderSize | number;\n}\n\nexport function loaderVariants({\n size = KUMO_LOADER_DEFAULT_VARIANTS.size,\n}: KumoLoaderVariantsProps = {}): number {\n if (typeof size === \"number\") return size;\n return KUMO_LOADER_VARIANTS.size[size].value;\n}\n\n/**\n * Loader component props.\n *\n * @example\n * ```tsx\n * <Loader />\n * <Loader size=\"sm\" />\n * <Loader size={24} />\n * ```\n */\nexport interface LoaderProps {\n /** Additional CSS classes merged via `cn()`. */\n className?: string;\n /**\n * Size of the spinner. Use a preset name or a custom pixel number.\n * - `\"sm\"` — 16px, for inline use\n * - `\"base\"` — 24px, default size\n * - `\"lg\"` — 32px, for prominent loading states\n * @default \"base\"\n */\n size?: KumoLoaderSize | number;\n}\n\n/**\n * Animated circular spinner for indicating loading states.\n *\n * @example\n * ```tsx\n * <Loader />\n * ```\n */\nexport const Loader = ({\n className,\n size = KUMO_LOADER_DEFAULT_VARIANTS.size,\n}: LoaderProps) => {\n const sizeValue = loaderVariants({ size });\n return (\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n stroke=\"currentColor\"\n className={className}\n style={{ height: sizeValue, width: sizeValue }}\n >\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"9.5\"\n fill=\"none\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n >\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 12 12\"\n to=\"360 12 12\"\n dur=\"2s\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-dasharray\"\n values=\"0 150;42 150;42 150\"\n keyTimes=\"0;0.5;1\"\n dur=\"1.5s\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-dashoffset\"\n values=\"0;-16;-59\"\n keyTimes=\"0;0.5;1\"\n dur=\"1.5s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"9.5\"\n fill=\"none\"\n opacity={0.1}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n </svg>\n );\n};\n"],"names":["KUMO_LOADER_VARIANTS","KUMO_LOADER_DEFAULT_VARIANTS","loaderVariants","size","Loader","className","sizeValue","jsxs","jsx"],"mappings":";;AACO,MAAMA,IAAuB;AAAA,EAClC,MAAM;AAAA,IACJ,IAAI;AAAA,MACF,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,IAAI;AAAA,MACF,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GAEaC,IAA+B;AAAA,EAC1C,MAAM;AACR;AAgBO,SAASC,EAAe;AAAA,EAC7B,MAAAC,IAAOF,EAA6B;AACtC,IAA6B,IAAY;AACvC,SAAI,OAAOE,KAAS,WAAiBA,IAC9BH,EAAqB,KAAKG,CAAI,EAAE;AACzC;AAiCO,MAAMC,IAAS,CAAC;AAAA,EACrB,WAAAC;AAAA,EACA,MAAAF,IAAOF,EAA6B;AACtC,MAAmB;AACjB,QAAMK,IAAYJ,EAAe,EAAE,MAAAC,GAAM;AACzC,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,QAAO;AAAA,MACP,WAAAF;AAAA,MACA,OAAO,EAAE,QAAQC,GAAW,OAAOA,EAAA;AAAA,MAEnC,UAAA;AAAA,QAAA,gBAAAC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAG;AAAA,YACH,GAAE;AAAA,YACF,MAAK;AAAA,YACL,aAAY;AAAA,YACZ,eAAc;AAAA,YAEd,UAAA;AAAA,cAAA,gBAAAC;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,eAAc;AAAA,kBACd,MAAK;AAAA,kBACL,MAAK;AAAA,kBACL,IAAG;AAAA,kBACH,KAAI;AAAA,kBACJ,aAAY;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEd,gBAAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,eAAc;AAAA,kBACd,QAAO;AAAA,kBACP,UAAS;AAAA,kBACT,KAAI;AAAA,kBACJ,aAAY;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEd,gBAAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,eAAc;AAAA,kBACd,QAAO;AAAA,kBACP,UAAS;AAAA,kBACT,KAAI;AAAA,kBACJ,aAAY;AAAA,gBAAA;AAAA,cAAA;AAAA,YACd;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAG;AAAA,YACH,GAAE;AAAA,YACF,MAAK;AAAA,YACL,SAAS;AAAA,YACT,aAAY;AAAA,YACZ,eAAc;AAAA,UAAA;AAAA,QAAA;AAAA,MAChB;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menubar-CzimiryS.js","sources":["../src/components/menubar/use-menu-navigation.ts","../src/components/menubar/menubar.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\n\ntype UseMenuNavigationProps = {\n menuRef: React.RefObject<HTMLElement | null>;\n direction?: \"horizontal\" | \"vertical\"; // Default: horizontal\n};\n\nexport const useMenuNavigation = ({\n menuRef,\n direction = \"horizontal\",\n}: UseMenuNavigationProps) => {\n const activeElementRef = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!menuRef.current) return;\n\n const focusableElements = Array.from(\n menuRef.current.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])',\n ),\n ) as HTMLElement[];\n\n if (focusableElements.length === 0) return;\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (!activeElementRef.current) return;\n\n const currentIndex = focusableElements.indexOf(activeElementRef.current);\n let nextIndex = currentIndex;\n\n const isHorizontal = direction === \"horizontal\";\n const forwardKey = isHorizontal ? \"ArrowRight\" : \"ArrowDown\";\n const backwardKey = isHorizontal ? \"ArrowLeft\" : \"ArrowUp\";\n\n if (e.key === forwardKey) {\n e.preventDefault();\n nextIndex = (currentIndex + 1) % focusableElements.length;\n } else if (e.key === backwardKey) {\n e.preventDefault();\n nextIndex =\n (currentIndex - 1 + focusableElements.length) %\n focusableElements.length;\n } else {\n return;\n }\n\n const nextElement = focusableElements[nextIndex];\n activeElementRef.current = nextElement;\n nextElement.focus();\n };\n\n const addKeyListener = () =>\n document.addEventListener(\"keydown\", handleKeyDown);\n const removeKeyListener = () =>\n document.removeEventListener(\"keydown\", handleKeyDown);\n\n const handleFocusIn = () => {\n activeElementRef.current = document.activeElement as HTMLElement;\n addKeyListener();\n };\n\n const handleFocusOut = () => {\n activeElementRef.current = null;\n removeKeyListener();\n };\n\n menuRef.current.addEventListener(\"focusin\", handleFocusIn);\n menuRef.current.addEventListener(\"focusout\", handleFocusOut);\n\n return () => {\n menuRef.current?.removeEventListener(\"focusin\", handleFocusIn);\n menuRef.current?.removeEventListener(\"focusout\", handleFocusOut);\n removeKeyListener();\n };\n }, [menuRef, direction]);\n};\n","import { Tooltip } from \"../tooltip\";\nimport { cn } from \"../../utils/cn\";\nimport { IconContext } from \"@phosphor-icons/react\";\nimport React, { useRef } from \"react\";\nimport { useMenuNavigation } from \"./use-menu-navigation\";\n\nexport const KUMO_MENUBAR_VARIANTS = {\n // MenuBar currently has no variant options but structure is ready for future additions\n} as const;\n\nexport const KUMO_MENUBAR_DEFAULT_VARIANTS = {} as const;\n\n// Derived types from KUMO_MENUBAR_VARIANTS\nexport interface KumoMenuBarVariantsProps {}\n\nexport function menuBarVariants(_props: KumoMenuBarVariantsProps = {}) {\n return cn(\n // Base styles\n \"flex rounded-lg border border-kumo-fill bg-kumo-fill pl-px shadow-xs transition-colors\",\n );\n}\n\ntype MenuOptionProps = {\n icon: React.ReactNode;\n id?: number | string;\n isActive?: number | boolean | string | undefined;\n onClick: () => void;\n tooltip: string;\n};\n\nconst MenuOption = ({\n icon,\n id,\n isActive,\n onClick,\n tooltip,\n}: MenuOptionProps) => {\n return (\n <Tooltip content={tooltip} asChild>\n <button\n className={cn(\n \"focus:inset-ring-focus relative -ml-px flex h-full w-11 cursor-pointer items-center justify-center rounded-md border-none bg-kumo-fill transition-colors focus:z-10 focus:outline-none focus-visible:z-10 focus-visible:inset-ring-[0.5]\",\n {\n \"z-20 bg-kumo-base shadow-xs transition-colors\": isActive === id,\n },\n )}\n onClick={onClick}\n >\n <IconContext.Provider value={{ size: 18 }} {...({} as any)}>\n {icon}\n </IconContext.Provider>\n </button>\n </Tooltip>\n );\n};\n\ntype MenuBarProps = {\n className?: string;\n isActive: number | boolean | string | undefined;\n options: MenuOptionProps[];\n optionIds?: boolean;\n};\n\nexport const MenuBar = ({\n className,\n isActive,\n options,\n optionIds = false, // if option needs an extra unique ID\n}: MenuBarProps) => {\n const menuRef = useRef<HTMLElement | null>(null);\n\n useMenuNavigation({ menuRef, direction: \"horizontal\" });\n\n return (\n <nav\n className={cn(\n \"flex rounded-lg border border-kumo-fill bg-kumo-fill pl-px shadow-xs transition-colors\",\n className,\n )}\n ref={menuRef}\n >\n {options.map((option, index) => (\n <MenuOption\n key={index}\n {...option}\n isActive={isActive}\n id={optionIds ? option.id : index}\n />\n ))}\n </nav>\n );\n};\n"],"names":["useMenuNavigation","menuRef","direction","activeElementRef","useRef","useEffect","focusableElements","handleKeyDown","e","currentIndex","nextIndex","isHorizontal","forwardKey","backwardKey","nextElement","addKeyListener","removeKeyListener","handleFocusIn","handleFocusOut","MenuOption","icon","id","isActive","onClick","tooltip","jsx","Tooltip","cn","IconContext","MenuBar","className","options","optionIds","option","index"],"mappings":";;;;;;AAOO,MAAMA,IAAoB,CAAC;AAAA,EAChC,SAAAC;AAAA,EACA,WAAAC,IAAY;AACd,MAA8B;AAC5B,QAAMC,IAAmBC,EAA2B,IAAI;AAExD,EAAAC,EAAU,MAAM;AACd,QAAI,CAACJ,EAAQ,QAAS;AAEtB,UAAMK,IAAoB,MAAM;AAAA,MAC9BL,EAAQ,QAAQ;AAAA,QACd;AAAA,MAAA;AAAA,IACF;AAGF,QAAIK,EAAkB,WAAW,EAAG;AAEpC,UAAMC,IAAgB,CAACC,MAAqB;AAC1C,UAAI,CAACL,EAAiB,QAAS;AAE/B,YAAMM,IAAeH,EAAkB,QAAQH,EAAiB,OAAO;AACvE,UAAIO,IAAYD;AAEhB,YAAME,IAAeT,MAAc,cAC7BU,IAAaD,IAAe,eAAe,aAC3CE,IAAcF,IAAe,cAAc;AAEjD,UAAIH,EAAE,QAAQI;AACZ,QAAAJ,EAAE,eAAA,GACFE,KAAaD,IAAe,KAAKH,EAAkB;AAAA,eAC1CE,EAAE,QAAQK;AACnB,QAAAL,EAAE,eAAA,GACFE,KACGD,IAAe,IAAIH,EAAkB,UACtCA,EAAkB;AAAA;AAEpB;AAGF,YAAMQ,IAAcR,EAAkBI,CAAS;AAC/C,MAAAP,EAAiB,UAAUW,GAC3BA,EAAY,MAAA;AAAA,IACd,GAEMC,IAAiB,MACrB,SAAS,iBAAiB,WAAWR,CAAa,GAC9CS,IAAoB,MACxB,SAAS,oBAAoB,WAAWT,CAAa,GAEjDU,IAAgB,MAAM;AAC1B,MAAAd,EAAiB,UAAU,SAAS,eACpCY,EAAA;AAAA,IACF,GAEMG,IAAiB,MAAM;AAC3B,MAAAf,EAAiB,UAAU,MAC3Ba,EAAA;AAAA,IACF;AAEA,WAAAf,EAAQ,QAAQ,iBAAiB,WAAWgB,CAAa,GACzDhB,EAAQ,QAAQ,iBAAiB,YAAYiB,CAAc,GAEpD,MAAM;AACX,MAAAjB,EAAQ,SAAS,oBAAoB,WAAWgB,CAAa,GAC7DhB,EAAQ,SAAS,oBAAoB,YAAYiB,CAAc,GAC/DF,EAAA;AAAA,IACF;AAAA,EACF,GAAG,CAACf,GAASC,CAAS,CAAC;AACzB,
|
|
1
|
+
{"version":3,"file":"menubar-CzimiryS.js","sources":["../src/components/menubar/use-menu-navigation.ts","../src/components/menubar/menubar.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\n\ntype UseMenuNavigationProps = {\n menuRef: React.RefObject<HTMLElement | null>;\n direction?: \"horizontal\" | \"vertical\"; // Default: horizontal\n};\n\nexport const useMenuNavigation = ({\n menuRef,\n direction = \"horizontal\",\n}: UseMenuNavigationProps) => {\n const activeElementRef = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!menuRef.current) return;\n\n const focusableElements = Array.from(\n menuRef.current.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])',\n ),\n ) as HTMLElement[];\n\n if (focusableElements.length === 0) return;\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (!activeElementRef.current) return;\n\n const currentIndex = focusableElements.indexOf(activeElementRef.current);\n let nextIndex = currentIndex;\n\n const isHorizontal = direction === \"horizontal\";\n const forwardKey = isHorizontal ? \"ArrowRight\" : \"ArrowDown\";\n const backwardKey = isHorizontal ? \"ArrowLeft\" : \"ArrowUp\";\n\n if (e.key === forwardKey) {\n e.preventDefault();\n nextIndex = (currentIndex + 1) % focusableElements.length;\n } else if (e.key === backwardKey) {\n e.preventDefault();\n nextIndex =\n (currentIndex - 1 + focusableElements.length) %\n focusableElements.length;\n } else {\n return;\n }\n\n const nextElement = focusableElements[nextIndex];\n activeElementRef.current = nextElement;\n nextElement.focus();\n };\n\n const addKeyListener = () =>\n document.addEventListener(\"keydown\", handleKeyDown);\n const removeKeyListener = () =>\n document.removeEventListener(\"keydown\", handleKeyDown);\n\n const handleFocusIn = () => {\n activeElementRef.current = document.activeElement as HTMLElement;\n addKeyListener();\n };\n\n const handleFocusOut = () => {\n activeElementRef.current = null;\n removeKeyListener();\n };\n\n menuRef.current.addEventListener(\"focusin\", handleFocusIn);\n menuRef.current.addEventListener(\"focusout\", handleFocusOut);\n\n return () => {\n menuRef.current?.removeEventListener(\"focusin\", handleFocusIn);\n menuRef.current?.removeEventListener(\"focusout\", handleFocusOut);\n removeKeyListener();\n };\n }, [menuRef, direction]);\n};\n","import { Tooltip } from \"../tooltip\";\nimport { cn } from \"../../utils/cn\";\nimport { IconContext } from \"@phosphor-icons/react\";\nimport React, { useRef } from \"react\";\nimport { useMenuNavigation } from \"./use-menu-navigation\";\n\n/** MenuBar variant definitions (currently empty, reserved for future additions). */\nexport const KUMO_MENUBAR_VARIANTS = {\n // MenuBar currently has no variant options but structure is ready for future additions\n} as const;\n\nexport const KUMO_MENUBAR_DEFAULT_VARIANTS = {} as const;\n\n// Derived types from KUMO_MENUBAR_VARIANTS\nexport interface KumoMenuBarVariantsProps {}\n\nexport function menuBarVariants(_props: KumoMenuBarVariantsProps = {}) {\n return cn(\n // Base styles\n \"flex rounded-lg border border-kumo-fill bg-kumo-fill pl-px shadow-xs transition-colors\",\n );\n}\n\n/** Props for an individual menu option within a MenuBar. */\ntype MenuOptionProps = {\n /** Icon element (typically from `@phosphor-icons/react`) rendered at 18px */\n icon: React.ReactNode;\n /** Unique identifier for the option (used when `optionIds` is true) */\n id?: number | string;\n /** Currently active value from the parent MenuBar */\n isActive?: number | boolean | string | undefined;\n /** Callback when this option is clicked */\n onClick: () => void;\n /** Tooltip text shown on hover */\n tooltip: string;\n};\n\nconst MenuOption = ({\n icon,\n id,\n isActive,\n onClick,\n tooltip,\n}: MenuOptionProps) => {\n return (\n <Tooltip content={tooltip} asChild>\n <button\n className={cn(\n \"focus:inset-ring-focus relative -ml-px flex h-full w-11 cursor-pointer items-center justify-center rounded-md border-none bg-kumo-fill transition-colors focus:z-10 focus:outline-none focus-visible:z-10 focus-visible:inset-ring-[0.5]\",\n {\n \"z-20 bg-kumo-base shadow-xs transition-colors\": isActive === id,\n },\n )}\n onClick={onClick}\n >\n <IconContext.Provider value={{ size: 18 }} {...({} as any)}>\n {icon}\n </IconContext.Provider>\n </button>\n </Tooltip>\n );\n};\n\n/**\n * MenuBar component props.\n *\n * Horizontal icon-button toolbar with keyboard navigation and tooltip labels.\n *\n * @example\n * ```tsx\n * <MenuBar\n * isActive={activeIndex}\n * options={[\n * { icon: <ListIcon />, tooltip: \"List view\", onClick: () => setView(\"list\") },\n * { icon: <GridFourIcon />, tooltip: \"Grid view\", onClick: () => setView(\"grid\") },\n * ]}\n * />\n * ```\n */\ntype MenuBarProps = {\n /** Additional CSS classes merged via `cn()`. */\n className?: string;\n /** The currently active option value — matched against option index or `id`. */\n isActive: number | boolean | string | undefined;\n /** Array of menu option configurations. */\n options: MenuOptionProps[];\n /** When true, each option's `id` field is used for matching instead of its array index. */\n optionIds?: boolean;\n};\n\n/**\n * MenuBar — horizontal icon-button toolbar with keyboard arrow-key navigation.\n *\n * Each option renders as a `<button>` with a Tooltip. The active option is\n * visually highlighted with an elevated background.\n *\n * @example\n * ```tsx\n * <MenuBar\n * isActive={0}\n * options={[\n * { icon: <ListIcon />, tooltip: \"List\", onClick: () => {} },\n * { icon: <GridFourIcon />, tooltip: \"Grid\", onClick: () => {} },\n * ]}\n * />\n * ```\n */\nexport const MenuBar = ({\n className,\n isActive,\n options,\n optionIds = false, // if option needs an extra unique ID\n}: MenuBarProps) => {\n const menuRef = useRef<HTMLElement | null>(null);\n\n useMenuNavigation({ menuRef, direction: \"horizontal\" });\n\n return (\n <nav\n className={cn(\n \"flex rounded-lg border border-kumo-fill bg-kumo-fill pl-px shadow-xs transition-colors\",\n className,\n )}\n ref={menuRef}\n >\n {options.map((option, index) => (\n <MenuOption\n key={index}\n {...option}\n isActive={isActive}\n id={optionIds ? option.id : index}\n />\n ))}\n </nav>\n );\n};\n"],"names":["useMenuNavigation","menuRef","direction","activeElementRef","useRef","useEffect","focusableElements","handleKeyDown","e","currentIndex","nextIndex","isHorizontal","forwardKey","backwardKey","nextElement","addKeyListener","removeKeyListener","handleFocusIn","handleFocusOut","MenuOption","icon","id","isActive","onClick","tooltip","jsx","Tooltip","cn","IconContext","MenuBar","className","options","optionIds","option","index"],"mappings":";;;;;;AAOO,MAAMA,IAAoB,CAAC;AAAA,EAChC,SAAAC;AAAA,EACA,WAAAC,IAAY;AACd,MAA8B;AAC5B,QAAMC,IAAmBC,EAA2B,IAAI;AAExD,EAAAC,EAAU,MAAM;AACd,QAAI,CAACJ,EAAQ,QAAS;AAEtB,UAAMK,IAAoB,MAAM;AAAA,MAC9BL,EAAQ,QAAQ;AAAA,QACd;AAAA,MAAA;AAAA,IACF;AAGF,QAAIK,EAAkB,WAAW,EAAG;AAEpC,UAAMC,IAAgB,CAACC,MAAqB;AAC1C,UAAI,CAACL,EAAiB,QAAS;AAE/B,YAAMM,IAAeH,EAAkB,QAAQH,EAAiB,OAAO;AACvE,UAAIO,IAAYD;AAEhB,YAAME,IAAeT,MAAc,cAC7BU,IAAaD,IAAe,eAAe,aAC3CE,IAAcF,IAAe,cAAc;AAEjD,UAAIH,EAAE,QAAQI;AACZ,QAAAJ,EAAE,eAAA,GACFE,KAAaD,IAAe,KAAKH,EAAkB;AAAA,eAC1CE,EAAE,QAAQK;AACnB,QAAAL,EAAE,eAAA,GACFE,KACGD,IAAe,IAAIH,EAAkB,UACtCA,EAAkB;AAAA;AAEpB;AAGF,YAAMQ,IAAcR,EAAkBI,CAAS;AAC/C,MAAAP,E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AAc,GAGpD,gBAAAwB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE;AAAA,QACT;AAAA,QACAG;AAAA,MAAA;AAAA,MAEF,KAAK7B;AAAA,MAEJ,UAAA8B,EAAQ,IAAI,CAACE,GAAQC,MACpB,gBAAAT;AAAA,QAACN;AAAA,QAAA;AAAA,UAEE,GAAGc;AAAA,UACJ,UAAAX;AAAA,UACA,IAAIU,IAAYC,EAAO,KAAKC;AAAA,QAAA;AAAA,QAHvBA;AAAA,MAAA,CAKR;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meter-BrJnHJ3Q.js","sources":["../src/components/meter/meter.tsx"],"sourcesContent":["import { Meter as BaseMeter } from \"@base-ui/react/meter\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nexport const KUMO_METER_VARIANTS = {\n // Meter currently has no variant options but structure is ready for future additions\n} as const;\n\nexport const KUMO_METER_DEFAULT_VARIANTS = {} as const;\n\n// Derived types from KUMO_METER_VARIANTS\nexport interface KumoMeterVariantsProps {}\n\nexport function meterVariants(_props: KumoMeterVariantsProps = {}) {\n return cn(\n // Base styles\n \"flex w-full flex-col gap-2\",\n );\n}\n\ntype RootProps = ComponentPropsWithoutRef<typeof BaseMeter.Root>;\n\nexport interface MeterProps extends RootProps, KumoMeterVariantsProps {\n customValue?: string;\n label: string;\n showValue?: boolean;\n trackClassName?: string;\n indicatorClassName?: string;\n}\n\nexport function Meter({\n value,\n customValue,\n label,\n showValue = true,\n className,\n trackClassName,\n indicatorClassName,\n ...props\n}: MeterProps) {\n return (\n <BaseMeter.Root\n value={value}\n {...props}\n className={cn(\"flex w-full flex-col gap-2\", className)}\n >\n <div className=\"flex items-center justify-between gap-4\">\n <BaseMeter.Label className=\"text-xs text-kumo-strong\">\n {label}\n </BaseMeter.Label>\n {customValue ? (\n <span className=\"text-sm font-medium text-kumo-default tabular-nums\">\n {customValue}\n </span>\n ) : (\n <>\n {showValue && (\n <BaseMeter.Value className=\"text-sm font-medium text-kumo-default tabular-nums\" />\n )}\n </>\n )}\n </div>\n <BaseMeter.Track\n className={cn(\n \"relative h-2 w-full overflow-hidden rounded-full bg-kumo-fill\",\n trackClassName,\n )}\n >\n <BaseMeter.Indicator\n className={cn(\n \"absolute inset-y-0 left-0 rounded-full bg-linear-to-r from-kumo-brand via-kumo-brand to-kumo-brand transition-[width] duration-300 ease-out\",\n indicatorClassName,\n )}\n />\n </BaseMeter.Track>\n </BaseMeter.Root>\n );\n}\n"],"names":["Meter","value","customValue","label","showValue","className","trackClassName","indicatorClassName","props","jsxs","BaseMeter.Root","cn","jsx","BaseMeter.Label","Fragment","BaseMeter.Value","BaseMeter.Track","BaseMeter.Indicator"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"meter-BrJnHJ3Q.js","sources":["../src/components/meter/meter.tsx"],"sourcesContent":["import { Meter as BaseMeter } from \"@base-ui/react/meter\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Meter variant definitions (currently empty, reserved for future additions). */\nexport const KUMO_METER_VARIANTS = {\n // Meter currently has no variant options but structure is ready for future additions\n} as const;\n\nexport const KUMO_METER_DEFAULT_VARIANTS = {} as const;\n\n// Derived types from KUMO_METER_VARIANTS\nexport interface KumoMeterVariantsProps {}\n\nexport function meterVariants(_props: KumoMeterVariantsProps = {}) {\n return cn(\n // Base styles\n \"flex w-full flex-col gap-2\",\n );\n}\n\ntype RootProps = ComponentPropsWithoutRef<typeof BaseMeter.Root>;\n\n/**\n * Meter component props.\n *\n * @example\n * ```tsx\n * <Meter label=\"Storage used\" value={65} />\n * <Meter label=\"API requests\" value={75} customValue=\"750 / 1,000\" />\n * ```\n */\nexport interface MeterProps extends RootProps, KumoMeterVariantsProps {\n /** Custom formatted value text (e.g. \"750 / 1,000\") displayed instead of percentage. */\n customValue?: string;\n /** Label text displayed above the meter track. */\n label: string;\n /**\n * Whether to display the percentage value next to the label.\n * @default true\n */\n showValue?: boolean;\n /** Additional CSS classes for the track (background bar). */\n trackClassName?: string;\n /** Additional CSS classes for the indicator (filled bar). */\n indicatorClassName?: string;\n}\n\n/**\n * Progress bar showing a measured value within a known range (e.g. quota usage).\n *\n * @example\n * ```tsx\n * <Meter label=\"Storage\" value={65} />\n * ```\n */\nexport function Meter({\n value,\n customValue,\n label,\n showValue = true,\n className,\n trackClassName,\n indicatorClassName,\n ...props\n}: MeterProps) {\n return (\n <BaseMeter.Root\n value={value}\n {...props}\n className={cn(\"flex w-full flex-col gap-2\", className)}\n >\n <div className=\"flex items-center justify-between gap-4\">\n <BaseMeter.Label className=\"text-xs text-kumo-strong\">\n {label}\n </BaseMeter.Label>\n {customValue ? (\n <span className=\"text-sm font-medium text-kumo-default tabular-nums\">\n {customValue}\n </span>\n ) : (\n <>\n {showValue && (\n <BaseMeter.Value className=\"text-sm font-medium text-kumo-default tabular-nums\" />\n )}\n </>\n )}\n </div>\n <BaseMeter.Track\n className={cn(\n \"relative h-2 w-full overflow-hidden rounded-full bg-kumo-fill\",\n trackClassName,\n )}\n >\n <BaseMeter.Indicator\n className={cn(\n \"absolute inset-y-0 left-0 rounded-full bg-linear-to-r from-kumo-brand via-kumo-brand to-kumo-brand transition-[width] duration-300 ease-out\",\n indicatorClassName,\n )}\n />\n </BaseMeter.Track>\n </BaseMeter.Root>\n );\n}\n"],"names":["Meter","value","customValue","label","showValue","className","trackClassName","indicatorClassName","props","jsxs","BaseMeter.Root","cn","jsx","BaseMeter.Label","Fragment","BaseMeter.Value","BaseMeter.Track","BaseMeter.Indicator"],"mappings":";;;;AAwDO,SAASA,EAAM;AAAA,EACpB,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,GAAGC;AACL,GAAe;AACb,SACE,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,OAAAT;AAAA,MACC,GAAGO;AAAA,MACJ,WAAWG,EAAG,8BAA8BN,CAAS;AAAA,MAErD,UAAA;AAAA,QAAA,gBAAAI,EAAC,OAAA,EAAI,WAAU,2CACb,UAAA;AAAA,UAAA,gBAAAG,EAACC,GAAA,EAAgB,WAAU,4BACxB,UAAAV,GACH;AAAA,UACCD,IACC,gBAAAU,EAAC,QAAA,EAAK,WAAU,sDACb,UAAAV,EAAA,CACH,IAEA,gBAAAU,EAAAE,GAAA,EACG,UAAAV,uBACEW,GAAA,EAAgB,WAAU,sDAAqD,EAAA,CAEpF;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAH;AAAA,UAACI;AAAAA,UAAA;AAAA,YACC,WAAWL;AAAA,cACT;AAAA,cACAL;AAAA,YAAA;AAAA,YAGF,UAAA,gBAAAM;AAAA,cAACK;AAAAA,cAAA;AAAA,gBACC,WAAWN;AAAA,kBACT;AAAA,kBACAJ;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-D0x9KQSk.js","sources":["../src/components/pagination/pagination.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport { InputGroup } from \"../input\";\nimport {\n CaretDoubleLeftIcon,\n CaretDoubleRightIcon,\n CaretLeftIcon,\n CaretRightIcon,\n} from \"@phosphor-icons/react\";\nimport { cn } from \"../../utils/cn\";\n\nexport const KUMO_PAGINATION_VARIANTS = {\n controls: {\n full: {\n classes: \"\",\n description:\n \"Full pagination controls with first, previous, page input, next, and last buttons\",\n },\n simple: {\n classes: \"\",\n description:\n \"Simple pagination controls with only previous and next buttons\",\n },\n },\n} as const;\n\nexport type KumoPaginationControls =\n keyof typeof KUMO_PAGINATION_VARIANTS.controls;\n\nexport const KUMO_PAGINATION_DEFAULT_VARIANTS = {\n controls: \"full\",\n} as const;\n\nexport interface KumoPaginationVariantsProps {\n controls?: KumoPaginationControls;\n}\n\nexport function paginationVariants({\n controls = KUMO_PAGINATION_DEFAULT_VARIANTS.controls,\n}: KumoPaginationVariantsProps = {}) {\n return cn(\n \"flex items-center justify-between gap-2\",\n KUMO_PAGINATION_VARIANTS.controls[controls].classes,\n );\n}\n\nexport interface PaginationProps extends KumoPaginationVariantsProps {\n setPage: (page: number) => void;\n page?: number;\n perPage?: number;\n totalCount?: number;\n}\n\nexport function Pagination({\n page = 1,\n perPage,\n totalCount,\n setPage,\n controls = KUMO_PAGINATION_DEFAULT_VARIANTS.controls,\n}: PaginationProps) {\n const [editingPage, setEditingPage] = useState<number>(1);\n\n // Value of the input as its being modified to display in the input, eventually syncs with `pagination.page`\n useEffect(() => {\n setEditingPage(page);\n }, [page]);\n\n const pageShowingRange = useMemo(() => {\n let lower = page * (perPage ?? 1) - (perPage ?? 0) + 1;\n let upper = Math.min(page * (perPage ?? 0), totalCount ?? 0);\n\n if (Number.isNaN(lower)) lower = 0;\n if (Number.isNaN(upper)) upper = 0;\n\n return `${lower}-${upper}`;\n }, [page, perPage, totalCount]);\n\n const maxPage = useMemo(() => {\n return Math.ceil((totalCount ?? 1) / (perPage ?? 1));\n }, [totalCount, perPage]);\n\n return (\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"grow text-sm text-kumo-strong\">\n {totalCount && totalCount > 0\n ? `Showing ${pageShowingRange} of ${totalCount}`\n : null}\n </div>\n <div>\n <InputGroup focusMode=\"individual\">\n {controls === \"full\" && (\n <InputGroup.Button\n variant=\"secondary\"\n aria-label=\"First page\"\n disabled={page <= 1}\n onClick={() => {\n setPage(1);\n setEditingPage(1);\n }}\n >\n <CaretDoubleLeftIcon size={16} />\n </InputGroup.Button>\n )}\n <InputGroup.Button\n variant=\"secondary\"\n aria-label=\"Previous page\"\n disabled={page <= 1}\n onClick={() => {\n const previousPage = Math.max(page - 1, 1);\n setPage(previousPage);\n setEditingPage(previousPage);\n }}\n >\n <CaretLeftIcon size={16} />\n </InputGroup.Button>\n {controls === \"full\" && (\n <InputGroup.Input\n style={{ width: 50 }}\n className=\"text-center\"\n aria-label=\"Page number\"\n value={editingPage}\n onValueChange={(value: string) => {\n setEditingPage(Number(value));\n }}\n onBlur={() => {\n let number = Math.max(editingPage, 1);\n number = Math.min(number, maxPage);\n setPage(number);\n setEditingPage(number);\n }}\n />\n )}\n <InputGroup.Button\n variant=\"secondary\"\n aria-label=\"Next page\"\n disabled={page === maxPage}\n onClick={() => {\n const nextPage = Math.min(page + 1, maxPage);\n setPage(nextPage);\n setEditingPage(nextPage);\n }}\n >\n <CaretRightIcon size={16} />\n </InputGroup.Button>\n {controls === \"full\" && (\n <InputGroup.Button\n variant=\"secondary\"\n aria-label=\"Last page\"\n disabled={page === maxPage}\n onClick={() => {\n setPage(maxPage);\n setEditingPage(maxPage);\n }}\n >\n <CaretDoubleRightIcon size={16} />\n </InputGroup.Button>\n )}\n </InputGroup>\n </div>\n </div>\n );\n}\n"],"names":["KUMO_PAGINATION_DEFAULT_VARIANTS","Pagination","page","perPage","totalCount","setPage","controls","editingPage","setEditingPage","useState","useEffect","pageShowingRange","useMemo","lower","upper","maxPage","jsxs","jsx","InputGroup","CaretDoubleLeftIcon","previousPage","CaretLeftIcon","value","number","nextPage","CaretRightIcon","CaretDoubleRightIcon"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"pagination-D0x9KQSk.js","sources":["../src/components/pagination/pagination.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport { InputGroup } from \"../input\";\nimport {\n CaretDoubleLeftIcon,\n CaretDoubleRightIcon,\n CaretLeftIcon,\n CaretRightIcon,\n} from \"@phosphor-icons/react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Pagination controls variant definitions. */\nexport const KUMO_PAGINATION_VARIANTS = {\n controls: {\n full: {\n classes: \"\",\n description:\n \"Full pagination controls with first, previous, page input, next, and last buttons\",\n },\n simple: {\n classes: \"\",\n description:\n \"Simple pagination controls with only previous and next buttons\",\n },\n },\n} as const;\n\nexport type KumoPaginationControls =\n keyof typeof KUMO_PAGINATION_VARIANTS.controls;\n\nexport const KUMO_PAGINATION_DEFAULT_VARIANTS = {\n controls: \"full\",\n} as const;\n\nexport interface KumoPaginationVariantsProps {\n controls?: KumoPaginationControls;\n}\n\nexport function paginationVariants({\n controls = KUMO_PAGINATION_DEFAULT_VARIANTS.controls,\n}: KumoPaginationVariantsProps = {}) {\n return cn(\n \"flex items-center justify-between gap-2\",\n KUMO_PAGINATION_VARIANTS.controls[controls].classes,\n );\n}\n\n/**\n * Pagination component props.\n *\n * @example\n * ```tsx\n * <Pagination page={page} setPage={setPage} perPage={10} totalCount={100} />\n * <Pagination page={page} setPage={setPage} perPage={10} totalCount={100} controls=\"simple\" />\n * ```\n */\nexport interface PaginationProps extends KumoPaginationVariantsProps {\n /** Callback fired when the current page changes. */\n setPage: (page: number) => void;\n /**\n * Current page number (1-indexed).\n * @default 1\n */\n page?: number;\n /** Number of items displayed per page. */\n perPage?: number;\n /** Total number of items across all pages. */\n totalCount?: number;\n}\n\n/**\n * Page navigation controls with page count display.\n *\n * @example\n * ```tsx\n * <Pagination page={page} setPage={setPage} perPage={10} totalCount={100} />\n * ```\n */\nexport function Pagination({\n page = 1,\n perPage,\n totalCount,\n setPage,\n controls = KUMO_PAGINATION_DEFAULT_VARIANTS.controls,\n}: PaginationProps) {\n const [editingPage, setEditingPage] = useState<number>(1);\n\n // Value of the input as its being modified to display in the input, eventually syncs with `pagination.page`\n useEffect(() => {\n setEditingPage(page);\n }, [page]);\n\n const pageShowingRange = useMemo(() => {\n let lower = page * (perPage ?? 1) - (perPage ?? 0) + 1;\n let upper = Math.min(page * (perPage ?? 0), totalCount ?? 0);\n\n if (Number.isNaN(lower)) lower = 0;\n if (Number.isNaN(upper)) upper = 0;\n\n return `${lower}-${upper}`;\n }, [page, perPage, totalCount]);\n\n const maxPage = useMemo(() => {\n return Math.ceil((totalCount ?? 1) / (perPage ?? 1));\n }, [totalCount, perPage]);\n\n return (\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"grow text-sm text-kumo-strong\">\n {totalCount && totalCount > 0\n ? `Showing ${pageShowingRange} of ${totalCount}`\n : null}\n </div>\n <div>\n <InputGroup focusMode=\"individual\">\n {controls === \"full\" && (\n <InputGroup.Button\n variant=\"secondary\"\n aria-label=\"First page\"\n disabled={page <= 1}\n onClick={() => {\n setPage(1);\n setEditingPage(1);\n }}\n >\n <CaretDoubleLeftIcon size={16} />\n </InputGroup.Button>\n )}\n <InputGroup.Button\n variant=\"secondary\"\n aria-label=\"Previous page\"\n disabled={page <= 1}\n onClick={() => {\n const previousPage = Math.max(page - 1, 1);\n setPage(previousPage);\n setEditingPage(previousPage);\n }}\n >\n <CaretLeftIcon size={16} />\n </InputGroup.Button>\n {controls === \"full\" && (\n <InputGroup.Input\n style={{ width: 50 }}\n className=\"text-center\"\n aria-label=\"Page number\"\n value={editingPage}\n onValueChange={(value: string) => {\n setEditingPage(Number(value));\n }}\n onBlur={() => {\n let number = Math.max(editingPage, 1);\n number = Math.min(number, maxPage);\n setPage(number);\n setEditingPage(number);\n }}\n />\n )}\n <InputGroup.Button\n variant=\"secondary\"\n aria-label=\"Next page\"\n disabled={page === maxPage}\n onClick={() => {\n const nextPage = Math.min(page + 1, maxPage);\n setPage(nextPage);\n setEditingPage(nextPage);\n }}\n >\n <CaretRightIcon size={16} />\n </InputGroup.Button>\n {controls === \"full\" && (\n <InputGroup.Button\n variant=\"secondary\"\n aria-label=\"Last page\"\n disabled={page === maxPage}\n onClick={() => {\n setPage(maxPage);\n setEditingPage(maxPage);\n }}\n >\n <CaretDoubleRightIcon size={16} />\n </InputGroup.Button>\n )}\n </InputGroup>\n </div>\n </div>\n );\n}\n"],"names":["KUMO_PAGINATION_DEFAULT_VARIANTS","Pagination","page","perPage","totalCount","setPage","controls","editingPage","setEditingPage","useState","useEffect","pageShowingRange","useMemo","lower","upper","maxPage","jsxs","jsx","InputGroup","CaretDoubleLeftIcon","previousPage","CaretLeftIcon","value","number","nextPage","CaretRightIcon","CaretDoubleRightIcon"],"mappings":";;;;;AA6BO,MAAMA,IAAmC;AAAA,EAC9C,UAAU;AACZ;AA8CO,SAASC,EAAW;AAAA,EACzB,MAAAC,IAAO;AAAA,EACP,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC,IAAWN,EAAiC;AAC9C,GAAoB;AAClB,QAAM,CAACO,GAAaC,CAAc,IAAIC,EAAiB,CAAC;AAGxD,EAAAC,EAAU,MAAM;AACd,IAAAF,EAAeN,CAAI;AAAA,EACrB,GAAG,CAACA,CAAI,CAAC;AAET,QAAMS,IAAmBC,EAAQ,MAAM;AACrC,QAAIC,IAAQX,KAAQC,KAAW,MAAMA,KAAW,KAAK,GACjDW,IAAQ,KAAK,IAAIZ,KAAQC,KAAW,IAAIC,KAAc,CAAC;AAE3D,WAAI,OAAO,MAAMS,CAAK,MAAGA,IAAQ,IAC7B,OAAO,MAAMC,CAAK,MAAGA,IAAQ,IAE1B,GAAGD,CAAK,IAAIC,CAAK;AAAA,EAC1B,GAAG,CAACZ,GAAMC,GAASC,CAAU,CAAC,GAExBW,IAAUH,EAAQ,MACf,KAAK,MAAMR,KAAc,MAAMD,KAAW,EAAE,GAClD,CAACC,GAAYD,CAAO,CAAC;AAExB,SACE,gBAAAa,EAAC,OAAA,EAAI,WAAU,2CACb,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,iCACZ,UAAAb,KAAcA,IAAa,IACxB,WAAWO,CAAgB,OAAOP,CAAU,KAC5C,MACN;AAAA,IACA,gBAAAa,EAAC,OAAA,EACC,UAAA,gBAAAD,EAACE,GAAA,EAAW,WAAU,cACnB,UAAA;AAAA,MAAAZ,MAAa,UACZ,gBAAAW;AAAA,QAACC,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,cAAW;A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