@slotted/react 0.1.0-beta.6 → 0.1.0-beta.8
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/dist/{action-bar-ti3e6FK1.js → action-bar-C5zaYrEW.js} +2 -2
- package/dist/action-bar.js +1 -1
- package/dist/{action-sheet-C60BWUW8.js → action-sheet-DD477dAw.js} +1 -1
- package/dist/action-sheet.js +1 -1
- package/dist/{app-shell-nnSP44OO.js → app-shell-DNdZ5ys0.js} +1 -1
- package/dist/app-shell.js +1 -1
- package/dist/{calendar-BZ6PP7Ke.js → calendar-xcoBnHpK.js} +17 -17
- package/dist/calendar.js +1 -1
- package/dist/{color-picker-BcRCeISx.js → color-picker-amz8XfXm.js} +1 -1
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-BtkYLs5G.js → column-manager-DonEo9wp.js} +2 -2
- package/dist/column-manager.js +1 -1
- package/dist/{command-palette-DFLbSOiv.js → command-palette-Dw03scvF.js} +244 -241
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-B00UIBVC.js → context-menu-g3DMZKR3.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{dashboard-grid-CoLKLvYL.js → dashboard-grid-DsovCuVC.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-DX95Y7mY.js → data-grid-B93D5XsR.js} +10 -10
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-CWYTPNm-.js → data-list-UtLdop-1.js} +1 -1
- package/dist/data-list.js +1 -1
- package/dist/{date-field-BxEpqAPg.js → date-field-DEauLQVL.js} +80 -80
- package/dist/date-field.js +1 -1
- package/dist/{date-picker-DRk9SZp1.js → date-picker-C22jlzUv.js} +2 -2
- package/dist/date-picker.js +1 -1
- package/dist/{date-range-picker-6Yz7avTS.js → date-range-picker-BUKoddmL.js} +2 -2
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-D2f9u6im.js → datetime-field-Bptwvuip.js} +33 -33
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-STqSWMkH.js → datetime-picker-BiarFWN3.js} +2 -2
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-DQNQwr3K.js → datetime-range-picker--JtLnGQ2.js} +2 -2
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{detail-panel-z6WGleP4.js → detail-panel-ChaIgrw3.js} +2 -2
- package/dist/detail-panel.js +1 -1
- package/dist/{dialog-BHYDDj1S.js → dialog-Ds0LJWE_.js} +157 -140
- package/dist/dialog.js +1 -1
- package/dist/docs/calendar.json +1 -1
- package/dist/docs/menu.json +12 -0
- package/dist/docs/menu.md +2 -0
- package/dist/docs/side-navigation.json +1 -0
- package/dist/docs/side-navigation.md +1 -1
- package/dist/docs/table.examples.md +13 -17
- package/dist/docs/table.json +3 -3
- package/dist/{drawer-LXM44eso.js → drawer-DZ_29U6H.js} +5 -2
- package/dist/drawer.js +1 -1
- package/dist/{event-calendar-CiphPXdV.js → event-calendar-CPAun_ab.js} +3 -3
- package/dist/event-calendar.js +1 -1
- package/dist/{filter-bar-C_dXljI_.js → filter-bar-BKKqH0ui.js} +5 -5
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-BQnMJz4g.js → import-export-center-Bg1Iavoa.js} +2 -2
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +40 -40
- package/dist/{loading-overlay-COfnckse.js → loading-overlay-RRsNK1FN.js} +1 -1
- package/dist/loading-overlay.js +1 -1
- package/dist/{menu-parts-D6v_mz6O.js → menu-parts-BpQu2s4z.js} +210 -206
- package/dist/menu.js +1 -1
- package/dist/{menubar-DApIg1eR.js → menubar-rpNcgIrw.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/{navigation-menu-parts-D8qFAwHX.js → navigation-menu-parts-Cn-OAadu.js} +1 -1
- package/dist/navigation-menu.js +1 -1
- package/dist/{page-IiYXk1sz.js → page-QP8Zyz8-.js} +1 -1
- package/dist/{page-header-Bn4nIGfF.js → page-header-BP_Wt3eS.js} +1 -1
- package/dist/page-header.js +1 -1
- package/dist/page.js +1 -1
- package/dist/{saved-views-B3brBTD9.js → saved-views-DB2IIdhH.js} +1 -1
- package/dist/saved-views.js +1 -1
- package/dist/{side-navigation-Bm-BZma1.js → side-navigation-BnUKTrtd.js} +1 -1
- package/dist/side-navigation.js +1 -1
- package/dist/{split-button-DKRm0j5c.js → split-button-p97Bd5wM.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table-BYEvFr4P.js → table-BTSOjlTn.js} +8 -8
- package/dist/table.js +1 -1
- package/dist/{time-field-BI9n607q.js → time-field-DeKrogZG.js} +2 -2
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-D6SlQWNF.js → time-picker-C0-O0oMU.js} +1 -1
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-CcV3_45h.js → time-range-picker-Fdb70Zj_.js} +1 -1
- package/dist/time-range-picker.js +1 -1
- package/dist/{toast-Bf3e0AgC.js → toast-BTN_F9No.js} +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toolbar-B9knmgHA.js → toolbar-U-CFEb1c.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{top-navigation-DiG2PF5W.js → top-navigation-BjIRQfkK.js} +2 -2
- package/dist/top-navigation.js +1 -1
- package/dist/types/action-bar/action-bar.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell.d.ts.map +1 -1
- package/dist/types/calendar/calendar.d.ts.map +1 -1
- package/dist/types/command-palette/command-palette.d.ts.map +1 -1
- package/dist/types/dialog/dialog-parts.d.ts.map +1 -1
- package/dist/types/dialog/dialog.d.ts.map +1 -1
- package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
- package/dist/types/drawer/drawer.d.ts.map +1 -1
- package/dist/types/loading-overlay/loading-overlay.d.ts.map +1 -1
- package/dist/types/menu/index.d.ts +1 -1
- package/dist/types/menu/index.d.ts.map +1 -1
- package/dist/types/menu/menu-defaults.d.ts.map +1 -1
- package/dist/types/menu/menu-parts.d.ts.map +1 -1
- package/dist/types/menu/menu.d.ts +1 -1
- package/dist/types/menu/menu.d.ts.map +1 -1
- package/dist/types/menu/menu.types.d.ts +10 -0
- package/dist/types/menu/menu.types.d.ts.map +1 -1
- package/dist/types/navigation-menu/navigation-menu-parts.d.ts.map +1 -1
- package/dist/types/page/page.d.ts.map +1 -1
- package/dist/types/table/table-parts.d.ts +4 -0
- package/dist/types/table/table-parts.d.ts.map +1 -1
- package/dist/types/toast/toast-parts.d.ts.map +1 -1
- package/dist/{upload-CLX5cURk.js → upload-DGmsz9Hw.js} +1 -1
- package/dist/upload.js +1 -1
- package/package.json +11 -8
package/dist/command-palette.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./command-palette-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./command-palette-Dw03scvF.js";
|
|
2
2
|
export { r as COMMAND_PALETTE_FALLBACK, i as CommandPalette, t as CommandPaletteDefaultsProvider, n as CommandPaletteTrigger, e as useCommandPaletteDefaults };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e, b as t } from "./menu-parts-
|
|
1
|
+
import { _ as e, b as t } from "./menu-parts-BpQu2s4z.js";
|
|
2
2
|
import { createContext as n, useCallback as r, useContext as i, useEffect as a, useImperativeHandle as o, useRef as s, useState as c } from "react";
|
|
3
3
|
import { jsx as l } from "react/jsx-runtime";
|
|
4
4
|
//#region src/context-menu/context-menu-defaults.tsx
|
package/dist/context-menu.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./context-menu-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./context-menu-g3DMZKR3.js";
|
|
2
2
|
export { t as CONTEXT_MENU_FALLBACK, a as ContextMenu, e as ContextMenuDefaultsProvider, n as ContextMenuTrigger, i as useContextMenu, r as useContextMenuDefaults };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
|
-
import { _ as n, c as r, d as i, g as a, n as o, p as s, t as c } from "./menu-parts-
|
|
2
|
+
import { _ as n, c as r, d as i, g as a, n as o, p as s, t as c } from "./menu-parts-BpQu2s4z.js";
|
|
3
3
|
import { r as l } from "./i18n-DpW8lqJ1.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { n as u, t as d } from "./icon-button-CCWkCDMs.js";
|
package/dist/dashboard-grid.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./dashboard-grid-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./dashboard-grid-DsovCuVC.js";
|
|
2
2
|
export { t as DASHBOARD_GRID_FALLBACK, i as DashboardGrid, e as DashboardGridDefaultsProvider, n as DashboardWidget, r as useDashboardGridDefaults, a as usePersistedDashboardLayout };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
|
-
import { _ as n, c as r, g as i, n as a, t as o } from "./menu-parts-
|
|
2
|
+
import { _ as n, c as r, g as i, n as a, t as o } from "./menu-parts-BpQu2s4z.js";
|
|
3
3
|
import { n as s, r as c } from "./i18n-DpW8lqJ1.js";
|
|
4
4
|
import { n as l } from "./icon-button-CCWkCDMs.js";
|
|
5
5
|
import { a as u, i as d, n as f, r as p } from "./tooltip-CgjIROUy.js";
|
|
@@ -9,19 +9,19 @@ import { t as g } from "./text-field-CbQ6UCAP.js";
|
|
|
9
9
|
import { a as _, d as ee, f as te, l as ne, r as re, t as ie } from "./popover-DEp8Bf3e.js";
|
|
10
10
|
import { t as v } from "./visually-hidden-CE6u5JLW.js";
|
|
11
11
|
import { i as ae, n as oe, o as se, r as ce, t as le } from "./result-state-CZsQfdN4.js";
|
|
12
|
-
import { t as ue } from "./date-picker-
|
|
13
|
-
import { t as de } from "./date-field-
|
|
14
|
-
import { t as fe } from "./date-range-picker-
|
|
15
|
-
import { t as pe } from "./datetime-picker-
|
|
16
|
-
import { t as me } from "./datetime-field-
|
|
17
|
-
import { t as he } from "./datetime-range-picker
|
|
12
|
+
import { t as ue } from "./date-picker-C22jlzUv.js";
|
|
13
|
+
import { t as de } from "./date-field-DEauLQVL.js";
|
|
14
|
+
import { t as fe } from "./date-range-picker-BUKoddmL.js";
|
|
15
|
+
import { t as pe } from "./datetime-picker-BiarFWN3.js";
|
|
16
|
+
import { t as me } from "./datetime-field-Bptwvuip.js";
|
|
17
|
+
import { t as he } from "./datetime-range-picker--JtLnGQ2.js";
|
|
18
18
|
import { a as ge, i as _e, n as ve, s as ye } from "./multi-select-B8z6ApgW.js";
|
|
19
19
|
import { t as be } from "./number-field-DXk1TAXA.js";
|
|
20
20
|
import { a as xe, t as Se } from "./segmented-control-C-PzkTtg.js";
|
|
21
21
|
import { c as Ce, i as we, n as Te, o as Ee, s as De } from "./select-BUylPwpb.js";
|
|
22
|
-
import { t as Oe } from "./time-picker-
|
|
23
|
-
import { t as ke } from "./time-field-
|
|
24
|
-
import { t as Ae } from "./time-range-picker-
|
|
22
|
+
import { t as Oe } from "./time-picker-C0-O0oMU.js";
|
|
23
|
+
import { t as ke } from "./time-field-DeKrogZG.js";
|
|
24
|
+
import { t as Ae } from "./time-range-picker-Fdb70Zj_.js";
|
|
25
25
|
import { createControllable as je } from "@slotted/core/state";
|
|
26
26
|
import { createContext as Me, createElement as Ne, memo as Pe, useCallback as y, useContext as Fe, useEffect as b, useId as Ie, useImperativeHandle as Le, useLayoutEffect as Re, useMemo as x, useRef as S, useState as C } from "react";
|
|
27
27
|
import { Fragment as ze, jsx as w, jsxs as T } from "react/jsx-runtime";
|
package/dist/data-grid.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./data-grid-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./data-grid-B93D5XsR.js";
|
|
2
2
|
export { e as DRAG_COLUMN, n as DataGrid, i as DataGridDefaultsProvider, r as EXPANDER_COLUMN, a as SELECTION_COLUMN, t as useDataGridDefaults, o as usePersistedGridView };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
|
-
import { _ as n, g as r, h as i, m as a, n as o, o as s, t as c } from "./menu-parts-
|
|
2
|
+
import { _ as n, g as r, h as i, m as a, n as o, o as s, t as c } from "./menu-parts-BpQu2s4z.js";
|
|
3
3
|
import { n as ee, r as te } from "./i18n-DpW8lqJ1.js";
|
|
4
4
|
import { n as l } from "./icon-button-CCWkCDMs.js";
|
|
5
5
|
import { t as ne } from "./checkbox-B4Sb1eXj.js";
|
package/dist/data-list.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./data-list-
|
|
1
|
+
import { n as e, r as t, t as n } from "./data-list-UtLdop-1.js";
|
|
2
2
|
export { n as DataList, e as DataListDefaultsProvider, t as useDataListDefaults };
|
|
@@ -5,9 +5,9 @@ import { createControllable as a } from "@slotted/core/state";
|
|
|
5
5
|
import { createContext as o, useCallback as s, useContext as c, useEffect as l, useId as u, useImperativeHandle as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
6
6
|
import { Fragment as ee, jsx as h, jsxs as te } from "react/jsx-runtime";
|
|
7
7
|
import { dateFieldMessages as ne } from "@slotted/core/i18n";
|
|
8
|
-
import { EMPTY_SEGMENTS as re, boundSegment as
|
|
8
|
+
import { EMPTY_SEGMENTS as re, boundSegment as ie, clearSegment as ae, commitTyping as oe, createDateFormat as se, dateOf as g, fieldRange as ce, isDateInRange as le, isSameDate as ue, parseISOYearMonth as de, plainDate as fe, segmentsOf as _, stepSegment as v, toISODate as pe, toISOYearMonth as me, todayIn as he, typeDigit as ge, yearMonthPattern as _e } from "@slotted/core/date";
|
|
9
9
|
//#region src/date-field/date-field-defaults.tsx
|
|
10
|
-
var
|
|
10
|
+
var y = 20, b = o({
|
|
11
11
|
calendar: "gregory",
|
|
12
12
|
firstDayOfWeek: void 0,
|
|
13
13
|
size: "md",
|
|
@@ -18,7 +18,7 @@ var _e = 20, b = o({
|
|
|
18
18
|
function x() {
|
|
19
19
|
return c(b);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function ve({ children: e, ...t }) {
|
|
22
22
|
let n = x();
|
|
23
23
|
return /* @__PURE__ */ h(b.Provider, {
|
|
24
24
|
value: {
|
|
@@ -34,51 +34,51 @@ function S({ children: e, ...t }) {
|
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/date-field/date-field.tsx
|
|
37
|
-
var
|
|
37
|
+
var ye = {
|
|
38
38
|
day: 5,
|
|
39
39
|
month: 5,
|
|
40
40
|
year: 10
|
|
41
|
-
},
|
|
42
|
-
function
|
|
43
|
-
let
|
|
44
|
-
l(() =>
|
|
45
|
-
let
|
|
46
|
-
locale:
|
|
47
|
-
firstDayOfWeek:
|
|
48
|
-
yearPivot:
|
|
41
|
+
}, be = fe(2e3, 1, 1);
|
|
42
|
+
function S({ "aria-describedby": o, "aria-label": c, "aria-labelledby": ce, calendar: y, className: b, clearable: ve = !1, defaultValue: S, disabled: C, end: Se, firstDayOfWeek: Ce, granularity: we, id: Te, invalid: Ee, isDateUnavailable: De, locale: Oe, max: ke, messages: Ae, min: je, name: Me, onKeyDown: Ne, onPaste: Pe, onValueChange: w, readOnly: Fe, ref: Ie, render: T, required: Le, size: Re, start: ze, style: Be, timeZone: Ve, value: E, variant: He, yearPivot: Ue, ...We }) {
|
|
43
|
+
let D = i(), Ge = D?.registerControl;
|
|
44
|
+
l(() => Ge?.(), [Ge]);
|
|
45
|
+
let O = x(), Ke = n(), qe = r(ne, Ae), k = p(null), Je = u(), A = Oe ?? Ke, j = Ce ?? O.firstDayOfWeek, M = Ue ?? O.yearPivot, N = Ve ?? O.timeZone, Ye = y ?? O.calendar, Xe = Re ?? D?.size ?? O.size, Ze = He ?? O.variant, P = C ?? D?.disabled, F = Fe ?? D?.readOnly, Qe = Ee ?? D?.invalid, I = Le ?? D?.required, L = f(() => se({
|
|
46
|
+
locale: A,
|
|
47
|
+
firstDayOfWeek: j,
|
|
48
|
+
yearPivot: M
|
|
49
49
|
}), [
|
|
50
|
+
j,
|
|
50
51
|
A,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
let [R, z] = m(() => v(T ?? w ?? null)), [B, V] = m(void 0), H = p(R), U = () => H.current;
|
|
52
|
+
M
|
|
53
|
+
]), [R, $e] = m(() => be);
|
|
54
|
+
l(() => $e(he(N)), [N]);
|
|
55
|
+
let [z, et] = m(() => _(E ?? S ?? null)), [B, V] = m(void 0), H = p(z), U = () => H.current;
|
|
56
56
|
l(() => {
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
let W =
|
|
57
|
+
E !== void 0 && (ue(g(H.current), E) || (H.current = _(E), et(H.current)));
|
|
58
|
+
}, [E]);
|
|
59
|
+
let W = z, G = g(W), K = we === "month", q = f(() => K ? _e(L.pattern) : L.pattern, [L, K]), J = f(() => q.filter((e) => e.type !== "literal").map((e) => e.type), [q]), Y = s((e, t, n) => {
|
|
60
60
|
let r = K && e.day !== 1 ? {
|
|
61
61
|
...e,
|
|
62
62
|
day: 1,
|
|
63
63
|
intendedDay: 1
|
|
64
|
-
} : e, i =
|
|
65
|
-
H.current = r,
|
|
66
|
-
controlled:
|
|
64
|
+
} : e, i = g(H.current);
|
|
65
|
+
H.current = r, et(r), r.typing === null && a({
|
|
66
|
+
controlled: E,
|
|
67
67
|
initial: i,
|
|
68
|
-
equals:
|
|
68
|
+
equals: ue,
|
|
69
69
|
onRequest: (e) => {
|
|
70
|
-
|
|
70
|
+
w?.(e.value, {
|
|
71
71
|
...e,
|
|
72
72
|
segments: r
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
}).request(
|
|
75
|
+
}).request(g(r), t, n);
|
|
76
76
|
}, [
|
|
77
77
|
K,
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
w,
|
|
79
|
+
E
|
|
80
80
|
]), X = s((e) => {
|
|
81
|
-
V(e),
|
|
81
|
+
V(e), k.current?.querySelector(`[data-part="segment"][data-field="${e}"]`)?.focus();
|
|
82
82
|
}, []), tt = s(() => {
|
|
83
83
|
let e = U(), t = J.find((t) => e[t] === null) ?? J[0];
|
|
84
84
|
t !== void 0 && X(t);
|
|
@@ -101,11 +101,11 @@ function w({ "aria-describedby": o, "aria-label": c, "aria-labelledby": se, cale
|
|
|
101
101
|
J,
|
|
102
102
|
X
|
|
103
103
|
]);
|
|
104
|
-
let Q =
|
|
104
|
+
let Q = P !== !0 && F !== !0, $ = (e) => {
|
|
105
105
|
e.preventDefault(), e.stopPropagation();
|
|
106
106
|
}, nt = (e) => (t) => {
|
|
107
|
-
if (
|
|
108
|
-
let n =
|
|
107
|
+
if (Ne?.(t), t.defaultPrevented) return;
|
|
108
|
+
let n = k.current !== null && getComputedStyle(k.current).direction === "rtl", r = n ? "ArrowLeft" : "ArrowRight", i = n ? "ArrowRight" : "ArrowLeft";
|
|
109
109
|
if (t.key === r) {
|
|
110
110
|
$(t), Z(e, 1);
|
|
111
111
|
return;
|
|
@@ -117,63 +117,63 @@ function w({ "aria-describedby": o, "aria-label": c, "aria-labelledby": se, cale
|
|
|
117
117
|
if (Q && !t.altKey) {
|
|
118
118
|
switch (t.key) {
|
|
119
119
|
case "ArrowUp":
|
|
120
|
-
$(t), Y(
|
|
120
|
+
$(t), Y(v(U(), e, 1, R), "keyboard", t);
|
|
121
121
|
return;
|
|
122
122
|
case "ArrowDown":
|
|
123
|
-
$(t), Y(
|
|
123
|
+
$(t), Y(v(U(), e, -1, R), "keyboard", t);
|
|
124
124
|
return;
|
|
125
125
|
case "PageUp":
|
|
126
|
-
$(t), Y(
|
|
126
|
+
$(t), Y(v(U(), e, ye[e], R), "keyboard", t);
|
|
127
127
|
return;
|
|
128
128
|
case "PageDown":
|
|
129
|
-
$(t), Y(
|
|
129
|
+
$(t), Y(v(U(), e, -ye[e], R), "keyboard", t);
|
|
130
130
|
return;
|
|
131
131
|
case "Home":
|
|
132
|
-
$(t), Y(
|
|
132
|
+
$(t), Y(ie(U(), e, "min", R), "keyboard", t);
|
|
133
133
|
return;
|
|
134
134
|
case "Backspace":
|
|
135
135
|
case "Delete":
|
|
136
|
-
$(t), Y(
|
|
136
|
+
$(t), Y(ae(U(), e), "clear", t);
|
|
137
137
|
return;
|
|
138
138
|
case "End":
|
|
139
|
-
$(t), Y(
|
|
139
|
+
$(t), Y(ie(U(), e, "max", R), "keyboard", t);
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
if (/^\d$/.test(t.key)) {
|
|
143
143
|
$(t);
|
|
144
|
-
let n =
|
|
144
|
+
let n = ge(U(), e, Number(t.key), L, R);
|
|
145
145
|
Y(n.segments, "keyboard", t), n.advance && Z(e, 1);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
}, rt = (e) => {
|
|
149
|
-
if (
|
|
150
|
-
let t = e.clipboardData.getData("text/plain"), n = K ?
|
|
151
|
-
r !== null && (e.preventDefault(), Y(
|
|
149
|
+
if (Pe?.(e), e.defaultPrevented || !Q) return;
|
|
150
|
+
let t = e.clipboardData.getData("text/plain"), n = K ? de(t) : null, r = n === null ? L.parse(t) : fe(n.year, n.month, 1);
|
|
151
|
+
r !== null && (e.preventDefault(), Y(_(r), "keyboard", e));
|
|
152
152
|
}, it = () => {
|
|
153
153
|
V(void 0);
|
|
154
154
|
let e = U();
|
|
155
|
-
e.typing !== null && Y(
|
|
155
|
+
e.typing !== null && Y(oe(e, L, R), "blur", void 0);
|
|
156
156
|
}, at = (e) => {
|
|
157
157
|
e.target?.closest("[data-part=\"segment\"], button, a, input, select, textarea") ?? (e.preventDefault(), tt());
|
|
158
158
|
}, ot = (e) => {
|
|
159
159
|
Y(re, "clear", e);
|
|
160
160
|
let t = J[0];
|
|
161
161
|
t !== void 0 && X(t);
|
|
162
|
-
}, st = `${
|
|
163
|
-
|
|
162
|
+
}, st = `${Je}-value`, ct = G === null ? void 0 : K ? L.monthYear(G) : L.describe(G), lt = G !== null && De?.(G) === !0, ut = G !== null && !le(G, je, ke), dt = Qe === !0 || lt || ut, ft = J.every((e) => W[e] === null), pt = ve && !ft && Q, mt = /* @__PURE__ */ te(ee, { children: [
|
|
163
|
+
ze === void 0 ? null : /* @__PURE__ */ h("span", {
|
|
164
164
|
"data-part": "start",
|
|
165
|
-
children:
|
|
165
|
+
children: ze
|
|
166
166
|
}),
|
|
167
167
|
/* @__PURE__ */ h("div", {
|
|
168
|
-
"aria-describedby": [o,
|
|
169
|
-
"aria-disabled":
|
|
168
|
+
"aria-describedby": [o, D?.describedBy].filter(Boolean).join(" ") || void 0,
|
|
169
|
+
"aria-disabled": P === !0 || void 0,
|
|
170
170
|
"aria-invalid": dt ? !0 : void 0,
|
|
171
171
|
"aria-label": c,
|
|
172
|
-
"aria-labelledby": c === void 0 ? [
|
|
173
|
-
"aria-readonly":
|
|
174
|
-
"aria-required":
|
|
172
|
+
"aria-labelledby": c === void 0 ? [ce ?? D?.ids.label, st].filter(Boolean).join(" ") : void 0,
|
|
173
|
+
"aria-readonly": F === !0 || void 0,
|
|
174
|
+
"aria-required": I === !0 || void 0,
|
|
175
175
|
"data-part": "segments",
|
|
176
|
-
id:
|
|
176
|
+
id: Te ?? D?.ids.control,
|
|
177
177
|
onPaste: rt,
|
|
178
178
|
role: "group",
|
|
179
179
|
children: q.map((e, t) => {
|
|
@@ -183,16 +183,16 @@ function w({ "aria-describedby": o, "aria-label": c, "aria-labelledby": se, cale
|
|
|
183
183
|
children: e.value
|
|
184
184
|
}, `literal-${String(t)}`);
|
|
185
185
|
let n = e.type;
|
|
186
|
-
return /* @__PURE__ */ h(
|
|
187
|
-
disabled:
|
|
186
|
+
return /* @__PURE__ */ h(xe, {
|
|
187
|
+
disabled: P === !0,
|
|
188
188
|
field: n,
|
|
189
|
-
format:
|
|
189
|
+
format: L,
|
|
190
190
|
onBlur: it,
|
|
191
191
|
onFocus: () => V(n),
|
|
192
192
|
onKeyDown: nt(n),
|
|
193
|
-
|
|
194
|
-
readOnly:
|
|
195
|
-
reference:
|
|
193
|
+
label: qe(n),
|
|
194
|
+
readOnly: F === !0,
|
|
195
|
+
reference: R,
|
|
196
196
|
segments: W,
|
|
197
197
|
tabIndex: n === (B ?? J[0]) ? 0 : -1
|
|
198
198
|
}, n);
|
|
@@ -205,46 +205,46 @@ function w({ "aria-describedby": o, "aria-label": c, "aria-labelledby": se, cale
|
|
|
205
205
|
children: ct
|
|
206
206
|
}),
|
|
207
207
|
pt ? /* @__PURE__ */ h("button", {
|
|
208
|
-
"aria-label":
|
|
208
|
+
"aria-label": qe("clear"),
|
|
209
209
|
"data-part": "clear",
|
|
210
210
|
onClick: ot,
|
|
211
211
|
type: "button",
|
|
212
212
|
children: /* @__PURE__ */ h(t, { children: /* @__PURE__ */ h(e, { name: "x" }) })
|
|
213
213
|
}) : null,
|
|
214
|
-
|
|
214
|
+
Se === void 0 ? null : /* @__PURE__ */ h("span", {
|
|
215
215
|
"data-part": "end",
|
|
216
|
-
children:
|
|
216
|
+
children: Se
|
|
217
217
|
}),
|
|
218
218
|
/* @__PURE__ */ h("input", {
|
|
219
219
|
"data-part": "hidden-input",
|
|
220
|
-
name:
|
|
220
|
+
name: Me,
|
|
221
221
|
readOnly: !0,
|
|
222
222
|
type: "hidden",
|
|
223
|
-
value: G === null ? "" : K ?
|
|
223
|
+
value: G === null ? "" : K ? me({
|
|
224
224
|
year: G.year,
|
|
225
225
|
month: G.month
|
|
226
|
-
}) :
|
|
226
|
+
}) : pe(G)
|
|
227
227
|
})
|
|
228
228
|
] }), ht = {
|
|
229
|
-
...
|
|
229
|
+
...We,
|
|
230
230
|
children: mt,
|
|
231
231
|
className: b,
|
|
232
|
-
style:
|
|
233
|
-
...
|
|
232
|
+
style: Be,
|
|
233
|
+
...P === !0 ? { "data-disabled": "" } : {},
|
|
234
234
|
...dt ? { "data-invalid": "" } : {},
|
|
235
|
-
...
|
|
236
|
-
...
|
|
237
|
-
"data-calendar":
|
|
235
|
+
...F === !0 ? { "data-readonly": "" } : {},
|
|
236
|
+
...I === !0 ? { "data-required": "" } : {},
|
|
237
|
+
"data-calendar": Ye,
|
|
238
238
|
"data-part": "root",
|
|
239
|
-
"data-size":
|
|
239
|
+
"data-size": Xe,
|
|
240
240
|
"data-ui": "date-field",
|
|
241
|
-
"data-variant":
|
|
241
|
+
"data-variant": Ze,
|
|
242
242
|
onMouseDown: at,
|
|
243
|
-
ref:
|
|
243
|
+
ref: k
|
|
244
244
|
};
|
|
245
|
-
return
|
|
245
|
+
return T === void 0 ? /* @__PURE__ */ h("div", { ...ht }) : T(ht);
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function C({ field: e, format: t, reference: n, segments: r }) {
|
|
248
248
|
let i = r[e];
|
|
249
249
|
if (i === null) return t.pattern.find((t) => t.type === e)?.value ?? "";
|
|
250
250
|
let a = r.typing;
|
|
@@ -254,8 +254,8 @@ function ye({ field: e, format: t, reference: n, segments: r }) {
|
|
|
254
254
|
day: r.day ?? n.day
|
|
255
255
|
}, e);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
let d = l[t], f =
|
|
257
|
+
function xe({ disabled: e, field: t, format: n, onBlur: r, onFocus: i, onKeyDown: a, label: o, readOnly: s, reference: c, segments: l, tabIndex: u }) {
|
|
258
|
+
let d = l[t], f = ce(t, {
|
|
259
259
|
year: l.year ?? c.year,
|
|
260
260
|
month: l.month ?? c.month
|
|
261
261
|
}), p = d === null ? void 0 : t === "month" ? n.monthNames("long")[d - 1] ?? String(d) : String(d);
|
|
@@ -278,7 +278,7 @@ function be({ disabled: e, field: t, format: n, onBlur: r, onFocus: i, onKeyDown
|
|
|
278
278
|
},
|
|
279
279
|
role: "spinbutton",
|
|
280
280
|
tabIndex: e ? -1 : u,
|
|
281
|
-
children:
|
|
281
|
+
children: C({
|
|
282
282
|
field: t,
|
|
283
283
|
format: n,
|
|
284
284
|
reference: c,
|
|
@@ -287,4 +287,4 @@ function be({ disabled: e, field: t, format: n, onBlur: r, onFocus: i, onKeyDown
|
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
//#endregion
|
|
290
|
-
export { x as i,
|
|
290
|
+
export { x as i, y as n, ve as r, S as t };
|
package/dist/date-field.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./date-field-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./date-field-DEauLQVL.js";
|
|
2
2
|
export { t as DATE_FIELD_YEAR_PIVOT, r as DateField, n as DateFieldDefaultsProvider, e as useDateFieldDefaults };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
2
|
import { n, r } from "./i18n-DpW8lqJ1.js";
|
|
3
|
-
import { n as i, r as a, t as ee } from "./calendar-
|
|
3
|
+
import { n as i, r as a, t as ee } from "./calendar-xcoBnHpK.js";
|
|
4
4
|
import { b as o } from "./field-BxQFpOXS.js";
|
|
5
|
-
import { t as te } from "./date-field-
|
|
5
|
+
import { t as te } from "./date-field-DEauLQVL.js";
|
|
6
6
|
import { tabbables as ne } from "@slotted/core/focus";
|
|
7
7
|
import { createControllable as s } from "@slotted/core/state";
|
|
8
8
|
import { createContext as c, useCallback as re, useContext as ie, useEffect as l, useId as ae, useImperativeHandle as oe, useLayoutEffect as se, useMemo as ce, useRef as u, useState as d } from "react";
|
package/dist/date-picker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./date-picker-
|
|
1
|
+
import { n as e, r as t, t as n } from "./date-picker-C22jlzUv.js";
|
|
2
2
|
export { n as DatePicker, e as DatePickerDefaultsProvider, t as useDatePickerDefaults };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
2
|
import { n, r } from "./i18n-DpW8lqJ1.js";
|
|
3
|
-
import { i, t as a } from "./calendar-
|
|
3
|
+
import { i, t as a } from "./calendar-xcoBnHpK.js";
|
|
4
4
|
import { b as ee } from "./field-BxQFpOXS.js";
|
|
5
|
-
import { t as o } from "./date-field-
|
|
5
|
+
import { t as o } from "./date-field-DEauLQVL.js";
|
|
6
6
|
import { tabbables as te } from "@slotted/core/focus";
|
|
7
7
|
import { createControllable as s } from "@slotted/core/state";
|
|
8
8
|
import { createContext as c, useCallback as l, useContext as ne, useEffect as u, useId as re, useImperativeHandle as ie, useLayoutEffect as ae, useMemo as d, useRef as f, useState as p } from "react";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./date-range-picker-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./date-range-picker-BUKoddmL.js";
|
|
2
2
|
export { r as DateRangePicker, n as DateRangePickerDefaultsProvider, t as DateRangePickerPreset, e as useDateRangePickerDefaults };
|