@agentero/design-system 0.26.0 → 0.26.2
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.
|
@@ -588,13 +588,13 @@
|
|
|
588
588
|
<header>
|
|
589
589
|
<div class="wrap">
|
|
590
590
|
<h1>Manifest Debugger</h1>
|
|
591
|
-
<div class="summary"><a class="filter-pill all" data-k="all" href="#filter-all">All</a><span class="filter-pill ok" aria-disabled="true">26 components ok</span><span class="filter-pill ok" aria-disabled="true">
|
|
591
|
+
<div class="summary"><a class="filter-pill all" data-k="all" href="#filter-all">All</a><span class="filter-pill ok" aria-disabled="true">26 components ok</span><span class="filter-pill ok" aria-disabled="true">204 stories ok</span></div>
|
|
592
592
|
</div>
|
|
593
593
|
</header>
|
|
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>4.
|
|
597
|
+
Using <code>react-component-meta</code>. Generation took <strong>4.5s</strong>.
|
|
598
598
|
</div>
|
|
599
599
|
<h2 class="section-title">Components</h2>
|
|
600
600
|
<div class="grid" role="list">
|
|
@@ -2580,7 +2580,7 @@ import { CheckList } from '@agentero/design-system/check-list';
|
|
|
2580
2580
|
<div class="badges">
|
|
2581
2581
|
<label for="c-6-components-command-props" class="badge ok as-toggle">10 prop types</label>
|
|
2582
2582
|
|
|
2583
|
-
<label for="c-6-components-command-stories" class="badge ok as-toggle">
|
|
2583
|
+
<label for="c-6-components-command-stories" class="badge ok as-toggle">6 stories</label>
|
|
2584
2584
|
|
|
2585
2585
|
|
|
2586
2586
|
</div>
|
|
@@ -2791,6 +2791,26 @@ and `scroll-py-2` keeps that row off the container edges.</div>
|
|
|
2791
2791
|
</Command.Item>
|
|
2792
2792
|
</Command.List>
|
|
2793
2793
|
<Command.Empty>No results found.</Command.Empty>
|
|
2794
|
+
</Command.Root>;</code></pre>
|
|
2795
|
+
</div>
|
|
2796
|
+
<div class="note ok">
|
|
2797
|
+
<div class="row">
|
|
2798
|
+
<span class="ex-name">Disabled Item</span>
|
|
2799
|
+
<span class="badge ok">story ok</span>
|
|
2800
|
+
</div>
|
|
2801
|
+
|
|
2802
|
+
<div class="hint">A `disabled` row stays visible and searchable but cannot be chosen. cmdk skips it with the
|
|
2803
|
+
arrow keys and swallows the click, and the row drops its hover and active styling so the
|
|
2804
|
+
list does not invite the pointer.</div>
|
|
2805
|
+
<pre><code>const DisabledItem = () => <Command.Root label="Search agencies">
|
|
2806
|
+
<Command.Input placeholder="Search..." />
|
|
2807
|
+
<Command.List>
|
|
2808
|
+
<Command.Item value="pinnacle" onSelect={handleDisabledSelect}>Pinnacle Shield Insurance
|
|
2809
|
+
</Command.Item>
|
|
2810
|
+
<Command.Item value="horizon" disabled onSelect={handleDisabledSelect}>Horizon Risk Solutions
|
|
2811
|
+
</Command.Item>
|
|
2812
|
+
</Command.List>
|
|
2813
|
+
<Command.Empty>No results found.</Command.Empty>
|
|
2794
2814
|
</Command.Root>;</code></pre>
|
|
2795
2815
|
</div>
|
|
2796
2816
|
</div>
|
|
@@ -1923,6 +1923,12 @@
|
|
|
1923
1923
|
"id": "components-command--keyboard-navigation",
|
|
1924
1924
|
"name": "Keyboard Navigation",
|
|
1925
1925
|
"snippet": "const KeyboardNavigation = () => <Command.Root label=\"Search commands\">\n <Command.Input placeholder=\"Search...\" />\n <Command.List>\n <Command.Item value=\"home\" keywords={['Homeowners']} onSelect={handleSelect}>Homeowners\n </Command.Item>\n <Command.Item value=\"auto\" keywords={['Auto']} onSelect={handleSelect}>Auto\n </Command.Item>\n </Command.List>\n <Command.Empty>No results found.</Command.Empty>\n</Command.Root>;"
|
|
1926
|
+
},
|
|
1927
|
+
{
|
|
1928
|
+
"id": "components-command--disabled-item",
|
|
1929
|
+
"name": "Disabled Item",
|
|
1930
|
+
"snippet": "const DisabledItem = () => <Command.Root label=\"Search agencies\">\n <Command.Input placeholder=\"Search...\" />\n <Command.List>\n <Command.Item value=\"pinnacle\" onSelect={handleDisabledSelect}>Pinnacle Shield Insurance\n </Command.Item>\n <Command.Item value=\"horizon\" disabled onSelect={handleDisabledSelect}>Horizon Risk Solutions\n </Command.Item>\n </Command.List>\n <Command.Empty>No results found.</Command.Empty>\n</Command.Root>;",
|
|
1931
|
+
"description": "A `disabled` row stays visible and searchable but cannot be chosen. cmdk skips it with the\narrow keys and swallows the click, and the row drops its hover and active styling so the\nlist does not invite the pointer."
|
|
1926
1932
|
}
|
|
1927
1933
|
],
|
|
1928
1934
|
"import": "import { Command } from \"@agentero/design-system\";"
|
|
@@ -7281,6 +7287,6 @@
|
|
|
7281
7287
|
},
|
|
7282
7288
|
"meta": {
|
|
7283
7289
|
"docgen": "react-component-meta",
|
|
7284
|
-
"durationMs":
|
|
7290
|
+
"durationMs": 4462
|
|
7285
7291
|
}
|
|
7286
7292
|
}
|
package/package.json
CHANGED
package/src/command/command.d.ts
CHANGED
|
@@ -220,7 +220,8 @@ export declare const Group: {
|
|
|
220
220
|
* @property {string} [className] - Additional CSS classes to apply.
|
|
221
221
|
*
|
|
222
222
|
* @dataAttribute {string} data-selected - "true" on the active row, "false" otherwise
|
|
223
|
-
* @dataAttribute {string} data-disabled - "true" when disabled, "false" otherwise
|
|
223
|
+
* @dataAttribute {string} data-disabled - "true" when disabled, "false" otherwise. A disabled row
|
|
224
|
+
* drops the hover and active backgrounds and renders in the disabled text color.
|
|
224
225
|
*/
|
|
225
226
|
type ItemProps = ComponentProps<typeof CommandPrimitive.Item>;
|
|
226
227
|
/**
|
package/src/command/command.js
CHANGED
|
@@ -5,8 +5,8 @@ import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
|
5
5
|
import { Command as i } from "cmdk";
|
|
6
6
|
//#region src/command/command.tsx
|
|
7
7
|
var a = t({ slots: {
|
|
8
|
-
root: ["overflow-hidden rounded-md bg-bg-default-base-primary shadow-xl", "border border-border-default-base-
|
|
9
|
-
search: ["flex items-center gap-2 px-4 py-3", "border-b border-border-default-base-
|
|
8
|
+
root: ["overflow-hidden rounded-md bg-bg-default-base-primary shadow-xl", "border border-border-default-base-primary"],
|
|
9
|
+
search: ["flex items-center gap-2 px-4 py-3", "border-b border-border-default-base-primary"],
|
|
10
10
|
searchIcon: "shrink-0 pointer-events-none [&>path]:fill-icon-default-base-tertiary",
|
|
11
11
|
input: ["w-full border-none bg-transparent text-sm text-text-default-base-primary outline-none", "placeholder:text-text-default-base-tertiary"],
|
|
12
12
|
list: ["max-h-65.25 overflow-y-auto rounded-md px-1 py-2 outline-none scroll-py-2", "not-has-[[cmdk-item]]:py-0"],
|
|
@@ -14,7 +14,9 @@ var a = t({ slots: {
|
|
|
14
14
|
item: [
|
|
15
15
|
"flex items-center rounded-md px-3 py-2 text-sm text-text-default-base-primary",
|
|
16
16
|
"cursor-pointer hover:bg-bg-default-base-tertiary",
|
|
17
|
-
"data-[selected=true]:bg-bg-default-base-tertiary"
|
|
17
|
+
"data-[selected=true]:bg-bg-default-base-tertiary",
|
|
18
|
+
"data-[disabled=true]:cursor-default data-[disabled=true]:text-text-default-disable-primary",
|
|
19
|
+
"data-[disabled=true]:hover:bg-transparent data-[disabled=true]:data-[selected=true]:bg-transparent"
|
|
18
20
|
]
|
|
19
21
|
} }), o = a(), s = ({ className: e, ...t }) => /* @__PURE__ */ n(i, {
|
|
20
22
|
"data-slot": "command-root",
|