@wirecore/wirelayer-react 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/Button-Cd7lufvJ.js +60 -0
  2. package/dist/Checkbox-BMRax6m4.js +49 -0
  3. package/dist/ContextMenu-BD72S5n6.js +1452 -0
  4. package/dist/{Field-hc416yJx.js → Field-DkYxlVar.js} +5 -2
  5. package/dist/Highlight-43-H9459.js +302 -0
  6. package/dist/Input-C8T3WLd5.js +119 -0
  7. package/dist/{InputStatus-DS38XEkX.js → InputStatus-hVzkU_4q.js} +4 -1
  8. package/dist/PasswordInput-SjO66gZB.js +422 -0
  9. package/dist/Select-7rfeNmJb.js +242 -0
  10. package/dist/Slider-Bfm_jjYE.js +80 -0
  11. package/dist/{Tree-eqv4DIQn.js → Tree-DVjwp6FG.js} +2 -2
  12. package/dist/chart/Chart.d.ts +11 -5
  13. package/dist/chart/Chart.d.ts.map +1 -1
  14. package/dist/chart/index.d.ts +2 -0
  15. package/dist/chart/index.d.ts.map +1 -1
  16. package/dist/chart.js +44 -37
  17. package/dist/code.js +1 -1
  18. package/dist/components/AngleSlider/AngleSlider.d.ts +3 -1
  19. package/dist/components/AngleSlider/AngleSlider.d.ts.map +1 -1
  20. package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
  21. package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  22. package/dist/components/Badge/Badge.d.ts +3 -1
  23. package/dist/components/Badge/Badge.d.ts.map +1 -1
  24. package/dist/components/Button/Button.d.ts +6 -1
  25. package/dist/components/Button/Button.d.ts.map +1 -1
  26. package/dist/components/Carousel/Carousel.d.ts +3 -1
  27. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  28. package/dist/components/CascadeSelect/CascadeSelect.d.ts +3 -1
  29. package/dist/components/CascadeSelect/CascadeSelect.d.ts.map +1 -1
  30. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  31. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  32. package/dist/components/ChipGroup/ChipGroup.d.ts +1 -1
  33. package/dist/components/ChipGroup/ChipGroup.d.ts.map +1 -1
  34. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -1
  35. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  36. package/dist/components/Combobox/Combobox.d.ts +7 -2
  37. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  38. package/dist/components/Confirm/ConfirmDialog.d.ts +6 -1
  39. package/dist/components/Confirm/ConfirmDialog.d.ts.map +1 -1
  40. package/dist/components/Confirm/confirm.d.ts +7 -0
  41. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  42. package/dist/components/DatePicker/DatePicker.d.ts +5 -1
  43. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  44. package/dist/components/DatePicker/DatePickerBase.d.ts +5 -1
  45. package/dist/components/DatePicker/DatePickerBase.d.ts.map +1 -1
  46. package/dist/components/DateRangePicker/DateRangePicker.d.ts +5 -1
  47. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  48. package/dist/components/Dialog/Dialog.d.ts +8 -2
  49. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  50. package/dist/components/Drawer/Drawer.d.ts +3 -1
  51. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  52. package/dist/components/DurationInput/DurationInput.d.ts +3 -1
  53. package/dist/components/DurationInput/DurationInput.d.ts.map +1 -1
  54. package/dist/components/Field/context.d.ts +3 -1
  55. package/dist/components/Field/context.d.ts.map +1 -1
  56. package/dist/components/FileUpload/FileUpload.d.ts +9 -2
  57. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
  58. package/dist/components/IconButton/IconButton.d.ts +5 -1
  59. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  60. package/dist/components/Knob/Knob.d.ts +3 -1
  61. package/dist/components/Knob/Knob.d.ts.map +1 -1
  62. package/dist/components/Listbox/Listbox.d.ts +3 -1
  63. package/dist/components/Listbox/Listbox.d.ts.map +1 -1
  64. package/dist/components/MonthPicker/MonthPicker.d.ts +5 -1
  65. package/dist/components/MonthPicker/MonthPicker.d.ts.map +1 -1
  66. package/dist/components/MultiSelect/MultiSelect.d.ts +7 -2
  67. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  68. package/dist/components/NumberInput/NumberInput.d.ts +1 -1
  69. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  70. package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
  71. package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
  72. package/dist/components/PinInput/PinInput.d.ts +3 -1
  73. package/dist/components/PinInput/PinInput.d.ts.map +1 -1
  74. package/dist/components/QuarterPicker/QuarterPicker.d.ts +3 -1
  75. package/dist/components/QuarterPicker/QuarterPicker.d.ts.map +1 -1
  76. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  77. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  78. package/dist/components/Rating/Rating.d.ts +3 -1
  79. package/dist/components/Rating/Rating.d.ts.map +1 -1
  80. package/dist/components/SegmentedControl/SegmentedControl.d.ts +3 -3
  81. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  82. package/dist/components/Select/Select.d.ts +9 -2
  83. package/dist/components/Select/Select.d.ts.map +1 -1
  84. package/dist/components/Select/list.d.ts +6 -1
  85. package/dist/components/Select/list.d.ts.map +1 -1
  86. package/dist/components/SelectionCard/SelectionCard.d.ts +1 -1
  87. package/dist/components/SelectionCard/SelectionCard.d.ts.map +1 -1
  88. package/dist/components/Slider/Slider.d.ts +3 -1
  89. package/dist/components/Slider/Slider.d.ts.map +1 -1
  90. package/dist/components/Switch/Switch.d.ts +1 -1
  91. package/dist/components/Switch/Switch.d.ts.map +1 -1
  92. package/dist/components/TagsInput/TagsInput.d.ts +3 -1
  93. package/dist/components/TagsInput/TagsInput.d.ts.map +1 -1
  94. package/dist/components/TimePicker/TimePicker.d.ts +3 -1
  95. package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
  96. package/dist/components/TimeRangePicker/TimeRangePicker.d.ts +3 -1
  97. package/dist/components/TimeRangePicker/TimeRangePicker.d.ts.map +1 -1
  98. package/dist/components/Toast/Toaster.d.ts +10 -2
  99. package/dist/components/Toast/Toaster.d.ts.map +1 -1
  100. package/dist/components/ToggleButton/ToggleButton.d.ts +7 -1
  101. package/dist/components/ToggleButton/ToggleButton.d.ts.map +1 -1
  102. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  103. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  104. package/dist/components/TreeSelect/TreeSelect.d.ts +3 -1
  105. package/dist/components/TreeSelect/TreeSelect.d.ts.map +1 -1
  106. package/dist/components/YearPicker/YearPicker.d.ts +5 -1
  107. package/dist/components/YearPicker/YearPicker.d.ts.map +1 -1
  108. package/dist/data-table/DataTable.d.ts +28 -2
  109. package/dist/data-table/DataTable.d.ts.map +1 -1
  110. package/dist/data-table/FilterMenu.d.ts +7 -1
  111. package/dist/data-table/FilterMenu.d.ts.map +1 -1
  112. package/dist/data-table/ValueInput.d.ts +8 -1
  113. package/dist/data-table/ValueInput.d.ts.map +1 -1
  114. package/dist/data-table/index.d.ts +1 -1
  115. package/dist/data-table/index.d.ts.map +1 -1
  116. package/dist/data-table/types.d.ts +29 -1
  117. package/dist/data-table/types.d.ts.map +1 -1
  118. package/dist/data-table.js +1220 -1142
  119. package/dist/editor.js +2 -2
  120. package/dist/form/FormField.d.ts +5 -1
  121. package/dist/form/FormField.d.ts.map +1 -1
  122. package/dist/form.js +9 -7
  123. package/dist/index.d.ts +1 -1
  124. package/dist/index.d.ts.map +1 -1
  125. package/dist/index.js +3516 -3407
  126. package/dist/label-for-DYgV5EwH.js +9 -0
  127. package/dist/pdf.js +5 -5
  128. package/dist/sources/ActionBar.css +1 -0
  129. package/dist/sources/AppShell.css +1 -0
  130. package/dist/sources/ChatPrompt.css +1 -0
  131. package/dist/sources/Gallery.css +1 -0
  132. package/dist/sources/IconButton.css +1 -0
  133. package/dist/sources/Image.css +1 -0
  134. package/dist/sources/ImageCropper.css +1 -0
  135. package/dist/sources/InlineEdit.css +1 -0
  136. package/dist/sources/Marquee.css +1 -0
  137. package/dist/sources/MegaMenu.css +1 -0
  138. package/dist/sources/Menubar.css +1 -0
  139. package/dist/sources/OrderList.css +1 -0
  140. package/dist/sources/PickList.css +1 -0
  141. package/dist/sources/ScrollTop.css +1 -0
  142. package/dist/utils/label-for.d.ts +3 -0
  143. package/dist/utils/label-for.d.ts.map +1 -0
  144. package/dist/virtual/VirtualSelect.d.ts +1 -1
  145. package/dist/virtual/VirtualSelect.d.ts.map +1 -1
  146. package/dist/virtual.js +245 -236
  147. package/fonts.css +2 -0
  148. package/llms-full.txt +215 -14
  149. package/llms.txt +4 -1
  150. package/package.json +7 -3
  151. package/theme.css +14 -0
  152. package/dist/Button-DFVVqBuY.js +0 -58
  153. package/dist/Checkbox-CZTyKWId.js +0 -44
  154. package/dist/ContextMenu-qh-bB9Lw.js +0 -1426
  155. package/dist/Highlight-DdTridk2.js +0 -291
  156. package/dist/Input-OPRvjIYt.js +0 -108
  157. package/dist/PasswordInput-B9k0GuSx.js +0 -420
  158. package/dist/Select-PbxrUYi1.js +0 -233
  159. package/dist/Slider-x-SsBc1d.js +0 -74
package/llms.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.5.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.4.1",
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,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 };
@@ -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 };