@octanejs/day-picker 0.0.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/LICENSE +21 -0
- package/README.md +14 -0
- package/UPSTREAM.md +24 -0
- package/package.json +77 -0
- package/src/DayPicker.tsrx +717 -0
- package/src/UI.ts +121 -0
- package/src/classes/CalendarDay.ts +82 -0
- package/src/classes/CalendarMonth.ts +20 -0
- package/src/classes/CalendarWeek.ts +19 -0
- package/src/classes/DateLib.ts +695 -0
- package/src/classes/index.ts +4 -0
- package/src/components/custom-components.tsrx +237 -0
- package/src/formatters/formatCaption.ts +18 -0
- package/src/formatters/formatDay.ts +17 -0
- package/src/formatters/formatMonthDropdown.ts +16 -0
- package/src/formatters/formatWeekNumber.ts +19 -0
- package/src/formatters/formatWeekNumberHeader.ts +11 -0
- package/src/formatters/formatWeekdayName.ts +17 -0
- package/src/formatters/formatYearDropdown.ts +15 -0
- package/src/formatters/index.ts +7 -0
- package/src/helpers/calculateFocusTarget.ts +79 -0
- package/src/helpers/createGetModifiers.ts +117 -0
- package/src/helpers/endOfBroadcastWeek.ts +22 -0
- package/src/helpers/getBroadcastWeeksInMonth.ts +32 -0
- package/src/helpers/getClassNamesForModifiers.ts +38 -0
- package/src/helpers/getComponents.ts +19 -0
- package/src/helpers/getDataAttributes.ts +17 -0
- package/src/helpers/getDates.ts +87 -0
- package/src/helpers/getDays.ts +19 -0
- package/src/helpers/getDefaultClassNames.ts +36 -0
- package/src/helpers/getDisplayMonths.ts +30 -0
- package/src/helpers/getFocusableDate.ts +66 -0
- package/src/helpers/getFormatters.ts +16 -0
- package/src/helpers/getInitialMonth.ts +35 -0
- package/src/helpers/getLabels.ts +93 -0
- package/src/helpers/getMonthOptions.ts +45 -0
- package/src/helpers/getMonths.ts +89 -0
- package/src/helpers/getNavMonth.ts +35 -0
- package/src/helpers/getNextFocus.ts +45 -0
- package/src/helpers/getNextMonth.ts +46 -0
- package/src/helpers/getPreviousMonth.ts +45 -0
- package/src/helpers/getStyleForModifiers.ts +31 -0
- package/src/helpers/getWeekdays.ts +33 -0
- package/src/helpers/getWeeks.ts +14 -0
- package/src/helpers/getYearOptions.ts +43 -0
- package/src/helpers/index.ts +2 -0
- package/src/helpers/startOfBroadcastWeek.ts +26 -0
- package/src/helpers/useControlledValue.ts +38 -0
- package/src/index.ts +13 -0
- package/src/labels/index.ts +12 -0
- package/src/labels/labelDayButton.ts +29 -0
- package/src/labels/labelGrid.ts +18 -0
- package/src/labels/labelGridcell.ts +26 -0
- package/src/labels/labelMonthDropdown.ts +14 -0
- package/src/labels/labelNav.ts +11 -0
- package/src/labels/labelNext.ts +17 -0
- package/src/labels/labelPrevious.ts +13 -0
- package/src/labels/labelWeekNumber.ts +15 -0
- package/src/labels/labelWeekNumberHeader.ts +14 -0
- package/src/labels/labelWeekday.ts +16 -0
- package/src/labels/labelYearDropdown.ts +14 -0
- package/src/locale/af.ts +48 -0
- package/src/locale/ar-DZ.ts +48 -0
- package/src/locale/ar-EG.ts +48 -0
- package/src/locale/ar-MA.ts +48 -0
- package/src/locale/ar-SA.ts +48 -0
- package/src/locale/ar-TN.ts +48 -0
- package/src/locale/ar.ts +48 -0
- package/src/locale/az.ts +48 -0
- package/src/locale/be-tarask.ts +51 -0
- package/src/locale/be.ts +48 -0
- package/src/locale/bg.ts +48 -0
- package/src/locale/bn.ts +48 -0
- package/src/locale/bs.ts +48 -0
- package/src/locale/ca.ts +48 -0
- package/src/locale/ckb.ts +51 -0
- package/src/locale/cs.ts +48 -0
- package/src/locale/cy.ts +48 -0
- package/src/locale/da.ts +48 -0
- package/src/locale/de-AT.ts +48 -0
- package/src/locale/de.ts +48 -0
- package/src/locale/el.ts +48 -0
- package/src/locale/en-AU.ts +48 -0
- package/src/locale/en-CA.ts +48 -0
- package/src/locale/en-GB.ts +51 -0
- package/src/locale/en-IE.ts +48 -0
- package/src/locale/en-IN.ts +48 -0
- package/src/locale/en-NZ.ts +48 -0
- package/src/locale/en-US.ts +72 -0
- package/src/locale/en-ZA.ts +48 -0
- package/src/locale/eo.ts +48 -0
- package/src/locale/es.ts +48 -0
- package/src/locale/et.ts +48 -0
- package/src/locale/eu.ts +48 -0
- package/src/locale/fa-IR.ts +48 -0
- package/src/locale/fi.ts +48 -0
- package/src/locale/fr-CA.ts +48 -0
- package/src/locale/fr-CH.ts +48 -0
- package/src/locale/fr.ts +48 -0
- package/src/locale/fy.ts +48 -0
- package/src/locale/gd.ts +48 -0
- package/src/locale/gl.ts +48 -0
- package/src/locale/gu.ts +48 -0
- package/src/locale/he.ts +48 -0
- package/src/locale/hi.ts +48 -0
- package/src/locale/hr.ts +48 -0
- package/src/locale/ht.ts +48 -0
- package/src/locale/hu.ts +48 -0
- package/src/locale/hy.ts +48 -0
- package/src/locale/id.ts +48 -0
- package/src/locale/is.ts +48 -0
- package/src/locale/it-CH.ts +48 -0
- package/src/locale/it.ts +48 -0
- package/src/locale/ja-Hira.ts +48 -0
- package/src/locale/ja.ts +48 -0
- package/src/locale/ka.ts +48 -0
- package/src/locale/kk.ts +48 -0
- package/src/locale/km.ts +48 -0
- package/src/locale/kn.ts +48 -0
- package/src/locale/ko.ts +48 -0
- package/src/locale/lb.ts +48 -0
- package/src/locale/lt.ts +48 -0
- package/src/locale/lv.ts +48 -0
- package/src/locale/mk.ts +48 -0
- package/src/locale/mn.ts +48 -0
- package/src/locale/ms.ts +48 -0
- package/src/locale/mt.ts +48 -0
- package/src/locale/nb.ts +48 -0
- package/src/locale/nl-BE.ts +48 -0
- package/src/locale/nl.ts +48 -0
- package/src/locale/nn.ts +48 -0
- package/src/locale/oc.ts +48 -0
- package/src/locale/pl.ts +48 -0
- package/src/locale/pt-BR.ts +48 -0
- package/src/locale/pt.ts +48 -0
- package/src/locale/ro.ts +48 -0
- package/src/locale/ru.ts +48 -0
- package/src/locale/se.ts +48 -0
- package/src/locale/sk.ts +48 -0
- package/src/locale/sl.ts +48 -0
- package/src/locale/sq.ts +48 -0
- package/src/locale/sr-Latn.ts +48 -0
- package/src/locale/sr.ts +48 -0
- package/src/locale/sv.ts +48 -0
- package/src/locale/ta.ts +48 -0
- package/src/locale/te.ts +48 -0
- package/src/locale/th.ts +48 -0
- package/src/locale/tr.ts +48 -0
- package/src/locale/ug.ts +48 -0
- package/src/locale/uk.ts +48 -0
- package/src/locale/uz-Cyrl.ts +48 -0
- package/src/locale/uz.ts +48 -0
- package/src/locale/vi.ts +48 -0
- package/src/locale/zh-CN.ts +48 -0
- package/src/locale/zh-HK.ts +51 -0
- package/src/locale/zh-TW.ts +51 -0
- package/src/locale.ts +108 -0
- package/src/noonDateLib.ts +202 -0
- package/src/selection/useMulti.ts +74 -0
- package/src/selection/useRange.ts +89 -0
- package/src/selection/useSingle.ts +77 -0
- package/src/style.css +451 -0
- package/src/style.css.d.ts +3 -0
- package/src/style.module.css +451 -0
- package/src/style.module.css.d.ts +29 -0
- package/src/types/index.ts +3 -0
- package/src/types/props.ts +671 -0
- package/src/types/selection.ts +97 -0
- package/src/types/shared.ts +346 -0
- package/src/useAnimation.ts +242 -0
- package/src/useCalendar.ts +233 -0
- package/src/useDayPicker.ts +91 -0
- package/src/useFocus.ts +109 -0
- package/src/useSelection.ts +36 -0
- package/src/utils/addToRange.ts +91 -0
- package/src/utils/convertMatchersToTimeZone.ts +88 -0
- package/src/utils/dateMatchModifiers.ts +72 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/rangeContainsDayOfWeek.ts +33 -0
- package/src/utils/rangeContainsModifiers.ts +106 -0
- package/src/utils/rangeIncludesDate.ts +40 -0
- package/src/utils/rangeOverlaps.ts +26 -0
- package/src/utils/toTimeZone.ts +13 -0
- package/src/utils/typeguards.ts +71 -0
- package/status.json +13 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2026 Giampaolo Bellavite <io@gpbl.dev> and contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @octanejs/day-picker
|
|
2
|
+
|
|
3
|
+
The Octane migration target for `react-day-picker@10.0.1`.
|
|
4
|
+
|
|
5
|
+
The binding targets the same `DayPicker` props, selection modes, navigation, accessibility markup, customization surface, locale exports, time-zone behavior, and stylesheet entry points. See [UPSTREAM.md](./UPSTREAM.md) for the exact source pin and license evidence.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { DayPicker } from '@octanejs/day-picker';
|
|
9
|
+
import '@octanejs/day-picker/style.css';
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## License
|
|
13
|
+
|
|
14
|
+
MIT. The upstream copyright and permission notice are retained in [LICENSE](./LICENSE).
|
package/UPSTREAM.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Upstream provenance
|
|
2
|
+
|
|
3
|
+
- Repository: <https://github.com/gpbl/react-day-picker>
|
|
4
|
+
- Version/tag: `10.0.1` / `v10.0.1`
|
|
5
|
+
- Commit: `6d3929d655779d178638d8f80171597a579468e8`
|
|
6
|
+
- License: MIT
|
|
7
|
+
- Upstream package root: `packages/react-day-picker`
|
|
8
|
+
|
|
9
|
+
The exact upstream package source, tests, styles, package metadata, and license are retained under `upstream/`. `audit/SHA256SUMS` and `audit/check-upstream.mjs` make additions, removals, and byte changes detectable.
|
|
10
|
+
|
|
11
|
+
The Octane implementation preserves the root, locale, stylesheet, and package metadata entry points. React-specific hooks and JSX components are adapted to Octane; framework-neutral date calculations and formatters retain their upstream behavior.
|
|
12
|
+
|
|
13
|
+
## Parity status: incomplete
|
|
14
|
+
|
|
15
|
+
This port is **explicitly incomplete** for React-parity evidence. Upstream ships both runtime and type suites under `upstream/src/**/*.test.*`, and the manifest records those suites as `present`, but this package does **not** yet execute them as parity lanes.
|
|
16
|
+
|
|
17
|
+
Still missing before this binding can claim a parity suite:
|
|
18
|
+
|
|
19
|
+
- pristine runtime lane that runs the unchanged pinned upstream suite with case/assertion negative controls
|
|
20
|
+
- adapted one-for-one upstream runtime inventory for the pinned suite
|
|
21
|
+
- pristine type lane and one-for-one adapted type inventory with accept/reject negative controls
|
|
22
|
+
- exhaustive upstream-test disposition for every vendored test artifact
|
|
23
|
+
|
|
24
|
+
Until those land, do not treat unpaired smoke inventories as a substitute for the upstream suite. The only React-parity evidence on this package is the bounded differential Vitest project (`react-day-picker-differential`). Repo-authored DOM, SSR, and browser smoke projects stay under ordinary ownership outside `adaptedRuntimeSummary`. Provenance verification remains `recorded-unverified`.
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@octanejs/day-picker",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"./src/style.css",
|
|
8
|
+
"./src/style.module.css"
|
|
9
|
+
],
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=22.22.2"
|
|
12
|
+
},
|
|
13
|
+
"description": "React DayPicker-compatible calendar components for Octane.",
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "Dominic Gannaway",
|
|
16
|
+
"email": "dg@domgan.com"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/octanejs/octane.git",
|
|
24
|
+
"directory": "packages/day-picker"
|
|
25
|
+
},
|
|
26
|
+
"main": "src/index.ts",
|
|
27
|
+
"module": "src/index.ts",
|
|
28
|
+
"types": "src/index.ts",
|
|
29
|
+
"files": [
|
|
30
|
+
"src",
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"README.md",
|
|
33
|
+
"UPSTREAM.md",
|
|
34
|
+
"status.json"
|
|
35
|
+
],
|
|
36
|
+
"exports": {
|
|
37
|
+
".": "./src/index.ts",
|
|
38
|
+
"./locale": "./src/locale.ts",
|
|
39
|
+
"./locale/*": "./src/locale/*.ts",
|
|
40
|
+
"./style": "./src/style.css",
|
|
41
|
+
"./style.css": "./src/style.css",
|
|
42
|
+
"./style.module": "./src/style.module.css",
|
|
43
|
+
"./style.module.css": "./src/style.module.css",
|
|
44
|
+
"./src/style.css": "./src/style.css",
|
|
45
|
+
"./src/style.module.css": "./src/style.module.css",
|
|
46
|
+
"./dist/style.css": "./src/style.css",
|
|
47
|
+
"./dist/style.module.css": "./src/style.module.css",
|
|
48
|
+
"./package.json": "./package.json"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@date-fns/tz": "^1.4.1",
|
|
52
|
+
"date-fns": "^4.1.0"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"octane": "0.1.35"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@tsrx/react": "^0.2.56",
|
|
59
|
+
"@types/react": "^19.2.17",
|
|
60
|
+
"@types/react-dom": "^19.2.3",
|
|
61
|
+
"playwright": "^1.61.1",
|
|
62
|
+
"react": "^19.2.7",
|
|
63
|
+
"react-dom": "^19.2.7",
|
|
64
|
+
"react-day-picker": "10.0.1",
|
|
65
|
+
"typescript": "^5.9.3",
|
|
66
|
+
"vite": "^8.1.5",
|
|
67
|
+
"vitest": "^4.1.10",
|
|
68
|
+
"@octanejs/testing-library": "0.1.32",
|
|
69
|
+
"octane": "0.1.35"
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"test": "pnpm upstream:check && vitest run --root ../.. --project day-picker --project day-picker-ssr --project day-picker-browser --project day-picker-differential",
|
|
73
|
+
"parity:inventory": "node ../../scripts/react-parity/react-day-picker-runtime-inventory.mjs",
|
|
74
|
+
"upstream:check": "node audit/check-upstream.mjs",
|
|
75
|
+
"typecheck": "tsrx-tsc --noEmit -p tsconfig.json"
|
|
76
|
+
}
|
|
77
|
+
}
|