@slotted/react 0.1.0-beta.2 → 0.1.0-beta.3
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-C7cGnEyJ.js → action-bar-OACchRZw.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/{action-sheet-DgwzC3iY.js → action-sheet-C60BWUW8.js} +1 -1
- package/dist/action-sheet.js +1 -1
- package/dist/{app-shell-CXwma4XA.js → app-shell-CmYvnu_7.js} +310 -310
- package/dist/app-shell.js +1 -1
- package/dist/button-Db9f3Bxn.js +99 -0
- package/dist/button.js +2 -2
- package/dist/cascader-D1AhTyBL.js +1097 -0
- package/dist/cascader.js +1 -1
- package/dist/{chart-Gb_P3Kdq.js → chart-O0ZhkzJe.js} +381 -374
- package/dist/chart.js +1 -1
- package/dist/{checkbox-CwUOc-3u.js → checkbox-DfxFHZaU.js} +3 -3
- package/dist/{checkbox-group-BYTjgAcX.js → checkbox-group-9sDgrV5Z.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{color-picker-BlPR4g4H.js → color-picker-CwbWzCKg.js} +4 -4
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-B7_a_jDK.js → column-manager-CTtizVhm.js} +6 -6
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-C66dNlMR.js → combobox-BVMI9lg8.js} +266 -266
- package/dist/combobox.js +1 -1
- package/dist/{command-palette-BqRyNR9Y.js → command-palette-DFLbSOiv.js} +1 -1
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-DMiHdggw.js → context-menu-BuST6W94.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/currency-field-DD9A5U3D.js +455 -0
- package/dist/currency-field.js +1 -1
- package/dist/{dashboard-grid-CKdyO4j6.js → dashboard-grid-CBMP_-JV.js} +2 -2
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-rWMDNl-6.js → data-grid-BKaGMqIm.js} +19 -19
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-2xfDpHVC.js → data-list-oICmxGkA.js} +5 -5
- package/dist/data-list.js +1 -1
- package/dist/{date-field-D_kLLTfL.js → date-field-CYcN6diW.js} +1 -1
- package/dist/date-field.js +1 -1
- package/dist/date-picker-4X-_2ltN.js +264 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-CNOAtHwU.js +471 -0
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-T1gNdJ7t.js → datetime-field-B8TrmsDK.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/datetime-picker-HDVlUhzy.js +629 -0
- package/dist/datetime-picker.js +1 -1
- package/dist/datetime-range-picker-IqOFJtdW.js +994 -0
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{dialog-Dmy-m_pe.js → dialog-BHYDDj1S.js} +112 -113
- package/dist/dialog.js +1 -1
- package/dist/docs/app-shell.json +1 -1
- package/dist/docs/button-group.json +1 -0
- package/dist/docs/button-group.md +1 -1
- package/dist/docs/button.json +45 -11
- package/dist/docs/button.md +10 -6
- package/dist/docs/chart.json +7 -0
- package/dist/docs/chart.md +1 -0
- package/dist/docs/currency-field.json +32 -1
- package/dist/docs/currency-field.md +4 -1
- package/dist/docs/dialog.examples.md +26 -0
- package/dist/docs/dialog.json +14 -2
- package/dist/docs/dialog.md +1 -1
- package/dist/docs/list.json +26 -1
- package/dist/docs/list.md +4 -1
- package/dist/docs/popover.json +1 -1
- package/dist/docs/segmented-control.json +29 -1
- package/dist/docs/segmented-control.md +17 -1
- package/dist/docs/side-navigation.json +2 -2
- package/dist/docs/side-navigation.md +19 -4
- package/dist/docs/skills/theme-app/SKILL.md +5 -0
- package/dist/docs/split-button.json +1 -0
- package/dist/docs/split-button.md +1 -1
- package/dist/docs/stat-card.json +1 -0
- package/dist/docs/stat-card.md +1 -1
- package/dist/docs/table.examples.md +1 -1
- package/dist/docs/table.json +78 -2
- package/dist/docs/table.md +12 -1
- package/dist/docs/tabs.examples.md +1 -1
- package/dist/docs/tabs.json +1 -1
- package/dist/docs/toggle-group.json +14 -3
- package/dist/docs/toggle-group.md +3 -3
- package/dist/docs/toggle.json +12 -3
- package/dist/docs/toggle.md +3 -3
- package/dist/docs/tokens.md +25 -1
- package/dist/docs/top-navigation.examples.md +23 -5
- package/dist/docs/top-navigation.json +2 -2
- package/dist/docs/tour.json +1 -1
- package/dist/drawer-LXM44eso.js +757 -0
- package/dist/drawer.js +1 -1
- package/dist/entity-picker-CPDd73JR.js +1110 -0
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-DYjVwTI6.js → event-calendar-CnF3iIZD.js} +5 -5
- package/dist/event-calendar.js +1 -1
- package/dist/{field-BJh5HI7w.js → field-NJaCxl2h.js} +1 -1
- package/dist/{field-group-BDaspQPh.js → field-group-hAzVa2O9.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/field.js +1 -1
- package/dist/{filter-bar-Bh7cbqDE.js → filter-bar-D_xDcAp2.js} +20 -20
- package/dist/filter-bar.js +1 -1
- package/dist/{hover-card-CSDbA6zd.js → hover-card-BJE5dtaQ.js} +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/{icon-button-TnvMhK4o.js → icon-button-CCWkCDMs.js} +26 -24
- package/dist/import-export-center-DpY2DGBZ.js +813 -0
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +85 -84
- package/dist/{list-C1Y8MWp2.js → list-WsQ6ZzCa.js} +16 -12
- package/dist/{list-item-DN_mcouU.js → list-item-DpCwZIrd.js} +1 -1
- package/dist/list-item.js +1 -1
- package/dist/list.js +1 -1
- package/dist/{listbox-4WvqR0JF.js → listbox-Dv856z9I.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{loading-overlay-B83XFctM.js → loading-overlay-COfnckse.js} +73 -73
- package/dist/loading-overlay.js +1 -1
- package/dist/{markdown-CpfDn1LF.js → markdown-CeG8mUbI.js} +2 -2
- package/dist/markdown.js +1 -1
- package/dist/menu-parts-W58pVNUt.js +786 -0
- package/dist/menu.js +1 -1
- package/dist/{menubar-CtGavUTO.js → menubar-b2CruimJ.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/{multi-select-B-tuIwAu.js → multi-select-DQ5ds0fX.js} +390 -390
- package/dist/multi-select.js +1 -1
- package/dist/{notification-center-C4pEHJ3h.js → notification-center-Sz54IziY.js} +2 -2
- package/dist/notification-center.js +1 -1
- package/dist/{number-field-J_koud1r.js → number-field-BFIAmv-z.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-Bf8JUiVR.js → otp-input-BNQhuKaT.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/popover-Be7JWbGJ.js +475 -0
- package/dist/popover.js +1 -1
- package/dist/press-selection-DjOllE2B.js +29 -0
- package/dist/press-selection.js +2 -0
- package/dist/{prompt-composer-B7MMcER0.js → prompt-composer-BxpdkTpZ.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-BFpjhDkV.js → radio-group-BaVIP9UH.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-D1EsADFM.js → rating-DYBQBzwB.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-BueW-Lyb.js → saved-views-DlE_--Z9.js} +5 -5
- package/dist/saved-views.js +1 -1
- package/dist/{segmented-control-Cy_5D3Nj.js → segmented-control-DmuOGiu6.js} +28 -24
- package/dist/segmented-control.js +1 -1
- package/dist/{select-hRFp8nCj.js → select-DOFqPy26.js} +273 -273
- package/dist/select.js +1 -1
- package/dist/{side-navigation-YUiJRpng.js → side-navigation-CBLtCzuJ.js} +186 -187
- package/dist/side-navigation.js +1 -1
- package/dist/{slider-B432T6nD.js → slider-DTes4HLF.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{split-button-DHF3v3PJ.js → split-button-CPgHiy9G.js} +2 -2
- package/dist/split-button.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/{switch-4MHwKmkz.js → switch-DQzuIhPX.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-Bd79IwDC.js → table-Cipi2c5X.js} +206 -173
- package/dist/table.js +2 -2
- package/dist/{tags-input-DLdHLWrH.js → tags-input-CcOkm0AW.js} +1 -1
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-BktZbmzD.js → text-field-DLfIZ0fk.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-JAK2RJl0.js → textarea-CBJBJBi6.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-DCG_VtGO.js → time-field-DrhiCtUl.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-DuT1tf5-.js → time-picker-CRQsMJbQ.js} +102 -102
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-HwBvrrXN.js → time-range-picker-DlZJsj1e.js} +202 -202
- package/dist/time-range-picker.js +1 -1
- package/dist/{toast-wI8BtPY5.js → toast-Bf3e0AgC.js} +157 -157
- package/dist/toast.js +1 -1
- package/dist/toggle-group-7iBR9Rn1.js +142 -0
- package/dist/toggle-group.js +1 -1
- package/dist/{toolbar-CDQTydDx.js → toolbar-DDZpEftQ.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{tooltip-BggqPDcW.js → tooltip-DbKTPe_i.js} +108 -109
- package/dist/tooltip.js +1 -1
- package/dist/{top-navigation-COQZsNqW.js → top-navigation-e-tWMGNr.js} +255 -256
- package/dist/top-navigation.js +1 -1
- package/dist/{tour-C11DmYTC.js → tour-BTdt716T.js} +180 -180
- package/dist/tour.js +1 -1
- package/dist/{transfer-JA9TWjAw.js → transfer-CqZOTLMP.js} +6 -6
- package/dist/transfer.js +1 -1
- package/dist/types/app-shell/app-shell.d.ts.map +1 -1
- package/dist/types/button/button-link.d.ts +1 -1
- package/dist/types/button/button-link.d.ts.map +1 -1
- package/dist/types/button/button-root.d.ts +5 -3
- package/dist/types/button/button-root.d.ts.map +1 -1
- package/dist/types/button/button.constants.d.ts +2 -1
- package/dist/types/button/button.constants.d.ts.map +1 -1
- package/dist/types/button/button.d.ts +1 -1
- package/dist/types/button/button.d.ts.map +1 -1
- package/dist/types/button/button.types.d.ts +9 -2
- package/dist/types/button/button.types.d.ts.map +1 -1
- package/dist/types/button/index.d.ts +1 -1
- package/dist/types/button/index.d.ts.map +1 -1
- package/dist/types/button/toggle-button.d.ts +1 -1
- package/dist/types/button/toggle-button.d.ts.map +1 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/currency-field/currency-field.d.ts +1 -1
- package/dist/types/currency-field/currency-field.d.ts.map +1 -1
- package/dist/types/currency-field/currency-field.types.d.ts +14 -0
- package/dist/types/currency-field/currency-field.types.d.ts.map +1 -1
- package/dist/types/currency-field/index.d.ts +1 -1
- package/dist/types/currency-field/index.d.ts.map +1 -1
- package/dist/types/dialog/dialog-demo.d.ts +8 -0
- package/dist/types/dialog/dialog-demo.d.ts.map +1 -1
- package/dist/types/filter-bar/filter-bar.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/list/index.d.ts +1 -1
- package/dist/types/list/index.d.ts.map +1 -1
- package/dist/types/list/list-parts.d.ts +1 -1
- package/dist/types/list/list-parts.d.ts.map +1 -1
- package/dist/types/list/list.types.d.ts +12 -0
- package/dist/types/list/list.types.d.ts.map +1 -1
- package/dist/types/press-selection/index.d.ts +3 -0
- package/dist/types/press-selection/index.d.ts.map +1 -0
- package/dist/types/press-selection/press-selection.d.ts +23 -0
- package/dist/types/press-selection/press-selection.d.ts.map +1 -0
- package/dist/types/segmented-control/index.d.ts +1 -1
- package/dist/types/segmented-control/index.d.ts.map +1 -1
- package/dist/types/segmented-control/segmented-control-defaults.d.ts.map +1 -1
- package/dist/types/segmented-control/segmented-control.d.ts +1 -1
- package/dist/types/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/types/segmented-control/segmented-control.types.d.ts +10 -0
- package/dist/types/segmented-control/segmented-control.types.d.ts.map +1 -1
- package/dist/types/table/index.d.ts +2 -2
- package/dist/types/table/index.d.ts.map +1 -1
- package/dist/types/table/table-parts.d.ts +8 -2
- package/dist/types/table/table-parts.d.ts.map +1 -1
- package/dist/types/table/table.types.d.ts +28 -1
- package/dist/types/table/table.types.d.ts.map +1 -1
- package/dist/types/toggle/toggle.types.d.ts +1 -1
- package/dist/types/toggle/toggle.types.d.ts.map +1 -1
- package/dist/types/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/types/toggle-group/toggle-group.types.d.ts +6 -1
- package/dist/types/toggle-group/toggle-group.types.d.ts.map +1 -1
- package/dist/{upload-Bq_UiyMr.js → upload-DjnlVR8y.js} +2 -2
- package/dist/upload.js +1 -1
- package/dist/{wizard-B4GrlEqh.js → wizard-BxA08vXt.js} +1 -1
- package/dist/wizard.js +1 -1
- package/package.json +12 -7
- package/dist/button-DakQ-7Tm.js +0 -97
- package/dist/cascader-CARCYdHh.js +0 -1097
- package/dist/currency-field-B7OZ0hk7.js +0 -436
- package/dist/date-picker-DQ5SIhdA.js +0 -264
- package/dist/date-range-picker-lpB08hK_.js +0 -471
- package/dist/datetime-picker-0F0kDW-8.js +0 -629
- package/dist/datetime-range-picker-ClnEleth.js +0 -994
- package/dist/drawer-Dtospdqk.js +0 -758
- package/dist/entity-picker-Dm-y0RNE.js +0 -1111
- package/dist/import-export-center-CkZ_Ar9w.js +0 -813
- package/dist/menu-parts-BQej6eU9.js +0 -787
- package/dist/popover-DE22lSpV.js +0 -476
- package/dist/react-dom-DzrKNxo6.js +0 -273
- package/dist/toggle-group-DQBlI1TV.js +0 -140
|
@@ -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 "./datetime-range-picker-
|
|
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 "./datetime-range-picker-IqOFJtdW.js";
|
|
2
2
|
export { n as DATETIME_RANGE_PICKER_MAX_OPTIONS, e as DATETIME_RANGE_PICKER_MONTHS, a as DATETIME_RANGE_PICKER_STEP, c as DateTimeRangePicker, s as DateTimeRangePickerDefaultsProvider, i as DateTimeRangePickerPreset, t as dateTimeRangePickerLengthLabel, o as isSameDateTimeRange, r as useDateTimeRangePickerDefaults };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r } from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { createContext as o, useCallback as s, useContext as c, useEffect as l, useId as u, useImperativeHandle as d, useLayoutEffect as f, useMemo as ee, useRef as p, useState as m } from "react";
|
|
1
|
+
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
|
+
import { r as n } from "./i18n-DpW8lqJ1.js";
|
|
3
|
+
import { createFocusScope as r } from "@slotted/core/focus";
|
|
4
|
+
import { createControllable as i } from "@slotted/core/state";
|
|
5
|
+
import { createContext as a, useCallback as o, useContext as s, useEffect as c, useId as l, useImperativeHandle as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
7
6
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
8
|
-
import { createPresence as
|
|
9
|
-
import { createPortalRoot as
|
|
10
|
-
import { createDismissableLayer as
|
|
7
|
+
import { createPresence as ee } from "@slotted/core/presence";
|
|
8
|
+
import { createPortalRoot as v } from "@slotted/core/portal";
|
|
9
|
+
import { createDismissableLayer as y } from "@slotted/core/dismissable-layer";
|
|
10
|
+
import { createPortal as b } from "react-dom";
|
|
11
11
|
import { dialogMessages as te } from "@slotted/core/i18n";
|
|
12
12
|
//#region src/dialog/dialog-defaults.tsx
|
|
13
|
-
var x =
|
|
13
|
+
var x = a({
|
|
14
14
|
back: "close",
|
|
15
15
|
escape: "close",
|
|
16
16
|
fullScreen: "narrow",
|
|
@@ -23,7 +23,7 @@ var x = o({
|
|
|
23
23
|
surface: "panel"
|
|
24
24
|
});
|
|
25
25
|
function S() {
|
|
26
|
-
return
|
|
26
|
+
return s(x);
|
|
27
27
|
}
|
|
28
28
|
function C({ children: e, ...t }) {
|
|
29
29
|
let n = S();
|
|
@@ -45,38 +45,38 @@ function C({ children: e, ...t }) {
|
|
|
45
45
|
}
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/dialog/dialog.tsx
|
|
48
|
-
var
|
|
49
|
-
function
|
|
50
|
-
let e =
|
|
48
|
+
var w = a(void 0);
|
|
49
|
+
function T() {
|
|
50
|
+
let e = s(w);
|
|
51
51
|
if (e === void 0) throw Error("Every dialog part must be rendered inside Dialog or AlertDialog.");
|
|
52
52
|
return e;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
let
|
|
56
|
-
X.current === null && (X.current =
|
|
57
|
-
present:
|
|
54
|
+
function E({ back: e, children: t, container: r, defaultFullscreen: a, defaultOpen: s, escape: d, finalFocus: h, fullscreen: _, fullScreen: v, fullscreenToggle: y, initialFocus: b, loading: x, member: C, messages: T, modal: E, mount: D, onFullscreenChange: O, onOpenChange: k, open: A, outsidePress: j, placement: M, ref: ne, scroll: re, size: ie, surface: ae, tone: N }) {
|
|
55
|
+
let P = S(), F = n(te, T), I = l(), [L, R] = m(s ?? !1), z = A ?? L, B = C === "alertDialog", [V, oe] = m(a ?? !1), H = !B && (_ ?? V), U = !B && y === !0, W = B ? !0 : E ?? P.modal, G = B ? "none" : j ?? P.outsidePress, K = D ?? P.mount, q = ie ?? (B ? "sm" : P.size), J = v ?? (B ? "never" : P.fullScreen), se = b ?? (B ? "cancel" : "first"), ce = d ?? P.escape, le = e ?? P.back, ue = M ?? P.placement, de = re ?? P.scroll, fe = ae ?? P.surface, [Y, pe] = m(z ? "open" : "unmounted"), X = p(null);
|
|
56
|
+
X.current === null && (X.current = ee({
|
|
57
|
+
present: z,
|
|
58
58
|
onStatusChange: pe
|
|
59
|
-
})),
|
|
60
|
-
X.current?.sync(
|
|
61
|
-
}, [
|
|
59
|
+
})), c(() => {
|
|
60
|
+
X.current?.sync(z);
|
|
61
|
+
}, [z]), c(() => {
|
|
62
62
|
let e = X.current;
|
|
63
63
|
return () => e?.destroy();
|
|
64
64
|
}, []);
|
|
65
|
-
let me = p(
|
|
66
|
-
|
|
65
|
+
let me = p(z);
|
|
66
|
+
z && (me.current = !0);
|
|
67
67
|
let he = K === "eager" ? !0 : K === "lazy" ? me.current : Y !== "unmounted", Z = p({
|
|
68
68
|
cancel: null,
|
|
69
69
|
content: null,
|
|
70
70
|
trigger: null
|
|
71
|
-
}), [ge,
|
|
72
|
-
e === "cancel" && (Z.current.cancel = null), e === "title" &&
|
|
73
|
-
}), []), $ =
|
|
74
|
-
if (e ===
|
|
75
|
-
let
|
|
76
|
-
controlled:
|
|
77
|
-
initial:
|
|
71
|
+
}), [ge, _e] = m(!1), [Q, ve] = m(!1), ye = o((e, t) => (e === "cancel" && (Z.current.cancel = t), e === "title" && _e(!0), e === "description" && ve(!0), () => {
|
|
72
|
+
e === "cancel" && (Z.current.cancel = null), e === "title" && _e(!1), e === "description" && ve(!1);
|
|
73
|
+
}), []), $ = o((e, t, n, r) => {
|
|
74
|
+
if (e === z) return;
|
|
75
|
+
let a = !1, o = i({
|
|
76
|
+
controlled: A,
|
|
77
|
+
initial: z,
|
|
78
78
|
onRequest: (e) => {
|
|
79
|
-
|
|
79
|
+
a = e.cancelled, k?.(e.value, {
|
|
80
80
|
get cancelled() {
|
|
81
81
|
return e.cancelled;
|
|
82
82
|
},
|
|
@@ -89,17 +89,17 @@ function T({ back: e, children: t, container: n, defaultFullscreen: i, defaultOp
|
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
}).request(e, t, r);
|
|
92
|
-
|
|
92
|
+
a || o && R(e);
|
|
93
93
|
}, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
]), be =
|
|
98
|
-
e !== H &&
|
|
99
|
-
controlled:
|
|
94
|
+
z,
|
|
95
|
+
k,
|
|
96
|
+
A
|
|
97
|
+
]), be = o((e, t, n) => {
|
|
98
|
+
e !== H && i({
|
|
99
|
+
controlled: _,
|
|
100
100
|
initial: H,
|
|
101
101
|
onRequest: (e) => {
|
|
102
|
-
|
|
102
|
+
O?.(e.value, {
|
|
103
103
|
get cancelled() {
|
|
104
104
|
return e.cancelled;
|
|
105
105
|
},
|
|
@@ -110,13 +110,13 @@ function T({ back: e, children: t, container: n, defaultFullscreen: i, defaultOp
|
|
|
110
110
|
value: e.value
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
}).request(e, t, n) &&
|
|
113
|
+
}).request(e, t, n) && oe(e);
|
|
114
114
|
}, [
|
|
115
115
|
H,
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
_,
|
|
117
|
+
O
|
|
118
118
|
]);
|
|
119
|
-
|
|
119
|
+
u(ne, () => ({
|
|
120
120
|
open: () => $(!0, "programmatic", void 0, void 0),
|
|
121
121
|
close: (e) => $(!1, "programmatic", e, void 0),
|
|
122
122
|
focus: () => Z.current.content?.focus(),
|
|
@@ -124,14 +124,14 @@ function T({ back: e, children: t, container: n, defaultFullscreen: i, defaultOp
|
|
|
124
124
|
return Z.current.content;
|
|
125
125
|
}
|
|
126
126
|
}), [$]);
|
|
127
|
-
let xe =
|
|
127
|
+
let xe = f(() => ({
|
|
128
128
|
announce: ye,
|
|
129
129
|
close: (e, t, n) => $(!1, e, t, n),
|
|
130
|
-
container:
|
|
131
|
-
descriptionId:
|
|
130
|
+
container: r,
|
|
131
|
+
descriptionId: Q ? `${I}description` : "",
|
|
132
132
|
back: le,
|
|
133
133
|
escape: ce,
|
|
134
|
-
finalFocus:
|
|
134
|
+
finalFocus: h,
|
|
135
135
|
fullScreen: J,
|
|
136
136
|
fullscreen: H,
|
|
137
137
|
fullscreenToggle: U,
|
|
@@ -143,7 +143,7 @@ function T({ back: e, children: t, container: n, defaultFullscreen: i, defaultOp
|
|
|
143
143
|
mount: K,
|
|
144
144
|
mounted: he,
|
|
145
145
|
nodes: Z.current,
|
|
146
|
-
open:
|
|
146
|
+
open: z,
|
|
147
147
|
openWith: (e, t) => $(!0, e, void 0, t),
|
|
148
148
|
outsidePress: G,
|
|
149
149
|
placement: ue,
|
|
@@ -157,21 +157,21 @@ function T({ back: e, children: t, container: n, defaultFullscreen: i, defaultOp
|
|
|
157
157
|
scroll: de,
|
|
158
158
|
size: q,
|
|
159
159
|
surface: fe,
|
|
160
|
-
t:
|
|
161
|
-
titleId: ge ? `${
|
|
162
|
-
tone:
|
|
163
|
-
triggerId: `${
|
|
160
|
+
t: F,
|
|
161
|
+
titleId: ge ? `${I}title` : "",
|
|
162
|
+
tone: B ? N ?? "danger" : void 0,
|
|
163
|
+
triggerId: `${I}trigger`,
|
|
164
164
|
visible: Y === "open",
|
|
165
165
|
interactive: Y === "entering" || Y === "open"
|
|
166
166
|
}), [
|
|
167
167
|
ye,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
R,
|
|
171
|
-
H,
|
|
172
|
-
_e,
|
|
173
|
-
f,
|
|
168
|
+
I,
|
|
169
|
+
r,
|
|
174
170
|
z,
|
|
171
|
+
H,
|
|
172
|
+
Q,
|
|
173
|
+
h,
|
|
174
|
+
B,
|
|
175
175
|
x,
|
|
176
176
|
C,
|
|
177
177
|
he,
|
|
@@ -190,36 +190,35 @@ function T({ back: e, children: t, container: n, defaultFullscreen: i, defaultOp
|
|
|
190
190
|
be,
|
|
191
191
|
fe,
|
|
192
192
|
Y,
|
|
193
|
-
|
|
193
|
+
F,
|
|
194
194
|
ge,
|
|
195
|
-
|
|
195
|
+
N
|
|
196
196
|
]);
|
|
197
|
-
return /* @__PURE__ */ g(
|
|
197
|
+
return /* @__PURE__ */ g(w.Provider, {
|
|
198
198
|
value: xe,
|
|
199
199
|
children: t
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
return /* @__PURE__ */ g(
|
|
202
|
+
function D(e) {
|
|
203
|
+
return /* @__PURE__ */ g(E, {
|
|
204
204
|
...e,
|
|
205
205
|
member: "dialog"
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
return /* @__PURE__ */ g(
|
|
208
|
+
function O(e) {
|
|
209
|
+
return /* @__PURE__ */ g(E, {
|
|
210
210
|
...e,
|
|
211
211
|
member: "alertDialog"
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
214
|
//#endregion
|
|
215
215
|
//#region src/dialog/dialog-parts.tsx
|
|
216
|
-
|
|
217
|
-
function O(e) {
|
|
216
|
+
function k(e) {
|
|
218
217
|
return e.detail === 0 ? "keyboard" : "pointer";
|
|
219
218
|
}
|
|
220
|
-
var
|
|
221
|
-
function
|
|
222
|
-
let s =
|
|
219
|
+
var A = typeof document > "u" ? c : d;
|
|
220
|
+
function j({ children: e, className: t, onClick: n, ref: r, render: i, style: a, ...o }) {
|
|
221
|
+
let s = T(), c = {
|
|
223
222
|
...o,
|
|
224
223
|
"aria-controls": s.mounted ? `${s.triggerId}-content` : void 0,
|
|
225
224
|
"aria-expanded": s.open,
|
|
@@ -230,7 +229,7 @@ function ae({ children: e, className: t, onClick: n, ref: r, render: i, style: a
|
|
|
230
229
|
...s.open ? { "data-open": "" } : {},
|
|
231
230
|
id: s.triggerId,
|
|
232
231
|
onClick: (e) => {
|
|
233
|
-
n?.(e), !e.defaultPrevented && s.openWith(
|
|
232
|
+
n?.(e), !e.defaultPrevented && s.openWith(k(e), e);
|
|
234
233
|
},
|
|
235
234
|
ref: (e) => {
|
|
236
235
|
s.registerTrigger(e), typeof r == "function" ? r(e) : r && (r.current = e);
|
|
@@ -240,11 +239,11 @@ function ae({ children: e, className: t, onClick: n, ref: r, render: i, style: a
|
|
|
240
239
|
};
|
|
241
240
|
return i === void 0 ? /* @__PURE__ */ g("button", { ...c }) : i(c);
|
|
242
241
|
}
|
|
243
|
-
function
|
|
242
|
+
function M(e) {
|
|
244
243
|
let [t, n] = m(null);
|
|
245
|
-
return
|
|
244
|
+
return A(() => {
|
|
246
245
|
if (!e.mounted) return;
|
|
247
|
-
let t =
|
|
246
|
+
let t = v({
|
|
248
247
|
origin: e.nodes.trigger,
|
|
249
248
|
...e.container === void 0 ? {} : { container: e.container }
|
|
250
249
|
});
|
|
@@ -257,15 +256,15 @@ function k(e) {
|
|
|
257
256
|
e.nodes
|
|
258
257
|
]), t;
|
|
259
258
|
}
|
|
260
|
-
function
|
|
261
|
-
let s =
|
|
262
|
-
if (
|
|
259
|
+
function ne({ children: e, className: t, ref: n, render: i, style: a, ...o }) {
|
|
260
|
+
let s = T(), l = M(s), [u, d] = m(null), f = `${s.triggerId}-content`, p = s.titleId !== "" && o["aria-label"] === void 0, h = s.descriptionId !== "";
|
|
261
|
+
if (c(() => {
|
|
263
262
|
if (s.member === "alertDialog" && u !== null && u.querySelector("[data-part=\"description\"]") === null) throw Error("AlertDialog requires a DialogDescription: the alertdialog pattern makes aria-describedby mandatory.");
|
|
264
|
-
}, [u, s.member]),
|
|
263
|
+
}, [u, s.member]), c(() => {
|
|
265
264
|
if (u === null || !s.open) return;
|
|
266
265
|
let e = u.closest("[data-ui=\"dialog\"]");
|
|
267
266
|
if (e === null) return;
|
|
268
|
-
let t = s.nodes.trigger === null ? [] : [s.nodes.trigger], n =
|
|
267
|
+
let t = s.nodes.trigger === null ? [] : [s.nodes.trigger], n = y(e, {
|
|
269
268
|
back: s.modal && s.back === "close",
|
|
270
269
|
branches: t,
|
|
271
270
|
content: u,
|
|
@@ -277,16 +276,16 @@ function A({ children: e, className: t, ref: n, render: r, style: a, ...o }) {
|
|
|
277
276
|
},
|
|
278
277
|
outsidePress: s.outsidePress === "close",
|
|
279
278
|
outsidePressEvent: "click"
|
|
280
|
-
}),
|
|
279
|
+
}), i = s.initialFocus, a = s.finalFocus, o = r(u, {
|
|
281
280
|
contain: s.modal,
|
|
282
|
-
initial:
|
|
281
|
+
initial: i === "cancel" ? () => s.nodes.cancel : typeof i == "object" && i ? () => i.current : i,
|
|
283
282
|
...a === void 0 ? {} : { restore: a === !1 ? !1 : () => a.current }
|
|
284
283
|
});
|
|
285
284
|
return o.enter(), () => {
|
|
286
285
|
n.destroy(), o.destroy();
|
|
287
286
|
};
|
|
288
|
-
}, [u, s]), !s.mounted ||
|
|
289
|
-
let
|
|
287
|
+
}, [u, s]), !s.mounted || l === null) return null;
|
|
288
|
+
let ee = {
|
|
290
289
|
"data-full-screen": s.fullScreen,
|
|
291
290
|
...s.fullscreen ? { "data-fullscreen": "" } : {},
|
|
292
291
|
...s.loading ? { "data-loading": "" } : {},
|
|
@@ -303,8 +302,8 @@ function A({ children: e, className: t, ref: n, render: r, style: a, ...o }) {
|
|
|
303
302
|
"data-ui": "dialog"
|
|
304
303
|
}, v = {
|
|
305
304
|
...o,
|
|
306
|
-
...
|
|
307
|
-
...
|
|
305
|
+
...h ? { "aria-describedby": s.descriptionId } : {},
|
|
306
|
+
...p ? { "aria-labelledby": s.titleId } : {},
|
|
308
307
|
...s.modal ? { "aria-modal": !0 } : {},
|
|
309
308
|
children: e,
|
|
310
309
|
className: t,
|
|
@@ -315,21 +314,21 @@ function A({ children: e, className: t, ref: n, render: r, style: a, ...o }) {
|
|
|
315
314
|
},
|
|
316
315
|
role: s.member === "alertDialog" ? "alertdialog" : "dialog",
|
|
317
316
|
style: a
|
|
318
|
-
},
|
|
319
|
-
return (
|
|
320
|
-
...
|
|
317
|
+
}, te = i === void 0 ? /* @__PURE__ */ g("div", { ...v }) : i(v);
|
|
318
|
+
return b(/* @__PURE__ */ _("div", {
|
|
319
|
+
...ee,
|
|
321
320
|
...s.interactive ? {} : { inert: !0 },
|
|
322
321
|
ref: s.registerLayer,
|
|
323
322
|
children: [/* @__PURE__ */ g("div", { "data-part": "backdrop" }), /* @__PURE__ */ g("div", {
|
|
324
323
|
"data-part": "viewport",
|
|
325
|
-
children:
|
|
324
|
+
children: te
|
|
326
325
|
})]
|
|
327
|
-
}),
|
|
326
|
+
}), l);
|
|
328
327
|
}
|
|
329
|
-
function
|
|
330
|
-
let o =
|
|
328
|
+
function re({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
329
|
+
let o = T(), s = {
|
|
331
330
|
...a,
|
|
332
|
-
children: /* @__PURE__ */ _(h, { children: [e, o.fullscreenToggle ? /* @__PURE__ */ g(
|
|
331
|
+
children: /* @__PURE__ */ _(h, { children: [e, o.fullscreenToggle ? /* @__PURE__ */ g(ie, {}) : null] }),
|
|
333
332
|
className: t,
|
|
334
333
|
"data-part": "header",
|
|
335
334
|
style: i
|
|
@@ -339,22 +338,22 @@ function j({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
339
338
|
ref: n
|
|
340
339
|
}) : r(s);
|
|
341
340
|
}
|
|
342
|
-
function
|
|
343
|
-
let
|
|
341
|
+
function ie() {
|
|
342
|
+
let n = T();
|
|
344
343
|
return /* @__PURE__ */ g("button", {
|
|
345
|
-
"aria-label":
|
|
346
|
-
"aria-pressed":
|
|
344
|
+
"aria-label": n.t("fullScreen"),
|
|
345
|
+
"aria-pressed": n.fullscreen,
|
|
347
346
|
"data-part": "fullscreen",
|
|
348
|
-
onClick: (
|
|
349
|
-
|
|
347
|
+
onClick: (e) => {
|
|
348
|
+
e.defaultPrevented || n.setFullscreen(!n.fullscreen, e.detail === 0 ? "keyboard" : "pointer", e);
|
|
350
349
|
},
|
|
351
350
|
type: "button",
|
|
352
|
-
children: /* @__PURE__ */ g(
|
|
351
|
+
children: /* @__PURE__ */ g(t, { children: /* @__PURE__ */ g(e, { name: n.fullscreen ? "minimize" : "maximize" }) })
|
|
353
352
|
});
|
|
354
353
|
}
|
|
355
|
-
function
|
|
356
|
-
let o =
|
|
357
|
-
|
|
354
|
+
function ae({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
355
|
+
let o = T();
|
|
356
|
+
c(() => o.announce("title", null), [o]);
|
|
358
357
|
let s = {
|
|
359
358
|
...a,
|
|
360
359
|
children: e,
|
|
@@ -369,8 +368,8 @@ function M({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
369
368
|
}) : r(s);
|
|
370
369
|
}
|
|
371
370
|
function N({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
372
|
-
let o =
|
|
373
|
-
|
|
371
|
+
let o = T();
|
|
372
|
+
c(() => o.announce("description", null), [o]);
|
|
374
373
|
let s = {
|
|
375
374
|
...a,
|
|
376
375
|
children: e,
|
|
@@ -385,7 +384,7 @@ function N({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
385
384
|
}) : r(s);
|
|
386
385
|
}
|
|
387
386
|
function P({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
388
|
-
let o =
|
|
387
|
+
let o = T(), s = {
|
|
389
388
|
...a,
|
|
390
389
|
...o.loading ? { "aria-busy": !0 } : {},
|
|
391
390
|
children: e,
|
|
@@ -412,7 +411,7 @@ function F({ children: e, className: t, ref: n, render: r, style: i, ...a }) {
|
|
|
412
411
|
}) : r(o);
|
|
413
412
|
}
|
|
414
413
|
function I(e, t, n, r) {
|
|
415
|
-
let i =
|
|
414
|
+
let i = T();
|
|
416
415
|
return {
|
|
417
416
|
dialog: i,
|
|
418
417
|
handleClick: (e) => {
|
|
@@ -421,13 +420,13 @@ function I(e, t, n, r) {
|
|
|
421
420
|
part: e
|
|
422
421
|
};
|
|
423
422
|
}
|
|
424
|
-
function L({ children:
|
|
423
|
+
function L({ children: n, className: r, onClick: i, ref: a, render: o, style: s, value: c, ...l }) {
|
|
425
424
|
let { dialog: u, handleClick: d } = I("close", "dismiss", i, c);
|
|
426
425
|
if (u.member === "alertDialog") throw Error("AlertDialog has no close part: a confirmation is answered with AlertDialogCancel or AlertDialogAction, not dismissed by an ✕.");
|
|
427
426
|
let f = {
|
|
428
427
|
"aria-label": u.t("close"),
|
|
429
428
|
...l,
|
|
430
|
-
children:
|
|
429
|
+
children: n ?? /* @__PURE__ */ g(t, { children: /* @__PURE__ */ g(e, { name: "x" }) }),
|
|
431
430
|
className: r,
|
|
432
431
|
"data-part": "close",
|
|
433
432
|
onClick: d,
|
|
@@ -446,11 +445,11 @@ var R = {
|
|
|
446
445
|
warning: "triangle-alert",
|
|
447
446
|
danger: "circle-alert"
|
|
448
447
|
};
|
|
449
|
-
function z({ children:
|
|
450
|
-
let c =
|
|
448
|
+
function z({ children: n, className: r, ref: i, render: a, style: o, ...s }) {
|
|
449
|
+
let c = T(), l = {
|
|
451
450
|
"aria-hidden": !0,
|
|
452
451
|
...s,
|
|
453
|
-
children:
|
|
452
|
+
children: n ?? /* @__PURE__ */ g(t, { children: /* @__PURE__ */ g(e, { name: c.tone === void 0 ? "triangle-alert" : R[c.tone] }) }),
|
|
454
453
|
className: r,
|
|
455
454
|
"data-part": "icon",
|
|
456
455
|
style: o
|
|
@@ -496,4 +495,4 @@ function V({ children: e, className: t, onClick: n, ref: r, render: i, style: a,
|
|
|
496
495
|
}) : i(l);
|
|
497
496
|
}
|
|
498
497
|
//#endregion
|
|
499
|
-
export { L as a, F as c,
|
|
498
|
+
export { L as a, F as c, j as d, O as f, S as g, C as h, P as i, re as l, T as m, B as n, ne as o, D as p, z as r, N as s, V as t, ae as u };
|
package/dist/dialog.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./dialog-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./dialog-BHYDDj1S.js";
|
|
2
2
|
export { r as AlertDialog, m as AlertDialogAction, l as AlertDialogCancel, f as AlertDialogIcon, d as Dialog, o as DialogBody, e as DialogClose, u as DialogContent, a as DialogDefaultsProvider, p as DialogDescription, t as DialogFooter, s as DialogHeader, h as DialogTitle, n as DialogTrigger, c as useDialog, i as useDialogDefaults };
|
package/dist/docs/app-shell.json
CHANGED
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
"part": "nav",
|
|
195
195
|
"element": "nav, or the element render returns",
|
|
196
196
|
"required": false,
|
|
197
|
-
"purpose": "The navigation landmark, and one element across all three modes: the rail is this nav at another inline size, which keeps the focus and the scroll position where the reader left them. A query container of its own, named slotted-app-shell-nav, so the rows inside answer the rail without the shell telling them anything."
|
|
197
|
+
"purpose": "The navigation landmark, and one element across all three modes: the rail is this nav at another inline size, which keeps the focus and the scroll position where the reader left them. Its inline axis clips and its block axis scrolls, so a single column taller than the region keeps its foot reachable. A footer that must stay visible goes in nav-footer, between nav-header and a nav-body that scrolls. A query container of its own, named slotted-app-shell-nav, so the rows inside answer the rail without the shell telling them anything."
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
"part": "nav-rail",
|
|
@@ -140,6 +140,7 @@
|
|
|
140
140
|
"--slotted-text-muted",
|
|
141
141
|
"--slotted-tone-accent-solid-active",
|
|
142
142
|
"--slotted-tone-danger-solid-active",
|
|
143
|
+
"--slotted-tone-neutral-solid-active",
|
|
143
144
|
"--slotted-tone-secondary-solid-active",
|
|
144
145
|
"--slotted-tone-success-solid-active",
|
|
145
146
|
"--slotted-tone-warning-solid-active"
|
|
@@ -51,7 +51,7 @@ Excerpt — not a complete module
|
|
|
51
51
|
|
|
52
52
|
## Tokens
|
|
53
53
|
|
|
54
|
-
`--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-radius`, `--slotted-text-muted`, `--slotted-tone-accent-solid-active`, `--slotted-tone-danger-solid-active`, `--slotted-tone-secondary-solid-active`, `--slotted-tone-success-solid-active`, `--slotted-tone-warning-solid-active`
|
|
54
|
+
`--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-radius`, `--slotted-text-muted`, `--slotted-tone-accent-solid-active`, `--slotted-tone-danger-solid-active`, `--slotted-tone-neutral-solid-active`, `--slotted-tone-secondary-solid-active`, `--slotted-tone-success-solid-active`, `--slotted-tone-warning-solid-active`
|
|
55
55
|
|
|
56
56
|
## Examples
|
|
57
57
|
|