@cloudflare/kumo 2.3.1 → 2.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 +82 -2
- package/ai/component-registry.json +166 -123
- package/ai/component-registry.md +349 -215
- package/ai/schemas.ts +7 -2
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +46 -34
- package/dist/ai/schemas.d.ts.map +1 -1
- package/dist/ai/schemas.js +12 -4
- package/dist/ai/schemas.js.map +1 -1
- package/dist/chunks/SankeyChart-npoyr1j06svoxsfe.js +770 -0
- package/dist/chunks/SankeyChart-npoyr1j06svoxsfe.js.map +1 -0
- package/dist/chunks/{autocomplete-bdjo7k4zep86bwh8.js → autocomplete-d0w42h1frdu03df6.js} +29 -25
- package/dist/chunks/{autocomplete-bdjo7k4zep86bwh8.js.map → autocomplete-d0w42h1frdu03df6.js.map} +1 -1
- package/dist/chunks/{badge-e9w8qrjmeu9nocf6.js → badge-c1th6h6ahz7eu49q.js} +2 -2
- package/dist/chunks/badge-c1th6h6ahz7eu49q.js.map +1 -0
- package/dist/chunks/banner-es5iwuk4pf25e29e.js +120 -0
- package/dist/chunks/banner-es5iwuk4pf25e29e.js.map +1 -0
- package/dist/chunks/{breadcrumbs-g4pyoikibpoxsgw4.js → breadcrumbs-j214mimk5zj4ffp4.js} +8 -6
- package/dist/chunks/breadcrumbs-j214mimk5zj4ffp4.js.map +1 -0
- package/dist/chunks/{button-fxdpoacmq5rv1adk.js → button-mnrxu6dud2x5js5b.js} +19 -17
- package/dist/chunks/{button-fxdpoacmq5rv1adk.js.map → button-mnrxu6dud2x5js5b.js.map} +1 -1
- package/dist/chunks/{checkbox-dtoq56ieijj9m6vr.js → checkbox-dqih8tzzt3vhp870.js} +25 -19
- package/dist/chunks/checkbox-dqih8tzzt3vhp870.js.map +1 -0
- package/dist/chunks/{clipboard-text-nvdsloomefwgcxat.js → clipboard-text-mrut8z3dt1w0efxz.js} +4 -4
- package/dist/chunks/{clipboard-text-nvdsloomefwgcxat.js.map → clipboard-text-mrut8z3dt1w0efxz.js.map} +1 -1
- package/dist/chunks/{collapsible-cnsxmp7dko87pgx0.js → collapsible-nzqcf9zwnjkxqzr6.js} +21 -17
- package/dist/chunks/collapsible-nzqcf9zwnjkxqzr6.js.map +1 -0
- package/dist/chunks/{combobox-kjmt3aoy4sia7g0o.js → combobox-msvukodjsqzlvpqc.js} +142 -130
- package/dist/chunks/combobox-msvukodjsqzlvpqc.js.map +1 -0
- package/dist/chunks/{command-palette-jrq7p16tff6n46nj.js → command-palette-fqhyacp33fhyf696.js} +5 -5
- package/dist/chunks/{command-palette-jrq7p16tff6n46nj.js.map → command-palette-fqhyacp33fhyf696.js.map} +1 -1
- package/dist/chunks/{dialog-gndju3sqg1lmpb3f.js → dialog-my9fioafdstq50mi.js} +49 -33
- package/dist/chunks/{dialog-gndju3sqg1lmpb3f.js.map → dialog-my9fioafdstq50mi.js.map} +1 -1
- package/dist/chunks/{dropdown-k6orz4j043xybf54.js → dropdown-g4sb4cw9ffqaw5gx.js} +54 -44
- package/dist/chunks/dropdown-g4sb4cw9ffqaw5gx.js.map +1 -0
- package/dist/chunks/{empty-ni12ufom1kkakbuc.js → empty-n17inn1z67bpohkw.js} +2 -2
- package/dist/chunks/{empty-ni12ufom1kkakbuc.js.map → empty-n17inn1z67bpohkw.js.map} +1 -1
- package/dist/chunks/{field-n16udu32tpyq5udz.js → field-c8o7h3rlam4c9pcx.js} +3 -3
- package/dist/chunks/{field-n16udu32tpyq5udz.js.map → field-c8o7h3rlam4c9pcx.js.map} +1 -1
- package/dist/chunks/{input-area-hhhpgg0ev8bowtrk.js → input-area-eurk3seud30ricwn.js} +4 -4
- package/dist/chunks/{input-area-hhhpgg0ev8bowtrk.js.map → input-area-eurk3seud30ricwn.js.map} +1 -1
- package/dist/chunks/{input-mv7giprcc6hfkpq3.js → input-en8hhb14mmt3tfwn.js} +3 -3
- package/dist/chunks/{input-mv7giprcc6hfkpq3.js.map → input-en8hhb14mmt3tfwn.js.map} +1 -1
- package/dist/chunks/{input-group-kkw5j7rwzhj66h10.js → input-group-d09ocmjcbdai0gze.js} +5 -5
- package/dist/chunks/{input-group-kkw5j7rwzhj66h10.js.map → input-group-d09ocmjcbdai0gze.js.map} +1 -1
- package/dist/chunks/{label-f6yvqca8qhbpvkq8.js → label-c8rz453pti66slki.js} +3 -3
- package/dist/chunks/{label-f6yvqca8qhbpvkq8.js.map → label-c8rz453pti66slki.js.map} +1 -1
- package/dist/chunks/{layer-card-gegkqhkjy65l1ueo.js → layer-card-er4flkcxmzfug8jw.js} +2 -2
- package/dist/chunks/{layer-card-gegkqhkjy65l1ueo.js.map → layer-card-er4flkcxmzfug8jw.js.map} +1 -1
- package/dist/chunks/{link-jjk7qolyol7s1jkk.js → link-i6vnwyjcwvjz5btm.js} +20 -19
- package/dist/chunks/{link-jjk7qolyol7s1jkk.js.map → link-i6vnwyjcwvjz5btm.js.map} +1 -1
- package/dist/chunks/menubar-ng5if56amh1tto4j.js +98 -0
- package/dist/chunks/menubar-ng5if56amh1tto4j.js.map +1 -0
- package/dist/chunks/{meter-kxn34sy6l2mz5dwq.js → meter-d5igshkjqttl1fdj.js} +2 -2
- package/dist/chunks/{meter-kxn34sy6l2mz5dwq.js.map → meter-d5igshkjqttl1fdj.js.map} +1 -1
- package/dist/chunks/{pagination-ixbq8ssuuo0jxaa4.js → pagination-bw7vwca4wrfjm8vb.js} +3 -3
- package/dist/chunks/{pagination-ixbq8ssuuo0jxaa4.js.map → pagination-bw7vwca4wrfjm8vb.js.map} +1 -1
- package/dist/chunks/{popover-js5ds3szd43kspja.js → popover-ozf1j7oi7pxiudyz.js} +4 -2
- package/dist/chunks/popover-ozf1j7oi7pxiudyz.js.map +1 -0
- package/dist/chunks/{radio-nyw89v4eafptepmz.js → radio-gpg6kmzonr2cayq1.js} +54 -46
- package/dist/chunks/radio-gpg6kmzonr2cayq1.js.map +1 -0
- package/dist/chunks/{select-o2i7aovnu8v1zv8t.js → select-dw9iw35ug7yer3o3.js} +101 -91
- package/dist/chunks/select-dw9iw35ug7yer3o3.js.map +1 -0
- package/dist/chunks/{sensitive-input-bjg6m791yz7g6bn3.js → sensitive-input-dgoxjtoxl4zqa51v.js} +50 -44
- package/dist/chunks/{sensitive-input-bjg6m791yz7g6bn3.js.map → sensitive-input-dgoxjtoxl4zqa51v.js.map} +1 -1
- package/dist/chunks/sidebar-hzio700cg85f7f31.js +1014 -0
- package/dist/chunks/sidebar-hzio700cg85f7f31.js.map +1 -0
- package/dist/chunks/{surface-lzwbh3f5t0gxc83t.js → surface-iyejjbqogjbo7ise.js} +2 -2
- package/dist/chunks/{surface-lzwbh3f5t0gxc83t.js.map → surface-iyejjbqogjbo7ise.js.map} +1 -1
- package/dist/chunks/{switch-d9cs31oj4rjtg717.js → switch-g8f77h69h34xld06.js} +50 -45
- package/dist/chunks/switch-g8f77h69h34xld06.js.map +1 -0
- package/dist/chunks/{table-c6qemc2jmv22cv3p.js → table-e1te1im2tt2ez05y.js} +2 -2
- package/dist/chunks/{table-c6qemc2jmv22cv3p.js.map → table-e1te1im2tt2ez05y.js.map} +1 -1
- package/dist/chunks/{table-of-contents-fzyv7uhnnyr13dqu.js → table-of-contents-jco9kvt48d34dwsw.js} +34 -30
- package/dist/chunks/table-of-contents-jco9kvt48d34dwsw.js.map +1 -0
- package/dist/chunks/{tabs-f0ztlooi91ko9g04.js → tabs-hice1yy5q2t889z8.js} +6 -4
- package/dist/chunks/tabs-hice1yy5q2t889z8.js.map +1 -0
- package/dist/chunks/{toast-ejfm5cbt9yulqhol.js → toast-kvbgct0jvfmn4mas.js} +29 -27
- package/dist/chunks/{toast-ejfm5cbt9yulqhol.js.map → toast-kvbgct0jvfmn4mas.js.map} +1 -1
- package/dist/chunks/{tooltip-o6xfw9jjclv9pxaj.js → tooltip-ken77ixya0qpidie.js} +6 -6
- package/dist/chunks/{tooltip-o6xfw9jjclv9pxaj.js.map → tooltip-ken77ixya0qpidie.js.map} +1 -1
- package/dist/chunks/{vendor-base-ui-mzjqwv5teijixz8h.js → vendor-base-ui-knphx7dts1vm1x37.js} +1726 -1719
- package/dist/chunks/{vendor-base-ui-mzjqwv5teijixz8h.js.map → vendor-base-ui-knphx7dts1vm1x37.js.map} +1 -1
- package/dist/code.js +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input.js +3 -3
- package/dist/components/label.js +1 -1
- package/dist/components/layer-card.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/meter.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sensitive-input.js +1 -1
- package/dist/components/sidebar.js +22 -23
- package/dist/components/surface.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table-of-contents.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/tooltip.js +1 -1
- package/dist/index.js +122 -123
- package/dist/primitives/accordion.js +1 -1
- package/dist/primitives/alert-dialog.js +1 -1
- package/dist/primitives/autocomplete.js +1 -1
- package/dist/primitives/avatar.js +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/checkbox-group.js +1 -1
- package/dist/primitives/checkbox.js +1 -1
- package/dist/primitives/collapsible.js +1 -1
- package/dist/primitives/combobox.js +1 -1
- package/dist/primitives/context-menu.js +1 -1
- package/dist/primitives/csp-provider.js +1 -1
- package/dist/primitives/dialog.js +1 -1
- package/dist/primitives/direction-provider.js +1 -1
- package/dist/primitives/drawer.js +1 -1
- package/dist/primitives/field.js +1 -1
- package/dist/primitives/fieldset.js +1 -1
- package/dist/primitives/form.js +1 -1
- package/dist/primitives/input.js +1 -1
- package/dist/primitives/menu.js +1 -1
- package/dist/primitives/menubar.js +1 -1
- package/dist/primitives/meter.js +1 -1
- package/dist/primitives/navigation-menu.js +1 -1
- package/dist/primitives/number-field.js +1 -1
- package/dist/primitives/otp-field.js +1 -1
- package/dist/primitives/popover.js +1 -1
- package/dist/primitives/preview-card.js +1 -1
- package/dist/primitives/progress.js +1 -1
- package/dist/primitives/radio-group.js +1 -1
- package/dist/primitives/radio.js +1 -1
- package/dist/primitives/scroll-area.js +1 -1
- package/dist/primitives/select.js +1 -1
- package/dist/primitives/separator.js +1 -1
- package/dist/primitives/slider.js +1 -1
- package/dist/primitives/switch.js +1 -1
- package/dist/primitives/tabs.js +1 -1
- package/dist/primitives/toast.js +1 -1
- package/dist/primitives/toggle-group.js +1 -1
- package/dist/primitives/toggle.js +1 -1
- package/dist/primitives/toolbar.js +1 -1
- package/dist/primitives/tooltip.js +1 -1
- package/dist/primitives.js +1 -1
- package/dist/scripts/theme-generator/config.d.ts.map +1 -1
- package/dist/scripts/theme-generator/config.js +36 -38
- package/dist/scripts/theme-generator/config.js.map +1 -1
- package/dist/scripts/theme-generator/generate-css.d.ts.map +1 -1
- package/dist/scripts/theme-generator/types.d.ts +8 -2
- package/dist/scripts/theme-generator/types.d.ts.map +1 -1
- package/dist/src/components/autocomplete/autocomplete.d.ts +1 -0
- package/dist/src/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/src/components/autocomplete/index.d.ts +1 -0
- package/dist/src/components/autocomplete/index.d.ts.map +1 -1
- package/dist/src/components/badge/badge.d.ts +1 -1
- package/dist/src/components/banner/banner.d.ts +14 -7
- package/dist/src/components/banner/banner.d.ts.map +1 -1
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/src/components/button/button.d.ts.map +1 -1
- package/dist/src/components/chart/TimeseriesChart.d.ts +43 -1
- package/dist/src/components/chart/TimeseriesChart.d.ts.map +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/src/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/src/components/combobox/combobox.d.ts +1 -0
- package/dist/src/components/combobox/combobox.d.ts.map +1 -1
- package/dist/src/components/combobox/index.d.ts +1 -0
- package/dist/src/components/combobox/index.d.ts.map +1 -1
- package/dist/src/components/dialog/dialog.d.ts.map +1 -1
- package/dist/src/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/src/components/link/link.d.ts.map +1 -1
- package/dist/src/components/menubar/menubar.d.ts.map +1 -1
- package/dist/src/components/popover/popover.d.ts.map +1 -1
- package/dist/src/components/radio/radio.d.ts.map +1 -1
- package/dist/src/components/select/select.d.ts.map +1 -1
- package/dist/src/components/sensitive-input/sensitive-input.d.ts.map +1 -1
- package/dist/src/components/sidebar/index.d.ts +1 -1
- package/dist/src/components/sidebar/index.d.ts.map +1 -1
- package/dist/src/components/sidebar/sidebar.d.ts +159 -146
- package/dist/src/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/src/components/switch/switch.d.ts.map +1 -1
- package/dist/src/components/table-of-contents/table-of-contents.d.ts.map +1 -1
- package/dist/src/components/tabs/tabs.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/styles/kumo.css +37 -0
- package/dist/styles/theme-kumo.css +28 -35
- package/package.json +4 -1
- package/scripts/theme-generator/config.ts +37 -39
- package/scripts/theme-generator/generate-css.ts +4 -1
- package/scripts/theme-generator/types.ts +8 -2
- package/dist/chunks/SankeyChart-krkvltewpn3bbupw.js +0 -651
- package/dist/chunks/SankeyChart-krkvltewpn3bbupw.js.map +0 -1
- package/dist/chunks/badge-e9w8qrjmeu9nocf6.js.map +0 -1
- package/dist/chunks/banner-ip2lm8r87hich557.js +0 -88
- package/dist/chunks/banner-ip2lm8r87hich557.js.map +0 -1
- package/dist/chunks/breadcrumbs-g4pyoikibpoxsgw4.js.map +0 -1
- package/dist/chunks/checkbox-dtoq56ieijj9m6vr.js.map +0 -1
- package/dist/chunks/collapsible-cnsxmp7dko87pgx0.js.map +0 -1
- package/dist/chunks/combobox-kjmt3aoy4sia7g0o.js.map +0 -1
- package/dist/chunks/dropdown-k6orz4j043xybf54.js.map +0 -1
- package/dist/chunks/menubar-d5s6h96nw8ggy04a.js +0 -96
- package/dist/chunks/menubar-d5s6h96nw8ggy04a.js.map +0 -1
- package/dist/chunks/popover-js5ds3szd43kspja.js.map +0 -1
- package/dist/chunks/radio-nyw89v4eafptepmz.js.map +0 -1
- package/dist/chunks/select-o2i7aovnu8v1zv8t.js.map +0 -1
- package/dist/chunks/sidebar-izcfqkrzt4vqn8ez.js +0 -875
- package/dist/chunks/sidebar-izcfqkrzt4vqn8ez.js.map +0 -1
- package/dist/chunks/switch-d9cs31oj4rjtg717.js.map +0 -1
- package/dist/chunks/table-of-contents-fzyv7uhnnyr13dqu.js.map +0 -1
- package/dist/chunks/tabs-f0ztlooi91ko9g04.js.map +0 -1
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
3
|
-
import { CaretDownIcon as
|
|
3
|
+
import { CaretDownIcon as f } from "@phosphor-icons/react";
|
|
4
4
|
import { forwardRef as r } from "react";
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
function
|
|
5
|
+
import { c as s } from "./cn-ct4n7r74mh8y0f48.js";
|
|
6
|
+
import { aQ as C, aR as i, aS as n } from "./vendor-base-ui-knphx7dts1vm1x37.js";
|
|
7
|
+
function t({ className: e, ...l }) {
|
|
8
8
|
return /* @__PURE__ */ o(C, { className: e, ...l });
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
t.displayName = "Collapsible.Root";
|
|
11
11
|
const p = r(
|
|
12
12
|
({ className: e, ...l }, a) => /* @__PURE__ */ o(
|
|
13
13
|
n,
|
|
14
14
|
{
|
|
15
15
|
ref: a,
|
|
16
|
-
|
|
16
|
+
"data-kumo-component": "Collapsible",
|
|
17
|
+
"data-kumo-part": "trigger",
|
|
18
|
+
className: s("cursor-pointer", e),
|
|
17
19
|
...l
|
|
18
20
|
}
|
|
19
21
|
)
|
|
@@ -34,7 +36,9 @@ const c = r(({ children: e, className: l }, a) => /* @__PURE__ */ g(
|
|
|
34
36
|
n,
|
|
35
37
|
{
|
|
36
38
|
ref: a,
|
|
37
|
-
|
|
39
|
+
"data-kumo-component": "Collapsible",
|
|
40
|
+
"data-kumo-part": "default-trigger",
|
|
41
|
+
className: s(
|
|
38
42
|
// Defensive resets to prevent global button styles from polluting the trigger
|
|
39
43
|
"bg-transparent border-none shadow-none p-0 m-0",
|
|
40
44
|
// Base styles for the trigger
|
|
@@ -44,29 +48,29 @@ const c = r(({ children: e, className: l }, a) => /* @__PURE__ */ g(
|
|
|
44
48
|
children: [
|
|
45
49
|
e,
|
|
46
50
|
" ",
|
|
47
|
-
/* @__PURE__ */ o(
|
|
51
|
+
/* @__PURE__ */ o(f, { className: "h-4 w-4 transition-transform [[data-panel-open]_&]:rotate-180" })
|
|
48
52
|
]
|
|
49
53
|
}
|
|
50
54
|
));
|
|
51
55
|
c.displayName = "Collapsible.DefaultTrigger";
|
|
52
|
-
const
|
|
56
|
+
const u = r(({ children: e, className: l, ...a }, b) => /* @__PURE__ */ o(
|
|
53
57
|
i,
|
|
54
58
|
{
|
|
55
|
-
ref:
|
|
56
|
-
className:
|
|
59
|
+
ref: b,
|
|
60
|
+
className: s("my-2 space-y-4 border-l-2 border-kumo-fill pl-4", l),
|
|
57
61
|
...a,
|
|
58
62
|
children: e
|
|
59
63
|
}
|
|
60
64
|
));
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
Root:
|
|
65
|
+
u.displayName = "Collapsible.DefaultPanel";
|
|
66
|
+
const P = Object.assign(t, {
|
|
67
|
+
Root: t,
|
|
64
68
|
Trigger: p,
|
|
65
69
|
Panel: m,
|
|
66
70
|
DefaultTrigger: c,
|
|
67
|
-
DefaultPanel:
|
|
71
|
+
DefaultPanel: u
|
|
68
72
|
});
|
|
69
73
|
export {
|
|
70
|
-
|
|
74
|
+
P as C
|
|
71
75
|
};
|
|
72
|
-
//# sourceMappingURL=collapsible-
|
|
76
|
+
//# sourceMappingURL=collapsible-nzqcf9zwnjkxqzr6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible-nzqcf9zwnjkxqzr6.js","sources":["../../src/components/collapsible/collapsible.tsx"],"sourcesContent":["import { Collapsible as CollapsibleBase } from \"@base-ui/react/collapsible\";\nimport { CaretDownIcon } from \"@phosphor-icons/react\";\nimport {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n// =============================================================================\n// Variants\n// =============================================================================\n\nexport const KUMO_COLLAPSIBLE_VARIANTS = {} as const;\n\nexport const KUMO_COLLAPSIBLE_DEFAULT_VARIANTS = {} as const;\n\nexport interface KumoCollapsibleVariantsProps {}\n\nexport function collapsibleVariants(_props: KumoCollapsibleVariantsProps = {}) {\n return cn();\n}\n\n// =============================================================================\n// Collapsible Root\n// =============================================================================\n\ntype BaseRootProps = ComponentPropsWithoutRef<typeof CollapsibleBase.Root>;\n\nexport interface CollapsibleRootProps extends BaseRootProps {\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * Root component that manages collapsible state.\n *\n * @example\n * ```tsx\n * <Collapsible.Root open={open} onOpenChange={setOpen}>\n * <Collapsible.Trigger>Toggle</Collapsible.Trigger>\n * <Collapsible.Panel>Content</Collapsible.Panel>\n * </Collapsible.Root>\n * ```\n */\nfunction CollapsibleRoot({ className, ...props }: CollapsibleRootProps) {\n return <CollapsibleBase.Root className={className} {...props} />;\n}\n\nCollapsibleRoot.displayName = \"Collapsible.Root\";\n\n// =============================================================================\n// Collapsible Trigger\n// =============================================================================\n\ntype BaseTriggerProps = ComponentPropsWithoutRef<\n typeof CollapsibleBase.Trigger\n>;\n\nexport interface CollapsibleTriggerProps extends BaseTriggerProps {\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * Button that toggles the collapsible panel visibility.\n * Use the `render` prop to customize the trigger element.\n *\n * @example\n * ```tsx\n * // Default button\n * <Collapsible.Trigger>Show more</Collapsible.Trigger>\n *\n * // Custom trigger element\n * <Collapsible.Trigger render={<Button variant=\"ghost\" />}>\n * Toggle details\n * </Collapsible.Trigger>\n * ```\n */\nconst CollapsibleTrigger = forwardRef<HTMLButtonElement, CollapsibleTriggerProps>(\n ({ className, ...props }, ref) => {\n return (\n <CollapsibleBase.Trigger\n ref={ref}\n data-kumo-component=\"Collapsible\"\n data-kumo-part=\"trigger\"\n className={cn(\"cursor-pointer\", className)}\n {...props}\n />\n );\n },\n);\n\nCollapsibleTrigger.displayName = \"Collapsible.Trigger\";\n\n// =============================================================================\n// Collapsible Panel\n// =============================================================================\n\ntype BasePanelProps = ComponentPropsWithoutRef<typeof CollapsibleBase.Panel>;\n\nexport interface CollapsiblePanelProps extends BasePanelProps {\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * Container for collapsible content. Renders when the collapsible is open.\n *\n * @example\n * ```tsx\n * <Collapsible.Panel className=\"mt-2 space-y-4\">\n * <Text>Revealed content here</Text>\n * </Collapsible.Panel>\n * ```\n */\nconst CollapsiblePanel = forwardRef<HTMLDivElement, CollapsiblePanelProps>(\n ({ className, ...props }, ref) => {\n return (\n <CollapsibleBase.Panel\n ref={ref}\n className={className}\n {...props}\n />\n );\n },\n);\n\nCollapsiblePanel.displayName = \"Collapsible.Panel\";\n\n// =============================================================================\n// Default Trigger (Migration Affordance)\n// =============================================================================\n\nexport interface CollapsibleDefaultTriggerProps {\n /** Label text displayed in the trigger */\n children: ReactNode;\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * Pre-styled trigger with text label and animated caret icon.\n * Provides the same visual style as the previous Collapsible API.\n *\n * Use this for quick migration or when you want the default Kumo style.\n *\n * @example\n * ```tsx\n * <Collapsible.Root>\n * <Collapsible.DefaultTrigger>Show details</Collapsible.DefaultTrigger>\n * <Collapsible.Panel>Content</Collapsible.Panel>\n * </Collapsible.Root>\n * ```\n */\nconst CollapsibleDefaultTrigger = forwardRef<\n HTMLButtonElement,\n CollapsibleDefaultTriggerProps\n>(({ children, className }, ref) => {\n return (\n <CollapsibleBase.Trigger\n ref={ref}\n data-kumo-component=\"Collapsible\"\n data-kumo-part=\"default-trigger\"\n className={cn(\n // Defensive resets to prevent global button styles from polluting the trigger\n \"bg-transparent border-none shadow-none p-0 m-0\",\n // Base styles for the trigger\n \"flex cursor-pointer items-center gap-1 text-sm text-kumo-link select-none\",\n className,\n )}\n >\n {children}{\" \"}\n <CaretDownIcon className=\"h-4 w-4 transition-transform [[data-panel-open]_&]:rotate-180\" />\n </CollapsibleBase.Trigger>\n );\n});\n\nCollapsibleDefaultTrigger.displayName = \"Collapsible.DefaultTrigger\";\n\n// =============================================================================\n// Default Panel (Migration Affordance)\n// =============================================================================\n\nexport interface CollapsibleDefaultPanelProps extends BasePanelProps {\n /** Panel content */\n children: ReactNode;\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * Pre-styled panel with left border accent and standard spacing.\n * Provides the same visual style as the previous Collapsible API.\n *\n * @example\n * ```tsx\n * <Collapsible.Root>\n * <Collapsible.DefaultTrigger>Show details</Collapsible.DefaultTrigger>\n * <Collapsible.DefaultPanel>\n * <Text>Content with default styling</Text>\n * </Collapsible.DefaultPanel>\n * </Collapsible.Root>\n * ```\n */\nconst CollapsibleDefaultPanel = forwardRef<\n HTMLDivElement,\n CollapsibleDefaultPanelProps\n>(({ children, className, ...props }, ref) => {\n return (\n <CollapsibleBase.Panel\n ref={ref}\n className={cn(\"my-2 space-y-4 border-l-2 border-kumo-fill pl-4\", className)}\n {...props}\n >\n {children}\n </CollapsibleBase.Panel>\n );\n});\n\nCollapsibleDefaultPanel.displayName = \"Collapsible.DefaultPanel\";\n\n// =============================================================================\n// Compound Component Export\n// =============================================================================\n\n/**\n * Collapsible — a composable disclosure component for showing/hiding content.\n *\n * Built on Base UI's Collapsible with full composition support.\n *\n * ## Basic Usage\n *\n * ```tsx\n * const [open, setOpen] = useState(false);\n *\n * <Collapsible.Root open={open} onOpenChange={setOpen}>\n * <Collapsible.Trigger render={<Button variant=\"ghost\" />}>\n * Show details\n * </Collapsible.Trigger>\n * <Collapsible.Panel className=\"mt-2\">\n * <Text>Hidden content revealed when expanded.</Text>\n * </Collapsible.Panel>\n * </Collapsible.Root>\n * ```\n *\n * ## With Default Styling\n *\n * Use `DefaultTrigger` and `DefaultPanel` for the classic Kumo style:\n *\n * ```tsx\n * <Collapsible.Root>\n * <Collapsible.DefaultTrigger>Show details</Collapsible.DefaultTrigger>\n * <Collapsible.DefaultPanel>\n * <Text>Content with border-left accent</Text>\n * </Collapsible.DefaultPanel>\n * </Collapsible.Root>\n * ```\n *\n * ## Controlled Accordion Pattern\n *\n * ```tsx\n * const [activeIndex, setActiveIndex] = useState<number | null>(null);\n *\n * {items.map((item, i) => (\n * <Collapsible.Root\n * key={i}\n * open={activeIndex === i}\n * onOpenChange={(open) => setActiveIndex(open ? i : null)}\n * >\n * <Collapsible.DefaultTrigger>{item.title}</Collapsible.DefaultTrigger>\n * <Collapsible.DefaultPanel>{item.content}</Collapsible.DefaultPanel>\n * </Collapsible.Root>\n * ))}\n * ```\n */\nexport const Collapsible = Object.assign(CollapsibleRoot, {\n Root: CollapsibleRoot,\n Trigger: CollapsibleTrigger,\n Panel: CollapsiblePanel,\n DefaultTrigger: CollapsibleDefaultTrigger,\n DefaultPanel: CollapsibleDefaultPanel,\n});\n\n// =============================================================================\n// Type Exports\n// =============================================================================\n\nexport type CollapsibleProps = CollapsibleRootProps;\n"],"names":["CollapsibleRoot","className","props","CollapsibleBase.Root","CollapsibleTrigger","forwardRef","ref","jsx","CollapsibleBase.Trigger","cn","CollapsiblePanel","CollapsibleBase.Panel","CollapsibleDefaultTrigger","children","jsxs","CaretDownIcon","CollapsibleDefaultPanel","Collapsible"],"mappings":";;;;;;AA6CA,SAASA,EAAgB,EAAE,WAAAC,GAAW,GAAGC,KAA+B;AACtE,2BAAQC,GAAA,EAAqB,WAAAF,GAAuB,GAAGC,EAAA,CAAO;AAChE;AAEAF,EAAgB,cAAc;AA8B9B,MAAMI,IAAqBC;AAAA,EACzB,CAAC,EAAE,WAAAJ,GAAW,GAAGC,EAAA,GAASI,MAEtB,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,uBAAoB;AAAA,MACpB,kBAAe;AAAA,MACf,WAAWG,EAAG,kBAAkBR,CAAS;AAAA,MACxC,GAAGC;AAAA,IAAA;AAAA,EAAA;AAIZ;AAEAE,EAAmB,cAAc;AAuBjC,MAAMM,IAAmBL;AAAA,EACvB,CAAC,EAAE,WAAAJ,GAAW,GAAGC,EAAA,GAASI,MAEtB,gBAAAC;AAAA,IAACI;AAAAA,IAAA;AAAA,MACC,KAAAL;AAAA,MACA,WAAAL;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EAAA;AAIZ;AAEAQ,EAAiB,cAAc;AA2B/B,MAAME,IAA4BP,EAGhC,CAAC,EAAE,UAAAQ,GAAU,WAAAZ,EAAA,GAAaK,MAExB,gBAAAQ;AAAA,EAACN;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,uBAAoB;AAAA,IACpB,kBAAe;AAAA,IACf,WAAWG;AAAA;AAAA,MAET;AAAA;AAAA,MAEA;AAAA,MACAR;AAAA,IAAA;AAAA,IAGD,UAAA;AAAA,MAAAY;AAAA,MAAU;AAAA,MACX,gBAAAN,EAACQ,GAAA,EAAc,WAAU,gEAAA,CAAgE;AAAA,IAAA;AAAA,EAAA;AAAA,CAG9F;AAEDH,EAA0B,cAAc;AA2BxC,MAAMI,IAA0BX,EAG9B,CAAC,EAAE,UAAAQ,GAAU,WAAAZ,GAAW,GAAGC,EAAA,GAASI,MAElC,gBAAAC;AAAA,EAACI;AAAAA,EAAA;AAAA,IACC,KAAAL;AAAA,IACA,WAAWG,EAAG,mDAAmDR,CAAS;AAAA,IACzE,GAAGC;AAAA,IAEH,UAAAW;AAAA,EAAA;AAAA,CAGN;AAEDG,EAAwB,cAAc;AAwD/B,MAAMC,IAAc,OAAO,OAAOjB,GAAiB;AAAA,EACxD,MAAMA;AAAA,EACN,SAASI;AAAA,EACT,OAAOM;AAAA,EACP,gBAAgBE;AAAA,EAChB,cAAcI;AAChB,CAAC;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
3
3
|
import { CheckIcon as T, XIcon as C, CaretDownIcon as N } from "@phosphor-icons/react";
|
|
4
|
-
import { createContext as E, useContext as
|
|
5
|
-
import { i as p, K as P } from "./input-
|
|
6
|
-
import { c as
|
|
7
|
-
import { F as j } from "./field-
|
|
8
|
-
import { u as
|
|
9
|
-
import { a6 as
|
|
4
|
+
import { createContext as E, useContext as g, Fragment as V } from "react";
|
|
5
|
+
import { i as p, K as P } from "./input-en8hhb14mmt3tfwn.js";
|
|
6
|
+
import { c as r } from "./cn-ct4n7r74mh8y0f48.js";
|
|
7
|
+
import { F as j } from "./field-c8o7h3rlam4c9pcx.js";
|
|
8
|
+
import { u as F } from "./portal-provider-hwmkdmkpvct0cb76.js";
|
|
9
|
+
import { a6 as G, a7 as h, a8 as x, a9 as f, aa as L, ab as M, ac as _, ad as A, ae as K, af as O, ag as b, ah as U, ai as W, aj as B, ak as D, al as H, am as X, an as q, ao as J, ap as Q } from "./vendor-base-ui-knphx7dts1vm1x37.js";
|
|
10
10
|
P.size;
|
|
11
11
|
const u = E({ size: "base", hasError: !1 });
|
|
12
12
|
function y({
|
|
13
|
-
label:
|
|
14
|
-
required:
|
|
15
|
-
labelTooltip:
|
|
13
|
+
label: o,
|
|
14
|
+
required: a,
|
|
15
|
+
labelTooltip: i,
|
|
16
16
|
description: s,
|
|
17
17
|
error: t,
|
|
18
18
|
children: n,
|
|
@@ -20,40 +20,40 @@ function y({
|
|
|
20
20
|
...l
|
|
21
21
|
}) {
|
|
22
22
|
const c = /* @__PURE__ */ e(u.Provider, { value: { size: d, hasError: !!t }, children: /* @__PURE__ */ e(M, { ...l, children: n }) });
|
|
23
|
-
return
|
|
23
|
+
return o ? /* @__PURE__ */ e(
|
|
24
24
|
j,
|
|
25
25
|
{
|
|
26
|
-
label:
|
|
27
|
-
required:
|
|
28
|
-
labelTooltip:
|
|
26
|
+
label: o,
|
|
27
|
+
required: a,
|
|
28
|
+
labelTooltip: i,
|
|
29
29
|
description: s,
|
|
30
30
|
error: t ? typeof t == "string" ? { message: t, match: !0 } : t : void 0,
|
|
31
31
|
children: c
|
|
32
32
|
}
|
|
33
33
|
) : c;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
children:
|
|
37
|
-
className:
|
|
38
|
-
align:
|
|
35
|
+
function k({
|
|
36
|
+
children: o,
|
|
37
|
+
className: a,
|
|
38
|
+
align: i = "start",
|
|
39
39
|
sideOffset: s = 4,
|
|
40
40
|
alignOffset: t,
|
|
41
41
|
side: n,
|
|
42
42
|
container: d
|
|
43
43
|
}) {
|
|
44
|
-
const l =
|
|
45
|
-
return /* @__PURE__ */ e(
|
|
46
|
-
|
|
44
|
+
const l = F();
|
|
45
|
+
return /* @__PURE__ */ e(q, { container: d ?? l ?? void 0, children: /* @__PURE__ */ e(
|
|
46
|
+
J,
|
|
47
47
|
{
|
|
48
48
|
className: "",
|
|
49
|
-
align:
|
|
49
|
+
align: i,
|
|
50
50
|
sideOffset: s,
|
|
51
51
|
alignOffset: t,
|
|
52
52
|
side: n,
|
|
53
53
|
children: /* @__PURE__ */ e(
|
|
54
|
-
|
|
54
|
+
Q,
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
56
|
+
className: r(
|
|
57
57
|
"flex flex-col",
|
|
58
58
|
// flexbox layout for sticky input + scrollable list
|
|
59
59
|
"max-h-[min(var(--available-height),24rem)] max-w-(--available-width) min-w-(--anchor-width) py-1.5",
|
|
@@ -61,42 +61,44 @@ function v({
|
|
|
61
61
|
// background
|
|
62
62
|
"rounded-lg shadow-lg ring ring-kumo-line",
|
|
63
63
|
// border part
|
|
64
|
-
|
|
64
|
+
a
|
|
65
65
|
),
|
|
66
|
-
children:
|
|
66
|
+
children: o
|
|
67
67
|
}
|
|
68
68
|
)
|
|
69
69
|
}
|
|
70
70
|
) });
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const Y = {
|
|
73
73
|
xs: { padding: "pr-5", iconSize: 12, iconRight: "right-1" },
|
|
74
74
|
sm: { padding: "pr-6", iconSize: 14, iconRight: "right-1.5" },
|
|
75
75
|
base: { padding: "pr-8", iconSize: 16, iconRight: "right-2" },
|
|
76
76
|
lg: { padding: "pr-10", iconSize: 18, iconRight: "right-3" }
|
|
77
77
|
};
|
|
78
|
-
function
|
|
79
|
-
className:
|
|
80
|
-
...
|
|
78
|
+
function v({
|
|
79
|
+
className: o,
|
|
80
|
+
...a
|
|
81
81
|
}) {
|
|
82
|
-
const { size:
|
|
82
|
+
const { size: i, hasError: s } = g(u), t = Y[i];
|
|
83
83
|
return /* @__PURE__ */ m(
|
|
84
84
|
f,
|
|
85
85
|
{
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
"data-kumo-component": "Combobox",
|
|
87
|
+
"data-kumo-part": "trigger",
|
|
88
|
+
className: r(
|
|
89
|
+
p({ size: i, variant: s ? "error" : "default" }),
|
|
88
90
|
"relative flex items-center",
|
|
89
91
|
"data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",
|
|
90
92
|
"data-[placeholder]:text-kumo-placeholder",
|
|
91
93
|
t.padding,
|
|
92
|
-
|
|
94
|
+
o
|
|
93
95
|
),
|
|
94
96
|
children: [
|
|
95
|
-
/* @__PURE__ */ e(x, { ...
|
|
97
|
+
/* @__PURE__ */ e(x, { ...a }),
|
|
96
98
|
/* @__PURE__ */ e(
|
|
97
|
-
|
|
99
|
+
h,
|
|
98
100
|
{
|
|
99
|
-
className:
|
|
101
|
+
className: r(
|
|
100
102
|
"absolute top-1/2 -translate-y-1/2 flex items-center text-kumo-subtle",
|
|
101
103
|
t.iconRight
|
|
102
104
|
),
|
|
@@ -107,7 +109,7 @@ function z({
|
|
|
107
109
|
}
|
|
108
110
|
);
|
|
109
111
|
}
|
|
110
|
-
const
|
|
112
|
+
const Z = {
|
|
111
113
|
xs: {
|
|
112
114
|
padding: "pr-7",
|
|
113
115
|
iconSize: 12,
|
|
@@ -133,26 +135,26 @@ const Y = {
|
|
|
133
135
|
caretRight: "right-3"
|
|
134
136
|
}
|
|
135
137
|
};
|
|
136
|
-
function
|
|
137
|
-
clearLabel:
|
|
138
|
-
showOptionsLabel:
|
|
139
|
-
...
|
|
138
|
+
function z({
|
|
139
|
+
clearLabel: o = "Clear selection",
|
|
140
|
+
showOptionsLabel: a = "Show options",
|
|
141
|
+
...i
|
|
140
142
|
}) {
|
|
141
|
-
const { size: s, hasError: t } =
|
|
143
|
+
const { size: s, hasError: t } = g(u), n = Z[s];
|
|
142
144
|
return /* @__PURE__ */ m(
|
|
143
145
|
"div",
|
|
144
146
|
{
|
|
145
|
-
className:
|
|
147
|
+
className: r(
|
|
146
148
|
"relative inline-block w-full max-w-xs",
|
|
147
149
|
"has-[:disabled]:opacity-50 has-[:disabled]:cursor-not-allowed",
|
|
148
|
-
|
|
150
|
+
i.className
|
|
149
151
|
),
|
|
150
152
|
children: [
|
|
151
153
|
/* @__PURE__ */ e(
|
|
152
154
|
b,
|
|
153
155
|
{
|
|
154
|
-
...
|
|
155
|
-
className:
|
|
156
|
+
...i,
|
|
157
|
+
className: r(
|
|
156
158
|
p({ size: s, variant: t ? "error" : "default" }),
|
|
157
159
|
"w-full",
|
|
158
160
|
n.padding,
|
|
@@ -161,10 +163,12 @@ function R({
|
|
|
161
163
|
}
|
|
162
164
|
),
|
|
163
165
|
/* @__PURE__ */ e(
|
|
164
|
-
|
|
166
|
+
X,
|
|
165
167
|
{
|
|
166
|
-
"
|
|
167
|
-
|
|
168
|
+
"data-kumo-component": "Combobox",
|
|
169
|
+
"data-kumo-part": "clear",
|
|
170
|
+
"aria-label": o,
|
|
171
|
+
className: r(
|
|
168
172
|
"absolute top-1/2 flex -translate-y-1/2 cursor-pointer bg-transparent p-0",
|
|
169
173
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-0",
|
|
170
174
|
n.clearRight
|
|
@@ -175,115 +179,119 @@ function R({
|
|
|
175
179
|
/* @__PURE__ */ e(
|
|
176
180
|
f,
|
|
177
181
|
{
|
|
178
|
-
"
|
|
179
|
-
|
|
182
|
+
"data-kumo-component": "Combobox",
|
|
183
|
+
"data-kumo-part": "trigger",
|
|
184
|
+
"aria-label": a,
|
|
185
|
+
className: r(
|
|
180
186
|
"absolute top-1/2 -translate-y-1/2 flex items-center justify-center cursor-pointer text-kumo-subtle",
|
|
181
187
|
"m-0 bg-transparent p-0",
|
|
182
188
|
// Reset Stratus global button styles
|
|
183
189
|
n.caretRight
|
|
184
190
|
),
|
|
185
|
-
children: /* @__PURE__ */ e(
|
|
191
|
+
children: /* @__PURE__ */ e(h, { className: "flex items-center", children: /* @__PURE__ */ e(N, { size: n.iconSize, className: "fill-current" }) })
|
|
186
192
|
}
|
|
187
193
|
)
|
|
188
194
|
]
|
|
189
195
|
}
|
|
190
196
|
);
|
|
191
197
|
}
|
|
192
|
-
function
|
|
193
|
-
children:
|
|
194
|
-
className:
|
|
195
|
-
...
|
|
198
|
+
function R({
|
|
199
|
+
children: o,
|
|
200
|
+
className: a,
|
|
201
|
+
...i
|
|
196
202
|
}) {
|
|
197
203
|
return /* @__PURE__ */ m(
|
|
198
|
-
|
|
204
|
+
U,
|
|
199
205
|
{
|
|
200
|
-
|
|
201
|
-
|
|
206
|
+
"data-kumo-component": "Combobox",
|
|
207
|
+
"data-kumo-part": "item",
|
|
208
|
+
...i,
|
|
209
|
+
className: r(
|
|
202
210
|
"group mx-1.5 grid grid-cols-[1fr_16px] gap-2 rounded px-2 py-1.5 text-base",
|
|
203
211
|
"cursor-pointer data-highlighted:bg-kumo-tint",
|
|
204
212
|
// Disabled rows: muted text, no pointer, suppress highlight bg even
|
|
205
213
|
// when keyboard nav lands on them. Base UI sets `data-disabled` on
|
|
206
214
|
// the element when the `disabled` prop is true.
|
|
207
215
|
"data-[disabled]:cursor-not-allowed data-[disabled]:text-kumo-subtle data-[disabled]:opacity-60 data-[disabled]:data-highlighted:bg-transparent",
|
|
208
|
-
|
|
216
|
+
a
|
|
209
217
|
),
|
|
210
218
|
children: [
|
|
211
|
-
/* @__PURE__ */ e("div", { className: "col-start-1", children:
|
|
212
|
-
/* @__PURE__ */ e(
|
|
219
|
+
/* @__PURE__ */ e("div", { className: "col-start-1", children: o }),
|
|
220
|
+
/* @__PURE__ */ e(W, { className: "col-start-2 flex items-center", children: /* @__PURE__ */ e(T, {}) })
|
|
213
221
|
]
|
|
214
222
|
}
|
|
215
223
|
);
|
|
216
224
|
}
|
|
217
|
-
function
|
|
225
|
+
function $(o) {
|
|
218
226
|
return /* @__PURE__ */ e(
|
|
219
|
-
|
|
227
|
+
O,
|
|
220
228
|
{
|
|
221
|
-
...
|
|
222
|
-
className:
|
|
229
|
+
...o,
|
|
230
|
+
className: r(
|
|
223
231
|
"mx-1.5 shrink-0 px-4 py-2 text-[0.925rem] leading-4 text-kumo-subtle empty:m-0 empty:p-0"
|
|
224
232
|
),
|
|
225
|
-
children:
|
|
233
|
+
children: o.children ?? "No labels found."
|
|
226
234
|
}
|
|
227
235
|
);
|
|
228
236
|
}
|
|
229
|
-
function
|
|
237
|
+
function ee(o) {
|
|
230
238
|
return /* @__PURE__ */ e(
|
|
231
239
|
b,
|
|
232
240
|
{
|
|
233
|
-
...
|
|
234
|
-
className:
|
|
241
|
+
...o,
|
|
242
|
+
className: r(
|
|
235
243
|
p(),
|
|
236
244
|
"mx-1.5 w-[calc(100%-0.75rem)] shrink-0 first:mb-2",
|
|
237
|
-
|
|
245
|
+
o.className
|
|
238
246
|
)
|
|
239
247
|
}
|
|
240
248
|
);
|
|
241
249
|
}
|
|
242
|
-
function
|
|
243
|
-
className:
|
|
244
|
-
...
|
|
250
|
+
function oe({
|
|
251
|
+
className: o,
|
|
252
|
+
...a
|
|
245
253
|
}) {
|
|
246
254
|
return /* @__PURE__ */ e(
|
|
247
|
-
|
|
255
|
+
_,
|
|
248
256
|
{
|
|
249
|
-
...
|
|
250
|
-
className:
|
|
257
|
+
...a,
|
|
258
|
+
className: r(
|
|
251
259
|
"min-h-0 flex-1 overflow-y-auto overscroll-contain scroll-pt-2 scroll-pb-2",
|
|
252
|
-
|
|
260
|
+
o
|
|
253
261
|
)
|
|
254
262
|
}
|
|
255
263
|
);
|
|
256
264
|
}
|
|
257
|
-
function ae(
|
|
265
|
+
function ae(o) {
|
|
258
266
|
return /* @__PURE__ */ e(
|
|
259
|
-
|
|
267
|
+
K,
|
|
260
268
|
{
|
|
261
|
-
...
|
|
262
|
-
className:
|
|
269
|
+
...o,
|
|
270
|
+
className: r(
|
|
263
271
|
"mx-1.5 px-2 py-1.5 text-sm text-kumo-subtle",
|
|
264
|
-
|
|
272
|
+
o.className
|
|
265
273
|
)
|
|
266
274
|
}
|
|
267
275
|
);
|
|
268
276
|
}
|
|
269
|
-
function
|
|
277
|
+
function te(o) {
|
|
270
278
|
return /* @__PURE__ */ e(
|
|
271
|
-
|
|
279
|
+
A,
|
|
272
280
|
{
|
|
273
|
-
...
|
|
281
|
+
...o,
|
|
274
282
|
className: "border-t border-kumo-hairline mt-2 pt-2 first:border-t-0 first:mt-0 first:pt-0"
|
|
275
283
|
}
|
|
276
284
|
);
|
|
277
285
|
}
|
|
278
|
-
function
|
|
279
|
-
removeLabel:
|
|
280
|
-
...
|
|
286
|
+
function w({
|
|
287
|
+
removeLabel: o = "Remove",
|
|
288
|
+
...a
|
|
281
289
|
}) {
|
|
282
290
|
return /* @__PURE__ */ m(
|
|
283
|
-
|
|
291
|
+
B,
|
|
284
292
|
{
|
|
285
|
-
...
|
|
286
|
-
className:
|
|
293
|
+
...a,
|
|
294
|
+
className: r(
|
|
287
295
|
"flex items-center gap-2.5",
|
|
288
296
|
// Layout
|
|
289
297
|
"h-6 pl-2 pr-[3px]",
|
|
@@ -296,12 +304,14 @@ function I({
|
|
|
296
304
|
// Typography
|
|
297
305
|
),
|
|
298
306
|
children: [
|
|
299
|
-
|
|
307
|
+
a.children,
|
|
300
308
|
/* @__PURE__ */ e(
|
|
301
|
-
|
|
309
|
+
D,
|
|
302
310
|
{
|
|
303
|
-
"
|
|
304
|
-
|
|
311
|
+
"data-kumo-component": "Combobox",
|
|
312
|
+
"data-kumo-part": "chip-remove",
|
|
313
|
+
"aria-label": o,
|
|
314
|
+
className: r(
|
|
305
315
|
"cursor-pointer rounded-md p-1 hover:bg-kumo-fill-hover",
|
|
306
316
|
"bg-transparent flex"
|
|
307
317
|
),
|
|
@@ -312,47 +322,47 @@ function I({
|
|
|
312
322
|
}
|
|
313
323
|
);
|
|
314
324
|
}
|
|
315
|
-
const
|
|
325
|
+
const re = {
|
|
316
326
|
xs: "min-h-5",
|
|
317
327
|
sm: "min-h-6.5",
|
|
318
328
|
base: "min-h-9",
|
|
319
329
|
lg: "min-h-10"
|
|
320
330
|
};
|
|
321
|
-
function
|
|
322
|
-
placeholder:
|
|
323
|
-
renderItem:
|
|
324
|
-
className:
|
|
331
|
+
function I({
|
|
332
|
+
placeholder: o,
|
|
333
|
+
renderItem: a,
|
|
334
|
+
className: i,
|
|
325
335
|
inputSide: s = "right",
|
|
326
336
|
value: t
|
|
327
337
|
}) {
|
|
328
|
-
const { size: n, hasError: d } =
|
|
338
|
+
const { size: n, hasError: d } = g(u), l = t;
|
|
329
339
|
return /* @__PURE__ */ m(
|
|
330
|
-
|
|
340
|
+
H,
|
|
331
341
|
{
|
|
332
|
-
className:
|
|
342
|
+
className: r(
|
|
333
343
|
p({ size: n, variant: d ? "error" : "default" }),
|
|
334
344
|
"flex flex-col",
|
|
335
345
|
"gap-1 py-1 px-1.5",
|
|
336
|
-
|
|
346
|
+
re[n],
|
|
337
347
|
"h-auto",
|
|
338
348
|
"data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",
|
|
339
|
-
|
|
349
|
+
i
|
|
340
350
|
),
|
|
341
351
|
children: [
|
|
342
352
|
s === "top" && /* @__PURE__ */ e(
|
|
343
353
|
b,
|
|
344
354
|
{
|
|
345
|
-
placeholder:
|
|
355
|
+
placeholder: o,
|
|
346
356
|
className: "w-full px-2 py-1 border-0 bg-inherit"
|
|
347
357
|
}
|
|
348
358
|
),
|
|
349
359
|
/* @__PURE__ */ m("div", { className: "flex items-center flex-wrap gap-1.5 flex-1", children: [
|
|
350
|
-
l !== void 0 && l.length > 0 && l.map((c) =>
|
|
351
|
-
/* @__PURE__ */ e(x, { children: (c) => l !== void 0 ? null : /* @__PURE__ */ e(V, { children: c.map((S) =>
|
|
360
|
+
l !== void 0 && l.length > 0 && l.map((c) => a(c)),
|
|
361
|
+
/* @__PURE__ */ e(x, { children: (c) => l !== void 0 ? null : /* @__PURE__ */ e(V, { children: c.map((S) => a(S)) }) }),
|
|
352
362
|
s === "right" && /* @__PURE__ */ e(
|
|
353
363
|
b,
|
|
354
364
|
{
|
|
355
|
-
placeholder:
|
|
365
|
+
placeholder: o,
|
|
356
366
|
className: "min-w-[100px] flex-1 px-2 py-1 border-0 bg-inherit"
|
|
357
367
|
}
|
|
358
368
|
)
|
|
@@ -362,35 +372,37 @@ function k({
|
|
|
362
372
|
);
|
|
363
373
|
}
|
|
364
374
|
y.displayName = "Combobox.Root";
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
const
|
|
375
|
+
k.displayName = "Combobox.Content";
|
|
376
|
+
v.displayName = "Combobox.TriggerValue";
|
|
377
|
+
z.displayName = "Combobox.TriggerInput";
|
|
378
|
+
R.displayName = "Combobox.Item";
|
|
379
|
+
w.displayName = "Combobox.Chip";
|
|
380
|
+
I.displayName = "Combobox.TriggerMultipleWithInput";
|
|
381
|
+
const pe = Object.assign(y, {
|
|
372
382
|
// Helper components
|
|
373
|
-
Content:
|
|
374
|
-
TriggerValue:
|
|
375
|
-
TriggerInput:
|
|
376
|
-
TriggerMultipleWithInput:
|
|
383
|
+
Content: k,
|
|
384
|
+
TriggerValue: v,
|
|
385
|
+
TriggerInput: z,
|
|
386
|
+
TriggerMultipleWithInput: I,
|
|
377
387
|
// Slightly modified BaseUI
|
|
378
|
-
Chip:
|
|
379
|
-
Item:
|
|
388
|
+
Chip: w,
|
|
389
|
+
Item: R,
|
|
380
390
|
// Styled BaseUI
|
|
381
|
-
Input:
|
|
382
|
-
Empty:
|
|
391
|
+
Input: ee,
|
|
392
|
+
Empty: $,
|
|
383
393
|
GroupLabel: ae,
|
|
384
|
-
Group:
|
|
394
|
+
Group: te,
|
|
385
395
|
// Styled BaseUI
|
|
386
|
-
List:
|
|
396
|
+
List: oe,
|
|
387
397
|
// BaseUI
|
|
388
398
|
Collection: L,
|
|
389
399
|
Trigger: f,
|
|
390
400
|
Value: x,
|
|
391
|
-
Icon:
|
|
401
|
+
Icon: h,
|
|
402
|
+
// Filtering
|
|
403
|
+
useFilter: G
|
|
392
404
|
});
|
|
393
405
|
export {
|
|
394
|
-
|
|
406
|
+
pe as C
|
|
395
407
|
};
|
|
396
|
-
//# sourceMappingURL=combobox-
|
|
408
|
+
//# sourceMappingURL=combobox-msvukodjsqzlvpqc.js.map
|