@agentero/design-system 0.9.8 → 0.11.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/mcp/manifests/components.html +565 -36
- package/mcp/manifests/components.json +1 -1
- package/package.json +12 -3
- package/src/accordion/accordion.d.ts +46 -0
- package/src/accordion/accordion.js +54 -0
- package/src/accordion/icons.d.ts +10 -0
- package/src/accordion/icons.js +16 -0
- package/src/accordion/index.d.ts +2 -0
- package/src/accordion/index.js +2 -0
- package/src/alert/alert.js +30 -30
- package/src/avatar/avatar.js +24 -24
- package/src/button/button.js +11 -11
- package/src/data-table/data-table.js +40 -40
- package/src/data-table/table.js +33 -33
- package/src/tag/index.d.ts +2 -0
- package/src/tag/index.js +2 -0
- package/src/tag/tag.d.ts +160 -0
- package/src/tag/tag.js +129 -0
- package/theme/base.css +70 -0
package/src/data-table/table.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
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
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { tv as r } from "tailwind-variants";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
import { createContext as a, use as o } from "react";
|
|
8
8
|
//#region src/data-table/table.tsx
|
|
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 =
|
|
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: {
|
|
11
11
|
root: ["flex min-h-0 flex-1 flex-col overflow-hidden", "[--table-cell-padding-inline:1.25rem] [--table-cell-padding-inline-ends:1.25rem]"],
|
|
12
12
|
scroll: "min-h-0 flex-1 overflow-auto focus-visible:outline-none",
|
|
@@ -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 = a(null), u = () => {
|
|
30
|
+
let e = o(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 = a("body"), f = (e) => e === "header" || e === "headerAndFooter", p = (e) => e === "headerAndFooter", m = ({ children: e, ref: t, ...n }) => {
|
|
34
|
+
let { size: r, sticky: a, embed: o } = n, s = c(n);
|
|
35
|
+
return /* @__PURE__ */ i(l, {
|
|
36
36
|
value: {
|
|
37
|
-
header: y({ sticky: f(
|
|
37
|
+
header: y({ sticky: f(a) }),
|
|
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: !o,
|
|
43
|
+
stickyFooter: p(a)
|
|
44
44
|
})
|
|
45
45
|
},
|
|
46
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ i("div", {
|
|
47
47
|
"data-slot": "table-root",
|
|
48
48
|
className: s.root(),
|
|
49
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ i("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__ */ i("table", {
|
|
55
55
|
"data-slot": "table",
|
|
56
56
|
className: s.table(),
|
|
57
57
|
children: e
|
|
@@ -61,25 +61,25 @@ 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__ */ i(d, {
|
|
65
65
|
value: "head",
|
|
66
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ i("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__ */ i(d, {
|
|
74
74
|
value: "body",
|
|
75
|
-
children: /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ i("tbody", {
|
|
76
76
|
"data-slot": "table-body",
|
|
77
77
|
...t,
|
|
78
78
|
children: e
|
|
79
79
|
})
|
|
80
80
|
});
|
|
81
81
|
g.displayName = "Table.Body";
|
|
82
|
-
var _ =
|
|
82
|
+
var _ = r({
|
|
83
83
|
base: "transition-colors duration-150",
|
|
84
84
|
variants: {
|
|
85
85
|
body: {
|
|
@@ -101,14 +101,14 @@ var _ = a({
|
|
|
101
101
|
}
|
|
102
102
|
}), v = ({ className: t, ...n }) => {
|
|
103
103
|
let { headRow: r, bodyRow: a } = u();
|
|
104
|
-
return /* @__PURE__ */
|
|
104
|
+
return /* @__PURE__ */ i("tr", {
|
|
105
105
|
"data-slot": "table-row",
|
|
106
|
-
className: e(
|
|
106
|
+
className: e(o(d) === "body" ? a : r, t),
|
|
107
107
|
...n
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
110
|
v.displayName = "Table.Row";
|
|
111
|
-
var y =
|
|
111
|
+
var y = r({
|
|
112
112
|
base: `h-12 border-b border-border-default-base-primary text-left align-middle text-sm font-light whitespace-nowrap text-text-default-base-tertiary ${s}`,
|
|
113
113
|
variants: { sticky: {
|
|
114
114
|
true: "sticky top-0 z-[1] bg-bg-default-base-primary",
|
|
@@ -116,14 +116,14 @@ var y = a({
|
|
|
116
116
|
} }
|
|
117
117
|
}), b = ({ className: t, ...n }) => {
|
|
118
118
|
let { header: r } = u();
|
|
119
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ i("th", {
|
|
120
120
|
"data-slot": "table-header",
|
|
121
121
|
className: e(r, t),
|
|
122
122
|
...n
|
|
123
123
|
});
|
|
124
124
|
};
|
|
125
125
|
b.displayName = "Table.Header";
|
|
126
|
-
var x =
|
|
126
|
+
var x = r({
|
|
127
127
|
base: `align-middle text-sm whitespace-nowrap ${s}`,
|
|
128
128
|
variants: { size: {
|
|
129
129
|
sm: "h-12",
|
|
@@ -133,36 +133,36 @@ var x = a({
|
|
|
133
133
|
defaultVariants: { size: "md" }
|
|
134
134
|
}), S = ({ className: t, ...n }) => {
|
|
135
135
|
let { cell: r } = u();
|
|
136
|
-
return /* @__PURE__ */
|
|
136
|
+
return /* @__PURE__ */ i("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 =
|
|
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: a, className: o, ...s }) => /* @__PURE__ */ i(t, {
|
|
144
144
|
variant: "ghost",
|
|
145
145
|
onClick: r,
|
|
146
|
-
className: e(C(),
|
|
147
|
-
"data-state":
|
|
146
|
+
className: e(C(), o),
|
|
147
|
+
"data-state": a ? "open" : "default",
|
|
148
148
|
"data-slot": "table-expand-button",
|
|
149
149
|
...s,
|
|
150
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ i(n, {})
|
|
151
151
|
});
|
|
152
152
|
w.displayName = "Table.ExpandButton";
|
|
153
|
-
var T = ({ className: t, ...n }) => /* @__PURE__ */
|
|
153
|
+
var T = ({ className: t, ...n }) => /* @__PURE__ */ i("tr", {
|
|
154
154
|
"data-slot": "table-expanded-row",
|
|
155
155
|
className: e("border-t border-border-default-base-primary", t),
|
|
156
156
|
...n
|
|
157
157
|
});
|
|
158
158
|
T.displayName = "Table.ExpandedRow";
|
|
159
|
-
var E =
|
|
159
|
+
var E = r({ base: [
|
|
160
160
|
"relative flex w-fit gap-1",
|
|
161
161
|
"after:absolute after:inset-y-0 after:right-0 after:left-[calc(var(--table-cell-padding-inline)*-1)] after:opacity-0 after:transition-opacity after:duration-150 after:content-[\"\"]",
|
|
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 [&>*]:transition-opacity [&>*]:duration-150",
|
|
164
164
|
"[@media(hover:none)_and_(pointer:coarse)]:[&>*]:opacity-100"
|
|
165
|
-
] }), D = ({ children: e }) => /* @__PURE__ */
|
|
165
|
+
] }), D = ({ children: e }) => /* @__PURE__ */ i("div", {
|
|
166
166
|
"data-slot": "table-row-actions",
|
|
167
167
|
className: E(),
|
|
168
168
|
children: e
|
package/src/tag/index.js
ADDED
package/src/tag/tag.d.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode, Ref } from 'react';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
/**
|
|
4
|
+
* Style recipe for Tag. Each color maps to its dedicated `*-tag-*` semantic
|
|
5
|
+
* tokens (bg enable/hover, border, text/icon) defined in the theme — one ramp
|
|
6
|
+
* per color, so the recipe carries no raw palette values.
|
|
7
|
+
*
|
|
8
|
+
* @summary tailwind-variants recipe backing the Tag component styles
|
|
9
|
+
*/
|
|
10
|
+
export declare const tagRecipe: import('tailwind-variants').TVReturnType<{
|
|
11
|
+
color: {
|
|
12
|
+
neutral: string;
|
|
13
|
+
positive: string;
|
|
14
|
+
danger: string;
|
|
15
|
+
warning: string;
|
|
16
|
+
informative: string;
|
|
17
|
+
creative: string;
|
|
18
|
+
dynamic: string;
|
|
19
|
+
playful: string;
|
|
20
|
+
};
|
|
21
|
+
variant: {
|
|
22
|
+
secondary: string;
|
|
23
|
+
tertiary: string;
|
|
24
|
+
ghost: string;
|
|
25
|
+
invisible: string;
|
|
26
|
+
};
|
|
27
|
+
size: {
|
|
28
|
+
xs: string;
|
|
29
|
+
sm: string;
|
|
30
|
+
md: string;
|
|
31
|
+
};
|
|
32
|
+
pill: {
|
|
33
|
+
true: string;
|
|
34
|
+
};
|
|
35
|
+
truncate: {
|
|
36
|
+
true: string;
|
|
37
|
+
};
|
|
38
|
+
interactive: {
|
|
39
|
+
true: string;
|
|
40
|
+
};
|
|
41
|
+
hasOnlyIcon: {
|
|
42
|
+
true: string;
|
|
43
|
+
};
|
|
44
|
+
}, undefined, string[], {
|
|
45
|
+
color: {
|
|
46
|
+
neutral: string;
|
|
47
|
+
positive: string;
|
|
48
|
+
danger: string;
|
|
49
|
+
warning: string;
|
|
50
|
+
informative: string;
|
|
51
|
+
creative: string;
|
|
52
|
+
dynamic: string;
|
|
53
|
+
playful: string;
|
|
54
|
+
};
|
|
55
|
+
variant: {
|
|
56
|
+
secondary: string;
|
|
57
|
+
tertiary: string;
|
|
58
|
+
ghost: string;
|
|
59
|
+
invisible: string;
|
|
60
|
+
};
|
|
61
|
+
size: {
|
|
62
|
+
xs: string;
|
|
63
|
+
sm: string;
|
|
64
|
+
md: string;
|
|
65
|
+
};
|
|
66
|
+
pill: {
|
|
67
|
+
true: string;
|
|
68
|
+
};
|
|
69
|
+
truncate: {
|
|
70
|
+
true: string;
|
|
71
|
+
};
|
|
72
|
+
interactive: {
|
|
73
|
+
true: string;
|
|
74
|
+
};
|
|
75
|
+
hasOnlyIcon: {
|
|
76
|
+
true: string;
|
|
77
|
+
};
|
|
78
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
79
|
+
color: {
|
|
80
|
+
neutral: string;
|
|
81
|
+
positive: string;
|
|
82
|
+
danger: string;
|
|
83
|
+
warning: string;
|
|
84
|
+
informative: string;
|
|
85
|
+
creative: string;
|
|
86
|
+
dynamic: string;
|
|
87
|
+
playful: string;
|
|
88
|
+
};
|
|
89
|
+
variant: {
|
|
90
|
+
secondary: string;
|
|
91
|
+
tertiary: string;
|
|
92
|
+
ghost: string;
|
|
93
|
+
invisible: string;
|
|
94
|
+
};
|
|
95
|
+
size: {
|
|
96
|
+
xs: string;
|
|
97
|
+
sm: string;
|
|
98
|
+
md: string;
|
|
99
|
+
};
|
|
100
|
+
pill: {
|
|
101
|
+
true: string;
|
|
102
|
+
};
|
|
103
|
+
truncate: {
|
|
104
|
+
true: string;
|
|
105
|
+
};
|
|
106
|
+
interactive: {
|
|
107
|
+
true: string;
|
|
108
|
+
};
|
|
109
|
+
hasOnlyIcon: {
|
|
110
|
+
true: string;
|
|
111
|
+
};
|
|
112
|
+
}, undefined, string[], unknown, unknown, undefined>>;
|
|
113
|
+
/**
|
|
114
|
+
* @summary Tag color union (`neutral`, `positive`, `danger`, `warning`, `informative`, `creative`, `dynamic`, `playful`)
|
|
115
|
+
*/
|
|
116
|
+
export type TagColor = NonNullable<VariantProps<typeof tagRecipe>['color']>;
|
|
117
|
+
/**
|
|
118
|
+
* Fill treatments: `secondary` (tinted fill + border), `tertiary` (tinted fill,
|
|
119
|
+
* no border — default), `ghost` (text only), and `invisible` (transparent until
|
|
120
|
+
* hovered).
|
|
121
|
+
*
|
|
122
|
+
* @summary Tag variant union (`secondary`, `tertiary`, `ghost`, `invisible`)
|
|
123
|
+
*/
|
|
124
|
+
export type TagVariant = NonNullable<VariantProps<typeof tagRecipe>['variant']>;
|
|
125
|
+
/**
|
|
126
|
+
* @summary Tag size union (`xs`, `sm`, `md`)
|
|
127
|
+
*/
|
|
128
|
+
export type TagSize = NonNullable<VariantProps<typeof tagRecipe>['size']>;
|
|
129
|
+
/**
|
|
130
|
+
* Tag props. Accepts all standard `<span>` attributes plus the style variants.
|
|
131
|
+
*
|
|
132
|
+
* @summary Props accepted by Tag; use `asChild` to render a different element
|
|
133
|
+
*/
|
|
134
|
+
export type TagProps = Omit<ComponentPropsWithRef<'span'>, 'color'> & Omit<VariantProps<typeof tagRecipe>, 'interactive' | 'hasOnlyIcon'> & {
|
|
135
|
+
/**
|
|
136
|
+
* Render the single child element instead of a `<span>` (via Radix `Slot`),
|
|
137
|
+
* keeping Tag framework-agnostic. Marks the Tag interactive: adds the pointer
|
|
138
|
+
* cursor and the hover fill (a plain `<span>` Tag is a static badge).
|
|
139
|
+
*/
|
|
140
|
+
asChild?: boolean;
|
|
141
|
+
children?: ReactNode;
|
|
142
|
+
ref?: Ref<HTMLElement>;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Tag is a compact label for statuses, categories, counts, and attributes. As a
|
|
146
|
+
* plain `<span>` it reads as a static badge with no hover. Pass `asChild` to
|
|
147
|
+
* render an interactive link or button instead — that adds the pointer cursor
|
|
148
|
+
* and the hover fill. Pick `color` for meaning and `variant` for fill emphasis.
|
|
149
|
+
*
|
|
150
|
+
* @summary Compact semantic label; renders a static badge `<span>` or, with `asChild`, an interactive element
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* <Tag color="positive">Active</Tag>
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* <Tag asChild color="informative">
|
|
157
|
+
* <a href="/carriers">View carriers</a>
|
|
158
|
+
* </Tag>
|
|
159
|
+
*/
|
|
160
|
+
export declare const Tag: ({ children, asChild, color, variant, size, pill, truncate, className, ref, ...props }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
package/src/tag/tag.js
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { tv as t } from "tailwind-variants";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Children as r, isValidElement as i } from "react";
|
|
6
|
+
import { Slot as a, Slottable as o } from "@radix-ui/react-slot";
|
|
7
|
+
//#region src/tag/tag.tsx
|
|
8
|
+
var s = t({
|
|
9
|
+
base: [
|
|
10
|
+
"inline-flex w-fit min-w-fit items-center gap-1",
|
|
11
|
+
"rounded-md border border-solid border-transparent px-2",
|
|
12
|
+
"font-normal leading-normal no-underline",
|
|
13
|
+
"transition-[background-color,opacity] duration-200",
|
|
14
|
+
"[&_svg]:size-3.5"
|
|
15
|
+
],
|
|
16
|
+
variants: {
|
|
17
|
+
color: {
|
|
18
|
+
neutral: "bg-bg-tag-neutral-enable text-text-tag-neutral border-border-tag-neutral [&_svg_path]:fill-icon-tag-neutral",
|
|
19
|
+
positive: "bg-bg-tag-positive-enable text-text-tag-positive border-border-tag-positive [&_svg_path]:fill-icon-tag-positive",
|
|
20
|
+
danger: "bg-bg-tag-danger-enable text-text-tag-danger border-border-tag-danger [&_svg_path]:fill-icon-tag-danger",
|
|
21
|
+
warning: "bg-bg-tag-warning-enable text-text-tag-warning border-border-tag-warning [&_svg_path]:fill-icon-tag-warning",
|
|
22
|
+
informative: "bg-bg-tag-informative-enable text-text-tag-informative border-border-tag-informative [&_svg_path]:fill-icon-tag-informative",
|
|
23
|
+
creative: "bg-bg-tag-creative-enable text-text-tag-creative border-border-tag-creative [&_svg_path]:fill-icon-tag-creative",
|
|
24
|
+
dynamic: "bg-bg-tag-dynamic-enable text-text-tag-dynamic border-border-tag-dynamic [&_svg_path]:fill-icon-tag-dynamic",
|
|
25
|
+
playful: "bg-bg-tag-playful-enable text-text-tag-playful border-border-tag-playful [&_svg_path]:fill-icon-tag-playful"
|
|
26
|
+
},
|
|
27
|
+
variant: {
|
|
28
|
+
secondary: "",
|
|
29
|
+
tertiary: "border-transparent",
|
|
30
|
+
ghost: "border-transparent bg-transparent",
|
|
31
|
+
invisible: "border-transparent bg-transparent opacity-0"
|
|
32
|
+
},
|
|
33
|
+
size: {
|
|
34
|
+
xs: "h-5 px-1.5 text-xs [&_svg]:size-3",
|
|
35
|
+
sm: "h-6 text-xs",
|
|
36
|
+
md: "h-8 text-sm"
|
|
37
|
+
},
|
|
38
|
+
pill: { true: "rounded-full" },
|
|
39
|
+
truncate: { true: "max-w-full min-w-0 overflow-hidden text-ellipsis whitespace-nowrap" },
|
|
40
|
+
interactive: { true: "cursor-pointer" },
|
|
41
|
+
hasOnlyIcon: { true: "justify-center px-0" }
|
|
42
|
+
},
|
|
43
|
+
compoundVariants: [
|
|
44
|
+
{
|
|
45
|
+
hasOnlyIcon: !0,
|
|
46
|
+
size: "xs",
|
|
47
|
+
class: "size-5"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
hasOnlyIcon: !0,
|
|
51
|
+
size: "sm",
|
|
52
|
+
class: "size-6"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
hasOnlyIcon: !0,
|
|
56
|
+
size: "md",
|
|
57
|
+
class: "size-8 [&_svg]:size-4"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
color: "neutral",
|
|
61
|
+
interactive: !0,
|
|
62
|
+
class: "hover:bg-bg-tag-neutral-hover"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
color: "positive",
|
|
66
|
+
interactive: !0,
|
|
67
|
+
class: "hover:bg-bg-tag-positive-hover"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
color: "danger",
|
|
71
|
+
interactive: !0,
|
|
72
|
+
class: "hover:bg-bg-tag-danger-hover"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
color: "warning",
|
|
76
|
+
interactive: !0,
|
|
77
|
+
class: "hover:bg-bg-tag-warning-hover"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
color: "informative",
|
|
81
|
+
interactive: !0,
|
|
82
|
+
class: "hover:bg-bg-tag-informative-hover"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
color: "creative",
|
|
86
|
+
interactive: !0,
|
|
87
|
+
class: "hover:bg-bg-tag-creative-hover"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
color: "dynamic",
|
|
91
|
+
interactive: !0,
|
|
92
|
+
class: "hover:bg-bg-tag-dynamic-hover"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
color: "playful",
|
|
96
|
+
interactive: !0,
|
|
97
|
+
class: "hover:bg-bg-tag-playful-hover"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
variant: "invisible",
|
|
101
|
+
interactive: !0,
|
|
102
|
+
class: "hover:opacity-100"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
defaultVariants: {
|
|
106
|
+
color: "neutral",
|
|
107
|
+
variant: "tertiary",
|
|
108
|
+
size: "sm"
|
|
109
|
+
}
|
|
110
|
+
}), c = ({ children: t, asChild: c, color: l, variant: u, size: d, pill: f, truncate: p, className: m, ref: h, ...g }) => {
|
|
111
|
+
let _ = c ? a : "span", v = c && i(t) ? t.props.children : t, y = r.toArray(v), b = e(s({
|
|
112
|
+
color: l,
|
|
113
|
+
variant: u,
|
|
114
|
+
size: d,
|
|
115
|
+
pill: f,
|
|
116
|
+
truncate: p,
|
|
117
|
+
interactive: c,
|
|
118
|
+
hasOnlyIcon: y.length > 0 && y.every(i)
|
|
119
|
+
}), m);
|
|
120
|
+
return /* @__PURE__ */ n(_, {
|
|
121
|
+
"data-slot": "tag",
|
|
122
|
+
...g,
|
|
123
|
+
className: b,
|
|
124
|
+
ref: h,
|
|
125
|
+
children: c ? /* @__PURE__ */ n(o, { children: t }) : t
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
//#endregion
|
|
129
|
+
export { c as Tag, s as tagRecipe };
|
package/theme/base.css
CHANGED
|
@@ -682,6 +682,58 @@
|
|
|
682
682
|
--color-focus-ring-button-positive: var(--color-positive-500);
|
|
683
683
|
--color-focus-ring-button-destructive: var(--color-danger-500);
|
|
684
684
|
|
|
685
|
+
/* ========================================
|
|
686
|
+
* TAG
|
|
687
|
+
* ======================================== */
|
|
688
|
+
|
|
689
|
+
--color-bg-tag-neutral-enable: var(--color-slate-050);
|
|
690
|
+
--color-bg-tag-neutral-hover: var(--color-slate-100);
|
|
691
|
+
--color-border-tag-neutral: var(--color-slate-200);
|
|
692
|
+
--color-text-tag-neutral: var(--color-slate-700);
|
|
693
|
+
--color-icon-tag-neutral: var(--color-slate-700);
|
|
694
|
+
|
|
695
|
+
--color-bg-tag-positive-enable: var(--color-positive-050);
|
|
696
|
+
--color-bg-tag-positive-hover: var(--color-positive-100);
|
|
697
|
+
--color-border-tag-positive: var(--color-positive-200);
|
|
698
|
+
--color-text-tag-positive: var(--color-positive-700);
|
|
699
|
+
--color-icon-tag-positive: var(--color-positive-700);
|
|
700
|
+
|
|
701
|
+
--color-bg-tag-danger-enable: var(--color-danger-050);
|
|
702
|
+
--color-bg-tag-danger-hover: var(--color-danger-100);
|
|
703
|
+
--color-border-tag-danger: var(--color-danger-200);
|
|
704
|
+
--color-text-tag-danger: var(--color-danger-500);
|
|
705
|
+
--color-icon-tag-danger: var(--color-danger-500);
|
|
706
|
+
|
|
707
|
+
--color-bg-tag-warning-enable: var(--color-warning-050);
|
|
708
|
+
--color-bg-tag-warning-hover: var(--color-warning-050);
|
|
709
|
+
--color-border-tag-warning: var(--color-warning-300);
|
|
710
|
+
--color-text-tag-warning: var(--color-warning-700);
|
|
711
|
+
--color-icon-tag-warning: var(--color-warning-700);
|
|
712
|
+
|
|
713
|
+
--color-bg-tag-informative-enable: var(--color-blue-050);
|
|
714
|
+
--color-bg-tag-informative-hover: var(--color-blue-100);
|
|
715
|
+
--color-border-tag-informative: var(--color-blue-200);
|
|
716
|
+
--color-text-tag-informative: var(--color-blue-600);
|
|
717
|
+
--color-icon-tag-informative: var(--color-blue-600);
|
|
718
|
+
|
|
719
|
+
--color-bg-tag-creative-enable: var(--color-purple-050);
|
|
720
|
+
--color-bg-tag-creative-hover: var(--color-purple-100);
|
|
721
|
+
--color-border-tag-creative: var(--color-purple-200);
|
|
722
|
+
--color-text-tag-creative: var(--color-purple-600);
|
|
723
|
+
--color-icon-tag-creative: var(--color-purple-600);
|
|
724
|
+
|
|
725
|
+
--color-bg-tag-dynamic-enable: var(--color-orange-050);
|
|
726
|
+
--color-bg-tag-dynamic-hover: var(--color-orange-100);
|
|
727
|
+
--color-border-tag-dynamic: var(--color-orange-200);
|
|
728
|
+
--color-text-tag-dynamic: var(--color-orange-500);
|
|
729
|
+
--color-icon-tag-dynamic: var(--color-orange-500);
|
|
730
|
+
|
|
731
|
+
--color-bg-tag-playful-enable: var(--color-pink-050);
|
|
732
|
+
--color-bg-tag-playful-hover: var(--color-pink-100);
|
|
733
|
+
--color-border-tag-playful: var(--color-pink-200);
|
|
734
|
+
--color-text-tag-playful: var(--color-pink-400);
|
|
735
|
+
--color-icon-tag-playful: var(--color-pink-400);
|
|
736
|
+
|
|
685
737
|
/* ========================================
|
|
686
738
|
* SPACING
|
|
687
739
|
* ======================================== */
|
|
@@ -944,6 +996,24 @@
|
|
|
944
996
|
}
|
|
945
997
|
}
|
|
946
998
|
|
|
999
|
+
@keyframes accordionDown {
|
|
1000
|
+
from {
|
|
1001
|
+
height: 0;
|
|
1002
|
+
}
|
|
1003
|
+
to {
|
|
1004
|
+
height: var(--radix-accordion-content-height);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
@keyframes accordionUp {
|
|
1009
|
+
from {
|
|
1010
|
+
height: var(--radix-accordion-content-height);
|
|
1011
|
+
}
|
|
1012
|
+
to {
|
|
1013
|
+
height: 0;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
|
|
947
1017
|
html {
|
|
948
1018
|
/* body.md textStyle from Panda → text-base */
|
|
949
1019
|
font-size: var(--text-base);
|