@agentero/design-system 0.31.1 → 0.31.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">33 components ok</span><span class="filter-pill ok" aria-disabled="true">263 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">33 components ok</span><span class="filter-pill ok" aria-disabled="true">264 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.4s</strong>.
597
+ Using <code>react-component-meta</code>. Generation took <strong>3.2s</strong>.
598
598
  </div>
599
599
  <h2 class="section-title">Components</h2>
600
600
  <div class="grid" role="list">
@@ -8084,7 +8084,7 @@ size?: &quot;sm&quot; | &quot;md&quot;</code></pre>
8084
8084
  <div class="badges">
8085
8085
  <label for="c-26-components-table-props" class="badge ok as-toggle">6 prop types</label>
8086
8086
 
8087
- <label for="c-26-components-table-stories" class="badge ok as-toggle">9 stories</label>
8087
+ <label for="c-26-components-table-stories" class="badge ok as-toggle">10 stories</label>
8088
8088
 
8089
8089
 
8090
8090
  </div>
@@ -8154,7 +8154,7 @@ sticky?: &quot;header&quot; | &quot;headerAndFooter&quot;</code></pre>
8154
8154
  <div class="row">
8155
8155
  <span class="ex-name">Imports</span>
8156
8156
  </div>
8157
- <pre><code>import { Button, Table } from "@agentero/design-system";
8157
+ <pre><code>import { Button, Switch, Table } from "@agentero/design-system";
8158
8158
  import { Fragment } from "react";</code></pre>
8159
8159
  </div>
8160
8160
 
@@ -8232,6 +8232,31 @@ import { Fragment } from "react";</code></pre>
8232
8232
  <div class="hint">A leading checkbox column; checkbox cells collapse to zero width.</div>
8233
8233
  <pre><code>const WithCheckbox = args =&gt; renderTable(args, { checkbox: true });</code></pre>
8234
8234
  </div>
8235
+ <div class="note ok">
8236
+ <div class="row">
8237
+ <span class="ex-name">With Switch</span>
8238
+ <span class="badge ok">story ok</span>
8239
+ </div>
8240
+ <div>A cell holding a Switch keeps its padding</div>
8241
+ <div class="hint">A Switch renders a hidden checkbox so a form can read its value without JS.
8242
+ Radix keeps it while the Switch sits in a form, and on the server render
8243
+ before hydration. A cell holding a Switch is not a selection column, so it
8244
+ keeps its padding.</div>
8245
+ <pre><code>const WithSwitch = () =&gt; &lt;form&gt;
8246
+ &lt;Table.Root size=&quot;md&quot; embed={false}&gt;
8247
+ &lt;Table.Body&gt;
8248
+ {ROWS.slice(0, 3).map(row =&gt; (
8249
+ &lt;Table.Row key={row.id}&gt;
8250
+ &lt;Table.Cell&gt;{row.name}&lt;/Table.Cell&gt;
8251
+ &lt;Table.Cell&gt;
8252
+ &lt;Switch size=&quot;sm&quot; defaultChecked aria-label={`Notify ${row.name}`} /&gt;
8253
+ &lt;/Table.Cell&gt;
8254
+ &lt;/Table.Row&gt;
8255
+ ))}
8256
+ &lt;/Table.Body&gt;
8257
+ &lt;/Table.Root&gt;
8258
+ &lt;/form&gt;;</code></pre>
8259
+ </div>
8235
8260
  <div class="note ok">
8236
8261
  <div class="row">
8237
8262
  <span class="ex-name">With Row Actions</span>
@@ -7923,6 +7923,13 @@
7923
7923
  "description": "A leading checkbox column; checkbox cells collapse to zero width.",
7924
7924
  "summary": "Selectable rows with a collapsing checkbox column"
7925
7925
  },
7926
+ {
7927
+ "id": "components-table--with-switch",
7928
+ "name": "With Switch",
7929
+ "snippet": "const WithSwitch = () => <form>\n <Table.Root size=\"md\" embed={false}>\n <Table.Body>\n {ROWS.slice(0, 3).map(row => (\n <Table.Row key={row.id}>\n <Table.Cell>{row.name}</Table.Cell>\n <Table.Cell>\n <Switch size=\"sm\" defaultChecked aria-label={`Notify ${row.name}`} />\n </Table.Cell>\n </Table.Row>\n ))}\n </Table.Body>\n </Table.Root>\n</form>;",
7930
+ "description": "A Switch renders a hidden checkbox so a form can read its value without JS.\nRadix keeps it while the Switch sits in a form, and on the server render\nbefore hydration. A cell holding a Switch is not a selection column, so it\nkeeps its padding.",
7931
+ "summary": "A cell holding a Switch keeps its padding"
7932
+ },
7926
7933
  {
7927
7934
  "id": "components-table--with-row-actions",
7928
7935
  "name": "With Row Actions",
@@ -7938,7 +7945,7 @@
7938
7945
  "summary": "Expandable rows with a detail panel"
7939
7946
  }
7940
7947
  ],
7941
- "import": "import { Button, Table } from \"@agentero/design-system\";\nimport { Fragment } from \"react\";"
7948
+ "import": "import { Button, Switch, Table } from \"@agentero/design-system\";\nimport { Fragment } from \"react\";"
7942
7949
  },
7943
7950
  "components-tabs": {
7944
7951
  "id": "components-tabs",
@@ -9407,6 +9414,6 @@
9407
9414
  },
9408
9415
  "meta": {
9409
9416
  "docgen": "react-component-meta",
9410
- "durationMs": 4426
9417
+ "durationMs": 3231
9411
9418
  }
9412
9419
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentero/design-system",
3
- "version": "0.31.1",
3
+ "version": "0.31.2",
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",
@@ -6,7 +6,7 @@ import { tv as r } from "tailwind-variants";
6
6
  import { createContext as i, use as a } from "react";
7
7
  import { jsx as o } from "react/jsx-runtime";
8
8
  //#region src/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 = r({
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]:not([aria-hidden])]:w-0 has-[[type=checkbox]:not([aria-hidden])]: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",