@agentero/design-system 0.32.2 → 0.33.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.
@@ -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">34 components ok</span><span class="filter-pill ok" aria-disabled="true">281 stories ok</span></div>
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">35 components ok</span><span class="filter-pill ok" aria-disabled="true">286 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.9s</strong>.
597
+ Using <code>react-component-meta</code>. Generation took <strong>4.7s</strong>.
598
598
  </div>
599
599
  <h2 class="section-title">Components</h2>
600
600
  <div class="grid" role="list">
@@ -7426,6 +7426,174 @@ button&#39;s start corners with the frame.</div>
7426
7426
  </div>
7427
7427
 
7428
7428
 
7429
+ </div>
7430
+ </article>
7431
+ <article
7432
+ class="card
7433
+ no-error
7434
+ no-info
7435
+ no-story-error
7436
+ no-doc-error"
7437
+ role="listitem"
7438
+ aria-label="InputPassword">
7439
+ <div class="head">
7440
+ <div class="title">
7441
+ <h2><span class="status-dot dot-ok"></span> InputPassword</h2>
7442
+ <div class="badges">
7443
+ <label for="c-19-components-inputpassword-props" class="badge ok as-toggle">1 prop type</label>
7444
+
7445
+ <label for="c-19-components-inputpassword-stories" class="badge ok as-toggle">5 stories</label>
7446
+
7447
+
7448
+ </div>
7449
+ </div>
7450
+ <div class="meta" title="./src/input-password/input-password.stories.tsx">components-inputpassword · ./src/input-password/input-password.stories.tsx</div>
7451
+ <div>Password input with a show/hide toggle inside the frame</div>
7452
+ <div class="hint">InputPassword is a password field with a show/hide toggle at the end of its
7453
+ frame. It is an `Input` inside an `InputGroup`: `className` styles the
7454
+ frame and every other prop reaches the `&lt;input&gt;`, which takes its label,
7455
+ messages and states from a surrounding `FieldText`. The toggle is not
7456
+ rendered while the input is disabled.</div>
7457
+ <div class="kv"><span class="chip">summary: Password input with a show/hide toggle inside the frame</span><span class="chip">dataAttribute: {string} data-slot - Always set to &quot;input-password&quot; on the frame</span><span class="chip">example: &lt;FieldText required&gt;
7458
+ &lt;Label&gt;Password&lt;/Label&gt;
7459
+ &lt;InputPassword name=&quot;password&quot; autoComplete=&quot;current-password&quot; /&gt;
7460
+ &lt;/FieldText&gt;</span></div>
7461
+ </div>
7462
+
7463
+ <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
7464
+
7465
+
7466
+ <input id="c-19-components-inputpassword-stories" class="tg tg-stories" type="checkbox" hidden />
7467
+
7468
+
7469
+ <input id="c-19-components-inputpassword-props" class="tg tg-props" type="checkbox" hidden />
7470
+
7471
+ <div class="panels">
7472
+
7473
+
7474
+
7475
+ <div class="panel panel-props">
7476
+ <div class="note ok">
7477
+ <div class="row">
7478
+ <span class="ex-name">Prop types <small>(react-component-meta)</small></span>
7479
+ <span class="badge ok">1 prop type</span>
7480
+ </div>
7481
+ <pre><code>Component: src/input-password/input-password.tsx::InputPassword</code></pre>
7482
+ <pre><code>Props:</code></pre>
7483
+ <pre><code>/**
7484
+ * Control height. Defaults to `&#39;md&#39;`.
7485
+ * - `sm` (32px) — dense layouts where vertical space is tight.
7486
+ * - `md` (40px) — standard form density.
7487
+ * - `lg` (48px) — low-density forms and larger touch targets. Also raises
7488
+ * the text to `base` and the corner radius to `lg`.
7489
+ */
7490
+ size?: &quot;sm&quot; | &quot;md&quot; | &quot;lg&quot;</code></pre>
7491
+ </div>
7492
+ </div>
7493
+
7494
+ <div class="panel panel-stories">
7495
+
7496
+
7497
+
7498
+ <div class="note ok">
7499
+ <div class="row">
7500
+ <span class="ex-name">Imports</span>
7501
+ </div>
7502
+ <pre><code>import { Field, FieldText, InputPassword, Label } from "@agentero/design-system";</code></pre>
7503
+ </div>
7504
+
7505
+
7506
+ <div class="note ok">
7507
+ <div class="row">
7508
+ <span class="ex-name">Default</span>
7509
+ <span class="badge ok">story ok</span>
7510
+ </div>
7511
+ <div>Hidden value with a toggle that reveals and hides it</div>
7512
+ <div class="hint">The value starts hidden. The toggle shows it as plain text and hides it
7513
+ again; pressing it leaves focus and the caret in the input.</div>
7514
+ <pre><code>const Default = () =&gt; &lt;InputPassword aria-label=&quot;Password&quot; autoComplete=&quot;current-password&quot; /&gt;;</code></pre>
7515
+ </div>
7516
+ <div class="note ok">
7517
+ <div class="row">
7518
+ <span class="ex-name">Disabled</span>
7519
+ <span class="badge ok">story ok</span>
7520
+ </div>
7521
+ <div>Disabled input with the toggle removed</div>
7522
+ <div class="hint">A disabled input has no toggle, whether `disabled` is set on the input
7523
+ itself or comes from a `&lt;fieldset disabled&gt;` around it.</div>
7524
+ <pre><code>const Disabled = () =&gt; &lt;div style={{ display: &#39;grid&#39;, gap: &#39;1rem&#39; }}&gt;
7525
+ &lt;InputPassword
7526
+ aria-label=&quot;Password&quot;
7527
+ autoComplete=&quot;current-password&quot;
7528
+ disabled
7529
+ defaultValue=&quot;hunter22&quot; /&gt;
7530
+ &lt;fieldset disabled style={{ border: 0, margin: 0, padding: 0 }}&gt;
7531
+ &lt;InputPassword aria-label=&quot;New password&quot; autoComplete=&quot;new-password&quot; /&gt;
7532
+ &lt;/fieldset&gt;
7533
+ &lt;/div&gt;;</code></pre>
7534
+ </div>
7535
+ <div class="note ok">
7536
+ <div class="row">
7537
+ <span class="ex-name">Invalid</span>
7538
+ <span class="badge ok">story ok</span>
7539
+ </div>
7540
+ <div>Invalid field driving the frame&#39;s destructive border</div>
7541
+ <div class="hint">`invalid` on the surrounding `FieldText` sets `aria-invalid` on the input,
7542
+ which paints the frame&#39;s destructive border, and `Field.Error` is announced
7543
+ with the input.</div>
7544
+ <pre><code>const Invalid = () =&gt; &lt;div style={{ display: &#39;grid&#39;, gap: &#39;1.5rem&#39; }}&gt;
7545
+ &lt;InputPassword
7546
+ autoComplete=&quot;current-password&quot;
7547
+ aria-label=&quot;Valid password&quot;
7548
+ defaultValue=&quot;hunter22&quot; /&gt;
7549
+ &lt;FieldText invalid&gt;
7550
+ &lt;Label&gt;Password&lt;/Label&gt;
7551
+ &lt;InputPassword autoComplete=&quot;new-password&quot; defaultValue=&quot;hunter&quot; /&gt;
7552
+ &lt;Field.Error errors={[{ message: &#39;Use at least 8 characters.&#39; }]} /&gt;
7553
+ &lt;/FieldText&gt;
7554
+ &lt;/div&gt;;</code></pre>
7555
+ </div>
7556
+ <div class="note ok">
7557
+ <div class="row">
7558
+ <span class="ex-name">All Sizes</span>
7559
+ <span class="badge ok">story ok</span>
7560
+ </div>
7561
+ <div>The three sizes, with the toggle scaled and evenly inset</div>
7562
+ <div class="hint">The three sizes match Input&#39;s: the frame is 32, 40 or 48px tall. The toggle
7563
+ grows with it (a 24px button with a 16px icon at `sm`, 32px with 20px at
7564
+ `md`, 32px with 24px at `lg`) and sits as far from the right edge as from
7565
+ the top and bottom.</div>
7566
+ <pre><code>const AllSizes = () =&gt; &lt;div style={{ display: &#39;grid&#39;, gap: &#39;1rem&#39; }}&gt;
7567
+ &lt;InputPassword autoComplete=&quot;current-password&quot; size=&quot;sm&quot; aria-label=&quot;Small&quot; /&gt;
7568
+ &lt;InputPassword autoComplete=&quot;current-password&quot; size=&quot;md&quot; aria-label=&quot;Medium&quot; /&gt;
7569
+ &lt;InputPassword autoComplete=&quot;current-password&quot; size=&quot;lg&quot; aria-label=&quot;Large&quot; /&gt;
7570
+ &lt;/div&gt;;</code></pre>
7571
+ </div>
7572
+ <div class="note ok">
7573
+ <div class="row">
7574
+ <span class="ex-name">Inside Field Text</span>
7575
+ <span class="badge ok">story ok</span>
7576
+ </div>
7577
+ <div>Label and disabled state reaching the input through the frame</div>
7578
+ <div class="hint">Inside a `FieldText` the input takes its label, description and states from
7579
+ the field through the frame. A disabled field removes the toggle too.</div>
7580
+ <pre><code>const InsideFieldText = () =&gt; (
7581
+ &lt;div style={{ display: &#39;grid&#39;, gap: &#39;1.5rem&#39; }}&gt;
7582
+ &lt;FieldText required&gt;
7583
+ &lt;Label&gt;Password&lt;/Label&gt;
7584
+ &lt;InputPassword autoComplete=&quot;new-password&quot; /&gt;
7585
+ &lt;Field.Description&gt;At least 8 characters.&lt;/Field.Description&gt;
7586
+ &lt;/FieldText&gt;
7587
+ &lt;FieldText disabled&gt;
7588
+ &lt;Label&gt;Current password&lt;/Label&gt;
7589
+ &lt;InputPassword autoComplete=&quot;current-password&quot; defaultValue=&quot;hunter22&quot; /&gt;
7590
+ &lt;/FieldText&gt;
7591
+ &lt;/div&gt;
7592
+ );</code></pre>
7593
+ </div>
7594
+ </div>
7595
+
7596
+
7429
7597
  </div>
7430
7598
  </article>
7431
7599
  <article
@@ -7440,9 +7608,9 @@ button&#39;s start corners with the frame.</div>
7440
7608
  <div class="title">
7441
7609
  <h2><span class="status-dot dot-ok"></span> Label</h2>
7442
7610
  <div class="badges">
7443
- <label for="c-19-components-label-props" class="badge ok as-toggle">3 prop types</label>
7611
+ <label for="c-20-components-label-props" class="badge ok as-toggle">3 prop types</label>
7444
7612
 
7445
- <label for="c-19-components-label-stories" class="badge ok as-toggle">5 stories</label>
7613
+ <label for="c-20-components-label-stories" class="badge ok as-toggle">5 stories</label>
7446
7614
 
7447
7615
 
7448
7616
  </div>
@@ -7462,10 +7630,10 @@ still has to carry `required` / `aria-required`.</div>
7462
7630
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
7463
7631
 
7464
7632
 
7465
- <input id="c-19-components-label-stories" class="tg tg-stories" type="checkbox" hidden />
7633
+ <input id="c-20-components-label-stories" class="tg tg-stories" type="checkbox" hidden />
7466
7634
 
7467
7635
 
7468
- <input id="c-19-components-label-props" class="tg tg-props" type="checkbox" hidden />
7636
+ <input id="c-20-components-label-props" class="tg tg-props" type="checkbox" hidden />
7469
7637
 
7470
7638
  <div class="panels">
7471
7639
 
@@ -7585,9 +7753,9 @@ field&#39;s control with no `htmlFor`. An explicit `htmlFor` still wins.</div>
7585
7753
  <div class="title">
7586
7754
  <h2><span class="status-dot dot-ok"></span> Loading</h2>
7587
7755
  <div class="badges">
7588
- <label for="c-20-components-loading-props" class="badge ok as-toggle">1 prop type</label>
7756
+ <label for="c-21-components-loading-props" class="badge ok as-toggle">1 prop type</label>
7589
7757
 
7590
- <label for="c-20-components-loading-stories" class="badge ok as-toggle">7 stories</label>
7758
+ <label for="c-21-components-loading-stories" class="badge ok as-toggle">7 stories</label>
7591
7759
 
7592
7760
 
7593
7761
  </div>
@@ -7604,10 +7772,10 @@ parent font size via `em`-based size variants (`sm`, `md`, `lg`).</div>
7604
7772
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
7605
7773
 
7606
7774
 
7607
- <input id="c-20-components-loading-stories" class="tg tg-stories" type="checkbox" hidden />
7775
+ <input id="c-21-components-loading-stories" class="tg tg-stories" type="checkbox" hidden />
7608
7776
 
7609
7777
 
7610
- <input id="c-20-components-loading-props" class="tg tg-props" type="checkbox" hidden />
7778
+ <input id="c-21-components-loading-props" class="tg tg-props" type="checkbox" hidden />
7611
7779
 
7612
7780
  <div class="panels">
7613
7781
 
@@ -7758,9 +7926,9 @@ against the dark background.</div>
7758
7926
  <div class="title">
7759
7927
  <h2><span class="status-dot dot-ok"></span> Modal.Root</h2>
7760
7928
  <div class="badges">
7761
- <label for="c-21-components-modal-props" class="badge ok as-toggle">5 prop types</label>
7929
+ <label for="c-22-components-modal-props" class="badge ok as-toggle">5 prop types</label>
7762
7930
 
7763
- <label for="c-21-components-modal-stories" class="badge ok as-toggle">6 stories</label>
7931
+ <label for="c-22-components-modal-stories" class="badge ok as-toggle">6 stories</label>
7764
7932
 
7765
7933
 
7766
7934
  </div>
@@ -7806,10 +7974,10 @@ import { Modal } from &#39;@agentero/design-system/modal&#39;;
7806
7974
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
7807
7975
 
7808
7976
 
7809
- <input id="c-21-components-modal-stories" class="tg tg-stories" type="checkbox" hidden />
7977
+ <input id="c-22-components-modal-stories" class="tg tg-stories" type="checkbox" hidden />
7810
7978
 
7811
7979
 
7812
- <input id="c-21-components-modal-props" class="tg tg-props" type="checkbox" hidden />
7980
+ <input id="c-22-components-modal-props" class="tg tg-props" type="checkbox" hidden />
7813
7981
 
7814
7982
  <div class="panels">
7815
7983
 
@@ -8029,9 +8197,9 @@ announced as an `alertdialog`. Only the footer actions close it.</div>
8029
8197
  <div class="title">
8030
8198
  <h2><span class="status-dot dot-ok"></span> Pagination</h2>
8031
8199
  <div class="badges">
8032
- <label for="c-22-components-pagination-props" class="badge ok as-toggle">5 prop types</label>
8200
+ <label for="c-23-components-pagination-props" class="badge ok as-toggle">5 prop types</label>
8033
8201
 
8034
- <label for="c-22-components-pagination-stories" class="badge ok as-toggle">7 stories</label>
8202
+ <label for="c-23-components-pagination-stories" class="badge ok as-toggle">7 stories</label>
8035
8203
 
8036
8204
 
8037
8205
  </div>
@@ -8061,10 +8229,10 @@ const [page, setPage] = useState(1);
8061
8229
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
8062
8230
 
8063
8231
 
8064
- <input id="c-22-components-pagination-stories" class="tg tg-stories" type="checkbox" hidden />
8232
+ <input id="c-23-components-pagination-stories" class="tg tg-stories" type="checkbox" hidden />
8065
8233
 
8066
8234
 
8067
- <input id="c-22-components-pagination-props" class="tg tg-props" type="checkbox" hidden />
8235
+ <input id="c-23-components-pagination-props" class="tg tg-props" type="checkbox" hidden />
8068
8236
 
8069
8237
  <div class="panels">
8070
8238
 
@@ -8219,9 +8387,9 @@ entries summary follow along.</div>
8219
8387
  <div class="title">
8220
8388
  <h2><span class="status-dot dot-ok"></span> Popover.Root</h2>
8221
8389
  <div class="badges">
8222
- <label for="c-23-components-popover-props" class="badge ok as-toggle">5 prop types</label>
8390
+ <label for="c-24-components-popover-props" class="badge ok as-toggle">5 prop types</label>
8223
8391
 
8224
- <label for="c-23-components-popover-stories" class="badge ok as-toggle">5 stories</label>
8392
+ <label for="c-24-components-popover-stories" class="badge ok as-toggle">5 stories</label>
8225
8393
 
8226
8394
 
8227
8395
  </div>
@@ -8250,10 +8418,10 @@ import { Popover } from &#39;@agentero/design-system/popover&#39;;
8250
8418
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
8251
8419
 
8252
8420
 
8253
- <input id="c-23-components-popover-stories" class="tg tg-stories" type="checkbox" hidden />
8421
+ <input id="c-24-components-popover-stories" class="tg tg-stories" type="checkbox" hidden />
8254
8422
 
8255
8423
 
8256
- <input id="c-23-components-popover-props" class="tg tg-props" type="checkbox" hidden />
8424
+ <input id="c-24-components-popover-props" class="tg tg-props" type="checkbox" hidden />
8257
8425
 
8258
8426
  <div class="panels">
8259
8427
 
@@ -8452,9 +8620,9 @@ focus returning to its trigger once the modal closes.</div>
8452
8620
  <div class="title">
8453
8621
  <h2><span class="status-dot dot-ok"></span> Progress</h2>
8454
8622
  <div class="badges">
8455
- <label for="c-24-components-progress-props" class="badge ok as-toggle">4 prop types</label>
8623
+ <label for="c-25-components-progress-props" class="badge ok as-toggle">4 prop types</label>
8456
8624
 
8457
- <label for="c-24-components-progress-stories" class="badge ok as-toggle">4 stories</label>
8625
+ <label for="c-25-components-progress-stories" class="badge ok as-toggle">4 stories</label>
8458
8626
 
8459
8627
 
8460
8628
  </div>
@@ -8473,10 +8641,10 @@ with `currentColor`, so recolor it with a plain text class — e.g.
8473
8641
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
8474
8642
 
8475
8643
 
8476
- <input id="c-24-components-progress-stories" class="tg tg-stories" type="checkbox" hidden />
8644
+ <input id="c-25-components-progress-stories" class="tg tg-stories" type="checkbox" hidden />
8477
8645
 
8478
8646
 
8479
- <input id="c-24-components-progress-props" class="tg tg-props" type="checkbox" hidden />
8647
+ <input id="c-25-components-progress-props" class="tg tg-props" type="checkbox" hidden />
8480
8648
 
8481
8649
  <div class="panels">
8482
8650
 
@@ -8595,7 +8763,7 @@ percentage: number</code></pre>
8595
8763
  <div class="badges">
8596
8764
 
8597
8765
 
8598
- <label for="c-25-components-skeleton-stories" class="badge ok as-toggle">4 stories</label>
8766
+ <label for="c-26-components-skeleton-stories" class="badge ok as-toggle">4 stories</label>
8599
8767
 
8600
8768
 
8601
8769
  </div>
@@ -8612,7 +8780,7 @@ shape it with Tailwind classes to mirror the content it stands in for.</div>
8612
8780
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
8613
8781
 
8614
8782
 
8615
- <input id="c-25-components-skeleton-stories" class="tg tg-stories" type="checkbox" hidden />
8783
+ <input id="c-26-components-skeleton-stories" class="tg tg-stories" type="checkbox" hidden />
8616
8784
 
8617
8785
 
8618
8786
 
@@ -8708,9 +8876,9 @@ shape it with Tailwind classes to mirror the content it stands in for.</div>
8708
8876
  <div class="title">
8709
8877
  <h2><span class="status-dot dot-ok"></span> Switch</h2>
8710
8878
  <div class="badges">
8711
- <label for="c-26-components-switch-props" class="badge ok as-toggle">8 prop types</label>
8879
+ <label for="c-27-components-switch-props" class="badge ok as-toggle">8 prop types</label>
8712
8880
 
8713
- <label for="c-26-components-switch-stories" class="badge ok as-toggle">7 stories</label>
8881
+ <label for="c-27-components-switch-stories" class="badge ok as-toggle">7 stories</label>
8714
8882
 
8715
8883
 
8716
8884
  </div>
@@ -8726,10 +8894,10 @@ a Checkbox for a single boolean that applies instantly, and pair it with a
8726
8894
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
8727
8895
 
8728
8896
 
8729
- <input id="c-26-components-switch-stories" class="tg tg-stories" type="checkbox" hidden />
8897
+ <input id="c-27-components-switch-stories" class="tg tg-stories" type="checkbox" hidden />
8730
8898
 
8731
8899
 
8732
- <input id="c-26-components-switch-props" class="tg tg-props" type="checkbox" hidden />
8900
+ <input id="c-27-components-switch-props" class="tg tg-props" type="checkbox" hidden />
8733
8901
 
8734
8902
  <div class="panels">
8735
8903
 
@@ -8910,9 +9078,9 @@ size?: &quot;sm&quot; | &quot;md&quot;</code></pre>
8910
9078
  <div class="title">
8911
9079
  <h2><span class="status-dot dot-ok"></span> Table.Root</h2>
8912
9080
  <div class="badges">
8913
- <label for="c-27-components-table-props" class="badge ok as-toggle">6 prop types</label>
9081
+ <label for="c-28-components-table-props" class="badge ok as-toggle">6 prop types</label>
8914
9082
 
8915
- <label for="c-27-components-table-stories" class="badge ok as-toggle">10 stories</label>
9083
+ <label for="c-28-components-table-stories" class="badge ok as-toggle">10 stories</label>
8916
9084
 
8917
9085
 
8918
9086
  </div>
@@ -8943,10 +9111,10 @@ import { Table } from &#39;@agentero/design-system/table&#39;;
8943
9111
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
8944
9112
 
8945
9113
 
8946
- <input id="c-27-components-table-stories" class="tg tg-stories" type="checkbox" hidden />
9114
+ <input id="c-28-components-table-stories" class="tg tg-stories" type="checkbox" hidden />
8947
9115
 
8948
9116
 
8949
- <input id="c-27-components-table-props" class="tg tg-props" type="checkbox" hidden />
9117
+ <input id="c-28-components-table-props" class="tg tg-props" type="checkbox" hidden />
8950
9118
 
8951
9119
  <div class="panels">
8952
9120
 
@@ -9164,9 +9332,9 @@ keeps its padding.</div>
9164
9332
  <div class="title">
9165
9333
  <h2><span class="status-dot dot-ok"></span> Tabs.Root</h2>
9166
9334
  <div class="badges">
9167
- <label for="c-28-components-tabs-props" class="badge ok as-toggle">9 prop types</label>
9335
+ <label for="c-29-components-tabs-props" class="badge ok as-toggle">9 prop types</label>
9168
9336
 
9169
- <label for="c-28-components-tabs-stories" class="badge ok as-toggle">8 stories</label>
9337
+ <label for="c-29-components-tabs-stories" class="badge ok as-toggle">8 stories</label>
9170
9338
 
9171
9339
 
9172
9340
  </div>
@@ -9197,10 +9365,10 @@ import { Tabs } from &#39;@agentero/design-system/tabs&#39;;
9197
9365
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
9198
9366
 
9199
9367
 
9200
- <input id="c-28-components-tabs-stories" class="tg tg-stories" type="checkbox" hidden />
9368
+ <input id="c-29-components-tabs-stories" class="tg tg-stories" type="checkbox" hidden />
9201
9369
 
9202
9370
 
9203
- <input id="c-28-components-tabs-props" class="tg tg-props" type="checkbox" hidden />
9371
+ <input id="c-29-components-tabs-props" class="tg tg-props" type="checkbox" hidden />
9204
9372
 
9205
9373
  <div class="panels">
9206
9374
 
@@ -9421,9 +9589,9 @@ tablist role is announced.</div>
9421
9589
  <div class="title">
9422
9590
  <h2><span class="status-dot dot-ok"></span> Tag</h2>
9423
9591
  <div class="badges">
9424
- <label for="c-29-components-tag-props" class="badge ok as-toggle">8 prop types</label>
9592
+ <label for="c-30-components-tag-props" class="badge ok as-toggle">8 prop types</label>
9425
9593
 
9426
- <label for="c-29-components-tag-stories" class="badge ok as-toggle">12 stories</label>
9594
+ <label for="c-30-components-tag-stories" class="badge ok as-toggle">12 stories</label>
9427
9595
 
9428
9596
 
9429
9597
  </div>
@@ -9442,10 +9610,10 @@ it an interactive link or button, which adds the pointer cursor and hover fill.<
9442
9610
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
9443
9611
 
9444
9612
 
9445
- <input id="c-29-components-tag-stories" class="tg tg-stories" type="checkbox" hidden />
9613
+ <input id="c-30-components-tag-stories" class="tg tg-stories" type="checkbox" hidden />
9446
9614
 
9447
9615
 
9448
- <input id="c-29-components-tag-props" class="tg tg-props" type="checkbox" hidden />
9616
+ <input id="c-30-components-tag-props" class="tg tg-props" type="checkbox" hidden />
9449
9617
 
9450
9618
  <div class="panels">
9451
9619
 
@@ -9870,9 +10038,9 @@ leading + trailing icons, and icon-only.</div>
9870
10038
  <div class="title">
9871
10039
  <h2><span class="status-dot dot-ok"></span> TextArea</h2>
9872
10040
  <div class="badges">
9873
- <label for="c-30-components-textarea-props" class="badge ok as-toggle">1 prop type</label>
10041
+ <label for="c-31-components-textarea-props" class="badge ok as-toggle">1 prop type</label>
9874
10042
 
9875
- <label for="c-30-components-textarea-stories" class="badge ok as-toggle">6 stories</label>
10043
+ <label for="c-31-components-textarea-stories" class="badge ok as-toggle">6 stories</label>
9876
10044
 
9877
10045
 
9878
10046
  </div>
@@ -9889,10 +10057,10 @@ states. It wires nothing on its own: `id`, `aria-invalid` and
9889
10057
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
9890
10058
 
9891
10059
 
9892
- <input id="c-30-components-textarea-stories" class="tg tg-stories" type="checkbox" hidden />
10060
+ <input id="c-31-components-textarea-stories" class="tg tg-stories" type="checkbox" hidden />
9893
10061
 
9894
10062
 
9895
- <input id="c-30-components-textarea-props" class="tg tg-props" type="checkbox" hidden />
10063
+ <input id="c-31-components-textarea-props" class="tg tg-props" type="checkbox" hidden />
9896
10064
 
9897
10065
  <div class="panels">
9898
10066
 
@@ -10024,9 +10192,9 @@ size and the minimum height shows three rows.</div>
10024
10192
  <div class="title">
10025
10193
  <h2><span class="status-dot dot-ok"></span> Toast</h2>
10026
10194
  <div class="badges">
10027
- <label for="c-31-components-toast-props" class="badge ok as-toggle">11 prop types</label>
10195
+ <label for="c-32-components-toast-props" class="badge ok as-toggle">11 prop types</label>
10028
10196
 
10029
- <label for="c-31-components-toast-stories" class="badge ok as-toggle">11 stories</label>
10197
+ <label for="c-32-components-toast-stories" class="badge ok as-toggle">11 stories</label>
10030
10198
 
10031
10199
 
10032
10200
  </div>
@@ -10045,10 +10213,10 @@ common feedback patterns.</div>
10045
10213
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
10046
10214
 
10047
10215
 
10048
- <input id="c-31-components-toast-stories" class="tg tg-stories" type="checkbox" hidden />
10216
+ <input id="c-32-components-toast-stories" class="tg tg-stories" type="checkbox" hidden />
10049
10217
 
10050
10218
 
10051
- <input id="c-31-components-toast-props" class="tg tg-props" type="checkbox" hidden />
10219
+ <input id="c-32-components-toast-props" class="tg tg-props" type="checkbox" hidden />
10052
10220
 
10053
10221
  <div class="panels">
10054
10222
 
@@ -10477,9 +10645,9 @@ action (e.g., a sync icon for a sync-in-progress toast).</div>
10477
10645
  <div class="title">
10478
10646
  <h2><span class="status-dot dot-ok"></span> Tooltip</h2>
10479
10647
  <div class="badges">
10480
- <label for="c-32-components-tooltip-props" class="badge ok as-toggle">12 prop types</label>
10648
+ <label for="c-33-components-tooltip-props" class="badge ok as-toggle">12 prop types</label>
10481
10649
 
10482
- <label for="c-32-components-tooltip-stories" class="badge ok as-toggle">5 stories</label>
10650
+ <label for="c-33-components-tooltip-stories" class="badge ok as-toggle">5 stories</label>
10483
10651
 
10484
10652
 
10485
10653
  </div>
@@ -10498,10 +10666,10 @@ on hover or focus.</div>
10498
10666
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
10499
10667
 
10500
10668
 
10501
- <input id="c-32-components-tooltip-stories" class="tg tg-stories" type="checkbox" hidden />
10669
+ <input id="c-33-components-tooltip-stories" class="tg tg-stories" type="checkbox" hidden />
10502
10670
 
10503
10671
 
10504
- <input id="c-32-components-tooltip-props" class="tg tg-props" type="checkbox" hidden />
10672
+ <input id="c-33-components-tooltip-props" class="tg tg-props" type="checkbox" hidden />
10505
10673
 
10506
10674
  <div class="panels">
10507
10675
 
@@ -10673,9 +10841,9 @@ sideOffset?: number = 4</code></pre>
10673
10841
  <div class="title">
10674
10842
  <h2><span class="status-dot dot-ok"></span> ValidationList</h2>
10675
10843
  <div class="badges">
10676
- <label for="c-33-components-validationlist-props" class="badge ok as-toggle">2 prop types</label>
10844
+ <label for="c-34-components-validationlist-props" class="badge ok as-toggle">2 prop types</label>
10677
10845
 
10678
- <label for="c-33-components-validationlist-stories" class="badge ok as-toggle">4 stories</label>
10846
+ <label for="c-34-components-validationlist-stories" class="badge ok as-toggle">4 stories</label>
10679
10847
 
10680
10848
 
10681
10849
  </div>
@@ -10696,10 +10864,10 @@ your form validation; it does not own the input or block submission.</div>
10696
10864
  <!-- ⬇️ Hidden toggles must be siblings BEFORE .panels -->
10697
10865
 
10698
10866
 
10699
- <input id="c-33-components-validationlist-stories" class="tg tg-stories" type="checkbox" hidden />
10867
+ <input id="c-34-components-validationlist-stories" class="tg tg-stories" type="checkbox" hidden />
10700
10868
 
10701
10869
 
10702
- <input id="c-33-components-validationlist-props" class="tg tg-props" type="checkbox" hidden />
10870
+ <input id="c-34-components-validationlist-props" class="tg tg-props" type="checkbox" hidden />
10703
10871
 
10704
10872
  <div class="panels">
10705
10873
 
@@ -6624,6 +6624,112 @@
6624
6624
  ],
6625
6625
  "import": "import {\n Button,\n Divider,\n DropdownMenu,\n Field,\n FieldText,\n IconCancel,\n IconKeyboardArrowDown,\n IconSearch,\n Input,\n InputGroup,\n Label,\n Tag,\n} from \"@agentero/design-system\";"
6626
6626
  },
6627
+ "components-inputpassword": {
6628
+ "id": "components-inputpassword",
6629
+ "name": "InputPassword",
6630
+ "path": "./src/input-password/input-password.stories.tsx",
6631
+ "jsDocTags": {
6632
+ "summary": [
6633
+ "Password input with a show/hide toggle inside the frame"
6634
+ ],
6635
+ "dataAttribute": [
6636
+ "{string} data-slot - Always set to \"input-password\" on the frame"
6637
+ ],
6638
+ "example": [
6639
+ "<FieldText required>\n <Label>Password</Label>\n <InputPassword name=\"password\" autoComplete=\"current-password\" />\n</FieldText>"
6640
+ ]
6641
+ },
6642
+ "description": "InputPassword is a password field with a show/hide toggle at the end of its\nframe. It is an `Input` inside an `InputGroup`: `className` styles the\nframe and every other prop reaches the `<input>`, which takes its label,\nmessages and states from a surrounding `FieldText`. The toggle is not\nrendered while the input is disabled.",
6643
+ "summary": "Password input with a show/hide toggle inside the frame",
6644
+ "reactComponentMeta": {
6645
+ "displayName": "InputPassword",
6646
+ "exportName": "InputPassword",
6647
+ "filePath": "/home/runner/work/design-system/design-system/src/input-password/input-password.tsx",
6648
+ "description": "InputPassword is a password field with a show/hide toggle at the end of its\nframe. The value starts hidden; the toggle reveals it as plain text and\nhides it again. Its accessible name reads \"Show password\" or \"Hide\npassword\", depending on what the next press does. Pressing the toggle keeps\nfocus and the caret in the input. The toggle is not rendered while the input\nis disabled, whether `disabled` comes from the prop, from a surrounding\n`FieldText` or from a `<fieldset disabled>`.\n\nIt is an [Input](?path=/docs/components-input--docs) inside an\n[InputGroup](?path=/docs/components-inputgroup--docs) frame. `className`\nstyles the frame. Every other prop goes to the `<input>`: the `ref`, `id`,\n`name`, `value`, `onChange`, `aria-*` and every other standard attribute,\nsuch as `autoComplete`, `required` or `maxLength`. Only `type` is not\naccepted, because the toggle owns it. Inside a `FieldText` the input takes\nits label, messages and states from the field as a plain `Input` does. The\ninvalid state comes from `aria-invalid`, and the frame paints the\ndestructive border. Set `autoComplete` to `current-password` on sign-in and\n`new-password` when the user picks one, so password managers fill the right\nvalue.\n\nDo not use it for text that is not secret; use `Input` instead. A one-time\ncode is an `Input` with `autoComplete=\"one-time-code\"`, not a password.",
6649
+ "jsDocTags": {
6650
+ "summary": [
6651
+ "Password input with a show/hide toggle inside the frame"
6652
+ ],
6653
+ "dataAttribute": [
6654
+ "{string} data-slot - Always set to \"input-password\" on the frame"
6655
+ ],
6656
+ "example": [
6657
+ "<FieldText required>\n <Label>Password</Label>\n <InputPassword name=\"password\" autoComplete=\"current-password\" />\n</FieldText>"
6658
+ ]
6659
+ },
6660
+ "props": {
6661
+ "size": {
6662
+ "name": "size",
6663
+ "required": false,
6664
+ "type": {
6665
+ "name": "enum",
6666
+ "raw": "\"sm\" | \"md\" | \"lg\"",
6667
+ "value": [
6668
+ {
6669
+ "value": "\"sm\""
6670
+ },
6671
+ {
6672
+ "value": "\"md\""
6673
+ },
6674
+ {
6675
+ "value": "\"lg\""
6676
+ }
6677
+ ]
6678
+ },
6679
+ "description": "Control height. Defaults to `'md'`.\n- `sm` (32px) — dense layouts where vertical space is tight.\n- `md` (40px) — standard form density.\n- `lg` (48px) — low-density forms and larger touch targets. Also raises\n the text to `base` and the corner radius to `lg`.",
6680
+ "defaultValue": null,
6681
+ "parent": {
6682
+ "name": "InputProps",
6683
+ "fileName": "src/input/input.tsx"
6684
+ },
6685
+ "declarations": [
6686
+ {
6687
+ "name": "TypeLiteral",
6688
+ "fileName": "src/input/input.tsx"
6689
+ }
6690
+ ]
6691
+ }
6692
+ }
6693
+ },
6694
+ "stories": [
6695
+ {
6696
+ "id": "components-inputpassword--default",
6697
+ "name": "Default",
6698
+ "snippet": "const Default = () => <InputPassword aria-label=\"Password\" autoComplete=\"current-password\" />;",
6699
+ "description": "The value starts hidden. The toggle shows it as plain text and hides it\nagain; pressing it leaves focus and the caret in the input.",
6700
+ "summary": "Hidden value with a toggle that reveals and hides it"
6701
+ },
6702
+ {
6703
+ "id": "components-inputpassword--disabled",
6704
+ "name": "Disabled",
6705
+ "snippet": "const Disabled = () => <div style={{ display: 'grid', gap: '1rem' }}>\n <InputPassword\n aria-label=\"Password\"\n autoComplete=\"current-password\"\n disabled\n defaultValue=\"hunter22\" />\n <fieldset disabled style={{ border: 0, margin: 0, padding: 0 }}>\n <InputPassword aria-label=\"New password\" autoComplete=\"new-password\" />\n </fieldset>\n</div>;",
6706
+ "description": "A disabled input has no toggle, whether `disabled` is set on the input\nitself or comes from a `<fieldset disabled>` around it.",
6707
+ "summary": "Disabled input with the toggle removed"
6708
+ },
6709
+ {
6710
+ "id": "components-inputpassword--invalid",
6711
+ "name": "Invalid",
6712
+ "snippet": "const Invalid = () => <div style={{ display: 'grid', gap: '1.5rem' }}>\n <InputPassword\n autoComplete=\"current-password\"\n aria-label=\"Valid password\"\n defaultValue=\"hunter22\" />\n <FieldText invalid>\n <Label>Password</Label>\n <InputPassword autoComplete=\"new-password\" defaultValue=\"hunter\" />\n <Field.Error errors={[{ message: 'Use at least 8 characters.' }]} />\n </FieldText>\n</div>;",
6713
+ "description": "`invalid` on the surrounding `FieldText` sets `aria-invalid` on the input,\nwhich paints the frame's destructive border, and `Field.Error` is announced\nwith the input.",
6714
+ "summary": "Invalid field driving the frame's destructive border"
6715
+ },
6716
+ {
6717
+ "id": "components-inputpassword--all-sizes",
6718
+ "name": "All Sizes",
6719
+ "snippet": "const AllSizes = () => <div style={{ display: 'grid', gap: '1rem' }}>\n <InputPassword autoComplete=\"current-password\" size=\"sm\" aria-label=\"Small\" />\n <InputPassword autoComplete=\"current-password\" size=\"md\" aria-label=\"Medium\" />\n <InputPassword autoComplete=\"current-password\" size=\"lg\" aria-label=\"Large\" />\n</div>;",
6720
+ "description": "The three sizes match Input's: the frame is 32, 40 or 48px tall. The toggle\ngrows with it (a 24px button with a 16px icon at `sm`, 32px with 20px at\n`md`, 32px with 24px at `lg`) and sits as far from the right edge as from\nthe top and bottom.",
6721
+ "summary": "The three sizes, with the toggle scaled and evenly inset"
6722
+ },
6723
+ {
6724
+ "id": "components-inputpassword--inside-field-text",
6725
+ "name": "Inside Field Text",
6726
+ "snippet": "const InsideFieldText = () => (\n <div style={{ display: 'grid', gap: '1.5rem' }}>\n <FieldText required>\n <Label>Password</Label>\n <InputPassword autoComplete=\"new-password\" />\n <Field.Description>At least 8 characters.</Field.Description>\n </FieldText>\n <FieldText disabled>\n <Label>Current password</Label>\n <InputPassword autoComplete=\"current-password\" defaultValue=\"hunter22\" />\n </FieldText>\n </div>\n);",
6727
+ "description": "Inside a `FieldText` the input takes its label, description and states from\nthe field through the frame. A disabled field removes the toggle too.",
6728
+ "summary": "Label and disabled state reaching the input through the frame"
6729
+ }
6730
+ ],
6731
+ "import": "import { Field, FieldText, InputPassword, Label } from \"@agentero/design-system\";"
6732
+ },
6627
6733
  "components-input": {
6628
6734
  "id": "components-input",
6629
6735
  "name": "Input",
@@ -9590,6 +9696,6 @@
9590
9696
  },
9591
9697
  "meta": {
9592
9698
  "docgen": "react-component-meta",
9593
- "durationMs": 4877
9699
+ "durationMs": 4742
9594
9700
  }
9595
9701
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentero/design-system",
3
- "version": "0.32.2",
3
+ "version": "0.33.0",
4
4
  "description": "A React component library built with Tailwind CSS v4 and Radix UI primitives",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -97,6 +97,10 @@
97
97
  "types": "./src/input-group/index.d.ts",
98
98
  "import": "./src/input-group/index.js"
99
99
  },
100
+ "./input-password": {
101
+ "types": "./src/input-password/index.d.ts",
102
+ "import": "./src/input-password/index.js"
103
+ },
100
104
  "./label": {
101
105
  "types": "./src/label/index.d.ts",
102
106
  "import": "./src/label/index.js"
@@ -0,0 +1,16 @@
1
+ import { SVGProps } from 'react';
2
+ /**
3
+ * Open eye on the InputPassword toggle while the value is hidden. Fill color
4
+ * comes from the input group addon, so the icon follows the field's state.
5
+ *
6
+ * @summary 24px open-eye icon on the show-password toggle
7
+ */
8
+ export declare const IconVisibility: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
9
+ /**
10
+ * Struck-through eye on the InputPassword toggle while the value is shown.
11
+ * Fill color comes from the input group addon, so the icon follows the
12
+ * field's state.
13
+ *
14
+ * @summary 24px crossed-eye icon on the hide-password toggle
15
+ */
16
+ export declare const IconVisibilityOff: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ //#region src/input-password/icons.tsx
3
+ var t = (t) => /* @__PURE__ */ e("svg", {
4
+ width: "24",
5
+ height: "24",
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ "aria-hidden": "true",
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ ...t,
11
+ children: /* @__PURE__ */ e("path", { d: "M12.0023 15.5769C13.1354 15.5769 14.0978 15.1803 14.8895 14.3871C15.6811 13.5939 16.077 12.6308 16.077 11.4977C16.077 10.3646 15.6804 9.40224 14.8872 8.61058C14.094 7.81891 13.1309 7.42308 11.9978 7.42308C10.8647 7.42308 9.90233 7.81966 9.11066 8.61282C8.31899 9.40601 7.92316 10.3692 7.92316 11.5023C7.92316 12.6353 8.31974 13.5977 9.11291 14.3894C9.90609 15.181 10.8692 15.5769 12.0023 15.5769ZM12.0001 14.2C11.2501 14.2 10.6126 13.9375 10.0876 13.4125C9.56256 12.8875 9.30006 12.25 9.30006 11.5C9.30006 10.75 9.56256 10.1125 10.0876 9.58748C10.6126 9.06248 11.2501 8.79998 12.0001 8.79998C12.7501 8.79998 13.3876 9.06248 13.9126 9.58748C14.4376 10.1125 14.7001 10.75 14.7001 11.5C14.7001 12.25 14.4376 12.8875 13.9126 13.4125C13.3876 13.9375 12.7501 14.2 12.0001 14.2ZM12.0001 18.5C9.81161 18.5 7.80553 17.9243 5.98181 16.773C4.15811 15.6217 2.76741 14.0653 1.80971 12.1038C1.76613 12.0269 1.736 11.9353 1.71934 11.8292C1.70267 11.723 1.69434 11.6132 1.69434 11.5C1.69434 11.3867 1.70267 11.277 1.71934 11.1708C1.736 11.0646 1.76613 10.9731 1.80971 10.8961C2.76741 8.93461 4.15811 7.37821 5.98181 6.22693C7.80553 5.07564 9.81161 4.5 12.0001 4.5C14.1885 4.5 16.1946 5.07564 18.0183 6.22693C19.842 7.37821 21.2327 8.93461 22.1904 10.8961C22.234 10.9731 22.2641 11.0646 22.2808 11.1708C22.2975 11.277 22.3058 11.3867 22.3058 11.5C22.3058 11.6132 22.2975 11.723 22.2808 11.8292C22.2641 11.9353 22.234 12.0269 22.1904 12.1038C21.2327 14.0653 19.842 15.6217 18.0183 16.773C16.1946 17.9243 14.1885 18.5 12.0001 18.5ZM12.0001 17C13.8834 17 15.6126 16.5041 17.1876 15.5125C18.7626 14.5208 19.9667 13.1833 20.8001 11.5C19.9667 9.81664 18.7626 8.47914 17.1876 7.48748C15.6126 6.49581 13.8834 5.99998 12.0001 5.99998C10.1167 5.99998 8.38756 6.49581 6.81256 7.48748C5.23756 8.47914 4.03339 9.81664 3.20006 11.5C4.03339 13.1833 5.23756 14.5208 6.81256 15.5125C8.38756 16.5041 10.1167 17 12.0001 17Z" })
12
+ }), n = (t) => /* @__PURE__ */ e("svg", {
13
+ width: "24",
14
+ height: "24",
15
+ viewBox: "0 0 24 24",
16
+ fill: "none",
17
+ "aria-hidden": "true",
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ ...t,
20
+ children: /* @__PURE__ */ e("path", { d: "M15.7731 12.9731L14.6501 11.85C14.8001 11.0218 14.5638 10.2772 13.9414 9.61636C13.319 8.95546 12.5552 8.70001 11.6501 8.85001L10.527 7.72696C10.7526 7.62568 10.9841 7.54972 11.2212 7.49909C11.4584 7.44844 11.718 7.42311 12.0001 7.42311C13.1347 7.42311 14.0978 7.81895 14.8895 8.61061C15.6811 9.40228 16.077 10.3654 16.077 11.5C16.077 11.7821 16.0516 12.0449 16.001 12.2885C15.9504 12.532 15.8744 12.7602 15.7731 12.9731ZM18.9539 16.0846L17.8501 15.05C18.4834 14.5667 19.0459 14.0375 19.5376 13.4625C20.0292 12.8875 20.4501 12.2333 20.8001 11.5C19.9667 9.81668 18.7709 8.47918 17.2126 7.48751C15.6542 6.49585 13.9167 6.00001 12.0001 6.00001C11.5167 6.00001 11.0417 6.03335 10.5751 6.10001C10.1084 6.16668 9.65006 6.26668 9.20006 6.40001L8.03471 5.23466C8.66676 4.98338 9.31227 4.79812 9.97124 4.67889C10.6302 4.55965 11.3065 4.50004 12.0001 4.50004C14.2231 4.50004 16.2462 5.08914 18.0693 6.26734C19.8923 7.44554 21.266 8.98848 22.1904 10.8962C22.234 10.9731 22.2641 11.0644 22.2808 11.1702C22.2975 11.276 22.3058 11.3859 22.3058 11.5C22.3058 11.6141 22.2949 11.724 22.2731 11.8298C22.2513 11.9356 22.2237 12.0269 22.1904 12.1039C21.8199 12.8833 21.3632 13.6074 20.8202 14.276C20.2773 14.9445 19.6552 15.5474 18.9539 16.0846ZM19.2347 21.3423L15.7155 17.8538C15.2026 18.0436 14.6344 18.1987 14.0107 18.3192C13.3869 18.4397 12.7167 18.5 12.0001 18.5C9.76418 18.5 7.7395 17.9109 5.92604 16.7327C4.11259 15.5545 2.74048 14.0115 1.80971 12.1039C1.76613 12.0269 1.736 11.9356 1.71934 11.8298C1.70267 11.724 1.69434 11.6141 1.69434 11.5C1.69434 11.3859 1.70267 11.2785 1.71934 11.1779C1.736 11.0773 1.76613 10.9885 1.80971 10.9116C2.18536 10.1423 2.64049 9.43143 3.17511 8.77886C3.70973 8.1263 4.28473 7.54617 4.90011 7.03849L2.64241 4.76539C2.50394 4.62692 2.43311 4.45545 2.42991 4.25099C2.42671 4.0465 2.50267 3.86669 2.65779 3.71156C2.80265 3.56669 2.97829 3.49426 3.18471 3.49426C3.39111 3.49426 3.56674 3.56669 3.71161 3.71156L20.2885 20.2885C20.427 20.4269 20.5004 20.5984 20.5087 20.8029C20.517 21.0073 20.4436 21.1872 20.2885 21.3423C20.1436 21.4872 19.968 21.5596 19.7616 21.5596C19.5552 21.5596 19.3796 21.4872 19.2347 21.3423ZM5.95394 8.09229C5.42574 8.5128 4.91195 9.01826 4.41259 9.60866C3.91322 10.199 3.50904 10.8295 3.20006 11.5C4.03339 13.1833 5.22923 14.5208 6.78756 15.5125C8.34589 16.5042 10.0834 17 12.0001 17C12.4552 17 12.9084 16.9615 13.3597 16.8846C13.811 16.8077 14.1937 16.7282 14.5078 16.6462L13.2424 15.35C13.0719 15.4192 12.8744 15.4743 12.6501 15.5154C12.4257 15.5564 12.209 15.5769 12.0001 15.5769C10.8655 15.5769 9.90233 15.1811 9.11066 14.3894C8.31899 13.5977 7.92316 12.6346 7.92316 11.5C7.92316 11.2974 7.94368 11.0856 7.98471 10.8644C8.02574 10.6433 8.08087 10.441 8.15009 10.2577L5.95394 8.09229Z" })
21
+ });
22
+ //#endregion
23
+ export { t as IconVisibility, n as IconVisibilityOff };
@@ -0,0 +1,2 @@
1
+ export { InputPassword, inputPasswordRecipe } from './input-password';
2
+ export type { InputPasswordProps } from './input-password';
@@ -0,0 +1,2 @@
1
+ import { InputPassword as e, inputPasswordRecipe as t } from "./input-password.js";
2
+ export { e as InputPassword, t as inputPasswordRecipe };
@@ -0,0 +1,103 @@
1
+ import { InputProps } from '../input';
2
+ /**
3
+ * Style recipe for InputPassword. Slots: `toggle` (the addon holding the
4
+ * button) and `button`. The `size` variant follows the input's: the button is
5
+ * 24px at `sm` and 32px above, the icon 16, 20 or 24px, and a negative end
6
+ * margin pulls the addon into the frame's padding so the button sits as far
7
+ * from the right edge as from the top and bottom (4px, 8px at `lg`).
8
+ *
9
+ * @summary tailwind-variants recipe backing the InputPassword toggle
10
+ */
11
+ export declare const inputPasswordRecipe: import('tailwind-variants').TVReturnType<{
12
+ size: {
13
+ sm: {
14
+ toggle: string;
15
+ button: string;
16
+ };
17
+ md: {
18
+ toggle: string;
19
+ button: string;
20
+ };
21
+ lg: {
22
+ toggle: string;
23
+ button: string;
24
+ };
25
+ };
26
+ }, {
27
+ toggle: string;
28
+ button: string;
29
+ }, undefined, {
30
+ size: {
31
+ sm: {
32
+ toggle: string;
33
+ button: string;
34
+ };
35
+ md: {
36
+ toggle: string;
37
+ button: string;
38
+ };
39
+ lg: {
40
+ toggle: string;
41
+ button: string;
42
+ };
43
+ };
44
+ }, {
45
+ toggle: string;
46
+ button: string;
47
+ }, import('tailwind-variants').TVReturnType<{
48
+ size: {
49
+ sm: {
50
+ toggle: string;
51
+ button: string;
52
+ };
53
+ md: {
54
+ toggle: string;
55
+ button: string;
56
+ };
57
+ lg: {
58
+ toggle: string;
59
+ button: string;
60
+ };
61
+ };
62
+ }, {
63
+ toggle: string;
64
+ button: string;
65
+ }, undefined, unknown, unknown, undefined>>;
66
+ export type InputPasswordProps = Omit<InputProps, 'type'>;
67
+ /**
68
+ * InputPassword is a password field with a show/hide toggle at the end of its
69
+ * frame. The value starts hidden; the toggle reveals it as plain text and
70
+ * hides it again. Its accessible name reads "Show password" or "Hide
71
+ * password", depending on what the next press does. Pressing the toggle keeps
72
+ * focus and the caret in the input. The toggle is not rendered while the input
73
+ * is disabled, whether `disabled` comes from the prop, from a surrounding
74
+ * `FieldText` or from a `<fieldset disabled>`.
75
+ *
76
+ * It is an [Input](?path=/docs/components-input--docs) inside an
77
+ * [InputGroup](?path=/docs/components-inputgroup--docs) frame. `className`
78
+ * styles the frame. Every other prop goes to the `<input>`: the `ref`, `id`,
79
+ * `name`, `value`, `onChange`, `aria-*` and every other standard attribute,
80
+ * such as `autoComplete`, `required` or `maxLength`. Only `type` is not
81
+ * accepted, because the toggle owns it. Inside a `FieldText` the input takes
82
+ * its label, messages and states from the field as a plain `Input` does. The
83
+ * invalid state comes from `aria-invalid`, and the frame paints the
84
+ * destructive border. Set `autoComplete` to `current-password` on sign-in and
85
+ * `new-password` when the user picks one, so password managers fill the right
86
+ * value.
87
+ *
88
+ * Do not use it for text that is not secret; use `Input` instead. A one-time
89
+ * code is an `Input` with `autoComplete="one-time-code"`, not a password.
90
+ *
91
+ * @summary Password input with a show/hide toggle inside the frame
92
+ * @dataAttribute {string} data-slot - Always set to "input-password" on the frame
93
+ *
94
+ * @example
95
+ * <FieldText required>
96
+ * <Label>Password</Label>
97
+ * <InputPassword name="password" autoComplete="current-password" />
98
+ * </FieldText>
99
+ */
100
+ export declare const InputPassword: {
101
+ ({ className, size, ...props }: InputPasswordProps): import("react/jsx-runtime").JSX.Element;
102
+ displayName: string;
103
+ };
@@ -0,0 +1,57 @@
1
+ "use client";
2
+ import { Button as e } from "../button/button.js";
3
+ import { Input as t } from "../input/input.js";
4
+ import { InputGroup as n } from "../input-group/index.js";
5
+ import { IconVisibility as r, IconVisibilityOff as i } from "./icons.js";
6
+ import { tv as a } from "tailwind-variants";
7
+ import { useState as o } from "react";
8
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
+ //#region src/input-password/input-password.tsx
10
+ var l = a({
11
+ slots: {
12
+ toggle: "group-has-[input:disabled]/input-group:hidden",
13
+ button: "[&_svg]:mx-0"
14
+ },
15
+ variants: { size: {
16
+ sm: {
17
+ toggle: "-me-2.25",
18
+ button: "rounded-sm [&_svg]:size-4"
19
+ },
20
+ md: {
21
+ toggle: "-me-2.25",
22
+ button: "rounded-sm [&_svg]:size-5"
23
+ },
24
+ lg: {
25
+ toggle: "-me-1.25",
26
+ button: "[&_svg]:size-6"
27
+ }
28
+ } },
29
+ defaultVariants: { size: "md" }
30
+ }), u = ({ className: a, size: u, ...d }) => {
31
+ let [f, p] = o("password"), m = f === "password", h = l({ size: u });
32
+ return /* @__PURE__ */ c(n.Root, {
33
+ "data-slot": "input-password",
34
+ className: a,
35
+ children: [/* @__PURE__ */ s(t, {
36
+ ...d,
37
+ size: u,
38
+ type: f
39
+ }), /* @__PURE__ */ s(n.Addon, {
40
+ className: h.toggle(),
41
+ children: /* @__PURE__ */ s(e, {
42
+ type: "button",
43
+ variant: "ghost",
44
+ iconOnly: !0,
45
+ size: u === "sm" ? "xs" : "sm",
46
+ className: h.button(),
47
+ "aria-label": m ? "Show password" : "Hide password",
48
+ onMouseDown: (e) => e.preventDefault(),
49
+ onClick: () => p(m ? "text" : "password"),
50
+ children: s(m ? r : i, {})
51
+ })
52
+ })]
53
+ });
54
+ };
55
+ u.displayName = "InputPassword";
56
+ //#endregion
57
+ export { u as InputPassword, l as inputPasswordRecipe };