@kenos-ui/react-datepicker 0.3.3 → 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/CHANGELOG.md +97 -2
- package/README.md +2 -4
- package/dist/index.cjs +1 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,107 @@
|
|
|
1
1
|
# @kenos-ui/react-datepicker
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **Kenos UI DatePicker — feature release** (`@kenos-ui/react-datepicker@0.4.1`)
|
|
8
|
+
|
|
9
|
+
Headless date & scheduling primitives for React 19+, fully unstyled and composition-first.
|
|
10
|
+
|
|
11
|
+
**Selection API**
|
|
12
|
+
- Unified `DatePicker.Root` with `mode`: `"single"` | `"range"` | `"multiple"`
|
|
13
|
+
- Controlled / uncontrolled `value`, `open`, and `onValueChange` / `onOpenChange`
|
|
14
|
+
- Range mode with live hover preview between `rangeStart` and `rangeEnd`
|
|
15
|
+
- `minDate`, `maxDate`, `disabled` (boolean or per-date function), `readOnly`, `closeOnSelect`
|
|
16
|
+
|
|
17
|
+
**Segmented input (timescape)**
|
|
18
|
+
- First-class `<DatePicker.Input />` — locale-aware month / day / year segments
|
|
19
|
+
- Dual inputs for range (`index={0}` / `index={1}`)
|
|
20
|
+
- Bidirectional sync: type in segments or pick from calendar
|
|
21
|
+
- Custom `segmentLabels` for screen readers
|
|
22
|
+
|
|
23
|
+
**Compound calendar parts**
|
|
24
|
+
- `Label`, `Trigger`, `Content`, `Calendar` (shorthand composition)
|
|
25
|
+
- `ViewControl`, `PrevTrigger`, `NextTrigger`, `ViewTrigger`
|
|
26
|
+
- `View` with `day` / `month` / `year` drill-down
|
|
27
|
+
- `Grid`, `Day` (render-prop `DayCellMeta`), `WeekDays`
|
|
28
|
+
- `MonthGrid` / `MonthCell`, `YearGrid` / `YearCell`
|
|
29
|
+
- `useDatePickerContext()` for custom layouts
|
|
30
|
+
|
|
31
|
+
**Positioning & popup policy**
|
|
32
|
+
- Floating UI via `Content`: `side`, `align`, `sideOffset`, `avoidCollisions`, `portal`
|
|
33
|
+
- `forceMount` for enter/exit animations (`data-state`)
|
|
34
|
+
- `modal` prop (default `false`) — opt-in focus trap + `aria-modal`; popup-policy friendly
|
|
35
|
+
- Focus restore to trigger / input on close; dialog-interop (`Escape` does not bubble)
|
|
36
|
+
|
|
37
|
+
**State & i18n**
|
|
38
|
+
- Reducer-driven state machine (`OPEN`, `SELECT_DATE`, `NAV_PREV`/`NAV_NEXT`, `SET_VIEW`, `COMMIT_INPUT`, …)
|
|
39
|
+
- `Intl`-based locale: week start, month/year labels, segment order & separators
|
|
40
|
+
- `weekStartsOn` override
|
|
41
|
+
|
|
42
|
+
**Accessibility & quality**
|
|
43
|
+
- WAI-ARIA: `role="dialog"`, `grid` / `gridcell`, labelled inputs, keyboard roving tabindex
|
|
44
|
+
- Test suite: reducer, calendar grid, date utils, ARIA, keyboard nav, dialog interop, axe (vitest-axe)
|
|
45
|
+
- Storybook: Single, Range, Multiple, Locales
|
|
46
|
+
|
|
47
|
+
**Docs**
|
|
48
|
+
- README with quick start, range / multiple examples, full composition, localization, and `Content` props
|
|
49
|
+
|
|
50
|
+
**Packaging**
|
|
51
|
+
- Add `license: MIT` to `package.json` (fixes npm registry showing "no license")
|
|
52
|
+
|
|
53
|
+
## 0.4.0
|
|
54
|
+
|
|
55
|
+
### Minor Changes
|
|
56
|
+
|
|
57
|
+
- **Kenos UI DatePicker — feature release** (`@kenos-ui/react-datepicker@0.4.0`)
|
|
58
|
+
|
|
59
|
+
Headless date & scheduling primitives for React 19+, fully unstyled and composition-first.
|
|
60
|
+
|
|
61
|
+
**Selection API**
|
|
62
|
+
- Unified `DatePicker.Root` with `mode`: `"single"` | `"range"` | `"multiple"`
|
|
63
|
+
- Controlled / uncontrolled `value`, `open`, and `onValueChange` / `onOpenChange`
|
|
64
|
+
- Range mode with live hover preview between `rangeStart` and `rangeEnd`
|
|
65
|
+
- `minDate`, `maxDate`, `disabled` (boolean or per-date function), `readOnly`, `closeOnSelect`
|
|
66
|
+
|
|
67
|
+
**Segmented input (timescape)**
|
|
68
|
+
- First-class `<DatePicker.Input />` — locale-aware month / day / year segments
|
|
69
|
+
- Dual inputs for range (`index={0}` / `index={1}`)
|
|
70
|
+
- Bidirectional sync: type in segments or pick from calendar
|
|
71
|
+
- Custom `segmentLabels` for screen readers
|
|
72
|
+
|
|
73
|
+
**Compound calendar parts**
|
|
74
|
+
- `Label`, `Trigger`, `Content`, `Calendar` (shorthand composition)
|
|
75
|
+
- `ViewControl`, `PrevTrigger`, `NextTrigger`, `ViewTrigger`
|
|
76
|
+
- `View` with `day` / `month` / `year` drill-down
|
|
77
|
+
- `Grid`, `Day` (render-prop `DayCellMeta`), `WeekDays`
|
|
78
|
+
- `MonthGrid` / `MonthCell`, `YearGrid` / `YearCell`
|
|
79
|
+
- `useDatePickerContext()` for custom layouts
|
|
80
|
+
|
|
81
|
+
**Positioning & popup policy**
|
|
82
|
+
- Floating UI via `Content`: `side`, `align`, `sideOffset`, `avoidCollisions`, `portal`
|
|
83
|
+
- `forceMount` for enter/exit animations (`data-state`)
|
|
84
|
+
- `modal` prop (default `false`) — opt-in focus trap + `aria-modal`; popup-policy friendly
|
|
85
|
+
- Focus restore to trigger / input on close; dialog-interop (`Escape` does not bubble)
|
|
86
|
+
|
|
87
|
+
**State & i18n**
|
|
88
|
+
- Reducer-driven state machine (`OPEN`, `SELECT_DATE`, `NAV_PREV`/`NAV_NEXT`, `SET_VIEW`, `COMMIT_INPUT`, …)
|
|
89
|
+
- `Intl`-based locale: week start, month/year labels, segment order & separators
|
|
90
|
+
- `weekStartsOn` override
|
|
91
|
+
|
|
92
|
+
**Accessibility & quality**
|
|
93
|
+
- WAI-ARIA: `role="dialog"`, `grid` / `gridcell`, labelled inputs, keyboard roving tabindex
|
|
94
|
+
- Test suite: reducer, calendar grid, date utils, ARIA, keyboard nav, dialog interop, axe (vitest-axe)
|
|
95
|
+
- Storybook: Single, Range, Multiple, Locales
|
|
96
|
+
|
|
97
|
+
**Docs**
|
|
98
|
+
- README with quick start, range / multiple examples, full composition, localization, and `Content` props
|
|
99
|
+
|
|
3
100
|
## 0.3.3
|
|
4
101
|
|
|
5
102
|
### Patch Changes
|
|
6
103
|
|
|
7
104
|
- docs: major refresh of README.md and root documentation
|
|
8
|
-
|
|
9
105
|
- Update package README to accurately reflect current API (unified `DatePicker.Root` with `mode`, first-class `<DatePicker.Input>`, full composition)
|
|
10
106
|
- Add strong examples for segmented input, range with dual inputs + hover preview, multiple selection, and custom rendering
|
|
11
107
|
- Align with brand voice and recent announcement content
|
|
@@ -29,7 +125,6 @@
|
|
|
29
125
|
### Minor Changes
|
|
30
126
|
|
|
31
127
|
- Axis lift-and-shift: publish DatePicker under `@at5/axis-datepicker`.
|
|
32
|
-
|
|
33
128
|
- Add `@at5/axis-datepicker` — same DatePicker API and behavior as `@at5/kairo` (migrated from `packages/kairo` to `packages/datepicker`)
|
|
34
129
|
- Add `@at5/axis` — aggregator re-exporting `DatePicker`
|
|
35
130
|
- `@at5/kairo` — deprecated; thin re-export of `@at5/axis-datepicker` for transition
|
package/README.md
CHANGED
|
@@ -111,9 +111,7 @@ Or take full control:
|
|
|
111
111
|
<DatePicker.Day key={j} date={d}>
|
|
112
112
|
{({ isSelected, isToday }) => (
|
|
113
113
|
// custom rendering
|
|
114
|
-
<span className={isSelected ? "selected" : ""}>
|
|
115
|
-
{d.getDate()}
|
|
116
|
-
</span>
|
|
114
|
+
<span className={isSelected ? "selected" : ""}>{d.getDate()}</span>
|
|
117
115
|
)}
|
|
118
116
|
</DatePicker.Day>
|
|
119
117
|
))}
|
|
@@ -188,4 +186,4 @@ MIT
|
|
|
188
186
|
|
|
189
187
|
---
|
|
190
188
|
|
|
191
|
-
|
|
189
|
+
_Kenos UI_ — https://github.com/allysontsoares/kenos-ui/tree/main/packages/datepicker
|
package/dist/index.cjs
CHANGED
|
@@ -918,11 +918,7 @@ function Content({
|
|
|
918
918
|
input: document.getElementById(ids.input) ?? document.getElementById(`${ids.input}-0`)
|
|
919
919
|
});
|
|
920
920
|
}, [dispatch, ids.input, ids.trigger, state.openSource]);
|
|
921
|
-
utils.useClickOutside(
|
|
922
|
-
[contentRef, triggerRef, inputRef, input0Ref, input1Ref],
|
|
923
|
-
close,
|
|
924
|
-
isOpen
|
|
925
|
-
);
|
|
921
|
+
utils.useClickOutside([contentRef, triggerRef, inputRef, input0Ref, input1Ref], close, isOpen);
|
|
926
922
|
utils.useEscapeKey({
|
|
927
923
|
enabled: isOpen,
|
|
928
924
|
stopPropagation: true,
|