@agentero/design-system 0.34.0 → 0.34.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/mcp/manifests/components.html +7 -3
- package/mcp/manifests/components.json +3 -3
- package/package.json +1 -1
- package/src/label/label.d.ts +28 -16
- package/src/label/label.js +22 -22
|
@@ -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>5.0s</strong>.
|
|
598
598
|
</div>
|
|
599
599
|
<h2 class="section-title">Components</h2>
|
|
600
600
|
<div class="grid" role="list">
|
|
@@ -7972,8 +7972,12 @@ required?: boolean = false</code></pre>
|
|
|
7972
7972
|
<span class="badge ok">story ok</span>
|
|
7973
7973
|
</div>
|
|
7974
7974
|
<div>Optional field with a muted suffix</div>
|
|
7975
|
-
<div class="hint">Appends a muted " (optional)" suffix for fields that can be left blank
|
|
7976
|
-
|
|
7975
|
+
<div class="hint">Appends a muted " (optional)" suffix for fields that can be left blank. The
|
|
7976
|
+
suffix is real text, so it is part of the control's accessible name.</div>
|
|
7977
|
+
<pre><code>const Optional = () => <>
|
|
7978
|
+
<Label optional htmlFor="phone">Phone number</Label>
|
|
7979
|
+
<input id="phone" type="tel" className={inputRecipe()} />
|
|
7980
|
+
</>;</code></pre>
|
|
7977
7981
|
</div>
|
|
7978
7982
|
<div class="note ok">
|
|
7979
7983
|
<div class="row">
|
|
@@ -7133,8 +7133,8 @@
|
|
|
7133
7133
|
{
|
|
7134
7134
|
"id": "components-label--optional",
|
|
7135
7135
|
"name": "Optional",
|
|
7136
|
-
"snippet": "const Optional = () => <Label optional>Phone number</Label
|
|
7137
|
-
"description": "Appends a muted \" (optional)\" suffix for fields that can be left blank.",
|
|
7136
|
+
"snippet": "const Optional = () => <>\n <Label optional htmlFor=\"phone\">Phone number</Label>\n <input id=\"phone\" type=\"tel\" className={inputRecipe()} />\n</>;",
|
|
7137
|
+
"description": "Appends a muted \" (optional)\" suffix for fields that can be left blank. The\nsuffix is real text, so it is part of the control's accessible name.",
|
|
7138
7138
|
"summary": "Optional field with a muted suffix"
|
|
7139
7139
|
},
|
|
7140
7140
|
{
|
|
@@ -9867,6 +9867,6 @@
|
|
|
9867
9867
|
},
|
|
9868
9868
|
"meta": {
|
|
9869
9869
|
"docgen": "react-component-meta",
|
|
9870
|
-
"durationMs":
|
|
9870
|
+
"durationMs": 5001
|
|
9871
9871
|
}
|
|
9872
9872
|
}
|
package/package.json
CHANGED
package/src/label/label.d.ts
CHANGED
|
@@ -1,36 +1,48 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
4
|
-
/** Style recipe for Label. Slots: `root`, `text`, `required`. */
|
|
4
|
+
/** Style recipe for Label. Slots: `root`, `text`, `optional`, `required`. */
|
|
5
5
|
export declare const labelRecipe: import('tailwind-variants').TVReturnType<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
text
|
|
6
|
+
[key: string]: {
|
|
7
|
+
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
8
|
+
text?: import('tailwind-merge').ClassNameValue;
|
|
9
|
+
root?: import('tailwind-merge').ClassNameValue;
|
|
10
|
+
required?: import('tailwind-merge').ClassNameValue;
|
|
11
|
+
optional?: import('tailwind-merge').ClassNameValue;
|
|
9
12
|
};
|
|
10
13
|
};
|
|
11
|
-
}
|
|
14
|
+
} | {
|
|
15
|
+
[x: string]: {
|
|
16
|
+
[x: string]: import('tailwind-merge').ClassNameValue | {
|
|
17
|
+
text?: import('tailwind-merge').ClassNameValue;
|
|
18
|
+
root?: import('tailwind-merge').ClassNameValue;
|
|
19
|
+
required?: import('tailwind-merge').ClassNameValue;
|
|
20
|
+
optional?: import('tailwind-merge').ClassNameValue;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
} | {}, {
|
|
12
24
|
root: string;
|
|
13
25
|
text: string;
|
|
26
|
+
optional: string;
|
|
14
27
|
required: string;
|
|
15
28
|
}, undefined, {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
text
|
|
29
|
+
[key: string]: {
|
|
30
|
+
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
31
|
+
text?: import('tailwind-merge').ClassNameValue;
|
|
32
|
+
root?: import('tailwind-merge').ClassNameValue;
|
|
33
|
+
required?: import('tailwind-merge').ClassNameValue;
|
|
34
|
+
optional?: import('tailwind-merge').ClassNameValue;
|
|
19
35
|
};
|
|
20
36
|
};
|
|
21
|
-
}, {
|
|
37
|
+
} | {}, {
|
|
22
38
|
root: string;
|
|
23
39
|
text: string;
|
|
40
|
+
optional: string;
|
|
24
41
|
required: string;
|
|
25
|
-
}, import('tailwind-variants').TVReturnType<{
|
|
26
|
-
optional: {
|
|
27
|
-
true: {
|
|
28
|
-
text: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}, {
|
|
42
|
+
}, import('tailwind-variants').TVReturnType<unknown, {
|
|
32
43
|
root: string;
|
|
33
44
|
text: string;
|
|
45
|
+
optional: string;
|
|
34
46
|
required: string;
|
|
35
47
|
}, undefined, unknown, unknown, undefined>>;
|
|
36
48
|
export type LabelVariants = VariantProps<typeof labelRecipe>;
|
package/src/label/label.js
CHANGED
|
@@ -2,33 +2,33 @@
|
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { useLabelContext as t } from "./context.js";
|
|
4
4
|
import { tv as n } from "tailwind-variants";
|
|
5
|
-
import {
|
|
6
|
-
import * as
|
|
5
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import * as o from "@radix-ui/react-label";
|
|
7
7
|
//#region src/label/label.tsx
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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, {
|
|
8
|
+
var s = n({ slots: {
|
|
9
|
+
root: "flex flex-wrap gap-1 py-0.25 text-sm font-semibold text-text-input-normal",
|
|
10
|
+
text: "align-middle",
|
|
11
|
+
optional: "font-normal text-text-input-placeholder",
|
|
12
|
+
required: "align-middle text-text-input-destructive"
|
|
13
|
+
} }), c = (n) => {
|
|
14
|
+
let { className: c, children: l, optional: u = !1, required: d = !1, ...f } = t(n), p = u && !d, m = s();
|
|
15
|
+
return /* @__PURE__ */ a(o.Root, {
|
|
19
16
|
"data-slot": "label",
|
|
20
|
-
className: e(
|
|
21
|
-
...
|
|
22
|
-
children: [/* @__PURE__ */
|
|
23
|
-
className:
|
|
24
|
-
children:
|
|
25
|
-
|
|
17
|
+
className: e(m.root(), c),
|
|
18
|
+
...f,
|
|
19
|
+
children: [/* @__PURE__ */ a("span", {
|
|
20
|
+
className: m.text(),
|
|
21
|
+
children: [l, p && /* @__PURE__ */ a(r, { children: [" ", /* @__PURE__ */ i("span", {
|
|
22
|
+
className: m.optional(),
|
|
23
|
+
children: "(optional)"
|
|
24
|
+
})] })]
|
|
25
|
+
}), d && /* @__PURE__ */ i("span", {
|
|
26
26
|
"aria-hidden": !0,
|
|
27
|
-
className:
|
|
27
|
+
className: m.required(),
|
|
28
28
|
children: "*"
|
|
29
29
|
})]
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
c.displayName = "Label";
|
|
33
33
|
//#endregion
|
|
34
|
-
export {
|
|
34
|
+
export { c as Label, s as labelRecipe };
|