@wirecore/wirelayer-react 0.5.0 → 0.7.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 (159) hide show
  1. package/dist/Button-Cd7lufvJ.js +60 -0
  2. package/dist/Checkbox-BMRax6m4.js +49 -0
  3. package/dist/ContextMenu-BD72S5n6.js +1452 -0
  4. package/dist/{Field-hc416yJx.js → Field-DkYxlVar.js} +5 -2
  5. package/dist/Highlight-43-H9459.js +302 -0
  6. package/dist/Input-C8T3WLd5.js +119 -0
  7. package/dist/{InputStatus-DS38XEkX.js → InputStatus-hVzkU_4q.js} +4 -1
  8. package/dist/PasswordInput-SjO66gZB.js +422 -0
  9. package/dist/Select-7rfeNmJb.js +242 -0
  10. package/dist/Slider-Bfm_jjYE.js +80 -0
  11. package/dist/{Tree-eqv4DIQn.js → Tree-DVjwp6FG.js} +2 -2
  12. package/dist/chart/Chart.d.ts +11 -5
  13. package/dist/chart/Chart.d.ts.map +1 -1
  14. package/dist/chart/index.d.ts +2 -0
  15. package/dist/chart/index.d.ts.map +1 -1
  16. package/dist/chart.js +44 -37
  17. package/dist/code.js +1 -1
  18. package/dist/components/AngleSlider/AngleSlider.d.ts +3 -1
  19. package/dist/components/AngleSlider/AngleSlider.d.ts.map +1 -1
  20. package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
  21. package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  22. package/dist/components/Badge/Badge.d.ts +3 -1
  23. package/dist/components/Badge/Badge.d.ts.map +1 -1
  24. package/dist/components/Button/Button.d.ts +6 -1
  25. package/dist/components/Button/Button.d.ts.map +1 -1
  26. package/dist/components/Carousel/Carousel.d.ts +3 -1
  27. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  28. package/dist/components/CascadeSelect/CascadeSelect.d.ts +3 -1
  29. package/dist/components/CascadeSelect/CascadeSelect.d.ts.map +1 -1
  30. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  31. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  32. package/dist/components/ChipGroup/ChipGroup.d.ts +1 -1
  33. package/dist/components/ChipGroup/ChipGroup.d.ts.map +1 -1
  34. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -1
  35. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  36. package/dist/components/Combobox/Combobox.d.ts +7 -2
  37. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  38. package/dist/components/Confirm/ConfirmDialog.d.ts +6 -1
  39. package/dist/components/Confirm/ConfirmDialog.d.ts.map +1 -1
  40. package/dist/components/Confirm/confirm.d.ts +7 -0
  41. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  42. package/dist/components/DatePicker/DatePicker.d.ts +5 -1
  43. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  44. package/dist/components/DatePicker/DatePickerBase.d.ts +5 -1
  45. package/dist/components/DatePicker/DatePickerBase.d.ts.map +1 -1
  46. package/dist/components/DateRangePicker/DateRangePicker.d.ts +5 -1
  47. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  48. package/dist/components/Dialog/Dialog.d.ts +8 -2
  49. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  50. package/dist/components/Drawer/Drawer.d.ts +3 -1
  51. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  52. package/dist/components/DurationInput/DurationInput.d.ts +3 -1
  53. package/dist/components/DurationInput/DurationInput.d.ts.map +1 -1
  54. package/dist/components/Field/context.d.ts +3 -1
  55. package/dist/components/Field/context.d.ts.map +1 -1
  56. package/dist/components/FileUpload/FileUpload.d.ts +9 -2
  57. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
  58. package/dist/components/IconButton/IconButton.d.ts +5 -1
  59. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  60. package/dist/components/Knob/Knob.d.ts +3 -1
  61. package/dist/components/Knob/Knob.d.ts.map +1 -1
  62. package/dist/components/Listbox/Listbox.d.ts +3 -1
  63. package/dist/components/Listbox/Listbox.d.ts.map +1 -1
  64. package/dist/components/MonthPicker/MonthPicker.d.ts +5 -1
  65. package/dist/components/MonthPicker/MonthPicker.d.ts.map +1 -1
  66. package/dist/components/MultiSelect/MultiSelect.d.ts +7 -2
  67. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  68. package/dist/components/NumberInput/NumberInput.d.ts +1 -1
  69. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  70. package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
  71. package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
  72. package/dist/components/PinInput/PinInput.d.ts +3 -1
  73. package/dist/components/PinInput/PinInput.d.ts.map +1 -1
  74. package/dist/components/QuarterPicker/QuarterPicker.d.ts +3 -1
  75. package/dist/components/QuarterPicker/QuarterPicker.d.ts.map +1 -1
  76. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  77. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  78. package/dist/components/Rating/Rating.d.ts +3 -1
  79. package/dist/components/Rating/Rating.d.ts.map +1 -1
  80. package/dist/components/SegmentedControl/SegmentedControl.d.ts +3 -3
  81. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  82. package/dist/components/Select/Select.d.ts +9 -2
  83. package/dist/components/Select/Select.d.ts.map +1 -1
  84. package/dist/components/Select/list.d.ts +6 -1
  85. package/dist/components/Select/list.d.ts.map +1 -1
  86. package/dist/components/SelectionCard/SelectionCard.d.ts +1 -1
  87. package/dist/components/SelectionCard/SelectionCard.d.ts.map +1 -1
  88. package/dist/components/Slider/Slider.d.ts +3 -1
  89. package/dist/components/Slider/Slider.d.ts.map +1 -1
  90. package/dist/components/Switch/Switch.d.ts +1 -1
  91. package/dist/components/Switch/Switch.d.ts.map +1 -1
  92. package/dist/components/TagsInput/TagsInput.d.ts +3 -1
  93. package/dist/components/TagsInput/TagsInput.d.ts.map +1 -1
  94. package/dist/components/TimePicker/TimePicker.d.ts +3 -1
  95. package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
  96. package/dist/components/TimeRangePicker/TimeRangePicker.d.ts +3 -1
  97. package/dist/components/TimeRangePicker/TimeRangePicker.d.ts.map +1 -1
  98. package/dist/components/Toast/Toaster.d.ts +10 -2
  99. package/dist/components/Toast/Toaster.d.ts.map +1 -1
  100. package/dist/components/ToggleButton/ToggleButton.d.ts +7 -1
  101. package/dist/components/ToggleButton/ToggleButton.d.ts.map +1 -1
  102. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  103. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  104. package/dist/components/TreeSelect/TreeSelect.d.ts +3 -1
  105. package/dist/components/TreeSelect/TreeSelect.d.ts.map +1 -1
  106. package/dist/components/YearPicker/YearPicker.d.ts +5 -1
  107. package/dist/components/YearPicker/YearPicker.d.ts.map +1 -1
  108. package/dist/data-table/DataTable.d.ts +28 -2
  109. package/dist/data-table/DataTable.d.ts.map +1 -1
  110. package/dist/data-table/FilterMenu.d.ts +7 -1
  111. package/dist/data-table/FilterMenu.d.ts.map +1 -1
  112. package/dist/data-table/ValueInput.d.ts +8 -1
  113. package/dist/data-table/ValueInput.d.ts.map +1 -1
  114. package/dist/data-table/index.d.ts +1 -1
  115. package/dist/data-table/index.d.ts.map +1 -1
  116. package/dist/data-table/types.d.ts +29 -1
  117. package/dist/data-table/types.d.ts.map +1 -1
  118. package/dist/data-table.js +1220 -1142
  119. package/dist/editor.js +2 -2
  120. package/dist/form/FormField.d.ts +5 -1
  121. package/dist/form/FormField.d.ts.map +1 -1
  122. package/dist/form.js +9 -7
  123. package/dist/index.d.ts +1 -1
  124. package/dist/index.d.ts.map +1 -1
  125. package/dist/index.js +3516 -3407
  126. package/dist/label-for-DYgV5EwH.js +9 -0
  127. package/dist/pdf.js +5 -5
  128. package/dist/sources/ActionBar.css +1 -0
  129. package/dist/sources/AppShell.css +1 -0
  130. package/dist/sources/ChatPrompt.css +1 -0
  131. package/dist/sources/Gallery.css +1 -0
  132. package/dist/sources/IconButton.css +1 -0
  133. package/dist/sources/Image.css +1 -0
  134. package/dist/sources/ImageCropper.css +1 -0
  135. package/dist/sources/InlineEdit.css +1 -0
  136. package/dist/sources/Marquee.css +1 -0
  137. package/dist/sources/MegaMenu.css +1 -0
  138. package/dist/sources/Menubar.css +1 -0
  139. package/dist/sources/OrderList.css +1 -0
  140. package/dist/sources/PickList.css +1 -0
  141. package/dist/sources/ScrollTop.css +1 -0
  142. package/dist/utils/label-for.d.ts +3 -0
  143. package/dist/utils/label-for.d.ts.map +1 -0
  144. package/dist/virtual/VirtualSelect.d.ts +1 -1
  145. package/dist/virtual/VirtualSelect.d.ts.map +1 -1
  146. package/dist/virtual.js +245 -236
  147. package/fonts.css +2 -0
  148. package/llms-full.txt +215 -14
  149. package/llms.txt +4 -1
  150. package/package.json +7 -3
  151. package/theme.css +14 -0
  152. package/dist/Button-DFVVqBuY.js +0 -58
  153. package/dist/Checkbox-CZTyKWId.js +0 -44
  154. package/dist/ContextMenu-qh-bB9Lw.js +0 -1426
  155. package/dist/Highlight-DdTridk2.js +0 -291
  156. package/dist/Input-OPRvjIYt.js +0 -108
  157. package/dist/PasswordInput-B9k0GuSx.js +0 -420
  158. package/dist/Select-PbxrUYi1.js +0 -233
  159. package/dist/Slider-x-SsBc1d.js +0 -74
package/llms-full.txt CHANGED
@@ -145,6 +145,7 @@ Dial for an angle: the needle is the slider (arrow keys, Home/End), drag anywher
145
145
  | invalid? | `boolean` | |
146
146
  | name? | `string` | |
147
147
  | aria-label? | `string` | |
148
+ | id? | `string` | Id of the root element; a `<label for>` cannot name the angle slider, use a Field or aria-label |
148
149
  | className? | `string` | |
149
150
  | style? | `CSSProperties` | |
150
151
  | classes? | `RecipeClasses<typeof angleSliderRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -343,6 +344,7 @@ Short label or status (solid, soft, outline or a status colour)
343
344
  | --- | --- | --- |
344
345
  | variant? | `BadgeVariant` | |
345
346
  | icon? | `IconComponent` | Icon component rendered before the text |
347
+ | iconProps? | `Record<string, unknown>` | Props passed on to the icon component, e.g. { fill: 'currentColor' } for a filled icon or { strokeWidth: 1.5 } |
346
348
  | circle? | `boolean` | Round shape for a count or a single character (grows into a pill for longer content) |
347
349
  | classes? | `RecipeClasses<typeof badgeRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
348
350
 
@@ -521,6 +523,7 @@ Button in the variants of the design, with leading/trailing icon; loading keeps
521
523
  | block? | `boolean` | Full width of the container |
522
524
  | leadingIcon? | `IconComponent` | Icon component rendered before the label |
523
525
  | trailingIcon? | `IconComponent` | Icon component rendered after the label |
526
+ | iconProps? | `Record<string, unknown>` | Props passed on to the leading and trailing icon, e.g. { fill: 'currentColor' } for a filled icon or { strokeWidth: 1.5 } |
524
527
  | loading? | `boolean` | Shows a spinner and ignores clicks; stays focusable (aria-disabled + aria-busy) so focus is not lost |
525
528
  | badge? | `number \| boolean` | Counter (number > 0) or dot (true) after the label |
526
529
  | badgeLabel? | `(count: string \| null) => string` | Added to the accessible name while a badge is shown, e.g. "Notifications 4 new". Receives the visible counter text ("4", "99+") or null for the dot |
@@ -624,6 +627,7 @@ Region "carousel" with slides labelled "Image n of m". Previous/next buttons, on
624
627
  | loop? | `boolean` | |
625
628
  | autoplay? | `boolean \| { delay: number }` | Turns pages by itself (default every 4 s) – always with a pause button (WCAG 2.2.2) |
626
629
  | indicators? | `boolean` | Dots below the slides, one per page |
630
+ | controlsPosition? | `'bottom' \| 'sides'` | Previous and next: in the row below the slides (`bottom`, default) or beside them, vertically centred (`sides`) |
627
631
  | page? | `number` | |
628
632
  | defaultPage? | `number` | |
629
633
  | onPageChange? | `(page: number) => void` | |
@@ -660,6 +664,7 @@ Select with cascading levels: a menu whose groups open to the side (arrow right/
660
664
  | onLoadChildren? | `(option: CascadeOption<V>) => void` | A lazy level opened and there is no loadChildren/dataSource: add its options to the items |
661
665
  | dataSource? | `DataSource<CascadeOption<V>>` | Source of the options of lazy levels (`getChildren`) |
662
666
  | aria-label? | `string` | |
667
+ | id? | `string` | Id of the field (the trigger, with `filter` the search field), e.g. for a `<label for>` |
663
668
  | className? | `string` | |
664
669
  | style? | `CSSProperties` | |
665
670
  | classes? | `RecipeClasses<typeof cascadeSelectRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -688,9 +693,10 @@ Canvas with role="img" named by the title; the data table is its text alternativ
688
693
 
689
694
  | Prop | Type | Description |
690
695
  | --- | --- | --- |
691
- | type | `TType` | |
692
- | data | `ChartData<TType>` | |
693
- | options? | `ChartOptions<TType>` | Chart.js options – merged over the WireLayer defaults (colours, font, no fixed aspect ratio) |
696
+ | type | `TType` | Chart.js chart type – it alone decides the types of `data`, `options` and `plugins` |
697
+ | data | `ChartData<NoInfer<TType>>` | |
698
+ | options? | `ChartOptions<NoInfer<TType>>` | Chart.js options – merged over the WireLayer defaults (colours, font, no fixed aspect ratio). Options kept in a variable need their type, e.g. `computed<ChartOptions<'bar'>>(…)`, or `indexAxis: 'y'` becomes a string |
699
+ | plugins? | `Plugin<NoInfer<TType>>[]` | Inline Chart.js plugins of this chart (global ones: `Chart.register`) – changing them re-creates the chart |
694
700
  | title | `string` | Title of the chart, also its accessible name |
695
701
  | hideTitle? | `boolean` | Keep the title for screen readers only, e.g. inside a card that already has a heading |
696
702
  | height? | `string` | Height of the chart area (CSS length) |
@@ -927,7 +933,7 @@ Filter chips: one or several options as toggle buttons
927
933
  | defaultValue? | `string[]` | |
928
934
  | onValueChange? | `(value: string[]) => void` | |
929
935
  | multiple? | `boolean` | Allow several selected chips (default) or only one |
930
- | label? | `string` | Accessible name of the group |
936
+ | label? | `string` | Accessible name of the group – inside a Field with a label, the Field's label names it |
931
937
  | disabled? | `boolean` | |
932
938
  | classes? | `RecipeClasses<typeof chipGroupRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
933
939
 
@@ -1048,6 +1054,7 @@ Colour field: the button opens a panel with area, hue (and opacity) slider, hex
1048
1054
  | invalid? | `boolean` | |
1049
1055
  | name? | `string` | |
1050
1056
  | aria-label? | `string` | Accessible name without a surrounding Field |
1057
+ | id? | `string` | Id of the field (the button), e.g. for a `<label for>` |
1051
1058
  | className? | `string` | |
1052
1059
  | style? | `CSSProperties` | |
1053
1060
  | classes? | `RecipeClasses<typeof colorPickerRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -1093,7 +1100,7 @@ Text field with suggestions (autocomplete): type to filter, arrow keys to choose
1093
1100
  | onValueChange? | `(value: V \| null) => void` | |
1094
1101
  | onInputValueChange? | `(inputValue: string) => void` | Every change of the text (typing, choosing, clearing) |
1095
1102
  | onFilterChange? | `(text: string) => void` | Typed text – e.g. to load matching items from a server (manualFilter) |
1096
- | filter? | `boolean` | Filters the items by the typed text (ignores case and accents) |
1103
+ | filter? | `boolean` | Filters the items by the typed text (label and itemKeywords; ignores case and accents) |
1097
1104
  | manualFilter? | `boolean` | The items are filtered elsewhere (server): no local filtering, listen to onFilterChange |
1098
1105
  | allowCustomValue? | `boolean` | Typed text that matches no item becomes the value (a string) on Enter or when leaving the field – an editable select |
1099
1106
  | emptyText? | `string` | Shown when nothing matches |
@@ -1104,6 +1111,7 @@ Text field with suggestions (autocomplete): type to filter, arrow keys to choose
1104
1111
  | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
1105
1112
  | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
1106
1113
  | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item: property name or function (default: `group`); items are listed per group |
1114
+ | itemKeywords? | `ItemAccessor<T, string \| readonly string[] \| null \| undefined>` | More text the search finds an item by, besides its label: property name or function, one text or a list (default: `keywords`), e.g. the name of the item's category |
1107
1115
  | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
1108
1116
  | clearable? | `boolean` | Button that clears value and text (default true; not a tab stop – the text can be deleted, too) |
1109
1117
  | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
@@ -1235,6 +1243,8 @@ Place once in the app; ask with `await confirm({ title, … })` or `await prompt
1235
1243
  | Prop | Type | Description |
1236
1244
  | --- | --- | --- |
1237
1245
  | closeLabel? | `string` | Accessible name of the close button |
1246
+ | confirmButton? | `ConfirmButtonOptions` | Look of the confirm button in every request (default: size sm, `primary`, `danger` for status danger) |
1247
+ | cancelButton? | `ConfirmButtonOptions` | Look of the cancel button in every request (default: size sm, `outline`) |
1238
1248
  | classes? | `RecipeClasses<typeof dialogRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
1239
1249
 
1240
1250
  ### ConfirmPopup
@@ -1400,6 +1410,8 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1400
1410
  | first? | `number` | Index of the first row of the current page (0-based) – instead of `page`; controlled with onFirstChange |
1401
1411
  | onFirstChange? | `(first: number) => void` | |
1402
1412
  | paginatorPosition? | `'top' \| 'bottom'` | Pagination below (default) or above the table |
1413
+ | paginatorEdges? | `boolean` | Buttons to the first and the last page in the pagination |
1414
+ | paginatorAlign? | `DataTablePaginatorAlign` | Pagination row: rows per page at the start, pages at the end (`between`, default) – or both together |
1403
1415
  | sorting? | `DataTableSort \| DataTableSort[] \| null` | Current sorting; controlled together with onSortingChange – an array in the multiple mode |
1404
1416
  | onSortingChange? | `(sorting: DataTableSort \| DataTableSort[] \| null) => void` | |
1405
1417
  | defaultSorting? | `DataTableSort \| DataTableSort[] \| null` | Sorting at the start (uncontrolled) |
@@ -1410,6 +1422,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1410
1422
  | selectionMode? | `'multiple' \| 'single'` | `multiple` (checkboxes, default) or `single` (radio buttons) |
1411
1423
  | selection? | `string[]` | |
1412
1424
  | onSelectionChange? | `(selection: string[]) => void` | |
1425
+ | selectedRows? | `readonly TData[]` | The selected rows as objects – controlled with onSelectedRowsChange (instead of or next to `selection`); rows are found by `getRowId` |
1413
1426
  | onSelectedRowsChange? | `(rows: TData[]) => void` | The selected rows as objects (rows of other pages are remembered) |
1414
1427
  | selectOnRowClick? | `boolean` | A click on the row (not on its controls) selects it; Shift+click selects a range |
1415
1428
  | isRowSelectable? | `(row: TData) => boolean` | Rows that cannot be selected get a disabled checkbox |
@@ -1429,6 +1442,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1429
1442
  | defaultExpanded? | `string[]` | |
1430
1443
  | onExpandedChange? | `(expanded: string[]) => void` | |
1431
1444
  | expandLabel? | `(row: TData, index: number) => string` | Names the expand button of a row |
1445
+ | rowExpandable? | `(row: TData) => boolean` | Whether a row has details (`expansion`) – rows without get no expand button (default: all rows) |
1432
1446
  | expansion? | `(row: TData, rowId: string) => ReactNode` | Details below an expanded row – adds the expand column |
1433
1447
  | advancedFilter? | `boolean \| ConditionField[]` | Advanced filter: the rows pass a condition tree (nested and/or rules). `true` offers every column with a filter type; or pass the fields. A toolbar button opens the editor from `renderAdvancedFilter` above the table – usually `ConditionBuilder` from `@wirecore/wirelayer-blocks-react`; without it there is no button (the tree still filters). A server filters instead: `dataSource` gets the tree as `condition`, with `manual` the parent applies `advancedFilterValue` |
1434
1448
  | advancedFilterValue? | `ConditionGroup` | The condition tree of the advanced filter (controlled together with onAdvancedFilterValueChange) |
@@ -1437,6 +1451,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1437
1451
  | search? | `boolean` | Search field above the table: filters over all columns |
1438
1452
  | globalFilter? | `string` | |
1439
1453
  | onGlobalFilterChange? | `(value: string) => void` | |
1454
+ | 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) |
1440
1455
  | highlightSearch? | `boolean` | Marks the search hits in the cells |
1441
1456
  | filters? | `Record<string, DataTableFilterValue>` | Column filters by column id; controlled together with onFiltersChange |
1442
1457
  | onFiltersChange? | `(filters: Record<string, DataTableFilterValue>) => void` | |
@@ -1444,6 +1459,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1444
1459
  | showFilters? | `boolean` | Shows the filter row or menus (`filterToggle`); controlled with onShowFiltersChange – the filters keep working |
1445
1460
  | onShowFiltersChange? | `(show: boolean) => void` | |
1446
1461
  | filterToggle? | `boolean` | Button in the toolbar that shows and hides the filters |
1462
+ | filterReset? | `boolean` | Button in the toolbar that clears the column filters, the search and the advanced filter (`resetFilters()`) |
1447
1463
  | maxConstraints? | `number` | Conditions per column in the filter menu |
1448
1464
  | resizable? | `boolean` | Column widths can be changed by dragging the header edge or with the arrow keys |
1449
1465
  | columnToggle? | `boolean` | Menu above the table to show and hide columns |
@@ -1486,6 +1502,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1486
1502
  | onSizeChange? | `(size: Density) => void` | |
1487
1503
  | densityToggle? | `boolean` | Menu above the table to change the row height |
1488
1504
  | gridlines? | `boolean` | Lines between the columns |
1505
+ | bordered? | `boolean` | A border around the whole table |
1489
1506
  | striped? | `boolean` | Every other row tinted |
1490
1507
  | fullscreenToggle? | `boolean` | Button above the table to show it on the whole screen |
1491
1508
  | scrollHeight? | `string` | Fixed height (CSS length): the table scrolls inside, header and footer stay visible |
@@ -1496,6 +1513,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1496
1513
  | onScrollEnd? | `() => void` | |
1497
1514
  | stateKey? | `string` | Keeps sorting, filters, page, widths, order and the other settings in the browser under this key |
1498
1515
  | stateStorage? | `'local' \| 'session'` | |
1516
+ | stateExclude? | `readonly DataTableStateKey[]` | Parts of the state that `stateKey` does not keep – default: the selection (`[]` keeps it, too) |
1499
1517
  | toolbar? | `ReactNode` | Own controls in the toolbar, after the search |
1500
1518
  | toolbarStart? | `ReactNode` | Own controls at the start of the toolbar, before the search |
1501
1519
  | toolbarEnd? | `ReactNode` | Own controls at the end of the toolbar, before the built-in buttons |
@@ -1576,6 +1594,7 @@ Date field: type the digits one after another (the separators come from the loca
1576
1594
  | invalid? | `boolean` | |
1577
1595
  | required? | `boolean` | |
1578
1596
  | name? | `string` | |
1597
+ | placeholder? | `string` | Text of the empty field, shown until it gets the focus – no replacement for a label |
1579
1598
  | size? | `'sm' \| 'md' \| 'lg'` | |
1580
1599
  | clearable? | `boolean` | Clear button in the field while it has a value |
1581
1600
  | showButtonBar? | `boolean` | "Today" and "Clear" below the calendar |
@@ -1591,6 +1610,7 @@ Date field: type the digits one after another (the separators come from the loca
1591
1610
  | responsive? | `boolean` | On narrow screens the calendar opens as a sheet at the bottom |
1592
1611
  | renderDay? | `RenderDay` | Content of a day in the calendar instead of its number, e.g. a dot for appointments |
1593
1612
  | aria-label? | `string` | Accessible name without a surrounding Field |
1613
+ | id? | `string` | Id of the field – the (first) date gets it; a `<label for>` cannot name it, use a Field or aria-label |
1594
1614
  | className? | `string` | |
1595
1615
  | style? | `CSSProperties` | |
1596
1616
  | classes? | `RecipeClasses<typeof datePicker>` | Extra classes per part of the date field, e.g. { control: "…" } (the calendar: RecipesProvider) |
@@ -1620,6 +1640,7 @@ Start and end in one field ("10/20/2026 – 10/24/2026"); the calendar picks sta
1620
1640
  | invalid? | `boolean` | |
1621
1641
  | required? | `boolean` | |
1622
1642
  | name? | `string` | Sent as name[0] and name[1] |
1643
+ | placeholder? | `string` | Text of the empty field, shown until it gets the focus – no replacement for a label |
1623
1644
  | presets? | `(string \| { label: string; value: DateRangeLike })[]` | Buttons below the calendar: presets ("last7Days", "thisMonth", "thisQuarter", "last3Months", "last12Months", "last3Years" …) or own { label, value } ranges |
1624
1645
  | size? | `'sm' \| 'md' \| 'lg'` | |
1625
1646
  | clearable? | `boolean` | Clear button in the field while it has a value |
@@ -1635,6 +1656,7 @@ Start and end in one field ("10/20/2026 – 10/24/2026"); the calendar picks sta
1635
1656
  | responsive? | `boolean` | On narrow screens the calendar opens as a sheet at the bottom |
1636
1657
  | renderDay? | `RenderDay` | Content of a day in the calendar instead of its number |
1637
1658
  | aria-label? | `string` | Accessible name without a surrounding Field |
1659
+ | id? | `string` | Id of the field – the (first) date gets it; a `<label for>` cannot name it, use a Field or aria-label |
1638
1660
  | className? | `string` | |
1639
1661
  | style? | `CSSProperties` | |
1640
1662
  | classes? | `RecipeClasses<typeof datePicker>` | Extra classes per part of the date field, e.g. { control: "…" } (the calendar: RecipesProvider) |
@@ -1704,10 +1726,11 @@ The modal window of a Dialog: title, description, focus trap, Escape closes
1704
1726
  | Prop | Type | Description |
1705
1727
  | --- | --- | --- |
1706
1728
  | title | `string` | |
1729
+ | hideTitle? | `boolean` | The title only for screen readers – it still names the dialog (e.g. a video in a dialog) |
1707
1730
  | description? | `string` | |
1708
1731
  | icon? | `IconComponent` | Icon component in the coloured box at the top |
1709
1732
  | status? | `DialogStatus` | |
1710
- | size? | `OverlaySize` | Maximum width: sm 320px, md 400px (default), lg 560px, xl 800px, full (screen width minus the margin) |
1733
+ | size? | `OverlaySize` | Maximum width: sm 320px (20rem), md 400px (25rem, default), lg 560px (35rem), xl 800px (50rem), full (screen width minus the margin). Another width: leave out `size` and set the CSS variable, e.g. style="--wc-dialog-w: 36rem" |
1711
1734
  | position? | `DialogPosition` | Where the dialog sits: centred (default), at the top/bottom or the start/end edge |
1712
1735
  | fullscreen? | `boolean` | Covers the whole screen |
1713
1736
  | maximizable? | `boolean` | Button in the header that switches between the normal size and the whole screen |
@@ -1825,6 +1848,7 @@ The panel of a Drawer, sliding in from a side; title, focus trap, Escape closes
1825
1848
  | Prop | Type | Description |
1826
1849
  | --- | --- | --- |
1827
1850
  | title | `string` | |
1851
+ | hideTitle? | `boolean` | The title only for screen readers – it still names the drawer (e.g. a video in a dialog) |
1828
1852
  | description? | `string` | |
1829
1853
  | placement? | `DrawerPlacement` | |
1830
1854
  | 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 |
@@ -1871,6 +1895,7 @@ Duration field: hours and minutes (optional days and seconds) as spin buttons
1871
1895
  | size? | `'sm' \| 'md' \| 'lg'` | |
1872
1896
  | clearable? | `boolean` | Clear button in the field while it has a value |
1873
1897
  | aria-label? | `string` | Accessible name without a surrounding Field |
1898
+ | id? | `string` | Id of the field (the group of parts); a `<label for>` cannot name it, use a Field or aria-label |
1874
1899
  | className? | `string` | |
1875
1900
  | style? | `CSSProperties` | |
1876
1901
  | classes? | `RecipeClasses<typeof datePickerRecipe>` | Extra classes per part of the field (see the datePicker recipe) |
@@ -2021,7 +2046,8 @@ Drop files onto the zone or choose them with the button (the keyboard path). Acc
2021
2046
  | accept? | `string \| string[]` | Allowed types, e.g. "application/pdf" or ["image/png", "image/jpeg"] (presets: FileTypes.images …) |
2022
2047
  | maxFiles? | `number` | |
2023
2048
  | maxFileSize? | `number` | Maximum size per file in bytes |
2024
- | onFilesChange? | `(files: File[]) => void` | The accepted files after every change |
2049
+ | files? | `File[]` | The chosen files – controlled with onFilesChange, e.g. to remove or replace files from outside (otherwise the component keeps them itself; `clear()` empties it) |
2050
+ | onFilesChange? | `(files: File[]) => void` | The accepted files after every change (rejected files: onFilesReject) |
2025
2051
  | onFilesReject? | `(rejections: { file: File; errors: string[] }[]) => void` | Files that were not taken, with the reasons as codes (FILE_INVALID_TYPE, FILE_TOO_LARGE, TOO_MANY_FILES …) |
2026
2052
  | onUploadComplete? | `(file: File, state: UploadState) => void` | A file finished uploading (or failed) |
2027
2053
  | dropzoneText? | `string` | Text in the drop zone |
@@ -2033,6 +2059,7 @@ Drop files onto the zone or choose them with the button (the keyboard path). Acc
2033
2059
  | preview? | `boolean` | Thumbnails for images (object URLs, released again) |
2034
2060
  | fullscreenDrop? | `boolean` | Files can be dropped anywhere in the window |
2035
2061
  | paste? | `boolean` | Ctrl+V inside the component adds files from the clipboard |
2062
+ | showFileList? | `boolean` | The list of the chosen files below the drop zone – false when the app shows the files itself |
2036
2063
  | disabled? | `boolean` | |
2037
2064
  | invalid? | `boolean` | |
2038
2065
  | required? | `boolean` | |
@@ -2233,6 +2260,8 @@ Label, helper text, error, aria-invalid and aria-describedby come from Field
2233
2260
  | required? | `boolean` | |
2234
2261
  | optional? | `boolean` | "(optional)" after the label |
2235
2262
  | disabled? | `boolean` | |
2263
+ | className? | `string` | |
2264
+ | classes? | `RecipeClasses<typeof fieldRecipe>` | Extra classes per part of the Field, e.g. { label: "…" } (see the field recipe) |
2236
2265
  | children? | `ReactNode` | |
2237
2266
 
2238
2267
  ### FormList
@@ -2471,11 +2500,13 @@ Button with only an icon; the label is its accessible name, optionally with a co
2471
2500
  | Prop | Type | Description |
2472
2501
  | --- | --- | --- |
2473
2502
  | icon | `IconComponent` | Icon component |
2503
+ | iconProps? | `Record<string, unknown>` | Props passed on to the icon component, e.g. { fill: 'currentColor' } for a filled icon or { strokeWidth: 1.5 } |
2474
2504
  | label | `string` | Accessible name – icon buttons have no visible text |
2475
2505
  | variant? | `IconButtonVariant` | |
2476
2506
  | color? | `ButtonColor` | Colour combined with the variant, like Button `color` (e.g. a danger text button) |
2477
2507
  | size? | `ButtonSize` | `xs` is 24px – the minimum target size (WCAG 2.5.8) |
2478
2508
  | shape? | `ButtonShape` | Corner shape: `pill` (round, default), `rounded` or `square` |
2509
+ | loading? | `boolean` | Shows a spinner instead of the icon and ignores clicks; stays focusable (aria-disabled + aria-busy) |
2479
2510
  | badge? | `number \| boolean` | Counter (number > 0) or dot (true) in the top-right corner |
2480
2511
  | badgeLabel? | `(count: string \| null) => string` | Appended to the accessible name while a badge is shown, e.g. "Notifications, 4 new". Receives the visible counter text ("4", "99+") or null for the dot – the visible text must stay part of the name (WCAG 2.5.3). |
2481
2512
  | classes? | `RecipeClasses<typeof iconButtonRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -2753,6 +2784,7 @@ Dial (270°): a slider – arrow keys, Page Up/Down, Home/End, or drag around th
2753
2784
  | step? | `number` | |
2754
2785
  | label? | `string` | Visible label, also the accessible name |
2755
2786
  | aria-label? | `string` | |
2787
+ | id? | `string` | Id of the dial (the slider); a `<label for>` cannot name it, use `label`, a Field or aria-label |
2756
2788
  | formatValue? | `(value: number) => string` | Formats the shown and announced value, e.g. (v) => `${v} %` |
2757
2789
  | valueTemplate? | `string` | Text with the value in it, e.g. "{value} %" (when there is no formatValue) |
2758
2790
  | strokeWidth? | `number` | Width of the arc (default 8, of a 100 wide dial) |
@@ -2807,6 +2839,7 @@ Always visible list (role="listbox"): arrow keys move, Enter/Space choose, typin
2807
2839
  | items | `readonly T[]` | Options: ListboxItem objects – or any objects or values, read with itemValue/itemLabel/itemDisabled/itemGroup |
2808
2840
  | label? | `string` | Visible label, also the list's accessible name |
2809
2841
  | aria-label? | `string` | Accessible name without a visible label |
2842
+ | id? | `string` | Id of the root element; a `<label for>` cannot name the list box, use a Field or aria-label |
2810
2843
  | multiple? | `boolean` | Several options can be chosen (Space toggles) |
2811
2844
  | value? | `V[]` | Chosen values; any type (string, number, boolean, object) |
2812
2845
  | defaultValue? | `V[]` | |
@@ -3161,9 +3194,11 @@ Month field ("10.2026"): type the digits in one go, or pick from the month grid;
3161
3194
  | invalid? | `boolean` | |
3162
3195
  | required? | `boolean` | |
3163
3196
  | name? | `string` | With range sent as name[0] and name[1] |
3197
+ | placeholder? | `string` | Text of the empty field, shown until it gets the focus – no replacement for a label |
3164
3198
  | size? | `'sm' \| 'md' \| 'lg'` | |
3165
3199
  | clearable? | `boolean` | Clear button in the field while it has a value |
3166
3200
  | aria-label? | `string` | Accessible name without a surrounding Field |
3201
+ | id? | `string` | Id of the field – the (first) date gets it; a `<label for>` cannot name it, use a Field or aria-label |
3167
3202
  | className? | `string` | |
3168
3203
  | style? | `CSSProperties` | |
3169
3204
  | classes? | `RecipeClasses<typeof datePicker>` | Extra classes per part of the date field, e.g. { control: "…" } (the calendar: RecipesProvider) |
@@ -3193,6 +3228,7 @@ Select with several values: the list stays open while choosing, Space/Enter togg
3193
3228
  | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
3194
3229
  | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
3195
3230
  | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item: property name or function (default: `group`); items are listed per group |
3231
+ | itemKeywords? | `ItemAccessor<T, string \| readonly string[] \| null \| undefined>` | More text the search finds an item by, besides its label: property name or function, one text or a list (default: `keywords`), e.g. the name of the item's category |
3196
3232
  | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
3197
3233
  | display? | `'text' \| 'chips'` | Selected items as text (default) or as chips with a remove button each (Backspace removes the last) |
3198
3234
  | checkboxes? | `boolean` | Check boxes before the options (default); false shows a check mark after the label |
@@ -3202,7 +3238,7 @@ Select with several values: the list stays open while choosing, Space/Enter togg
3202
3238
  | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
3203
3239
  | loadingText? | `string` | Text of the loading row in the list |
3204
3240
  | size? | `SelectSize` | Height of the field: 32, 40 (default) or 48 px |
3205
- | filter? | `boolean` | Search field at the top of the list; filters by label, ignoring case and accents |
3241
+ | filter? | `boolean` | Search field at the top of the list; filters by label and itemKeywords, ignoring case and accents |
3206
3242
  | manualFilter? | `boolean` | The items are filtered elsewhere (server): no local filtering, listen to onFilterChange |
3207
3243
  | onFilterChange? | `(text: string) => void` | Text of the search field (filter) – e.g. to load matching items from a server (manualFilter) |
3208
3244
  | emptyText? | `string` | Shown when no item is left (default "No results" / "No entries") |
@@ -3702,6 +3738,7 @@ Code input (OTP, PIN): one box per character, typing moves on, pasting fills all
3702
3738
  | disabled? | `boolean` | |
3703
3739
  | name? | `string` | |
3704
3740
  | aria-label? | `string` | Accessible name of the group without a surrounding Field |
3741
+ | id? | `string` | Id of the root element; a `<label for>` cannot name the PIN input, use a Field or aria-label |
3705
3742
  | className? | `string` | |
3706
3743
  | style? | `CSSProperties` | |
3707
3744
  | classes? | `RecipeClasses<typeof pinInputRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -3857,6 +3894,7 @@ Quarter field: type "Q4 2026" (also "2026-Q4", "4/2026") or pick from the four q
3857
3894
  | size? | `'sm' \| 'md' \| 'lg'` | |
3858
3895
  | clearable? | `boolean` | Clear button in the field while it has a value |
3859
3896
  | aria-label? | `string` | Accessible name without a surrounding Field |
3897
+ | id? | `string` | Id of the text field, e.g. for a `<label for>` |
3860
3898
  | className? | `string` | |
3861
3899
  | style? | `CSSProperties` | |
3862
3900
  | classes? | `RecipeClasses<typeof datePickerRecipe>` | Extra classes per part of the field, e.g. { control: "…" } (see the datePicker recipe) |
@@ -3908,7 +3946,7 @@ One choice out of several (role="radiogroup", arrow keys), horizontal or vertica
3908
3946
  | value? | `string \| null` | |
3909
3947
  | defaultValue? | `string \| null` | |
3910
3948
  | onValueChange? | `(value: string \| null) => void` | |
3911
- | label? | `string` | Visible group label (otherwise pass aria-label) |
3949
+ | label? | `string` | Visible group label (otherwise pass aria-label – or place the group in a Field with a label) |
3912
3950
  | orientation? | `RadioGroupOrientation` | |
3913
3951
  | columns? | `number` | Cards in a grid with this many columns (one column on small screens) – for RadioCard |
3914
3952
  | disabled? | `boolean` | |
@@ -3953,6 +3991,7 @@ Star rating: a radio group – arrow keys change the value, each star reads "3 s
3953
3991
  | disabled? | `boolean` | |
3954
3992
  | label? | `string` | Visible label, also the group's accessible name |
3955
3993
  | aria-label? | `string` | |
3994
+ | id? | `string` | Id of the root element; a `<label for>` cannot name the rating, use a Field or aria-label |
3956
3995
  | size? | `'sm' \| 'md' \| 'lg'` | |
3957
3996
  | name? | `string` | |
3958
3997
  | className? | `string` | |
@@ -4211,7 +4250,7 @@ Few exclusive options as a segmented switch (radio group)
4211
4250
  | value? | `string \| null` | |
4212
4251
  | defaultValue? | `string` | |
4213
4252
  | onValueChange? | `(value: string \| null) => void` | |
4214
- | label | `string` | Accessible name of the group (visually hidden) |
4253
+ | label? | `string` | Accessible name of the group (visually hidden) – inside a Field with a label, the Field's label names it |
4215
4254
  | size? | `SegmentedControlSize` | |
4216
4255
  | disabled? | `boolean` | |
4217
4256
  | name? | `string` | |
@@ -4256,12 +4295,13 @@ Dropdown list for one option: arrow keys, typeahead, Escape; native select hidde
4256
4295
  | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
4257
4296
  | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
4258
4297
  | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item: property name or function (default: `group`); items are listed per group |
4298
+ | itemKeywords? | `ItemAccessor<T, string \| readonly string[] \| null \| undefined>` | More text the search finds an item by, besides its label: property name or function, one text or a list (default: `keywords`), e.g. the name of the item's category |
4259
4299
  | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
4260
4300
  | clearable? | `boolean` | Button that clears the value (also Backspace/Delete on the closed field) |
4261
4301
  | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
4262
4302
  | loadingText? | `string` | Text of the loading row in the list |
4263
4303
  | size? | `SelectSize` | Height of the field: 32, 40 (default) or 48 px |
4264
- | filter? | `boolean` | Search field at the top of the list; filters by label, ignoring case and accents |
4304
+ | filter? | `boolean` | Search field at the top of the list; filters by label and itemKeywords, ignoring case and accents |
4265
4305
  | manualFilter? | `boolean` | The items are filtered elsewhere (server): no local filtering, listen to onFilterChange |
4266
4306
  | onFilterChange? | `(text: string) => void` | Text of the search field (filter) – e.g. to load matching items from a server (manualFilter) |
4267
4307
  | emptyText? | `string` | Shown when no item is left (default "No results" / "No entries") |
@@ -4435,6 +4475,7 @@ Range: "Price, Minimum" / "Price, Maximum"
4435
4475
  | label | `string` | Visible label, also the accessible name of the thumbs |
4436
4476
  | thumbLabels? | `readonly string[]` | Names of the thumbs of a range slider, read after the label |
4437
4477
  | showValue? | `boolean` | Shows the formatted value next to the label |
4478
+ | hideLabel? | `boolean` | The label for screen readers only – it stays the accessible name of the thumbs |
4438
4479
  | formatValue? | `(value: number) => string` | Formats the shown and announced value, e.g. (v) => `${v} %` |
4439
4480
  | disabled? | `boolean` | |
4440
4481
  | name? | `string` | |
@@ -4724,7 +4765,7 @@ Sticks to the top or bottom edge while its container scrolls
4724
4765
 
4725
4766
  ### Switch
4726
4767
 
4727
- Ark renders a plain checkbox; role="switch" makes screen readers announce it as a switch
4768
+ Without a text the label is left out: Ark names the input by it, an empty one would hide a <label for>
4728
4769
 
4729
4770
  - Import: `import { Switch } from '@wirecore/wirelayer-react'`
4730
4771
  - Category: Forms
@@ -4884,6 +4925,7 @@ Free entries: Enter or "," adds, Backspace on the empty field selects the last e
4884
4925
  | dataSource? | `DataSource<string>` | Suggestions from a server instead of `suggestions`: asked with the typed text after a typing pause (outdated answers dropped), more while scrolling |
4885
4926
  | minSearchLength? | `number` | Fewest characters the typed text needs before the data source is asked (default 1) |
4886
4927
  | aria-label? | `string` | Accessible name without a surrounding Field |
4928
+ | id? | `string` | Id of the input, e.g. for a `<label for>` |
4887
4929
  | className? | `string` | |
4888
4930
  | style? | `CSSProperties` | |
4889
4931
  | classes? | `RecipeClasses<typeof tagsInputRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -5001,6 +5043,7 @@ Time field: type the digits one after another ("1430"), arrow keys change hour o
5001
5043
  | referenceDate? | `string` | Day whose offset applies with timeZone (ISO, default today) |
5002
5044
  | showTimeZone? | `boolean` | Short zone name after the time ("CEST") |
5003
5045
  | aria-label? | `string` | Accessible name without a surrounding Field |
5046
+ | id? | `string` | Id of the field – the (first) time gets it; a `<label for>` cannot name it, use a Field or aria-label |
5004
5047
  | className? | `string` | |
5005
5048
  | style? | `CSSProperties` | |
5006
5049
  | classes? | `RecipeClasses<typeof datePickerRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -5031,6 +5074,7 @@ Start and end time in one field ("09:00 – 17:30"): typing runs on from start t
5031
5074
  | size? | `'sm' \| 'md' \| 'lg'` | |
5032
5075
  | clearable? | `boolean` | Clear button in the field while it has a value |
5033
5076
  | aria-label? | `string` | Accessible name without a surrounding Field |
5077
+ | id? | `string` | Id of the field – the (first) time gets it; a `<label for>` cannot name it, use a Field or aria-label |
5034
5078
  | className? | `string` | |
5035
5079
  | style? | `CSSProperties` | |
5036
5080
  | classes? | `RecipeClasses<typeof datePickerRecipe>` | Extra classes per part of the component (see the datePicker recipe) |
@@ -5046,6 +5090,10 @@ Place once in the app; show toasts with toast({ title, description, type, action
5046
5090
  | Prop | Type | Description |
5047
5091
  | --- | --- | --- |
5048
5092
  | toaster? | `typeof appToaster` | A toaster from createToaster() – without it the app-wide one of toast() |
5093
+ | placement? | `ToasterOptions['placement']` | Where the toasts appear (default bottom-end) – also for the app-wide toaster of toast() |
5094
+ | max? | `number` | Toasts shown at once (default 5); more wait in a queue |
5095
+ | overlap? | `boolean` | Toasts lie on top of each other and fan out on hover or focus (instead of a list) |
5096
+ | gap? | `number` | Space between the toasts in px (default 12) |
5049
5097
  | label? | `string` | Accessible name of the notification region |
5050
5098
  | closeLabel? | `string` | Accessible name of each toast's close button |
5051
5099
  | showProgress? | `boolean` | Thin bar at the bottom that shows the remaining time (decorative; stops while paused) |
@@ -5068,6 +5116,9 @@ Button that stays pressed (aria-pressed), e.g. "Active only" – the label does
5068
5116
  | onPressedChange? | `(pressed: boolean) => void` | |
5069
5117
  | size? | `Size` | |
5070
5118
  | icon? | `IconComponent` | |
5119
+ | pressedIcon? | `IconComponent` | Icon while pressed (default: `icon`) – the label stays the same |
5120
+ | iconProps? | `Record<string, unknown>` | Props passed on to the icon component, e.g. { fill: 'currentColor' } for a filled icon or { strokeWidth: 1.5 } |
5121
+ | pressedIconProps? | `Record<string, unknown>` | Props of the icon while pressed, added to `iconProps` – e.g. { fill: 'currentColor' }: a filled icon when on |
5071
5122
  | classes? | `RecipeClasses<typeof toggleButtonRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
5072
5123
 
5073
5124
  ### Toggletip
@@ -5125,6 +5176,7 @@ No element of its own: the trigger is the slotted element
5125
5176
  | closeDelay? | `number` | Delay before closing (ms); default 150 or that of the TooltipGroup |
5126
5177
  | interactive? | `boolean` | The pointer can move onto the tooltip without it closing (WCAG 1.4.13) |
5127
5178
  | followCursor? | `boolean` | Follows the mouse pointer over the trigger |
5179
+ | closeOnScroll? | `boolean` | Closes when the page (or a container around the trigger) scrolls – false keeps it open while scrolling |
5128
5180
  | disabled? | `boolean` | Never opens (e.g. Truncate while the text fits) – the trigger stays the same element |
5129
5181
  | children | `ReactElement` | The trigger element – no wrapper of its own. A disabled button gets no pointer or focus events: wrap it in a focusable element (`<span tabIndex={0}>`) or use aria-disabled |
5130
5182
  | classes? | `RecipeClasses<typeof tooltipRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -5275,6 +5327,7 @@ Select whose options are a tree: the button opens the tree in a panel, choosing
5275
5327
  | onLoadChildren? | `(node: TreeNode) => void` | A lazy node opened and there is no loadChildren/dataSource: add its children to the items |
5276
5328
  | dataSource? | `DataSource<TreeNode>` | Source of the children of lazy nodes (`getChildren`) |
5277
5329
  | aria-label? | `string` | Accessible name without a surrounding Field |
5330
+ | id? | `string` | Id of the field (the trigger), e.g. for a `<label for>` |
5278
5331
  | className? | `string` | |
5279
5332
  | style? | `CSSProperties` | |
5280
5333
  | classes? | `RecipeClasses<typeof treeSelectRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -5488,9 +5541,11 @@ Year field ("2026"): type the digits, or pick from the year grid; range: start
5488
5541
  | invalid? | `boolean` | |
5489
5542
  | required? | `boolean` | |
5490
5543
  | name? | `string` | With range sent as name[0] and name[1] |
5544
+ | placeholder? | `string` | Text of the empty field, shown until it gets the focus – no replacement for a label |
5491
5545
  | size? | `'sm' \| 'md' \| 'lg'` | |
5492
5546
  | clearable? | `boolean` | Clear button in the field while it has a value |
5493
5547
  | aria-label? | `string` | Accessible name without a surrounding Field |
5548
+ | id? | `string` | Id of the field – the (first) date gets it; a `<label for>` cannot name it, use a Field or aria-label |
5494
5549
  | className? | `string` | |
5495
5550
  | style? | `CSSProperties` | |
5496
5551
  | classes? | `RecipeClasses<typeof datePicker>` | Extra classes per part of the date field, e.g. { control: "…" } (the calendar: RecipesProvider) |
@@ -5693,6 +5748,29 @@ that render components, such as `confirm` or the DataTable feature `dateInput`,
5693
5748
  components warn in the console when the classes of a recipe they render are missing. Recipes you call yourself
5694
5749
  (`card()`) are not checked – add their files along with the import.
5695
5750
 
5751
+ **With Vite** (Vue, React, Nuxt, Astro) the plugin `@wirecore/wirelayer-recipes/vite` adds these files itself: it reads
5752
+ the imports from `@wirecore/wirelayer-*` in your source files and adds the files of the imported components and recipes
5753
+ to the CSS file that imports `theme.css` (or `styles-core.css`). Put it before Tailwind's plugin:
5754
+
5755
+ ```ts
5756
+ // vite.config.ts (Nuxt: vite.plugins in nuxt.config.ts, Astro: vite.plugins in astro.config.mjs)
5757
+ import tailwindcss from '@tailwindcss/vite';
5758
+ import { wirelayer } from '@wirecore/wirelayer-recipes/vite';
5759
+
5760
+ export default { plugins: [wirelayer(), tailwindcss()] };
5761
+ ```
5762
+
5763
+ ```css
5764
+ @import 'tailwindcss';
5765
+ @import '@wirecore/wirelayer-vue/theme.css'; /* the plugin adds the sources files here */
5766
+ @import '@wirecore/wirelayer-vue/fonts.css'; /* the WireLayer fonts – leave it out with a font of your own */
5767
+ ```
5768
+
5769
+ `theme.css` is the theme without fonts and without component classes: an app with its own font
5770
+ (`@theme { --font-sans: … }`) does not bundle Schibsted Grotesk and JetBrains Mono. Components the plugin cannot see –
5771
+ registered globally (`app.component(…)`) or imported automatically – trigger the warning above; import their files by
5772
+ hand. Next.js does not use Vite: there, list the files or use `styles.css`.
5773
+
5696
5774
  ### Usage
5697
5775
 
5698
5776
  ```vue
@@ -5725,9 +5803,13 @@ import { ArrowRight } from 'lucide-react';
5725
5803
  // nuxt.config.ts
5726
5804
  import tailwindcss from '@tailwindcss/vite';
5727
5805
 
5806
+ import { wirelayer } from '@wirecore/wirelayer-recipes/vite';
5807
+
5728
5808
  export default defineNuxtConfig({
5729
- css: ['~/assets/main.css'], // @import 'tailwindcss'; @import '@wirecore/wirelayer-vue/styles.css';
5730
- vite: { plugins: [tailwindcss()] },
5809
+ // main.css: @import 'tailwindcss'; @import '@wirecore/wirelayer-vue/theme.css';
5810
+ // @import '@wirecore/wirelayer-vue/fonts.css'; – or styles.css with all classes, without the plugin
5811
+ css: ['~/assets/main.css'],
5812
+ vite: { plugins: [wirelayer(), tailwindcss()] },
5731
5813
  });
5732
5814
  ```
5733
5815
 
@@ -5810,6 +5892,31 @@ Every component consists of named parts of its recipe (`base`, `icon`, `row`, `t
5810
5892
  The names are the exports of the recipes (`button`, `iconButton`, `dataTable` …) and are checked by TypeScript, as are
5811
5893
  the variants and parts. Your own components use the same through `useRecipe('button', button)`.
5812
5894
 
5895
+ `variants` adds classes for single values of a variant, `compoundVariants` for combinations – instead of selectors on
5896
+ the recipe's own classes, which break when they change:
5897
+
5898
+ ```ts
5899
+ const recipes: RecipeConfig = {
5900
+ // only the medium size: 42px high, 16px text
5901
+ button: {
5902
+ variants: { size: { md: { base: 'h-[2.625rem] text-base' } } },
5903
+ compoundVariants: [{ size: ['sm', 'md'], shape: 'rounded', classes: { base: 'rounded-md' } }],
5904
+ },
5905
+ input: { variants: { size: { md: { base: 'h-[2.625rem]' } }, invalid: { true: { base: 'border-2' } } } },
5906
+ };
5907
+ ```
5908
+
5909
+ Per part the classes come in this order: `classes`, the matching `variants` and `compoundVariants`, the states of the
5910
+ recipe, the overrides of states (`invalid: { true: … }`), and last the class passed to the component. Inner providers
5911
+ extend outer ones (classes of the same value are joined, the inner ones win).
5912
+
5913
+ Classes from a provider or `classes` change the look, not the states: the classes of an active state variant
5914
+ (`invalid`, `success`, `disabled`, `readOnly`, `current`, `selected`, `checked`, `loading`) are added after them, so a
5915
+ field with `classes: { base: 'border-line-2' }` still turns red when it is invalid. States that the components mark as
5916
+ attributes (`data-invalid:`, `data-disabled:`, `data-[state=checked]:`) win through their selector anyway. Only the
5917
+ class passed to the component itself (`class`/`className`) comes after the states – the way out when a single field
5918
+ should look different in every state.
5919
+
5813
5920
  ### Hooks and composables
5814
5921
 
5815
5922
  Around 40 hooks (React) and composables (Vue) with the same names and the same logic – for your own components and
@@ -6188,6 +6295,56 @@ WireLayer is licensed under the MIT license. The fonts shipped with `@wirecore/w
6188
6295
  JetBrains Mono) are licensed under the SIL Open Font License 1.1 (`dist/fonts/OFL.txt`). Optional peer dependencies such
6189
6296
  as `pdfjs-dist` (Apache-2.0), Chart.js, Tiptap and Shiki are installed by the app itself – with their own licenses.
6190
6297
 
6298
+ ### Components and APIs side by side
6299
+
6300
+ | PrimeVue | WireLayer |
6301
+ | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
6302
+ | `<Button label icon="pi pi-x">` | the label as slot text, `:leading-icon` with a Lucide component (`@lucide/vue`) |
6303
+ | `severity` / `text` / `outlined` | `color` – or `variant="text"` / `variant="outline"` |
6304
+ | Icon button + `v-tooltip` | `<Tooltip content><IconButton :icon label /></Tooltip>` – `label` is the accessible name (often the tooltip text) |
6305
+ | `Button :loading` | `loading` on `Button` and `IconButton` (stays focusable, ignores clicks) |
6306
+ | `Card` with `#title`/`#content` | `Card` with the default slot and an own heading |
6307
+ | `InputText`, `Password`, `InputNumber`, `InputChips`, `SelectButton`, `RadioButton` | `Input`, `PasswordInput`, `NumberInput`, `TagsInput`, `SegmentedControl`, `RadioGroup` + `RadioGroupItem` |
6308
+ | `IconField` + `InputIcon` | `Input :leading-icon` |
6309
+ | `Select :options optionLabel optionValue` | `Select :items item-label item-value` (object values: `value-key`) |
6310
+ | `Message severity` | `Alert status` (`error` → `danger`) |
6311
+ | `Tag` | `Badge` |
6312
+ | `Dialog v-model:visible header` | `Dialog v-model:open` + `DialogContent title size` (`hide-title` keeps the title for screen readers only) |
6313
+ | `Toolbar` as a container | a plain `div` – WireLayer's `Toolbar` is `role="toolbar"` (one tab stop, arrow keys) |
6314
+ | `useToast().add({ severity, summary, detail, life })` | `toast({ type, title, description, duration })`, `<Toaster />` once in the app |
6315
+ | `useConfirm().require({ … })` | `await confirm({ title, description, … })`, `<ConfirmDialog />` once in the app |
6316
+ | `DataTable` + `Column` | `DataTable :columns` (column objects), `#cell-<id>`, `#expansion`, `v-model:page-size` |
6317
+ | `expandedRows` with a row toggler on some rows | `#expansion` + `row-expandable` |
6318
+ | `paginatorTemplate` (first/last page) | `paginator-edges`, `paginator-align` |
6319
+ | `showGridlines` (with the outer border) | `gridlines` + `bordered` |
6320
+ | `FilterMatchMode`, `filters` | `v-model:global-filter`, column `filter`/`filterOptions`, `filter-display="row"` |
6321
+ | `@primevue/forms` + `zodResolver` | TanStack Form with Zod directly as a Standard Schema, `FormField` + `bindInput`/`bindValue` |
6322
+ | `pt` (pass-through) | `classes` per part, `RecipesProvider` for all components below it |
6323
+ | Theme preset (`definePreset`) | `--wc-*` tokens, `defineTheme`, the component variables (_Foundations › Themes_) |
6324
+ | `darkModeSelector` (a class) | `data-mode` on `<html>` |
6325
+ | `tailwindcss-primeui` (`bg-surface-*`, `text-muted-color`) | semantic tokens: `bg-card`, `bg-bg-2`, `text-muted`, `border-line` … |
6326
+
6327
+ ### Pitfalls
6328
+
6329
+ - **An empty choice is `null`, not `''`.** For PrimeVue's Select `''` means "nothing chosen"; WireLayer's Select treats
6330
+ `''` as a value (it warns in development that it is not among the items). Use `null`.
6331
+ - **TanStack fields start with `''`.** A required text in Zod therefore needs `.min(1)` – `z.string()` alone accepts
6332
+ the empty field.
6333
+ - **Fonts:** set your own with `@theme { --font-sans: … }`. Import `theme.css` instead of `styles.css` (with the
6334
+ sources files, or the Vite plugin `@wirecore/wirelayer-recipes/vite`) so the WireLayer fonts are not bundled
6335
+ (_Getting started › Welcome › Smaller CSS_).
6336
+ - **Card spacing:** `Card` puts a `gap` between its direct children – wrap content that should sit tight in one
6337
+ element.
6338
+ - **Overrides go per part and per variant.** `classes: { base: 'rounded-md' }` reaches every size; only the medium size
6339
+ with `variants: { size: { md: { base: '…' } } }` – no selectors on the recipe's own classes. States such as `invalid`
6340
+ stay visible over such classes; only `class` on the component itself replaces them.
6341
+ - **Sizes and corners in one place:** the height, text and corners of buttons and fields per size, the corners of
6342
+ rounded buttons, the padding of cards and the backdrop of dialogs are CSS variables (`--wc-control-h-md` …).
6343
+ - **Labels:** wrap a control in `Field` (it links label, description and error). A native `<label for>` works with the
6344
+ control's own `id`; date fields, sliders and groups need `Field` or `aria-label`.
6345
+ - **Brand colours:** `checkTheme` lists the pairs below WCAG AA, `suggestThemeFixes` the nearest colours (and `on-*`
6346
+ colours) that meet them – an orange `primary` with white text, common in PrimeVue themes, does not.
6347
+
6191
6348
  ### Custom theme
6192
6349
 
6193
6350
  A theme overrides any colors per mode. `themeToCss` generates the CSS for it,
@@ -6213,3 +6370,47 @@ writeFileSync('brand.css', themeToCss(brand));
6213
6370
  ```
6214
6371
 
6215
6372
  All bundled themes pass this check in both modes.
6373
+
6374
+ When a pair misses its contrast, `suggestThemeFixes` says how to fix it: per pair the nearest variant of a colour that
6375
+ meets it – its lightness moved in OKLCH, the hue kept – and, where text sits on the colour, a light or dark `on-*`
6376
+ colour. A suggestion never breaks a pair that passed:
6377
+
6378
+ ```ts
6379
+ import { suggestThemeFixes } from '@wirecore/wirelayer-tokens';
6380
+
6381
+ suggestThemeFixes(brand);
6382
+ // [{ name: 'primary: text-on-primary on bg-primary', mode: 'light', ratio: 2.6, min: 4.5,
6383
+ // color: { token: 'primary', value: '#a35c00', ratio: 4.5 },
6384
+ // on: { token: 'on-primary', value: '#050505', ratio: 8.1 } }, …]
6385
+ ```
6386
+
6387
+ ### Component sizes and shapes
6388
+
6389
+ Besides the colors, a few measures that a brand usually changes are CSS variables. Without them every component looks as
6390
+ before – their defaults are the values of the recipes. Set them on `:root` (all pages), on a `[data-theme]` or on any
6391
+ element (that part of the page):
6392
+
6393
+ ```css
6394
+ :root {
6395
+ --wc-control-h-md: 2.625rem; /* buttons and fields of the medium size: 42px */
6396
+ --wc-control-text-md: 1rem;
6397
+ --wc-control-radius-md: 0.375rem;
6398
+ --wc-button-radius: 0.375rem;
6399
+ --wc-card-p: 1.25rem;
6400
+ --wc-backdrop: rgb(0 0 0 / 0.4);
6401
+ }
6402
+ ```
6403
+
6404
+ | Variable | Default | Applies to |
6405
+ | ----------------------------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
6406
+ | `--wc-control-h-sm` / `-md` / `-lg` | `2rem` / `2.5rem` / `3rem` | Height of the sizes sm, md, lg: Button, IconButton, Input, NativeSelect, Select, MultiSelect, Combobox, NumberInput, PasswordInput, the date and time fields, ColorPicker, TagsInput (minimum) |
6407
+ | `--wc-control-radius-sm` / `-md` / `-lg` | `6px` / `8px` / `10px` | Corners of the fields above and of Textarea (not of buttons) |
6408
+ | `--wc-control-text-sm` / `-md` / `-lg` | `13px` / `15px` / `16px` | Text in the fields above and in Textarea |
6409
+ | `--wc-button-radius` | `8px` | Corners of Button and IconButton with `shape="rounded"` (`pill` and `square` stay) |
6410
+ | `--wc-card-p` | `1.5rem` | Padding of Card |
6411
+ | `--wc-backdrop` | `rgb(0 0 0 / 0.6)` | Dimming behind Dialog, Drawer and ConfirmDialog |
6412
+ | `--radius-card` / `--radius-panel` / `--radius-popup` | `20px` / `28px` / `12px` | Corners of cards, panels and popups (menus, lists, popovers) |
6413
+ | `--wc-dialog-w` | by `size` | Width of a DialogContent |
6414
+
6415
+ The rest – the padding of a dialog or of table cells, the size of a single variant – is set per part with `classes` or
6416
+ `RecipesProvider` (_Getting started › Welcome › Customizing_). The React Native components keep their fixed sizes.