chrona-react 0.3.3 → 0.3.5
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/README.md +7 -2
- package/dist/calendar.js +1 -1
- package/dist/{chunk-GXQA645Q.js → chunk-46JUKHI4.js} +2 -2
- package/dist/{chunk-YMCXDNWB.js → chunk-GKDS2FHE.js} +2 -2
- package/dist/{chunk-I46LC4EZ.js → chunk-OXTZ4Q67.js} +13 -1
- package/dist/chunk-OXTZ4Q67.js.map +1 -0
- package/dist/date-field.d.ts +2 -2
- package/dist/date-picker.d.ts +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/index.js +3 -3
- package/dist/range-calendar.js +2 -2
- package/dist/time-field.d.ts +2 -2
- package/package.json +2 -2
- package/dist/chunk-I46LC4EZ.js.map +0 -1
- /package/dist/{chunk-GXQA645Q.js.map → chunk-46JUKHI4.js.map} +0 -0
- /package/dist/{chunk-YMCXDNWB.js.map → chunk-GKDS2FHE.js.map} +0 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ values, no free-form date parsing, and no CSS — you own every pixel.
|
|
|
6
6
|
Part of [Chrona](https://github.com/devlinduldulao/chrona). Built on
|
|
7
7
|
[`chrona-core`](https://www.npmjs.com/package/chrona-core).
|
|
8
8
|
|
|
9
|
-
> **Status: experimental 0.3.
|
|
9
|
+
> **Status: experimental 0.3.5.** Public APIs and styling attributes are not
|
|
10
10
|
> frozen for v1. 0.3.0 changes when a field reports a value and leaves `today`
|
|
11
11
|
> to the client; 0.2.0 changed the Calendar cell anatomy. See the
|
|
12
12
|
> [changelog](./CHANGELOG.md). Automated axe checks pass, but no screen-reader
|
|
@@ -299,7 +299,9 @@ import { DatePicker } from "chrona-react";
|
|
|
299
299
|
## Notes
|
|
300
300
|
|
|
301
301
|
- ESM with declarations and source maps, targeting ES2022.
|
|
302
|
-
- Size budgets, minified + gzip, excluding React: Calendar
|
|
302
|
+
- Size budgets, minified + gzip, excluding React: Calendar 7 kB, DatePicker 13 kB.
|
|
303
|
+
Raised from 6/12 in 0.3.4; the additions were hydration-safe `today`, soft-keyboard
|
|
304
|
+
input, cross-implementation diagnostics and accurate spinbutton ranges.
|
|
303
305
|
- Blank segments read `mm/dd/yyyy` and `hh:mm`; filled numeric segments except
|
|
304
306
|
the year are zero-padded, so a field keeps one width as it fills.
|
|
305
307
|
- Typed digits are literal and stepping clamps: 29 February is reachable before
|
|
@@ -418,6 +420,9 @@ focused cell, and at a month boundary the whole grid, will not match, and React
|
|
|
418
420
|
reports a hydration mismatch it cannot patch up. Supply `placeholderValue` (or
|
|
419
421
|
a value) on any calendar that is server-rendered.
|
|
420
422
|
|
|
423
|
+
A development build says so once, from the server render, rather than letting
|
|
424
|
+
the mismatch ship quietly. A client-rendered app never sees it.
|
|
425
|
+
|
|
421
426
|
### Segments report once
|
|
422
427
|
|
|
423
428
|
A `DateField` segment is a draft until its last digit lands. Typing `2026` calls
|
package/dist/calendar.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
Calendar,
|
|
4
4
|
CalendarSurface,
|
|
5
5
|
useCalendar
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OXTZ4Q67.js";
|
|
7
7
|
import {
|
|
8
8
|
Part,
|
|
9
9
|
composeEvent,
|
|
@@ -117,4 +117,4 @@ export {
|
|
|
117
117
|
useRangeCalendar,
|
|
118
118
|
RangeCalendar
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-46JUKHI4.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-RTDRFDYG.js";
|
|
5
5
|
import {
|
|
6
6
|
Calendar
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OXTZ4Q67.js";
|
|
8
8
|
import {
|
|
9
9
|
Part,
|
|
10
10
|
composeEvent,
|
|
@@ -217,4 +217,4 @@ export {
|
|
|
217
217
|
useDatePicker,
|
|
218
218
|
DatePicker
|
|
219
219
|
};
|
|
220
|
-
//# sourceMappingURL=chunk-
|
|
220
|
+
//# sourceMappingURL=chunk-GKDS2FHE.js.map
|
|
@@ -17,8 +17,20 @@ function useToday(options) {
|
|
|
17
17
|
const iso = React.useSyncExternalStore(noStoreUpdates, () => temporal().Now.plainDateISO(options.timeZone).toString(), noServerToday);
|
|
18
18
|
return options.today ?? (iso === null ? void 0 : temporal().PlainDate.from(iso));
|
|
19
19
|
}
|
|
20
|
+
var warnedAboutAnchor = false;
|
|
21
|
+
function warnWithoutAnchor(anchored) {
|
|
22
|
+
if (anchored || warnedAboutAnchor || typeof window !== "undefined") return;
|
|
23
|
+
if (typeof process === "undefined" || process.env?.NODE_ENV === "production") return;
|
|
24
|
+
warnedAboutAnchor = true;
|
|
25
|
+
console.warn(
|
|
26
|
+
"[chrona] A server-rendered Calendar has no value, defaultValue, focusedValue, defaultFocusedValue or placeholderValue, so it opens on whichever day the renderer thinks it is. The server and the reader can disagree, and React will not patch that up. Give it a placeholderValue."
|
|
27
|
+
);
|
|
28
|
+
}
|
|
20
29
|
function useCalendar(props = {}) {
|
|
21
30
|
const options = useChronaConfig(props);
|
|
31
|
+
warnWithoutAnchor(
|
|
32
|
+
props.value !== void 0 || props.defaultValue !== void 0 || props.focusedValue !== void 0 || props.defaultFocusedValue !== void 0 || options.placeholderValue !== void 0
|
|
33
|
+
);
|
|
22
34
|
const generatedId = React.useId();
|
|
23
35
|
const id = props.id ?? generatedId;
|
|
24
36
|
const [store] = React.useState(() => createStore(createCalendar({ ...options, value: props.value !== void 0 ? props.value : props.defaultValue, focusedValue: props.focusedValue ?? props.defaultFocusedValue })));
|
|
@@ -174,4 +186,4 @@ export {
|
|
|
174
186
|
CalendarSurface,
|
|
175
187
|
Calendar
|
|
176
188
|
};
|
|
177
|
-
//# sourceMappingURL=chunk-
|
|
189
|
+
//# sourceMappingURL=chunk-OXTZ4Q67.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/calendar.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { calendarKeys, connectCalendar, createCalendar, createStore, formatDate, getNumberFormatter, resolveWeekStart, sameDate, syncCalendar, temporal, transitionCalendar, translations, weeksInMonthView, type CalendarEvent, type CalendarOptions, type PlainDate } from \"chrona-core\";\nimport { Part, composeEvent, type PartProps } from \"./part\";\nimport { useChronaConfig } from \"./provider\";\nimport { useFormReset, type HiddenInputProps } from \"./form\";\n\nexport interface CalendarProps extends CalendarOptions {\n defaultValue?: PlainDate | null;\n defaultFocusedValue?: PlainDate;\n onChange?: (value: PlainDate | null) => void;\n onSelect?: (value: PlainDate) => void;\n onFocusedValueChange?: (value: PlainDate) => void;\n id?: string;\n}\n\n/**\n * `today` depends on when and where the page is rendered, so a server render — including a page\n * prerendered at build time and served days later — cannot know the reader's. Resolving it through\n * `useSyncExternalStore` keeps the hydrating markup identical to the server's (no marker) and lets\n * React correct it right after, instead of leaving the server's day marked for good. Applications\n * that need the marker in the server HTML pass `today` themselves.\n */\nconst noStoreUpdates = () => () => {};\nconst noServerToday = () => null;\nfunction useToday(options: CalendarOptions): PlainDate | undefined {\n const iso = React.useSyncExternalStore(noStoreUpdates, () => temporal().Now.plainDateISO(options.timeZone).toString(), noServerToday);\n return options.today ?? (iso === null ? undefined : temporal().PlainDate.from(iso));\n}\n\n/**\n * A calendar with nothing to anchor on opens on the month of *its own* today —\n * the server's on the server, the reader's in the browser — and React cannot\n * patch up the mismatch that follows when those differ. Nothing in the library\n * can fix that; only a reference date can. So say so, once, on the server, where\n * it is actually a problem: a client-rendered app never sees this.\n */\nlet warnedAboutAnchor = false;\n\nfunction warnWithoutAnchor(anchored: boolean): void {\n if (anchored || warnedAboutAnchor || typeof window !== \"undefined\") return;\n if (typeof process === \"undefined\" || process.env?.NODE_ENV === \"production\") return;\n warnedAboutAnchor = true;\n console.warn(\n \"[chrona] A server-rendered Calendar has no value, defaultValue, focusedValue, defaultFocusedValue or placeholderValue, so it opens on whichever day the renderer thinks it is. The server and the reader can disagree, and React will not patch that up. Give it a placeholderValue.\",\n );\n}\n\nexport function useCalendar(props: CalendarProps = {}) {\n const options = useChronaConfig(props);\n warnWithoutAnchor(\n props.value !== undefined || props.defaultValue !== undefined || props.focusedValue !== undefined\n || props.defaultFocusedValue !== undefined || options.placeholderValue !== undefined,\n );\n const generatedId = React.useId();\n const id = props.id ?? generatedId;\n const [store] = React.useState(() => createStore(createCalendar({ ...options, value: props.value !== undefined ? props.value : props.defaultValue, focusedValue: props.focusedValue ?? props.defaultFocusedValue })));\n const snapshot = React.useSyncExternalStore(store.subscribe, store.getSnapshot, store.getServerSnapshot);\n // The store is the single source of truth; controlled props are reconciled into it by syncCalendar.\n const state = syncCalendar(snapshot, { ...options, value: props.value, focusedValue: props.focusedValue });\n React.useEffect(() => { store.setState(state); });\n const today = useToday(options);\n const rootRef = React.useRef<HTMLElement | null>(null);\n const pendingFocus = React.useRef(false);\n const [announcement, setAnnouncement] = React.useState(\"\");\n\n React.useEffect(() => {\n if (pendingFocus.current) {\n pendingFocus.current = false;\n rootRef.current?.querySelector<HTMLElement>('[data-part=\"cell-trigger\"][tabindex=\"0\"]')?.focus();\n }\n });\n\n function send(event: CalendarEvent) {\n const dir = options.dir ?? (rootRef.current?.closest(\"[dir]\")?.getAttribute(\"dir\") === \"rtl\" ? \"rtl\" : \"ltr\");\n const result = transitionCalendar(state, event, { ...options, dir });\n store.setState(result.state);\n for (const effect of result.effects) {\n if (effect.type === \"focus\") {\n pendingFocus.current = true;\n if (!sameDate(effect.value, state.focusedValue)) props.onFocusedValueChange?.(effect.value);\n } else if (effect.type === \"change\") {\n props.onChange?.(effect.value);\n setAnnouncement(effect.value ? (options.translations?.selected ?? translations.selected)(formatDate(effect.value, options.locale, { dateStyle: \"full\" })) : \"\");\n } else {\n props.onSelect?.(effect.value);\n }\n }\n }\n\n return {\n state, options, send, rootRef, announcement,\n api: connectCalendar(state, { ...options, id, today }),\n months: Array.from({ length: options.numberOfMonths ?? 1 }, (_, index) => state.visibleMonth.add({ months: index })),\n };\n}\n\ntype CalendarContextValue = ReturnType<typeof useCalendar>;\nconst Context = React.createContext<CalendarContextValue | null>(null);\nconst MonthContext = React.createContext<PlainDate | null>(null);\n\nfunction useContext() {\n const value = React.useContext(Context);\n if (!value) throw new Error(\"Calendar parts must be inside Calendar.Root.\");\n return value;\n}\n\nexport function CalendarRoot({ children, asChild, className, style, ...props }: CalendarProps & Pick<PartProps, \"children\" | \"asChild\" | \"className\" | \"style\">) {\n const calendar = useCalendar(props);\n return <CalendarSurface calendar={calendar} id={props.id} asChild={asChild} className={className} style={style}>{children}</CalendarSurface>;\n}\n\nexport function CalendarSurface({ calendar, ...props }: PartProps & { calendar: CalendarContextValue }) {\n return <Context.Provider value={calendar}><Part {...calendar.api.getRootProps()} {...props} ref={calendar.rootRef} /></Context.Provider>;\n}\n\nconst Header = React.forwardRef<HTMLElement, PartProps>(function Header(props, ref) {\n return <Part {...props} ref={ref} data-scope=\"calendar\" data-part=\"header\" />;\n});\n\nconst Heading = React.forwardRef<HTMLElement, PartProps>(function Heading({ children, ...props }, ref) {\n const { months, options } = useContext();\n const month = React.useContext(MonthContext);\n return <Part as=\"h2\" {...props} ref={ref} data-scope=\"calendar\" data-part=\"heading\" aria-live=\"polite\" aria-atomic=\"true\">{children ?? (month ? [month] : months).map((date) => formatDate(date, options.locale, { month: \"long\", year: \"numeric\" })).join(options.translations?.rangeSeparator ?? translations.rangeSeparator)}</Part>;\n});\n\ntype ButtonProps = React.ComponentPropsWithoutRef<\"button\"> & { asChild?: boolean };\n\n/**\n * Paging buttons carry an `aria-label` but no text, so without a default they render as blank\n * chrome for sighted users. The arrow points the way the button pages in the resolved direction.\n */\nfunction Chevron({ towards }: { towards: \"start\" | \"end\" }) {\n const points = towards === \"start\" ? \"15 4 7 12 15 20\" : \"9 4 17 12 9 20\";\n return <svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 24 24\" width=\"1em\" height=\"1em\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" data-scope=\"calendar\" data-part=\"chevron\"><polyline points={points} /></svg>;\n}\n\nconst PrevButton = React.forwardRef<HTMLElement, ButtonProps>(function PrevButton({ onClick, children, ...props }, ref) {\n const { api, send, options } = useContext();\n return <Part as=\"button\" {...props} {...api.getPrevButtonProps()} ref={ref} onClick={composeEvent(onClick, () => send({ type: \"PAGE\", direction: -1 }))}>{children ?? <Chevron towards={options.dir === \"rtl\" ? \"end\" : \"start\"} />}</Part>;\n});\n\nconst NextButton = React.forwardRef<HTMLElement, ButtonProps>(function NextButton({ onClick, children, ...props }, ref) {\n const { api, send, options } = useContext();\n return <Part as=\"button\" {...props} {...api.getNextButtonProps()} ref={ref} onClick={composeEvent(onClick, () => send({ type: \"PAGE\", direction: 1 }))}>{children ?? <Chevron towards={options.dir === \"rtl\" ? \"start\" : \"end\"} />}</Part>;\n});\n\nconst Grid = React.forwardRef<HTMLElement, PartProps & { monthIndex?: number }>(function Grid({ monthIndex = 0, children, ...props }, ref) {\n const { api, months } = useContext();\n const month = months[monthIndex];\n if (!month) throw new Error(\"Calendar.Grid monthIndex is outside numberOfMonths.\");\n return <MonthContext.Provider value={month}><Part {...props} {...api.getGridProps(month)} ref={ref}>{children}</Part></MonthContext.Provider>;\n});\n\nfunction useMonth() {\n const context = useContext();\n const month = React.useContext(MonthContext) ?? context.state.visibleMonth;\n return { ...context, month, weeks: weeksInMonthView(month.toPlainYearMonth(), resolveWeekStart(context.options.locale, context.options.firstDayOfWeek), context.options.fixedWeeks) };\n}\n\nexport interface Weekday { date: PlainDate; label: string }\n\nconst GridHeader = React.forwardRef<HTMLElement, Omit<PartProps, \"children\"> & { children?: (day: Weekday) => React.ReactNode }>(function GridHeader({ children, ...props }, ref) {\n const { weeks, options } = useMonth();\n return <Part {...props} ref={ref} role=\"row\" data-scope=\"calendar\" data-part=\"grid-header\">{weeks[0]!.map((date) => {\n const day = { date, label: formatDate(date, options.locale, { weekday: \"short\" }) };\n return <React.Fragment key={date.toString()}>{children ? children(day) : <HeaderCell day={day} />}</React.Fragment>;\n })}</Part>;\n});\n\nconst HeaderCell = React.forwardRef<HTMLElement, PartProps & { day: Weekday }>(function HeaderCell({ day, children, ...props }, ref) {\n const { options } = useContext();\n return <Part {...props} ref={ref} role=\"columnheader\" aria-label={formatDate(day.date, options.locale, { weekday: \"long\" })} data-scope=\"calendar\" data-part=\"header-cell\">{children ?? day.label}</Part>;\n});\n\nconst GridBody = React.forwardRef<HTMLElement, Omit<PartProps, \"children\"> & { children?: (date: PlainDate) => React.ReactNode }>(function GridBody({ children, ...props }, ref) {\n const { weeks } = useMonth();\n return <Part {...props} ref={ref} role=\"rowgroup\" data-scope=\"calendar\" data-part=\"grid-body\">{weeks.map((week) => <div key={week[0]!.toString()} role=\"row\" data-scope=\"calendar\" data-part=\"row\">{week.map((date) => <React.Fragment key={date.toString()}>{children ? children(date) : <Cell date={date} />}</React.Fragment>)}</div>)}</Part>;\n});\n\nconst CellContext = React.createContext<PlainDate | null>(null);\n\nconst CellTrigger = React.forwardRef<HTMLElement, ButtonProps>(function CellTrigger({ children, onClick, onKeyDown, onFocus, ...props }, ref) {\n const { api, send, month, options } = useMonth();\n const date = React.useContext(CellContext);\n if (!date) throw new Error(\"Calendar.CellTrigger must be inside Calendar.Cell.\");\n // aria-disabled instead of native disabled keeps out-of-range dates discoverable by screen readers.\n return <Part as=\"button\" {...props} {...api.getCellTriggerProps(date, month)} ref={ref}\n onFocus={composeEvent(onFocus, () => { if (!options.disabled) send({ type: \"FOCUS\", date }); })}\n onClick={composeEvent(onClick, () => send({ type: \"SELECT\", date }))}\n onKeyDown={composeEvent(onKeyDown, (event) => {\n if (!calendarKeys.has(event.key) || event.altKey || event.ctrlKey || event.metaKey) return;\n event.preventDefault();\n send({ type: \"KEY_DOWN\", key: event.key, shiftKey: event.shiftKey });\n })}>{children ?? getNumberFormatter(options.locale, { useGrouping: false }).format(date.day)}</Part>;\n});\n\n/** The grid semantics live on the cell; the button inside it stays a button. */\nconst Cell = React.forwardRef<HTMLElement, PartProps & { date: PlainDate }>(function Cell({ date, children, ...props }, ref) {\n const { api, month } = useMonth();\n return <CellContext.Provider value={date}><Part {...props} {...api.getCellProps(date, month)} ref={ref}>{children ?? <CellTrigger />}</Part></CellContext.Provider>;\n});\n\nconst LiveRegion = React.forwardRef<HTMLElement, PartProps>(function LiveRegion(props, ref) {\n const { announcement } = useContext();\n return <Part {...props} ref={ref} role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" data-scope=\"calendar\" data-part=\"live-region\">{announcement}</Part>;\n});\n\nconst ClearButton = React.forwardRef<HTMLElement, ButtonProps>(function ClearButton({ onClick, ...props }, ref) {\n const { options, send, state } = useContext();\n return <Part as=\"button\" {...props} ref={ref} type=\"button\" data-scope=\"calendar\" data-part=\"clear-button\" aria-label={options.translations?.clear ?? translations.clear} disabled={options.disabled || options.readOnly || state.value === null} onClick={composeEvent(onClick, () => send({ type: \"CLEAR\" }))} />;\n});\n\nfunction HiddenInput(props: HiddenInputProps) {\n const { state, options, send } = useContext();\n const input = React.useRef<HTMLInputElement>(null);\n useFormReset(input, props.form, () => send({ type: \"RESET\", value: options.defaultValue ?? null }));\n return <input {...props} ref={input} type=\"hidden\" disabled={options.disabled || props.disabled} value={state.value?.toString() ?? \"\"} data-scope=\"calendar\" data-part=\"hidden-input\" />;\n}\n\nexport const Calendar = { Root: CalendarRoot, Header, Heading, PrevButton, NextButton, Grid, GridHeader, HeaderCell, GridBody, Cell, CellTrigger, LiveRegion, ClearButton, HiddenInput };"],"mappings":";;;;;;;;;AAAA,YAAY,WAAW;AACvB,SAAS,cAAc,iBAAiB,gBAAgB,aAAa,YAAY,oBAAoB,kBAAkB,UAAU,cAAc,UAAU,oBAAoB,cAAc,wBAAkF;AA2GlQ;AAtFX,IAAM,iBAAiB,MAAM,MAAM;AAAC;AACpC,IAAM,gBAAgB,MAAM;AAC5B,SAAS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AAa,YAAY,aAAa,YAAY;","names":["useContext","Header","Heading","PrevButton","NextButton","Grid","GridHeader","HeaderCell","GridBody","CellTrigger","Cell","LiveRegion","ClearButton"]}
|
package/dist/date-field.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ import { F as FieldProps } from './field-DayikvR6.js';
|
|
|
5
5
|
|
|
6
6
|
type DateFieldProps = FieldProps<"date">;
|
|
7
7
|
declare const DateField: {
|
|
8
|
-
Root: ({ children, asChild, className, style, ...props }: FieldProps<"date"> & Pick<PartProps, "
|
|
8
|
+
Root: ({ children, asChild, className, style, ...props }: FieldProps<"date"> & Pick<PartProps, "children" | "asChild" | "className" | "style">) => React.JSX.Element;
|
|
9
9
|
Label: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
} & React.RefAttributes<HTMLElement>>;
|
|
12
12
|
Field: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
13
13
|
asChild?: boolean;
|
|
14
14
|
} & React.RefAttributes<HTMLElement>>;
|
|
15
|
-
Segment: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
15
|
+
Segment: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "children" | "defaultValue" | "onChange" | "value" | "type"> & {
|
|
16
16
|
type: chrona_core.SegmentType;
|
|
17
17
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
18
18
|
HiddenInput: (props: HiddenInputProps) => React.JSX.Element;
|
package/dist/date-picker.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ declare const DatePicker: {
|
|
|
47
47
|
Field: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
48
48
|
asChild?: boolean;
|
|
49
49
|
} & React.RefAttributes<HTMLElement>>;
|
|
50
|
-
Segment: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
50
|
+
Segment: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "children" | "defaultValue" | "onChange" | "value" | "type"> & {
|
|
51
51
|
type: chrona_core.SegmentType;
|
|
52
52
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
53
53
|
HiddenInput: (props: HiddenInputProps) => React.JSX.Element;
|
package/dist/date-picker.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
DatePicker,
|
|
4
4
|
useDatePicker
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GKDS2FHE.js";
|
|
6
6
|
import "./chunk-RTDRFDYG.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-OXTZ4Q67.js";
|
|
8
8
|
import "./chunk-27APJXNX.js";
|
|
9
9
|
import "./chunk-SDDSKOYU.js";
|
|
10
10
|
export {
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
DatePicker,
|
|
4
4
|
useDatePicker
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GKDS2FHE.js";
|
|
6
6
|
import {
|
|
7
7
|
DateField,
|
|
8
8
|
useDateField
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
RangeCalendar,
|
|
12
12
|
useRangeCalendar
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-46JUKHI4.js";
|
|
14
14
|
import {
|
|
15
15
|
Calendar,
|
|
16
16
|
CalendarRoot,
|
|
17
17
|
useCalendar
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OXTZ4Q67.js";
|
|
19
19
|
import {
|
|
20
20
|
TimeField,
|
|
21
21
|
useTimeField
|
package/dist/range-calendar.js
CHANGED
package/dist/time-field.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ import { F as FieldProps } from './field-DayikvR6.js';
|
|
|
5
5
|
|
|
6
6
|
type TimeFieldProps = FieldProps<"time">;
|
|
7
7
|
declare const TimeField: {
|
|
8
|
-
Root: ({ children, asChild, className, style, ...props }: FieldProps<"time"> & Pick<PartProps, "
|
|
8
|
+
Root: ({ children, asChild, className, style, ...props }: FieldProps<"time"> & Pick<PartProps, "children" | "asChild" | "className" | "style">) => React.JSX.Element;
|
|
9
9
|
Label: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
} & React.RefAttributes<HTMLElement>>;
|
|
12
12
|
Field: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
13
13
|
asChild?: boolean;
|
|
14
14
|
} & React.RefAttributes<HTMLElement>>;
|
|
15
|
-
Segment: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
15
|
+
Segment: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "children" | "defaultValue" | "onChange" | "value" | "type"> & {
|
|
16
16
|
type: chrona_core.SegmentType;
|
|
17
17
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
18
18
|
HiddenInput: (props: HiddenInputProps) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrona-react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Headless Temporal-native React date and time primitives",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"chrona-core": "^0.3.
|
|
64
|
+
"chrona-core": "^0.3.5"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"react": ">=18.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/calendar.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { calendarKeys, connectCalendar, createCalendar, createStore, formatDate, getNumberFormatter, resolveWeekStart, sameDate, syncCalendar, temporal, transitionCalendar, translations, weeksInMonthView, type CalendarEvent, type CalendarOptions, type PlainDate } from \"chrona-core\";\nimport { Part, composeEvent, type PartProps } from \"./part\";\nimport { useChronaConfig } from \"./provider\";\nimport { useFormReset, type HiddenInputProps } from \"./form\";\n\nexport interface CalendarProps extends CalendarOptions {\n defaultValue?: PlainDate | null;\n defaultFocusedValue?: PlainDate;\n onChange?: (value: PlainDate | null) => void;\n onSelect?: (value: PlainDate) => void;\n onFocusedValueChange?: (value: PlainDate) => void;\n id?: string;\n}\n\n/**\n * `today` depends on when and where the page is rendered, so a server render — including a page\n * prerendered at build time and served days later — cannot know the reader's. Resolving it through\n * `useSyncExternalStore` keeps the hydrating markup identical to the server's (no marker) and lets\n * React correct it right after, instead of leaving the server's day marked for good. Applications\n * that need the marker in the server HTML pass `today` themselves.\n */\nconst noStoreUpdates = () => () => {};\nconst noServerToday = () => null;\nfunction useToday(options: CalendarOptions): PlainDate | undefined {\n const iso = React.useSyncExternalStore(noStoreUpdates, () => temporal().Now.plainDateISO(options.timeZone).toString(), noServerToday);\n return options.today ?? (iso === null ? undefined : temporal().PlainDate.from(iso));\n}\n\nexport function useCalendar(props: CalendarProps = {}) {\n const options = useChronaConfig(props);\n const generatedId = React.useId();\n const id = props.id ?? generatedId;\n const [store] = React.useState(() => createStore(createCalendar({ ...options, value: props.value !== undefined ? props.value : props.defaultValue, focusedValue: props.focusedValue ?? props.defaultFocusedValue })));\n const snapshot = React.useSyncExternalStore(store.subscribe, store.getSnapshot, store.getServerSnapshot);\n // The store is the single source of truth; controlled props are reconciled into it by syncCalendar.\n const state = syncCalendar(snapshot, { ...options, value: props.value, focusedValue: props.focusedValue });\n React.useEffect(() => { store.setState(state); });\n const today = useToday(options);\n const rootRef = React.useRef<HTMLElement | null>(null);\n const pendingFocus = React.useRef(false);\n const [announcement, setAnnouncement] = React.useState(\"\");\n\n React.useEffect(() => {\n if (pendingFocus.current) {\n pendingFocus.current = false;\n rootRef.current?.querySelector<HTMLElement>('[data-part=\"cell-trigger\"][tabindex=\"0\"]')?.focus();\n }\n });\n\n function send(event: CalendarEvent) {\n const dir = options.dir ?? (rootRef.current?.closest(\"[dir]\")?.getAttribute(\"dir\") === \"rtl\" ? \"rtl\" : \"ltr\");\n const result = transitionCalendar(state, event, { ...options, dir });\n store.setState(result.state);\n for (const effect of result.effects) {\n if (effect.type === \"focus\") {\n pendingFocus.current = true;\n if (!sameDate(effect.value, state.focusedValue)) props.onFocusedValueChange?.(effect.value);\n } else if (effect.type === \"change\") {\n props.onChange?.(effect.value);\n setAnnouncement(effect.value ? (options.translations?.selected ?? translations.selected)(formatDate(effect.value, options.locale, { dateStyle: \"full\" })) : \"\");\n } else {\n props.onSelect?.(effect.value);\n }\n }\n }\n\n return {\n state, options, send, rootRef, announcement,\n api: connectCalendar(state, { ...options, id, today }),\n months: Array.from({ length: options.numberOfMonths ?? 1 }, (_, index) => state.visibleMonth.add({ months: index })),\n };\n}\n\ntype CalendarContextValue = ReturnType<typeof useCalendar>;\nconst Context = React.createContext<CalendarContextValue | null>(null);\nconst MonthContext = React.createContext<PlainDate | null>(null);\n\nfunction useContext() {\n const value = React.useContext(Context);\n if (!value) throw new Error(\"Calendar parts must be inside Calendar.Root.\");\n return value;\n}\n\nexport function CalendarRoot({ children, asChild, className, style, ...props }: CalendarProps & Pick<PartProps, \"children\" | \"asChild\" | \"className\" | \"style\">) {\n const calendar = useCalendar(props);\n return <CalendarSurface calendar={calendar} id={props.id} asChild={asChild} className={className} style={style}>{children}</CalendarSurface>;\n}\n\nexport function CalendarSurface({ calendar, ...props }: PartProps & { calendar: CalendarContextValue }) {\n return <Context.Provider value={calendar}><Part {...calendar.api.getRootProps()} {...props} ref={calendar.rootRef} /></Context.Provider>;\n}\n\nconst Header = React.forwardRef<HTMLElement, PartProps>(function Header(props, ref) {\n return <Part {...props} ref={ref} data-scope=\"calendar\" data-part=\"header\" />;\n});\n\nconst Heading = React.forwardRef<HTMLElement, PartProps>(function Heading({ children, ...props }, ref) {\n const { months, options } = useContext();\n const month = React.useContext(MonthContext);\n return <Part as=\"h2\" {...props} ref={ref} data-scope=\"calendar\" data-part=\"heading\" aria-live=\"polite\" aria-atomic=\"true\">{children ?? (month ? [month] : months).map((date) => formatDate(date, options.locale, { month: \"long\", year: \"numeric\" })).join(options.translations?.rangeSeparator ?? translations.rangeSeparator)}</Part>;\n});\n\ntype ButtonProps = React.ComponentPropsWithoutRef<\"button\"> & { asChild?: boolean };\n\n/**\n * Paging buttons carry an `aria-label` but no text, so without a default they render as blank\n * chrome for sighted users. The arrow points the way the button pages in the resolved direction.\n */\nfunction Chevron({ towards }: { towards: \"start\" | \"end\" }) {\n const points = towards === \"start\" ? \"15 4 7 12 15 20\" : \"9 4 17 12 9 20\";\n return <svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 24 24\" width=\"1em\" height=\"1em\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" data-scope=\"calendar\" data-part=\"chevron\"><polyline points={points} /></svg>;\n}\n\nconst PrevButton = React.forwardRef<HTMLElement, ButtonProps>(function PrevButton({ onClick, children, ...props }, ref) {\n const { api, send, options } = useContext();\n return <Part as=\"button\" {...props} {...api.getPrevButtonProps()} ref={ref} onClick={composeEvent(onClick, () => send({ type: \"PAGE\", direction: -1 }))}>{children ?? <Chevron towards={options.dir === \"rtl\" ? \"end\" : \"start\"} />}</Part>;\n});\n\nconst NextButton = React.forwardRef<HTMLElement, ButtonProps>(function NextButton({ onClick, children, ...props }, ref) {\n const { api, send, options } = useContext();\n return <Part as=\"button\" {...props} {...api.getNextButtonProps()} ref={ref} onClick={composeEvent(onClick, () => send({ type: \"PAGE\", direction: 1 }))}>{children ?? <Chevron towards={options.dir === \"rtl\" ? \"start\" : \"end\"} />}</Part>;\n});\n\nconst Grid = React.forwardRef<HTMLElement, PartProps & { monthIndex?: number }>(function Grid({ monthIndex = 0, children, ...props }, ref) {\n const { api, months } = useContext();\n const month = months[monthIndex];\n if (!month) throw new Error(\"Calendar.Grid monthIndex is outside numberOfMonths.\");\n return <MonthContext.Provider value={month}><Part {...props} {...api.getGridProps(month)} ref={ref}>{children}</Part></MonthContext.Provider>;\n});\n\nfunction useMonth() {\n const context = useContext();\n const month = React.useContext(MonthContext) ?? context.state.visibleMonth;\n return { ...context, month, weeks: weeksInMonthView(month.toPlainYearMonth(), resolveWeekStart(context.options.locale, context.options.firstDayOfWeek), context.options.fixedWeeks) };\n}\n\nexport interface Weekday { date: PlainDate; label: string }\n\nconst GridHeader = React.forwardRef<HTMLElement, Omit<PartProps, \"children\"> & { children?: (day: Weekday) => React.ReactNode }>(function GridHeader({ children, ...props }, ref) {\n const { weeks, options } = useMonth();\n return <Part {...props} ref={ref} role=\"row\" data-scope=\"calendar\" data-part=\"grid-header\">{weeks[0]!.map((date) => {\n const day = { date, label: formatDate(date, options.locale, { weekday: \"short\" }) };\n return <React.Fragment key={date.toString()}>{children ? children(day) : <HeaderCell day={day} />}</React.Fragment>;\n })}</Part>;\n});\n\nconst HeaderCell = React.forwardRef<HTMLElement, PartProps & { day: Weekday }>(function HeaderCell({ day, children, ...props }, ref) {\n const { options } = useContext();\n return <Part {...props} ref={ref} role=\"columnheader\" aria-label={formatDate(day.date, options.locale, { weekday: \"long\" })} data-scope=\"calendar\" data-part=\"header-cell\">{children ?? day.label}</Part>;\n});\n\nconst GridBody = React.forwardRef<HTMLElement, Omit<PartProps, \"children\"> & { children?: (date: PlainDate) => React.ReactNode }>(function GridBody({ children, ...props }, ref) {\n const { weeks } = useMonth();\n return <Part {...props} ref={ref} role=\"rowgroup\" data-scope=\"calendar\" data-part=\"grid-body\">{weeks.map((week) => <div key={week[0]!.toString()} role=\"row\" data-scope=\"calendar\" data-part=\"row\">{week.map((date) => <React.Fragment key={date.toString()}>{children ? children(date) : <Cell date={date} />}</React.Fragment>)}</div>)}</Part>;\n});\n\nconst CellContext = React.createContext<PlainDate | null>(null);\n\nconst CellTrigger = React.forwardRef<HTMLElement, ButtonProps>(function CellTrigger({ children, onClick, onKeyDown, onFocus, ...props }, ref) {\n const { api, send, month, options } = useMonth();\n const date = React.useContext(CellContext);\n if (!date) throw new Error(\"Calendar.CellTrigger must be inside Calendar.Cell.\");\n // aria-disabled instead of native disabled keeps out-of-range dates discoverable by screen readers.\n return <Part as=\"button\" {...props} {...api.getCellTriggerProps(date, month)} ref={ref}\n onFocus={composeEvent(onFocus, () => { if (!options.disabled) send({ type: \"FOCUS\", date }); })}\n onClick={composeEvent(onClick, () => send({ type: \"SELECT\", date }))}\n onKeyDown={composeEvent(onKeyDown, (event) => {\n if (!calendarKeys.has(event.key) || event.altKey || event.ctrlKey || event.metaKey) return;\n event.preventDefault();\n send({ type: \"KEY_DOWN\", key: event.key, shiftKey: event.shiftKey });\n })}>{children ?? getNumberFormatter(options.locale, { useGrouping: false }).format(date.day)}</Part>;\n});\n\n/** The grid semantics live on the cell; the button inside it stays a button. */\nconst Cell = React.forwardRef<HTMLElement, PartProps & { date: PlainDate }>(function Cell({ date, children, ...props }, ref) {\n const { api, month } = useMonth();\n return <CellContext.Provider value={date}><Part {...props} {...api.getCellProps(date, month)} ref={ref}>{children ?? <CellTrigger />}</Part></CellContext.Provider>;\n});\n\nconst LiveRegion = React.forwardRef<HTMLElement, PartProps>(function LiveRegion(props, ref) {\n const { announcement } = useContext();\n return <Part {...props} ref={ref} role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" data-scope=\"calendar\" data-part=\"live-region\">{announcement}</Part>;\n});\n\nconst ClearButton = React.forwardRef<HTMLElement, ButtonProps>(function ClearButton({ onClick, ...props }, ref) {\n const { options, send, state } = useContext();\n return <Part as=\"button\" {...props} ref={ref} type=\"button\" data-scope=\"calendar\" data-part=\"clear-button\" aria-label={options.translations?.clear ?? translations.clear} disabled={options.disabled || options.readOnly || state.value === null} onClick={composeEvent(onClick, () => send({ type: \"CLEAR\" }))} />;\n});\n\nfunction HiddenInput(props: HiddenInputProps) {\n const { state, options, send } = useContext();\n const input = React.useRef<HTMLInputElement>(null);\n useFormReset(input, props.form, () => send({ type: \"RESET\", value: options.defaultValue ?? null }));\n return <input {...props} ref={input} type=\"hidden\" disabled={options.disabled || props.disabled} value={state.value?.toString() ?? \"\"} data-scope=\"calendar\" data-part=\"hidden-input\" />;\n}\n\nexport const Calendar = { Root: CalendarRoot, Header, Heading, PrevButton, NextButton, Grid, GridHeader, HeaderCell, GridBody, Cell, CellTrigger, LiveRegion, ClearButton, HiddenInput };"],"mappings":";;;;;;;;;AAAA,YAAY,WAAW;AACvB,SAAS,cAAc,iBAAiB,gBAAgB,aAAa,YAAY,oBAAoB,kBAAkB,UAAU,cAAc,UAAU,oBAAoB,cAAc,wBAAkF;AAqFlQ;AAhEX,IAAM,iBAAiB,MAAM,MAAM;AAAC;AACpC,IAAM,gBAAgB,MAAM;AAC5B,SAAS,SAAS,SAAiD;AAC/D,QAAM,MAAY,2BAAqB,gBAAgB,MAAM,SAAS,EAAE,IAAI,aAAa,QAAQ,QAAQ,EAAE,SAAS,GAAG,aAAa;AACpI,SAAO,QAAQ,UAAU,QAAQ,OAAO,SAAY,SAAS,EAAE,UAAU,KAAK,GAAG;AACrF;AAEO,SAAS,YAAY,QAAuB,CAAC,GAAG;AACnD,QAAM,UAAU,gBAAgB,KAAK;AACrC,QAAM,cAAoB,YAAM;AAChC,QAAM,KAAK,MAAM,MAAM;AACvB,QAAM,CAAC,KAAK,IAAU,eAAS,MAAM,YAAY,eAAe,EAAE,GAAG,SAAS,OAAO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M,QAAQ,CAAC,CAAC,GAAG;AACrT,CAAC;AAED,SAAS,YAAY,OAAyB;AAC1C,QAAM,EAAE,OAAO,SAAS,KAAK,IAAIA,YAAW;AAC5C,QAAM,QAAc,aAAyB,IAAI;AACjD,eAAa,OAAO,MAAM,MAAM,MAAM,KAAK,EAAE,MAAM,SAAS,OAAO,QAAQ,gBAAgB,KAAK,CAAC,CAAC;AAClG,SAAO,oBAAC,WAAO,GAAG,OAAO,KAAK,OAAO,MAAK,UAAS,UAAU,QAAQ,YAAY,MAAM,UAAU,OAAO,MAAM,OAAO,SAAS,KAAK,IAAI,cAAW,YAAW,aAAU,gBAAe;AAC1L;AAEO,IAAM,WAAW,EAAE,MAAM,cAAc,QAAQ,SAAS,YAAY,YAAY,MAAM,YAAY,YAAY,UAAU,MAAM,aAAa,YAAY,aAAa,YAAY;","names":["useContext","Header","Heading","PrevButton","NextButton","Grid","GridHeader","HeaderCell","GridBody","CellTrigger","Cell","LiveRegion","ClearButton"]}
|
|
File without changes
|
|
File without changes
|