@wirecore/wirelayer-react 0.6.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 (125) hide show
  1. package/dist/Checkbox-BMRax6m4.js +49 -0
  2. package/dist/ContextMenu-BD72S5n6.js +1452 -0
  3. package/dist/{Highlight-CX30-nP7.js → Highlight-43-H9459.js} +93 -86
  4. package/dist/Input-C8T3WLd5.js +119 -0
  5. package/dist/PasswordInput-SjO66gZB.js +422 -0
  6. package/dist/Select-7rfeNmJb.js +242 -0
  7. package/dist/Slider-Bfm_jjYE.js +80 -0
  8. package/dist/{Tree-BiPIkmwT.js → Tree-DVjwp6FG.js} +1 -1
  9. package/dist/chart.js +1 -1
  10. package/dist/components/AngleSlider/AngleSlider.d.ts +3 -1
  11. package/dist/components/AngleSlider/AngleSlider.d.ts.map +1 -1
  12. package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
  13. package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  14. package/dist/components/Carousel/Carousel.d.ts +3 -1
  15. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  16. package/dist/components/CascadeSelect/CascadeSelect.d.ts +3 -1
  17. package/dist/components/CascadeSelect/CascadeSelect.d.ts.map +1 -1
  18. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  19. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  20. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -1
  21. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  22. package/dist/components/Combobox/Combobox.d.ts +1 -1
  23. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  24. package/dist/components/Confirm/ConfirmDialog.d.ts +6 -1
  25. package/dist/components/Confirm/ConfirmDialog.d.ts.map +1 -1
  26. package/dist/components/Confirm/confirm.d.ts +7 -0
  27. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  28. package/dist/components/DatePicker/DatePicker.d.ts +3 -1
  29. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  30. package/dist/components/DatePicker/DatePickerBase.d.ts +3 -1
  31. package/dist/components/DatePicker/DatePickerBase.d.ts.map +1 -1
  32. package/dist/components/DateRangePicker/DateRangePicker.d.ts +3 -1
  33. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  34. package/dist/components/Dialog/Dialog.d.ts +3 -1
  35. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  36. package/dist/components/Drawer/Drawer.d.ts +3 -1
  37. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  38. package/dist/components/DurationInput/DurationInput.d.ts +3 -1
  39. package/dist/components/DurationInput/DurationInput.d.ts.map +1 -1
  40. package/dist/components/IconButton/IconButton.d.ts +3 -1
  41. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  42. package/dist/components/Knob/Knob.d.ts +3 -1
  43. package/dist/components/Knob/Knob.d.ts.map +1 -1
  44. package/dist/components/Listbox/Listbox.d.ts +3 -1
  45. package/dist/components/Listbox/Listbox.d.ts.map +1 -1
  46. package/dist/components/MonthPicker/MonthPicker.d.ts +3 -1
  47. package/dist/components/MonthPicker/MonthPicker.d.ts.map +1 -1
  48. package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
  49. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  50. package/dist/components/NumberInput/NumberInput.d.ts +1 -1
  51. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  52. package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
  53. package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
  54. package/dist/components/PinInput/PinInput.d.ts +3 -1
  55. package/dist/components/PinInput/PinInput.d.ts.map +1 -1
  56. package/dist/components/QuarterPicker/QuarterPicker.d.ts +3 -1
  57. package/dist/components/QuarterPicker/QuarterPicker.d.ts.map +1 -1
  58. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  59. package/dist/components/Rating/Rating.d.ts +3 -1
  60. package/dist/components/Rating/Rating.d.ts.map +1 -1
  61. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  62. package/dist/components/Select/Select.d.ts +1 -1
  63. package/dist/components/Select/Select.d.ts.map +1 -1
  64. package/dist/components/Select/list.d.ts +6 -1
  65. package/dist/components/Select/list.d.ts.map +1 -1
  66. package/dist/components/SelectionCard/SelectionCard.d.ts +1 -1
  67. package/dist/components/SelectionCard/SelectionCard.d.ts.map +1 -1
  68. package/dist/components/Slider/Slider.d.ts +3 -1
  69. package/dist/components/Slider/Slider.d.ts.map +1 -1
  70. package/dist/components/Switch/Switch.d.ts +1 -1
  71. package/dist/components/Switch/Switch.d.ts.map +1 -1
  72. package/dist/components/TagsInput/TagsInput.d.ts +3 -1
  73. package/dist/components/TagsInput/TagsInput.d.ts.map +1 -1
  74. package/dist/components/TimePicker/TimePicker.d.ts +3 -1
  75. package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
  76. package/dist/components/TimeRangePicker/TimeRangePicker.d.ts +3 -1
  77. package/dist/components/TimeRangePicker/TimeRangePicker.d.ts.map +1 -1
  78. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  79. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  80. package/dist/components/TreeSelect/TreeSelect.d.ts +3 -1
  81. package/dist/components/TreeSelect/TreeSelect.d.ts.map +1 -1
  82. package/dist/components/YearPicker/YearPicker.d.ts +3 -1
  83. package/dist/components/YearPicker/YearPicker.d.ts.map +1 -1
  84. package/dist/data-table/DataTable.d.ts +10 -2
  85. package/dist/data-table/DataTable.d.ts.map +1 -1
  86. package/dist/data-table.js +952 -949
  87. package/dist/editor.js +1 -1
  88. package/dist/form/FormField.d.ts +5 -1
  89. package/dist/form/FormField.d.ts.map +1 -1
  90. package/dist/form.js +7 -5
  91. package/dist/index.d.ts +1 -1
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.js +3231 -3150
  94. package/dist/label-for-DYgV5EwH.js +9 -0
  95. package/dist/pdf.js +3 -3
  96. package/dist/sources/ActionBar.css +1 -0
  97. package/dist/sources/AppShell.css +1 -0
  98. package/dist/sources/ChatPrompt.css +1 -0
  99. package/dist/sources/Gallery.css +1 -0
  100. package/dist/sources/IconButton.css +1 -0
  101. package/dist/sources/Image.css +1 -0
  102. package/dist/sources/ImageCropper.css +1 -0
  103. package/dist/sources/InlineEdit.css +1 -0
  104. package/dist/sources/Marquee.css +1 -0
  105. package/dist/sources/MegaMenu.css +1 -0
  106. package/dist/sources/Menubar.css +1 -0
  107. package/dist/sources/OrderList.css +1 -0
  108. package/dist/sources/PickList.css +1 -0
  109. package/dist/sources/ScrollTop.css +1 -0
  110. package/dist/utils/label-for.d.ts +3 -0
  111. package/dist/utils/label-for.d.ts.map +1 -0
  112. package/dist/virtual/VirtualSelect.d.ts +1 -1
  113. package/dist/virtual/VirtualSelect.d.ts.map +1 -1
  114. package/dist/virtual.js +245 -236
  115. package/fonts.css +2 -0
  116. package/llms-full.txt +180 -3
  117. package/llms.txt +4 -1
  118. package/package.json +7 -3
  119. package/theme.css +14 -0
  120. package/dist/Checkbox-CZTyKWId.js +0 -44
  121. package/dist/ContextMenu-CjDI7Jy5.js +0 -1434
  122. package/dist/Input-D8U-Auys.js +0 -109
  123. package/dist/PasswordInput-DivSjtN8.js +0 -420
  124. package/dist/Select-Cx3KwSzU.js +0 -234
  125. package/dist/Slider-x-SsBc1d.js +0 -74
package/fonts.css ADDED
@@ -0,0 +1,2 @@
1
+ /* The WireLayer fonts (Schibsted Grotesk, JetBrains Mono) – part of styles.css and styles-core.css, separate for theme.css */
2
+ @import '@wirecore/wirelayer-tokens/fonts.css';
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) |
@@ -626,6 +627,7 @@ Region "carousel" with slides labelled "Image n of m". Previous/next buttons, on
626
627
  | loop? | `boolean` | |
627
628
  | autoplay? | `boolean \| { delay: number }` | Turns pages by itself (default every 4 s) – always with a pause button (WCAG 2.2.2) |
628
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`) |
629
631
  | page? | `number` | |
630
632
  | defaultPage? | `number` | |
631
633
  | onPageChange? | `(page: number) => void` | |
@@ -662,6 +664,7 @@ Select with cascading levels: a menu whose groups open to the side (arrow right/
662
664
  | onLoadChildren? | `(option: CascadeOption<V>) => void` | A lazy level opened and there is no loadChildren/dataSource: add its options to the items |
663
665
  | dataSource? | `DataSource<CascadeOption<V>>` | Source of the options of lazy levels (`getChildren`) |
664
666
  | aria-label? | `string` | |
667
+ | id? | `string` | Id of the field (the trigger, with `filter` the search field), e.g. for a `<label for>` |
665
668
  | className? | `string` | |
666
669
  | style? | `CSSProperties` | |
667
670
  | classes? | `RecipeClasses<typeof cascadeSelectRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -1051,6 +1054,7 @@ Colour field: the button opens a panel with area, hue (and opacity) slider, hex
1051
1054
  | invalid? | `boolean` | |
1052
1055
  | name? | `string` | |
1053
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>` |
1054
1058
  | className? | `string` | |
1055
1059
  | style? | `CSSProperties` | |
1056
1060
  | classes? | `RecipeClasses<typeof colorPickerRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -1239,6 +1243,8 @@ Place once in the app; ask with `await confirm({ title, … })` or `await prompt
1239
1243
  | Prop | Type | Description |
1240
1244
  | --- | --- | --- |
1241
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`) |
1242
1248
  | classes? | `RecipeClasses<typeof dialogRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
1243
1249
 
1244
1250
  ### ConfirmPopup
@@ -1404,6 +1410,8 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1404
1410
  | first? | `number` | Index of the first row of the current page (0-based) – instead of `page`; controlled with onFirstChange |
1405
1411
  | onFirstChange? | `(first: number) => void` | |
1406
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 |
1407
1415
  | sorting? | `DataTableSort \| DataTableSort[] \| null` | Current sorting; controlled together with onSortingChange – an array in the multiple mode |
1408
1416
  | onSortingChange? | `(sorting: DataTableSort \| DataTableSort[] \| null) => void` | |
1409
1417
  | defaultSorting? | `DataTableSort \| DataTableSort[] \| null` | Sorting at the start (uncontrolled) |
@@ -1434,6 +1442,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1434
1442
  | defaultExpanded? | `string[]` | |
1435
1443
  | onExpandedChange? | `(expanded: string[]) => void` | |
1436
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) |
1437
1446
  | expansion? | `(row: TData, rowId: string) => ReactNode` | Details below an expanded row – adds the expand column |
1438
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` |
1439
1448
  | advancedFilterValue? | `ConditionGroup` | The condition tree of the advanced filter (controlled together with onAdvancedFilterValueChange) |
@@ -1493,6 +1502,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1493
1502
  | onSizeChange? | `(size: Density) => void` | |
1494
1503
  | densityToggle? | `boolean` | Menu above the table to change the row height |
1495
1504
  | gridlines? | `boolean` | Lines between the columns |
1505
+ | bordered? | `boolean` | A border around the whole table |
1496
1506
  | striped? | `boolean` | Every other row tinted |
1497
1507
  | fullscreenToggle? | `boolean` | Button above the table to show it on the whole screen |
1498
1508
  | scrollHeight? | `string` | Fixed height (CSS length): the table scrolls inside, header and footer stay visible |
@@ -1600,6 +1610,7 @@ Date field: type the digits one after another (the separators come from the loca
1600
1610
  | responsive? | `boolean` | On narrow screens the calendar opens as a sheet at the bottom |
1601
1611
  | renderDay? | `RenderDay` | Content of a day in the calendar instead of its number, e.g. a dot for appointments |
1602
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 |
1603
1614
  | className? | `string` | |
1604
1615
  | style? | `CSSProperties` | |
1605
1616
  | classes? | `RecipeClasses<typeof datePicker>` | Extra classes per part of the date field, e.g. { control: "…" } (the calendar: RecipesProvider) |
@@ -1645,6 +1656,7 @@ Start and end in one field ("10/20/2026 – 10/24/2026"); the calendar picks sta
1645
1656
  | responsive? | `boolean` | On narrow screens the calendar opens as a sheet at the bottom |
1646
1657
  | renderDay? | `RenderDay` | Content of a day in the calendar instead of its number |
1647
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 |
1648
1660
  | className? | `string` | |
1649
1661
  | style? | `CSSProperties` | |
1650
1662
  | classes? | `RecipeClasses<typeof datePicker>` | Extra classes per part of the date field, e.g. { control: "…" } (the calendar: RecipesProvider) |
@@ -1714,6 +1726,7 @@ The modal window of a Dialog: title, description, focus trap, Escape closes
1714
1726
  | Prop | Type | Description |
1715
1727
  | --- | --- | --- |
1716
1728
  | title | `string` | |
1729
+ | hideTitle? | `boolean` | The title only for screen readers – it still names the dialog (e.g. a video in a dialog) |
1717
1730
  | description? | `string` | |
1718
1731
  | icon? | `IconComponent` | Icon component in the coloured box at the top |
1719
1732
  | status? | `DialogStatus` | |
@@ -1835,6 +1848,7 @@ The panel of a Drawer, sliding in from a side; title, focus trap, Escape closes
1835
1848
  | Prop | Type | Description |
1836
1849
  | --- | --- | --- |
1837
1850
  | title | `string` | |
1851
+ | hideTitle? | `boolean` | The title only for screen readers – it still names the drawer (e.g. a video in a dialog) |
1838
1852
  | description? | `string` | |
1839
1853
  | placement? | `DrawerPlacement` | |
1840
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 |
@@ -1881,6 +1895,7 @@ Duration field: hours and minutes (optional days and seconds) as spin buttons
1881
1895
  | size? | `'sm' \| 'md' \| 'lg'` | |
1882
1896
  | clearable? | `boolean` | Clear button in the field while it has a value |
1883
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 |
1884
1899
  | className? | `string` | |
1885
1900
  | style? | `CSSProperties` | |
1886
1901
  | classes? | `RecipeClasses<typeof datePickerRecipe>` | Extra classes per part of the field (see the datePicker recipe) |
@@ -2245,6 +2260,8 @@ Label, helper text, error, aria-invalid and aria-describedby come from Field
2245
2260
  | required? | `boolean` | |
2246
2261
  | optional? | `boolean` | "(optional)" after the label |
2247
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) |
2248
2265
  | children? | `ReactNode` | |
2249
2266
 
2250
2267
  ### FormList
@@ -2489,6 +2506,7 @@ Button with only an icon; the label is its accessible name, optionally with a co
2489
2506
  | color? | `ButtonColor` | Colour combined with the variant, like Button `color` (e.g. a danger text button) |
2490
2507
  | size? | `ButtonSize` | `xs` is 24px – the minimum target size (WCAG 2.5.8) |
2491
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) |
2492
2510
  | badge? | `number \| boolean` | Counter (number > 0) or dot (true) in the top-right corner |
2493
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). |
2494
2512
  | classes? | `RecipeClasses<typeof iconButtonRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -2766,6 +2784,7 @@ Dial (270°): a slider – arrow keys, Page Up/Down, Home/End, or drag around th
2766
2784
  | step? | `number` | |
2767
2785
  | label? | `string` | Visible label, also the accessible name |
2768
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 |
2769
2788
  | formatValue? | `(value: number) => string` | Formats the shown and announced value, e.g. (v) => `${v} %` |
2770
2789
  | valueTemplate? | `string` | Text with the value in it, e.g. "{value} %" (when there is no formatValue) |
2771
2790
  | strokeWidth? | `number` | Width of the arc (default 8, of a 100 wide dial) |
@@ -2820,6 +2839,7 @@ Always visible list (role="listbox"): arrow keys move, Enter/Space choose, typin
2820
2839
  | items | `readonly T[]` | Options: ListboxItem objects – or any objects or values, read with itemValue/itemLabel/itemDisabled/itemGroup |
2821
2840
  | label? | `string` | Visible label, also the list's accessible name |
2822
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 |
2823
2843
  | multiple? | `boolean` | Several options can be chosen (Space toggles) |
2824
2844
  | value? | `V[]` | Chosen values; any type (string, number, boolean, object) |
2825
2845
  | defaultValue? | `V[]` | |
@@ -3178,6 +3198,7 @@ Month field ("10.2026"): type the digits in one go, or pick from the month grid;
3178
3198
  | size? | `'sm' \| 'md' \| 'lg'` | |
3179
3199
  | clearable? | `boolean` | Clear button in the field while it has a value |
3180
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 |
3181
3202
  | className? | `string` | |
3182
3203
  | style? | `CSSProperties` | |
3183
3204
  | classes? | `RecipeClasses<typeof datePicker>` | Extra classes per part of the date field, e.g. { control: "…" } (the calendar: RecipesProvider) |
@@ -3717,6 +3738,7 @@ Code input (OTP, PIN): one box per character, typing moves on, pasting fills all
3717
3738
  | disabled? | `boolean` | |
3718
3739
  | name? | `string` | |
3719
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 |
3720
3742
  | className? | `string` | |
3721
3743
  | style? | `CSSProperties` | |
3722
3744
  | classes? | `RecipeClasses<typeof pinInputRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -3872,6 +3894,7 @@ Quarter field: type "Q4 2026" (also "2026-Q4", "4/2026") or pick from the four q
3872
3894
  | size? | `'sm' \| 'md' \| 'lg'` | |
3873
3895
  | clearable? | `boolean` | Clear button in the field while it has a value |
3874
3896
  | aria-label? | `string` | Accessible name without a surrounding Field |
3897
+ | id? | `string` | Id of the text field, e.g. for a `<label for>` |
3875
3898
  | className? | `string` | |
3876
3899
  | style? | `CSSProperties` | |
3877
3900
  | classes? | `RecipeClasses<typeof datePickerRecipe>` | Extra classes per part of the field, e.g. { control: "…" } (see the datePicker recipe) |
@@ -3968,6 +3991,7 @@ Star rating: a radio group – arrow keys change the value, each star reads "3 s
3968
3991
  | disabled? | `boolean` | |
3969
3992
  | label? | `string` | Visible label, also the group's accessible name |
3970
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 |
3971
3995
  | size? | `'sm' \| 'md' \| 'lg'` | |
3972
3996
  | name? | `string` | |
3973
3997
  | className? | `string` | |
@@ -4451,6 +4475,7 @@ Range: "Price, Minimum" / "Price, Maximum"
4451
4475
  | label | `string` | Visible label, also the accessible name of the thumbs |
4452
4476
  | thumbLabels? | `readonly string[]` | Names of the thumbs of a range slider, read after the label |
4453
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 |
4454
4479
  | formatValue? | `(value: number) => string` | Formats the shown and announced value, e.g. (v) => `${v} %` |
4455
4480
  | disabled? | `boolean` | |
4456
4481
  | name? | `string` | |
@@ -4740,7 +4765,7 @@ Sticks to the top or bottom edge while its container scrolls
4740
4765
 
4741
4766
  ### Switch
4742
4767
 
4743
- 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>
4744
4769
 
4745
4770
  - Import: `import { Switch } from '@wirecore/wirelayer-react'`
4746
4771
  - Category: Forms
@@ -4900,6 +4925,7 @@ Free entries: Enter or "," adds, Backspace on the empty field selects the last e
4900
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 |
4901
4926
  | minSearchLength? | `number` | Fewest characters the typed text needs before the data source is asked (default 1) |
4902
4927
  | aria-label? | `string` | Accessible name without a surrounding Field |
4928
+ | id? | `string` | Id of the input, e.g. for a `<label for>` |
4903
4929
  | className? | `string` | |
4904
4930
  | style? | `CSSProperties` | |
4905
4931
  | classes? | `RecipeClasses<typeof tagsInputRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -5017,6 +5043,7 @@ Time field: type the digits one after another ("1430"), arrow keys change hour o
5017
5043
  | referenceDate? | `string` | Day whose offset applies with timeZone (ISO, default today) |
5018
5044
  | showTimeZone? | `boolean` | Short zone name after the time ("CEST") |
5019
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 |
5020
5047
  | className? | `string` | |
5021
5048
  | style? | `CSSProperties` | |
5022
5049
  | classes? | `RecipeClasses<typeof datePickerRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -5047,6 +5074,7 @@ Start and end time in one field ("09:00 – 17:30"): typing runs on from start t
5047
5074
  | size? | `'sm' \| 'md' \| 'lg'` | |
5048
5075
  | clearable? | `boolean` | Clear button in the field while it has a value |
5049
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 |
5050
5078
  | className? | `string` | |
5051
5079
  | style? | `CSSProperties` | |
5052
5080
  | classes? | `RecipeClasses<typeof datePickerRecipe>` | Extra classes per part of the component (see the datePicker recipe) |
@@ -5148,6 +5176,7 @@ No element of its own: the trigger is the slotted element
5148
5176
  | closeDelay? | `number` | Delay before closing (ms); default 150 or that of the TooltipGroup |
5149
5177
  | interactive? | `boolean` | The pointer can move onto the tooltip without it closing (WCAG 1.4.13) |
5150
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 |
5151
5180
  | disabled? | `boolean` | Never opens (e.g. Truncate while the text fits) – the trigger stays the same element |
5152
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 |
5153
5182
  | classes? | `RecipeClasses<typeof tooltipRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -5298,6 +5327,7 @@ Select whose options are a tree: the button opens the tree in a panel, choosing
5298
5327
  | onLoadChildren? | `(node: TreeNode) => void` | A lazy node opened and there is no loadChildren/dataSource: add its children to the items |
5299
5328
  | dataSource? | `DataSource<TreeNode>` | Source of the children of lazy nodes (`getChildren`) |
5300
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>` |
5301
5331
  | className? | `string` | |
5302
5332
  | style? | `CSSProperties` | |
5303
5333
  | classes? | `RecipeClasses<typeof treeSelectRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -5515,6 +5545,7 @@ Year field ("2026"): type the digits, or pick from the year grid; range: start
5515
5545
  | size? | `'sm' \| 'md' \| 'lg'` | |
5516
5546
  | clearable? | `boolean` | Clear button in the field while it has a value |
5517
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 |
5518
5549
  | className? | `string` | |
5519
5550
  | style? | `CSSProperties` | |
5520
5551
  | classes? | `RecipeClasses<typeof datePicker>` | Extra classes per part of the date field, e.g. { control: "…" } (the calendar: RecipesProvider) |
@@ -5717,6 +5748,29 @@ that render components, such as `confirm` or the DataTable feature `dateInput`,
5717
5748
  components warn in the console when the classes of a recipe they render are missing. Recipes you call yourself
5718
5749
  (`card()`) are not checked – add their files along with the import.
5719
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
+
5720
5774
  ### Usage
5721
5775
 
5722
5776
  ```vue
@@ -5749,9 +5803,13 @@ import { ArrowRight } from 'lucide-react';
5749
5803
  // nuxt.config.ts
5750
5804
  import tailwindcss from '@tailwindcss/vite';
5751
5805
 
5806
+ import { wirelayer } from '@wirecore/wirelayer-recipes/vite';
5807
+
5752
5808
  export default defineNuxtConfig({
5753
- css: ['~/assets/main.css'], // @import 'tailwindcss'; @import '@wirecore/wirelayer-vue/styles.css';
5754
- 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()] },
5755
5813
  });
5756
5814
  ```
5757
5815
 
@@ -5834,6 +5892,31 @@ Every component consists of named parts of its recipe (`base`, `icon`, `row`, `t
5834
5892
  The names are the exports of the recipes (`button`, `iconButton`, `dataTable` …) and are checked by TypeScript, as are
5835
5893
  the variants and parts. Your own components use the same through `useRecipe('button', button)`.
5836
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
+
5837
5920
  ### Hooks and composables
5838
5921
 
5839
5922
  Around 40 hooks (React) and composables (Vue) with the same names and the same logic – for your own components and
@@ -6212,6 +6295,56 @@ WireLayer is licensed under the MIT license. The fonts shipped with `@wirecore/w
6212
6295
  JetBrains Mono) are licensed under the SIL Open Font License 1.1 (`dist/fonts/OFL.txt`). Optional peer dependencies such
6213
6296
  as `pdfjs-dist` (Apache-2.0), Chart.js, Tiptap and Shiki are installed by the app itself – with their own licenses.
6214
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
+
6215
6348
  ### Custom theme
6216
6349
 
6217
6350
  A theme overrides any colors per mode. `themeToCss` generates the CSS for it,
@@ -6237,3 +6370,47 @@ writeFileSync('brand.css', themeToCss(brand));
6237
6370
  ```
6238
6371
 
6239
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.
package/llms.txt CHANGED
@@ -182,7 +182,7 @@ Full API (props, events, slots, examples) in llms-full.txt next to this file. MC
182
182
  - [Select](https://wirecore.github.io/WireLayer/?path=/story/react_forms-select--playground): Dropdown list for one option: arrow keys, typeahead, Escape; native select hidden for forms (`@wirecore/wirelayer-react`)
183
183
  - [SignaturePad](https://wirecore.github.io/WireLayer/?path=/story/react_forms-signaturepad--playground): Signature field (role="application"): draw with mouse, pen or finger; "Undo" removes the last stroke. With typedAlternative the name can be typed instead – the field shows it in a handwriting font. (`@wirecore/wirelayer-react`)
184
184
  - [Slider](https://wirecore.github.io/WireLayer/?path=/story/react_forms-slider--playground): Range: "Price, Minimum" / "Price, Maximum" (`@wirecore/wirelayer-react`)
185
- - [Switch](https://wirecore.github.io/WireLayer/?path=/story/react_forms-switch--playground): Ark renders a plain checkbox; role="switch" makes screen readers announce it as a switch (`@wirecore/wirelayer-react`)
185
+ - [Switch](https://wirecore.github.io/WireLayer/?path=/story/react_forms-switch--playground): Without a text the label is left out: Ark names the input by it, an empty one would hide a <label for> (`@wirecore/wirelayer-react`)
186
186
  - [SwitchGroup](https://wirecore.github.io/WireLayer/?path=/story/react_forms-switchgroup--playground): role="group" named by its label, described by helper and error text; Switches with a value inside (`@wirecore/wirelayer-react`)
187
187
  - [TagsInput](https://wirecore.github.io/WireLayer/?path=/story/react_forms-tagsinput--playground): Free entries: Enter or "," adds, Backspace on the empty field selects the last entry (again removes it), arrow keys move between entries; additions and removals are announced. With suggestions the field is a combobox: Arrow down opens them, Enter adds the highlighted one. (`@wirecore/wirelayer-react`)
188
188
  - [Textarea](https://wirecore.github.io/WireLayer/?path=/story/react_forms-textarea--auto-resize): Multi-line text field, optionally growing with the text (autoResize) and with a counter; works inside Field (`@wirecore/wirelayer-react`)
@@ -308,4 +308,7 @@ Full API (props, events, slots, examples) in llms-full.txt next to this file. MC
308
308
  - React Native (Expo)
309
309
  - HTML and server templates
310
310
  - License
311
+ - Components and APIs side by side
312
+ - Pitfalls
311
313
  - Custom theme
314
+ - Component sizes and shapes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecore/wirelayer-react",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "WireLayer components for React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -55,12 +55,16 @@
55
55
  },
56
56
  "./styles.css": "./styles.css",
57
57
  "./styles-core.css": "./styles-core.css",
58
+ "./theme.css": "./theme.css",
59
+ "./fonts.css": "./fonts.css",
58
60
  "./sources/*": "./dist/sources/*"
59
61
  },
60
62
  "files": [
61
63
  "dist",
62
64
  "styles.css",
63
65
  "styles-core.css",
66
+ "theme.css",
67
+ "fonts.css",
64
68
  "llms.txt",
65
69
  "llms-full.txt"
66
70
  ],
@@ -162,8 +166,8 @@
162
166
  "dependencies": {
163
167
  "@ark-ui/react": "^5.39.3",
164
168
  "@internationalized/date": "^3.12.4",
165
- "@wirecore/wirelayer-recipes": "^0.5.0",
166
- "@wirecore/wirelayer-tokens": "^0.3.0",
169
+ "@wirecore/wirelayer-recipes": "^0.6.0",
170
+ "@wirecore/wirelayer-tokens": "^0.4.0",
167
171
  "lucide-react": "^1.59.0"
168
172
  },
169
173
  "devDependencies": {
package/theme.css ADDED
@@ -0,0 +1,14 @@
1
+ /*
2
+ * WireLayer theme without fonts and without the classes of the components – for an app with its own font
3
+ * (@theme { --font-sans: … }) and the classes of the components it uses: by hand, or with the Vite plugin
4
+ * (@wirecore/wirelayer-recipes/vite) that adds them to this file:
5
+ * @import 'tailwindcss';
6
+ * @import '@wirecore/wirelayer-react/theme.css';
7
+ * @import '@wirecore/wirelayer-react/fonts.css'; (the WireLayer fonts, if you want them)
8
+ */
9
+ @import '@wirecore/wirelayer-tokens/theme.css';
10
+
11
+ /* Lets the components warn in development when the classes of a recipe they render were not imported */
12
+ :root {
13
+ --wc-recipe-sources: 1;
14
+ }
@@ -1,44 +0,0 @@
1
- "use client";
2
- import { n as e } from "./RecipesProvider-0idafuGm.js";
3
- import { checkbox as t } from "@wirecore/wirelayer-recipes";
4
- import { Check as n, Minus as r } from "lucide-react";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import { Checkbox as o } from "@ark-ui/react/checkbox";
7
- //#region src/components/Checkbox/Checkbox.tsx
8
- function s({ classes: s, checked: c, defaultChecked: l, onCheckedChange: u, disabled: d, invalid: f, required: p, name: m, value: h, className: g, style: _, children: v, ...y }) {
9
- let b = e("checkbox", t, s)();
10
- return /* @__PURE__ */ a(o.Root, {
11
- className: b.base({ class: g }),
12
- style: _,
13
- checked: c,
14
- defaultChecked: l,
15
- onCheckedChange: (e) => u?.(e.checked),
16
- disabled: d,
17
- invalid: f,
18
- required: p,
19
- name: m,
20
- value: h,
21
- children: [
22
- /* @__PURE__ */ a(o.Control, {
23
- className: b.control(),
24
- children: [/* @__PURE__ */ i(o.Indicator, { children: /* @__PURE__ */ i(n, {
25
- className: b.icon(),
26
- "aria-hidden": "true"
27
- }) }), /* @__PURE__ */ i(o.Indicator, {
28
- indeterminate: !0,
29
- children: /* @__PURE__ */ i(r, {
30
- className: b.icon(),
31
- "aria-hidden": "true"
32
- })
33
- })]
34
- }),
35
- v && /* @__PURE__ */ i(o.Label, {
36
- className: b.label(),
37
- children: v
38
- }),
39
- /* @__PURE__ */ i(o.HiddenInput, { ...y })
40
- ]
41
- });
42
- }
43
- //#endregion
44
- export { s as t };