@proyecto-viviana/solidaria-components 0.3.2 → 0.4.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.
- package/dist/ActionBar.js +184 -0
- package/dist/ActionBar.js.map +1 -0
- package/dist/ActionBar.jsx +128 -0
- package/dist/ActionBar.jsx.map +1 -0
- package/dist/ActionGroup.js +179 -0
- package/dist/ActionGroup.js.map +1 -0
- package/dist/ActionGroup.jsx +129 -0
- package/dist/ActionGroup.jsx.map +1 -0
- package/dist/Alert.js +111 -0
- package/dist/Alert.js.map +1 -0
- package/dist/Alert.jsx +82 -0
- package/dist/Alert.jsx.map +1 -0
- package/dist/Autocomplete.js +130 -0
- package/dist/Autocomplete.js.map +1 -0
- package/dist/Autocomplete.jsx +116 -0
- package/dist/Autocomplete.jsx.map +1 -0
- package/dist/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs.js +334 -0
- package/dist/Breadcrumbs.js.map +1 -0
- package/dist/Breadcrumbs.jsx +266 -0
- package/dist/Breadcrumbs.jsx.map +1 -0
- package/dist/Button.d.ts.map +1 -1
- package/dist/Button.js +348 -0
- package/dist/Button.js.map +1 -0
- package/dist/Button.jsx +314 -0
- package/dist/Button.jsx.map +1 -0
- package/dist/Calendar.d.ts +4 -4
- package/dist/Calendar.d.ts.map +1 -1
- package/dist/Calendar.js +538 -0
- package/dist/Calendar.js.map +1 -0
- package/dist/Calendar.jsx +333 -0
- package/dist/Calendar.jsx.map +1 -0
- package/dist/CalendarPicker.d.ts +33 -0
- package/dist/CalendarPicker.d.ts.map +1 -0
- package/dist/CalendarPicker.js +44 -0
- package/dist/CalendarPicker.js.map +1 -0
- package/dist/CalendarPicker.jsx +44 -0
- package/dist/CalendarPicker.jsx.map +1 -0
- package/dist/Checkbox.d.ts +83 -4
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox.js +923 -0
- package/dist/Checkbox.js.map +1 -0
- package/dist/Checkbox.jsx +707 -0
- package/dist/Checkbox.jsx.map +1 -0
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +202 -0
- package/dist/Collection.js.map +1 -0
- package/dist/Collection.jsx +152 -0
- package/dist/Collection.jsx.map +1 -0
- package/dist/Color.d.ts.map +1 -1
- package/dist/Color.js +1720 -0
- package/dist/Color.js.map +1 -0
- package/dist/Color.jsx +1344 -0
- package/dist/Color.jsx.map +1 -0
- package/dist/ColorEditor.js +208 -0
- package/dist/ColorEditor.js.map +1 -0
- package/dist/ColorEditor.jsx +120 -0
- package/dist/ColorEditor.jsx.map +1 -0
- package/dist/ComboBox.d.ts +4 -4
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/ComboBox.js +992 -0
- package/dist/ComboBox.js.map +1 -0
- package/dist/ComboBox.jsx +714 -0
- package/dist/ComboBox.jsx.map +1 -0
- package/dist/ContextualHelpTrigger.js +146 -0
- package/dist/ContextualHelpTrigger.js.map +1 -0
- package/dist/ContextualHelpTrigger.jsx +109 -0
- package/dist/ContextualHelpTrigger.jsx.map +1 -0
- package/dist/DateField.d.ts +3 -3
- package/dist/DateField.d.ts.map +1 -1
- package/dist/DateField.js +4 -0
- package/dist/DateField.jsx +4 -0
- package/dist/DateField2.js +499 -0
- package/dist/DateField2.js.map +1 -0
- package/dist/DateField2.jsx +317 -0
- package/dist/DateField2.jsx.map +1 -0
- package/dist/DatePicker.d.ts +4 -4
- package/dist/DatePicker.d.ts.map +1 -1
- package/dist/DatePicker.js +991 -0
- package/dist/DatePicker.js.map +1 -0
- package/dist/DatePicker.jsx +682 -0
- package/dist/DatePicker.jsx.map +1 -0
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +337 -0
- package/dist/Dialog.js.map +1 -0
- package/dist/Dialog.jsx +192 -0
- package/dist/Dialog.jsx.map +1 -0
- package/dist/Disclosure.d.ts.map +1 -1
- package/dist/Disclosure.js +328 -0
- package/dist/Disclosure.js.map +1 -0
- package/dist/Disclosure.jsx +230 -0
- package/dist/Disclosure.jsx.map +1 -0
- package/dist/DragAndDrop.d.ts.map +1 -1
- package/dist/DragAndDrop.js +176 -0
- package/dist/DragAndDrop.js.map +1 -0
- package/dist/DragAndDrop.jsx +160 -0
- package/dist/DragAndDrop.jsx.map +1 -0
- package/dist/DropZone.d.ts.map +1 -1
- package/dist/DropZone.js +189 -0
- package/dist/DropZone.js.map +1 -0
- package/dist/DropZone.jsx +144 -0
- package/dist/DropZone.jsx.map +1 -0
- package/dist/FieldError.js +66 -0
- package/dist/FieldError.js.map +1 -0
- package/dist/FieldError.jsx +47 -0
- package/dist/FieldError.jsx.map +1 -0
- package/dist/FileTrigger.js +79 -0
- package/dist/FileTrigger.js.map +1 -0
- package/dist/FileTrigger.jsx +49 -0
- package/dist/FileTrigger.jsx.map +1 -0
- package/dist/Focusable.js +70 -0
- package/dist/Focusable.js.map +1 -0
- package/dist/Focusable.jsx +69 -0
- package/dist/Focusable.jsx.map +1 -0
- package/dist/Form.js +99 -0
- package/dist/Form.js.map +1 -0
- package/dist/Form.jsx +73 -0
- package/dist/Form.jsx.map +1 -0
- package/dist/GridList.d.ts +34 -2
- package/dist/GridList.d.ts.map +1 -1
- package/dist/GridList.js +723 -0
- package/dist/GridList.js.map +1 -0
- package/dist/GridList.jsx +552 -0
- package/dist/GridList.jsx.map +1 -0
- package/dist/HiddenTimeInput.js +104 -0
- package/dist/HiddenTimeInput.js.map +1 -0
- package/dist/HiddenTimeInput.jsx +69 -0
- package/dist/HiddenTimeInput.jsx.map +1 -0
- package/dist/Icon.d.ts.map +1 -1
- package/dist/Icon.js +127 -0
- package/dist/Icon.js.map +1 -0
- package/dist/Icon.jsx +72 -0
- package/dist/Icon.jsx.map +1 -0
- package/dist/Keyboard.js +30 -0
- package/dist/Keyboard.js.map +1 -0
- package/dist/Keyboard.jsx +24 -0
- package/dist/Keyboard.jsx.map +1 -0
- package/dist/Landmark.js +134 -0
- package/dist/Landmark.js.map +1 -0
- package/dist/Landmark.jsx +118 -0
- package/dist/Landmark.jsx.map +1 -0
- package/dist/Link.d.ts.map +1 -1
- package/dist/Link.js +219 -0
- package/dist/Link.js.map +1 -0
- package/dist/Link.jsx +189 -0
- package/dist/Link.jsx.map +1 -0
- package/dist/ListBox.d.ts.map +1 -1
- package/dist/ListBox.js +670 -0
- package/dist/ListBox.js.map +1 -0
- package/dist/ListBox.jsx +508 -0
- package/dist/ListBox.jsx.map +1 -0
- package/dist/Menu.d.ts +27 -9
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Menu.js +1254 -0
- package/dist/Menu.js.map +1 -0
- package/dist/Menu.jsx +1042 -0
- package/dist/Menu.jsx.map +1 -0
- package/dist/Meter.d.ts.map +1 -1
- package/dist/Meter.js +123 -0
- package/dist/Meter.js.map +1 -0
- package/dist/Meter.jsx +107 -0
- package/dist/Meter.jsx.map +1 -0
- package/dist/Modal.d.ts.map +1 -1
- package/dist/Modal.js +380 -0
- package/dist/Modal.js.map +1 -0
- package/dist/Modal.jsx +314 -0
- package/dist/Modal.jsx.map +1 -0
- package/dist/NumberField.d.ts +3 -3
- package/dist/NumberField.d.ts.map +1 -1
- package/dist/NumberField.js +573 -0
- package/dist/NumberField.js.map +1 -0
- package/dist/NumberField.jsx +443 -0
- package/dist/NumberField.jsx.map +1 -0
- package/dist/Popover.d.ts +10 -2
- package/dist/Popover.d.ts.map +1 -1
- package/dist/Popover.js +464 -0
- package/dist/Popover.js.map +1 -0
- package/dist/Popover.jsx +333 -0
- package/dist/Popover.jsx.map +1 -0
- package/dist/Pressable.js +69 -0
- package/dist/Pressable.js.map +1 -0
- package/dist/Pressable.jsx +68 -0
- package/dist/Pressable.jsx.map +1 -0
- package/dist/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar.js +130 -0
- package/dist/ProgressBar.js.map +1 -0
- package/dist/ProgressBar.jsx +114 -0
- package/dist/ProgressBar.jsx.map +1 -0
- package/dist/RadioGroup.d.ts +82 -4
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +931 -0
- package/dist/RadioGroup.js.map +1 -0
- package/dist/RadioGroup.jsx +681 -0
- package/dist/RadioGroup.jsx.map +1 -0
- package/dist/RangeCalendar.d.ts.map +1 -1
- package/dist/RangeCalendar.js +410 -0
- package/dist/RangeCalendar.js.map +1 -0
- package/dist/RangeCalendar.jsx +253 -0
- package/dist/RangeCalendar.jsx.map +1 -0
- package/dist/RouterProvider.js +118 -0
- package/dist/RouterProvider.js.map +1 -0
- package/dist/RouterProvider.jsx +112 -0
- package/dist/RouterProvider.jsx.map +1 -0
- package/dist/SearchField.d.ts +2 -2
- package/dist/SearchField.d.ts.map +1 -1
- package/dist/SearchField.js +643 -0
- package/dist/SearchField.js.map +1 -0
- package/dist/SearchField.jsx +526 -0
- package/dist/SearchField.jsx.map +1 -0
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +1031 -0
- package/dist/Select.js.map +1 -0
- package/dist/Select.jsx +744 -0
- package/dist/Select.jsx.map +1 -0
- package/dist/SelectionIndicator.d.ts.map +1 -1
- package/dist/SelectionIndicator.js +86 -0
- package/dist/SelectionIndicator.js.map +1 -0
- package/dist/SelectionIndicator.jsx +50 -0
- package/dist/SelectionIndicator.jsx.map +1 -0
- package/dist/Separator.js +97 -0
- package/dist/Separator.js.map +1 -0
- package/dist/Separator.jsx +85 -0
- package/dist/Separator.jsx.map +1 -0
- package/dist/SharedElementTransition.d.ts.map +1 -1
- package/dist/SharedElementTransition.js +165 -0
- package/dist/SharedElementTransition.js.map +1 -0
- package/dist/SharedElementTransition.jsx +138 -0
- package/dist/SharedElementTransition.jsx.map +1 -0
- package/dist/Slider.d.ts +33 -1
- package/dist/Slider.d.ts.map +1 -1
- package/dist/Slider.js +515 -0
- package/dist/Slider.js.map +1 -0
- package/dist/Slider.jsx +403 -0
- package/dist/Slider.jsx.map +1 -0
- package/dist/StepList.js +198 -0
- package/dist/StepList.js.map +1 -0
- package/dist/StepList.jsx +141 -0
- package/dist/StepList.jsx.map +1 -0
- package/dist/Switch.d.ts +65 -2
- package/dist/Switch.d.ts.map +1 -1
- package/dist/Switch.js +534 -0
- package/dist/Switch.js.map +1 -0
- package/dist/Switch.jsx +393 -0
- package/dist/Switch.jsx.map +1 -0
- package/dist/Table.d.ts +48 -0
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +1759 -0
- package/dist/Table.js.map +1 -0
- package/dist/Table.jsx +1348 -0
- package/dist/Table.jsx.map +1 -0
- package/dist/Tabs.d.ts +0 -4
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/Tabs.js +595 -0
- package/dist/Tabs.js.map +1 -0
- package/dist/Tabs.jsx +367 -0
- package/dist/Tabs.jsx.map +1 -0
- package/dist/TagGroup.d.ts.map +1 -1
- package/dist/TagGroup.js +378 -0
- package/dist/TagGroup.js.map +1 -0
- package/dist/TagGroup.jsx +270 -0
- package/dist/TagGroup.jsx.map +1 -0
- package/dist/Text.d.ts +18 -6
- package/dist/Text.d.ts.map +1 -1
- package/dist/Text.js +42 -0
- package/dist/Text.js.map +1 -0
- package/dist/Text.jsx +35 -0
- package/dist/Text.jsx.map +1 -0
- package/dist/TextField.d.ts +6 -6
- package/dist/TextField.d.ts.map +1 -1
- package/dist/TextField.js +436 -0
- package/dist/TextField.js.map +1 -0
- package/dist/TextField.jsx +403 -0
- package/dist/TextField.jsx.map +1 -0
- package/dist/TimeField.d.ts +3 -3
- package/dist/TimeField.d.ts.map +1 -1
- package/dist/TimeField.js +372 -0
- package/dist/TimeField.js.map +1 -0
- package/dist/TimeField.jsx +224 -0
- package/dist/TimeField.jsx.map +1 -0
- package/dist/Toast.d.ts +14 -0
- package/dist/Toast.d.ts.map +1 -1
- package/dist/Toast.js +551 -0
- package/dist/Toast.js.map +1 -0
- package/dist/Toast.jsx +361 -0
- package/dist/Toast.jsx.map +1 -0
- package/dist/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton.js +123 -0
- package/dist/ToggleButton.js.map +1 -0
- package/dist/ToggleButton.jsx +88 -0
- package/dist/ToggleButton.jsx.map +1 -0
- package/dist/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/ToggleButtonGroup.js +114 -0
- package/dist/ToggleButtonGroup.js.map +1 -0
- package/dist/ToggleButtonGroup.jsx +85 -0
- package/dist/ToggleButtonGroup.jsx.map +1 -0
- package/dist/Toolbar.js +112 -0
- package/dist/Toolbar.js.map +1 -0
- package/dist/Toolbar.jsx +92 -0
- package/dist/Toolbar.jsx.map +1 -0
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip.js +539 -0
- package/dist/Tooltip.js.map +1 -0
- package/dist/Tooltip.jsx +465 -0
- package/dist/Tooltip.jsx.map +1 -0
- package/dist/Tree.d.ts +14 -2
- package/dist/Tree.d.ts.map +1 -1
- package/dist/Tree.js +1424 -0
- package/dist/Tree.js.map +1 -0
- package/dist/Tree.jsx +1172 -0
- package/dist/Tree.jsx.map +1 -0
- package/dist/Virtualizer.d.ts +16 -2
- package/dist/Virtualizer.d.ts.map +1 -1
- package/dist/Virtualizer.js +2 -0
- package/dist/Virtualizer.jsx +2 -0
- package/dist/Virtualizer2.js +751 -0
- package/dist/Virtualizer2.js.map +1 -0
- package/dist/Virtualizer2.jsx +730 -0
- package/dist/Virtualizer2.jsx.map +1 -0
- package/dist/VirtualizerLayouts.d.ts +18 -0
- package/dist/VirtualizerLayouts.d.ts.map +1 -1
- package/dist/VisuallyHidden.js +42 -0
- package/dist/VisuallyHidden.js.map +1 -0
- package/dist/VisuallyHidden.jsx +35 -0
- package/dist/VisuallyHidden.jsx.map +1 -0
- package/dist/contexts.js +33 -0
- package/dist/contexts.js.map +1 -0
- package/dist/contexts.jsx +33 -0
- package/dist/contexts.jsx.map +1 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +70 -23932
- package/dist/index.jsx +70 -18337
- package/dist/useDragAndDrop.js +2 -0
- package/dist/useDragAndDrop.jsx +2 -0
- package/dist/useDragAndDrop2.js +395 -0
- package/dist/useDragAndDrop2.js.map +1 -0
- package/dist/useDragAndDrop2.jsx +395 -0
- package/dist/useDragAndDrop2.jsx.map +1 -0
- package/dist/utils.d.ts +83 -11
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +285 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.jsx +277 -0
- package/dist/utils.jsx.map +1 -0
- package/dist/virtualizer/Layout.js +144 -0
- package/dist/virtualizer/Layout.js.map +1 -0
- package/dist/virtualizer/Layout.jsx +144 -0
- package/dist/virtualizer/Layout.jsx.map +1 -0
- package/package.json +401 -4
- package/src/Breadcrumbs.tsx +3 -1
- package/src/Button.tsx +22 -2
- package/src/Calendar.tsx +27 -10
- package/src/CalendarPicker.tsx +73 -0
- package/src/Checkbox.tsx +539 -3
- package/src/Collection.tsx +9 -3
- package/src/Color.tsx +42 -14
- package/src/ComboBox.tsx +50 -6
- package/src/DateField.tsx +20 -2
- package/src/DatePicker.tsx +57 -5
- package/src/Dialog.tsx +13 -5
- package/src/Disclosure.tsx +3 -1
- package/src/DragAndDrop.tsx +3 -1
- package/src/DropZone.tsx +3 -1
- package/src/GridList.tsx +125 -24
- package/src/Icon.tsx +3 -1
- package/src/Link.tsx +3 -1
- package/src/ListBox.tsx +31 -4
- package/src/Menu.tsx +252 -128
- package/src/Meter.tsx +3 -1
- package/src/Modal.tsx +100 -52
- package/src/NumberField.tsx +51 -8
- package/src/Popover.tsx +40 -10
- package/src/ProgressBar.tsx +3 -1
- package/src/RadioGroup.tsx +468 -4
- package/src/RangeCalendar.tsx +3 -1
- package/src/SearchField.tsx +27 -3
- package/src/Select.tsx +22 -7
- package/src/SelectionIndicator.tsx +3 -1
- package/src/SharedElementTransition.tsx +3 -1
- package/src/Slider.tsx +159 -13
- package/src/Switch.tsx +395 -2
- package/src/Table.tsx +409 -95
- package/src/Tabs.tsx +16 -45
- package/src/TagGroup.tsx +3 -1
- package/src/Text.tsx +31 -10
- package/src/TextField.tsx +43 -5
- package/src/TimeField.tsx +20 -2
- package/src/Toast.tsx +79 -14
- package/src/ToggleButton.tsx +3 -1
- package/src/ToggleButtonGroup.tsx +3 -1
- package/src/Tooltip.tsx +3 -1
- package/src/Tree.tsx +77 -9
- package/src/Virtualizer.tsx +180 -31
- package/src/VirtualizerLayouts.ts +45 -10
- package/src/index.ts +50 -0
- package/src/utils.tsx +243 -27
- package/dist/index.js.map +0 -1
- package/dist/index.jsx.map +0 -1
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
import { Provider, filterDOMProps, useRenderProps } from "./utils.js";
|
|
2
|
+
import { TextContext } from "./Text.js";
|
|
3
|
+
import { createComponent, getNextElement, insert, mergeProps, runHydrationEvents, spread, template, use } from "solid-js/web";
|
|
4
|
+
import { createContext, createMemo, splitProps, useContext } from "solid-js";
|
|
5
|
+
import { createButton, createFocusRing, createHover, createNumberField } from "@proyecto-viviana/solidaria";
|
|
6
|
+
import { createNumberFieldState } from "@proyecto-viviana/solid-stately";
|
|
7
|
+
//#region src/NumberField.tsx
|
|
8
|
+
/**
|
|
9
|
+
* NumberField component for solidaria-components
|
|
10
|
+
*
|
|
11
|
+
* A pre-wired headless number field that combines state + aria hooks.
|
|
12
|
+
* Port of react-aria-components/src/NumberField.tsx
|
|
13
|
+
*/
|
|
14
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div>`), _tmpl$2 = /*#__PURE__*/ template(`<label>`), _tmpl$3 = /*#__PURE__*/ template(`<input>`);
|
|
15
|
+
const NumberFieldContext = createContext(null);
|
|
16
|
+
const NumberFieldStateContext = createContext(null);
|
|
17
|
+
/**
|
|
18
|
+
* A number field allows a user to enter a number and increment/decrement the value.
|
|
19
|
+
*/
|
|
20
|
+
function NumberField(props) {
|
|
21
|
+
const [local, stateProps, ariaProps, rest] = splitProps(props, [
|
|
22
|
+
"children",
|
|
23
|
+
"class",
|
|
24
|
+
"style",
|
|
25
|
+
"slot"
|
|
26
|
+
], [
|
|
27
|
+
"value",
|
|
28
|
+
"defaultValue",
|
|
29
|
+
"onChange",
|
|
30
|
+
"minValue",
|
|
31
|
+
"maxValue",
|
|
32
|
+
"step",
|
|
33
|
+
"locale",
|
|
34
|
+
"formatOptions"
|
|
35
|
+
], [
|
|
36
|
+
"label",
|
|
37
|
+
"aria-label",
|
|
38
|
+
"aria-labelledby",
|
|
39
|
+
"aria-describedby",
|
|
40
|
+
"isDisabled",
|
|
41
|
+
"isReadOnly",
|
|
42
|
+
"isRequired",
|
|
43
|
+
"isInvalid",
|
|
44
|
+
"description",
|
|
45
|
+
"errorMessage",
|
|
46
|
+
"id",
|
|
47
|
+
"autoFocus",
|
|
48
|
+
"name",
|
|
49
|
+
"form",
|
|
50
|
+
"onFocus",
|
|
51
|
+
"onBlur",
|
|
52
|
+
"onFocusChange",
|
|
53
|
+
"onKeyDown",
|
|
54
|
+
"onKeyUp",
|
|
55
|
+
"onPaste",
|
|
56
|
+
"onCopy",
|
|
57
|
+
"onCut"
|
|
58
|
+
]);
|
|
59
|
+
const state = createNumberFieldState({
|
|
60
|
+
get value() {
|
|
61
|
+
return stateProps.value;
|
|
62
|
+
},
|
|
63
|
+
get defaultValue() {
|
|
64
|
+
return stateProps.defaultValue;
|
|
65
|
+
},
|
|
66
|
+
get onChange() {
|
|
67
|
+
return stateProps.onChange;
|
|
68
|
+
},
|
|
69
|
+
get minValue() {
|
|
70
|
+
return stateProps.minValue;
|
|
71
|
+
},
|
|
72
|
+
get maxValue() {
|
|
73
|
+
return stateProps.maxValue;
|
|
74
|
+
},
|
|
75
|
+
get step() {
|
|
76
|
+
return stateProps.step;
|
|
77
|
+
},
|
|
78
|
+
get locale() {
|
|
79
|
+
return stateProps.locale;
|
|
80
|
+
},
|
|
81
|
+
get formatOptions() {
|
|
82
|
+
return stateProps.formatOptions;
|
|
83
|
+
},
|
|
84
|
+
get isDisabled() {
|
|
85
|
+
return ariaProps.isDisabled;
|
|
86
|
+
},
|
|
87
|
+
get isReadOnly() {
|
|
88
|
+
return ariaProps.isReadOnly;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
let inputRef;
|
|
92
|
+
const setInputRef = (el) => {
|
|
93
|
+
inputRef = el;
|
|
94
|
+
};
|
|
95
|
+
const numberFieldAria = createNumberField({
|
|
96
|
+
get label() {
|
|
97
|
+
return ariaProps.label;
|
|
98
|
+
},
|
|
99
|
+
get "aria-label"() {
|
|
100
|
+
return ariaProps["aria-label"];
|
|
101
|
+
},
|
|
102
|
+
get "aria-labelledby"() {
|
|
103
|
+
return ariaProps["aria-labelledby"];
|
|
104
|
+
},
|
|
105
|
+
get "aria-describedby"() {
|
|
106
|
+
return ariaProps["aria-describedby"];
|
|
107
|
+
},
|
|
108
|
+
get isDisabled() {
|
|
109
|
+
return ariaProps.isDisabled;
|
|
110
|
+
},
|
|
111
|
+
get isReadOnly() {
|
|
112
|
+
return ariaProps.isReadOnly;
|
|
113
|
+
},
|
|
114
|
+
get isRequired() {
|
|
115
|
+
return ariaProps.isRequired;
|
|
116
|
+
},
|
|
117
|
+
get isInvalid() {
|
|
118
|
+
return ariaProps.isInvalid;
|
|
119
|
+
},
|
|
120
|
+
get description() {
|
|
121
|
+
return ariaProps.description;
|
|
122
|
+
},
|
|
123
|
+
get errorMessage() {
|
|
124
|
+
return ariaProps.errorMessage;
|
|
125
|
+
},
|
|
126
|
+
get id() {
|
|
127
|
+
return ariaProps.id;
|
|
128
|
+
},
|
|
129
|
+
get autoFocus() {
|
|
130
|
+
return ariaProps.autoFocus;
|
|
131
|
+
},
|
|
132
|
+
get name() {
|
|
133
|
+
return ariaProps.name;
|
|
134
|
+
},
|
|
135
|
+
get form() {
|
|
136
|
+
return ariaProps.form;
|
|
137
|
+
},
|
|
138
|
+
get onFocus() {
|
|
139
|
+
return ariaProps.onFocus;
|
|
140
|
+
},
|
|
141
|
+
get onBlur() {
|
|
142
|
+
return ariaProps.onBlur;
|
|
143
|
+
},
|
|
144
|
+
get onFocusChange() {
|
|
145
|
+
return ariaProps.onFocusChange;
|
|
146
|
+
},
|
|
147
|
+
get onKeyDown() {
|
|
148
|
+
return ariaProps.onKeyDown;
|
|
149
|
+
},
|
|
150
|
+
get onKeyUp() {
|
|
151
|
+
return ariaProps.onKeyUp;
|
|
152
|
+
},
|
|
153
|
+
get onPaste() {
|
|
154
|
+
return ariaProps.onPaste;
|
|
155
|
+
},
|
|
156
|
+
get onCopy() {
|
|
157
|
+
return ariaProps.onCopy;
|
|
158
|
+
},
|
|
159
|
+
get onCut() {
|
|
160
|
+
return ariaProps.onCut;
|
|
161
|
+
}
|
|
162
|
+
}, state, () => inputRef ?? null);
|
|
163
|
+
const renderValues = createMemo(() => ({
|
|
164
|
+
isDisabled: ariaProps.isDisabled ?? false,
|
|
165
|
+
isInvalid: ariaProps.isInvalid ?? false,
|
|
166
|
+
isRequired: ariaProps.isRequired ?? false,
|
|
167
|
+
isReadOnly: ariaProps.isReadOnly ?? false,
|
|
168
|
+
value: state.numberValue()
|
|
169
|
+
}));
|
|
170
|
+
const renderProps = useRenderProps({
|
|
171
|
+
get children() {
|
|
172
|
+
return props.children;
|
|
173
|
+
},
|
|
174
|
+
class: local.class,
|
|
175
|
+
style: local.style,
|
|
176
|
+
defaultClassName: "solidaria-NumberField"
|
|
177
|
+
}, renderValues);
|
|
178
|
+
const childRenderValues = {
|
|
179
|
+
get isDisabled() {
|
|
180
|
+
return ariaProps.isDisabled ?? false;
|
|
181
|
+
},
|
|
182
|
+
get isInvalid() {
|
|
183
|
+
return ariaProps.isInvalid ?? false;
|
|
184
|
+
},
|
|
185
|
+
get isRequired() {
|
|
186
|
+
return ariaProps.isRequired ?? false;
|
|
187
|
+
},
|
|
188
|
+
get isReadOnly() {
|
|
189
|
+
return ariaProps.isReadOnly ?? false;
|
|
190
|
+
},
|
|
191
|
+
get value() {
|
|
192
|
+
return state.numberValue();
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
const fieldChildren = () => {
|
|
196
|
+
const children = local.children;
|
|
197
|
+
return typeof children === "function" ? children(childRenderValues) : children;
|
|
198
|
+
};
|
|
199
|
+
const domProps = createMemo(() => filterDOMProps(rest, { global: true }));
|
|
200
|
+
const contextValue = {
|
|
201
|
+
state,
|
|
202
|
+
get inputProps() {
|
|
203
|
+
return numberFieldAria.inputProps;
|
|
204
|
+
},
|
|
205
|
+
get incrementButtonProps() {
|
|
206
|
+
return numberFieldAria.incrementButtonProps;
|
|
207
|
+
},
|
|
208
|
+
get decrementButtonProps() {
|
|
209
|
+
return numberFieldAria.decrementButtonProps;
|
|
210
|
+
},
|
|
211
|
+
get labelProps() {
|
|
212
|
+
return numberFieldAria.labelProps;
|
|
213
|
+
},
|
|
214
|
+
get groupProps() {
|
|
215
|
+
return numberFieldAria.groupProps;
|
|
216
|
+
},
|
|
217
|
+
get descriptionProps() {
|
|
218
|
+
return numberFieldAria.descriptionProps;
|
|
219
|
+
},
|
|
220
|
+
get errorMessageProps() {
|
|
221
|
+
return numberFieldAria.errorMessageProps;
|
|
222
|
+
},
|
|
223
|
+
get isDisabled() {
|
|
224
|
+
return ariaProps.isDisabled ?? false;
|
|
225
|
+
},
|
|
226
|
+
get isInvalid() {
|
|
227
|
+
return ariaProps.isInvalid ?? false;
|
|
228
|
+
},
|
|
229
|
+
get isRequired() {
|
|
230
|
+
return ariaProps.isRequired ?? false;
|
|
231
|
+
},
|
|
232
|
+
get isReadOnly() {
|
|
233
|
+
return ariaProps.isReadOnly ?? false;
|
|
234
|
+
},
|
|
235
|
+
setInputRef
|
|
236
|
+
};
|
|
237
|
+
const textSlots = { slots: {
|
|
238
|
+
get description() {
|
|
239
|
+
return numberFieldAria.descriptionProps;
|
|
240
|
+
},
|
|
241
|
+
get errorMessage() {
|
|
242
|
+
return numberFieldAria.errorMessageProps;
|
|
243
|
+
}
|
|
244
|
+
} };
|
|
245
|
+
return createComponent(NumberFieldStateContext.Provider, {
|
|
246
|
+
value: state,
|
|
247
|
+
get children() {
|
|
248
|
+
return createComponent(NumberFieldContext.Provider, {
|
|
249
|
+
value: contextValue,
|
|
250
|
+
get children() {
|
|
251
|
+
var _el$ = getNextElement(_tmpl$);
|
|
252
|
+
spread(_el$, mergeProps(domProps, {
|
|
253
|
+
get ["class"]() {
|
|
254
|
+
return renderProps.class();
|
|
255
|
+
},
|
|
256
|
+
get style() {
|
|
257
|
+
return renderProps.style();
|
|
258
|
+
},
|
|
259
|
+
get ["data-disabled"]() {
|
|
260
|
+
return ariaProps.isDisabled || void 0;
|
|
261
|
+
},
|
|
262
|
+
get ["data-invalid"]() {
|
|
263
|
+
return ariaProps.isInvalid || void 0;
|
|
264
|
+
},
|
|
265
|
+
get ["data-required"]() {
|
|
266
|
+
return ariaProps.isRequired || void 0;
|
|
267
|
+
},
|
|
268
|
+
get ["data-readonly"]() {
|
|
269
|
+
return ariaProps.isReadOnly || void 0;
|
|
270
|
+
}
|
|
271
|
+
}), false, true);
|
|
272
|
+
insert(_el$, createComponent(Provider, {
|
|
273
|
+
values: [[TextContext, textSlots]],
|
|
274
|
+
get children() {
|
|
275
|
+
return fieldChildren();
|
|
276
|
+
}
|
|
277
|
+
}));
|
|
278
|
+
runHydrationEvents();
|
|
279
|
+
return _el$;
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* The label for a number field.
|
|
287
|
+
*/
|
|
288
|
+
function NumberFieldLabel(props) {
|
|
289
|
+
const context = useContext(NumberFieldContext);
|
|
290
|
+
if (!context) throw new Error("NumberFieldLabel must be used within a NumberField");
|
|
291
|
+
const cleanLabelProps = () => {
|
|
292
|
+
const { ref: _ref, ...rest } = context.labelProps;
|
|
293
|
+
return rest;
|
|
294
|
+
};
|
|
295
|
+
return (() => {
|
|
296
|
+
var _el$2 = getNextElement(_tmpl$2);
|
|
297
|
+
spread(_el$2, mergeProps(cleanLabelProps, {
|
|
298
|
+
get ["class"]() {
|
|
299
|
+
return props.class ?? "solidaria-NumberField-label";
|
|
300
|
+
},
|
|
301
|
+
get style() {
|
|
302
|
+
return props.style;
|
|
303
|
+
}
|
|
304
|
+
}), false, true);
|
|
305
|
+
insert(_el$2, () => props.children);
|
|
306
|
+
runHydrationEvents();
|
|
307
|
+
return _el$2;
|
|
308
|
+
})();
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* The input group for a number field (contains input and buttons).
|
|
312
|
+
*/
|
|
313
|
+
function NumberFieldGroup(props) {
|
|
314
|
+
const [local, domProps] = splitProps(props, [
|
|
315
|
+
"children",
|
|
316
|
+
"class",
|
|
317
|
+
"style"
|
|
318
|
+
]);
|
|
319
|
+
const context = useContext(NumberFieldContext);
|
|
320
|
+
if (!context) throw new Error("NumberFieldGroup must be used within a NumberField");
|
|
321
|
+
const cleanGroupProps = () => {
|
|
322
|
+
const { ref: _ref, ...rest } = context.groupProps;
|
|
323
|
+
return rest;
|
|
324
|
+
};
|
|
325
|
+
return (() => {
|
|
326
|
+
var _el$3 = getNextElement(_tmpl$);
|
|
327
|
+
spread(_el$3, mergeProps(domProps, cleanGroupProps, {
|
|
328
|
+
get ["class"]() {
|
|
329
|
+
return local.class ?? "solidaria-NumberField-group";
|
|
330
|
+
},
|
|
331
|
+
get style() {
|
|
332
|
+
return local.style;
|
|
333
|
+
}
|
|
334
|
+
}), false, true);
|
|
335
|
+
insert(_el$3, () => local.children);
|
|
336
|
+
runHydrationEvents();
|
|
337
|
+
return _el$3;
|
|
338
|
+
})();
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* The input element for a number field.
|
|
342
|
+
*/
|
|
343
|
+
function NumberFieldInput(props) {
|
|
344
|
+
const [local, domProps] = splitProps(props, [
|
|
345
|
+
"class",
|
|
346
|
+
"style",
|
|
347
|
+
"slot"
|
|
348
|
+
]);
|
|
349
|
+
const context = useContext(NumberFieldContext);
|
|
350
|
+
if (!context) throw new Error("NumberFieldInput must be used within a NumberField");
|
|
351
|
+
const { isFocused, isFocusVisible, focusProps } = createFocusRing();
|
|
352
|
+
const { isHovered, hoverProps } = createHover({ get isDisabled() {
|
|
353
|
+
return context.isDisabled;
|
|
354
|
+
} });
|
|
355
|
+
const renderValues = createMemo(() => ({
|
|
356
|
+
isFocused: isFocused(),
|
|
357
|
+
isFocusVisible: isFocusVisible(),
|
|
358
|
+
isHovered: isHovered(),
|
|
359
|
+
isDisabled: context.isDisabled,
|
|
360
|
+
isInvalid: context.isInvalid
|
|
361
|
+
}));
|
|
362
|
+
const renderProps = useRenderProps({
|
|
363
|
+
class: local.class,
|
|
364
|
+
style: local.style,
|
|
365
|
+
defaultClassName: "solidaria-NumberField-input"
|
|
366
|
+
}, renderValues);
|
|
367
|
+
const cleanInputProps = () => {
|
|
368
|
+
const { ref: _ref, onInput: _onInput, ...rest } = context.inputProps;
|
|
369
|
+
return rest;
|
|
370
|
+
};
|
|
371
|
+
const cleanFocusProps = () => {
|
|
372
|
+
const { ref: _ref, ...rest } = focusProps;
|
|
373
|
+
return rest;
|
|
374
|
+
};
|
|
375
|
+
const cleanHoverProps = () => {
|
|
376
|
+
const { ref: _ref, ...rest } = hoverProps;
|
|
377
|
+
return rest;
|
|
378
|
+
};
|
|
379
|
+
const handleInput = (event) => {
|
|
380
|
+
context.inputProps.onInput?.(event);
|
|
381
|
+
domProps.onInput?.(event);
|
|
382
|
+
};
|
|
383
|
+
return (() => {
|
|
384
|
+
var _el$4 = getNextElement(_tmpl$3);
|
|
385
|
+
var _ref$ = context.setInputRef;
|
|
386
|
+
typeof _ref$ === "function" ? use(_ref$, _el$4) : context.setInputRef = _el$4;
|
|
387
|
+
spread(_el$4, mergeProps(domProps, cleanInputProps, cleanFocusProps, cleanHoverProps, {
|
|
388
|
+
"onInput": handleInput,
|
|
389
|
+
get ["class"]() {
|
|
390
|
+
return renderProps.class();
|
|
391
|
+
},
|
|
392
|
+
get style() {
|
|
393
|
+
return renderProps.style();
|
|
394
|
+
},
|
|
395
|
+
get ["data-focused"]() {
|
|
396
|
+
return isFocused() || void 0;
|
|
397
|
+
},
|
|
398
|
+
get ["data-focus-visible"]() {
|
|
399
|
+
return isFocusVisible() || void 0;
|
|
400
|
+
},
|
|
401
|
+
get ["data-hovered"]() {
|
|
402
|
+
return isHovered() || void 0;
|
|
403
|
+
},
|
|
404
|
+
get ["data-disabled"]() {
|
|
405
|
+
return context.isDisabled || void 0;
|
|
406
|
+
},
|
|
407
|
+
get ["data-invalid"]() {
|
|
408
|
+
return context.isInvalid || void 0;
|
|
409
|
+
}
|
|
410
|
+
}), false, false);
|
|
411
|
+
runHydrationEvents();
|
|
412
|
+
return _el$4;
|
|
413
|
+
})();
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* The increment button for a number field.
|
|
417
|
+
*/
|
|
418
|
+
function NumberFieldIncrementButton(props) {
|
|
419
|
+
const [local, domProps] = splitProps(props, [
|
|
420
|
+
"class",
|
|
421
|
+
"style",
|
|
422
|
+
"slot",
|
|
423
|
+
"children"
|
|
424
|
+
]);
|
|
425
|
+
const context = useContext(NumberFieldContext);
|
|
426
|
+
if (!context) throw new Error("NumberFieldIncrementButton must be used within a NumberField");
|
|
427
|
+
const isDisabled = () => context.isDisabled || !context.state.canIncrement();
|
|
428
|
+
const pressButtonProps = () => {
|
|
429
|
+
const { onClick: _onClick, disabled: _disabled, type: _type, tabIndex: _tabIndex, ...rest } = context.incrementButtonProps;
|
|
430
|
+
return rest;
|
|
431
|
+
};
|
|
432
|
+
const buttonAria = createButton({
|
|
433
|
+
...pressButtonProps(),
|
|
434
|
+
elementType: "div",
|
|
435
|
+
get isDisabled() {
|
|
436
|
+
return isDisabled();
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
const { isHovered, hoverProps } = createHover({ get isDisabled() {
|
|
440
|
+
return context.isDisabled || !context.state.canIncrement();
|
|
441
|
+
} });
|
|
442
|
+
const renderValues = createMemo(() => ({
|
|
443
|
+
isPressed: buttonAria.isPressed(),
|
|
444
|
+
isHovered: isHovered(),
|
|
445
|
+
isDisabled: isDisabled()
|
|
446
|
+
}));
|
|
447
|
+
const renderProps = useRenderProps({
|
|
448
|
+
get children() {
|
|
449
|
+
return props.children;
|
|
450
|
+
},
|
|
451
|
+
class: local.class,
|
|
452
|
+
style: local.style,
|
|
453
|
+
defaultClassName: "solidaria-NumberField-increment"
|
|
454
|
+
}, renderValues);
|
|
455
|
+
const cleanButtonProps = () => {
|
|
456
|
+
const { ref: _ref, ...rest } = buttonAria.buttonProps;
|
|
457
|
+
return rest;
|
|
458
|
+
};
|
|
459
|
+
const cleanHoverProps = () => {
|
|
460
|
+
const { ref: _ref, ...rest } = hoverProps;
|
|
461
|
+
return rest;
|
|
462
|
+
};
|
|
463
|
+
return (() => {
|
|
464
|
+
var _el$5 = getNextElement(_tmpl$);
|
|
465
|
+
spread(_el$5, mergeProps(domProps, cleanButtonProps, cleanHoverProps, {
|
|
466
|
+
get ["aria-disabled"]() {
|
|
467
|
+
return isDisabled() || void 0;
|
|
468
|
+
},
|
|
469
|
+
get ["class"]() {
|
|
470
|
+
return renderProps.class();
|
|
471
|
+
},
|
|
472
|
+
get style() {
|
|
473
|
+
return renderProps.style();
|
|
474
|
+
},
|
|
475
|
+
get ["data-pressed"]() {
|
|
476
|
+
return buttonAria.isPressed() || void 0;
|
|
477
|
+
},
|
|
478
|
+
get ["data-hovered"]() {
|
|
479
|
+
return isHovered() || void 0;
|
|
480
|
+
},
|
|
481
|
+
get ["data-disabled"]() {
|
|
482
|
+
return isDisabled() || void 0;
|
|
483
|
+
}
|
|
484
|
+
}), false, true);
|
|
485
|
+
insert(_el$5, () => renderProps.renderChildren());
|
|
486
|
+
runHydrationEvents();
|
|
487
|
+
return _el$5;
|
|
488
|
+
})();
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* The decrement button for a number field.
|
|
492
|
+
*/
|
|
493
|
+
function NumberFieldDecrementButton(props) {
|
|
494
|
+
const [local, domProps] = splitProps(props, [
|
|
495
|
+
"class",
|
|
496
|
+
"style",
|
|
497
|
+
"slot",
|
|
498
|
+
"children"
|
|
499
|
+
]);
|
|
500
|
+
const context = useContext(NumberFieldContext);
|
|
501
|
+
if (!context) throw new Error("NumberFieldDecrementButton must be used within a NumberField");
|
|
502
|
+
const isDisabled = () => context.isDisabled || !context.state.canDecrement();
|
|
503
|
+
const pressButtonProps = () => {
|
|
504
|
+
const { onClick: _onClick, disabled: _disabled, type: _type, tabIndex: _tabIndex, ...rest } = context.decrementButtonProps;
|
|
505
|
+
return rest;
|
|
506
|
+
};
|
|
507
|
+
const buttonAria = createButton({
|
|
508
|
+
...pressButtonProps(),
|
|
509
|
+
elementType: "div",
|
|
510
|
+
get isDisabled() {
|
|
511
|
+
return isDisabled();
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
const { isHovered, hoverProps } = createHover({ get isDisabled() {
|
|
515
|
+
return context.isDisabled || !context.state.canDecrement();
|
|
516
|
+
} });
|
|
517
|
+
const renderValues = createMemo(() => ({
|
|
518
|
+
isPressed: buttonAria.isPressed(),
|
|
519
|
+
isHovered: isHovered(),
|
|
520
|
+
isDisabled: isDisabled()
|
|
521
|
+
}));
|
|
522
|
+
const renderProps = useRenderProps({
|
|
523
|
+
get children() {
|
|
524
|
+
return props.children;
|
|
525
|
+
},
|
|
526
|
+
class: local.class,
|
|
527
|
+
style: local.style,
|
|
528
|
+
defaultClassName: "solidaria-NumberField-decrement"
|
|
529
|
+
}, renderValues);
|
|
530
|
+
const cleanButtonProps = () => {
|
|
531
|
+
const { ref: _ref, ...rest } = buttonAria.buttonProps;
|
|
532
|
+
return rest;
|
|
533
|
+
};
|
|
534
|
+
const cleanHoverProps = () => {
|
|
535
|
+
const { ref: _ref, ...rest } = hoverProps;
|
|
536
|
+
return rest;
|
|
537
|
+
};
|
|
538
|
+
return (() => {
|
|
539
|
+
var _el$6 = getNextElement(_tmpl$);
|
|
540
|
+
spread(_el$6, mergeProps(domProps, cleanButtonProps, cleanHoverProps, {
|
|
541
|
+
get ["aria-disabled"]() {
|
|
542
|
+
return isDisabled() || void 0;
|
|
543
|
+
},
|
|
544
|
+
get ["class"]() {
|
|
545
|
+
return renderProps.class();
|
|
546
|
+
},
|
|
547
|
+
get style() {
|
|
548
|
+
return renderProps.style();
|
|
549
|
+
},
|
|
550
|
+
get ["data-pressed"]() {
|
|
551
|
+
return buttonAria.isPressed() || void 0;
|
|
552
|
+
},
|
|
553
|
+
get ["data-hovered"]() {
|
|
554
|
+
return isHovered() || void 0;
|
|
555
|
+
},
|
|
556
|
+
get ["data-disabled"]() {
|
|
557
|
+
return isDisabled() || void 0;
|
|
558
|
+
}
|
|
559
|
+
}), false, true);
|
|
560
|
+
insert(_el$6, () => renderProps.renderChildren());
|
|
561
|
+
runHydrationEvents();
|
|
562
|
+
return _el$6;
|
|
563
|
+
})();
|
|
564
|
+
}
|
|
565
|
+
NumberField.Label = NumberFieldLabel;
|
|
566
|
+
NumberField.Group = NumberFieldGroup;
|
|
567
|
+
NumberField.Input = NumberFieldInput;
|
|
568
|
+
NumberField.IncrementButton = NumberFieldIncrementButton;
|
|
569
|
+
NumberField.DecrementButton = NumberFieldDecrementButton;
|
|
570
|
+
//#endregion
|
|
571
|
+
export { NumberField, NumberFieldContext, NumberFieldDecrementButton, NumberFieldGroup, NumberFieldIncrementButton, NumberFieldInput, NumberFieldLabel, NumberFieldStateContext };
|
|
572
|
+
|
|
573
|
+
//# sourceMappingURL=NumberField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.js","names":["JSX","Context","createContext","createMemo","splitProps","useContext","createNumberField","createButton","createFocusRing","createHover","AriaNumberFieldProps","AriaButtonProps","createNumberFieldState","NumberFieldState","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","filterDOMProps","Provider","TextContext","NumberFieldRenderProps","isDisabled","isInvalid","isRequired","isReadOnly","value","NumberFieldProps","Omit","defaultValue","onChange","minValue","maxValue","step","locale","formatOptions","Intl","NumberFormatOptions","label","Element","children","class","style","NumberFieldInputRenderProps","isFocused","isFocusVisible","isHovered","NumberFieldInputProps","NumberFieldButtonRenderProps","isPressed","NumberFieldIncrementButtonProps","NumberFieldDecrementButtonProps","NumberFieldContextValue","state","inputProps","InputHTMLAttributes","HTMLInputElement","incrementButtonProps","decrementButtonProps","labelProps","HTMLAttributes","HTMLElement","groupProps","descriptionProps","errorMessageProps","setInputRef","el","NumberFieldContext","NumberFieldStateContext","NumberField","props","local","stateProps","ariaProps","rest","inputRef","numberFieldAria","aria-label","aria-labelledby","aria-describedby","description","errorMessage","id","autoFocus","name","form","onFocus","onBlur","onFocusChange","onKeyDown","onKeyUp","onPaste","onCopy","onCut","renderValues","numberValue","renderProps","defaultClassName","childRenderValues","fieldChildren","domProps","Record","global","contextValue","textSlots","slots","_$createComponent","_el$","_$getNextElement","_tmpl$","_$spread","_$mergeProps","data-disabled","undefined","data-invalid","data-required","data-readonly","_$insert","values","Array","_$runHydrationEvents","NumberFieldLabel","CSSProperties","context","Error","cleanLabelProps","ref","_ref","_el$2","_tmpl$2","NumberFieldGroup","HTMLDivElement","cleanGroupProps","_el$3","NumberFieldInput","focusProps","hoverProps","cleanInputProps","onInput","_onInput","cleanFocusProps","cleanHoverProps","handleInput","EventHandler","InputEvent","event","_el$4","_tmpl$3","_ref$","_$use","data-focused","data-focus-visible","data-hovered","NumberFieldIncrementButton","canIncrement","pressButtonProps","onClick","_onClick","disabled","_disabled","type","_type","tabIndex","_tabIndex","buttonAria","elementType","cleanButtonProps","buttonProps","_el$5","aria-disabled","data-pressed","renderChildren","NumberFieldDecrementButton","canDecrement","_el$6","Label","Group","Input","IncrementButton","DecrementButton"],"sources":["../src/NumberField.tsx"],"sourcesContent":["/**\n * NumberField component for solidaria-components\n *\n * A pre-wired headless number field that combines state + aria hooks.\n * Port of react-aria-components/src/NumberField.tsx\n */\n\nimport {\n type JSX,\n type Context,\n createContext,\n createMemo,\n splitProps,\n useContext,\n} from \"solid-js\";\nimport {\n createNumberField,\n createButton,\n createFocusRing,\n createHover,\n type AriaNumberFieldProps,\n type AriaButtonProps,\n} from \"@proyecto-viviana/solidaria\";\nimport { createNumberFieldState, type NumberFieldState } from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n Provider,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\n\nexport interface NumberFieldRenderProps {\n /** Whether the number field is disabled. */\n isDisabled: boolean;\n /** Whether the number field is invalid. */\n isInvalid: boolean;\n /** Whether the number field is required. */\n isRequired: boolean;\n /** Whether the number field is read-only. */\n isReadOnly: boolean;\n /** The current numeric value. */\n value: number;\n}\n\nexport interface NumberFieldProps extends Omit<AriaNumberFieldProps, \"label\">, SlotProps {\n /** The current value (controlled). */\n value?: number;\n /** The default value (uncontrolled). */\n defaultValue?: number;\n /** Handler called when the value changes. */\n onChange?: (value: number) => void;\n /** The minimum value. */\n minValue?: number;\n /** The maximum value. */\n maxValue?: number;\n /** The step value for increment/decrement. */\n step?: number;\n /** The locale for number formatting. */\n locale?: string;\n /** Number format options. */\n formatOptions?: Intl.NumberFormatOptions;\n /** A visible label for the number field. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<NumberFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldRenderProps>;\n}\n\nexport interface NumberFieldInputRenderProps {\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is invalid. */\n isInvalid: boolean;\n}\n\nexport interface NumberFieldInputProps extends SlotProps {\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldInputRenderProps>;\n}\n\nexport interface NumberFieldButtonRenderProps {\n /** Whether the button is pressed. */\n isPressed: boolean;\n /** Whether the button is hovered. */\n isHovered: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface NumberFieldIncrementButtonProps extends SlotProps {\n /** The children of the button. */\n children?: RenderChildren<NumberFieldButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldButtonRenderProps>;\n}\n\nexport interface NumberFieldDecrementButtonProps extends SlotProps {\n /** The children of the button. */\n children?: RenderChildren<NumberFieldButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldButtonRenderProps>;\n}\n\ninterface NumberFieldContextValue {\n state: NumberFieldState;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n incrementButtonProps: AriaButtonProps;\n decrementButtonProps: AriaButtonProps;\n labelProps: JSX.HTMLAttributes<HTMLElement>;\n groupProps: JSX.HTMLAttributes<HTMLElement>;\n descriptionProps: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps: JSX.HTMLAttributes<HTMLElement>;\n isDisabled: boolean;\n isInvalid: boolean;\n isRequired: boolean;\n isReadOnly: boolean;\n setInputRef: (el: HTMLInputElement) => void;\n}\n\nexport const NumberFieldContext = createContext<NumberFieldContextValue | null>(null);\nexport const NumberFieldStateContext = createContext<NumberFieldState | null>(null);\n\n/**\n * A number field allows a user to enter a number and increment/decrement the value.\n */\nexport function NumberField(props: NumberFieldProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\"],\n [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"minValue\",\n \"maxValue\",\n \"step\",\n \"locale\",\n \"formatOptions\",\n ],\n [\n \"label\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"isDisabled\",\n \"isReadOnly\",\n \"isRequired\",\n \"isInvalid\",\n \"description\",\n \"errorMessage\",\n \"id\",\n \"autoFocus\",\n \"name\",\n \"form\",\n \"onFocus\",\n \"onBlur\",\n \"onFocusChange\",\n \"onKeyDown\",\n \"onKeyUp\",\n \"onPaste\",\n \"onCopy\",\n \"onCut\",\n ],\n );\n\n const state = createNumberFieldState({\n get value() {\n return stateProps.value;\n },\n get defaultValue() {\n return stateProps.defaultValue;\n },\n get onChange() {\n return stateProps.onChange;\n },\n get minValue() {\n return stateProps.minValue;\n },\n get maxValue() {\n return stateProps.maxValue;\n },\n get step() {\n return stateProps.step;\n },\n get locale() {\n return stateProps.locale;\n },\n get formatOptions() {\n return stateProps.formatOptions;\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly;\n },\n });\n\n let inputRef: HTMLInputElement | undefined;\n const setInputRef = (el: HTMLInputElement) => {\n inputRef = el;\n };\n\n const numberFieldAria = createNumberField(\n {\n get label() {\n return ariaProps.label;\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly;\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n get isInvalid() {\n return ariaProps.isInvalid;\n },\n get description() {\n return ariaProps.description;\n },\n get errorMessage() {\n return ariaProps.errorMessage;\n },\n get id() {\n return ariaProps.id;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get name() {\n return ariaProps.name;\n },\n get form() {\n return ariaProps.form;\n },\n get onFocus() {\n return ariaProps.onFocus;\n },\n get onBlur() {\n return ariaProps.onBlur;\n },\n get onFocusChange() {\n return ariaProps.onFocusChange;\n },\n get onKeyDown() {\n return ariaProps.onKeyDown;\n },\n get onKeyUp() {\n return ariaProps.onKeyUp;\n },\n get onPaste() {\n return ariaProps.onPaste;\n },\n get onCopy() {\n return ariaProps.onCopy;\n },\n get onCut() {\n return ariaProps.onCut;\n },\n },\n state,\n () => inputRef ?? null,\n );\n\n const renderValues = createMemo<NumberFieldRenderProps>(() => ({\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: ariaProps.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n value: state.numberValue(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-NumberField\",\n },\n renderValues,\n );\n\n const childRenderValues: NumberFieldRenderProps = {\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get isInvalid() {\n return ariaProps.isInvalid ?? false;\n },\n get isRequired() {\n return ariaProps.isRequired ?? false;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly ?? false;\n },\n get value() {\n return state.numberValue();\n },\n };\n\n const fieldChildren = () => {\n const children = local.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n };\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n\n const contextValue: NumberFieldContextValue = {\n state,\n get inputProps() {\n return numberFieldAria.inputProps;\n },\n get incrementButtonProps() {\n return numberFieldAria.incrementButtonProps;\n },\n get decrementButtonProps() {\n return numberFieldAria.decrementButtonProps;\n },\n get labelProps() {\n return numberFieldAria.labelProps;\n },\n get groupProps() {\n return numberFieldAria.groupProps;\n },\n get descriptionProps() {\n return numberFieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return numberFieldAria.errorMessageProps;\n },\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get isInvalid() {\n return ariaProps.isInvalid ?? false;\n },\n get isRequired() {\n return ariaProps.isRequired ?? false;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly ?? false;\n },\n setInputRef,\n };\n // Provide the description / errorMessage props as `TextContext` slots (mirrors\n // react-aria-components' NumberField), so a `<Text slot=\"description\">` /\n // `<Text slot=\"errorMessage\">` child picks up the `id` its `aria-describedby`\n // references. Additive: existing consumers reading these off\n // `NumberFieldContext` are unaffected.\n const textSlots = {\n slots: {\n get description() {\n return numberFieldAria.descriptionProps;\n },\n get errorMessage() {\n return numberFieldAria.errorMessageProps;\n },\n },\n };\n\n return (\n <NumberFieldStateContext.Provider value={state}>\n <NumberFieldContext.Provider value={contextValue}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={ariaProps.isDisabled || undefined}\n data-invalid={ariaProps.isInvalid || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-readonly={ariaProps.isReadOnly || undefined}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {fieldChildren()}\n </Provider>\n </div>\n </NumberFieldContext.Provider>\n </NumberFieldStateContext.Provider>\n );\n}\n\n/**\n * The label for a number field.\n */\nexport function NumberFieldLabel(props: {\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}): JSX.Element {\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error(\"NumberFieldLabel must be used within a NumberField\");\n }\n\n // Upstream RAC/S2 renders the NumberField label as a native `<label>` (the field's\n // `labelElementType` is the default `'label'`), so `labelProps` carries `for=inputId`.\n // This was a `<span>` — a self-inflicted divergence dropping the native for/label\n // semantics; reverted to `<label>` to match the shipped React DOM byte-for-byte.\n // (Mirror SearchFieldLabel: `labelProps` is typed for a generic element, so strip the\n // `ref` and spread the rest onto the `<label>` intrinsic.)\n const cleanLabelProps = () => {\n const { ref: _ref, ...rest } = context.labelProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <label\n {...cleanLabelProps()}\n class={props.class ?? \"solidaria-NumberField-label\"}\n style={props.style}\n >\n {props.children}\n </label>\n );\n}\n\n/**\n * The input group for a number field (contains input and buttons).\n */\nexport function NumberFieldGroup(props: JSX.HTMLAttributes<HTMLDivElement>): JSX.Element {\n const [local, domProps] = splitProps(props, [\"children\", \"class\", \"style\"]);\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error(\"NumberFieldGroup must be used within a NumberField\");\n }\n\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = context.groupProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <div\n {...domProps}\n {...cleanGroupProps()}\n class={local.class ?? \"solidaria-NumberField-group\"}\n style={local.style}\n >\n {local.children}\n </div>\n );\n}\n\n/**\n * The input element for a number field.\n */\nexport function NumberFieldInput(props: NumberFieldInputProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\"]);\n\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error(\"NumberFieldInput must be used within a NumberField\");\n }\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled;\n },\n });\n\n const renderValues = createMemo<NumberFieldInputRenderProps>(() => ({\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: context.isDisabled,\n isInvalid: context.isInvalid,\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-NumberField-input\",\n },\n renderValues,\n );\n\n const cleanInputProps = () => {\n const { ref: _ref, onInput: _onInput, ...rest } = context.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const handleInput: JSX.EventHandler<HTMLInputElement, InputEvent> = (event) => {\n (\n context.inputProps as unknown as { onInput?: JSX.EventHandler<HTMLInputElement, InputEvent> }\n ).onInput?.(event);\n (domProps as unknown as { onInput?: JSX.EventHandler<HTMLInputElement, InputEvent> }).onInput?.(\n event,\n );\n };\n\n return (\n <input\n {...domProps}\n ref={context.setInputRef}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n onInput={handleInput}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={context.isDisabled || undefined}\n data-invalid={context.isInvalid || undefined}\n />\n );\n}\n\n/**\n * The increment button for a number field.\n */\nexport function NumberFieldIncrementButton(props: NumberFieldIncrementButtonProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\"]);\n\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error(\"NumberFieldIncrementButton must be used within a NumberField\");\n }\n\n const isDisabled = () => context.isDisabled || !context.state.canIncrement();\n const pressButtonProps = () => {\n const {\n onClick: _onClick,\n disabled: _disabled,\n type: _type,\n tabIndex: _tabIndex,\n ...rest\n } = context.incrementButtonProps as Record<string, unknown>;\n return rest;\n };\n\n const buttonAria = createButton({\n ...pressButtonProps(),\n elementType: \"div\",\n get isDisabled() {\n return isDisabled();\n },\n });\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled || !context.state.canIncrement();\n },\n });\n\n const renderValues = createMemo<NumberFieldButtonRenderProps>(() => ({\n isPressed: buttonAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-NumberField-increment\",\n },\n renderValues,\n );\n\n const cleanButtonProps = () => {\n const { ref: _ref, ...rest } = buttonAria.buttonProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <div\n {...domProps}\n {...cleanButtonProps()}\n {...cleanHoverProps()}\n aria-disabled={isDisabled() || undefined}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={buttonAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The decrement button for a number field.\n */\nexport function NumberFieldDecrementButton(props: NumberFieldDecrementButtonProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\"]);\n\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error(\"NumberFieldDecrementButton must be used within a NumberField\");\n }\n\n const isDisabled = () => context.isDisabled || !context.state.canDecrement();\n const pressButtonProps = () => {\n const {\n onClick: _onClick,\n disabled: _disabled,\n type: _type,\n tabIndex: _tabIndex,\n ...rest\n } = context.decrementButtonProps as Record<string, unknown>;\n return rest;\n };\n\n const buttonAria = createButton({\n ...pressButtonProps(),\n elementType: \"div\",\n get isDisabled() {\n return isDisabled();\n },\n });\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled || !context.state.canDecrement();\n },\n });\n\n const renderValues = createMemo<NumberFieldButtonRenderProps>(() => ({\n isPressed: buttonAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-NumberField-decrement\",\n },\n renderValues,\n );\n\n const cleanButtonProps = () => {\n const { ref: _ref, ...rest } = buttonAria.buttonProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <div\n {...domProps}\n {...cleanButtonProps()}\n {...cleanHoverProps()}\n aria-disabled={isDisabled() || undefined}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={buttonAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\nNumberField.Label = NumberFieldLabel;\nNumberField.Group = NumberFieldGroup;\nNumberField.Input = NumberFieldInput;\nNumberField.IncrementButton = NumberFieldIncrementButton;\nNumberField.DecrementButton = NumberFieldDecrementButton;\n"],"mappings":";;;;;;;;;;;;;;AA0IA,MAAaoE,qBAAqBlE,cAA8C,IAAI;AACpF,MAAamE,0BAA0BnE,cAAuC,IAAI;;;;AAKlF,SAAgBoE,YAAYC,OAAsC;CAChE,MAAM,CAACC,OAAOC,YAAYC,WAAWC,QAAQvE,WAC3CmE,OACA;EAAC;EAAY;EAAS;EAAS;CAAM,GACrC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAe,GAEjB;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAO,CAEX;CAEA,MAAMjB,QAAQ1C,uBAAuB;EACnC,IAAIe,QAAQ;GACV,OAAO8C,WAAW9C;EACpB;EACA,IAAIG,eAAe;GACjB,OAAO2C,WAAW3C;EACpB;EACA,IAAIC,WAAW;GACb,OAAO0C,WAAW1C;EACpB;EACA,IAAIC,WAAW;GACb,OAAOyC,WAAWzC;EACpB;EACA,IAAIC,WAAW;GACb,OAAOwC,WAAWxC;EACpB;EACA,IAAIC,OAAO;GACT,OAAOuC,WAAWvC;EACpB;EACA,IAAIC,SAAS;GACX,OAAOsC,WAAWtC;EACpB;EACA,IAAIC,gBAAgB;GAClB,OAAOqC,WAAWrC;EACpB;EACA,IAAIb,aAAa;GACf,OAAOmD,UAAUnD;EACnB;EACA,IAAIG,aAAa;GACf,OAAOgD,UAAUhD;EACnB;CACF,CAAC;CAED,IAAIkD;CACJ,MAAMV,eAAeC,OAAyB;EAC5CS,WAAWT;CACb;CAEA,MAAMU,kBAAkBvE,kBACtB;EACE,IAAIiC,QAAQ;GACV,OAAOmC,UAAUnC;EACnB;EACA,IAAI,eAAe;GACjB,OAAOmC,UAAU;EACnB;EACA,IAAI,oBAAoB;GACtB,OAAOA,UAAU;EACnB;EACA,IAAI,qBAAqB;GACvB,O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