@agentero/design-system 0.31.3 → 0.31.4
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.
|
@@ -594,7 +594,7 @@
|
|
|
594
594
|
<main>
|
|
595
595
|
<div class="wrap">
|
|
596
596
|
<div class="note ok" style="margin-bottom: 16px;">
|
|
597
|
-
Using <code>react-component-meta</code>. Generation took <strong>
|
|
597
|
+
Using <code>react-component-meta</code>. Generation took <strong>2.7s</strong>.
|
|
598
598
|
</div>
|
|
599
599
|
<h2 class="section-title">Components</h2>
|
|
600
600
|
<div class="grid" role="list">
|
package/package.json
CHANGED
package/src/combobox/combobox.js
CHANGED
|
@@ -1,24 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { useMergeProps as t } from "../../lib/merge-props.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { ComboboxItem as l } from "../../node_modules/@base-ui/react/combobox/item/ComboboxItem.js";
|
|
12
|
-
import { ComboboxEmpty as u } from "../../node_modules/@base-ui/react/combobox/empty/ComboboxEmpty.js";
|
|
13
|
-
import { ComboboxClear as d } from "../../node_modules/@base-ui/react/combobox/clear/ComboboxClear.js";
|
|
14
|
-
import { InputContext as f } from "../input/context.js";
|
|
15
|
-
import { inputRecipe as p } from "../input/input.js";
|
|
16
|
-
import { IconCancel as m } from "./icons.js";
|
|
17
|
-
import { tv as h } from "tailwind-variants";
|
|
18
|
-
import { use as g } from "react";
|
|
19
|
-
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
4
|
+
import { InputContext as n } from "../input/context.js";
|
|
5
|
+
import { inputRecipe as r } from "../input/input.js";
|
|
6
|
+
import { IconCancel as i } from "./icons.js";
|
|
7
|
+
import { tv as a } from "tailwind-variants";
|
|
8
|
+
import { use as o } from "react";
|
|
9
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
10
|
+
import { Combobox as l } from "@base-ui/react/combobox";
|
|
20
11
|
//#region src/combobox/combobox.tsx
|
|
21
|
-
var
|
|
12
|
+
var u = a({ slots: {
|
|
22
13
|
field: "relative",
|
|
23
14
|
clear: [
|
|
24
15
|
"absolute top-1/2 right-3 flex size-6 -translate-y-1/2 cursor-pointer items-center",
|
|
@@ -43,76 +34,76 @@ var y = h({ slots: {
|
|
|
43
34
|
"data-disabled:cursor-default data-disabled:text-text-default-base-tertiary"
|
|
44
35
|
],
|
|
45
36
|
message: ["mx-2 my-px px-3 py-2 text-sm text-text-default-base-tertiary", "empty:m-0 empty:p-0"]
|
|
46
|
-
} }),
|
|
47
|
-
|
|
48
|
-
var
|
|
37
|
+
} }), d = u(), f = (e) => /* @__PURE__ */ s(l.Root, { ...e });
|
|
38
|
+
f.displayName = "Combobox.Root";
|
|
39
|
+
var p = /* @__PURE__ */ new Set([
|
|
49
40
|
"value",
|
|
50
41
|
"defaultValue",
|
|
51
42
|
"onChange"
|
|
52
|
-
]),
|
|
53
|
-
let
|
|
54
|
-
return t(
|
|
55
|
-
},
|
|
56
|
-
let { className:
|
|
57
|
-
return /* @__PURE__ */
|
|
43
|
+
]), m = (e) => {
|
|
44
|
+
let r = o(n), i = r ? Object.fromEntries(Object.entries(r).filter(([e]) => !p.has(e))) : null;
|
|
45
|
+
return t(i, e);
|
|
46
|
+
}, h = ({ clearLabel: t = "Clear", ...n }) => {
|
|
47
|
+
let { className: a, size: o = "md", ...u } = m(n);
|
|
48
|
+
return /* @__PURE__ */ c("div", {
|
|
58
49
|
"data-slot": "combobox-field",
|
|
59
|
-
className:
|
|
60
|
-
children: [/* @__PURE__ */
|
|
50
|
+
className: d.field(),
|
|
51
|
+
children: [/* @__PURE__ */ s(l.Input, {
|
|
61
52
|
"data-slot": "combobox-input",
|
|
62
|
-
"data-size":
|
|
63
|
-
className: e(
|
|
64
|
-
...
|
|
65
|
-
}), /* @__PURE__ */
|
|
53
|
+
"data-size": o,
|
|
54
|
+
className: e(r({ size: o }), "pr-11", a),
|
|
55
|
+
...u
|
|
56
|
+
}), /* @__PURE__ */ s(l.Clear, {
|
|
66
57
|
"data-slot": "combobox-clear",
|
|
67
58
|
"aria-label": t,
|
|
68
|
-
className:
|
|
69
|
-
children: /* @__PURE__ */
|
|
59
|
+
className: d.clear(),
|
|
60
|
+
children: /* @__PURE__ */ s(i, {})
|
|
70
61
|
})]
|
|
71
62
|
});
|
|
72
63
|
};
|
|
73
|
-
|
|
74
|
-
var
|
|
64
|
+
h.displayName = "Combobox.Input";
|
|
65
|
+
var g = ({ className: t, side: n = "bottom", align: r = "start", sideOffset: i = 12, alignOffset: a, anchor: o, collisionPadding: c = 8, ...u }) => /* @__PURE__ */ s(l.Portal, { children: /* @__PURE__ */ s(l.Positioner, {
|
|
75
66
|
side: n,
|
|
76
67
|
align: r,
|
|
77
68
|
sideOffset: i,
|
|
78
69
|
alignOffset: a,
|
|
79
|
-
anchor:
|
|
80
|
-
collisionPadding:
|
|
70
|
+
anchor: o,
|
|
71
|
+
collisionPadding: c,
|
|
81
72
|
className: "isolate z-(--z-index-top-layer) pointer-events-auto",
|
|
82
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ s(l.Popup, {
|
|
83
74
|
"data-slot": "combobox-content",
|
|
84
|
-
className: e(
|
|
85
|
-
...
|
|
75
|
+
className: e(d.content(), t),
|
|
76
|
+
...u
|
|
86
77
|
})
|
|
87
78
|
}) });
|
|
88
|
-
|
|
89
|
-
var
|
|
79
|
+
g.displayName = "Combobox.Content";
|
|
80
|
+
var _ = ({ className: t, ...n }) => {
|
|
90
81
|
let r = "aria-label" in n || "aria-labelledby" in n;
|
|
91
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ s(l.List, {
|
|
92
83
|
"data-slot": "combobox-list",
|
|
93
84
|
"aria-label": r ? void 0 : "Suggestions",
|
|
94
|
-
className: e(
|
|
85
|
+
className: e(d.list(), t),
|
|
95
86
|
...n
|
|
96
87
|
});
|
|
97
88
|
};
|
|
98
|
-
|
|
99
|
-
var
|
|
89
|
+
_.displayName = "Combobox.List";
|
|
90
|
+
var v = ({ className: t, ...n }) => /* @__PURE__ */ s(l.Item, {
|
|
100
91
|
"data-slot": "combobox-item",
|
|
101
|
-
className: e(
|
|
92
|
+
className: e(d.item(), t),
|
|
102
93
|
...n
|
|
103
94
|
});
|
|
104
|
-
|
|
105
|
-
var
|
|
95
|
+
v.displayName = "Combobox.Item";
|
|
96
|
+
var y = ({ className: t, ...n }) => /* @__PURE__ */ s(l.Empty, {
|
|
106
97
|
"data-slot": "combobox-empty",
|
|
107
|
-
className: e(
|
|
98
|
+
className: e(d.message(), t),
|
|
108
99
|
...n
|
|
109
100
|
});
|
|
110
|
-
|
|
111
|
-
var
|
|
101
|
+
y.displayName = "Combobox.Empty";
|
|
102
|
+
var b = ({ className: t, ...n }) => /* @__PURE__ */ s(l.Status, {
|
|
112
103
|
"data-slot": "combobox-status",
|
|
113
|
-
className: e(
|
|
104
|
+
className: e(d.message(), t),
|
|
114
105
|
...n
|
|
115
106
|
});
|
|
116
|
-
|
|
107
|
+
b.displayName = "Combobox.Status";
|
|
117
108
|
//#endregion
|
|
118
|
-
export {
|
|
109
|
+
export { g as Content, y as Empty, h as Input, v as Item, _ as List, f as Root, b as Status, u as comboboxRecipe };
|