@agentero/design-system 0.21.0 → 0.22.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 +117 -2
- package/mcp/manifests/components.json +1 -1
- package/package.json +5 -1
- package/src/validation-list/index.d.ts +2 -0
- package/src/validation-list/index.js +2 -0
- package/src/validation-list/validation-list.d.ts +60 -0
- package/src/validation-list/validation-list.js +30 -0
|
@@ -576,13 +576,13 @@
|
|
|
576
576
|
<header>
|
|
577
577
|
<div class="wrap">
|
|
578
578
|
<h1>Manifest Debugger</h1>
|
|
579
|
-
<div class="summary"><a class="filter-pill all" data-k="all" href="#filter-all">All</a><span class="filter-pill ok" aria-disabled="true">
|
|
579
|
+
<div class="summary"><a class="filter-pill all" data-k="all" href="#filter-all">All</a><span class="filter-pill ok" aria-disabled="true">23 components ok</span><span class="filter-pill ok" aria-disabled="true">178 stories ok</span></div>
|
|
580
580
|
</div>
|
|
581
581
|
</header>
|
|
582
582
|
<main>
|
|
583
583
|
<div class="wrap">
|
|
584
584
|
<div class="note ok" style="margin-bottom: 16px;">
|
|
585
|
-
Using <code>react-docgen-typescript</code>. Generation took <strong>3.
|
|
585
|
+
Using <code>react-docgen-typescript</code>. Generation took <strong>3.2s</strong>.
|
|
586
586
|
</div>
|
|
587
587
|
<h2 class="section-title">Components</h2>
|
|
588
588
|
<div class="grid" role="list">
|
|
@@ -5714,6 +5714,121 @@ sideOffset?: number = 4</code></pre>
|
|
|
5714
5714
|
</div>
|
|
5715
5715
|
</div>
|
|
5716
5716
|
|
|
5717
|
+
</div>
|
|
5718
|
+
</article>
|
|
5719
|
+
<article
|
|
5720
|
+
class="card
|
|
5721
|
+
no-error
|
|
5722
|
+
no-info
|
|
5723
|
+
no-story-error
|
|
5724
|
+
no-doc-error"
|
|
5725
|
+
role="listitem"
|
|
5726
|
+
aria-label="ValidationList">
|
|
5727
|
+
<div class="head">
|
|
5728
|
+
<div class="title">
|
|
5729
|
+
<h2><span class="status-dot dot-ok"></span> ValidationList</h2>
|
|
5730
|
+
<div class="badges">
|
|
5731
|
+
<label for="c-22-components-validationlist-props" class="badge ok as-toggle">2 prop types</label>
|
|
5732
|
+
|
|
5733
|
+
<label for="c-22-components-validationlist-stories" class="badge ok as-toggle">4 stories</label>
|
|
5734
|
+
|
|
5735
|
+
</div>
|
|
5736
|
+
</div>
|
|
5737
|
+
<div class="meta" title="./src/validation-list/validation-list.stories.tsx">components-validationlist · ./src/validation-list/validation-list.stories.tsx</div>
|
|
5738
|
+
|
|
5739
|
+
<div class="hint">ValidationList renders a bulleted checklist of rules that light up as a value satisfies them. Each rule's `pattern` is a `RegExp` or a predicate `(value) => boolean`, so character-class checks and arbitrary logic (length, membership, …) live in the same list. It is presentational — pair it with your form validation; it does not own the input or block submission.</div>
|
|
5740
|
+
|
|
5741
|
+
</div>
|
|
5742
|
+
|
|
5743
|
+
<!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
|
|
5744
|
+
|
|
5745
|
+
|
|
5746
|
+
<input id="c-22-components-validationlist-stories" class="tg tg-stories" type="checkbox" hidden />
|
|
5747
|
+
|
|
5748
|
+
<input id="c-22-components-validationlist-props" class="tg tg-props" type="checkbox" hidden />
|
|
5749
|
+
|
|
5750
|
+
<div class="panels">
|
|
5751
|
+
|
|
5752
|
+
|
|
5753
|
+
|
|
5754
|
+
<div class="panel panel-props">
|
|
5755
|
+
<div class="note ok">
|
|
5756
|
+
<div class="row">
|
|
5757
|
+
<span class="ex-name">Prop types <small>(react-docgen-typescript)</small></span>
|
|
5758
|
+
<span class="badge ok">2 prop types</span>
|
|
5759
|
+
</div>
|
|
5760
|
+
<pre><code>Component: src/validation-list/validation-list.tsx::ValidationList</code></pre>
|
|
5761
|
+
<pre><code>Props:</code></pre>
|
|
5762
|
+
<pre><code>rules: ValidationRule[]
|
|
5763
|
+
|
|
5764
|
+
value: string</code></pre>
|
|
5765
|
+
</div>
|
|
5766
|
+
</div>
|
|
5767
|
+
|
|
5768
|
+
<div class="panel panel-stories">
|
|
5769
|
+
|
|
5770
|
+
|
|
5771
|
+
|
|
5772
|
+
<div class="note ok">
|
|
5773
|
+
<div class="row">
|
|
5774
|
+
<span class="ex-name">Imports</span>
|
|
5775
|
+
</div>
|
|
5776
|
+
<pre><code>import { ValidationList } from "@agentero/design-system";</code></pre>
|
|
5777
|
+
</div>
|
|
5778
|
+
|
|
5779
|
+
|
|
5780
|
+
<div class="note ok">
|
|
5781
|
+
<div class="row">
|
|
5782
|
+
<span class="ex-name">Default</span>
|
|
5783
|
+
<span class="badge ok">story ok</span>
|
|
5784
|
+
</div>
|
|
5785
|
+
|
|
5786
|
+
<div class="hint">A partially-satisfied value: some rules are active, some are still unmet.</div>
|
|
5787
|
+
<pre><code>const Default = () => <ValidationList value="Password1234." rules={rules} />;</code></pre>
|
|
5788
|
+
</div>
|
|
5789
|
+
<div class="note ok">
|
|
5790
|
+
<div class="row">
|
|
5791
|
+
<span class="ex-name">None Met</span>
|
|
5792
|
+
<span class="badge ok">story ok</span>
|
|
5793
|
+
</div>
|
|
5794
|
+
|
|
5795
|
+
<div class="hint">Empty value: every rule is unmet, so all items render in the tertiary color.</div>
|
|
5796
|
+
<pre><code>const NoneMet = () => <ValidationList value="" rules={rules} />;</code></pre>
|
|
5797
|
+
</div>
|
|
5798
|
+
<div class="note ok">
|
|
5799
|
+
<div class="row">
|
|
5800
|
+
<span class="ex-name">Partially Met</span>
|
|
5801
|
+
<span class="badge ok">story ok</span>
|
|
5802
|
+
</div>
|
|
5803
|
+
|
|
5804
|
+
<div class="hint">A value that satisfies the regex rules but not the length predicate.</div>
|
|
5805
|
+
<pre><code>const PartiallyMet = () => <ValidationList value="Aa1." rules={rules} />;</code></pre>
|
|
5806
|
+
</div>
|
|
5807
|
+
<div class="note ok">
|
|
5808
|
+
<div class="row">
|
|
5809
|
+
<span class="ex-name">Playground</span>
|
|
5810
|
+
<span class="badge ok">story ok</span>
|
|
5811
|
+
</div>
|
|
5812
|
+
|
|
5813
|
+
<div class="hint">Wire the value to an input to watch the list update on every keystroke.</div>
|
|
5814
|
+
<pre><code>const Playground = () => {
|
|
5815
|
+
const [value, setValue] = useState('');
|
|
5816
|
+
|
|
5817
|
+
return (
|
|
5818
|
+
<div className="flex w-100 flex-col gap-4">
|
|
5819
|
+
<input
|
|
5820
|
+
type="text"
|
|
5821
|
+
value={value}
|
|
5822
|
+
placeholder="Type a password…"
|
|
5823
|
+
onChange={event => setValue(event.target.value)}
|
|
5824
|
+
className="rounded-md border border-border-default-base-primary px-3 py-2 text-sm" />
|
|
5825
|
+
<ValidationList rules={rules} value={value} />
|
|
5826
|
+
</div>
|
|
5827
|
+
);
|
|
5828
|
+
};</code></pre>
|
|
5829
|
+
</div>
|
|
5830
|
+
</div>
|
|
5831
|
+
|
|
5717
5832
|
</div>
|
|
5718
5833
|
</article>
|
|
5719
5834
|
</div>
|