@proyecto-viviana/solidaria-components 0.3.2 → 0.4.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/dist/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar.js +175 -0
- package/dist/ActionBar.js.map +1 -0
- package/dist/ActionBar.jsx +119 -0
- package/dist/ActionBar.jsx.map +1 -0
- package/dist/ActionGroup.d.ts.map +1 -1
- 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.d.ts +2 -2
- package/dist/Autocomplete.d.ts.map +1 -1
- 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 +333 -0
- package/dist/Breadcrumbs.js.map +1 -0
- package/dist/Breadcrumbs.jsx +261 -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 +573 -0
- package/dist/Calendar.js.map +1 -0
- package/dist/Calendar.jsx +342 -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 +1717 -0
- package/dist/Color.js.map +1 -0
- package/dist/Color.jsx +1340 -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 +8 -4
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/ComboBox.js +1000 -0
- package/dist/ComboBox.js.map +1 -0
- package/dist/ComboBox.jsx +724 -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 +14 -5
- package/dist/DateField.d.ts.map +1 -1
- package/dist/DateField.js +4 -0
- package/dist/DateField.jsx +4 -0
- package/dist/DateField2.js +502 -0
- package/dist/DateField2.js.map +1 -0
- package/dist/DateField2.jsx +354 -0
- package/dist/DateField2.jsx.map +1 -0
- package/dist/DatePicker.d.ts +46 -7
- package/dist/DatePicker.d.ts.map +1 -1
- package/dist/DatePicker.js +7 -0
- package/dist/DatePicker.jsx +7 -0
- package/dist/DatePicker2.js +1171 -0
- package/dist/DatePicker2.js.map +1 -0
- package/dist/DatePicker2.jsx +820 -0
- package/dist/DatePicker2.jsx.map +1 -0
- package/dist/DateRangePickerContext.d.ts +2 -0
- package/dist/DateRangePickerContext.d.ts.map +1 -1
- 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 +331 -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/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 +2 -2
- package/dist/ListBox.d.ts.map +1 -1
- package/dist/ListBox.js +831 -0
- package/dist/ListBox.js.map +1 -0
- package/dist/ListBox.jsx +644 -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 +382 -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 +471 -0
- package/dist/Popover.js.map +1 -0
- package/dist/Popover.jsx +354 -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 +546 -0
- package/dist/RangeCalendar.js.map +1 -0
- package/dist/RangeCalendar.jsx +323 -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 +667 -0
- package/dist/SearchField.js.map +1 -0
- package/dist/SearchField.jsx +550 -0
- package/dist/SearchField.jsx.map +1 -0
- package/dist/Select.d.ts +7 -0
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +1044 -0
- package/dist/Select.js.map +1 -0
- package/dist/Select.jsx +759 -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 +167 -0
- package/dist/SharedElementTransition.js.map +1 -0
- package/dist/SharedElementTransition.jsx +140 -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.d.ts.map +1 -1
- package/dist/StepList.js +191 -0
- package/dist/StepList.js.map +1 -0
- package/dist/StepList.jsx +136 -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 +50 -0
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +1766 -0
- package/dist/Table.js.map +1 -0
- package/dist/Table.jsx +1355 -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 +598 -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 +3 -1
- package/dist/TagGroup.d.ts.map +1 -1
- package/dist/TagGroup.js +382 -0
- package/dist/TagGroup.js.map +1 -0
- package/dist/TagGroup.jsx +273 -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 +439 -0
- package/dist/TextField.js.map +1 -0
- package/dist/TextField.jsx +406 -0
- package/dist/TextField.jsx.map +1 -0
- package/dist/TimeField.d.ts +17 -53
- package/dist/TimeField.d.ts.map +1 -1
- package/dist/TimeField.js +278 -0
- package/dist/TimeField.js.map +1 -0
- package/dist/TimeField.jsx +218 -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 +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +69 -23932
- package/dist/index.jsx +69 -18337
- package/dist/useDragAndDrop.d.ts +0 -8
- package/dist/useDragAndDrop.d.ts.map +1 -1
- package/dist/useDragAndDrop.js +2 -0
- package/dist/useDragAndDrop.jsx +2 -0
- package/dist/useDragAndDrop2.js +399 -0
- package/dist/useDragAndDrop2.js.map +1 -0
- package/dist/useDragAndDrop2.jsx +399 -0
- package/dist/useDragAndDrop2.jsx.map +1 -0
- package/dist/utils.d.ts +84 -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 +395 -4
- package/src/ActionBar.tsx +10 -12
- package/src/ActionGroup.tsx +5 -3
- package/src/Autocomplete.tsx +14 -9
- package/src/Breadcrumbs.tsx +58 -39
- package/src/Button.tsx +22 -2
- package/src/Calendar.tsx +57 -11
- package/src/CalendarPicker.tsx +73 -0
- package/src/Checkbox.tsx +539 -3
- package/src/Collection.tsx +9 -3
- package/src/Color.tsx +84 -41
- package/src/ComboBox.tsx +97 -21
- package/src/DateField.tsx +304 -53
- package/src/DatePicker.tsx +402 -62
- package/src/DateRangePickerContext.tsx +2 -0
- package/src/Dialog.tsx +13 -5
- package/src/Disclosure.tsx +7 -1
- package/src/DragAndDrop.tsx +3 -1
- package/src/DropZone.tsx +3 -1
- package/src/GridList.tsx +133 -26
- package/src/Icon.tsx +3 -1
- package/src/Link.tsx +3 -1
- package/src/ListBox.tsx +354 -25
- package/src/Menu.tsx +252 -128
- package/src/Meter.tsx +3 -1
- package/src/Modal.tsx +120 -56
- package/src/NumberField.tsx +51 -8
- package/src/Popover.tsx +68 -17
- package/src/ProgressBar.tsx +3 -1
- package/src/RadioGroup.tsx +468 -4
- package/src/RangeCalendar.tsx +123 -2
- package/src/SearchField.tsx +80 -4
- package/src/Select.tsx +122 -26
- package/src/SelectionIndicator.tsx +3 -1
- package/src/SharedElementTransition.tsx +95 -37
- package/src/Slider.tsx +159 -13
- package/src/StepList.tsx +0 -7
- package/src/Switch.tsx +395 -2
- package/src/Table.tsx +428 -99
- package/src/Tabs.tsx +17 -45
- package/src/TagGroup.tsx +29 -7
- package/src/Text.tsx +31 -10
- package/src/TextField.tsx +44 -6
- package/src/TimeField.tsx +127 -192
- 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 +91 -13
- package/src/Virtualizer.tsx +180 -31
- package/src/VirtualizerLayouts.ts +45 -10
- package/src/index.ts +51 -8
- package/src/useDragAndDrop.ts +8 -10
- package/src/utils.tsx +246 -30
- package/dist/HiddenTimeInput.d.ts +0 -25
- package/dist/HiddenTimeInput.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.jsx.map +0 -1
- package/src/HiddenTimeInput.tsx +0 -133
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import { Provider, dataAttr, useIsHydrated, useRenderProps } from "./utils.jsx";
|
|
2
|
+
import { TextContext } from "./Text.jsx";
|
|
3
|
+
import { FormContext } from "./Form.jsx";
|
|
4
|
+
import { Index, Show, createContext, createEffect, createMemo, createSignal, onCleanup, splitProps, useContext } from "solid-js";
|
|
5
|
+
import { createDateField, createDateSegment, createFocusRing, createHover, createVisuallyHidden, mergeProps as mergeProps$1 } from "@proyecto-viviana/solidaria";
|
|
6
|
+
import { access, createDateFieldState } from "@proyecto-viviana/solid-stately";
|
|
7
|
+
import { parseDate, parseDateTime, toCalendarDate, toCalendarDateTime, toLocalTimeZone } from "@internationalized/date";
|
|
8
|
+
//#region src/DateRangePickerContext.tsx
|
|
9
|
+
const DateRangePickerContext = createContext(null);
|
|
10
|
+
function useDateRangePickerContext() {
|
|
11
|
+
const context = useContext(DateRangePickerContext);
|
|
12
|
+
if (!context) throw new Error("DateRangePicker components must be used within a DateRangePicker");
|
|
13
|
+
return context;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/DateField.tsx
|
|
17
|
+
/**
|
|
18
|
+
* DateField component for solidaria-components
|
|
19
|
+
*
|
|
20
|
+
* Pre-wired headless date field component with segment-based editing.
|
|
21
|
+
* Port of react-aria-components/src/DateField.tsx
|
|
22
|
+
*/
|
|
23
|
+
const DateFieldContext = createContext(null);
|
|
24
|
+
const DateFieldStateContext = createContext(null);
|
|
25
|
+
function withFormValidationBehavior(props, formContext) {
|
|
26
|
+
if (!formContext?.validationBehavior) return props;
|
|
27
|
+
return new Proxy(props, {
|
|
28
|
+
get(target, property, receiver) {
|
|
29
|
+
const localValue = Reflect.get(target, property, receiver);
|
|
30
|
+
if (property === "validationBehavior" && localValue === void 0) return formContext.validationBehavior;
|
|
31
|
+
return localValue;
|
|
32
|
+
},
|
|
33
|
+
has(target, property) {
|
|
34
|
+
return Reflect.has(target, property) || property === "validationBehavior" && formContext.validationBehavior !== void 0;
|
|
35
|
+
},
|
|
36
|
+
ownKeys(target) {
|
|
37
|
+
const keys = new Set(Reflect.ownKeys(target));
|
|
38
|
+
if (formContext.validationBehavior !== void 0) keys.add("validationBehavior");
|
|
39
|
+
return Array.from(keys);
|
|
40
|
+
},
|
|
41
|
+
getOwnPropertyDescriptor(target, property) {
|
|
42
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(target, property);
|
|
43
|
+
if (descriptor) return descriptor;
|
|
44
|
+
if (property === "validationBehavior" && formContext.validationBehavior !== void 0) return {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
get: () => formContext.validationBehavior
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function useDateFieldContext() {
|
|
53
|
+
const context = useContext(DateFieldContext);
|
|
54
|
+
if (!context) throw new Error("DateField components must be used within a DateField");
|
|
55
|
+
return context;
|
|
56
|
+
}
|
|
57
|
+
function useDateInputContext(slot) {
|
|
58
|
+
const dateFieldContext = useContext(DateFieldContext);
|
|
59
|
+
if (dateFieldContext) return dateFieldContext;
|
|
60
|
+
const dateRangePickerContext = useContext(DateRangePickerContext);
|
|
61
|
+
if (dateRangePickerContext && slot === "start") return dateRangePickerContext.startFieldContext;
|
|
62
|
+
if (dateRangePickerContext && slot === "end") return dateRangePickerContext.endFieldContext;
|
|
63
|
+
throw new Error("DateInput components must be used within a DateField or DateRangePicker slot");
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A date field allows users to enter and edit date values using a keyboard.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* <DateField label="Date">
|
|
71
|
+
* <Label>Date</Label>
|
|
72
|
+
* <DateInput>
|
|
73
|
+
* {(segment) => <DateSegment segment={segment} />}
|
|
74
|
+
* </DateInput>
|
|
75
|
+
* </DateField>
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
function DateField(props) {
|
|
79
|
+
const isHydrated = useIsHydrated();
|
|
80
|
+
const formContext = useContext(FormContext);
|
|
81
|
+
return <Show when={isHydrated()} fallback={<div class="solidaria-DateField solidaria-DateField--placeholder" aria-hidden="true" />}>
|
|
82
|
+
<DateFieldInner {...props} __formContext={formContext} />
|
|
83
|
+
</Show>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Internal DateField component that renders after client mount.
|
|
87
|
+
*/
|
|
88
|
+
function DateFieldInner(props) {
|
|
89
|
+
const [local, stateProps, rest] = splitProps(withFormValidationBehavior(props, props.__formContext ?? useContext(FormContext)), [
|
|
90
|
+
"children",
|
|
91
|
+
"class",
|
|
92
|
+
"style",
|
|
93
|
+
"slot",
|
|
94
|
+
"__formContext"
|
|
95
|
+
], [
|
|
96
|
+
"value",
|
|
97
|
+
"defaultValue",
|
|
98
|
+
"onChange",
|
|
99
|
+
"minValue",
|
|
100
|
+
"maxValue",
|
|
101
|
+
"isInvalid",
|
|
102
|
+
"isDisabled",
|
|
103
|
+
"isReadOnly",
|
|
104
|
+
"isRequired",
|
|
105
|
+
"locale",
|
|
106
|
+
"granularity",
|
|
107
|
+
"hourCycle",
|
|
108
|
+
"hideTimeZone",
|
|
109
|
+
"placeholderValue",
|
|
110
|
+
"shouldForceLeadingZeros",
|
|
111
|
+
"validationState",
|
|
112
|
+
"validationBehavior",
|
|
113
|
+
"validate",
|
|
114
|
+
"description",
|
|
115
|
+
"errorMessage",
|
|
116
|
+
"isDateUnavailable"
|
|
117
|
+
]);
|
|
118
|
+
const [fieldRef, setFieldRef] = createSignal(null);
|
|
119
|
+
const [validationInputRef, setValidationInputRef] = createSignal(null);
|
|
120
|
+
const state = createDateFieldState(stateProps);
|
|
121
|
+
const fieldAria = createDateField(() => ({
|
|
122
|
+
...rest,
|
|
123
|
+
isDisabled: access(stateProps.isDisabled),
|
|
124
|
+
isReadOnly: access(stateProps.isReadOnly),
|
|
125
|
+
isRequired: access(stateProps.isRequired),
|
|
126
|
+
validationBehavior: stateProps.validationBehavior ?? "native",
|
|
127
|
+
description: stateProps.description,
|
|
128
|
+
errorMessage: stateProps.errorMessage,
|
|
129
|
+
inputRef: () => validationInputRef() ?? void 0
|
|
130
|
+
}), state, fieldRef);
|
|
131
|
+
const renderValues = createMemo(() => ({
|
|
132
|
+
isDisabled: state.isDisabled(),
|
|
133
|
+
isReadOnly: state.isReadOnly(),
|
|
134
|
+
isRequired: state.isRequired(),
|
|
135
|
+
isInvalid: state.isInvalid()
|
|
136
|
+
}));
|
|
137
|
+
const renderProps = useRenderProps({
|
|
138
|
+
class: local.class,
|
|
139
|
+
style: local.style,
|
|
140
|
+
defaultClassName: "solidaria-DateField"
|
|
141
|
+
}, renderValues);
|
|
142
|
+
const textSlots = { slots: {
|
|
143
|
+
get description() {
|
|
144
|
+
return fieldAria.descriptionProps;
|
|
145
|
+
},
|
|
146
|
+
get errorMessage() {
|
|
147
|
+
return fieldAria.errorMessageProps;
|
|
148
|
+
}
|
|
149
|
+
} };
|
|
150
|
+
return <DateFieldStateContext.Provider value={state}>
|
|
151
|
+
<DateFieldContext.Provider value={{
|
|
152
|
+
state,
|
|
153
|
+
aria: {
|
|
154
|
+
get labelProps() {
|
|
155
|
+
return fieldAria.labelProps;
|
|
156
|
+
},
|
|
157
|
+
get inputProps() {
|
|
158
|
+
return fieldAria.fieldProps;
|
|
159
|
+
},
|
|
160
|
+
get hiddenInputProps() {
|
|
161
|
+
return mergeProps$1(fieldAria.inputProps, { ref: setValidationInputRef });
|
|
162
|
+
},
|
|
163
|
+
get descriptionProps() {
|
|
164
|
+
return fieldAria.descriptionProps;
|
|
165
|
+
},
|
|
166
|
+
get errorMessageProps() {
|
|
167
|
+
return fieldAria.errorMessageProps;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}}>
|
|
171
|
+
<div ref={setFieldRef} class={renderProps.class()} style={renderProps.style()} data-disabled={dataAttr(state.isDisabled())} data-readonly={dataAttr(state.isReadOnly())} data-required={dataAttr(state.isRequired())} data-invalid={dataAttr(state.isInvalid())}>
|
|
172
|
+
<Provider values={[[TextContext, textSlots]]}>
|
|
173
|
+
{local.children}
|
|
174
|
+
</Provider>
|
|
175
|
+
</div>
|
|
176
|
+
{}
|
|
177
|
+
<RootHiddenDateInput autoComplete={rest.autoComplete} name={rest.name} isDisabled={state.isDisabled()} state={state} />
|
|
178
|
+
</DateFieldContext.Provider>
|
|
179
|
+
</DateFieldStateContext.Provider>;
|
|
180
|
+
}
|
|
181
|
+
const HIDDEN_DATE_SEGMENTS = [
|
|
182
|
+
"day",
|
|
183
|
+
"month",
|
|
184
|
+
"year"
|
|
185
|
+
];
|
|
186
|
+
const HIDDEN_TIME_SEGMENTS = [
|
|
187
|
+
"hour",
|
|
188
|
+
"minute",
|
|
189
|
+
"second"
|
|
190
|
+
];
|
|
191
|
+
const HIDDEN_GRANULARITY_MAP = {
|
|
192
|
+
hour: 1,
|
|
193
|
+
minute: 2,
|
|
194
|
+
second: 3
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* The always-rendered hidden date input at the DateField root — a faithful port
|
|
198
|
+
* of react-aria-components' HiddenDateInput (private/HiddenDateInput.mjs). It is
|
|
199
|
+
* NOT a validation input: it is a clipped, aria-hidden, tabIndex={-1} native
|
|
200
|
+
* date input that mirrors the current value for browser autofill. `form=""`
|
|
201
|
+
* detaches it from form submission (the DateInput's <Input> submits), so it
|
|
202
|
+
* never double-counts in FormData. RAC renders it unconditionally, which is why
|
|
203
|
+
* it appears as the trailing tabindex="-1" element in the focus trail.
|
|
204
|
+
*/
|
|
205
|
+
function RootHiddenDateInput(props) {
|
|
206
|
+
const { visuallyHiddenProps } = createVisuallyHidden(() => ({ style: {
|
|
207
|
+
position: "fixed",
|
|
208
|
+
top: "0",
|
|
209
|
+
left: "0"
|
|
210
|
+
} }));
|
|
211
|
+
const granularity = () => props.state.granularity ?? "day";
|
|
212
|
+
const inputStep = () => {
|
|
213
|
+
const g = granularity();
|
|
214
|
+
if (g === "second") return 1;
|
|
215
|
+
if (g === "hour") return 3600;
|
|
216
|
+
return 60;
|
|
217
|
+
};
|
|
218
|
+
const inputType = () => granularity() === "day" ? "date" : "datetime-local";
|
|
219
|
+
const dateValue = () => {
|
|
220
|
+
const value = props.state.value();
|
|
221
|
+
if (!value) return "";
|
|
222
|
+
if (granularity() === "day") return toCalendarDate(value).toString();
|
|
223
|
+
return toCalendarDateTime("timeZone" in value ? toLocalTimeZone(value) : value).toString();
|
|
224
|
+
};
|
|
225
|
+
const onChange = (event) => {
|
|
226
|
+
const targetString = (event.currentTarget.value ?? "").toString();
|
|
227
|
+
if (!targetString) return;
|
|
228
|
+
try {
|
|
229
|
+
const g = granularity();
|
|
230
|
+
const targetValue = g === "day" ? parseDate(targetString) : parseDateTime(targetString);
|
|
231
|
+
let timeSegments = HIDDEN_TIME_SEGMENTS;
|
|
232
|
+
if (HIDDEN_TIME_SEGMENTS.includes(g)) timeSegments = HIDDEN_TIME_SEGMENTS.slice(0, HIDDEN_GRANULARITY_MAP[g]);
|
|
233
|
+
const state = props.state;
|
|
234
|
+
if (typeof state.setSegment === "function") for (const type in targetValue) {
|
|
235
|
+
if (HIDDEN_DATE_SEGMENTS.includes(type)) state.setSegment(type, targetValue[type]);
|
|
236
|
+
if (timeSegments.includes(type)) state.setSegment(type, targetValue[type]);
|
|
237
|
+
}
|
|
238
|
+
state.setValue(targetValue);
|
|
239
|
+
} catch {}
|
|
240
|
+
};
|
|
241
|
+
return <div {...visuallyHiddenProps()} aria-hidden="true" data-testid="hidden-dateinput-container">
|
|
242
|
+
<input tabIndex={-1} autocomplete={props.autoComplete} disabled={props.isDisabled} type={inputType()} form="" name={props.name} step={inputStep()} value={dateValue()} onChange={onChange} />
|
|
243
|
+
</div>;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* The input area containing date segments.
|
|
247
|
+
*/
|
|
248
|
+
function DateInput(props) {
|
|
249
|
+
const context = useDateInputContext(props.slot);
|
|
250
|
+
const { state, aria } = context;
|
|
251
|
+
const [isFocused, setIsFocused] = createSignal(false);
|
|
252
|
+
const [inputRef, setInputRef] = createSignal(null);
|
|
253
|
+
const renderValues = createMemo(() => ({
|
|
254
|
+
isDisabled: state.isDisabled(),
|
|
255
|
+
isFocused: isFocused()
|
|
256
|
+
}));
|
|
257
|
+
const renderProps = useRenderProps({
|
|
258
|
+
class: props.class,
|
|
259
|
+
style: props.style,
|
|
260
|
+
defaultClassName: "solidaria-DateInput"
|
|
261
|
+
}, renderValues);
|
|
262
|
+
const inputDivProps = createMemo(() => mergeProps$1(aria.inputProps, {
|
|
263
|
+
onFocusIn: () => setIsFocused(true),
|
|
264
|
+
onFocusOut: () => setIsFocused(false),
|
|
265
|
+
style: renderProps.style()
|
|
266
|
+
}));
|
|
267
|
+
createEffect(() => {
|
|
268
|
+
const element = inputRef();
|
|
269
|
+
const handler = props.onPointerDownCapture;
|
|
270
|
+
if (!element || !handler) return;
|
|
271
|
+
const listener = (event) => handler(event);
|
|
272
|
+
element.addEventListener("pointerdown", listener, { capture: true });
|
|
273
|
+
onCleanup(() => element.removeEventListener("pointerdown", listener, { capture: true }));
|
|
274
|
+
});
|
|
275
|
+
return <DateFieldContext.Provider value={context}>
|
|
276
|
+
<div ref={setInputRef} {...inputDivProps()} class={renderProps.class()} data-disabled={dataAttr(state.isDisabled())} data-focused={dataAttr(isFocused())}>
|
|
277
|
+
{}
|
|
278
|
+
<Index each={state.segments()}>
|
|
279
|
+
{(segment) => {
|
|
280
|
+
const liveSegment = new Proxy({}, {
|
|
281
|
+
get: (_t, key) => segment()[key],
|
|
282
|
+
has: (_t, key) => key in segment()
|
|
283
|
+
});
|
|
284
|
+
return props.children?.(liveSegment);
|
|
285
|
+
}}
|
|
286
|
+
</Index>
|
|
287
|
+
</div>
|
|
288
|
+
{}
|
|
289
|
+
<Show when={aria.hiddenInputProps}>
|
|
290
|
+
{(hiddenInputProps) => <input {...hiddenInputProps()} />}
|
|
291
|
+
</Show>
|
|
292
|
+
</DateFieldContext.Provider>;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* A segment of a date field (year, month, day, etc.).
|
|
296
|
+
*/
|
|
297
|
+
function DateSegment(props) {
|
|
298
|
+
const { state } = useDateFieldContext();
|
|
299
|
+
const [segmentRef, setSegmentRef] = createSignal(null);
|
|
300
|
+
const segmentAria = createDateSegment({ get segment() {
|
|
301
|
+
return props.segment;
|
|
302
|
+
} }, state, segmentRef);
|
|
303
|
+
const { isFocused, isFocusVisible, focusProps } = createFocusRing();
|
|
304
|
+
const { isHovered, hoverProps } = createHover(() => ({ isDisabled: state.isDisabled() || props.segment.type === "literal" }));
|
|
305
|
+
const renderValues = createMemo(() => ({
|
|
306
|
+
isHovered: isHovered(),
|
|
307
|
+
isFocused: isFocused(),
|
|
308
|
+
isFocusVisible: isFocusVisible(),
|
|
309
|
+
isPlaceholder: props.segment.isPlaceholder,
|
|
310
|
+
isReadOnly: state.isReadOnly(),
|
|
311
|
+
isDisabled: state.isDisabled(),
|
|
312
|
+
isInvalid: state.isInvalid(),
|
|
313
|
+
type: props.segment.type,
|
|
314
|
+
text: props.segment.text
|
|
315
|
+
}));
|
|
316
|
+
const renderProps = useRenderProps({
|
|
317
|
+
get children() {
|
|
318
|
+
return props.children;
|
|
319
|
+
},
|
|
320
|
+
class: props.class,
|
|
321
|
+
style: props.style,
|
|
322
|
+
defaultClassName: "solidaria-DateSegment"
|
|
323
|
+
}, renderValues);
|
|
324
|
+
const getChildren = () => {
|
|
325
|
+
if (typeof props.children === "function") return renderProps.renderChildren();
|
|
326
|
+
return props.segment.text;
|
|
327
|
+
};
|
|
328
|
+
const segmentElementProps = createMemo(() => mergeProps$1(segmentAria.segmentProps, focusProps, hoverProps, { style: renderProps.style() }));
|
|
329
|
+
return <span ref={setSegmentRef} {...segmentElementProps()} class={renderProps.class()} data-placeholder={props.segment.isPlaceholder || void 0} data-invalid={state.isInvalid() || void 0} data-readonly={state.isReadOnly() || void 0} data-disabled={state.isDisabled() || void 0} data-type={props.segment.type} data-hovered={isHovered() || void 0} data-focused={isFocused() || void 0} data-focus-visible={isFocusVisible() || void 0}>
|
|
330
|
+
{getChildren()}
|
|
331
|
+
</span>;
|
|
332
|
+
}
|
|
333
|
+
function DateFieldLabel(props) {
|
|
334
|
+
const { aria } = useDateFieldContext();
|
|
335
|
+
return <span {...aria.labelProps} class={props.class}>
|
|
336
|
+
{props.children}
|
|
337
|
+
</span>;
|
|
338
|
+
}
|
|
339
|
+
function DateFieldDescription(props) {
|
|
340
|
+
const { aria } = useDateFieldContext();
|
|
341
|
+
return <span {...aria.descriptionProps} class={props.class}>
|
|
342
|
+
{props.children}
|
|
343
|
+
</span>;
|
|
344
|
+
}
|
|
345
|
+
function DateFieldErrorMessage(props) {
|
|
346
|
+
const { aria } = useDateFieldContext();
|
|
347
|
+
return <span {...aria.errorMessageProps} class={props.class}>
|
|
348
|
+
{props.children}
|
|
349
|
+
</span>;
|
|
350
|
+
}
|
|
351
|
+
//#endregion
|
|
352
|
+
export { DateFieldLabel as a, DateSegment as c, useDateRangePickerContext as d, DateFieldErrorMessage as i, useDateFieldContext as l, DateFieldContext as n, DateFieldStateContext as o, DateFieldDescription as r, DateInput as s, DateField as t, DateRangePickerContext as u };
|
|
353
|
+
|
|
354
|
+
//# sourceMappingURL=DateField2.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateField2.jsx","names":["mergeProps"],"sources":["../src/DateRangePickerContext.tsx","../src/DateField.tsx"],"sourcesContent":["import { createContext, useContext } from \"solid-js\";\nimport { type createDateRangePicker } from \"@proyecto-viviana/solidaria\";\nimport {\n type DateFieldState,\n type DateValue,\n type RangeCalendarState,\n} from \"@proyecto-viviana/solid-stately\";\n\nexport interface DateRangePickerFieldContextValue {\n state: DateFieldState<DateValue>;\n aria: {\n labelProps: Record<string, unknown>;\n inputProps: Record<string, unknown>;\n /** Optional hidden validation <input> props (unused by the range fields). */\n hiddenInputProps?: Record<string, unknown>;\n descriptionProps: Record<string, unknown>;\n errorMessageProps: Record<string, unknown>;\n };\n}\n\nexport interface DateRangePickerContextValue {\n calendarState: RangeCalendarState<DateValue>;\n startFieldState: DateFieldState<DateValue>;\n endFieldState: DateFieldState<DateValue>;\n startFieldContext: DateRangePickerFieldContextValue;\n endFieldContext: DateRangePickerFieldContextValue;\n overlayState: {\n isOpen: boolean;\n open: () => void;\n close: () => void;\n toggle: () => void;\n };\n triggerRef: () => HTMLElement | null;\n setTriggerRef: (element: HTMLElement | null) => void;\n pickerAria: ReturnType<typeof createDateRangePicker>;\n}\n\nexport const DateRangePickerContext = createContext<DateRangePickerContextValue | null>(null);\n\nexport function useDateRangePickerContext(): DateRangePickerContextValue {\n const context = useContext(DateRangePickerContext);\n if (!context) {\n throw new Error(\"DateRangePicker components must be used within a DateRangePicker\");\n }\n return context;\n}\n","/**\n * DateField component for solidaria-components\n *\n * Pre-wired headless date field component with segment-based editing.\n * Port of react-aria-components/src/DateField.tsx\n */\n\nimport {\n type JSX,\n type Context,\n createContext,\n createEffect,\n createMemo,\n createSignal,\n onCleanup,\n splitProps,\n useContext,\n Index,\n Show,\n} from \"solid-js\";\nimport {\n createDateField,\n createDateSegment,\n createFocusRing,\n createHover,\n createVisuallyHidden,\n mergeProps,\n type AriaDateFieldProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n parseDate,\n parseDateTime,\n toCalendarDate,\n toCalendarDateTime,\n toLocalTimeZone,\n} from \"@internationalized/date\";\nimport {\n createDateFieldState,\n access,\n type DateFieldState,\n type DateFieldStateProps,\n type DateSegment as DateSegmentType,\n type CalendarDate,\n type DateValue,\n} from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n Provider,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\nimport { FormContext, type FormProps } from \"./Form\";\nimport {\n DateRangePickerContext,\n type DateRangePickerFieldContextValue,\n} from \"./DateRangePickerContext\";\n\nexport interface DateFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the field is required. */\n isRequired: boolean;\n /** Whether the field is invalid. */\n isInvalid: boolean;\n}\n\nexport interface DateFieldProps<T extends DateValue = DateValue>\n extends\n Omit<AriaDateFieldProps, \"id\" | \"isDisabled\" | \"isReadOnly\" | \"isRequired\">,\n Omit<DateFieldStateProps<T>, \"locale\">,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element | ((segment: DateSegmentType) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateFieldRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface DateInputRenderProps {\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n}\n\nexport interface DateInputProps extends SlotProps {\n /** The children of the component (render function receiving segments). */\n children?: (segment: DateSegmentType) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateInputRenderProps>;\n /** Handler called during the pointer down capture phase. */\n onPointerDownCapture?: JSX.EventHandler<HTMLDivElement, PointerEvent>;\n}\n\nexport interface DateSegmentRenderProps {\n /** Whether the segment is hovered. */\n isHovered: boolean;\n /** Whether the segment is focused. */\n isFocused: boolean;\n /** Whether the segment is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the segment is a placeholder. */\n isPlaceholder: boolean;\n /** Whether the segment is read only. */\n isReadOnly: boolean;\n /** Whether the segment is disabled. */\n isDisabled: boolean;\n /** Whether the segment is invalid. */\n isInvalid: boolean;\n /** The segment type. */\n type: DateSegmentType[\"type\"];\n /** The text to display. */\n text: string;\n}\n\nexport interface DateSegmentProps extends SlotProps {\n /** The segment data. */\n segment: DateSegmentType;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<DateSegmentRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateSegmentRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateSegmentRenderProps>;\n}\n\nexport interface DateFieldContextValue {\n state: DateFieldState<DateValue>;\n aria: {\n labelProps: Record<string, unknown>;\n inputProps: Record<string, unknown>;\n // The hidden validation <input> props (native type/required/onChange). Only\n // the standalone DateField provides these; DatePicker/DateRangePicker manage\n // their own hidden inputs, so this stays optional and its <input> is gated.\n hiddenInputProps?: Record<string, unknown>;\n descriptionProps: Record<string, unknown>;\n errorMessageProps: Record<string, unknown>;\n };\n}\n\nexport const DateFieldContext = createContext<DateFieldContextValue | null>(null);\nexport const DateFieldStateContext = createContext<DateFieldState<DateValue> | null>(null);\n\nfunction withFormValidationBehavior<P extends object>(props: P, formContext: FormProps | null): P {\n if (!formContext?.validationBehavior) {\n return props;\n }\n\n return new Proxy(props, {\n get(target, property, receiver) {\n const localValue = Reflect.get(target, property, receiver);\n if (property === \"validationBehavior\" && localValue === undefined) {\n return formContext.validationBehavior;\n }\n\n return localValue;\n },\n has(target, property) {\n return (\n Reflect.has(target, property) ||\n (property === \"validationBehavior\" && formContext.validationBehavior !== undefined)\n );\n },\n ownKeys(target) {\n const keys = new Set(Reflect.ownKeys(target));\n if (formContext.validationBehavior !== undefined) {\n keys.add(\"validationBehavior\");\n }\n\n return Array.from(keys);\n },\n getOwnPropertyDescriptor(target, property) {\n const descriptor = Reflect.getOwnPropertyDescriptor(target, property);\n if (descriptor) {\n return descriptor;\n }\n\n if (property === \"validationBehavior\" && formContext.validationBehavior !== undefined) {\n return {\n enumerable: true,\n configurable: true,\n get: () => formContext.validationBehavior,\n };\n }\n\n return undefined;\n },\n });\n}\n\nexport function useDateFieldContext(): DateFieldContextValue {\n const context = useContext(DateFieldContext);\n if (!context) {\n throw new Error(\"DateField components must be used within a DateField\");\n }\n return context;\n}\n\nfunction useDateInputContext(\n slot?: string,\n): DateFieldContextValue | DateRangePickerFieldContextValue {\n const dateFieldContext = useContext(DateFieldContext);\n if (dateFieldContext) {\n return dateFieldContext;\n }\n\n const dateRangePickerContext = useContext(DateRangePickerContext);\n if (dateRangePickerContext && slot === \"start\") {\n return dateRangePickerContext.startFieldContext;\n }\n if (dateRangePickerContext && slot === \"end\") {\n return dateRangePickerContext.endFieldContext;\n }\n\n throw new Error(\"DateInput components must be used within a DateField or DateRangePicker slot\");\n}\n\n/**\n * A date field allows users to enter and edit date values using a keyboard.\n *\n * @example\n * ```tsx\n * <DateField label=\"Date\">\n * <Label>Date</Label>\n * <DateInput>\n * {(segment) => <DateSegment segment={segment} />}\n * </DateInput>\n * </DateField>\n * ```\n */\nexport function DateField<T extends DateValue = CalendarDate>(\n props: DateFieldProps<T>,\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n const formContext = useContext(FormContext);\n\n return (\n <Show\n when={isHydrated()}\n fallback={\n <div class=\"solidaria-DateField solidaria-DateField--placeholder\" aria-hidden=\"true\" />\n }\n >\n <DateFieldInner {...props} __formContext={formContext} />\n </Show>\n );\n}\n\ntype DateFieldInnerProps<T extends DateValue = DateValue> = DateFieldProps<T> & {\n __formContext?: FormProps | null;\n};\n\n/**\n * Internal DateField component that renders after client mount.\n */\nfunction DateFieldInner<T extends DateValue = CalendarDate>(\n props: DateFieldInnerProps<T>,\n): JSX.Element {\n const formContext = props.__formContext ?? useContext(FormContext);\n const mergedProps = withFormValidationBehavior(props, formContext);\n const [local, stateProps, rest] = splitProps(\n mergedProps,\n [\"children\", \"class\", \"style\", \"slot\", \"__formContext\"],\n [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"minValue\",\n \"maxValue\",\n \"isInvalid\",\n \"isDisabled\",\n \"isReadOnly\",\n \"isRequired\",\n \"locale\",\n \"granularity\",\n \"hourCycle\",\n \"hideTimeZone\",\n \"placeholderValue\",\n \"shouldForceLeadingZeros\",\n \"validationState\",\n \"validationBehavior\",\n \"validate\",\n \"description\",\n \"errorMessage\",\n \"isDateUnavailable\",\n ],\n );\n\n const [fieldRef, setFieldRef] = createSignal<HTMLDivElement | null>(null);\n // Ref to the hidden validation <input> (the DateInput's `<Input>` sibling).\n // RAC's DateField creates this ref, passes it to useDateField, and threads it\n // onto the <Input> via InputContext so useFormReset/useFormValidation target\n // that element. We mirror that: create it here, hand it to createDateField\n // below, and attach it to the same input through the context getter.\n const [validationInputRef, setValidationInputRef] =\n createSignal<HTMLInputElement | null>(null);\n\n const state = createDateFieldState(stateProps);\n\n const fieldAria = createDateField(\n () => ({\n ...(rest as Record<string, unknown>),\n // RAC threads the same props into both useDateFieldState and useDateField;\n // these live in `stateProps` here, so forward them so the field hook can\n // build aria-disabled and the native validation <input> (type/required).\n // access() unwraps the MaybeAccessor state-prop declarations.\n isDisabled: access(stateProps.isDisabled),\n isReadOnly: access(stateProps.isReadOnly),\n isRequired: access(stateProps.isRequired),\n // Mirror RAC DateField: validationBehavior ?? formValidationBehavior ??\n // 'native'. withFormValidationBehavior already folds the form default into\n // stateProps.validationBehavior; the last `?? 'native'` is the standalone\n // default that flips the hidden input to type=\"text\".\n validationBehavior: stateProps.validationBehavior ?? \"native\",\n description: stateProps.description,\n errorMessage: stateProps.errorMessage,\n // Form-reset + native constraint validation are wired onto this input by\n // createDateField (see its createFormReset/createFormValidation calls),\n // exactly as RAC's useDateField wires them onto props.inputRef.\n inputRef: () => validationInputRef() ?? undefined,\n }),\n state as unknown as DateFieldState<DateValue>,\n fieldRef,\n );\n\n const renderValues = createMemo<DateFieldRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isRequired: state.isRequired(),\n isInvalid: state.isInvalid(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-DateField\",\n },\n renderValues,\n );\n\n const textSlots = {\n slots: {\n get description() {\n return fieldAria.descriptionProps;\n },\n get errorMessage() {\n return fieldAria.errorMessageProps;\n },\n },\n };\n\n return (\n <DateFieldStateContext.Provider value={state as unknown as DateFieldState<DateValue>}>\n <DateFieldContext.Provider\n value={{\n state: state as unknown as DateFieldState<DateValue>,\n // Read through getters so consumers see the LIVE memo values, not a\n // snapshot frozen at first render. `createDescription` appends the\n // value-description id via a deferred effect; the group's\n // aria-describedby only picks it up if the props stay reactive here.\n aria: {\n get labelProps() {\n return fieldAria.labelProps;\n },\n // The segment group props (role=\"group\", aria-labelledby, unicode-bidi\n // isolate style, arrow-key nav, focus-within handlers) are routed to the\n // DateInput element — mirroring RAC, where useDateField.fieldProps is\n // published through GroupContext and consumed by the DateInput <Group>.\n // The outer wrapper stays roleless.\n get inputProps() {\n return fieldAria.fieldProps;\n },\n // The REAL hidden validation input props (type/hidden/required/onChange\n // under native validation). Rendered as the DateInput's <input> sibling.\n // Thread the validation-input ref through here — mirroring RAC's\n // `[InputContext, {...inputProps, ref: inputRef}]` — so createDateField's\n // form-reset/validation wiring resolves to the mounted element.\n get hiddenInputProps() {\n return mergeProps(fieldAria.inputProps, { ref: setValidationInputRef });\n },\n get descriptionProps() {\n return fieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return fieldAria.errorMessageProps;\n },\n },\n }}\n >\n <div\n ref={setFieldRef}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {local.children as JSX.Element}\n </Provider>\n </div>\n {/*\n RAC renders <HiddenDateInput> UNCONDITIONALLY at the DateField root\n (react-aria-components DateField.mjs). It is NOT a validation input — it\n is a clipped, aria-hidden, tabIndex={-1} native date input that mirrors\n the value for browser autofill. Its `form=\"\"` detaches it from form\n submission (the DateInput's <Input> above is what submits), so it never\n double-counts in FormData. It renders regardless of `name` — hence no\n <Show> gate — which is why it appears in the focus trail as the trailing\n tabindex=\"-1\" element.\n */}\n <RootHiddenDateInput\n autoComplete={(rest as Record<string, unknown>).autoComplete as string | undefined}\n name={(rest as Record<string, unknown>).name as string | undefined}\n isDisabled={state.isDisabled()}\n state={state as unknown as DateFieldState<DateValue>}\n />\n </DateFieldContext.Provider>\n </DateFieldStateContext.Provider>\n );\n}\n\nconst HIDDEN_DATE_SEGMENTS: readonly string[] = [\"day\", \"month\", \"year\"];\nconst HIDDEN_TIME_SEGMENTS: readonly string[] = [\"hour\", \"minute\", \"second\"];\nconst HIDDEN_GRANULARITY_MAP: Record<string, number> = { hour: 1, minute: 2, second: 3 };\n\ninterface RootHiddenDateInputProps {\n autoComplete?: string;\n name?: string;\n isDisabled?: boolean;\n state: DateFieldState<DateValue>;\n}\n\n/**\n * The always-rendered hidden date input at the DateField root — a faithful port\n * of react-aria-components' HiddenDateInput (private/HiddenDateInput.mjs). It is\n * NOT a validation input: it is a clipped, aria-hidden, tabIndex={-1} native\n * date input that mirrors the current value for browser autofill. `form=\"\"`\n * detaches it from form submission (the DateInput's <Input> submits), so it\n * never double-counts in FormData. RAC renders it unconditionally, which is why\n * it appears as the trailing tabindex=\"-1\" element in the focus trail.\n */\nfunction RootHiddenDateInput(props: RootHiddenDateInputProps): JSX.Element {\n // RAC uses useVisuallyHidden with position:fixed/top:0/left:0 to keep the\n // clipped input from scrolling the page.\n const { visuallyHiddenProps } = createVisuallyHidden(() => ({\n style: { position: \"fixed\", top: \"0\", left: \"0\" },\n }));\n\n const granularity = () => props.state.granularity ?? \"day\";\n const inputStep = () => {\n const g = granularity();\n if (g === \"second\") return 1;\n if (g === \"hour\") return 3600;\n return 60;\n };\n const inputType = () => (granularity() === \"day\" ? \"date\" : \"datetime-local\");\n const dateValue = () => {\n const value = props.state.value();\n if (!value) return \"\";\n if (granularity() === \"day\") return toCalendarDate(value).toString();\n return toCalendarDateTime(\n \"timeZone\" in value ? toLocalTimeZone(value) : value,\n ).toString();\n };\n\n const onChange: JSX.EventHandler<HTMLInputElement, Event> = (event) => {\n const targetString = (event.currentTarget.value ?? \"\").toString();\n if (!targetString) return;\n try {\n const g = granularity();\n const targetValue = (g === \"day\" ? parseDate(targetString) : parseDateTime(targetString)) as\n unknown as Record<string, number>;\n let timeSegments = HIDDEN_TIME_SEGMENTS;\n if (HIDDEN_TIME_SEGMENTS.includes(g)) {\n timeSegments = HIDDEN_TIME_SEGMENTS.slice(0, HIDDEN_GRANULARITY_MAP[g]);\n }\n const state = props.state as unknown as {\n setSegment?: (type: string, value: number) => void;\n setValue: (value: unknown) => void;\n };\n // Only DateFieldState (not DatePickerState) exposes setSegment; validate\n // each parsed segment before committing the new value, mirroring RAC.\n if (typeof state.setSegment === \"function\") {\n for (const type in targetValue) {\n if (HIDDEN_DATE_SEGMENTS.includes(type)) state.setSegment(type, targetValue[type]);\n if (timeSegments.includes(type)) state.setSegment(type, targetValue[type]);\n }\n }\n state.setValue(targetValue);\n } catch {\n // ignore unparseable autofill values\n }\n };\n\n return (\n <div\n {...(visuallyHiddenProps() as unknown as Record<string, unknown>)}\n aria-hidden=\"true\"\n data-testid=\"hidden-dateinput-container\"\n >\n <input\n tabIndex={-1}\n autocomplete={props.autoComplete}\n disabled={props.isDisabled}\n type={inputType()}\n form=\"\"\n name={props.name}\n step={inputStep()}\n value={dateValue()}\n onChange={onChange}\n />\n </div>\n );\n}\n\n/**\n * The input area containing date segments.\n */\nexport function DateInput(props: DateInputProps): JSX.Element {\n const context = useDateInputContext(props.slot);\n const { state, aria } = context;\n const [isFocused, setIsFocused] = createSignal(false);\n const [inputRef, setInputRef] = createSignal<HTMLDivElement | null>(null);\n\n const renderValues = createMemo<DateInputRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isFocused: isFocused(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-DateInput\",\n },\n renderValues,\n );\n\n // The group props (role=\"group\", aria-labelledby, unicode-bidi:isolate,\n // arrow-key nav, focus-within handlers) carry the field's own `style` and\n // focus handlers. Merge — not clobber — so the group keeps its unicode-bidi\n // isolation and the local isFocused signal chains onto the field's\n // focusWithin handlers. Solid onFocus/onBlur do not bubble, so track focus\n // via onFocusIn/onFocusOut.\n const inputDivProps = createMemo(() =>\n mergeProps(aria.inputProps, {\n onFocusIn: () => setIsFocused(true),\n onFocusOut: () => setIsFocused(false),\n style: renderProps.style(),\n }),\n );\n\n createEffect(() => {\n const element = inputRef();\n const handler = props.onPointerDownCapture;\n if (!element || !handler) return;\n\n const listener = (event: PointerEvent) =>\n (handler as unknown as (event: PointerEvent) => void)(event);\n element.addEventListener(\"pointerdown\", listener, { capture: true });\n onCleanup(() => element.removeEventListener(\"pointerdown\", listener, { capture: true }));\n });\n\n return (\n <DateFieldContext.Provider value={context as DateFieldContextValue}>\n <div\n ref={setInputRef}\n {...inputDivProps()}\n class={renderProps.class()}\n data-disabled={dataAttr(state.isDisabled())}\n data-focused={dataAttr(isFocused())}\n >\n {/*\n <Index> keys by position, not identity, so each DateSegment instance\n stays alive across keystrokes (state.segments() re-mints segment\n objects every edit). A stable Proxy forwards property reads to the\n live per-index accessor so the child stays reactive.\n */}\n <Index each={state.segments()}>\n {(segment) => {\n const liveSegment = new Proxy({} as DateSegmentType, {\n get: (_t, key) => (segment() as unknown as Record<PropertyKey, unknown>)[key],\n has: (_t, key) => key in (segment() as object),\n });\n return props.children?.(liveSegment);\n }}\n </Index>\n </div>\n {/*\n The hidden validation input, sibling of the group — mirrors RAC's\n DateInputInner `<><Group/><Input/></>`. Under native validation\n (default) `useDateField` publishes it as `type=\"text\" hidden required`\n so browser constraint validation fires; under aria validation it stays\n `type=\"hidden\"`. Both carry the ISO value string. Only the standalone\n DateField supplies these props; inside a DatePicker/DateRangePicker the\n field is presentation and its owner renders the hidden input instead.\n */}\n <Show when={aria.hiddenInputProps}>\n {(hiddenInputProps) => (\n <input {...(hiddenInputProps() as JSX.InputHTMLAttributes<HTMLInputElement>)} />\n )}\n </Show>\n </DateFieldContext.Provider>\n );\n}\n\n/**\n * A segment of a date field (year, month, day, etc.).\n */\nexport function DateSegment(props: DateSegmentProps): JSX.Element {\n const { state } = useDateFieldContext();\n const [segmentRef, setSegmentRef] = createSignal<HTMLElement | null>(null);\n\n const segmentAria = createDateSegment(\n {\n get segment() {\n return props.segment;\n },\n },\n state,\n segmentRef,\n );\n\n // Mirror upstream DateSegment: focus/focus-visible come from useFocusRing()\n // and hover from useHover({isDisabled: field disabled || literal segment}).\n // Literals never hover; the field being disabled suppresses hover entirely.\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover(() => ({\n isDisabled: state.isDisabled() || props.segment.type === \"literal\",\n }));\n\n const renderValues = createMemo<DateSegmentRenderProps>(() => ({\n isHovered: isHovered(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isPlaceholder: props.segment.isPlaceholder,\n isReadOnly: state.isReadOnly(),\n isDisabled: state.isDisabled(),\n isInvalid: state.isInvalid(),\n type: props.segment.type,\n text: props.segment.text,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-DateSegment\",\n },\n renderValues,\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === \"function\") {\n return renderProps.renderChildren();\n }\n return props.segment.text;\n };\n\n // Mirror upstream's `mergeProps(filterDOMProps(otherProps), segmentProps,\n // focusProps, hoverProps)`: the segment's behavior/style props (caretColor +\n // RTL direction) chain with the focus-ring and hover handlers so neither\n // clobbers the other.\n const segmentElementProps = createMemo(() =>\n mergeProps(\n segmentAria.segmentProps,\n focusProps as Record<string, unknown>,\n hoverProps as Record<string, unknown>,\n {\n style: renderProps.style(),\n },\n ),\n );\n\n return (\n <span\n ref={setSegmentRef}\n {...segmentElementProps()}\n class={renderProps.class()}\n data-placeholder={props.segment.isPlaceholder || undefined}\n data-invalid={state.isInvalid() || undefined}\n data-readonly={state.isReadOnly() || undefined}\n data-disabled={state.isDisabled() || undefined}\n data-type={props.segment.type}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n >\n {getChildren()}\n </span>\n );\n}\n\nexport interface DateFieldLabelProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldLabel(props: DateFieldLabelProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.labelProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport interface DateFieldDescriptionProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldDescription(props: DateFieldDescriptionProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.descriptionProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport interface DateFieldErrorMessageProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldErrorMessage(props: DateFieldErrorMessageProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.errorMessageProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport type { DateFieldState, DateSegmentType };\n"],"mappings":";;;;;;;;AAqCA,MAAa,yBAAyB,cAAkD,IAAI;AAE5F,SAAgB,4BAAyD;CACvE,MAAM,UAAU,WAAW,sBAAsB;CACjD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,kEAAkE;CAEpF,OAAO;AACT;;;;;;;;;AC2GA,MAAa,mBAAmB,cAA4C,IAAI;AAChF,MAAa,wBAAwB,cAAgD,IAAI;AAEzF,SAAS,2BAA6C,OAAU,aAAkC;CAChG,IAAI,CAAC,aAAa,oBAChB,OAAO;CAGT,OAAO,IAAI,MAAM,OAAO;EACtB,IAAI,QAAQ,UAAU,UAAU;GAC9B,MAAM,aAAa,QAAQ,IAAI,QAAQ,UAAU,QAAQ;GACzD,IAAI,aAAa,wBAAwB,eAAe,KAAA,GACtD,OAAO,YAAY;GAGrB,OAAO;EACT;EACA,IAAI,QAAQ,UAAU;GACpB,OACE,QAAQ,IAAI,QAAQ,QAAQ,KAC3B,aAAa,wBAAwB,YAAY,uBAAuB,KAAA;EAE7E;EACA,QAAQ,QAAQ;GACd,MAAM,OAAO,IAAI,IAAI,QAAQ,QAAQ,MAAM,CAAC;GAC5C,IAAI,YAAY,uBAAuB,KAAA,GACrC,KAAK,IAAI,oBAAoB;GAG/B,OAAO,MAAM,KAAK,IAAI;EACxB;EACA,yBAAyB,QAAQ,UAAU;GACzC,MAAM,aAAa,QAAQ,yBAAyB,QAAQ,QAAQ;GACpE,IAAI,YACF,OAAO;GAGT,IAAI,aAAa,wBAAwB,YAAY,uBAAuB,KAAA,GAC1E,OAAO;IACL,YA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IAAI,OAAO,MAAM,aAAa,YAC5B,OAAO,YAAY,eAAe;EAEpC,OAAO,MAAM,QAAQ;CACvB;CAMA,MAAM,sBAAsB,iBAC1BA,aACE,YAAY,cACZ,YACA,YACA,EACE,OAAO,YAAY,MAAM,EAC3B,CACF,CACF;CAEA,OACE,CAAC,KACC,KAAK,mBACD,oBAAoB,GACxB,OAAO,YAAY,MAAM,GACzB,kBAAkB,MAAM,QAAQ,iBAAiB,KAAA,GACjD,cAAc,MAAM,UAAU,KAAK,KAAA,GACnC,eAAe,MAAM,WAAW,KAAK,KAAA,GACrC,eAAe,MAAM,WAAW,KAAK,KAAA,GACrC,WAAW,MAAM,QAAQ,MACzB,cAAc,UAAU,KAAK,KAAA,GAC7B,cAAc,UAAU,KAAK,KAAA,GAC7B,oBAAoB,eAAe,KAAK,KAAA,GACzC;OACE,YAAY,EAAE;IACjB,EAAE;AAEN;AAOA,SAAgB,eAAe,OAAyC;CACtE,MAAM,EAAE,SAAS,oBAAoB;CACrC,OACE,CAAC,SAAS,KAAK,YAAY,OAAO,MAAM,OAAO;OAC5C,MAAM,SAAS;IAClB,EAAE;AAEN;AAOA,SAAgB,qBAAqB,OAA+C;CAClF,MAAM,EAAE,SAAS,oBAAoB;CACrC,OACE,CAAC,SAAS,KAAK,kBAAkB,OAAO,MAAM,OAAO;OAClD,MAAM,SAAS;IAClB,EAAE;AAEN;AAOA,SAAgB,sBAAsB,OAAgD;CACpF,MAAM,EAAE,SAAS,oBAAoB;CACrC,OACE,CAAC,SAAS,KAAK,mBAAmB,OAAO,MAAM,OAAO;OACnD,MAAM,SAAS;IAClB,EAAE;AAEN"}
|
package/dist/DatePicker.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Pre-wired headless date picker component that combines a date field with a calendar popup.
|
|
5
5
|
* Port of react-aria-components/src/DatePicker.tsx
|
|
6
6
|
*/
|
|
7
|
-
import { type JSX } from "solid-js";
|
|
8
|
-
import { createDatePicker, type AriaDatePickerProps, type AriaDateRangePickerProps } from "@proyecto-viviana/solidaria";
|
|
7
|
+
import { type JSX, type Context } from "solid-js";
|
|
8
|
+
import { createDatePicker, type AriaDatePickerProps, type AriaDateRangePickerProps, type PlacementAxis } from "@proyecto-viviana/solidaria";
|
|
9
9
|
import { type DateFieldState, type DatePickerState, type CalendarStateProps, type CalendarState, type RangeCalendarState, type DateFieldStateProps, type CalendarDate, type DateValue, type RangeCalendarStateProps } from "@proyecto-viviana/solid-stately";
|
|
10
10
|
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
11
11
|
export interface DatePickerRenderProps {
|
|
@@ -101,6 +101,25 @@ export interface DatePickerButtonRenderProps {
|
|
|
101
101
|
isDisabled: boolean;
|
|
102
102
|
/** Whether the calendar is open. */
|
|
103
103
|
isOpen: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Whether the button is currently pressed. Provided by the single
|
|
106
|
+
* DatePicker (fed from `createDatePicker().isButtonPressed()`); the range
|
|
107
|
+
* variant does not yet publish press state, so this is optional.
|
|
108
|
+
*/
|
|
109
|
+
isPressed?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Whether the button is hovered. Fed from the trigger's own `createHover`;
|
|
112
|
+
* mirrors RAC `Button`'s `isHovered` renderProp so the styled S2
|
|
113
|
+
* `baseColor("gray-100")` hover-step background compiles into the className.
|
|
114
|
+
*/
|
|
115
|
+
isHovered?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Whether the button is keyboard-focused (focus-visible). Fed from
|
|
118
|
+
* `createFocusRing`; mirrors RAC `Button`'s `isFocusVisible` so the styled
|
|
119
|
+
* S2 `focusRing()` outline (a renderProps-gated class, not a CSS
|
|
120
|
+
* `[data-focus-visible]` selector) compiles into the className.
|
|
121
|
+
*/
|
|
122
|
+
isFocusVisible?: boolean;
|
|
104
123
|
}
|
|
105
124
|
export interface DatePickerButtonProps extends SlotProps {
|
|
106
125
|
/** The children of the component. */
|
|
@@ -111,12 +130,18 @@ export interface DatePickerButtonProps extends SlotProps {
|
|
|
111
130
|
style?: StyleOrFunction<DatePickerButtonRenderProps>;
|
|
112
131
|
/** Whether the button is disabled. */
|
|
113
132
|
isDisabled?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Ref callback for the underlying button element. Mirrors S2's CalendarButton,
|
|
135
|
+
* whose `buttonRef` feeds `pressScale(buttonRef)`; the styled layer forwards a
|
|
136
|
+
* setter here so it can size the press transform against the real element.
|
|
137
|
+
*/
|
|
138
|
+
ref?: (element: HTMLButtonElement) => void;
|
|
114
139
|
}
|
|
115
140
|
export interface DateRangePickerButtonProps extends DatePickerButtonProps {
|
|
116
141
|
}
|
|
117
|
-
export declare const DatePickerContext:
|
|
118
|
-
export declare const DatePickerStateContext:
|
|
119
|
-
export declare const DateRangePickerStateContext:
|
|
142
|
+
export declare const DatePickerContext: Context<DatePickerContextValue | null>;
|
|
143
|
+
export declare const DatePickerStateContext: Context<DateFieldState<DateValue> | null>;
|
|
144
|
+
export declare const DateRangePickerStateContext: Context<RangeCalendarState<DateValue> | null>;
|
|
120
145
|
export { DateRangePickerContext, useDateRangePickerContext } from "./DateRangePickerContext";
|
|
121
146
|
export type { DateRangePickerContextValue, DateRangePickerFieldContextValue, } from "./DateRangePickerContext";
|
|
122
147
|
export declare function useDatePickerContext(): DatePickerContextValue;
|
|
@@ -152,11 +177,25 @@ export declare function DateRangePicker<T extends DateValue = CalendarDate>(prop
|
|
|
152
177
|
*/
|
|
153
178
|
export declare function DatePickerButton(props: DatePickerButtonProps): JSX.Element;
|
|
154
179
|
export declare function DateRangePickerButton(props: DateRangePickerButtonProps): JSX.Element;
|
|
180
|
+
/**
|
|
181
|
+
* Render props for the popover surface, mirroring RAC `Popover`'s
|
|
182
|
+
* enter/exit/placement renderProps. The styled layer keys the S2
|
|
183
|
+
* opacity/translate enter transition on these (a renderProps-gated class, not a
|
|
184
|
+
* CSS `[data-entering]` selector).
|
|
185
|
+
*/
|
|
186
|
+
export interface DatePickerContentRenderProps {
|
|
187
|
+
/** Whether the popover is playing its enter transition (`data-entering`). */
|
|
188
|
+
isEntering: boolean;
|
|
189
|
+
/** Whether the popover is playing its exit transition (`data-exiting`). */
|
|
190
|
+
isExiting: boolean;
|
|
191
|
+
/** The resolved placement axis, for the direction-dependent translate. */
|
|
192
|
+
placement: PlacementAxis | null;
|
|
193
|
+
}
|
|
155
194
|
export interface DatePickerContentProps extends SlotProps {
|
|
156
195
|
/** The children of the component. */
|
|
157
196
|
children?: JSX.Element;
|
|
158
|
-
/** The CSS className for the element. */
|
|
159
|
-
class?: string;
|
|
197
|
+
/** The CSS className for the element, or a function of the render props. */
|
|
198
|
+
class?: string | ((renderProps: DatePickerContentRenderProps) => string);
|
|
160
199
|
/** The inline style for the element. */
|
|
161
200
|
style?: JSX.CSSProperties;
|
|
162
201
|
}
|
package/dist/DatePicker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../src/DatePicker.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../src/DatePicker.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EASb,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,gBAAgB,EAUhB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAE7B,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAExB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,uBAAuB,EAE7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,cAAc,EACnB,K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AM,CAAC;CAChB;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,GAAG,CAAC,OAAO,CAS9F;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,gCAAgC,GAAG,GAAG,CAAC,OAAO,CAShG;AAgBD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAkH5E;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,GAAG,CAAC,OAAO,CAiGtF;AAED,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./Text.js";
|
|
2
|
+
import "./Form.js";
|
|
3
|
+
import "./Calendar.js";
|
|
4
|
+
import "./RangeCalendar.js";
|
|
5
|
+
import { d as useDateRangePickerContext, u as DateRangePickerContext } from "./DateField2.js";
|
|
6
|
+
import { _ as HiddenDateInput, a as DatePickerDescription, c as DatePickerStateContext, d as DateRangePickerContent, f as DateRangePickerDescription, g as useDatePickerContext, h as DateRangePickerStateContext, i as DatePickerContext, l as DateRangePicker, m as DateRangePickerLabel, n as DatePickerButton, o as DatePickerErrorMessage, p as DateRangePickerErrorMessage, r as DatePickerContent, s as DatePickerLabel, t as DatePicker, u as DateRangePickerButton } from "./DatePicker2.js";
|
|
7
|
+
export { DatePicker, DatePickerButton, DatePickerContent, DatePickerContext, DatePickerDescription, DatePickerErrorMessage, DatePickerLabel, DatePickerStateContext, DateRangePicker, DateRangePickerButton, DateRangePickerContent, DateRangePickerContext, DateRangePickerDescription, DateRangePickerErrorMessage, DateRangePickerLabel, DateRangePickerStateContext, HiddenDateInput, useDatePickerContext, useDateRangePickerContext };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./Text.jsx";
|
|
2
|
+
import "./Form.jsx";
|
|
3
|
+
import "./Calendar.jsx";
|
|
4
|
+
import "./RangeCalendar.jsx";
|
|
5
|
+
import { d as useDateRangePickerContext, u as DateRangePickerContext } from "./DateField2.jsx";
|
|
6
|
+
import { _ as HiddenDateInput, a as DatePickerDescription, c as DatePickerStateContext, d as DateRangePickerContent, f as DateRangePickerDescription, g as useDatePickerContext, h as DateRangePickerStateContext, i as DatePickerContext, l as DateRangePicker, m as DateRangePickerLabel, n as DatePickerButton, o as DatePickerErrorMessage, p as DateRangePickerErrorMessage, r as DatePickerContent, s as DatePickerLabel, t as DatePicker, u as DateRangePickerButton } from "./DatePicker2.jsx";
|
|
7
|
+
export { DatePicker, DatePickerButton, DatePickerContent, DatePickerContext, DatePickerDescription, DatePickerErrorMessage, DatePickerLabel, DatePickerStateContext, DateRangePicker, DateRangePickerButton, DateRangePickerContent, DateRangePickerContext, DateRangePickerDescription, DateRangePickerErrorMessage, DateRangePickerLabel, DateRangePickerStateContext, HiddenDateInput, useDatePickerContext, useDateRangePickerContext };
|