@wirecore/wirelayer-react 0.8.0 → 0.9.1
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.
- package/README.md +5 -0
- package/dist/ContextMenu-GCeoPu8T.js +1523 -0
- package/dist/PasswordInput-CxZXGV2m.js +449 -0
- package/dist/{Select-C2CiPTCK.js → Select-CGyqfOm3.js} +65 -65
- package/dist/components/Avatar/Avatar.d.ts +3 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +3 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Code/Code.d.ts +11 -0
- package/dist/components/Code/Code.d.ts.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +4 -3
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +7 -3
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/NativeSelect/NativeSelect.d.ts +9 -6
- package/dist/components/NativeSelect/NativeSelect.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts +11 -3
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/Progress/Progress.d.ts +5 -2
- package/dist/components/Progress/Progress.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +12 -5
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +12 -4
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +11 -5
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.d.ts +3 -1
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +11 -2
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Wizard/Wizard.d.ts +11 -3
- package/dist/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/data-table.js +2 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/media.d.ts +7 -0
- package/dist/hooks/media.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1931 -1898
- package/dist/pdf.js +2 -2
- package/dist/sources/Code.css +2 -0
- package/llms-full.txt +63 -17
- package/llms.txt +1 -0
- package/package.json +3 -3
- package/dist/ContextMenu-C6ZaMtqf.js +0 -1511
- package/dist/PasswordInput-dpeKVREo.js +0 -425
package/dist/pdf.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { a as e, i as t, n } from "./RecipesProvider-0idafuGm.js";
|
|
3
3
|
import { t as r } from "./Button-Cd7lufvJ.js";
|
|
4
4
|
import { t as i } from "./Field-DkYxlVar.js";
|
|
5
|
-
import { n as a, t as o } from "./Select-
|
|
6
|
-
import { c as s, i as c, l, n as u, s as d, t as ee, u as te } from "./PasswordInput-
|
|
5
|
+
import { n as a, t as o } from "./Select-CGyqfOm3.js";
|
|
6
|
+
import { c as s, i as c, l, n as u, s as d, t as ee, u as te } from "./PasswordInput-CxZXGV2m.js";
|
|
7
7
|
import { t as ne } from "./Tree-DVjwp6FG.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";
|
package/llms-full.txt
CHANGED
|
@@ -306,6 +306,7 @@ Image, initials or icon of a person or organisation; `as="button"` makes it a tr
|
|
|
306
306
|
| Prop | Type | Description |
|
|
307
307
|
| --- | --- | --- |
|
|
308
308
|
| name? | `string` | Person or organisation – accessible name of the avatar and source of the initials |
|
|
309
|
+
| initials? | `string` | Own initials instead of the ones taken from `name`, e.g. "MS" for "my-server" |
|
|
309
310
|
| src? | `string` | Image URL; initials (or the icon) are shown while it loads or if it fails |
|
|
310
311
|
| icon? | `IconComponent` | Icon shown when there is neither an image nor a name (default: user icon) |
|
|
311
312
|
| variant? | `AvatarVariant` | |
|
|
@@ -600,6 +601,7 @@ Surface for grouped content, optionally with title, media and footer; interactiv
|
|
|
600
601
|
| subtitle? | `ReactNode` | Line below the title |
|
|
601
602
|
| titleTag? | `'h2' \| 'h3' \| 'h4' \| 'h5' \| 'h6' \| 'p'` | Element of the title – pick the level that fits the page outline |
|
|
602
603
|
| orientation? | `'vertical' \| 'horizontal'` | `horizontal`: media at the start, the content beside it |
|
|
604
|
+
| size? | `'sm' \| 'md'` | `sm`: smaller radius, padding and title, e.g. for cards in a list inside a dialog |
|
|
603
605
|
| media? | `ReactNode` | Image or video above the content (beside it when horizontal) |
|
|
604
606
|
| header? | `ReactNode` | Extra content in the header, after the title (e.g. a badge or a menu) |
|
|
605
607
|
| footer? | `ReactNode` | Actions at the end of the card |
|
|
@@ -938,6 +940,20 @@ Filter chips: one or several options as toggle buttons
|
|
|
938
940
|
| disabled? | `boolean` | |
|
|
939
941
|
| classes? | `RecipeClasses<typeof chipGroupRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
|
|
940
942
|
|
|
943
|
+
### Code
|
|
944
|
+
|
|
945
|
+
Code inside a sentence, without syntax colours: the look of InlineCode (/code) without shiki
|
|
946
|
+
|
|
947
|
+
- Import: `import { Code } from '@wirecore/wirelayer-react'`
|
|
948
|
+
- Category: Data
|
|
949
|
+
- Example: https://wirecore.github.io/WireLayer/?path=/story/react_data-code--playground
|
|
950
|
+
- Also takes: ComponentProps<'code'>
|
|
951
|
+
|
|
952
|
+
| Prop | Type | Description |
|
|
953
|
+
| --- | --- | --- |
|
|
954
|
+
| code? | `string` | The code (one line) – or pass it as the content |
|
|
955
|
+
| classes? | `RecipeClasses<typeof inlineCodeRecipe>` | Extra classes of the recipe (see the recipe inlineCode) |
|
|
956
|
+
|
|
941
957
|
### CodeHighlight
|
|
942
958
|
|
|
943
959
|
Code block with syntax colours; the scroll area is focusable, the copy button copies the plain code
|
|
@@ -1301,7 +1317,7 @@ Opens at the pointer on right click, on touch screens with a long press (and wit
|
|
|
1301
1317
|
| label? | `string` | Accessible name of the menu – without it the menu is named by the area's content |
|
|
1302
1318
|
| open? | `boolean` | Whether the menu is open (controlled, with onOpenChange) |
|
|
1303
1319
|
| onOpenChange? | `(open: boolean) => void` | The menu opened or closed – e.g. to pause list shortcuts while it is open |
|
|
1304
|
-
| onBeforeOpen? | `(target: Element) => void` | A right click, long press or the menu key is opening the menu, on this element (e.g. the row under the pointer – select it before the menu shows) |
|
|
1320
|
+
| onBeforeOpen? | `(target: Element, details: ContextMenuOpenDetails) => void` | A right click, long press or the menu key is opening the menu, on this element (e.g. the row under the pointer – select it before the menu shows); `details.source` tells pointer from keyboard, with the keyboard `details.focused` is the focused element (e.g. the row with the focus) |
|
|
1305
1321
|
| ref? | `Ref<OverlayHandle>` | open(anchor), close(), toggle(anchor) – e.g. open(event) from your own handler |
|
|
1306
1322
|
| children | `ReactElement` | The area that opens the menu |
|
|
1307
1323
|
| classes? | `RecipeClasses<typeof menuRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
|
|
@@ -3267,13 +3283,13 @@ The browser's select: its own keyboard and mobile pickers; inside a Field it is
|
|
|
3267
3283
|
- Import: `import { NativeSelect } from '@wirecore/wirelayer-react'`
|
|
3268
3284
|
- Category: Forms
|
|
3269
3285
|
- Example: https://wirecore.github.io/WireLayer/?path=/story/react_forms-nativeselect--playground
|
|
3270
|
-
- Also takes: Omit<
|
|
3286
|
+
- Also takes: Omit<ComponentProps<'select'>, 'size' | 'onChange'>
|
|
3271
3287
|
|
|
3272
3288
|
| Prop | Type | Description |
|
|
3273
3289
|
| --- | --- | --- |
|
|
3274
3290
|
| items | `readonly NativeSelectOption<V>[]` | |
|
|
3275
|
-
| onValueChange? | `(value: V \| '') => void` | The chosen option's value with its type; the placeholder option gives an empty string |
|
|
3276
|
-
| placeholder? | `
|
|
3291
|
+
| onValueChange? | `(value: P extends string ? V \| '' : V) => void` | The chosen option's value with its type; the placeholder option gives an empty string |
|
|
3292
|
+
| placeholder? | `P` | First, empty option, e.g. "Please choose" – without it onValueChange only gets values (typed `V`, not `V \| ''`) |
|
|
3277
3293
|
| size? | `Size` | |
|
|
3278
3294
|
| invalid? | `boolean` | |
|
|
3279
3295
|
| classes? | `RecipeClasses<typeof nativeSelectRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
|
|
@@ -3366,7 +3382,7 @@ Number field with − / + buttons, arrow keys and locale formatting ("1,234.5");
|
|
|
3366
3382
|
| --- | --- | --- |
|
|
3367
3383
|
| value? | `number \| null` | |
|
|
3368
3384
|
| defaultValue? | `number \| null` | |
|
|
3369
|
-
| onValueChange? | `(value: number \| null) => void` | |
|
|
3385
|
+
| onValueChange? | `(value: F extends string ? number : number \| null) => void` | |
|
|
3370
3386
|
| min? | `number` | |
|
|
3371
3387
|
| max? | `number` | |
|
|
3372
3388
|
| step? | `number` | |
|
|
@@ -3387,6 +3403,7 @@ Number field with − / + buttons, arrow keys and locale formatting ("1,234.5");
|
|
|
3387
3403
|
| allowDecimal? | `boolean` | Allows decimals (default); false blocks the decimal separator and rounds to whole numbers |
|
|
3388
3404
|
| decimals? | `number` | Exactly this many decimals, e.g. 2 → "12.50" |
|
|
3389
3405
|
| clampBehavior? | `'blur' \| 'strict' \| 'none'` | Out of min/max: `blur` corrects the value when the field is left (default), `strict` does not let it leave the range, `none` keeps it (mark it invalid yourself) |
|
|
3406
|
+
| emptyFallback? | `F` | A number is always set: an emptied field falls back to `min` (or 0) or to the last valid number (`previous`) when it is left or Enter is pressed – onValueChange then only gets numbers (typed `number`, not `number \| null`) |
|
|
3390
3407
|
| selectOnFocus? | `boolean` | Selects the whole number when the field gets the focus |
|
|
3391
3408
|
| loading? | `boolean` | Shows a spinner in the field and marks it busy (aria-busy) |
|
|
3392
3409
|
| clearable? | `boolean` | Shows a button that empties the field while it has a value |
|
|
@@ -3836,7 +3853,7 @@ Ark names the progressbar after its value; the label is the name, the value its
|
|
|
3836
3853
|
| animated? | `boolean` | Moving stripes (only without reduced motion) |
|
|
3837
3854
|
| orientation? | `'horizontal' \| 'vertical'` | Vertical bar (fills the height of its parent) |
|
|
3838
3855
|
| size? | `'xs' \| 'md'` | `xs`: a thin bar with small text, e.g. in a list or a status bar |
|
|
3839
|
-
| status? | `'info' \| 'success' \| 'warn' \| 'danger'` | Colour of the filled part by its state, e.g. `danger` for a failed transfer |
|
|
3856
|
+
| status? | `'info' \| 'success' \| 'warn' \| 'danger' \| 'neutral'` | Colour of the filled part by its state, e.g. `danger` for a failed transfer, `neutral` (grey) for a cancelled one |
|
|
3840
3857
|
| hideLabel? | `boolean` | The label only for screen readers – it still names the progress bar |
|
|
3841
3858
|
| barText? | `string` | Short text in the bar, e.g. "42 %", "waiting" or "failed" (a taller bar; horizontal, without segments or steps) – screen readers get it after the value |
|
|
3842
3859
|
| classes? | `RecipeClasses<typeof progressRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
|
|
@@ -3959,13 +3976,13 @@ One choice out of several (role="radiogroup", arrow keys), horizontal or vertica
|
|
|
3959
3976
|
| --- | --- | --- |
|
|
3960
3977
|
| value? | `V \| null` | Selected value; numbers when the items have number values |
|
|
3961
3978
|
| defaultValue? | `V \| null` | |
|
|
3962
|
-
| onValueChange? | `(value: V \| null) => void` | |
|
|
3979
|
+
| onValueChange? | `(value: R extends true ? V : V \| null) => void` | |
|
|
3963
3980
|
| label? | `string` | Visible group label (otherwise pass aria-label – or place the group in a Field with a label) |
|
|
3964
3981
|
| orientation? | `RadioGroupOrientation` | |
|
|
3965
3982
|
| columns? | `number` | Cards in a grid with this many columns (one column on small screens) – for RadioCard |
|
|
3966
3983
|
| disabled? | `boolean` | |
|
|
3967
3984
|
| invalid? | `boolean` | |
|
|
3968
|
-
| required? | `
|
|
3985
|
+
| required? | `R` | A choice is required (aria-required). onValueChange then only gets values (typed `V`, not `V \| null`): a form reset back to an empty start is not passed on |
|
|
3969
3986
|
| name? | `string` | |
|
|
3970
3987
|
| classes? | `RecipeClasses<typeof radioGroupRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
|
|
3971
3988
|
|
|
@@ -4263,10 +4280,11 @@ Few exclusive options as a segmented switch (radio group)
|
|
|
4263
4280
|
| --- | --- | --- |
|
|
4264
4281
|
| value? | `V \| null` | |
|
|
4265
4282
|
| defaultValue? | `V` | |
|
|
4266
|
-
| onValueChange? | `(value: V \| null) => void` | |
|
|
4283
|
+
| onValueChange? | `(value: R extends true ? V : V \| null) => void` | |
|
|
4267
4284
|
| label? | `string` | Accessible name of the group (visually hidden) – inside a Field with a label, the Field's label names it |
|
|
4268
4285
|
| size? | `SegmentedControlSize` | |
|
|
4269
4286
|
| disabled? | `boolean` | |
|
|
4287
|
+
| required? | `R` | A value is required (aria-required). onValueChange then only gets values (typed `V`, not `V \| null`): a form reset back to an empty start is not passed on |
|
|
4270
4288
|
| name? | `string` | |
|
|
4271
4289
|
| classes? | `RecipeClasses<typeof segmentedControlRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
|
|
4272
4290
|
|
|
@@ -4298,9 +4316,10 @@ Dropdown list for one option: arrow keys, typeahead, Escape; native select hidde
|
|
|
4298
4316
|
| Prop | Type | Description |
|
|
4299
4317
|
| --- | --- | --- |
|
|
4300
4318
|
| items | `readonly T[]` | Options: SelectItem objects – or any objects or values, read with itemValue/itemLabel/itemDisabled/itemGroup |
|
|
4301
|
-
| value? | `V \| null` | Selected value; any type (string, number, boolean, object) |
|
|
4302
|
-
| defaultValue? | `V \| null` | |
|
|
4303
|
-
| onValueChange? | `(value: V \|
|
|
4319
|
+
| value? | `V \| NoInfer<E> \| null` | Selected value; any type (string, number, boolean, object) |
|
|
4320
|
+
| defaultValue? | `V \| NoInfer<E> \| null` | |
|
|
4321
|
+
| onValueChange? | `(value: V \| NoInfer<E>) => void` | |
|
|
4322
|
+
| emptyValue? | `E` | The value that means "nothing chosen" instead of null, e.g. `""`: it shows the placeholder, and clearing gives it back (onValueChange is then typed `V \| E`, without null) |
|
|
4304
4323
|
| placeholder? | `string` | |
|
|
4305
4324
|
| invalid? | `boolean` | |
|
|
4306
4325
|
| required? | `boolean` | |
|
|
@@ -4740,6 +4759,7 @@ Steps list (tabs) with one panel per step and back/next buttons; the last "Next"
|
|
|
4740
4759
|
| isStepValid? | `(index: number) => boolean` | Blocks "Next" while a step is not valid (with linear) |
|
|
4741
4760
|
| orientation? | `'horizontal' \| 'vertical'` | Steps listed top to bottom beside the content |
|
|
4742
4761
|
| labelPlacement? | `'end' \| 'bottom'` | Label beside the number (default) or below it |
|
|
4762
|
+
| finishLabel? | `string` | Text of the last "Next" button, e.g. "Create" (default "Finish") |
|
|
4743
4763
|
| children | `(index: number) => ReactNode` | Content of a step |
|
|
4744
4764
|
| completed? | `ReactNode` | Shown after the last step |
|
|
4745
4765
|
| className? | `string` | |
|
|
@@ -4857,7 +4877,7 @@ Tab panels: tab list with arrow keys, one panel visible
|
|
|
4857
4877
|
|
|
4858
4878
|
| Prop | Type | Description |
|
|
4859
4879
|
| --- | --- | --- |
|
|
4860
|
-
| value? | `string` |
|
|
4880
|
+
| value? | `string \| null` | Selected tab; `null`: no tab selected (e.g. tabs of panels that live elsewhere – the first tab stays reachable with Tab) |
|
|
4861
4881
|
| defaultValue? | `string` | |
|
|
4862
4882
|
| onValueChange? | `(value: string \| null) => void` | |
|
|
4863
4883
|
| label? | `string` | Accessible name of the tab list |
|
|
@@ -4909,6 +4929,7 @@ One tab button
|
|
|
4909
4929
|
| icon? | `IconComponent` | Icon component before the label |
|
|
4910
4930
|
| closable? | `boolean` | Shows a close button (pointer) and closes with the Delete key; onClose reports it – remove the tab (and select another one) yourself. The focus moves to the neighbouring tab |
|
|
4911
4931
|
| onClose? | `(value: string) => void` | |
|
|
4932
|
+
| controls? | `string \| null` | Id of the element the tab shows, when it is not a TabsContent of these Tabs (e.g. a pane elsewhere, hidden while not selected) – `null`: none (tabs without panels) |
|
|
4912
4933
|
| classes? | `RecipeClasses<typeof tabsRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
|
|
4913
4934
|
|
|
4914
4935
|
### TagsInput
|
|
@@ -5534,6 +5555,8 @@ Multi-step form on the Stepper: "Next" checks the step (async with a spinner), "
|
|
|
5534
5555
|
| summaryLabel? | `string` | Name of the summary step (default "Summary") |
|
|
5535
5556
|
| completed? | `ReactNode` | Shown after finishing |
|
|
5536
5557
|
| orientation? | `'horizontal' \| 'vertical'` | Steps listed top to bottom beside the content |
|
|
5558
|
+
| finishLabel? | `string` | Text of the last button, e.g. "Create" (default "Finish") |
|
|
5559
|
+
| focusOnStepChange? | `boolean` | Moves the focus into a new step when the step changes: to the element marked data-autoselect (text selected), data-autofocus or autofocus, otherwise to the step's first field |
|
|
5537
5560
|
| classes? | `RecipeClasses<typeof wizardRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
|
|
5538
5561
|
|
|
5539
5562
|
### YearPicker
|
|
@@ -5593,6 +5616,7 @@ Year field ("2026"): type the digits, or pick from the year grid; range: start
|
|
|
5593
5616
|
- `emptyConditionGroup` (`@wirecore/wirelayer-react`): –
|
|
5594
5617
|
- `expandRecurrence` (`@wirecore/wirelayer-react`): –
|
|
5595
5618
|
- `firstError` (`@wirecore/wirelayer-react/form`): First readable message of TanStack Form errors (strings or Standard Schema issues).
|
|
5619
|
+
- `focusFirst` (`@wirecore/wirelayer-react`): –
|
|
5596
5620
|
- `formatColor` (`@wirecore/wirelayer-react`): –
|
|
5597
5621
|
- `formatHotkey` (`@wirecore/wirelayer-react`): –
|
|
5598
5622
|
- `formatHotkeyText` (`@wirecore/wirelayer-react`): –
|
|
@@ -5624,6 +5648,7 @@ Year field ("2026"): type the digits, or pick from the year grid; range: start
|
|
|
5624
5648
|
- `prompt` (`@wirecore/wirelayer-react`): Asks for a text in the app-wide <ConfirmDialog />. Resolves with the (valid) text, or null when cancelled.
|
|
5625
5649
|
- `registerLocale` (`@wirecore/wirelayer-react`): –
|
|
5626
5650
|
- `removeTreeNode` (`@wirecore/wirelayer-react`): –
|
|
5651
|
+
- `resolveTokens` (`@wirecore/wirelayer-react`): –
|
|
5627
5652
|
- `rowsToDataSource` (`@wirecore/wirelayer-react/data-table`): –
|
|
5628
5653
|
- `toast` (`@wirecore/wirelayer-react`): –
|
|
5629
5654
|
- `toaster` (`@wirecore/wirelayer-react`): –
|
|
@@ -5661,6 +5686,7 @@ Year field ("2026"): type the digits, or pick from the year grid; range: start
|
|
|
5661
5686
|
- `useReducedMotion` (`@wirecore/wirelayer-react`): Whether the user asked for less motion (prefers-reduced-motion: reduce)
|
|
5662
5687
|
- `useRegisteredHotkeys` (`@wirecore/wirelayer-react`): The registered shortcuts (enabled, with a description), updated as components register them
|
|
5663
5688
|
- `useResizeObserver` (`@wirecore/wirelayer-react`): The content box of an element as it changes (pass `ref` to it)
|
|
5689
|
+
- `useResolvedTokens` (`@wirecore/wirelayer-react`): The token colours as fixed values (hex, see resolveTokens) – for canvas libraries like xterm.js that cannot read CSS variables; new values when the mode, the theme or the system colour scheme changes. On the server: the light base colours as written
|
|
5664
5690
|
- `useScrollSpy` (`@wirecore/wirelayer-react`): The id of the section being read: the last of `ids` whose top passed `offset` px (e.g. a sticky header) – for a table of contents
|
|
5665
5691
|
- `useSelection` (`@wirecore/wirelayer-react`): Selected items of a list: toggle, select all, clear – with "all"/"some" for a header checkbox
|
|
5666
5692
|
- `useSessionStorage` (`@wirecore/wirelayer-react`): Like useLocalStorage, in sessionStorage (this tab only, gone when it closes)
|
|
@@ -5672,6 +5698,7 @@ Year field ("2026"): type the digits, or pick from the year grid; range: start
|
|
|
5672
5698
|
- `useWindowScroll` (`@wirecore/wirelayer-react`): Scroll position of the window and `scrollTo` (0 on the server)
|
|
5673
5699
|
- `validateFields` (`@wirecore/wirelayer-react/form`): Validates some fields of a TanStack form (e.g. one Wizard step) and marks them touched, so their errors show. Resolves with true when none has an error.
|
|
5674
5700
|
- `virtualRows` (`@wirecore/wirelayer-react/virtual`): DataTable feature: only the visible rows are rendered with `virtual` – `<DataTable features={[virtualRows]} virtual>`
|
|
5701
|
+
- `watchTokens` (`@wirecore/wirelayer-react`): –
|
|
5675
5702
|
|
|
5676
5703
|
## Guides
|
|
5677
5704
|
|
|
@@ -5728,14 +5755,17 @@ In Storybook, the **Accessibility** panel also shows the axe results of the curr
|
|
|
5728
5755
|
|
|
5729
5756
|
### Installation
|
|
5730
5757
|
|
|
5731
|
-
The packages are published on npm:
|
|
5758
|
+
The packages are published on npm – install them with npm, pnpm, Yarn or Bun:
|
|
5732
5759
|
|
|
5733
5760
|
```sh
|
|
5734
|
-
|
|
5735
|
-
pnpm add @wirecore/wirelayer-
|
|
5736
|
-
|
|
5761
|
+
npm install @wirecore/wirelayer-vue
|
|
5762
|
+
pnpm add @wirecore/wirelayer-vue
|
|
5763
|
+
yarn add @wirecore/wirelayer-vue
|
|
5764
|
+
bun add @wirecore/wirelayer-vue
|
|
5737
5765
|
```
|
|
5738
5766
|
|
|
5767
|
+
The same for `@wirecore/wirelayer-react` and `@wirecore/wirelayer-native` (React Native / Expo).
|
|
5768
|
+
|
|
5739
5769
|
### Adding the styles
|
|
5740
5770
|
|
|
5741
5771
|
Tailwind CSS v4.1 or newer is required. The library ships the theme, the fonts and the classes of the components:
|
|
@@ -6379,6 +6409,22 @@ as `pdfjs-dist` (Apache-2.0), Chart.js, Tiptap and Shiki are installed by the ap
|
|
|
6379
6409
|
numbers); `Checkbox` with a boolean model gives booleans.
|
|
6380
6410
|
- **Compact parts:** `Progress size="xs"` with `hide-label`, `bar-text` and `status`; `Alert #actions`; `mono` on text
|
|
6381
6411
|
fields; `DialogContent title-position="header"` puts the title next to the close button.
|
|
6412
|
+
- **Values that are never empty:** with `required`, `RadioGroup` and `SegmentedControl` give v-model `V` instead of
|
|
6413
|
+
`V | null`; `NativeSelect` without `placeholder` gives `V` instead of `V | ''`; `NumberInput empty-fallback="min"` or
|
|
6414
|
+
`"previous"` refills an emptied field when it is left (typed `number`). `Select empty-value=""` treats an empty string
|
|
6415
|
+
like null – the placeholder shows, clearing gives `""` back.
|
|
6416
|
+
- **Focus in dialogs and wizards:** `data-autoselect` focuses a field and selects its text when the dialog opens (e.g. a
|
|
6417
|
+
prefilled name). For content that changes while it is open, `DialogContent` exposes `focusFirst()` (React:
|
|
6418
|
+
`focusFirst(element)`), and `Wizard focus-on-step-change` moves the focus into each new step. `Wizard finish-label`
|
|
6419
|
+
names the last button; `validate` may return a text, shown as the step's error.
|
|
6420
|
+
- **Panels elsewhere:** `TabsTrigger controls="pane-id"` points a tab at a pane outside the Tabs (`:controls="null"`
|
|
6421
|
+
for none); `Tabs` takes `null` for "no tab selected" – the first tab stays reachable with Tab.
|
|
6422
|
+
- **Context menus by keyboard:** `@before-open` gets a second argument `{ source: 'pointer' | 'keyboard', focused }` –
|
|
6423
|
+
with Shift+F10 or the menu key `focused` is the element with the focus (e.g. the list row).
|
|
6424
|
+
- **Canvas libraries** (xterm.js, charts): `resolveTokens()` gives the token colours of the current mode and theme as hex;
|
|
6425
|
+
`useResolvedTokens()` updates when the mode, the theme or the system colour scheme changes.
|
|
6426
|
+
- **More compact parts:** `Card size="sm"` for lists in dialogs, `Progress status="neutral"` for cancelled work,
|
|
6427
|
+
`Avatar initials="MS"`, and `Code` for code in a sentence without shiki (the look of `InlineCode` from `/code`).
|
|
6382
6428
|
|
|
6383
6429
|
### Custom theme
|
|
6384
6430
|
|
package/llms.txt
CHANGED
|
@@ -58,6 +58,7 @@ Full API (props, events, slots, examples) in llms-full.txt next to this file. MC
|
|
|
58
58
|
- [ChatThinking](https://wirecore.github.io/WireLayer/?path=/story/react_data-chat--playground): The reasoning of an answer: collapsed by default, "Thinking …" while it is being written (`@wirecore/wirelayer-react`)
|
|
59
59
|
- [ChatToolCall](https://wirecore.github.io/WireLayer/?path=/story/react_data-chat--playground): A tool call of an assistant: name and status in the summary, arguments and result inside (`@wirecore/wirelayer-react`)
|
|
60
60
|
- [Chip](https://wirecore.github.io/WireLayer/?path=/story/react_data-chip--playground): One option of a ChipGroup (a toggle button); outside a ChipGroup a standalone chip, optionally removable (`@wirecore/wirelayer-react`)
|
|
61
|
+
- [Code](https://wirecore.github.io/WireLayer/?path=/story/react_data-code--playground): Code inside a sentence, without syntax colours: the look of InlineCode (/code) without shiki (`@wirecore/wirelayer-react`)
|
|
61
62
|
- [CodeHighlight](https://wirecore.github.io/WireLayer/?path=/story/react_data-codehighlight--playground): Code block with syntax colours; the scroll area is focusable, the copy button copies the plain code (`@wirecore/wirelayer-react/code`)
|
|
62
63
|
- [CodeHighlightTabs](https://wirecore.github.io/WireLayer/?path=/story/react_data-codehighlight--playground): Several files: tabs with the file names (and an icon by type) above the shown code (`@wirecore/wirelayer-react/code`)
|
|
63
64
|
- [CompositeChart](https://wirecore.github.io/WireLayer/?path=/story/react_data-compositechart--playground): Bars and lines in one chart (series[].type), e.g. revenue as bars and margin as a line on a second axis (`@wirecore/wirelayer-react/chart`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecore/wirelayer-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "WireLayer components for React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -166,8 +166,8 @@
|
|
|
166
166
|
"dependencies": {
|
|
167
167
|
"@ark-ui/react": "^5.39.3",
|
|
168
168
|
"@internationalized/date": "^3.12.4",
|
|
169
|
-
"@wirecore/wirelayer-recipes": "^0.
|
|
170
|
-
"@wirecore/wirelayer-tokens": "^0.
|
|
169
|
+
"@wirecore/wirelayer-recipes": "^0.8.1",
|
|
170
|
+
"@wirecore/wirelayer-tokens": "^0.5.1",
|
|
171
171
|
"lucide-react": "^1.59.0"
|
|
172
172
|
},
|
|
173
173
|
"devDependencies": {
|