@overdoser/react-toolkit 0.15.0 → 0.17.0

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.
Files changed (41) hide show
  1. package/AGENTS.md +2 -0
  2. package/CHANGELOG.md +87 -0
  3. package/components/Chart/AreaChart.d.ts +5 -1
  4. package/components/Chart/AreaChart.js +155 -144
  5. package/components/Chart/BarChart.js +5 -5
  6. package/components/Chart/PieChart.js +2 -5
  7. package/components/Chart/RadarChart.js +2 -5
  8. package/components/Chart/TradingChart.js +258 -257
  9. package/components/Drawer/Drawer.js +69 -70
  10. package/components/Dropdown/Dropdown.js +51 -56
  11. package/components/Modal/Modal.js +42 -47
  12. package/components/Popover/Popover.js +52 -55
  13. package/components/SplitButton/SplitButton.js +50 -55
  14. package/components/inputs/DatePicker/CalendarPanel.d.ts +40 -0
  15. package/components/inputs/DatePicker/CalendarPanel.js +287 -0
  16. package/components/inputs/DatePicker/CalendarPanel.module.scss.js +41 -0
  17. package/components/inputs/DatePicker/DatePicker.d.ts +3 -1
  18. package/components/inputs/DatePicker/DatePicker.js +105 -192
  19. package/components/inputs/DatePicker/DatePicker.module.scss.js +20 -40
  20. package/components/inputs/DateTimePicker/DateTimePicker.d.ts +141 -0
  21. package/components/inputs/DateTimePicker/DateTimePicker.js +232 -0
  22. package/components/inputs/DateTimePicker/DateTimePicker.module.scss.js +37 -0
  23. package/components/inputs/DateTimePicker/DateTimeSegments.d.ts +48 -0
  24. package/components/inputs/DateTimePicker/DateTimeSegments.js +252 -0
  25. package/components/inputs/DateTimePicker/TimeField.d.ts +18 -0
  26. package/components/inputs/DateTimePicker/TimeField.js +135 -0
  27. package/components/inputs/DateTimePicker/index.d.ts +3 -0
  28. package/components/inputs/DateTimePicker/timeZoneUtils.d.ts +44 -0
  29. package/components/inputs/DateTimePicker/timeZoneUtils.js +102 -0
  30. package/components/inputs/NumberInput/NumberInput.js +79 -81
  31. package/components/inputs/Select/Select.d.ts +5 -0
  32. package/components/inputs/Select/Select.js +340 -285
  33. package/hooks/useEscapeLayer.d.ts +36 -0
  34. package/hooks/useEscapeLayer.js +33 -0
  35. package/index.css +1 -1
  36. package/index.d.ts +2 -0
  37. package/index.js +108 -106
  38. package/index.layered.css +1 -1
  39. package/llms.txt +29 -4
  40. package/manifest.json +127 -1
  41. package/package.json +1 -1
@@ -1,229 +1,142 @@
1
- import { jsxs as k, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as me, useState as w, useRef as F, useMemo as h, useCallback as f, useEffect as he } from "react";
3
- import { createPortal as ye } from "react-dom";
4
- import l from "clsx";
5
- import { useClickOutside as De } from "../../../hooks/useClickOutside.js";
6
- import { usePortalPosition as ve } from "../../../hooks/usePortalPosition.js";
1
+ import { jsx as n, jsxs as F } from "react/jsx-runtime";
2
+ import { forwardRef as ee, useState as m, useRef as j, useMemo as y, useCallback as s } from "react";
3
+ import { createPortal as te } from "react-dom";
4
+ import D from "clsx";
5
+ import { useClickOutside as oe } from "../../../hooks/useClickOutside.js";
6
+ import { usePortalPosition as ne } from "../../../hooks/usePortalPosition.js";
7
7
  import t from "./DatePicker.module.scss.js";
8
- import { startOfMonth as R, startOfDay as y, weekdayLabels as be, buildCalendarDays as ke, toISODate as S, isSameMonth as J, addMonths as g, isSameDay as A, addDays as p } from "./dateUtils.js";
9
- const we = me(
8
+ import { CalendarPanel as re } from "./CalendarPanel.js";
9
+ import { startOfMonth as V, startOfDay as l } from "./dateUtils.js";
10
+ const ae = ee(
10
11
  ({
11
- value: j,
12
- defaultValue: Q,
13
- onChange: K,
14
- min: C,
15
- max: N,
12
+ value: P,
13
+ defaultValue: q,
14
+ onChange: b,
15
+ min: v,
16
+ max: w,
16
17
  disabledDate: O,
17
- weekStartsOn: u = 0,
18
- locale: s,
19
- format: B,
20
- placeholder: X = "Select date",
21
- inputSize: Y = "md",
22
- error: W = !1,
23
- disabled: m = !1,
24
- portal: D = !0,
25
- classes: n,
26
- className: Z,
27
- style: _,
28
- "aria-label": ee
29
- }, te) => {
30
- const x = j !== void 0, [re, ae] = w(Q ?? null), d = x ? j ?? null : re, [c, v] = w(!1), [i, b] = w(() => R(d ?? /* @__PURE__ */ new Date())), [a, q] = w(() => y(d ?? /* @__PURE__ */ new Date())), L = F(null), U = F(null), G = F(null), H = ve(L, c && D), oe = h(() => y(/* @__PURE__ */ new Date()), []), ne = h(
31
- () => B ?? ((e) => new Intl.DateTimeFormat(s, { year: "numeric", month: "short", day: "numeric" }).format(e)),
32
- [B, s]
33
- ), ie = h(
34
- () => new Intl.DateTimeFormat(s, { month: "long", year: "numeric" }).format(i),
35
- [s, i]
36
- ), le = h(() => be(s, u), [s, u]), se = h(() => ke(i, u), [i, u]), M = f(
37
- (e) => C && e < y(C) || N && e > y(N) ? !0 : O?.(e) ?? !1,
38
- [C, N, O]
39
- ), V = f(
18
+ weekStartsOn: A = 0,
19
+ locale: h,
20
+ format: g,
21
+ placeholder: B = "Select date",
22
+ inputSize: L = "md",
23
+ error: K = !1,
24
+ disabled: r = !1,
25
+ portal: c = !0,
26
+ classes: a,
27
+ className: T,
28
+ style: W,
29
+ "aria-label": z
30
+ }, G) => {
31
+ const k = P !== void 0, [H, J] = m(q ?? null), o = k ? P ?? null : H, [i, f] = m(!1), [Q, M] = m(() => V(o ?? /* @__PURE__ */ new Date())), [U, N] = m(() => l(o ?? /* @__PURE__ */ new Date())), C = j(null), S = j(null), E = ne(C, i && c), X = y(() => l(/* @__PURE__ */ new Date()), []), Y = y(
32
+ () => g ?? ((e) => new Intl.DateTimeFormat(h, { year: "numeric", month: "short", day: "numeric" }).format(e)),
33
+ [g, h]
34
+ ), u = y(() => v ? l(v) : void 0, [v]), p = y(() => w ? l(w) : void 0, [w]), Z = s(
35
+ (e) => u && e < u || p && e > p ? !0 : O?.(e) ?? !1,
36
+ [u, p, O]
37
+ ), I = s(
40
38
  (e) => {
41
- x || ae(e), K?.(e);
39
+ k || J(e), b?.(e);
42
40
  },
43
- [x, K]
44
- ), I = f(() => {
45
- if (m) return;
46
- const e = y(d ?? /* @__PURE__ */ new Date());
47
- b(R(e)), q(e), v(!0);
48
- }, [m, d]), P = f((e = !0) => {
49
- v(!1), e && L.current?.querySelector("input")?.focus();
50
- }, []), $ = f(
41
+ [k, b]
42
+ ), x = s(() => {
43
+ if (r) return;
44
+ const e = l(o ?? /* @__PURE__ */ new Date());
45
+ M(V(e)), N(e), f(!0);
46
+ }, [r, o]), d = s((e = !0) => {
47
+ f(!1), e && C.current?.querySelector("input")?.focus();
48
+ }, []), _ = s(
51
49
  (e) => {
52
- M(e) || (V(e), P());
50
+ I(e), d();
53
51
  },
54
- [M, V, P]
52
+ [I, d]
55
53
  );
56
- De(U, () => v(!1), c), he(() => {
57
- if (!c) return;
58
- G.current?.querySelector(`[data-date="${S(a)}"]`)?.focus();
59
- }, [c, a]);
60
- const de = f(
61
- (e) => {
62
- q(e), J(e, i) || b(R(e));
63
- },
64
- [i]
65
- ), ce = (e) => {
66
- let o = null;
67
- switch (e.key) {
68
- case "ArrowLeft":
69
- o = p(a, -1);
70
- break;
71
- case "ArrowRight":
72
- o = p(a, 1);
73
- break;
74
- case "ArrowUp":
75
- o = p(a, -7);
76
- break;
77
- case "ArrowDown":
78
- o = p(a, 7);
79
- break;
80
- case "Home":
81
- o = p(a, -((a.getDay() - u + 7) % 7));
82
- break;
83
- case "End":
84
- o = p(a, 6 - (a.getDay() - u + 7) % 7);
85
- break;
86
- case "PageUp":
87
- o = g(a, -1);
88
- break;
89
- case "PageDown":
90
- o = g(a, 1);
91
- break;
92
- case "Enter":
93
- case " ":
94
- e.preventDefault(), $(a);
95
- return;
96
- case "Escape":
97
- e.preventDefault(), P();
98
- return;
99
- default:
100
- return;
101
- }
102
- e.preventDefault(), de(o);
103
- }, ue = (e) => {
104
- e.key === "ArrowDown" || e.key === "Enter" ? (e.preventDefault(), I()) : e.key === "Escape" && c && v(!1);
105
- }, z = /* @__PURE__ */ k(
106
- "div",
107
- {
108
- ref: U,
109
- className: l(t.popover, D && t.portalled, n?.popover),
110
- style: D ? { position: "fixed", top: H.top + 4, left: H.left } : void 0,
111
- role: "dialog",
112
- "aria-modal": "false",
113
- "aria-label": "Choose date",
114
- children: [
115
- /* @__PURE__ */ k("div", { className: l(t.header, n?.header), children: [
116
- /* @__PURE__ */ r(
117
- "button",
118
- {
119
- type: "button",
120
- className: l(t.nav, n?.nav),
121
- onClick: () => b(g(i, -1)),
122
- "aria-label": "Previous month",
123
- children: /* @__PURE__ */ r("svg", { viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M7 2L3 6l4 4" }) })
124
- }
125
- ),
126
- /* @__PURE__ */ r("span", { className: t.monthLabel, "aria-live": "polite", children: ie }),
127
- /* @__PURE__ */ r(
128
- "button",
129
- {
130
- type: "button",
131
- className: l(t.nav, n?.nav),
132
- onClick: () => b(g(i, 1)),
133
- "aria-label": "Next month",
134
- children: /* @__PURE__ */ r("svg", { viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M5 2l4 4-4 4" }) })
135
- }
136
- )
137
- ] }),
138
- /* @__PURE__ */ r("div", { className: t.weekdays, "aria-hidden": "true", children: le.map((e, o) => /* @__PURE__ */ r("span", { className: t.weekday, children: e }, o)) }),
139
- /* @__PURE__ */ r(
140
- "div",
54
+ oe(S, () => f(!1), i);
55
+ const $ = (e) => {
56
+ e.key === "ArrowDown" || e.key === "Enter" ? (e.preventDefault(), x()) : e.key === "Escape" && i && (e.preventDefault(), f(!1));
57
+ }, R = (
58
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
59
+ /* @__PURE__ */ n(
60
+ "div",
61
+ {
62
+ ref: S,
63
+ onKeyDown: (e) => {
64
+ e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), d());
65
+ },
66
+ className: D(t.popover, c && t.portalled, a?.popover),
67
+ style: c ? { position: "fixed", top: E.top + 4, left: E.left } : void 0,
68
+ role: "dialog",
69
+ "aria-modal": "false",
70
+ "aria-label": "Choose date",
71
+ children: /* @__PURE__ */ n(
72
+ re,
141
73
  {
142
- ref: G,
143
- role: "grid",
144
- className: l(t.grid, n?.grid),
145
- onKeyDown: ce,
146
- children: se.map((e) => {
147
- const o = !J(e, i), T = A(e, d), E = A(e, oe), fe = M(e), pe = A(e, a);
148
- return /* @__PURE__ */ r(
149
- "button",
150
- {
151
- type: "button",
152
- role: "gridcell",
153
- "data-date": S(e),
154
- tabIndex: pe ? 0 : -1,
155
- className: l(
156
- t.day,
157
- o && t.dayOutside,
158
- E && t.dayToday,
159
- T && t.daySelected,
160
- o && n?.dayOutside,
161
- E && n?.dayToday,
162
- T && n?.daySelected,
163
- n?.day
164
- ),
165
- "aria-selected": T,
166
- "aria-disabled": fe || void 0,
167
- "aria-current": E ? "date" : void 0,
168
- "aria-label": new Intl.DateTimeFormat(s, { dateStyle: "full" }).format(e),
169
- onClick: () => $(e),
170
- children: e.getDate()
171
- },
172
- S(e)
173
- );
174
- })
74
+ viewDate: Q,
75
+ focusedDate: U,
76
+ selected: o,
77
+ today: X,
78
+ minDay: u,
79
+ maxDay: p,
80
+ locale: h,
81
+ weekStartsOn: A,
82
+ isDisabledDay: Z,
83
+ onSelect: _,
84
+ onViewDateChange: M,
85
+ onFocusedDateChange: N,
86
+ onEscape: d,
87
+ classes: a
175
88
  }
176
89
  )
177
- ]
178
- }
90
+ }
91
+ )
179
92
  );
180
- return /* @__PURE__ */ k(
93
+ return /* @__PURE__ */ F(
181
94
  "div",
182
95
  {
183
- ref: L,
184
- className: l(t.root, t[Y], W && t.error, m && t.disabled, n?.root, Z),
185
- style: _,
96
+ ref: C,
97
+ className: D(t.root, t[L], K && t.error, r && t.disabled, a?.root, T),
98
+ style: W,
186
99
  children: [
187
- /* @__PURE__ */ r(
100
+ /* @__PURE__ */ n(
188
101
  "input",
189
102
  {
190
- ref: te,
103
+ ref: G,
191
104
  type: "text",
192
105
  readOnly: !0,
193
- className: l(t.input, n?.input),
194
- value: d ? ne(d) : "",
195
- placeholder: X,
196
- disabled: m,
197
- "aria-label": ee,
106
+ className: D(t.input, a?.input),
107
+ value: o ? Y(o) : "",
108
+ placeholder: B,
109
+ disabled: r,
110
+ "aria-label": z,
198
111
  "aria-haspopup": "dialog",
199
- "aria-expanded": c,
200
- "aria-invalid": W || void 0,
201
- onClick: I,
202
- onKeyDown: ue
112
+ "aria-expanded": i,
113
+ "aria-invalid": K || void 0,
114
+ onClick: x,
115
+ onKeyDown: $
203
116
  }
204
117
  ),
205
- /* @__PURE__ */ r(
118
+ /* @__PURE__ */ n(
206
119
  "button",
207
120
  {
208
121
  type: "button",
209
122
  tabIndex: -1,
210
- className: l(t.icon, n?.icon),
211
- onClick: I,
212
- disabled: m,
123
+ className: D(t.icon, a?.icon),
124
+ onClick: x,
125
+ disabled: r,
213
126
  "aria-label": "Open calendar",
214
- children: /* @__PURE__ */ k("svg", { viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: [
215
- /* @__PURE__ */ r("rect", { x: "3", y: "4", width: "14", height: "13", rx: "2" }),
216
- /* @__PURE__ */ r("path", { d: "M3 8h14M7 2v3M13 2v3", strokeLinecap: "round" })
127
+ children: /* @__PURE__ */ F("svg", { viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: [
128
+ /* @__PURE__ */ n("rect", { x: "3", y: "4", width: "14", height: "13", rx: "2" }),
129
+ /* @__PURE__ */ n("path", { d: "M3 8h14M7 2v3M13 2v3", strokeLinecap: "round" })
217
130
  ] })
218
131
  }
219
132
  ),
220
- c && (D ? typeof document < "u" && ye(z, document.body) : z)
133
+ i && (c ? typeof document < "u" && te(R, document.body) : R)
221
134
  ]
222
135
  }
223
136
  );
224
137
  }
225
138
  );
226
- we.displayName = "DatePicker";
139
+ ae.displayName = "DatePicker";
227
140
  export {
228
- we as DatePicker
141
+ ae as DatePicker
229
142
  };
@@ -1,45 +1,25 @@
1
- const e = "crk-root-ZBCoP", o = "crk-sm-7EeFF", c = "crk-input-62G21", d = "crk-md-OVdqx", r = "crk-lg-a9KsJ", t = "crk-icon-jS307", a = "crk-error-c4lUO", s = "crk-disabled-3PiA5", n = "crk-popover-x1-UT", k = "crk-portalled-iPe0Y", y = "crk-header-KmYtH", l = "crk-monthLabel-69Pwi", i = "crk-nav-uKYXN", p = "crk-weekdays--RSzS", m = "crk-grid-tf4tT", u = "crk-weekday-Zc1su", h = "crk-day-5SuBX", w = "crk-dayOutside-q3Phh", S = "crk-dayToday-7rRns", b = "crk-daySelected-a3XL4", g = {
2
- root: e,
3
- sm: o,
1
+ const o = "crk-root-ZBCoP", r = "crk-sm-7EeFF", c = "crk-input-62G21", t = "crk-md-OVdqx", s = "crk-lg-a9KsJ", e = "crk-icon-jS307", n = "crk-error-c4lUO", l = "crk-disabled-3PiA5", d = "crk-popover-x1-UT", p = "crk-portalled-iPe0Y", i = {
2
+ root: o,
3
+ sm: r,
4
4
  input: c,
5
- md: d,
6
- lg: r,
7
- icon: t,
8
- error: a,
9
- disabled: s,
10
- popover: n,
11
- portalled: k,
12
- header: y,
13
- monthLabel: l,
14
- nav: i,
15
- weekdays: p,
16
- grid: m,
17
- weekday: u,
18
- day: h,
19
- dayOutside: w,
20
- dayToday: S,
21
- daySelected: b
5
+ md: t,
6
+ lg: s,
7
+ icon: e,
8
+ error: n,
9
+ disabled: l,
10
+ popover: d,
11
+ portalled: p
22
12
  };
23
13
  export {
24
- h as day,
25
- w as dayOutside,
26
- b as daySelected,
27
- S as dayToday,
28
- g as default,
29
- s as disabled,
30
- a as error,
31
- m as grid,
32
- y as header,
33
- t as icon,
14
+ i as default,
15
+ l as disabled,
16
+ n as error,
17
+ e as icon,
34
18
  c as input,
35
- r as lg,
36
- d as md,
37
- l as monthLabel,
38
- i as nav,
39
- n as popover,
40
- k as portalled,
41
- e as root,
42
- o as sm,
43
- u as weekday,
44
- p as weekdays
19
+ s as lg,
20
+ t as md,
21
+ d as popover,
22
+ p as portalled,
23
+ o as root,
24
+ r as sm
45
25
  };
@@ -0,0 +1,141 @@
1
+ import { CSSProperties } from 'react';
2
+ import { TimeZoneNameStyle } from './timeZoneUtils';
3
+ export interface DateTimePickerClasses {
4
+ root: string;
5
+ /** The segment row (or the read-only input when `format` is set). */
6
+ input: string;
7
+ /** Each editable segment in the field. */
8
+ segment: string;
9
+ icon: string;
10
+ /** Zone label — inline after the time in the field, and in the popover footer. */
11
+ timeZone: string;
12
+ popover: string;
13
+ header: string;
14
+ nav: string;
15
+ grid: string;
16
+ day: string;
17
+ daySelected: string;
18
+ dayToday: string;
19
+ dayOutside: string;
20
+ /** The group of time columns. */
21
+ time: string;
22
+ /** Each scrollable column (hours, minutes, seconds, AM/PM). */
23
+ column: string;
24
+ /** Each option inside a column. */
25
+ option: string;
26
+ /** The selected option in each column. */
27
+ optionSelected: string;
28
+ footer: string;
29
+ }
30
+ export interface DateTimePickerProps {
31
+ /** Controlled selected instant (`null` for empty). */
32
+ value?: Date | null;
33
+ /** Uncontrolled initial instant. */
34
+ defaultValue?: Date | null;
35
+ /** Called with the new instant on every day or time change. */
36
+ onChange?: (date: Date | null) => void;
37
+ /**
38
+ * Earliest selectable instant (inclusive). Days before it are disabled and
39
+ * a time picked before it on the same day clamps up to it.
40
+ */
41
+ min?: Date;
42
+ /** Latest selectable instant (inclusive). Mirror of `min`. */
43
+ max?: Date;
44
+ /**
45
+ * Predicate to disable arbitrary days. Receives the calendar day at local
46
+ * midnight — with `timeZone` set, that is the wall-clock day in that zone.
47
+ */
48
+ disabledDate?: (date: Date) => boolean;
49
+ /** First day of the week (0 = Sunday). @default 0 */
50
+ weekStartsOn?: number;
51
+ /** BCP-47 locale for month/weekday names, the default format, and the default hour cycle. */
52
+ locale?: string;
53
+ /**
54
+ * Time zone the picker renders and edits in: any IANA name
55
+ * (`'America/New_York'`), `'UTC'`, or `'system'` for the runtime's local
56
+ * zone. The value stays an absolute instant; only the wall clock shown to
57
+ * the user changes. An unknown zone logs a warning and falls back to UTC.
58
+ * @default 'UTC'
59
+ */
60
+ timeZone?: string;
61
+ /**
62
+ * Show the zone as a plain label right after the time
63
+ * (`2026-06-15 14:30:00 UTC`, `… GMT+03:00`) and in the popover footer.
64
+ * @default true
65
+ */
66
+ showTimeZone?: boolean;
67
+ /**
68
+ * How the zone label reads: `'longOffset'` → `GMT+03:00`, `'shortOffset'`
69
+ * → `GMT+3`, `'short'` → `EEST`, `'long'` → `Eastern European Summer Time`.
70
+ * UTC always reads `UTC`. @default 'longOffset'
71
+ */
72
+ timeZoneStyle?: TimeZoneNameStyle;
73
+ /**
74
+ * Layout of the field's segments. `'iso'` is `YYYY-MM-DD HH:mm:ss`
75
+ * regardless of locale; `'locale'` follows the locale's numeric date/time
76
+ * order (e.g. `MM/DD/YYYY, hh:mm:ss AM` for `en-US`). @default 'iso'
77
+ */
78
+ fieldFormat?: 'iso' | 'locale';
79
+ /**
80
+ * 12- or 24-hour clock for the field and the time columns. Defaults to 24;
81
+ * with `fieldFormat="locale"` it defaults to the locale's convention instead.
82
+ */
83
+ hourCycle?: 12 | 24;
84
+ /**
85
+ * Spacing of the minute options (5 → 00, 05, 10, …). A value that is not
86
+ * on the grid is still listed so the selection is always visible. @default 5
87
+ */
88
+ minuteStep?: number;
89
+ /** Show seconds in the field and as a popover column. @default true */
90
+ showSeconds?: boolean;
91
+ /**
92
+ * Custom display text for the field. Setting it switches the field to a
93
+ * read-only display (click opens the popover) because free-form text cannot
94
+ * be edited segment by segment. Receives the raw instant — pass `timeZone`
95
+ * to `Intl.DateTimeFormat` yourself if needed. Omit it to keep the editable
96
+ * segments (`YYYY-MM-DD HH:mm:ss` by default, see `fieldFormat`).
97
+ */
98
+ format?: (date: Date) => string;
99
+ /** Placeholder of the read-only display used with `format`. @default 'Select date and time' */
100
+ placeholder?: string;
101
+ /** Text of the button that closes the popover. @default 'Done' */
102
+ doneLabel?: string;
103
+ /** Toolkit size scale. @default 'md' */
104
+ inputSize?: 'sm' | 'md' | 'lg';
105
+ /** Apply error styling. @default false */
106
+ error?: boolean;
107
+ /** Disable the field. @default false */
108
+ disabled?: boolean;
109
+ /** Render the popover in a portal at `document.body` (escapes overflow). @default true */
110
+ portal?: boolean;
111
+ /** Override class names on internal elements. */
112
+ classes?: Partial<DateTimePickerClasses>;
113
+ className?: string;
114
+ style?: CSSProperties;
115
+ 'aria-label'?: string;
116
+ 'aria-describedby'?: string;
117
+ }
118
+ /**
119
+ * Date + time input with two ways to edit. The field itself is a row of
120
+ * segments — `YYYY-MM-DD HH:mm:ss`, 24-hour, in UTC by default (see
121
+ * `fieldFormat`, `hourCycle`, `timeZone`): click one,
122
+ * Up/Down steps it, Left/Right moves between segments, digits type with
123
+ * auto-advance, Backspace clears; on an empty field the first arrow press
124
+ * fills in "now" and typing starts from it. The calendar icon (or Alt+ArrowDown) opens a popover with the
125
+ * `DatePicker` calendar beside scrollable hours / minutes (/ seconds / AM-PM)
126
+ * columns. Picking a day keeps the current time and leaves the popover open;
127
+ * every change commits immediately; "Done", Escape or clicking outside
128
+ * closes. Forwards its ref to the root `<div>`. Binds inside `FormField`
129
+ * (`value: Date | null` / `onChange`).
130
+ *
131
+ * Time-zone aware: the value is always an absolute instant, and `timeZone`
132
+ * chooses the wall clock it is shown and edited in (local by default).
133
+ * The zone is labelled right after the time so users always know which
134
+ * clock they are looking at (`showTimeZone={false}` hides it).
135
+ *
136
+ * @example
137
+ * <DateTimePicker value={at} onChange={setAt} showTimeZone />
138
+ * // Local zone, locale layout, 12-hour clock where the locale uses it:
139
+ * <DateTimePicker value={at} onChange={setAt} timeZone="system" fieldFormat="locale" />
140
+ */
141
+ export declare const DateTimePicker: import('react').ForwardRefExoticComponent<DateTimePickerProps & import('react').RefAttributes<HTMLDivElement>>;