@kalyx/react 1.0.0-rc.12 → 1.0.0-rc.14
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 +40 -0
- package/README.md +15 -0
- package/dist/headless.cjs +3052 -0
- package/dist/headless.cjs.map +1 -0
- package/dist/headless.d.cts +5 -0
- package/dist/headless.d.ts +5 -0
- package/dist/headless.js +3026 -0
- package/dist/headless.js.map +1 -0
- package/dist/index.cjs +41 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -6
- package/dist/index.d.ts +19 -6
- package/dist/index.js +40 -15
- package/dist/index.js.map +1 -1
- package/package.json +13 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @kalyx/react
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.14
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 44b3fa6: Add `@kalyx/react/headless` entry for adapter-explicit usage. Default `@kalyx/react` entry continues to auto-inject the date-fns adapter — no breaking change. Use the headless entry to opt out of the bundled date-fns and provide your own adapter (dayjs, luxon, custom). See [Adapters guide](https://kalyx-docs.vercel.app/docs/guides/adapters).
|
|
8
|
+
|
|
9
|
+
## 1.0.0-rc.13
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 5b6c37f: Extract `@kalyx/adapter-date-fns` and make `@kalyx/core` neutral
|
|
14
|
+
|
|
15
|
+
Step 1 + 2 of the four-step adapter-extraction plan (see `.claude/skills/adapter-extraction.md`). After this change, `@kalyx/core` no longer depends on `date-fns` or `date-fns-tz`; it ships only the platform-agnostic date logic (`getCalendarDays`, `isDateDisabled`, timezone helpers, labels, the `DateAdapter` contract). The DateFnsAdapter implementation now lives in its own publishable package so dayjs / luxon / Temporal adapters can be added later without forcing every Kalyx user to bundle two date libraries.
|
|
16
|
+
|
|
17
|
+
### What changed
|
|
18
|
+
- **`@kalyx/core`** — `DateFnsAdapter` is no longer exported and `date-fns` / `date-fns-tz` are no longer listed as dependencies. `utils/timezone.ts` was the lone leak and uses native `new Date(string)` now (every caller already routes through `normalizeISO` or `DateAdapter.parse`, so the input subset is fully spec-defined).
|
|
19
|
+
- **`@kalyx/adapter-date-fns`** — new package with the full `DateFnsAdapter` implementation moved verbatim. Same UTC semantics, same timezone-aware paths, same 35 adapter tests.
|
|
20
|
+
- **`@kalyx/react`** — imports `DateFnsAdapter` from `@kalyx/adapter-date-fns` now. The default adapter is still wired up automatically — anyone using `import { DatePicker } from '@kalyx/react'` keeps the previous behaviour with zero changes. The adapter package is a direct dependency so consumers installing just `@kalyx/react` continue to get a working default.
|
|
21
|
+
|
|
22
|
+
### Migration
|
|
23
|
+
|
|
24
|
+
If you imported `DateFnsAdapter` directly from `@kalyx/core`:
|
|
25
|
+
|
|
26
|
+
```diff
|
|
27
|
+
- import { DateFnsAdapter } from '@kalyx/core';
|
|
28
|
+
+ import { DateFnsAdapter } from '@kalyx/adapter-date-fns';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`@kalyx/react` consumers don't need to change anything — the adapter is still re-exported from `@kalyx/react`.
|
|
32
|
+
|
|
33
|
+
### Next (separate PR)
|
|
34
|
+
|
|
35
|
+
The `/headless` entry point (`@kalyx/react/headless`) that lets dayjs/luxon users tree-shake date-fns out is a follow-up. The component Roots still default to the date-fns adapter inline; the entry split requires moving that fallback out of each Root and into the entry boundary.
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [5b6c37f]
|
|
40
|
+
- @kalyx/core@1.0.0-rc.13
|
|
41
|
+
- @kalyx/adapter-date-fns@1.0.0-rc.1
|
|
42
|
+
|
|
3
43
|
## 1.0.0-rc.12
|
|
4
44
|
|
|
5
45
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -87,6 +87,21 @@ Every sub-component forwards `className`, `style`, and `ref`, and accepts a `cla
|
|
|
87
87
|
|
|
88
88
|
Full recipes: [Tailwind](https://kalyx-docs.vercel.app/docs/recipes/tailwind), [shadcn/ui](https://kalyx-docs.vercel.app/docs/recipes/shadcn), [React Hook Form](https://kalyx-docs.vercel.app/docs/recipes/react-hook-form).
|
|
89
89
|
|
|
90
|
+
## Bring your own adapter
|
|
91
|
+
|
|
92
|
+
Already shipping `dayjs`, `luxon`, or `Temporal`? Skip the bundled `date-fns` and import from `@kalyx/react/headless` instead — same component surface, no auto-installed adapter:
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
import { DatePicker } from '@kalyx/react/headless';
|
|
96
|
+
import { DayjsAdapter } from './my-dayjs-adapter'; // your DateAdapter
|
|
97
|
+
|
|
98
|
+
<DatePicker adapter={DayjsAdapter} value={iso} onChange={setIso}>
|
|
99
|
+
<DatePicker.Calendar />
|
|
100
|
+
</DatePicker>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
If you forget the `adapter` prop, the Root throws a clear error telling you exactly what's missing. The full how-to (interface, dayjs reference implementation, edge cases) is in the [adapters guide](https://kalyx-docs.vercel.app/docs/guides/adapters).
|
|
104
|
+
|
|
90
105
|
## Documentation
|
|
91
106
|
|
|
92
107
|
- [Introduction](https://kalyx-docs.vercel.app/docs/intro)
|