@slotted/react 0.1.0-beta.2 → 0.1.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accordion-D-YuMJzk.js → accordion-lCqrmQ3w.js} +43 -43
- package/dist/accordion.js +1 -1
- 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/calendar-BZ6PP7Ke.js +436 -0
- package/dist/calendar.js +1 -1
- 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/{collapsible-CGo49NNW.js → collapsible-F-K36XbF.js} +17 -17
- package/dist/collapsible.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-Eb-a4jg3.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-Hr-OCU-H.js +290 -0
- package/dist/date-field.js +1 -1
- package/dist/date-picker-D3-y2Jxw.js +295 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-y3b82Wmf.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-CIRHVLQp.js +629 -0
- package/dist/datetime-picker.js +1 -1
- package/dist/datetime-range-picker-DM-1m98z.js +994 -0
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{detail-panel-qOJiNuzr.js → detail-panel-CW53lUjp.js} +3 -3
- package/dist/detail-panel.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/calendar.json +7 -0
- package/dist/docs/calendar.md +1 -0
- package/dist/docs/chart.json +7 -0
- package/dist/docs/chart.md +1 -0
- package/dist/docs/collapsible.json +1 -1
- package/dist/docs/collapsible.md +1 -1
- package/dist/docs/currency-field.json +32 -1
- package/dist/docs/currency-field.md +4 -1
- package/dist/docs/date-field.json +8 -1
- package/dist/docs/date-field.md +2 -1
- package/dist/docs/date-picker.examples.md +29 -0
- package/dist/docs/date-picker.json +16 -1
- package/dist/docs/date-picker.md +2 -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/guidelines/composition.md +10 -0
- package/dist/docs/guidelines/index.md +2 -0
- package/dist/docs/guidelines/list-pages.md +12 -1
- package/dist/docs/list.json +26 -1
- package/dist/docs/list.md +4 -1
- package/dist/docs/page.json +1 -0
- package/dist/docs/page.md +1 -0
- 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/select.json +1 -1
- package/dist/docs/select.md +1 -1
- package/dist/docs/side-navigation.json +2 -2
- package/dist/docs/side-navigation.md +19 -4
- package/dist/docs/skills/compose-screen/SKILL.md +7 -0
- 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 +91 -2
- package/dist/docs/table.md +14 -1
- package/dist/docs/tabs.examples.md +1 -1
- package/dist/docs/tabs.json +10 -2
- package/dist/docs/tabs.md +3 -1
- package/dist/docs/text-field.json +1 -1
- package/dist/docs/text-field.md +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-Dn1T7JCq.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-CHyy1o--.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-jF37b909.js +813 -0
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +92 -91
- 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-C1iWWl5Y.js} +3 -3
- 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/{page-kQgLctsA.js → page-IiYXk1sz.js} +32 -32
- package/dist/{page-header-CWEBfMGq.js → page-header-Bn4nIGfF.js} +1 -1
- package/dist/page-header.js +1 -1
- package/dist/page.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-M7Io4UL9.js} +278 -265
- 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-U9eJYCuB.js} +327 -292
- package/dist/table.js +2 -2
- package/dist/tabs-BtHmjlnM.js +348 -0
- package/dist/tabs.js +1 -1
- 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/accordion/accordion.d.ts.map +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/calendar/calendar.d.ts +1 -1
- package/dist/types/calendar/calendar.d.ts.map +1 -1
- package/dist/types/calendar/calendar.types.d.ts +9 -0
- package/dist/types/calendar/calendar.types.d.ts.map +1 -1
- package/dist/types/calendar/index.d.ts +1 -1
- package/dist/types/calendar/index.d.ts.map +1 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/collapsible/collapsible-parts.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/date-field/date-field.d.ts +1 -1
- package/dist/types/date-field/date-field.d.ts.map +1 -1
- package/dist/types/date-field/date-field.types.d.ts +7 -0
- package/dist/types/date-field/date-field.types.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.d.ts +5 -1
- package/dist/types/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.types.d.ts +20 -2
- package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
- package/dist/types/date-picker/index.d.ts +1 -1
- package/dist/types/date-picker/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/page/page.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/select/select-items.d.ts.map +1 -1
- package/dist/types/select/select-parts.d.ts.map +1 -1
- package/dist/types/select/select.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-defaults.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.d.ts +1 -1
- package/dist/types/table/table.d.ts.map +1 -1
- package/dist/types/table/table.types.d.ts +43 -1
- package/dist/types/table/table.types.d.ts.map +1 -1
- package/dist/types/tabs/tabs-parts.d.ts.map +1 -1
- package/dist/types/tabs/tabs.d.ts +1 -1
- package/dist/types/tabs/tabs.d.ts.map +1 -1
- package/dist/types/tabs/tabs.types.d.ts +18 -0
- package/dist/types/tabs/tabs.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/calendar-B3mio8iQ.js +0 -387
- package/dist/cascader-CARCYdHh.js +0 -1097
- package/dist/currency-field-B7OZ0hk7.js +0 -436
- package/dist/date-field-D_kLLTfL.js +0 -279
- 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/tabs-DQ36APY-.js +0 -343
- package/dist/toggle-group-DQBlI1TV.js +0 -140
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./time-range-picker-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./time-range-picker-DlZJsj1e.js";
|
|
2
2
|
export { n as TIME_RANGE_PICKER_MAX_OPTIONS, e as TIME_RANGE_PICKER_STEP, s as TimeRangePicker, i as TimeRangePickerDefaultsProvider, r as TimeRangePickerPreset, a as isSameTimeRange, o as timeRangePickerLengthLabel, t as useTimeRangePickerDefaults };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r } from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
|
+
import { r as n } from "./i18n-DpW8lqJ1.js";
|
|
3
|
+
import { r } from "./progress-indicator-DwvUSFFs.js";
|
|
4
|
+
import { createRemovalFocus as i } from "@slotted/core/focus";
|
|
5
|
+
import { createContext as a, useCallback as o, useContext as s, useEffect as c, useMemo as l, useRef as u, useState as d, useSyncExternalStore as f } from "react";
|
|
6
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
7
|
+
import { createPresence as g } from "@slotted/core/presence";
|
|
8
|
+
import { createPortalRoot as _ } from "@slotted/core/portal";
|
|
9
|
+
import { createPortal as v } from "react-dom";
|
|
10
10
|
import { toastMessages as y } from "@slotted/core/i18n";
|
|
11
11
|
import { createToastStore as b } from "@slotted/core/toast";
|
|
12
12
|
//#region src/toast/toast-defaults.tsx
|
|
13
|
-
var x =
|
|
13
|
+
var x = "F6", S = {
|
|
14
14
|
placement: "bottom-end",
|
|
15
15
|
attach: "portal",
|
|
16
16
|
stacking: "list",
|
|
@@ -26,13 +26,13 @@ var x = e(), S = "F6", C = {
|
|
|
26
26
|
duration: 5e3,
|
|
27
27
|
swipeThreshold: 48,
|
|
28
28
|
hotkey: "F6"
|
|
29
|
-
},
|
|
30
|
-
function
|
|
31
|
-
return
|
|
29
|
+
}, C = a(S);
|
|
30
|
+
function w() {
|
|
31
|
+
return s(C);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
let n =
|
|
35
|
-
return /* @__PURE__ */
|
|
33
|
+
function T({ children: e, ...t }) {
|
|
34
|
+
let n = w();
|
|
35
|
+
return /* @__PURE__ */ m(C.Provider, {
|
|
36
36
|
value: {
|
|
37
37
|
placement: t.placement ?? n.placement,
|
|
38
38
|
attach: t.attach ?? n.attach,
|
|
@@ -53,10 +53,10 @@ function E({ children: e, ...t }) {
|
|
|
53
53
|
children: e
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function E(e) {
|
|
57
57
|
return e.announcement === void 0 ? [e.title, e.description].filter((e) => typeof e == "string").join(". ") : e.announcement;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function D(e) {
|
|
60
60
|
let { id: t, duration: n, priority: r, loading: i, onStatusChange: a, ...o } = e, { announcement: s, ...c } = o;
|
|
61
61
|
return {
|
|
62
62
|
...t === void 0 ? {} : { id: t },
|
|
@@ -64,79 +64,79 @@ function O(e) {
|
|
|
64
64
|
...r === void 0 ? {} : { priority: r },
|
|
65
65
|
...i === void 0 ? {} : { loading: i },
|
|
66
66
|
...a === void 0 ? {} : { onStatusChange: a },
|
|
67
|
-
announcement:
|
|
67
|
+
announcement: E(e),
|
|
68
68
|
action: c.actions !== void 0,
|
|
69
69
|
data: c
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function O(e = {}) {
|
|
73
73
|
let t = b({
|
|
74
|
-
limit: e.limit ??
|
|
75
|
-
duration: e.duration ??
|
|
74
|
+
limit: e.limit ?? S.limit,
|
|
75
|
+
duration: e.duration ?? S.duration
|
|
76
76
|
});
|
|
77
77
|
return {
|
|
78
78
|
store: t,
|
|
79
|
-
show: (e = {}) => t.show(
|
|
80
|
-
update: (e, n) => t.update(e,
|
|
79
|
+
show: (e = {}) => t.show(D(e)),
|
|
80
|
+
update: (e, n) => t.update(e, D(n)),
|
|
81
81
|
dismiss: (e, n) => t.dismiss(e, n),
|
|
82
82
|
clear: (e) => t.clear(e),
|
|
83
83
|
pauseAll: () => t.pauseAll(),
|
|
84
84
|
resumeAll: () => t.resumeAll(),
|
|
85
85
|
promise: (e, n) => t.promise(e, {
|
|
86
|
-
loading:
|
|
87
|
-
success: typeof n.success == "function" ? (e) =>
|
|
88
|
-
error: typeof n.error == "function" ? (e) =>
|
|
86
|
+
loading: D(n.loading),
|
|
87
|
+
success: typeof n.success == "function" ? (e) => D(n.success(e)) : D(n.success),
|
|
88
|
+
error: typeof n.error == "function" ? (e) => D(n.error(e)) : D(n.error)
|
|
89
89
|
})
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
var
|
|
93
|
-
function
|
|
94
|
-
return
|
|
92
|
+
var k = O(), A = a(k), j = A.Provider;
|
|
93
|
+
function M() {
|
|
94
|
+
return s(A);
|
|
95
95
|
}
|
|
96
96
|
//#endregion
|
|
97
97
|
//#region src/toast/toast-parts.tsx
|
|
98
|
-
var
|
|
98
|
+
var N = {
|
|
99
99
|
accent: "circle-info",
|
|
100
100
|
secondary: null,
|
|
101
101
|
success: "circle-check",
|
|
102
102
|
warning: "circle-alert",
|
|
103
103
|
danger: "circle-x"
|
|
104
|
-
},
|
|
104
|
+
}, P = a({
|
|
105
105
|
tone: "accent",
|
|
106
106
|
loading: !1
|
|
107
107
|
});
|
|
108
|
-
function
|
|
109
|
-
let [n, r] =
|
|
108
|
+
function F(e, t) {
|
|
109
|
+
let [n, r] = d(e ? "entering" : "unmounted"), [i, a] = d(null), o = u(t);
|
|
110
110
|
o.current = t;
|
|
111
|
-
let [s] =
|
|
111
|
+
let [s] = d(() => g({
|
|
112
112
|
initialPresent: e,
|
|
113
113
|
skipInitialAnimation: !1,
|
|
114
114
|
onStatusChange: r,
|
|
115
115
|
onExitComplete: () => o.current()
|
|
116
116
|
}));
|
|
117
|
-
return
|
|
117
|
+
return c(() => {
|
|
118
118
|
s.setNode(i);
|
|
119
|
-
}, [s, i]),
|
|
119
|
+
}, [s, i]), c(() => {
|
|
120
120
|
s.request(e, "programmatic");
|
|
121
|
-
}, [s, e]),
|
|
121
|
+
}, [s, e]), c(() => () => s.destroy(), [s]), {
|
|
122
122
|
open: n === "open",
|
|
123
123
|
ref: a
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function I(e, t) {
|
|
127
127
|
let n = e?.startsWith("top") ? -1 : 1, r = t === "rtl";
|
|
128
128
|
return {
|
|
129
129
|
block: n,
|
|
130
130
|
inline: e?.endsWith("-start") ? r ? 1 : -1 : e?.endsWith("-end") ? r ? -1 : 1 : 0
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
let a =
|
|
133
|
+
function ee({ children: e, index: t = 0, message: n, ref: r, ...i }) {
|
|
134
|
+
let a = G(), o = n.data ?? {}, { open: s, ref: c } = F(n.status !== "closing", () => a.store.remove(n.id)), f = u(null), [g, _] = d(!1), [v, y] = d(null), b = o.tone ?? a.defaults.tone, x = o.variant ?? a.defaults.variant, S = o.dismissible ?? a.defaults.dismissible, C = (o.progress ?? a.defaults.progress) && n.duration > 0, w = l(() => ({
|
|
135
135
|
tone: b,
|
|
136
136
|
loading: n.loading
|
|
137
137
|
}), [b, n.loading]);
|
|
138
138
|
function T(e, t, r) {
|
|
139
|
-
|
|
139
|
+
f.current = null, _(!1), y(null), e.hasPointerCapture(t) && e.releasePointerCapture(t), r >= a.swipeThreshold && a.store.dismiss(n.id, "pointer");
|
|
140
140
|
}
|
|
141
141
|
let E = {
|
|
142
142
|
...i.style ?? {},
|
|
@@ -147,19 +147,19 @@ function R({ children: e, index: t = 0, message: n, ref: r, ...i }) {
|
|
|
147
147
|
"--slotted-toast-swipe-y": `${v.y}px`
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
-
return /* @__PURE__ */
|
|
150
|
+
return /* @__PURE__ */ m("li", {
|
|
151
151
|
...i,
|
|
152
152
|
"data-part": "item",
|
|
153
153
|
"data-tone": b,
|
|
154
154
|
"data-variant": x,
|
|
155
155
|
...s ? { "data-open": "" } : {},
|
|
156
156
|
...n.loading ? { "data-loading": "" } : {},
|
|
157
|
-
...
|
|
157
|
+
...g ? { "data-dragging": "" } : {},
|
|
158
158
|
onKeyDown: (e) => {
|
|
159
159
|
i.onKeyDown?.(e), !(e.defaultPrevented || e.key !== "Escape") && (e.stopPropagation(), a.store.dismiss(n.id, "escape"));
|
|
160
160
|
},
|
|
161
161
|
onPointerDown: (e) => {
|
|
162
|
-
i.onPointerDown?.(e), a.swipe && e.button === 0 && (e.target.closest("button, a, input, select, textarea") || (
|
|
162
|
+
i.onPointerDown?.(e), a.swipe && e.button === 0 && (e.target.closest("button, a, input, select, textarea") || (f.current = {
|
|
163
163
|
id: e.pointerId,
|
|
164
164
|
x: e.clientX,
|
|
165
165
|
y: e.clientY
|
|
@@ -167,51 +167,51 @@ function R({ children: e, index: t = 0, message: n, ref: r, ...i }) {
|
|
|
167
167
|
},
|
|
168
168
|
onPointerMove: (e) => {
|
|
169
169
|
i.onPointerMove?.(e);
|
|
170
|
-
let t =
|
|
170
|
+
let t = f.current;
|
|
171
171
|
if (!t || t.id !== e.pointerId) return;
|
|
172
|
-
let n = e.currentTarget, r = n.ownerDocument.defaultView, o =
|
|
173
|
-
!
|
|
172
|
+
let n = e.currentTarget, r = n.ownerDocument.defaultView, o = I(a.placement, r?.getComputedStyle(n).direction ?? "ltr"), s = o.inline === 0 ? 0 : Math.max(0, (e.clientX - t.x) * o.inline), c = Math.max(0, (e.clientY - t.y) * o.block);
|
|
173
|
+
!g && Math.max(s, c) < 2 || (_(!0), y({
|
|
174
174
|
x: s * o.inline,
|
|
175
175
|
y: c * o.block
|
|
176
176
|
}));
|
|
177
177
|
},
|
|
178
178
|
onPointerUp: (e) => {
|
|
179
|
-
if (i.onPointerUp?.(e), !
|
|
179
|
+
if (i.onPointerUp?.(e), !f.current || f.current.id !== e.pointerId) return;
|
|
180
180
|
let t = v === null ? 0 : Math.max(Math.abs(v.x), Math.abs(v.y));
|
|
181
181
|
T(e.currentTarget, e.pointerId, t);
|
|
182
182
|
},
|
|
183
183
|
onPointerCancel: (e) => {
|
|
184
|
-
i.onPointerCancel?.(e),
|
|
184
|
+
i.onPointerCancel?.(e), f.current && f.current.id === e.pointerId && T(e.currentTarget, e.pointerId, 0);
|
|
185
185
|
},
|
|
186
186
|
ref: (e) => {
|
|
187
187
|
c(e), typeof r == "function" ? r(e) : r && (r.current = e);
|
|
188
188
|
},
|
|
189
189
|
style: E,
|
|
190
190
|
tabIndex: i.tabIndex ?? -1,
|
|
191
|
-
children: /* @__PURE__ */
|
|
191
|
+
children: /* @__PURE__ */ m(P.Provider, {
|
|
192
192
|
value: w,
|
|
193
|
-
children: e ?? o.render?.(n) ?? /* @__PURE__ */
|
|
194
|
-
o.hideIcon ? null : /* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
S ? /* @__PURE__ */
|
|
193
|
+
children: e ?? o.render?.(n) ?? /* @__PURE__ */ h(p, { children: [
|
|
194
|
+
o.hideIcon ? null : /* @__PURE__ */ m(L, { children: o.icon }),
|
|
195
|
+
/* @__PURE__ */ h(R, { children: [o.title === void 0 ? null : /* @__PURE__ */ m(z, { children: o.title }), o.description === void 0 ? null : /* @__PURE__ */ m(B, { children: o.description })] }),
|
|
196
|
+
S ? /* @__PURE__ */ m(H, {
|
|
197
197
|
"aria-label": a.t("close"),
|
|
198
198
|
onClick: () => a.store.dismiss(n.id, "dismiss")
|
|
199
199
|
}) : null,
|
|
200
|
-
o.actions === void 0 ? null : /* @__PURE__ */
|
|
201
|
-
C ? /* @__PURE__ */
|
|
200
|
+
o.actions === void 0 ? null : /* @__PURE__ */ m(V, { children: o.actions }),
|
|
201
|
+
C ? /* @__PURE__ */ m(U, {}) : null
|
|
202
202
|
] })
|
|
203
203
|
})
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
let o =
|
|
206
|
+
function L({ children: n, render: i, ...a }) {
|
|
207
|
+
let o = s(P), c = N[o.tone], l = n ?? (o.loading ? /* @__PURE__ */ m(r, {
|
|
208
208
|
contained: !0,
|
|
209
209
|
decorative: !0,
|
|
210
210
|
delay: 0,
|
|
211
211
|
minDuration: 0,
|
|
212
212
|
tone: o.tone
|
|
213
|
-
}) :
|
|
214
|
-
name:
|
|
213
|
+
}) : c === null ? null : /* @__PURE__ */ m(t, { children: /* @__PURE__ */ m(e, {
|
|
214
|
+
name: c,
|
|
215
215
|
solid: !0
|
|
216
216
|
}) }));
|
|
217
217
|
if (l === null) return null;
|
|
@@ -221,70 +221,70 @@ function z({ children: e, render: r, ...a }) {
|
|
|
221
221
|
children: l,
|
|
222
222
|
"data-part": "icon"
|
|
223
223
|
};
|
|
224
|
-
return
|
|
224
|
+
return i === void 0 ? /* @__PURE__ */ m("span", { ...u }) : i(u);
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function R({ children: e, render: t, ...n }) {
|
|
227
227
|
let r = {
|
|
228
228
|
...n,
|
|
229
229
|
children: e,
|
|
230
230
|
"data-part": "content"
|
|
231
231
|
};
|
|
232
|
-
return t === void 0 ? /* @__PURE__ */
|
|
232
|
+
return t === void 0 ? /* @__PURE__ */ m("div", { ...r }) : t(r);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function z({ children: e, render: t, ...n }) {
|
|
235
235
|
let r = {
|
|
236
236
|
...n,
|
|
237
237
|
children: e,
|
|
238
238
|
"data-part": "title"
|
|
239
239
|
};
|
|
240
|
-
return t === void 0 ? /* @__PURE__ */
|
|
240
|
+
return t === void 0 ? /* @__PURE__ */ m("div", { ...r }) : t(r);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function B({ children: e, render: t, ...n }) {
|
|
243
243
|
let r = {
|
|
244
244
|
...n,
|
|
245
245
|
children: e,
|
|
246
246
|
"data-part": "description"
|
|
247
247
|
};
|
|
248
|
-
return t === void 0 ? /* @__PURE__ */
|
|
248
|
+
return t === void 0 ? /* @__PURE__ */ m("p", { ...r }) : t(r);
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function V({ children: e, render: t, ...n }) {
|
|
251
251
|
let r = {
|
|
252
252
|
...n,
|
|
253
253
|
children: e,
|
|
254
254
|
"data-part": "actions"
|
|
255
255
|
};
|
|
256
|
-
return t === void 0 ? /* @__PURE__ */
|
|
256
|
+
return t === void 0 ? /* @__PURE__ */ m("div", { ...r }) : t(r);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function H({ children: n, render: r, ...i }) {
|
|
259
259
|
let a = {
|
|
260
260
|
type: "button",
|
|
261
261
|
...i,
|
|
262
|
-
children:
|
|
262
|
+
children: n ?? /* @__PURE__ */ m(t, { children: /* @__PURE__ */ m(e, { name: "x" }) }),
|
|
263
263
|
"data-part": "close"
|
|
264
264
|
};
|
|
265
|
-
return r === void 0 ? /* @__PURE__ */
|
|
265
|
+
return r === void 0 ? /* @__PURE__ */ m("button", { ...a }) : r(a);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function U({ render: e, ...t }) {
|
|
268
268
|
let n = {
|
|
269
269
|
...t,
|
|
270
270
|
"aria-hidden": !0,
|
|
271
271
|
"data-part": "progress"
|
|
272
272
|
};
|
|
273
|
-
return e === void 0 ? /* @__PURE__ */
|
|
273
|
+
return e === void 0 ? /* @__PURE__ */ m("div", { ...n }) : e(n);
|
|
274
274
|
}
|
|
275
275
|
//#endregion
|
|
276
276
|
//#region src/toast/toast.tsx
|
|
277
|
-
var
|
|
278
|
-
function
|
|
279
|
-
let e =
|
|
277
|
+
var W = a(void 0);
|
|
278
|
+
function G() {
|
|
279
|
+
let e = s(W);
|
|
280
280
|
if (e === void 0) throw Error("Toast and its parts have to be rendered inside a ToastRegion.");
|
|
281
281
|
return e;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function te(e, t) {
|
|
284
284
|
let n = t.toLowerCase().split("+"), r = n.at(-1) ?? "", i = (e) => n.includes(e);
|
|
285
285
|
return e.key.toLowerCase() === r && e.altKey === i("alt") && e.ctrlKey === i("ctrl") && e.shiftKey === i("shift") && e.metaKey === i("meta");
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function ne(e) {
|
|
288
288
|
if (typeof e.getAnimations == "function" && e.getAnimations().some((e) => [
|
|
289
289
|
"block-size",
|
|
290
290
|
"height",
|
|
@@ -298,166 +298,166 @@ function te(e) {
|
|
|
298
298
|
let n = e.getBoundingClientRect().height;
|
|
299
299
|
return e.style.blockSize = t, n;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
let P =
|
|
301
|
+
function K({ attach: e, children: t, container: r, defaultToasts: a, duration: s, hotkey: l, limit: g, messages: x, onToastsChange: S, pauseOnHover: C, pauseWhenHidden: T, placement: E, ref: D, stacking: O, swipe: k, toaster: A, toasts: j, ...N }) {
|
|
302
|
+
let P = w(), F = M(), I = n(y, x), L = e ?? P.attach, R = E ?? P.placement, z = O ?? P.stacking, B = k ?? P.swipe, V = l ?? P.hotkey, H = j !== void 0, [U] = d(() => H ? b({
|
|
303
303
|
toasts: j,
|
|
304
|
-
defaultToasts:
|
|
305
|
-
limit:
|
|
306
|
-
duration:
|
|
307
|
-
}) : null), G =
|
|
308
|
-
|
|
304
|
+
defaultToasts: a ?? [],
|
|
305
|
+
limit: g ?? P.limit,
|
|
306
|
+
duration: s ?? P.duration
|
|
307
|
+
}) : null), G = U ?? (A ?? F).store;
|
|
308
|
+
c(() => {
|
|
309
309
|
G.configure({
|
|
310
|
-
limit:
|
|
311
|
-
duration:
|
|
310
|
+
limit: g ?? P.limit,
|
|
311
|
+
duration: s ?? P.duration,
|
|
312
312
|
pauseOnHover: C ?? P.pauseOnHover,
|
|
313
|
-
pauseWhenHidden:
|
|
313
|
+
pauseWhenHidden: T ?? P.pauseWhenHidden
|
|
314
314
|
});
|
|
315
315
|
}, [
|
|
316
316
|
G,
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
g,
|
|
318
|
+
s,
|
|
319
319
|
C,
|
|
320
|
-
|
|
320
|
+
T,
|
|
321
321
|
P.limit,
|
|
322
322
|
P.duration,
|
|
323
323
|
P.pauseOnHover,
|
|
324
324
|
P.pauseWhenHidden
|
|
325
|
-
]),
|
|
325
|
+
]), c(() => {
|
|
326
326
|
if (S !== void 0) return G.onRequest((e) => S(e.value, e));
|
|
327
|
-
}, [G, S]),
|
|
328
|
-
|
|
327
|
+
}, [G, S]), c(() => {
|
|
328
|
+
H && G.sync(j);
|
|
329
329
|
}, [
|
|
330
330
|
G,
|
|
331
|
-
|
|
331
|
+
H,
|
|
332
332
|
j
|
|
333
|
-
]),
|
|
334
|
-
let
|
|
335
|
-
|
|
333
|
+
]), c(() => () => U?.destroy(), [U]);
|
|
334
|
+
let K = f(G.subscribe, () => G.snapshot, () => G.snapshot), [q, re] = d(null), [J, ie] = d(null), [Y, X] = d(null), Z = u(null);
|
|
335
|
+
c(() => {
|
|
336
336
|
if (L !== "portal") {
|
|
337
|
-
|
|
337
|
+
X(null);
|
|
338
338
|
return;
|
|
339
339
|
}
|
|
340
|
-
let e =
|
|
341
|
-
origin:
|
|
342
|
-
container:
|
|
340
|
+
let e = _({
|
|
341
|
+
origin: J,
|
|
342
|
+
container: r ?? null
|
|
343
343
|
});
|
|
344
|
-
return
|
|
344
|
+
return X(e.container), () => e.release();
|
|
345
345
|
}, [
|
|
346
346
|
L,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
]),
|
|
350
|
-
let e =
|
|
351
|
-
if (!e ||
|
|
347
|
+
J,
|
|
348
|
+
r
|
|
349
|
+
]), c(() => {
|
|
350
|
+
let e = q?.ownerDocument ?? J?.ownerDocument;
|
|
351
|
+
if (!e || K.visible.length === 0) return;
|
|
352
352
|
let t = (t) => {
|
|
353
|
-
if (!
|
|
354
|
-
let n =
|
|
353
|
+
if (!te(t, V)) return;
|
|
354
|
+
let n = q?.querySelector("[data-part=\"item\"]");
|
|
355
355
|
if (!n) return;
|
|
356
356
|
t.preventDefault();
|
|
357
357
|
let r = e.activeElement;
|
|
358
|
-
Z.current = r instanceof HTMLElement && !
|
|
358
|
+
Z.current = r instanceof HTMLElement && !q?.contains(r) ? r : null, n.focus();
|
|
359
359
|
};
|
|
360
360
|
return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
|
|
361
361
|
}, [
|
|
362
|
+
q,
|
|
362
363
|
J,
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
let e = a(J, {
|
|
364
|
+
V,
|
|
365
|
+
K.visible.length
|
|
366
|
+
]), c(() => {
|
|
367
|
+
if (q === null) return;
|
|
368
|
+
let e = i(q, {
|
|
369
369
|
itemSelector: "[data-part=\"item\"]",
|
|
370
370
|
fallback: () => Z.current
|
|
371
371
|
});
|
|
372
372
|
return () => e.destroy();
|
|
373
|
-
}, [
|
|
374
|
-
let Q =
|
|
373
|
+
}, [q]);
|
|
374
|
+
let Q = u({
|
|
375
375
|
pointer: !1,
|
|
376
376
|
focus: !1
|
|
377
|
-
}), $ =
|
|
377
|
+
}), $ = o(() => {
|
|
378
378
|
G.setInteracting(Q.current.pointer || Q.current.focus);
|
|
379
379
|
}, [G]);
|
|
380
|
-
|
|
381
|
-
if (
|
|
382
|
-
let e =
|
|
380
|
+
c(() => {
|
|
381
|
+
if (z !== "stack" || q === null) return;
|
|
382
|
+
let e = q.querySelector("[data-part=\"list\"]"), t = q.ownerDocument.defaultView;
|
|
383
383
|
if (!e || !t || typeof t.ResizeObserver != "function") return;
|
|
384
384
|
let n = () => {
|
|
385
385
|
let n = [...e.querySelectorAll("[data-part=\"item\"]")], r = Number.parseFloat(t.getComputedStyle(e).rowGap) || 0, i = 0;
|
|
386
386
|
n.forEach((e, t) => {
|
|
387
|
-
let n =
|
|
388
|
-
e.style.setProperty("--slotted-toast-height", `${n}px`), e.style.setProperty("--slotted-toast-stack-offset", `${i}px`), t === 0 &&
|
|
389
|
-
}),
|
|
387
|
+
let n = ne(e);
|
|
388
|
+
e.style.setProperty("--slotted-toast-height", `${n}px`), e.style.setProperty("--slotted-toast-stack-offset", `${i}px`), t === 0 && q.style.setProperty("--slotted-toast-front-height", `${n}px`), i += n + r;
|
|
389
|
+
}), q.style.setProperty("--slotted-toast-stack-height", `${Math.max(0, i - r)}px`);
|
|
390
390
|
}, r = new t.ResizeObserver(n);
|
|
391
391
|
for (let t of e.querySelectorAll("[data-part=\"item\"]")) r.observe(t);
|
|
392
392
|
return n(), () => r.disconnect();
|
|
393
393
|
}, [
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
394
|
+
q,
|
|
395
|
+
z,
|
|
396
|
+
K.visible
|
|
397
397
|
]);
|
|
398
398
|
let ae = {
|
|
399
|
-
...
|
|
400
|
-
"--slotted-toast-count":
|
|
401
|
-
"--slotted-toast-play-state":
|
|
402
|
-
}, oe = /* @__PURE__ */
|
|
399
|
+
...N.style ?? {},
|
|
400
|
+
"--slotted-toast-count": K.visible.length,
|
|
401
|
+
"--slotted-toast-play-state": K.paused ? "paused" : "running"
|
|
402
|
+
}, oe = /* @__PURE__ */ m(W.Provider, {
|
|
403
403
|
value: {
|
|
404
404
|
store: G,
|
|
405
405
|
defaults: P,
|
|
406
|
-
swipe:
|
|
406
|
+
swipe: B,
|
|
407
407
|
swipeThreshold: P.swipeThreshold,
|
|
408
|
-
placement:
|
|
408
|
+
placement: R,
|
|
409
409
|
cameFrom: Z,
|
|
410
410
|
t: I
|
|
411
411
|
},
|
|
412
|
-
children: /* @__PURE__ */
|
|
412
|
+
children: /* @__PURE__ */ m("section", {
|
|
413
413
|
"aria-label": I("label"),
|
|
414
|
-
...
|
|
414
|
+
...N,
|
|
415
415
|
"data-attach": L,
|
|
416
416
|
"data-part": "root",
|
|
417
|
-
"data-placement":
|
|
418
|
-
"data-stacking":
|
|
419
|
-
"data-swipe": String(
|
|
417
|
+
"data-placement": R,
|
|
418
|
+
"data-stacking": z,
|
|
419
|
+
"data-swipe": String(B),
|
|
420
420
|
"data-ui": "toast",
|
|
421
|
-
...
|
|
421
|
+
...K.paused ? { "data-expanded": "" } : {},
|
|
422
422
|
onFocus: (e) => {
|
|
423
|
-
|
|
423
|
+
N.onFocus?.(e), Q.current.focus = !0, $();
|
|
424
424
|
},
|
|
425
425
|
onBlur: (e) => {
|
|
426
|
-
|
|
426
|
+
N.onBlur?.(e);
|
|
427
427
|
let t = e.relatedTarget;
|
|
428
428
|
(t === null || !e.currentTarget.contains(t)) && (Q.current.focus = !1, $());
|
|
429
429
|
},
|
|
430
430
|
onPointerEnter: (e) => {
|
|
431
|
-
|
|
431
|
+
N.onPointerEnter?.(e), Q.current.pointer = !0, $();
|
|
432
432
|
},
|
|
433
433
|
onPointerLeave: (e) => {
|
|
434
|
-
|
|
434
|
+
N.onPointerLeave?.(e), Q.current.pointer = !1, $();
|
|
435
435
|
},
|
|
436
436
|
ref: (e) => {
|
|
437
|
-
|
|
437
|
+
re(e), typeof D == "function" ? D(e) : D && (D.current = e);
|
|
438
438
|
},
|
|
439
439
|
role: "region",
|
|
440
440
|
style: ae,
|
|
441
|
-
tabIndex:
|
|
442
|
-
children: /* @__PURE__ */
|
|
441
|
+
tabIndex: N.tabIndex ?? -1,
|
|
442
|
+
children: /* @__PURE__ */ m("ol", {
|
|
443
443
|
"data-part": "list",
|
|
444
|
-
children:
|
|
444
|
+
children: K.visible.map((e, n) => t ? t(e) : /* @__PURE__ */ m(ee, {
|
|
445
445
|
index: n,
|
|
446
446
|
message: e
|
|
447
447
|
}, e.id))
|
|
448
448
|
})
|
|
449
449
|
})
|
|
450
450
|
});
|
|
451
|
-
return L === "portal" ? /* @__PURE__ */
|
|
451
|
+
return L === "portal" ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
|
|
452
452
|
"aria-hidden": "true",
|
|
453
453
|
hidden: !0,
|
|
454
|
-
ref:
|
|
454
|
+
ref: ie,
|
|
455
455
|
style: { display: "none" },
|
|
456
456
|
"data-slotted-toast-origin": ""
|
|
457
|
-
}),
|
|
457
|
+
}), Y === null ? null : v(oe, Y)] }) : oe;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
let { store: e } =
|
|
459
|
+
function q() {
|
|
460
|
+
let { store: e } = G(), t = f(e.subscribe, () => e.snapshot, () => e.snapshot);
|
|
461
461
|
return {
|
|
462
462
|
visible: t.visible.length,
|
|
463
463
|
queued: t.queued.length,
|
|
@@ -465,4 +465,4 @@ function Y() {
|
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
467
|
//#endregion
|
|
468
|
-
export {
|
|
468
|
+
export { w as _, V as a, B as c, z as d, x as f, k as g, O as h, ee as i, L as l, j as m, q as n, H as o, T as p, G as r, R as s, K as t, U as u, M as v };
|
package/dist/toast.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _ } from "./toast-
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _ } from "./toast-Bf3e0AgC.js";
|
|
2
2
|
export { i as TOAST_HOTKEY, s as Toast, t as ToastActions, d as ToastClose, m as ToastContent, f as ToastDefaultsProvider, n as ToastDescription, c as ToastIcon, g as ToastProgress, h as ToastRegion, r as ToastTitle, l as ToasterProvider, o as createToaster, a as toast, e as useToastDefaults, u as useToastQueue, p as useToastRegion, _ as useToaster };
|