@agentero/design-system 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/merge-props.d.ts +42 -0
- package/lib/merge-props.js +24 -0
- package/mcp/manifests/components.html +841 -72
- package/mcp/manifests/components.json +508 -10
- package/package.json +10 -1
- package/src/alert/alert.js +28 -28
- package/src/avatar/avatar.js +22 -22
- package/src/avatar-group/avatar-group.js +6 -6
- package/src/button/button.js +7 -7
- package/src/data-table/data-table.js +36 -36
- package/src/dropdown-menu/dropdown-menu.js +2 -2
- package/src/field/context.d.ts +62 -0
- package/src/field/context.js +6 -0
- package/src/field/field.d.ts +214 -0
- package/src/field/field.js +129 -0
- package/src/field/icons.d.ts +9 -0
- package/src/field/icons.js +14 -0
- package/src/field/index.d.ts +30 -0
- package/src/field/index.js +13 -0
- package/src/field-text/field-text.d.ts +28 -0
- package/src/field-text/field-text.js +26 -0
- package/src/field-text/index.d.ts +2 -0
- package/src/field-text/index.js +2 -0
- package/src/hover-card/hover-card.js +1 -1
- package/src/input/context.d.ts +17 -0
- package/src/input/context.js +10 -0
- package/src/input/index.d.ts +1 -0
- package/src/input/index.js +3 -2
- package/src/input/input.d.ts +7 -7
- package/src/input/input.js +16 -11
- package/src/label/context.d.ts +13 -0
- package/src/label/context.js +7 -0
- package/src/label/index.d.ts +1 -0
- package/src/label/index.js +3 -2
- package/src/label/label.d.ts +6 -1
- package/src/label/label.js +19 -17
- package/src/modal/modal.js +25 -25
- package/src/popover/popover.js +1 -1
- package/src/progress/progress.js +9 -9
- package/src/switch/switch.js +7 -7
- package/src/table/table.js +28 -28
- package/src/tabs/tabs.js +26 -26
- package/src/tag/tag.js +7 -7
- package/theme/base.css +19 -6
package/src/label/label.d.ts
CHANGED
|
@@ -49,6 +49,11 @@ export type LabelProps = ComponentPropsWithRef<typeof LabelPrimitive.Root> & Lab
|
|
|
49
49
|
* button) inside a `<label>` gives that element the label's accessible name and
|
|
50
50
|
* makes a click focus the control — render it as a sibling instead.
|
|
51
51
|
*
|
|
52
|
+
* When a container provides `LabelContext`, the label takes `htmlFor` and
|
|
53
|
+
* `required` from it and associates itself with the control without an explicit
|
|
54
|
+
* `htmlFor`; `Field.Root` is one such container. Standalone it behaves as a
|
|
55
|
+
* plain label. Its own props always win over the context.
|
|
56
|
+
*
|
|
52
57
|
* @summary Accessible caption for a form control
|
|
53
58
|
*
|
|
54
59
|
* @example
|
|
@@ -56,6 +61,6 @@ export type LabelProps = ComponentPropsWithRef<typeof LabelPrimitive.Root> & Lab
|
|
|
56
61
|
* <Input id="phone" type="tel" />
|
|
57
62
|
*/
|
|
58
63
|
export declare const Label: {
|
|
59
|
-
(
|
|
64
|
+
(props: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
60
65
|
displayName: string;
|
|
61
66
|
};
|
package/src/label/label.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { useLabelContext as t } from "./context.js";
|
|
4
|
+
import { tv as n } from "tailwind-variants";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import * as a from "@radix-ui/react-label";
|
|
5
7
|
//#region src/label/label.tsx
|
|
6
|
-
var
|
|
8
|
+
var o = n({
|
|
7
9
|
slots: {
|
|
8
10
|
root: "flex flex-wrap gap-1 py-0.25 text-sm font-semibold text-text-input-normal",
|
|
9
11
|
text: "align-middle",
|
|
10
|
-
required: "
|
|
12
|
+
required: "align-middle text-text-input-destructive"
|
|
11
13
|
},
|
|
12
14
|
variants: { optional: { true: { text: "after:font-normal after:text-text-input-placeholder after:content-[\"_(optional)\"]" } } },
|
|
13
15
|
defaultVariants: { optional: !1 }
|
|
14
|
-
}),
|
|
15
|
-
let u =
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
}), s = (n) => {
|
|
17
|
+
let { className: s, children: c, optional: l = !1, required: u = !1, ...d } = t(n), f = o({ optional: l && !u });
|
|
18
|
+
return /* @__PURE__ */ i(a.Root, {
|
|
17
19
|
"data-slot": "label",
|
|
18
|
-
className: e(
|
|
19
|
-
...
|
|
20
|
-
children: [/* @__PURE__ */
|
|
21
|
-
className:
|
|
22
|
-
children:
|
|
23
|
-
}),
|
|
20
|
+
className: e(f.root(), s),
|
|
21
|
+
...d,
|
|
22
|
+
children: [/* @__PURE__ */ r("span", {
|
|
23
|
+
className: f.text(),
|
|
24
|
+
children: c
|
|
25
|
+
}), u && /* @__PURE__ */ r("span", {
|
|
24
26
|
"aria-hidden": !0,
|
|
25
|
-
className:
|
|
27
|
+
className: f.required(),
|
|
26
28
|
children: "*"
|
|
27
29
|
})]
|
|
28
30
|
});
|
|
29
31
|
};
|
|
30
|
-
|
|
32
|
+
s.displayName = "Label";
|
|
31
33
|
//#endregion
|
|
32
|
-
export {
|
|
34
|
+
export { s as Label, o as labelRecipe };
|
package/src/modal/modal.js
CHANGED
|
@@ -3,29 +3,29 @@ import { cn as e } from "../../lib/utils.js";
|
|
|
3
3
|
import { Button as t } from "../button/button.js";
|
|
4
4
|
import { IconClose as n } from "./icons.js";
|
|
5
5
|
import { tv as r } from "tailwind-variants";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { createContext as i, useContext as a } from "react";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
8
|
import * as c from "@radix-ui/react-dialog";
|
|
9
9
|
//#region src/modal/modal.tsx
|
|
10
|
-
var l = (e) => /* @__PURE__ */
|
|
10
|
+
var l = (e) => /* @__PURE__ */ o(c.Root, {
|
|
11
11
|
"data-slot": "modal-root",
|
|
12
12
|
...e
|
|
13
13
|
});
|
|
14
14
|
l.displayName = "Modal.Root";
|
|
15
|
-
var u = (e) => /* @__PURE__ */
|
|
15
|
+
var u = (e) => /* @__PURE__ */ o(c.Trigger, {
|
|
16
16
|
"data-slot": "modal-trigger",
|
|
17
17
|
...e
|
|
18
18
|
});
|
|
19
19
|
u.displayName = "Modal.Trigger";
|
|
20
|
-
var d =
|
|
20
|
+
var d = i("dialog"), f = r({
|
|
21
21
|
slots: {
|
|
22
22
|
overlay: [
|
|
23
|
-
"fixed inset-0 z-(--z-index-
|
|
23
|
+
"fixed inset-0 z-(--z-index-top-layer) bg-overlay-dark-300",
|
|
24
24
|
"data-[state=open]:animate-modal-overlay-in data-[state=closed]:animate-modal-overlay-out",
|
|
25
25
|
"motion-reduce:animate-none!"
|
|
26
26
|
],
|
|
27
27
|
content: [
|
|
28
|
-
"fixed top-1/2 left-1/2 z-(--z-index-
|
|
28
|
+
"fixed top-1/2 left-1/2 z-(--z-index-top-layer) -translate-x-1/2 -translate-y-1/2",
|
|
29
29
|
"flex max-h-[calc(100dvh-4rem)] w-[calc(100vw-2rem)] flex-col gap-6",
|
|
30
30
|
"rounded-lg bg-bg-default-base-primary py-10 shadow-sm outline-none",
|
|
31
31
|
"data-[state=open]:animate-modal-content-in data-[state=closed]:animate-modal-content-out",
|
|
@@ -41,70 +41,70 @@ var d = o("dialog"), f = r({
|
|
|
41
41
|
lg: { content: "max-w-[45rem]" }
|
|
42
42
|
} },
|
|
43
43
|
defaultVariants: { size: "md" }
|
|
44
|
-
}), p = f(), m = ({ className: t, size: n, variant: r = "dialog", children:
|
|
44
|
+
}), p = f(), m = ({ className: t, size: n, variant: r = "dialog", children: i, onEscapeKeyDown: a, onPointerDownOutside: l, ...u }) => {
|
|
45
45
|
let p = f({ size: n }), m = r === "alert";
|
|
46
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ o(d.Provider, {
|
|
47
47
|
value: r,
|
|
48
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: /* @__PURE__ */ s(c.Portal, { children: [/* @__PURE__ */ o(c.Overlay, {
|
|
49
49
|
"data-slot": "modal-overlay",
|
|
50
50
|
className: p.overlay()
|
|
51
|
-
}), /* @__PURE__ */
|
|
51
|
+
}), /* @__PURE__ */ o(c.Content, {
|
|
52
52
|
"data-slot": "modal-content",
|
|
53
53
|
role: m ? "alertdialog" : "dialog",
|
|
54
54
|
className: e(p.content(), t),
|
|
55
55
|
onEscapeKeyDown: (e) => {
|
|
56
|
-
|
|
56
|
+
a?.(e), m && e.preventDefault();
|
|
57
57
|
},
|
|
58
58
|
onPointerDownOutside: (e) => {
|
|
59
59
|
l?.(e), m && e.preventDefault();
|
|
60
60
|
},
|
|
61
61
|
...u,
|
|
62
|
-
children:
|
|
62
|
+
children: i
|
|
63
63
|
})] })
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
66
|
m.displayName = "Modal.Content";
|
|
67
|
-
var h = ({ className: e, children: r, ...
|
|
68
|
-
let l =
|
|
69
|
-
return /* @__PURE__ */
|
|
67
|
+
var h = ({ className: e, children: r, ...i }) => {
|
|
68
|
+
let l = a(d);
|
|
69
|
+
return /* @__PURE__ */ s("div", {
|
|
70
70
|
"data-slot": "modal-title",
|
|
71
71
|
className: p.title({ className: e }),
|
|
72
|
-
children: [/* @__PURE__ */
|
|
73
|
-
...
|
|
72
|
+
children: [/* @__PURE__ */ o(c.Title, {
|
|
73
|
+
...i,
|
|
74
74
|
children: r
|
|
75
|
-
}), l === "dialog" && /* @__PURE__ */
|
|
75
|
+
}), l === "dialog" && /* @__PURE__ */ o(c.Close, {
|
|
76
76
|
asChild: !0,
|
|
77
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ o(t, {
|
|
78
78
|
variant: "ghost",
|
|
79
79
|
size: "sm",
|
|
80
80
|
"aria-label": "Close",
|
|
81
81
|
className: "shrink-0",
|
|
82
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ o(n, {})
|
|
83
83
|
})
|
|
84
84
|
})]
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
87
|
h.displayName = "Modal.Title";
|
|
88
|
-
var g = ({ className: e, ...t }) => /* @__PURE__ */
|
|
88
|
+
var g = ({ className: e, ...t }) => /* @__PURE__ */ o(c.Description, {
|
|
89
89
|
"data-slot": "modal-description",
|
|
90
90
|
className: p.description({ className: e }),
|
|
91
91
|
...t
|
|
92
92
|
});
|
|
93
93
|
g.displayName = "Modal.Description";
|
|
94
|
-
var _ = ({ className: e, ...t }) => /* @__PURE__ */
|
|
94
|
+
var _ = ({ className: e, ...t }) => /* @__PURE__ */ o("div", {
|
|
95
95
|
"data-slot": "modal-body",
|
|
96
96
|
tabIndex: 0,
|
|
97
97
|
className: p.body({ className: e }),
|
|
98
98
|
...t
|
|
99
99
|
});
|
|
100
100
|
_.displayName = "Modal.Body";
|
|
101
|
-
var v = ({ className: e, ...t }) => /* @__PURE__ */
|
|
101
|
+
var v = ({ className: e, ...t }) => /* @__PURE__ */ o("div", {
|
|
102
102
|
"data-slot": "modal-footer",
|
|
103
103
|
className: p.footer({ className: e }),
|
|
104
104
|
...t
|
|
105
105
|
});
|
|
106
106
|
v.displayName = "Modal.Footer";
|
|
107
|
-
var y = (e) => /* @__PURE__ */
|
|
107
|
+
var y = (e) => /* @__PURE__ */ o(c.Close, {
|
|
108
108
|
"data-slot": "modal-close",
|
|
109
109
|
...e
|
|
110
110
|
});
|
package/src/popover/popover.js
CHANGED
|
@@ -23,7 +23,7 @@ var o = (e) => /* @__PURE__ */ t(n.Close, {
|
|
|
23
23
|
});
|
|
24
24
|
o.displayName = "Popover.Close";
|
|
25
25
|
var s = n.Portal, c = e({ base: [
|
|
26
|
-
"z-(--z-index-
|
|
26
|
+
"z-(--z-index-top-layer) rounded-md bg-bg-default-base-primary px-2 py-3 shadow-md",
|
|
27
27
|
"border border-border-default-base-primary",
|
|
28
28
|
"will-change-[transform,opacity]",
|
|
29
29
|
"origin-(--radix-popover-content-transform-origin)",
|
package/src/progress/progress.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { tv as e } from "tailwind-variants";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useId as t } from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
import * as i from "@radix-ui/react-progress";
|
|
6
6
|
//#region src/progress/progress.tsx
|
|
7
7
|
var a = e({ slots: {
|
|
@@ -12,28 +12,28 @@ var a = e({ slots: {
|
|
|
12
12
|
label: "text-sm text-text-default-base-primary",
|
|
13
13
|
value: "text-base text-text-default-base-primary"
|
|
14
14
|
} }), o = ({ percentage: e, label: o, "aria-label": s, className: c }) => {
|
|
15
|
-
let l =
|
|
16
|
-
return /* @__PURE__ */
|
|
15
|
+
let l = t(), u = a(), d = Math.min(100, Math.max(0, e));
|
|
16
|
+
return /* @__PURE__ */ r("div", {
|
|
17
17
|
"data-slot": "progress",
|
|
18
18
|
className: u.root(),
|
|
19
|
-
children: [o && /* @__PURE__ */
|
|
19
|
+
children: [o && /* @__PURE__ */ r("div", {
|
|
20
20
|
"data-slot": "progress-label",
|
|
21
21
|
className: u.labelRow(),
|
|
22
|
-
children: [/* @__PURE__ */
|
|
22
|
+
children: [/* @__PURE__ */ n("span", {
|
|
23
23
|
id: l,
|
|
24
24
|
className: u.label(),
|
|
25
25
|
children: o
|
|
26
|
-
}), /* @__PURE__ */
|
|
26
|
+
}), /* @__PURE__ */ r("span", {
|
|
27
27
|
className: u.value(),
|
|
28
28
|
children: [d, "%"]
|
|
29
29
|
})]
|
|
30
|
-
}), /* @__PURE__ */
|
|
30
|
+
}), /* @__PURE__ */ n(i.Root, {
|
|
31
31
|
"data-slot": "progress-track",
|
|
32
32
|
value: d,
|
|
33
33
|
"aria-labelledby": o ? l : void 0,
|
|
34
34
|
"aria-label": o ? void 0 : s ?? "Progress",
|
|
35
35
|
className: u.track({ className: c }),
|
|
36
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ n(i.Indicator, {
|
|
37
37
|
"data-slot": "progress-indicator",
|
|
38
38
|
className: u.indicator(),
|
|
39
39
|
style: { transform: `translateX(-${100 - d}%)` }
|
package/src/switch/switch.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { tv as t } from "tailwind-variants";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useId as n } from "react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
6
|
import * as a from "@radix-ui/react-switch";
|
|
7
7
|
//#region src/switch/switch.tsx
|
|
8
8
|
var o = t({
|
|
@@ -32,24 +32,24 @@ var o = t({
|
|
|
32
32
|
},
|
|
33
33
|
defaultVariants: { size: "md" }
|
|
34
34
|
}), s = ({ className: t, size: s, reverse: c, label: l, id: u, ref: d, ...f }) => {
|
|
35
|
-
let p =
|
|
35
|
+
let p = n(), m = u ?? (l ? p : void 0), h = o({
|
|
36
36
|
size: s,
|
|
37
37
|
reverse: c
|
|
38
|
-
}), g = /* @__PURE__ */
|
|
38
|
+
}), g = /* @__PURE__ */ r(a.Root, {
|
|
39
39
|
ref: d,
|
|
40
40
|
id: m,
|
|
41
41
|
"data-slot": "switch",
|
|
42
42
|
className: e(h.root(), t),
|
|
43
43
|
...f,
|
|
44
|
-
children: /* @__PURE__ */
|
|
44
|
+
children: /* @__PURE__ */ r(a.Thumb, {
|
|
45
45
|
"data-slot": "switch-thumb",
|
|
46
46
|
className: h.thumb()
|
|
47
47
|
})
|
|
48
48
|
});
|
|
49
|
-
return l ? /* @__PURE__ */
|
|
49
|
+
return l ? /* @__PURE__ */ i("span", {
|
|
50
50
|
"data-slot": "switch-wrapper",
|
|
51
51
|
className: h.wrapper(),
|
|
52
|
-
children: [g, /* @__PURE__ */
|
|
52
|
+
children: [g, /* @__PURE__ */ r("label", {
|
|
53
53
|
htmlFor: m,
|
|
54
54
|
"data-slot": "switch-label",
|
|
55
55
|
className: h.label(),
|
package/src/table/table.js
CHANGED
|
@@ -3,8 +3,8 @@ import { cn as e } from "../../lib/utils.js";
|
|
|
3
3
|
import { Button as t } from "../button/button.js";
|
|
4
4
|
import { IconKeyboardArrowDown as n } from "./icons.js";
|
|
5
5
|
import { tv as r } from "tailwind-variants";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { createContext as i, use as a } from "react";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
8
|
//#region src/table/table.tsx
|
|
9
9
|
var s = "ps-[var(--table-cell-padding-inline)] pe-[var(--table-cell-padding-inline)] first:ps-[var(--table-cell-padding-inline-ends)] last:pe-[var(--table-cell-padding-inline-ends)] has-[[type=checkbox]]:w-0 has-[[type=checkbox]]:pe-0", c = r({
|
|
10
10
|
slots: {
|
|
@@ -26,32 +26,32 @@ var s = "ps-[var(--table-cell-padding-inline)] pe-[var(--table-cell-padding-inli
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
defaultVariants: { size: "md" }
|
|
29
|
-
}), l =
|
|
30
|
-
let e =
|
|
29
|
+
}), l = i(null), u = () => {
|
|
30
|
+
let e = a(l);
|
|
31
31
|
if (!e) throw Error("Table parts must be used within Table.Root");
|
|
32
32
|
return e;
|
|
33
|
-
}, d =
|
|
34
|
-
let { size: r, sticky:
|
|
35
|
-
return /* @__PURE__ */
|
|
33
|
+
}, d = i("body"), f = (e) => e === "header" || e === "headerAndFooter", p = (e) => e === "headerAndFooter", m = ({ children: e, ref: t, ...n }) => {
|
|
34
|
+
let { size: r, sticky: i, embed: a } = n, s = c(n);
|
|
35
|
+
return /* @__PURE__ */ o(l, {
|
|
36
36
|
value: {
|
|
37
|
-
header: y({ sticky: f(
|
|
37
|
+
header: y({ sticky: f(i) }),
|
|
38
38
|
cell: x({ size: r }),
|
|
39
39
|
headRow: _({ body: !1 }),
|
|
40
40
|
bodyRow: _({
|
|
41
41
|
body: !0,
|
|
42
|
-
divider: !
|
|
43
|
-
stickyFooter: p(
|
|
42
|
+
divider: !a,
|
|
43
|
+
stickyFooter: p(i)
|
|
44
44
|
})
|
|
45
45
|
},
|
|
46
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ o("div", {
|
|
47
47
|
"data-slot": "table-root",
|
|
48
48
|
className: s.root(),
|
|
49
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ o("div", {
|
|
50
50
|
"data-slot": "table-scroll",
|
|
51
51
|
ref: t,
|
|
52
52
|
tabIndex: 0,
|
|
53
53
|
className: s.scroll(),
|
|
54
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ o("table", {
|
|
55
55
|
"data-slot": "table",
|
|
56
56
|
className: s.table(),
|
|
57
57
|
children: e
|
|
@@ -61,18 +61,18 @@ var s = "ps-[var(--table-cell-padding-inline)] pe-[var(--table-cell-padding-inli
|
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
m.displayName = "Table.Root";
|
|
64
|
-
var h = ({ children: e, ...t }) => /* @__PURE__ */
|
|
64
|
+
var h = ({ children: e, ...t }) => /* @__PURE__ */ o(d, {
|
|
65
65
|
value: "head",
|
|
66
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ o("thead", {
|
|
67
67
|
"data-slot": "table-head",
|
|
68
68
|
...t,
|
|
69
69
|
children: e
|
|
70
70
|
})
|
|
71
71
|
});
|
|
72
72
|
h.displayName = "Table.Head";
|
|
73
|
-
var g = ({ children: e, ...t }) => /* @__PURE__ */
|
|
73
|
+
var g = ({ children: e, ...t }) => /* @__PURE__ */ o(d, {
|
|
74
74
|
value: "body",
|
|
75
|
-
children: /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ o("tbody", {
|
|
76
76
|
"data-slot": "table-body",
|
|
77
77
|
...t,
|
|
78
78
|
children: e
|
|
@@ -100,10 +100,10 @@ var _ = r({
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}), v = ({ className: t, ...n }) => {
|
|
103
|
-
let { headRow: r, bodyRow:
|
|
104
|
-
return /* @__PURE__ */
|
|
103
|
+
let { headRow: r, bodyRow: i } = u();
|
|
104
|
+
return /* @__PURE__ */ o("tr", {
|
|
105
105
|
"data-slot": "table-row",
|
|
106
|
-
className: e(
|
|
106
|
+
className: e(a(d) === "body" ? i : r, t),
|
|
107
107
|
...n
|
|
108
108
|
});
|
|
109
109
|
};
|
|
@@ -116,7 +116,7 @@ var y = r({
|
|
|
116
116
|
} }
|
|
117
117
|
}), b = ({ className: t, ...n }) => {
|
|
118
118
|
let { header: r } = u();
|
|
119
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ o("th", {
|
|
120
120
|
"data-slot": "table-header",
|
|
121
121
|
className: e(r, t),
|
|
122
122
|
...n
|
|
@@ -133,24 +133,24 @@ var x = r({
|
|
|
133
133
|
defaultVariants: { size: "md" }
|
|
134
134
|
}), S = ({ className: t, ...n }) => {
|
|
135
135
|
let { cell: r } = u();
|
|
136
|
-
return /* @__PURE__ */
|
|
136
|
+
return /* @__PURE__ */ o("td", {
|
|
137
137
|
"data-slot": "table-cell",
|
|
138
138
|
className: e(r, t),
|
|
139
139
|
...n
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
142
|
S.displayName = "Table.Cell";
|
|
143
|
-
var C = r({ base: "relative z-[1] [&>svg]:shrink-0 [&>svg]:transition-transform [&>svg]:duration-200 data-[state=open]:[&>svg]:rotate-180" }), w = ({ toggleExpanded: r, isExpanded:
|
|
143
|
+
var C = r({ base: "relative z-[1] [&>svg]:shrink-0 [&>svg]:transition-transform [&>svg]:duration-200 data-[state=open]:[&>svg]:rotate-180" }), w = ({ toggleExpanded: r, isExpanded: i, className: a, ...s }) => /* @__PURE__ */ o(t, {
|
|
144
144
|
variant: "ghost",
|
|
145
145
|
onClick: r,
|
|
146
|
-
className: e(C(),
|
|
147
|
-
"data-state":
|
|
146
|
+
className: e(C(), a),
|
|
147
|
+
"data-state": i ? "open" : "default",
|
|
148
148
|
"data-slot": "table-expand-button",
|
|
149
149
|
...s,
|
|
150
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ o(n, {})
|
|
151
151
|
});
|
|
152
152
|
w.displayName = "Table.ExpandButton";
|
|
153
|
-
var T = ({ className: t, ...n }) => /* @__PURE__ */
|
|
153
|
+
var T = ({ className: t, ...n }) => /* @__PURE__ */ o("tr", {
|
|
154
154
|
"data-slot": "table-expanded-row",
|
|
155
155
|
className: e("border-t border-border-default-base-primary", t),
|
|
156
156
|
...n
|
|
@@ -162,7 +162,7 @@ var E = r({ base: [
|
|
|
162
162
|
"after:[background:linear-gradient(to_right,transparent_0,var(--color-bg-default-base-secondary)_var(--table-cell-padding-inline))]",
|
|
163
163
|
"[&>*]:relative [&>*]:z-[1] [&>*]:opacity-0",
|
|
164
164
|
"[@media(hover:none)_and_(pointer:coarse)]:[&>*]:opacity-100"
|
|
165
|
-
] }), D = ({ children: e }) => /* @__PURE__ */
|
|
165
|
+
] }), D = ({ children: e }) => /* @__PURE__ */ o("div", {
|
|
166
166
|
"data-slot": "table-row-actions",
|
|
167
167
|
className: E(),
|
|
168
168
|
children: e
|
package/src/tabs/tabs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { tv as t } from "tailwind-variants";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { createContext as n, use as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
6
|
import * as a from "@radix-ui/react-tabs";
|
|
7
7
|
//#region src/tabs/tabs.tsx
|
|
8
8
|
var o = t({
|
|
@@ -57,18 +57,18 @@ var o = t({
|
|
|
57
57
|
variant: "line",
|
|
58
58
|
position: "start"
|
|
59
59
|
}
|
|
60
|
-
}), s =
|
|
61
|
-
let e =
|
|
60
|
+
}), s = n(null), c = () => {
|
|
61
|
+
let e = r(s);
|
|
62
62
|
if (!e) throw Error("Tabs.List, Tabs.Trigger and Tabs.Content must be used within Tabs.Root");
|
|
63
63
|
return e;
|
|
64
|
-
}, l = ({ className: t, variant:
|
|
64
|
+
}, l = ({ className: t, variant: n, position: r, ...c }) => {
|
|
65
65
|
let l = o({
|
|
66
|
-
variant:
|
|
67
|
-
position:
|
|
66
|
+
variant: n,
|
|
67
|
+
position: r
|
|
68
68
|
});
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ i(s, {
|
|
70
70
|
value: l,
|
|
71
|
-
children: /* @__PURE__ */
|
|
71
|
+
children: /* @__PURE__ */ i(a.Root, {
|
|
72
72
|
"data-slot": "tabs-root",
|
|
73
73
|
className: e(l.root(), t),
|
|
74
74
|
...c
|
|
@@ -76,36 +76,36 @@ var o = t({
|
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
78
|
l.displayName = "Tabs.Root";
|
|
79
|
-
var u = ({ className: t, ...
|
|
80
|
-
let
|
|
81
|
-
return /* @__PURE__ */
|
|
79
|
+
var u = ({ className: t, ...n }) => {
|
|
80
|
+
let r = c();
|
|
81
|
+
return /* @__PURE__ */ i(a.List, {
|
|
82
82
|
"data-slot": "tabs-list",
|
|
83
|
-
className: e(
|
|
84
|
-
...
|
|
83
|
+
className: e(r.list(), t),
|
|
84
|
+
...n
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
87
|
u.displayName = "Tabs.List";
|
|
88
|
-
var d = ({ className: t, ...
|
|
89
|
-
let
|
|
90
|
-
return /* @__PURE__ */
|
|
88
|
+
var d = ({ className: t, ...n }) => {
|
|
89
|
+
let r = c();
|
|
90
|
+
return /* @__PURE__ */ i(a.Trigger, {
|
|
91
91
|
"data-slot": "tabs-trigger",
|
|
92
|
-
className: e(
|
|
93
|
-
...
|
|
92
|
+
className: e(r.trigger(), t),
|
|
93
|
+
...n
|
|
94
94
|
});
|
|
95
95
|
};
|
|
96
96
|
d.displayName = "Tabs.Trigger";
|
|
97
|
-
var f = ({ className: t, ...
|
|
98
|
-
let
|
|
99
|
-
return /* @__PURE__ */
|
|
97
|
+
var f = ({ className: t, ...n }) => {
|
|
98
|
+
let r = c();
|
|
99
|
+
return /* @__PURE__ */ i(a.Content, {
|
|
100
100
|
"data-slot": "tabs-content",
|
|
101
|
-
className: e(
|
|
102
|
-
...
|
|
101
|
+
className: e(r.content(), t),
|
|
102
|
+
...n
|
|
103
103
|
});
|
|
104
104
|
};
|
|
105
105
|
f.displayName = "Tabs.Content";
|
|
106
|
-
var p = ({ className: t, variant:
|
|
106
|
+
var p = ({ className: t, variant: n, ...a }) => /* @__PURE__ */ i("span", {
|
|
107
107
|
"data-slot": "tabs-label",
|
|
108
|
-
className: e((
|
|
108
|
+
className: e((r(s) ?? o({ variant: n })).trigger(), "pointer-events-none", t),
|
|
109
109
|
...a
|
|
110
110
|
});
|
|
111
111
|
p.displayName = "Tabs.Label";
|
package/src/tag/tag.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
2
|
import { tv as t } from "tailwind-variants";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Children as n, isValidElement as r } from "react";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
5
|
import { Slot as a, Slottable as o } from "@radix-ui/react-slot";
|
|
6
6
|
//#region src/tag/tag.tsx
|
|
7
7
|
var s = t({
|
|
@@ -106,25 +106,25 @@ var s = t({
|
|
|
106
106
|
variant: "tertiary",
|
|
107
107
|
size: "sm"
|
|
108
108
|
}
|
|
109
|
-
}), c = (e) =>
|
|
109
|
+
}), c = (e) => n.map(e, (e) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ i("span", {
|
|
110
110
|
className: "min-w-0 truncate",
|
|
111
111
|
children: e
|
|
112
112
|
}) : e), l = ({ children: t, asChild: l, color: u, variant: d, size: f, pill: p, truncate: m, className: h, ref: g, ..._ }) => {
|
|
113
|
-
let v = l ? a : "span", y =
|
|
113
|
+
let v = l ? a : "span", y = n.toArray(l && r(t) ? t.props.children : t), b = e(s({
|
|
114
114
|
color: u,
|
|
115
115
|
variant: d,
|
|
116
116
|
size: f,
|
|
117
117
|
pill: p,
|
|
118
118
|
truncate: m,
|
|
119
119
|
interactive: l,
|
|
120
|
-
hasOnlyIcon: y.length > 0 && y.every(
|
|
120
|
+
hasOnlyIcon: y.length > 0 && y.every(r)
|
|
121
121
|
}), h), x = m && !l ? c(t) : t;
|
|
122
|
-
return /* @__PURE__ */
|
|
122
|
+
return /* @__PURE__ */ i(v, {
|
|
123
123
|
"data-slot": "tag",
|
|
124
124
|
..._,
|
|
125
125
|
className: b,
|
|
126
126
|
ref: g,
|
|
127
|
-
children: l ? /* @__PURE__ */
|
|
127
|
+
children: l ? /* @__PURE__ */ i(o, { children: t }) : x
|
|
128
128
|
});
|
|
129
129
|
};
|
|
130
130
|
//#endregion
|
package/theme/base.css
CHANGED
|
@@ -832,12 +832,25 @@
|
|
|
832
832
|
--z-index-floating: 1000;
|
|
833
833
|
--z-index-sticky: 1100;
|
|
834
834
|
--z-index-banner: 1200;
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
835
|
+
/*
|
|
836
|
+
* One tier for every surface that portals to the body and is mounted when it
|
|
837
|
+
* opens. Sharing a z-index makes them paint in DOM order, and a portal is
|
|
838
|
+
* appended to the body as it mounts, so they paint in the order they were
|
|
839
|
+
* opened in and the last one opened wins. That holds whichever way the
|
|
840
|
+
* surfaces are nested, which a tier per component cannot do: any fixed order
|
|
841
|
+
* between two tiers is the wrong one for one of the two nesting directions.
|
|
842
|
+
*
|
|
843
|
+
* A surface leaves the rule when its position in the DOM stops matching when
|
|
844
|
+
* it opened: content that is mounted before it opens, and content portalled
|
|
845
|
+
* into a container other than the body, which stacks inside that container's
|
|
846
|
+
* ancestors instead. Both then need a z-index of their own.
|
|
847
|
+
*/
|
|
848
|
+
--z-index-top-layer: 1300;
|
|
849
|
+
/* Deprecated alias of --z-index-top-layer; drop once @agentero/ui Combobox stops using it. */
|
|
850
|
+
--z-index-flyover: 1300;
|
|
851
|
+
--z-index-skip-nav: 1400;
|
|
852
|
+
--z-index-toast: 1500;
|
|
853
|
+
--z-index-tooltip: 1600;
|
|
841
854
|
|
|
842
855
|
/* ========================================
|
|
843
856
|
* BREAKPOINTS
|