chrona-react 0.3.2 → 0.3.4
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 +10 -2
- package/dist/date-field.d.ts +2 -2
- package/dist/date-picker.d.ts +1 -1
- package/dist/time-field.d.ts +2 -2
- package/package.json +2 -2
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.4.** 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
|
|
@@ -128,6 +128,12 @@ A barrel export is also available. Matching hooks — `useCalendar`,
|
|
|
128
128
|
|
|
129
129
|
## Styling And Forms
|
|
130
130
|
|
|
131
|
+
There is a starter stylesheet at
|
|
132
|
+
[`docs/starter.css`](https://github.com/devlinduldulao/chrona/blob/main/docs/starter.css)
|
|
133
|
+
— copy it in and edit it. It styles every part these packages emit, takes its
|
|
134
|
+
colours from eight custom properties, and exists so that the first two hundred
|
|
135
|
+
lines of CSS are not yours to write.
|
|
136
|
+
|
|
131
137
|
Style via `data-scope`, `data-part`, and state attributes: `data-selected`,
|
|
132
138
|
`data-focused`, `data-today`, `data-disabled`, `data-unavailable`,
|
|
133
139
|
`data-outside-month`, `data-in-range`, `data-range-start`, `data-range-end`,
|
|
@@ -293,7 +299,9 @@ import { DatePicker } from "chrona-react";
|
|
|
293
299
|
## Notes
|
|
294
300
|
|
|
295
301
|
- ESM with declarations and source maps, targeting ES2022.
|
|
296
|
-
- 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.
|
|
297
305
|
- Blank segments read `mm/dd/yyyy` and `hh:mm`; filled numeric segments except
|
|
298
306
|
the year are zero-padded, so a field keeps one width as it fills.
|
|
299
307
|
- Typed digits are literal and stepping clamps: 29 February is reachable before
|
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/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.4",
|
|
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.4"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"react": ">=18.0.0",
|