@slotted/react 0.1.0-beta.7 → 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-sheet-CaUaP0K2.js → action-sheet-DD477dAw.js} +1 -1
- package/dist/action-sheet.js +1 -1
- package/dist/{calendar-BZ6PP7Ke.js → calendar-xcoBnHpK.js} +17 -17
- package/dist/calendar.js +1 -1
- package/dist/{column-manager-CFtJxQWS.js → column-manager-DonEo9wp.js} +1 -1
- package/dist/column-manager.js +1 -1
- package/dist/{command-palette-D1C1GDWC.js → command-palette-Dw03scvF.js} +244 -241
- package/dist/command-palette.js +1 -1
- package/dist/{data-grid-CjFQ2U6v.js → data-grid-B93D5XsR.js} +9 -9
- package/dist/data-grid.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/{dialog-yT-x3B9s.js → dialog-Ds0LJWE_.js} +156 -139
- package/dist/dialog.js +1 -1
- package/dist/docs/calendar.json +1 -1
- package/dist/{drawer-B_EgvFeX.js → drawer-DZ_29U6H.js} +4 -1
- package/dist/drawer.js +1 -1
- package/dist/{event-calendar-VUGigZIP.js → event-calendar-CPAun_ab.js} +1 -1
- package/dist/event-calendar.js +1 -1
- package/dist/{filter-bar-BzSOD3ad.js → filter-bar-BKKqH0ui.js} +4 -4
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-BuEBO1CB.js → import-export-center-Bg1Iavoa.js} +1 -1
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +21 -21
- package/dist/styles.css +1 -1
- package/dist/{table-C1kLS0-9.js → table-BTSOjlTn.js} +6 -6
- 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/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/drawer/drawer-parts.d.ts.map +1 -1
- package/dist/{upload-CXDjxuS8.js → upload-DGmsz9Hw.js} +1 -1
- package/dist/upload.js +1 -1
- package/package.json +11 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as e } from "./i18n-DpW8lqJ1.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { c as t, d as n, l as r, o as i, r as a, u as o } from "./drawer-
|
|
3
|
+
import { c as t, d as n, l as r, o as i, r as a, u as o } from "./drawer-DZ_29U6H.js";
|
|
4
4
|
import { createRovingTabindex as s } from "@slotted/core/focus";
|
|
5
5
|
import { createControllable as c } from "@slotted/core/state";
|
|
6
6
|
import { createContext as l, useCallback as u, useContext as d, useEffect as f, useId as p, useImperativeHandle as m, useMemo as h, useRef as g, useState as _ } from "react";
|
package/dist/action-sheet.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./action-sheet-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./action-sheet-DD477dAw.js";
|
|
2
2
|
export { r as ActionSheet, p as ActionSheetCancel, c as ActionSheetContent, s as ActionSheetDefaultsProvider, d as ActionSheetGroup, a as ActionSheetGroupLabel, e as ActionSheetHeader, l as ActionSheetItem, f as ActionSheetList, t as ActionSheetMessage, o as ActionSheetSeparator, m as ActionSheetTitle, n as ActionSheetTrigger, u as useActionSheet, i as useActionSheetDefaults };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
2
|
import { n, r } from "./i18n-DpW8lqJ1.js";
|
|
3
3
|
import { createControllable as i } from "@slotted/core/state";
|
|
4
|
-
import { createContext as a, useCallback as o, useContext as s, useEffect as c, useId as
|
|
4
|
+
import { createContext as a, useCallback as o, useContext as s, useEffect as c, useId as l, useImperativeHandle as u, useMemo as ee, useRef as d, useState as f } from "react";
|
|
5
5
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
6
6
|
import { calendarMessages as g } from "@slotted/core/i18n";
|
|
7
7
|
import { addDays as _, clampDate as v, compareDate as y, createDateFormat as te, endOfWeek as ne, isDateInRange as re, isSameDate as b, monthGrid as ie, plainDate as x, startOfWeek as ae, stepMonth as S, stepYear as C, todayIn as oe, visibleMonths as se, yearPage as w } from "@slotted/core/date";
|
|
@@ -95,13 +95,13 @@ var de = {
|
|
|
95
95
|
month: 4,
|
|
96
96
|
year: 4
|
|
97
97
|
}, M = 12;
|
|
98
|
-
function fe({ calendar: a, className: s, defaultFocusedDate: y, defaultValue: ie, defaultView: T, disabled: D, firstDayOfWeek: k, fixedWeeks: A, focusedDate: j, granularity: fe, invalid: me, isDateUnavailable: he, locale: ge, max: N, min: P, messages: _e, months: ve, onFocusedDateChange: ye, onKeyDown: be, onPreviewChange: xe, onValueChange: Se, onViewChange: Ce, outsideDays: we, readOnly: Te, ref: Ee, render: De, selectionMode: Oe = "single", style: ke, timeZone: Ae, value: F, view:
|
|
99
|
-
let
|
|
98
|
+
function fe({ calendar: a, className: s, defaultFocusedDate: y, defaultValue: ie, defaultView: T, disabled: D, firstDayOfWeek: k, fixedWeeks: A, focusedDate: j, granularity: fe, invalid: me, isDateUnavailable: he, locale: ge, max: N, min: P, messages: _e, months: ve, onFocusedDateChange: ye, onKeyDown: be, onPreviewChange: xe, onValueChange: Se, onViewChange: Ce, outsideDays: we, readOnly: Te, ref: Ee, render: De, selectionMode: Oe = "single", style: ke, timeZone: Ae, value: F, view: je, weekNumbers: Me, ...Ne }) {
|
|
99
|
+
let I = E(), Pe = n(), L = r(g, _e), R = d(null), Fe = l(), Ie = ge ?? Pe, Le = k ?? I.firstDayOfWeek, Re = Ae ?? I.timeZone, z = Math.max(1, ve ?? I.months), ze = Me ?? I.weekNumbers, Be = A ?? I.fixedWeeks, Ve = we ?? I.outsideDays ?? (z > 1 ? "hidden" : "shown"), He = a ?? I.calendar, B = D !== !0 && Te !== !0, V = ee(() => te({
|
|
100
100
|
locale: Ie,
|
|
101
101
|
firstDayOfWeek: Le
|
|
102
102
|
}), [Le, Ie]), [H, Ue] = f(null);
|
|
103
103
|
c(() => Ue(oe(Re)), [Re]);
|
|
104
|
-
let [We, Ge] = f(ie ?? null), U = F ?? We, W = ie ?? F ?? null, Ke = W === null ? null : Array.isArray(W) ? W[0] ?? null : "start" in W ? W.start : W, qe = y !== void 0 || j !== void 0 || Ke !== null, G = y ?? j ?? Ke ?? x(2026, 1, 1), [Je, Ye] = f(G), K = j ?? Je, q = d(!1), J = fe === "month", [Xe, Ze] = f(T ?? (J ? "month" : "day")), Qe =
|
|
104
|
+
let [We, Ge] = f(ie ?? null), U = F ?? We, W = ie ?? F ?? null, Ke = W === null ? null : Array.isArray(W) ? W[0] ?? null : "start" in W ? W.start : W, qe = y !== void 0 || j !== void 0 || Ke !== null, G = y ?? j ?? Ke ?? x(2026, 1, 1), [Je, Ye] = f(G), K = j ?? Je, q = d(!1), J = fe === "month", [Xe, Ze] = f(T ?? (J ? "month" : "day")), Qe = je ?? Xe, Y = J && Qe === "day" ? "month" : Qe, [$e, et] = f(null), X = Oe === "range" && B ? le(U, $e ?? K) : null, Z = X === null ? null : O(U) && U.start !== null && b(X.start, U.start) ? X.end : X.start, tt = d(null);
|
|
105
105
|
c(() => {
|
|
106
106
|
b(tt.current, Z) || (tt.current = Z, xe?.(Z));
|
|
107
107
|
}, [xe, Z]);
|
|
@@ -155,8 +155,8 @@ function fe({ calendar: a, className: s, defaultFocusedDate: y, defaultValue: ie
|
|
|
155
155
|
rt((e) => it(K, e));
|
|
156
156
|
}, [K, it]);
|
|
157
157
|
let $ = o((e) => {
|
|
158
|
-
|
|
159
|
-
}, [Ce,
|
|
158
|
+
je === void 0 && Ze(e), Ce?.(e);
|
|
159
|
+
}, [Ce, je]);
|
|
160
160
|
c(() => {
|
|
161
161
|
if (!q.current) return;
|
|
162
162
|
let e = R.current, t = e?.querySelector("[data-part=\"cell\"]:not([data-outside-month]) [data-part=\"day\"][tabindex=\"0\"], [data-part=\"period\"][tabindex=\"0\"]");
|
|
@@ -165,7 +165,7 @@ function fe({ calendar: a, className: s, defaultFocusedDate: y, defaultValue: ie
|
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
q.current = !1, t.focus();
|
|
168
|
-
}),
|
|
168
|
+
}), u(Ee, () => ({
|
|
169
169
|
focus: () => {
|
|
170
170
|
R.current?.querySelector("[data-part=\"day\"][tabindex=\"0\"], [data-part=\"period\"][tabindex=\"0\"]")?.focus();
|
|
171
171
|
},
|
|
@@ -313,11 +313,11 @@ function fe({ calendar: a, className: s, defaultFocusedDate: y, defaultValue: ie
|
|
|
313
313
|
} : {},
|
|
314
314
|
children: e
|
|
315
315
|
}, e))
|
|
316
|
-
}), gt = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
|
|
316
|
+
}), [gt, _t] = Y === "day" ? [L("previousMonth"), L("nextMonth")] : Y === "month" ? [L("previousYear"), L("nextYear")] : [L("previousYears"), L("nextYears")], vt = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
|
|
317
317
|
"data-part": "header",
|
|
318
318
|
children: [
|
|
319
319
|
/* @__PURE__ */ m("button", {
|
|
320
|
-
"aria-label":
|
|
320
|
+
"aria-label": gt,
|
|
321
321
|
"data-part": "previous",
|
|
322
322
|
disabled: !B,
|
|
323
323
|
onClick: ft(-1),
|
|
@@ -337,7 +337,7 @@ function fe({ calendar: a, className: s, defaultFocusedDate: y, defaultValue: ie
|
|
|
337
337
|
children: [mt, Y === "year" ? null : /* @__PURE__ */ m(t, { children: /* @__PURE__ */ m(e, { name: "chevron-down" }) })]
|
|
338
338
|
}),
|
|
339
339
|
/* @__PURE__ */ m("button", {
|
|
340
|
-
"aria-label":
|
|
340
|
+
"aria-label": _t,
|
|
341
341
|
"data-part": "next",
|
|
342
342
|
disabled: !B,
|
|
343
343
|
onClick: ft(1),
|
|
@@ -348,9 +348,9 @@ function fe({ calendar: a, className: s, defaultFocusedDate: y, defaultValue: ie
|
|
|
348
348
|
})
|
|
349
349
|
})
|
|
350
350
|
]
|
|
351
|
-
}), ht] }),
|
|
352
|
-
...
|
|
353
|
-
children:
|
|
351
|
+
}), ht] }), yt = {
|
|
352
|
+
...Ne,
|
|
353
|
+
children: vt,
|
|
354
354
|
className: s,
|
|
355
355
|
onKeyDown: dt,
|
|
356
356
|
style: ke,
|
|
@@ -366,9 +366,9 @@ function fe({ calendar: a, className: s, defaultFocusedDate: y, defaultValue: ie
|
|
|
366
366
|
"data-view": Y,
|
|
367
367
|
ref: R
|
|
368
368
|
};
|
|
369
|
-
return De === void 0 ? /* @__PURE__ */ m("div", { ...
|
|
369
|
+
return De === void 0 ? /* @__PURE__ */ m("div", { ...yt }) : De(yt);
|
|
370
370
|
}
|
|
371
|
-
function pe({ editable: e, firstDayOfWeek: t, fixedWeeks: n, focused: r, format: i, headingId: a, month: o, onHover: s, onSelect: c, outsideDays:
|
|
371
|
+
function pe({ editable: e, firstDayOfWeek: t, fixedWeeks: n, focused: r, format: i, headingId: a, month: o, onHover: s, onSelect: c, outsideDays: l, pending: u, today: ee, unavailable: d, value: f, weekNumbers: p }) {
|
|
372
372
|
let g = ie({
|
|
373
373
|
...o,
|
|
374
374
|
firstDayOfWeek: t,
|
|
@@ -402,7 +402,7 @@ function pe({ editable: e, firstDayOfWeek: t, fixedWeeks: n, focused: r, format:
|
|
|
402
402
|
scope: "row",
|
|
403
403
|
children: t.weekNumber
|
|
404
404
|
}) : null, t.days.map((t) => {
|
|
405
|
-
let n = t.outsideMonth, i = n &&
|
|
405
|
+
let n = t.outsideMonth, i = n && l === "hidden", a = d(t.date) || n && l === "shown", o = j(t.date, f), p = A(t.date, u ?? f), h = u !== null && p !== null && !o, g = b(t.date, r);
|
|
406
406
|
return /* @__PURE__ */ m("td", {
|
|
407
407
|
"data-part": "cell",
|
|
408
408
|
...n ? { "data-outside-month": "" } : {},
|
|
@@ -416,7 +416,7 @@ function pe({ editable: e, firstDayOfWeek: t, fixedWeeks: n, focused: r, format:
|
|
|
416
416
|
"aria-disabled": a ? !0 : void 0,
|
|
417
417
|
"aria-selected": o ? !0 : void 0,
|
|
418
418
|
"data-part": "day",
|
|
419
|
-
...
|
|
419
|
+
...ee !== null && b(t.date, ee) ? { "data-today": "" } : {},
|
|
420
420
|
onClick: (e) => {
|
|
421
421
|
a || c(t.date, "pointer", e);
|
|
422
422
|
},
|
package/dist/calendar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./calendar-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./calendar-xcoBnHpK.js";
|
|
2
2
|
export { c as Calendar, t as CalendarDefaultsProvider, i as asDates, o as isRange, n as isSameValue, e as isSelected, a as nextValue, s as rangeStateOf, r as useCalendarDefaults };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
2
|
import { _ as n, c as r, n as i, t as a } from "./menu-parts-BpQu2s4z.js";
|
|
3
3
|
import { r as o } from "./i18n-DpW8lqJ1.js";
|
|
4
|
-
import { d as s, o as c, u as l } from "./drawer-
|
|
4
|
+
import { d as s, o as c, u as l } from "./drawer-DZ_29U6H.js";
|
|
5
5
|
import { n as u } from "./icon-button-CCWkCDMs.js";
|
|
6
6
|
import { t as d } from "./checkbox-B4Sb1eXj.js";
|
|
7
7
|
import { t as f } from "./text-field-CbQ6UCAP.js";
|
package/dist/column-manager.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./column-manager-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./column-manager-DonEo9wp.js";
|
|
2
2
|
export { i as ColumnManager, t as ColumnManagerProvider, n as ColumnManagerRoot, r as ColumnManagerTrigger, e as useColumnManagerDefaults };
|