@wirecore/wirelayer-react 0.5.0 → 0.6.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 (72) hide show
  1. package/dist/Button-Cd7lufvJ.js +60 -0
  2. package/dist/{ContextMenu-qh-bB9Lw.js → ContextMenu-CjDI7Jy5.js} +459 -451
  3. package/dist/{Field-hc416yJx.js → Field-DkYxlVar.js} +5 -2
  4. package/dist/{Highlight-DdTridk2.js → Highlight-CX30-nP7.js} +22 -18
  5. package/dist/{Input-OPRvjIYt.js → Input-D8U-Auys.js} +20 -19
  6. package/dist/{InputStatus-DS38XEkX.js → InputStatus-hVzkU_4q.js} +4 -1
  7. package/dist/{PasswordInput-B9k0GuSx.js → PasswordInput-DivSjtN8.js} +1 -1
  8. package/dist/{Select-PbxrUYi1.js → Select-Cx3KwSzU.js} +84 -83
  9. package/dist/{Tree-eqv4DIQn.js → Tree-BiPIkmwT.js} +2 -2
  10. package/dist/chart/Chart.d.ts +11 -5
  11. package/dist/chart/Chart.d.ts.map +1 -1
  12. package/dist/chart/index.d.ts +2 -0
  13. package/dist/chart/index.d.ts.map +1 -1
  14. package/dist/chart.js +43 -36
  15. package/dist/code.js +1 -1
  16. package/dist/components/Badge/Badge.d.ts +3 -1
  17. package/dist/components/Badge/Badge.d.ts.map +1 -1
  18. package/dist/components/Button/Button.d.ts +6 -1
  19. package/dist/components/Button/Button.d.ts.map +1 -1
  20. package/dist/components/ChipGroup/ChipGroup.d.ts +1 -1
  21. package/dist/components/ChipGroup/ChipGroup.d.ts.map +1 -1
  22. package/dist/components/Combobox/Combobox.d.ts +7 -2
  23. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  24. package/dist/components/DatePicker/DatePicker.d.ts +2 -0
  25. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  26. package/dist/components/DatePicker/DatePickerBase.d.ts +3 -1
  27. package/dist/components/DatePicker/DatePickerBase.d.ts.map +1 -1
  28. package/dist/components/DateRangePicker/DateRangePicker.d.ts +2 -0
  29. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  30. package/dist/components/Dialog/Dialog.d.ts +5 -1
  31. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  32. package/dist/components/Field/context.d.ts +3 -1
  33. package/dist/components/Field/context.d.ts.map +1 -1
  34. package/dist/components/FileUpload/FileUpload.d.ts +9 -2
  35. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
  36. package/dist/components/IconButton/IconButton.d.ts +3 -1
  37. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  38. package/dist/components/MonthPicker/MonthPicker.d.ts +2 -0
  39. package/dist/components/MonthPicker/MonthPicker.d.ts.map +1 -1
  40. package/dist/components/MultiSelect/MultiSelect.d.ts +7 -2
  41. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  42. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  43. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  44. package/dist/components/SegmentedControl/SegmentedControl.d.ts +3 -3
  45. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  46. package/dist/components/Select/Select.d.ts +9 -2
  47. package/dist/components/Select/Select.d.ts.map +1 -1
  48. package/dist/components/Toast/Toaster.d.ts +10 -2
  49. package/dist/components/Toast/Toaster.d.ts.map +1 -1
  50. package/dist/components/ToggleButton/ToggleButton.d.ts +7 -1
  51. package/dist/components/ToggleButton/ToggleButton.d.ts.map +1 -1
  52. package/dist/components/YearPicker/YearPicker.d.ts +2 -0
  53. package/dist/components/YearPicker/YearPicker.d.ts.map +1 -1
  54. package/dist/data-table/DataTable.d.ts +20 -2
  55. package/dist/data-table/DataTable.d.ts.map +1 -1
  56. package/dist/data-table/FilterMenu.d.ts +7 -1
  57. package/dist/data-table/FilterMenu.d.ts.map +1 -1
  58. package/dist/data-table/ValueInput.d.ts +8 -1
  59. package/dist/data-table/ValueInput.d.ts.map +1 -1
  60. package/dist/data-table/index.d.ts +1 -1
  61. package/dist/data-table/index.d.ts.map +1 -1
  62. package/dist/data-table/types.d.ts +29 -1
  63. package/dist/data-table/types.d.ts.map +1 -1
  64. package/dist/data-table.js +1214 -1139
  65. package/dist/editor.js +1 -1
  66. package/dist/form.js +3 -3
  67. package/dist/index.js +2606 -2578
  68. package/dist/pdf.js +5 -5
  69. package/dist/virtual.js +2 -2
  70. package/llms-full.txt +35 -11
  71. package/package.json +2 -2
  72. package/dist/Button-DFVVqBuY.js +0 -58
package/dist/pdf.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { a as e, i as t, n } from "./RecipesProvider-0idafuGm.js";
3
- import { t as r } from "./Button-DFVVqBuY.js";
4
- import { t as i } from "./Field-hc416yJx.js";
5
- import { n as a, t as o } from "./Select-PbxrUYi1.js";
6
- import { c as s, i as c, l, n as u, s as d, t as ee, u as te } from "./PasswordInput-B9k0GuSx.js";
7
- import { t as ne } from "./Tree-eqv4DIQn.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-Cx3KwSzU.js";
6
+ import { c as s, i as c, l, n as u, s as d, t as ee, u as te } from "./PasswordInput-DivSjtN8.js";
7
+ import { t as ne } from "./Tree-BiPIkmwT.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";
package/dist/virtual.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
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-DdTridk2.js";
4
- import { i as o, n as ee, o as s, r as c } from "./Tree-eqv4DIQn.js";
3
+ import { a as n, c as r, o as i, s as a } from "./Highlight-CX30-nP7.js";
4
+ import { i as o, n as ee, o as s, r as c } from "./Tree-BiPIkmwT.js";
5
5
  import { flattenTree as l, select as u, tree as te, virtualList as d, virtualListBox as ne } from "@wirecore/wirelayer-recipes";
6
6
  import { Check as f, ChevronDown as p, LoaderCircle as m, X as h } from "lucide-react";
7
7
  import { useEffect as g, useId as _, useImperativeHandle as re, useMemo as v, useRef as y, useState as ie } from "react";
package/llms-full.txt CHANGED
@@ -343,6 +343,7 @@ Short label or status (solid, soft, outline or a status colour)
343
343
  | --- | --- | --- |
344
344
  | variant? | `BadgeVariant` | |
345
345
  | icon? | `IconComponent` | Icon component rendered before the text |
346
+ | iconProps? | `Record<string, unknown>` | Props passed on to the icon component, e.g. { fill: 'currentColor' } for a filled icon or { strokeWidth: 1.5 } |
346
347
  | circle? | `boolean` | Round shape for a count or a single character (grows into a pill for longer content) |
347
348
  | classes? | `RecipeClasses<typeof badgeRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
348
349
 
@@ -521,6 +522,7 @@ Button in the variants of the design, with leading/trailing icon; loading keeps
521
522
  | block? | `boolean` | Full width of the container |
522
523
  | leadingIcon? | `IconComponent` | Icon component rendered before the label |
523
524
  | trailingIcon? | `IconComponent` | Icon component rendered after the label |
525
+ | 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
526
  | loading? | `boolean` | Shows a spinner and ignores clicks; stays focusable (aria-disabled + aria-busy) so focus is not lost |
525
527
  | badge? | `number \| boolean` | Counter (number > 0) or dot (true) after the label |
526
528
  | 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 |
@@ -688,9 +690,10 @@ Canvas with role="img" named by the title; the data table is its text alternativ
688
690
 
689
691
  | Prop | Type | Description |
690
692
  | --- | --- | --- |
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) |
693
+ | type | `TType` | Chart.js chart type – it alone decides the types of `data`, `options` and `plugins` |
694
+ | data | `ChartData<NoInfer<TType>>` | |
695
+ | 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 |
696
+ | plugins? | `Plugin<NoInfer<TType>>[]` | Inline Chart.js plugins of this chart (global ones: `Chart.register`) – changing them re-creates the chart |
694
697
  | title | `string` | Title of the chart, also its accessible name |
695
698
  | hideTitle? | `boolean` | Keep the title for screen readers only, e.g. inside a card that already has a heading |
696
699
  | height? | `string` | Height of the chart area (CSS length) |
@@ -927,7 +930,7 @@ Filter chips: one or several options as toggle buttons
927
930
  | defaultValue? | `string[]` | |
928
931
  | onValueChange? | `(value: string[]) => void` | |
929
932
  | multiple? | `boolean` | Allow several selected chips (default) or only one |
930
- | label? | `string` | Accessible name of the group |
933
+ | label? | `string` | Accessible name of the group – inside a Field with a label, the Field's label names it |
931
934
  | disabled? | `boolean` | |
932
935
  | classes? | `RecipeClasses<typeof chipGroupRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
933
936
 
@@ -1093,7 +1096,7 @@ Text field with suggestions (autocomplete): type to filter, arrow keys to choose
1093
1096
  | onValueChange? | `(value: V \| null) => void` | |
1094
1097
  | onInputValueChange? | `(inputValue: string) => void` | Every change of the text (typing, choosing, clearing) |
1095
1098
  | 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) |
1099
+ | filter? | `boolean` | Filters the items by the typed text (label and itemKeywords; ignores case and accents) |
1097
1100
  | manualFilter? | `boolean` | The items are filtered elsewhere (server): no local filtering, listen to onFilterChange |
1098
1101
  | allowCustomValue? | `boolean` | Typed text that matches no item becomes the value (a string) on Enter or when leaving the field – an editable select |
1099
1102
  | emptyText? | `string` | Shown when nothing matches |
@@ -1104,6 +1107,7 @@ Text field with suggestions (autocomplete): type to filter, arrow keys to choose
1104
1107
  | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
1105
1108
  | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
1106
1109
  | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item: property name or function (default: `group`); items are listed per group |
1110
+ | 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
1111
  | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
1108
1112
  | clearable? | `boolean` | Button that clears value and text (default true; not a tab stop – the text can be deleted, too) |
1109
1113
  | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
@@ -1410,6 +1414,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1410
1414
  | selectionMode? | `'multiple' \| 'single'` | `multiple` (checkboxes, default) or `single` (radio buttons) |
1411
1415
  | selection? | `string[]` | |
1412
1416
  | onSelectionChange? | `(selection: string[]) => void` | |
1417
+ | selectedRows? | `readonly TData[]` | The selected rows as objects – controlled with onSelectedRowsChange (instead of or next to `selection`); rows are found by `getRowId` |
1413
1418
  | onSelectedRowsChange? | `(rows: TData[]) => void` | The selected rows as objects (rows of other pages are remembered) |
1414
1419
  | selectOnRowClick? | `boolean` | A click on the row (not on its controls) selects it; Shift+click selects a range |
1415
1420
  | isRowSelectable? | `(row: TData) => boolean` | Rows that cannot be selected get a disabled checkbox |
@@ -1437,6 +1442,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1437
1442
  | search? | `boolean` | Search field above the table: filters over all columns |
1438
1443
  | globalFilter? | `string` | |
1439
1444
  | onGlobalFilterChange? | `(value: string) => void` | |
1445
+ | 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
1446
  | highlightSearch? | `boolean` | Marks the search hits in the cells |
1441
1447
  | filters? | `Record<string, DataTableFilterValue>` | Column filters by column id; controlled together with onFiltersChange |
1442
1448
  | onFiltersChange? | `(filters: Record<string, DataTableFilterValue>) => void` | |
@@ -1444,6 +1450,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1444
1450
  | showFilters? | `boolean` | Shows the filter row or menus (`filterToggle`); controlled with onShowFiltersChange – the filters keep working |
1445
1451
  | onShowFiltersChange? | `(show: boolean) => void` | |
1446
1452
  | filterToggle? | `boolean` | Button in the toolbar that shows and hides the filters |
1453
+ | filterReset? | `boolean` | Button in the toolbar that clears the column filters, the search and the advanced filter (`resetFilters()`) |
1447
1454
  | maxConstraints? | `number` | Conditions per column in the filter menu |
1448
1455
  | resizable? | `boolean` | Column widths can be changed by dragging the header edge or with the arrow keys |
1449
1456
  | columnToggle? | `boolean` | Menu above the table to show and hide columns |
@@ -1496,6 +1503,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1496
1503
  | onScrollEnd? | `() => void` | |
1497
1504
  | stateKey? | `string` | Keeps sorting, filters, page, widths, order and the other settings in the browser under this key |
1498
1505
  | stateStorage? | `'local' \| 'session'` | |
1506
+ | stateExclude? | `readonly DataTableStateKey[]` | Parts of the state that `stateKey` does not keep – default: the selection (`[]` keeps it, too) |
1499
1507
  | toolbar? | `ReactNode` | Own controls in the toolbar, after the search |
1500
1508
  | toolbarStart? | `ReactNode` | Own controls at the start of the toolbar, before the search |
1501
1509
  | toolbarEnd? | `ReactNode` | Own controls at the end of the toolbar, before the built-in buttons |
@@ -1576,6 +1584,7 @@ Date field: type the digits one after another (the separators come from the loca
1576
1584
  | invalid? | `boolean` | |
1577
1585
  | required? | `boolean` | |
1578
1586
  | name? | `string` | |
1587
+ | placeholder? | `string` | Text of the empty field, shown until it gets the focus – no replacement for a label |
1579
1588
  | size? | `'sm' \| 'md' \| 'lg'` | |
1580
1589
  | clearable? | `boolean` | Clear button in the field while it has a value |
1581
1590
  | showButtonBar? | `boolean` | "Today" and "Clear" below the calendar |
@@ -1620,6 +1629,7 @@ Start and end in one field ("10/20/2026 – 10/24/2026"); the calendar picks sta
1620
1629
  | invalid? | `boolean` | |
1621
1630
  | required? | `boolean` | |
1622
1631
  | name? | `string` | Sent as name[0] and name[1] |
1632
+ | placeholder? | `string` | Text of the empty field, shown until it gets the focus – no replacement for a label |
1623
1633
  | presets? | `(string \| { label: string; value: DateRangeLike })[]` | Buttons below the calendar: presets ("last7Days", "thisMonth", "thisQuarter", "last3Months", "last12Months", "last3Years" …) or own { label, value } ranges |
1624
1634
  | size? | `'sm' \| 'md' \| 'lg'` | |
1625
1635
  | clearable? | `boolean` | Clear button in the field while it has a value |
@@ -1707,7 +1717,7 @@ The modal window of a Dialog: title, description, focus trap, Escape closes
1707
1717
  | description? | `string` | |
1708
1718
  | icon? | `IconComponent` | Icon component in the coloured box at the top |
1709
1719
  | status? | `DialogStatus` | |
1710
- | size? | `OverlaySize` | Maximum width: sm 320px, md 400px (default), lg 560px, xl 800px, full (screen width minus the margin) |
1720
+ | 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
1721
  | position? | `DialogPosition` | Where the dialog sits: centred (default), at the top/bottom or the start/end edge |
1712
1722
  | fullscreen? | `boolean` | Covers the whole screen |
1713
1723
  | maximizable? | `boolean` | Button in the header that switches between the normal size and the whole screen |
@@ -2021,7 +2031,8 @@ Drop files onto the zone or choose them with the button (the keyboard path). Acc
2021
2031
  | accept? | `string \| string[]` | Allowed types, e.g. "application/pdf" or ["image/png", "image/jpeg"] (presets: FileTypes.images …) |
2022
2032
  | maxFiles? | `number` | |
2023
2033
  | maxFileSize? | `number` | Maximum size per file in bytes |
2024
- | onFilesChange? | `(files: File[]) => void` | The accepted files after every change |
2034
+ | 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) |
2035
+ | onFilesChange? | `(files: File[]) => void` | The accepted files after every change (rejected files: onFilesReject) |
2025
2036
  | 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
2037
  | onUploadComplete? | `(file: File, state: UploadState) => void` | A file finished uploading (or failed) |
2027
2038
  | dropzoneText? | `string` | Text in the drop zone |
@@ -2033,6 +2044,7 @@ Drop files onto the zone or choose them with the button (the keyboard path). Acc
2033
2044
  | preview? | `boolean` | Thumbnails for images (object URLs, released again) |
2034
2045
  | fullscreenDrop? | `boolean` | Files can be dropped anywhere in the window |
2035
2046
  | paste? | `boolean` | Ctrl+V inside the component adds files from the clipboard |
2047
+ | showFileList? | `boolean` | The list of the chosen files below the drop zone – false when the app shows the files itself |
2036
2048
  | disabled? | `boolean` | |
2037
2049
  | invalid? | `boolean` | |
2038
2050
  | required? | `boolean` | |
@@ -2471,6 +2483,7 @@ Button with only an icon; the label is its accessible name, optionally with a co
2471
2483
  | Prop | Type | Description |
2472
2484
  | --- | --- | --- |
2473
2485
  | icon | `IconComponent` | Icon component |
2486
+ | iconProps? | `Record<string, unknown>` | Props passed on to the icon component, e.g. { fill: 'currentColor' } for a filled icon or { strokeWidth: 1.5 } |
2474
2487
  | label | `string` | Accessible name – icon buttons have no visible text |
2475
2488
  | variant? | `IconButtonVariant` | |
2476
2489
  | color? | `ButtonColor` | Colour combined with the variant, like Button `color` (e.g. a danger text button) |
@@ -3161,6 +3174,7 @@ Month field ("10.2026"): type the digits in one go, or pick from the month grid;
3161
3174
  | invalid? | `boolean` | |
3162
3175
  | required? | `boolean` | |
3163
3176
  | name? | `string` | With range sent as name[0] and name[1] |
3177
+ | placeholder? | `string` | Text of the empty field, shown until it gets the focus – no replacement for a label |
3164
3178
  | size? | `'sm' \| 'md' \| 'lg'` | |
3165
3179
  | clearable? | `boolean` | Clear button in the field while it has a value |
3166
3180
  | aria-label? | `string` | Accessible name without a surrounding Field |
@@ -3193,6 +3207,7 @@ Select with several values: the list stays open while choosing, Space/Enter togg
3193
3207
  | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
3194
3208
  | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
3195
3209
  | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item: property name or function (default: `group`); items are listed per group |
3210
+ | 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
3211
  | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
3197
3212
  | display? | `'text' \| 'chips'` | Selected items as text (default) or as chips with a remove button each (Backspace removes the last) |
3198
3213
  | checkboxes? | `boolean` | Check boxes before the options (default); false shows a check mark after the label |
@@ -3202,7 +3217,7 @@ Select with several values: the list stays open while choosing, Space/Enter togg
3202
3217
  | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
3203
3218
  | loadingText? | `string` | Text of the loading row in the list |
3204
3219
  | 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 |
3220
+ | filter? | `boolean` | Search field at the top of the list; filters by label and itemKeywords, ignoring case and accents |
3206
3221
  | manualFilter? | `boolean` | The items are filtered elsewhere (server): no local filtering, listen to onFilterChange |
3207
3222
  | onFilterChange? | `(text: string) => void` | Text of the search field (filter) – e.g. to load matching items from a server (manualFilter) |
3208
3223
  | emptyText? | `string` | Shown when no item is left (default "No results" / "No entries") |
@@ -3908,7 +3923,7 @@ One choice out of several (role="radiogroup", arrow keys), horizontal or vertica
3908
3923
  | value? | `string \| null` | |
3909
3924
  | defaultValue? | `string \| null` | |
3910
3925
  | onValueChange? | `(value: string \| null) => void` | |
3911
- | label? | `string` | Visible group label (otherwise pass aria-label) |
3926
+ | label? | `string` | Visible group label (otherwise pass aria-label – or place the group in a Field with a label) |
3912
3927
  | orientation? | `RadioGroupOrientation` | |
3913
3928
  | columns? | `number` | Cards in a grid with this many columns (one column on small screens) – for RadioCard |
3914
3929
  | disabled? | `boolean` | |
@@ -4211,7 +4226,7 @@ Few exclusive options as a segmented switch (radio group)
4211
4226
  | value? | `string \| null` | |
4212
4227
  | defaultValue? | `string` | |
4213
4228
  | onValueChange? | `(value: string \| null) => void` | |
4214
- | label | `string` | Accessible name of the group (visually hidden) |
4229
+ | label? | `string` | Accessible name of the group (visually hidden) – inside a Field with a label, the Field's label names it |
4215
4230
  | size? | `SegmentedControlSize` | |
4216
4231
  | disabled? | `boolean` | |
4217
4232
  | name? | `string` | |
@@ -4256,12 +4271,13 @@ Dropdown list for one option: arrow keys, typeahead, Escape; native select hidde
4256
4271
  | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
4257
4272
  | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
4258
4273
  | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item: property name or function (default: `group`); items are listed per group |
4274
+ | 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
4275
  | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
4260
4276
  | clearable? | `boolean` | Button that clears the value (also Backspace/Delete on the closed field) |
4261
4277
  | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
4262
4278
  | loadingText? | `string` | Text of the loading row in the list |
4263
4279
  | 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 |
4280
+ | filter? | `boolean` | Search field at the top of the list; filters by label and itemKeywords, ignoring case and accents |
4265
4281
  | manualFilter? | `boolean` | The items are filtered elsewhere (server): no local filtering, listen to onFilterChange |
4266
4282
  | onFilterChange? | `(text: string) => void` | Text of the search field (filter) – e.g. to load matching items from a server (manualFilter) |
4267
4283
  | emptyText? | `string` | Shown when no item is left (default "No results" / "No entries") |
@@ -5046,6 +5062,10 @@ Place once in the app; show toasts with toast({ title, description, type, action
5046
5062
  | Prop | Type | Description |
5047
5063
  | --- | --- | --- |
5048
5064
  | toaster? | `typeof appToaster` | A toaster from createToaster() – without it the app-wide one of toast() |
5065
+ | placement? | `ToasterOptions['placement']` | Where the toasts appear (default bottom-end) – also for the app-wide toaster of toast() |
5066
+ | max? | `number` | Toasts shown at once (default 5); more wait in a queue |
5067
+ | overlap? | `boolean` | Toasts lie on top of each other and fan out on hover or focus (instead of a list) |
5068
+ | gap? | `number` | Space between the toasts in px (default 12) |
5049
5069
  | label? | `string` | Accessible name of the notification region |
5050
5070
  | closeLabel? | `string` | Accessible name of each toast's close button |
5051
5071
  | showProgress? | `boolean` | Thin bar at the bottom that shows the remaining time (decorative; stops while paused) |
@@ -5068,6 +5088,9 @@ Button that stays pressed (aria-pressed), e.g. "Active only" – the label does
5068
5088
  | onPressedChange? | `(pressed: boolean) => void` | |
5069
5089
  | size? | `Size` | |
5070
5090
  | icon? | `IconComponent` | |
5091
+ | pressedIcon? | `IconComponent` | Icon while pressed (default: `icon`) – the label stays the same |
5092
+ | iconProps? | `Record<string, unknown>` | Props passed on to the icon component, e.g. { fill: 'currentColor' } for a filled icon or { strokeWidth: 1.5 } |
5093
+ | pressedIconProps? | `Record<string, unknown>` | Props of the icon while pressed, added to `iconProps` – e.g. { fill: 'currentColor' }: a filled icon when on |
5071
5094
  | classes? | `RecipeClasses<typeof toggleButtonRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
5072
5095
 
5073
5096
  ### Toggletip
@@ -5488,6 +5511,7 @@ Year field ("2026"): type the digits, or pick from the year grid; range: start
5488
5511
  | invalid? | `boolean` | |
5489
5512
  | required? | `boolean` | |
5490
5513
  | name? | `string` | With range sent as name[0] and name[1] |
5514
+ | placeholder? | `string` | Text of the empty field, shown until it gets the focus – no replacement for a label |
5491
5515
  | size? | `'sm' \| 'md' \| 'lg'` | |
5492
5516
  | clearable? | `boolean` | Clear button in the field while it has a value |
5493
5517
  | aria-label? | `string` | Accessible name without a surrounding Field |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecore/wirelayer-react",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "WireLayer components for React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -162,7 +162,7 @@
162
162
  "dependencies": {
163
163
  "@ark-ui/react": "^5.39.3",
164
164
  "@internationalized/date": "^3.12.4",
165
- "@wirecore/wirelayer-recipes": "^0.4.1",
165
+ "@wirecore/wirelayer-recipes": "^0.5.0",
166
166
  "@wirecore/wirelayer-tokens": "^0.3.0",
167
167
  "lucide-react": "^1.59.0"
168
168
  },
@@ -1,58 +0,0 @@
1
- "use client";
2
- import { n as e } from "./RecipesProvider-0idafuGm.js";
3
- import { button as t, buttonColorKey as n, formatCount as r, spinner as i } from "@wirecore/wirelayer-recipes";
4
- import { LoaderCircle as a } from "lucide-react";
5
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { ark as l } from "@ark-ui/react/factory";
7
- //#region src/components/Button/Button.tsx
8
- function u({ classes: u, variant: d, color: f, size: p, shape: m, block: h, leadingIcon: g, trailingIcon: _, loading: v = !1, disabled: y = !1, type: b = "button", badge: x = !1, badgeLabel: S = (e) => e === null ? "new" : `${e} new`, asChild: C = !1, className: w, children: T, onClick: E, ...D }) {
9
- let O = e("button", t, u), k = e("spinner", i), A = O({
10
- variant: d,
11
- color: n(f),
12
- size: p,
13
- shape: m,
14
- block: h
15
- }), j = typeof x == "number" && x > 0 ? x : 0;
16
- return /* @__PURE__ */ s(l.button, {
17
- ...D,
18
- className: A.base({ class: w }),
19
- asChild: C,
20
- type: C ? void 0 : b,
21
- disabled: C ? void 0 : y,
22
- "aria-disabled": v || void 0,
23
- "aria-busy": v || void 0,
24
- onClick: (e) => {
25
- v ? e.preventDefault() : E?.(e);
26
- },
27
- children: C ? T : /* @__PURE__ */ c(o, { children: [
28
- v ? /* @__PURE__ */ s(a, {
29
- className: k().icon({ class: A.icon() }),
30
- "aria-hidden": "true"
31
- }) : g && /* @__PURE__ */ s(g, {
32
- className: A.icon(),
33
- "aria-hidden": "true"
34
- }),
35
- T,
36
- _ && /* @__PURE__ */ s(_, {
37
- className: A.icon(),
38
- "aria-hidden": "true"
39
- }),
40
- j ? /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("span", {
41
- className: A.badge(),
42
- "aria-hidden": "true",
43
- children: r(j)
44
- }), /* @__PURE__ */ s("span", {
45
- className: A.badgeLabel(),
46
- children: ` ${S(r(j))}`
47
- })] }) : x === !0 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("span", {
48
- className: A.dot(),
49
- "aria-hidden": "true"
50
- }), /* @__PURE__ */ s("span", {
51
- className: A.badgeLabel(),
52
- children: ` ${S(null)}`
53
- })] })
54
- ] })
55
- });
56
- }
57
- //#endregion
58
- export { u as t };