@wirecore/wirelayer-react 0.12.2 → 0.13.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.
Files changed (54) hide show
  1. package/dist/{Button-Cd7lufvJ.js → Button-D_ctSYR-.js} +1 -1
  2. package/dist/{Checkbox-BMRax6m4.js → Checkbox-DXiff9X7.js} +1 -1
  3. package/dist/{ContextMenu-Bz723GfL.js → ContextMenu-Z23QyLFn.js} +408 -370
  4. package/dist/{CopyButton-C_LAuCkR.js → CopyButton-Dr_QrMYf.js} +2 -2
  5. package/dist/{Field-DkYxlVar.js → Field-DFh-zcjr.js} +3 -3
  6. package/dist/{Highlight-43-H9459.js → Highlight-CpYN310r.js} +1 -1
  7. package/dist/{Input-CtYSQznO.js → Input-D8lXkJcv.js} +4 -4
  8. package/dist/PasswordInput-DQIzdTGq.js +452 -0
  9. package/dist/{RecipesProvider-0idafuGm.js → RecipesProvider-COODXvxz.js} +8 -1
  10. package/dist/{Select-CGyqfOm3.js → Select-E_geb3hU.js} +5 -5
  11. package/dist/{Slider-Bfm_jjYE.js → Slider-BFGCHR5_.js} +3 -3
  12. package/dist/{Tree-DLHbcH3-.js → Tree-BDYg4j6i.js} +128 -128
  13. package/dist/chart.js +2 -2
  14. package/dist/code.js +14 -14
  15. package/dist/components/Confirm/ConfirmDialog.d.ts.map +1 -1
  16. package/dist/components/Confirm/confirm.d.ts +5 -0
  17. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  18. package/dist/components/Dialog/Dialog.d.ts +12 -3
  19. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  20. package/dist/components/DialogService/DialogHost.d.ts.map +1 -1
  21. package/dist/components/DialogService/dialogs.d.ts +5 -0
  22. package/dist/components/DialogService/dialogs.d.ts.map +1 -1
  23. package/dist/components/Drawer/Drawer.d.ts +10 -2
  24. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  25. package/dist/components/NotificationCenter/NotificationCenter.d.ts +8 -2
  26. package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -1
  27. package/dist/components/RecipesProvider/RecipesProvider.d.ts +6 -0
  28. package/dist/components/RecipesProvider/RecipesProvider.d.ts.map +1 -1
  29. package/dist/data-table/DataTable.d.ts +26 -7
  30. package/dist/data-table/DataTable.d.ts.map +1 -1
  31. package/dist/data-table/FilterMenu.d.ts.map +1 -1
  32. package/dist/data-table/ValueInput.d.ts +5 -1
  33. package/dist/data-table/ValueInput.d.ts.map +1 -1
  34. package/dist/data-table/features.d.ts +10 -0
  35. package/dist/data-table/features.d.ts.map +1 -1
  36. package/dist/data-table/index.d.ts +1 -1
  37. package/dist/data-table/index.d.ts.map +1 -1
  38. package/dist/data-table/inputs.d.ts +5 -0
  39. package/dist/data-table/inputs.d.ts.map +1 -1
  40. package/dist/data-table/types.d.ts +3 -0
  41. package/dist/data-table/types.d.ts.map +1 -1
  42. package/dist/data-table.js +1150 -1083
  43. package/dist/editor.js +4 -4
  44. package/dist/form.js +10 -10
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +2088 -2111
  48. package/dist/pdf.js +7 -7
  49. package/dist/sources/dateRangeInput.css +3 -0
  50. package/dist/virtual.js +7 -7
  51. package/llms-full.txt +76 -15
  52. package/llms.txt +1 -0
  53. package/package.json +3 -3
  54. package/dist/PasswordInput-CxZXGV2m.js +0 -449
package/dist/pdf.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { a as e, i as t, n } from "./RecipesProvider-0idafuGm.js";
3
- import { t as r } from "./Button-Cd7lufvJ.js";
4
- import { t as i } from "./Field-DkYxlVar.js";
5
- import { n as a, t as o } from "./Select-CGyqfOm3.js";
6
- import { c as s, i as c, l, n as u, s as d, t as ee, u as te } from "./PasswordInput-CxZXGV2m.js";
7
- import { t as ne } from "./Tree-DLHbcH3-.js";
2
+ import { a as e, n as t, o as n } from "./RecipesProvider-COODXvxz.js";
3
+ import { t as r } from "./Button-D_ctSYR-.js";
4
+ import { t as i } from "./Field-DFh-zcjr.js";
5
+ import { n as a, t as o } from "./Select-E_geb3hU.js";
6
+ import { c as s, i as c, l, n as u, s as d, t as ee, u as te } from "./PasswordInput-DQIzdTGq.js";
7
+ import { t as ne } from "./Tree-BDYg4j6i.js";
8
8
  import { PDF_ZOOM_MAX as re, PDF_ZOOM_MIN as ie, clampPdfPage as ae, clampPdfZoom as f, downloadBytes as p, input as oe, normalizePdfRotation as m, parsePdfPage as se, pdfFileName as ce, pdfKeyAction as le, pdfPrintDocument as ue, pdfSearchText as de, pdfThumbnailSize as fe, pdfTools as h, pdfViewer as pe, pdfZoomFromKey as me, pdfZoomKey as he, pdfZoomStep as g, pdfZoomSteps as _, pdfZoomSteps as v, resolvePdfTools as ge, setupToolbar as _e } from "@wirecore/wirelayer-recipes";
9
9
  import { CaseSensitive as ve, ChevronDown as ye, ChevronUp as be, Download as xe, FileWarning as Se, Maximize as Ce, Minimize as we, PanelLeft as Te, Printer as Ee, RotateCw as De, Search as Oe, X as ke, ZoomIn as Ae, ZoomOut as je } from "lucide-react";
10
10
  import { useEffect as y, useId as Me, useImperativeHandle as Ne, useRef as b, useState as x } from "react";
@@ -368,7 +368,7 @@ function O(e) {
368
368
  //#region src/pdf/PdfViewer.tsx
369
369
  var He = 120;
370
370
  function k({ src: f, page: p = 1, onPageChange: ue, zoom: h = "page-width", onZoomChange: g, rotation: _ = 0, onRotationChange: T, sidebar: Ie, onSidebarChange: Le, toolbar: Re = !0, height: E = "600px", label: ze, fileName: D, workerSrc: Ve, cMapUrl: O, standardFontDataUrl: k, textLayer: A = !0, annotationLayer: j = !0, onLoaded: Ue, onError: We, classes: Ge, className: Ke, style: qe, onKeyDown: Je, ref: Ye, ...Xe }) {
371
- let M = n("pdfViewer", pe, Ge)(), Ze = oe({ size: "sm" }), Qe = e(), N = Qe.pdfViewer, { locale: $e } = t(), P = Me(), F = new Set(ge(Re)), [I, et] = x(() => Fe(h, _, p)), L = I.status === "ready", R = b(null), tt = b(null), nt = b(null), rt = b(null), z = b(null), B = b(I), V = b({
371
+ let M = t("pdfViewer", pe, Ge)(), Ze = oe({ size: "sm" }), Qe = n(), N = Qe.pdfViewer, { locale: $e } = e(), P = Me(), F = new Set(ge(Re)), [I, et] = x(() => Fe(h, _, p)), L = I.status === "ready", R = b(null), tt = b(null), nt = b(null), rt = b(null), z = b(null), B = b(I), V = b({
372
372
  page: p,
373
373
  zoom: h,
374
374
  rotation: _,
@@ -0,0 +1,3 @@
1
+ /* Classes of dateRangeInput – generated by scripts/sources.ts, do not edit */
2
+ @import '@wirecore/wirelayer-recipes/sources/datePicker.css';
3
+ @import '@wirecore/wirelayer-recipes/sources/numberInput.css';
package/dist/virtual.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { a as e, n as t } from "./RecipesProvider-0idafuGm.js";
3
- import { a as n, c as r, o as i, s as a } from "./Highlight-43-H9459.js";
4
- import { i as o, n as s, o as c, r as l, s as u } from "./Tree-DLHbcH3-.js";
2
+ import { n as e, o as t } from "./RecipesProvider-COODXvxz.js";
3
+ import { a as n, c as r, o as i, s as a } from "./Highlight-CpYN310r.js";
4
+ import { i as o, n as s, o as c, r as l, s as u } from "./Tree-BDYg4j6i.js";
5
5
  import { controlIds as d, flattenTree as ee, select as f, tree as te, virtualList as p, virtualListBox as ne } from "@wirecore/wirelayer-recipes";
6
6
  import { Check as m, ChevronDown as h, LoaderCircle as g, X as re } from "lucide-react";
7
7
  import { useEffect as _, useId as v, useImperativeHandle as y, useMemo as b, useRef as x, useState as ie } from "react";
@@ -14,10 +14,10 @@ import { TreeView as O } from "@ark-ui/react/tree-view";
14
14
  import { defaultRangeExtractor as k, useVirtualizer as A } from "@tanstack/react-virtual";
15
15
  //#region src/virtual/VirtualSelect.tsx
16
16
  function j({ items: a, value: o, defaultValue: s, onValueChange: c, placeholder: l, disabled: u, invalid: ee, required: te, name: ne, itemValue: y, itemLabel: O, itemDisabled: k, valueKey: j, clearable: M, loading: N, loadingText: P, size: F, filter: I, manualFilter: L, onFilterChange: R, emptyText: z, hasMore: B, onLoadMore: V, dataSource: H, pageSize: U, minSearchLength: W, id: G, className: K, style: se, onKeyDown: ce, ...le }) {
17
- let ue = t("select", f), de = t("virtualList", p), q = ue({
17
+ let ue = e("select", f), de = e("virtualList", p), q = ue({
18
18
  size: F,
19
19
  clearable: M
20
- }), fe = de(), pe = T(), J = e(), me = J.select, he = {
20
+ }), fe = de(), pe = T(), J = t(), me = J.select, he = {
21
21
  itemValue: y,
22
22
  itemLabel: O,
23
23
  itemDisabled: k,
@@ -229,7 +229,7 @@ var oe = () => void 0;
229
229
  //#endregion
230
230
  //#region src/virtual/VirtualList.tsx
231
231
  function M({ items: n = [], label: r, itemHeight: i = 40, estimateSize: o, height: s = "20rem", itemGroup: c, hasMore: l = !1, loading: u = !1, loadingMore: d = !1, endThreshold: ee = 5, onLoadMore: f, onEndReached: te, dataSource: p, query: m, pageSize: h, children: re, className: v, style: ie, ref: ae, ...T }) {
232
- let E = t("virtualListBox", ne)(), D = e(), O = x(null), { search: j, ...oe } = m ?? {}, M = a({
232
+ let E = e("virtualListBox", ne)(), D = t(), O = x(null), { search: j, ...oe } = m ?? {}, M = a({
233
233
  source: p,
234
234
  pageSize: h,
235
235
  query: m ? oe : void 0
@@ -350,7 +350,7 @@ function N(e, t = 6) {
350
350
  });
351
351
  }
352
352
  function P({ classes: n, items: r, label: i, "aria-label": a, selectionMode: f = "single", checkable: p = !1, checkStrictly: ne = !1, checkedValue: m, defaultCheckedValue: h, reorderable: re = !1, filter: _ = !1, filterMode: v = "filter", expandControls: ie = !1, renderNode: S, emptyText: ae, empty: T, height: E = "20rem", itemHeight: D = 32, className: k, style: j, ref: oe, ...M }) {
353
- let P = t("tree", te, n)(), F = e(), I = F.tree, L = x(null), R = x(null), z = u({
353
+ let P = e("tree", te, n)(), F = t(), I = F.tree, L = x(null), R = x(null), z = u({
354
354
  ...M,
355
355
  items: r,
356
356
  checkable: p,
package/llms-full.txt CHANGED
@@ -1481,7 +1481,9 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1481
1481
  | advancedFilterValue? | `ConditionGroup` | The condition tree of the advanced filter (controlled together with onAdvancedFilterValueChange) |
1482
1482
  | onAdvancedFilterValueChange? | `(value: ConditionGroup) => void` | |
1483
1483
  | renderAdvancedFilter? | `(props: DataTableAdvancedFilterProps) => ReactNode` | The editor of the advanced filter, e.g. `(props) => <ConditionBuilder {...props} />` with ConditionBuilder from `@wirecore/wirelayer-blocks-react`: gets the fields, the tree, the setter and the label of the panel |
1484
+ | sortable? | `boolean` | Every column with a value can be sorted, unless the column sets `sortable: false`; columns without a value (only a slot, e.g. actions) stay out. App-wide: `dataTable: { defaultVariants: { sortable: true } }` |
1484
1485
  | search? | `boolean` | Search field above the table: filters over all columns |
1486
+ | searchAlign? | `'start' \| 'center'` | Place of the search field: `start` (default) after the controls of the toolbar start, `center` in the middle between them and the controls at the end. App-wide: `dataTable: { defaultVariants: { searchCentered: true } }` |
1485
1487
  | globalFilter? | `string` | |
1486
1488
  | onGlobalFilterChange? | `(value: string) => void` | |
1487
1489
  | rowKeywords? | `(row: TData) => string \| readonly string[] \| null \| undefined` | More text the search finds a row by, besides its columns – e.g. fields without a column of their own (not in server mode: there the server searches) |
@@ -1489,7 +1491,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1489
1491
  | filters? | `Record<string, DataTableFilterValue>` | Column filters by column id; controlled together with onFiltersChange |
1490
1492
  | onFiltersChange? | `(filters: Record<string, DataTableFilterValue>) => void` | |
1491
1493
  | filterDisplay? | `'row' \| 'menu' \| 'none'` | Filters in a row below the headers, as a menu per column with match modes and conditions, or none |
1492
- | showFilters? | `boolean` | Shows the filter row or menus (`filterToggle`); controlled with onShowFiltersChange – the filters keep working |
1494
+ | showFilters? | `boolean` | Shows the filter row or menus (`filterToggle`); controlled with onShowFiltersChange – the filters keep working. Default true; app-wide `dataTable: { defaultVariants: { showFilters: false } }`, a saved state (`stateKey`) wins |
1493
1495
  | onShowFiltersChange? | `(show: boolean) => void` | |
1494
1496
  | filterToggle? | `boolean` | Button in the toolbar that shows and hides the filters |
1495
1497
  | filterReset? | `boolean` | Button in the toolbar that clears the column filters, the search and the advanced filter (`resetFilters()`) |
@@ -1537,9 +1539,10 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1537
1539
  | densityToggle? | `boolean` | Menu above the table to change the row height |
1538
1540
  | gridlines? | `boolean` | Lines between the columns |
1539
1541
  | bordered? | `boolean` | A border around the whole table |
1540
- | striped? | `boolean` | Every other row tinted |
1542
+ | striped? | `boolean` | Every other row tinted (app-wide: `dataTable: { defaultVariants: { striped: true } }`) |
1541
1543
  | fullscreenToggle? | `boolean` | Button above the table to show it on the whole screen |
1542
- | scrollHeight? | `string` | Fixed height (CSS length): the table scrolls inside, header and footer stay visible |
1544
+ | scrollHeight? | `string` | Height of the scroll area: a CSS length (its maximum – the table scrolls inside, header and footer stay visible) or `fill`: the table takes the rest of a flex column (e.g. a page with `min-h-screen flex flex-col`), the rows scroll in the room left – set `minScrollHeight` so it does not collapse on small screens |
1545
+ | minScrollHeight? | `string` | `scrollHeight="fill"`: minimum height of the scroll area (CSS length, e.g. 60vh) – below it the page scrolls |
1543
1546
  | features? | `readonly DataTableFeature[]` | Feature modules, imported on their own so apps only bundle what they use (fixed for the life of the table): `virtualRows` from `/virtual` for `virtual`, `dateInput` and `numberInput` for date and number filters and editors (without them the browser's inputs) |
1544
1547
  | virtual? | `boolean` | Only the visible rows are rendered (requires `scrollHeight` and the feature `virtualRows`) |
1545
1548
  | rowHeight? | `number` | Estimated row height in px for `virtual` |
@@ -1549,9 +1552,9 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1549
1552
  | stateKey? | `string` | Keeps sorting, filters, page, widths, order and the other settings in the browser under this key |
1550
1553
  | stateStorage? | `'local' \| 'session'` | |
1551
1554
  | stateExclude? | `readonly DataTableStateKey[]` | Parts of the state that `stateKey` does not keep – default: the selection (`[]` keeps it, too) |
1552
- | toolbar? | `ReactNode` | Own controls in the toolbar, after the search |
1553
- | toolbarStart? | `ReactNode` | Own controls at the start of the toolbar, before the search |
1554
- | toolbarEnd? | `ReactNode` | Own controls at the end of the toolbar, before the built-in buttons |
1555
+ | toolbar? | `ReactNode` | Own controls in the toolbar, after the search – buttons, fields and menus default to the toolbar size (sm) |
1556
+ | toolbarStart? | `ReactNode` | Own controls at the start of the toolbar, before the search (default size sm, like the built-in ones) |
1557
+ | toolbarEnd? | `ReactNode` | Own controls at the end of the toolbar, before the built-in buttons (default size sm, like them) |
1555
1558
  | empty? | `ReactNode` | Shown when there are no rows |
1556
1559
  | noResults? | `ReactNode` | Shown when the filters or the search leave no row (default: `empty`) |
1557
1560
  | loadingContent? | `ReactNode` | Shown while loading without rows (default: spinner and "Loading") |
@@ -1762,8 +1765,9 @@ The modal window of a Dialog: title, description, focus trap, Escape closes
1762
1765
  | Prop | Type | Description |
1763
1766
  | --- | --- | --- |
1764
1767
  | title | `string` | |
1765
- | hideTitle? | `boolean` | The title only for screen readers – it still names the dialog (e.g. a video in a dialog) |
1766
- | titlePosition? | `'body' \| 'header'` | `body` (default): the title below the header row; `header`: in the row of the close button, after a smaller icon, the header separated by a line (as on the Drawer) |
1768
+ | hideTitle? | `boolean` | The title only for screen readers – it still names the dialog (e.g. a video in a dialog). With `header` this is the default; `false` shows the title where `titlePosition` puts it |
1769
+ | header? | `ReactNode` | Own content in the header row, after the icon and before the close button – e.g. a logo or a badge; the title then only names the dialog for screen readers (unless `hideTitle` is `false`) |
1770
+ | titlePosition? | `'body' \| 'header'` | `body` (default): the title below the header row; `header`: in the row of the close button, after a smaller icon, the header separated by a line (as on the Drawer). App-wide default: `titleInHeader` in the `defaultVariants` of the `dialog` recipe (RecipesProvider/ConfigProvider) |
1767
1771
  | description? | `string` | |
1768
1772
  | icon? | `IconComponent` | Icon component in the coloured box at the top |
1769
1773
  | status? | `DialogStatus` | |
@@ -1885,8 +1889,9 @@ The panel of a Drawer, sliding in from a side; title, focus trap, Escape closes
1885
1889
  | Prop | Type | Description |
1886
1890
  | --- | --- | --- |
1887
1891
  | title | `string` | |
1888
- | hideTitle? | `boolean` | The title only for screen readers – it still names the drawer (e.g. a video in a dialog) |
1892
+ | hideTitle? | `boolean` | The title only for screen readers – it still names the drawer (e.g. a video in a dialog). With `header` this is the default; `false` shows the title next to the header content |
1889
1893
  | description? | `string` | |
1894
+ | header? | `ReactNode` | Own content in the header row, before the close button – e.g. the logo of the app; the title then only names the drawer for screen readers (unless `hideTitle` is `false`) |
1890
1895
  | placement? | `DrawerPlacement` | |
1891
1896
  | size? | `OverlaySize` | Width (left/right: sm 320px, md 420px, lg 560px, xl 720px) or height (top/bottom: 30–85 % of the screen); `full` covers the whole screen. Without it 420px wide or as high as the content |
1892
1897
  | offset? | `boolean` | Floats with a gap to the screen edge and rounded corners |
@@ -3367,6 +3372,9 @@ Bell with the unread count (part of its name) that opens the notifications in a
3367
3372
  | open? | `boolean` | |
3368
3373
  | onOpenChange? | `(open: boolean) => void` | |
3369
3374
  | label? | `string` | Name of the bell and title of the panel (default "Notifications") |
3375
+ | variant? | `IconButtonVariant` | Look of the bell (IconButton `variant`), e.g. `outline` next to other outlined buttons in a header (default `text`) |
3376
+ | color? | `ButtonColor` | Colour of the bell, combined with the variant (IconButton `color`) |
3377
+ | size? | `ButtonSize` | Size of the bell (IconButton `size`), e.g. `sm` in a compact header |
3370
3378
  | now? | `Date \| string` | Reference time for "Today"/"Yesterday" (default: now) |
3371
3379
  | emptyText? | `string` | Text without notifications (default "No notifications") |
3372
3380
  | onMarkRead? | `(id: string) => void` | Mark one item as read |
@@ -5663,6 +5671,7 @@ Year field ("2026"): type the digits, or pick from the year grid; range: start
5663
5671
  - `createValidator` (`@wirecore/wirelayer-react/form`): –
5664
5672
  - `dataSourceToRows` (`@wirecore/wirelayer-react/data-table`): –
5665
5673
  - `dateInput` (`@wirecore/wirelayer-react/data-table`): DataTable feature: the DatePicker for `date` and `datetime` filters and editors (without: the browser's date input)
5674
+ - `dateRangeInput` (`@wirecore/wirelayer-react/data-table`): DataTable feature: the DateRangePicker for `between` filters of `date` and `datetime` columns – one field for from and to (without: two fields)
5666
5675
  - `defaultBubbleTools` (`@wirecore/wirelayer-react/editor`): Tools of the bubble menu (text selected) by default
5667
5676
  - `defaultEmojis` (`@wirecore/wirelayer-react`): –
5668
5677
  - `defaultFloatingTools` (`@wirecore/wirelayer-react/editor`): Tools of the floating menu (empty line) by default
@@ -5739,6 +5748,7 @@ Year field ("2026"): type the digits, or pick from the year grid; range: start
5739
5748
  - `useMediaQuery` (`@wirecore/wirelayer-react`): Whether a media query matches, e.g. `useMediaQuery('(min-width: 768px)')` – updates when it changes
5740
5749
  - `useNetwork` (`@wirecore/wirelayer-react`): Online state and connection quality (where the browser tells) – online on the server
5741
5750
  - `useRecipe` (`@wirecore/wirelayer-react`): The recipe with the defaults and classes of the nearest RecipesProvider and the component's `classes` prop
5751
+ - `useRecipeDefaults` (`@wirecore/wirelayer-react`): The default variants of a recipe – its own, overridden by the nearest RecipesProvider. For props that change the markup as well as the classes (DialogContent `titlePosition` ↔ `titleInHeader`, DataTable `showFilters` …): the component reads the default here when the prop is not set.
5742
5752
  - `useReducedMotion` (`@wirecore/wirelayer-react`): Whether the user asked for less motion (prefers-reduced-motion: reduce)
5743
5753
  - `useRegisteredHotkeys` (`@wirecore/wirelayer-react`): The registered shortcuts (enabled, with a description), updated as components register them
5744
5754
  - `useResizeObserver` (`@wirecore/wirelayer-react`): The content box of an element as it changes (pass `ref` to it)
@@ -6010,6 +6020,23 @@ const recipes: RecipeConfig = {
6010
6020
  };
6011
6021
  ```
6012
6022
 
6023
+ Some defaults change more than classes – where the title of a dialog sits, for example. They are variants of the recipe
6024
+ as well, so the same `defaultVariants` set them once for the whole app; a prop on the single component still wins:
6025
+
6026
+ | Recipe default | Instead of on every component |
6027
+ | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
6028
+ | `dialog: { defaultVariants: { titleInHeader: true } }` | `DialogContent title-position="header"`, also `confirm()`, `prompt()` and `openDialog()` (option `titlePosition`) |
6029
+ | `dataTable: { defaultVariants: { showFilters: false } }` | `DataTable :show-filters="false"` – filters closed at the start (a saved `stateKey` state still wins) |
6030
+ | `dataTable: { defaultVariants: { searchCentered: true } }` | `DataTable search-align="center"` – the search between the actions at the start and the tools at the end |
6031
+ | `dataTable: { defaultVariants: { sortable: true } }` | `DataTable sortable` – every column with a value sorts (not `sortable: false`, not a slot-only column) |
6032
+ | `dataTable: { defaultVariants: { striped: true } }` | `DataTable striped` – the same for `gridlines`, `bordered`, `wrapHeaders`, `verticalHeaders` |
6033
+
6034
+ Own buttons, fields and menus in the toolbar slots of a DataTable (`#toolbar`, `#toolbarStart`, `#toolbarEnd`) default
6035
+ to the size of the built-in toolbar controls (`sm`); a `size` on them still wins. A text filter shows the placeholder
6036
+ “Filter …” (translations `dataTable.filterText`) unless the column's `filterInputProps` has one.
6037
+
6038
+ React Native has no `RecipesProvider`; there the props stay on the single component.
6039
+
6013
6040
  Per part the classes come in this order: `classes`, the matching `variants` and `compoundVariants`, the states of the
6014
6041
  recipe, the overrides of states (`invalid: { true: … }`), and last the class passed to the component. Inner providers
6015
6042
  extend outer ones (classes of the same value are joined, the inner ones win).
@@ -6076,11 +6103,12 @@ import { DataTable } from '@wirecore/wirelayer-react/data-table';
6076
6103
  Parts of the DataTable that bring a lot of code along are imported on their own – an app only bundles the ones it passes
6077
6104
  in `features` (fixed for the life of a table). The DatePicker alone is about 40 KB (gzip).
6078
6105
 
6079
- | Feature | Import | Adds | Without it |
6080
- | ------------- | ---------------------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------- |
6081
- | `virtualRows` | `@wirecore/wirelayer-react/virtual` (peer dependency TanStack Virtual) | only the visible rows are rendered with `virtual` | all rows are rendered, a hint in development |
6082
- | `dateInput` | `@wirecore/wirelayer-react/data-table` | DatePicker for `date` and `datetime` filters/editors | the browser's date input |
6083
- | `numberInput` | `@wirecore/wirelayer-react/data-table` | NumberInput for `number` filters and editors | the browser's number input |
6106
+ | Feature | Import | Adds | Without it |
6107
+ | ---------------- | ---------------------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------- |
6108
+ | `virtualRows` | `@wirecore/wirelayer-react/virtual` (peer dependency TanStack Virtual) | only the visible rows are rendered with `virtual` | all rows are rendered, a hint in development |
6109
+ | `dateInput` | `@wirecore/wirelayer-react/data-table` | DatePicker for `date` and `datetime` filters/editors | the browser's date input |
6110
+ | `numberInput` | `@wirecore/wirelayer-react/data-table` | NumberInput for `number` filters and editors | the browser's number input |
6111
+ | `dateRangeInput` | `@wirecore/wirelayer-react/data-table` | one DateRangePicker for `between` filters of dates | two fields (from, to) |
6084
6112
 
6085
6113
  ```tsx
6086
6114
  import { DataTable, dateInput, numberInput } from '@wirecore/wirelayer-react/data-table';
@@ -6098,6 +6126,18 @@ const features = [virtualRows, dateInput, numberInput];
6098
6126
 
6099
6127
  Vue: the same imports from `@wirecore/wirelayer-vue/data-table` and `@wirecore/wirelayer-vue/virtual`.
6100
6128
 
6129
+ `scrollHeight` takes a CSS length – the maximum height, the rows scroll inside – or `fill`: the table takes the rest of a
6130
+ flex column and the rows scroll in the room left down to its bottom, whatever is above it (headings, figures that wrap on
6131
+ narrow screens). `minScrollHeight` keeps it from collapsing; below that the page scrolls.
6132
+
6133
+ ```vue
6134
+ <main class="flex min-h-screen flex-col gap-4 p-6">
6135
+ <PageHeader title="Machines" />
6136
+ <StatsRow />
6137
+ <DataTable :data="rows" :columns="columns" :features="features" scroll-height="fill" min-scroll-height="60vh" virtual />
6138
+ </main>
6139
+ ```
6140
+
6101
6141
  ### AI assistants (MCP, llms.txt)
6102
6142
 
6103
6143
  So that Claude, Cursor and others use the components correctly, the API is available as text and as an MCP server:
@@ -6418,6 +6458,7 @@ as `pdfjs-dist` (Apache-2.0), Chart.js, Tiptap and Shiki are installed by the ap
6418
6458
  | `useToast().add({ severity, summary, detail, life })` | `toast({ type, title, description, duration })`, `<Toaster />` once in the app |
6419
6459
  | `useConfirm().require({ … })` | `await confirm({ title, description, … })`, `<ConfirmDialog />` once in the app |
6420
6460
  | `DataTable` + `Column` | `DataTable :columns` (column objects), `#cell-<id>`, `#expansion`, `v-model:page-size` |
6461
+ | `DataTable scrollHeight="flex"` | `DataTable scroll-height="fill"` (with `min-scroll-height`) in a flex column |
6421
6462
  | `expandedRows` with a row toggler on some rows | `#expansion` + `row-expandable` |
6422
6463
  | `paginatorTemplate` (first/last page) | `paginator-edges`, `paginator-align` |
6423
6464
  | `showGridlines` (with the outer border) | `gridlines` + `bordered` |
@@ -6475,7 +6516,9 @@ as `pdfjs-dist` (Apache-2.0), Chart.js, Tiptap and Shiki are installed by the ap
6475
6516
  - **Typed values:** `RadioGroup`, `SegmentedControl` and `NativeSelect` keep the type of the bound value (unions,
6476
6517
  numbers); `Checkbox` with a boolean model gives booleans.
6477
6518
  - **Compact parts:** `Progress size="xs"` with `hide-label`, `bar-text` and `status`; `Alert #actions`; `mono` on text
6478
- fields; `DialogContent title-position="header"` puts the title next to the close button.
6519
+ fields; `DialogContent title-position="header"` puts the title next to the close button – for all dialogs of the
6520
+ app once centrally instead of on every dialog: `RecipesProvider` with
6521
+ `{ dialog: { defaultVariants: { titleInHeader: true } } }` (also for `confirm()`, `prompt()` and `openDialog()`).
6479
6522
  - **Values that are never empty:** with `required`, `RadioGroup` and `SegmentedControl` give v-model `V` instead of
6480
6523
  `V | null`; `NativeSelect` without `placeholder` gives `V` instead of `V | ''`; `NumberInput empty-fallback="min"` or
6481
6524
  `"previous"` refills an emptied field when it is left (typed `number`). `Select empty-value=""` treats an empty string
@@ -6655,3 +6698,21 @@ Not part of it:
6655
6698
  - Shapes stay round: everything with `rounded-full` (Button and IconButton with the default `shape="pill"` – use
6656
6699
  `shape="rounded"` or `"square"` –, Switch, Badge, Radio, Avatar with `shape="circle"`), the thin bars of Progress, the
6657
6700
  marks of Highlight and the diamond of a Gantt milestone.
6701
+
6702
+ ### Scrollbars
6703
+
6704
+ The page and every scrolling area (DataTable with `scrollHeight`, Dialog and Drawer with long content, lists of Select
6705
+ and Menu, Textarea …) get thin scrollbars in the look of `ScrollPanel`: the thumb in `line-strong` (at least 3:1 against
6706
+ the surfaces, in every theme and mode), the track transparent. They follow the mode and theme of the part they are in.
6707
+ Browsers without `scrollbar-color` (Safari) get the same look through `::-webkit-scrollbar`; with forced colors (Windows
6708
+ contrast themes) the system scrollbars stay.
6709
+
6710
+ | Variable | Default | Applies to |
6711
+ | ---------------------------- | ----------------------- | --------------------------------------------------------------------- |
6712
+ | `--wc-scrollbar-thumb` | `var(--wc-line-strong)` | Thumb |
6713
+ | `--wc-scrollbar-thumb-hover` | `var(--wc-muted)` | Thumb under the pointer (Safari; other browsers darken it themselves) |
6714
+ | `--wc-scrollbar-track` | `transparent` | Track |
6715
+ | `--wc-scrollbar-width` | `thin` | `scrollbar-width` (`auto` for the wide ones) |
6716
+
6717
+ `<html data-scrollbars="native">` keeps the browser's own scrollbars on the whole page. The rules sit in the base layer,
6718
+ so a utility on a single element still wins (e.g. `[scrollbar-width:none]`).
package/llms.txt CHANGED
@@ -315,3 +315,4 @@ Full API (props, events, slots, examples) in llms-full.txt next to this file. MC
315
315
  - Custom theme
316
316
  - Second brand color and hover color
317
317
  - Component sizes and shapes
318
+ - Scrollbars
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecore/wirelayer-react",
3
- "version": "0.12.2",
3
+ "version": "0.13.0",
4
4
  "description": "WireLayer components for React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -166,8 +166,8 @@
166
166
  "dependencies": {
167
167
  "@ark-ui/react": "^5.39.3",
168
168
  "@internationalized/date": "^3.12.4",
169
- "@wirecore/wirelayer-recipes": "^0.11.0",
170
- "@wirecore/wirelayer-tokens": "^0.7.0",
169
+ "@wirecore/wirelayer-recipes": "^0.12.0",
170
+ "@wirecore/wirelayer-tokens": "^0.8.0",
171
171
  "lucide-react": "^1.59.0"
172
172
  },
173
173
  "devDependencies": {