@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
package/dist/multi-select.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./multi-select-
|
|
1
|
+
import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./multi-select-DQ5ds0fX.js";
|
|
2
2
|
export { i as MULTI_SELECT_FALLBACK, c as MultiSelect, r as MultiSelectContent, e as MultiSelectControl, u as MultiSelectDefaultsProvider, l as MultiSelectGroup, a as MultiSelectItem, s as MultiSelectSeparator, o as NARROW_WIDTH, t as useMultiSelect, n as useMultiSelectDefaults };
|
|
@@ -1,9 +1,9 @@
|
|
|
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 } from "./icon-button-
|
|
4
|
-
import { a, i as o, n as s, r as c } from "./tooltip-
|
|
3
|
+
import { n as i } from "./icon-button-CCWkCDMs.js";
|
|
4
|
+
import { a, i as o, n as s, r as c } from "./tooltip-DbKTPe_i.js";
|
|
5
5
|
import { i as l, t as ee } from "./skeleton-2LSpg84Z.js";
|
|
6
|
-
import { a as u, r as d, t as te } from "./tabs-
|
|
6
|
+
import { a as u, r as d, t as te } from "./tabs-BtHmjlnM.js";
|
|
7
7
|
import { tabbables as ne } from "@slotted/core/focus";
|
|
8
8
|
import { createControllable as re } from "@slotted/core/state";
|
|
9
9
|
import { createContext as ie, useCallback as f, useContext as ae, useEffect as p, useId as oe, useImperativeHandle as se, useLayoutEffect as ce, useMemo as m, useRef as h, useState as g } from "react";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./notification-center-
|
|
1
|
+
import { n as e, r as t, t as n } from "./notification-center-C1iWWl5Y.js";
|
|
2
2
|
export { n as NotificationCenter, e as NotificationCenterDefaultsProvider, t as useNotificationCenterDefaults };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
2
|
import { n, r } from "./i18n-DpW8lqJ1.js";
|
|
3
|
-
import { b as i } from "./field-
|
|
3
|
+
import { b as i } from "./field-NJaCxl2h.js";
|
|
4
4
|
import { createControllable as a } from "@slotted/core/state";
|
|
5
5
|
import { createContext as o, useCallback as s, useContext as c, useEffect as l, useImperativeHandle as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
6
6
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
package/dist/number-field.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./number-field-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./number-field-BFIAmv-z.js";
|
|
2
2
|
export { r as NumberField, n as NumberFieldDefaultsProvider, t as NumberFieldScrub, e as useNumberFieldDefaults };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as e } from "./field-
|
|
1
|
+
import { b as e } from "./field-NJaCxl2h.js";
|
|
2
2
|
import { createControllable as t } from "@slotted/core/state";
|
|
3
3
|
import { createContext as n, useContext as r, useEffect as i, useRef as a, useState as o } from "react";
|
|
4
4
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
package/dist/otp-input.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./otp-input-
|
|
1
|
+
import { n as e, r as t, t as n } from "./otp-input-BNQhuKaT.js";
|
|
2
2
|
export { n as OtpInput, e as OtpInputDefaultsProvider, t as useOtpInputDefaults };
|
|
@@ -36,55 +36,55 @@ function y() {
|
|
|
36
36
|
return i(v);
|
|
37
37
|
}
|
|
38
38
|
var b = typeof document > "u" ? a : o;
|
|
39
|
-
function x({ children: t, className: n, fill: r, footer: i, ground:
|
|
40
|
-
let
|
|
41
|
-
ground:
|
|
42
|
-
inset:
|
|
43
|
-
loading:
|
|
44
|
-
scroll:
|
|
45
|
-
t:
|
|
46
|
-
width:
|
|
47
|
-
}, [
|
|
48
|
-
b(() => {
|
|
49
|
-
if (
|
|
50
|
-
let e = S(
|
|
51
|
-
let t =
|
|
39
|
+
function x({ children: t, className: n, fill: r, footer: i, ground: o, inset: s, landmark: f, loading: m, messages: g, ref: y, render: x, scroll: w, style: T, width: E, ...D }) {
|
|
40
|
+
let O = h(), k = e(p, g), A = o ?? O.ground, j = s ?? O.inset, M = f ?? O.landmark, N = w ?? O.scroll, P = E ?? O.width, F = {
|
|
41
|
+
ground: A,
|
|
42
|
+
inset: j,
|
|
43
|
+
loading: m === !0,
|
|
44
|
+
scroll: N,
|
|
45
|
+
t: k,
|
|
46
|
+
width: P
|
|
47
|
+
}, [I, L] = c(null);
|
|
48
|
+
a(() => {}, [I]), b(() => {
|
|
49
|
+
if (I === null || typeof ResizeObserver > "u") return;
|
|
50
|
+
let e = S(I) ?? I.ownerDocument.documentElement, t = new ResizeObserver(() => {
|
|
51
|
+
let t = I.querySelector(":scope > [data-part=\"footer\"]"), n = N === "self" ? 0 : t?.offsetHeight ?? 0;
|
|
52
52
|
e.style.setProperty(_, `${n}px`);
|
|
53
53
|
});
|
|
54
|
-
t.observe(
|
|
55
|
-
let n =
|
|
54
|
+
t.observe(I);
|
|
55
|
+
let n = I.querySelector(":scope > [data-part=\"footer\"]");
|
|
56
56
|
return n !== null && t.observe(n), () => {
|
|
57
57
|
t.disconnect(), e.style.removeProperty(_);
|
|
58
58
|
};
|
|
59
59
|
}, [
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
I,
|
|
61
|
+
N,
|
|
62
62
|
i !== void 0
|
|
63
63
|
]);
|
|
64
|
-
let
|
|
65
|
-
...
|
|
64
|
+
let R = {
|
|
65
|
+
...D,
|
|
66
66
|
children: /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", {
|
|
67
67
|
"data-part": "scroll",
|
|
68
68
|
children: t
|
|
69
69
|
}), /* @__PURE__ */ u(C, { children: i })] }),
|
|
70
70
|
className: n,
|
|
71
71
|
...r === !0 ? { "data-fill": "" } : {},
|
|
72
|
-
"data-ground":
|
|
73
|
-
...
|
|
72
|
+
"data-ground": A,
|
|
73
|
+
...m === !0 ? { "data-loading": "" } : {},
|
|
74
74
|
"data-part": "root",
|
|
75
|
-
"data-scroll":
|
|
75
|
+
"data-scroll": N,
|
|
76
76
|
"data-ui": "page",
|
|
77
|
-
"data-width":
|
|
78
|
-
style:
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
},
|
|
77
|
+
"data-width": P,
|
|
78
|
+
style: T
|
|
79
|
+
}, z = (e) => {
|
|
80
|
+
L(e), typeof y == "function" ? y(e) : y != null && (y.current = e);
|
|
81
|
+
}, B = M === "main" ? "main" : "div";
|
|
82
82
|
return /* @__PURE__ */ u(v.Provider, {
|
|
83
|
-
value:
|
|
84
|
-
children:
|
|
85
|
-
...
|
|
86
|
-
ref:
|
|
87
|
-
}) :
|
|
83
|
+
value: F,
|
|
84
|
+
children: x === void 0 ? /* @__PURE__ */ u(B, {
|
|
85
|
+
...R,
|
|
86
|
+
ref: z
|
|
87
|
+
}) : x(R)
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
function S(e) {
|
|
@@ -3,7 +3,7 @@ import { r as n } from "./i18n-DpW8lqJ1.js";
|
|
|
3
3
|
import { n as r, o as i } from "./progress-indicator-DwvUSFFs.js";
|
|
4
4
|
import { t as a } from "./skeleton-2LSpg84Z.js";
|
|
5
5
|
import { n as o } from "./container-CjxY6rYv.js";
|
|
6
|
-
import { a as s } from "./page-
|
|
6
|
+
import { a as s } from "./page-IiYXk1sz.js";
|
|
7
7
|
import { createControllable as c } from "@slotted/core/state";
|
|
8
8
|
import { createContext as l, useContext as u, useEffect as d, useId as f, useImperativeHandle as p, useLayoutEffect as m, useRef as h, useState as g } from "react";
|
|
9
9
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
package/dist/page-header.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as e, S as t, T as n, _ as r, a as i, b as a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./page-header-
|
|
1
|
+
import { C as e, S as t, T as n, _ as r, a as i, b as a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./page-header-Bn4nIGfF.js";
|
|
2
2
|
export { t as PageHeader, y as PageHeaderActions, m as PageHeaderArea, _ as PageHeaderBack, d as PageHeaderBreadcrumbs, i as PageHeaderContent, h as PageHeaderControls, S as PageHeaderDefaultsProvider, v as PageHeaderDescription, o as PageHeaderFigure, f as PageHeaderHeading, b as PageHeaderMarks, s as PageHeaderNav, c as PageHeaderNavigation, g as PageHeaderPin, p as PageHeaderProgress, u as PageHeaderSubheading, l as PageHeaderTabs, r as PageHeaderTitle, x as PageHeaderTitleArea, w as PageHeaderTitleRow, a as PageHeaderToggle, C as PageHeaderVisual, e as usePageHeader, n as usePageHeaderDefaults };
|
package/dist/page.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 "./page-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./page-IiYXk1sz.js";
|
|
2
2
|
export { o as Page, n as PageBody, r as PageDefaultsProvider, i as PageFooter, t as STICKY_BOTTOM_PROPERTY, e as usePage, a as usePageDefaults };
|
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
|
+
import { r as n } from "./i18n-DpW8lqJ1.js";
|
|
3
|
+
import { createControllable as r } from "@slotted/core/state";
|
|
4
|
+
import { Children as i, createContext as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useImperativeHandle as d, useLayoutEffect as f, useRef as p, useState as m } from "react";
|
|
5
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
6
|
+
import { createPresence as v } from "@slotted/core/presence";
|
|
7
|
+
import { createPortalRoot as y, setPortalContainer as b } from "@slotted/core/portal";
|
|
8
|
+
import { createDismissableLayer as x } from "@slotted/core/dismissable-layer";
|
|
9
|
+
import { createPositioner as S } from "@slotted/core/positioner";
|
|
10
|
+
import { createPortal as C } from "react-dom";
|
|
11
|
+
import { popoverMessages as w } from "@slotted/core/i18n";
|
|
12
|
+
//#region src/popover/popover-defaults.tsx
|
|
13
|
+
var T = {
|
|
14
|
+
align: "center",
|
|
15
|
+
alignOffset: 0,
|
|
16
|
+
arrow: !0,
|
|
17
|
+
arrowPadding: 12,
|
|
18
|
+
autoFocus: !0,
|
|
19
|
+
closeOnEscape: !0,
|
|
20
|
+
closeOnOutsidePress: !0,
|
|
21
|
+
collisionPadding: 8,
|
|
22
|
+
flip: !0,
|
|
23
|
+
hideWhenDetached: !1,
|
|
24
|
+
mount: "active",
|
|
25
|
+
portal: !0,
|
|
26
|
+
shift: !0,
|
|
27
|
+
side: "bottom",
|
|
28
|
+
sideOffset: 0,
|
|
29
|
+
size: "md",
|
|
30
|
+
strategy: "absolute",
|
|
31
|
+
width: "auto"
|
|
32
|
+
}, E = a(T);
|
|
33
|
+
function D() {
|
|
34
|
+
return c(E);
|
|
35
|
+
}
|
|
36
|
+
function O({ children: e, container: t, ...n }) {
|
|
37
|
+
let r = {
|
|
38
|
+
...D(),
|
|
39
|
+
...k(n)
|
|
40
|
+
};
|
|
41
|
+
return l(() => {
|
|
42
|
+
if (t !== void 0) return b(t), () => b(null);
|
|
43
|
+
}, [t]), /* @__PURE__ */ g(E.Provider, {
|
|
44
|
+
value: r,
|
|
45
|
+
children: e
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function k(e) {
|
|
49
|
+
let t = Object.entries(e).filter(([, e]) => e !== void 0);
|
|
50
|
+
return Object.fromEntries(t);
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/popover/popover.tsx
|
|
54
|
+
var A = a(void 0), j = a({ current: void 0 });
|
|
55
|
+
function ee() {
|
|
56
|
+
return c(j);
|
|
57
|
+
}
|
|
58
|
+
function M() {
|
|
59
|
+
let e = c(A);
|
|
60
|
+
if (e === void 0) throw Error("Every Popover part has to be inside a Popover.");
|
|
61
|
+
return e;
|
|
62
|
+
}
|
|
63
|
+
function N({ align: e, alignOffset: t, arrow: i, arrowPadding: a, autoFocus: o, children: c, closeOnEscape: l, closeOnOutsidePress: f, collisionPadding: h, defaultOpen: _, disabled: v, finalFocus: y, flip: b, hideWhenDetached: x, initialFocus: S, messages: C, mount: T, onOpenChange: E, open: O, portal: k, ref: ee, shift: M, side: N, sideOffset: P, size: F, strategy: I, width: L }) {
|
|
64
|
+
let R = D(), z = n(w, C), B = u(), [V, H] = m(_ ?? !1), [U, W] = m(null), [G, K] = m(null), [q, J] = m(null), [Y, X] = m(null), [Z, te] = m(!1), [ne, re] = m(!1), ie = p(void 0), ae = v === !0, Q = (O ?? V) && !ae, oe = p(Q);
|
|
65
|
+
Q && (oe.current = !0);
|
|
66
|
+
let se = p({
|
|
67
|
+
current: Q,
|
|
68
|
+
onOpenChange: E,
|
|
69
|
+
open: O
|
|
70
|
+
});
|
|
71
|
+
se.current = {
|
|
72
|
+
current: Q,
|
|
73
|
+
onOpenChange: E,
|
|
74
|
+
open: O
|
|
75
|
+
};
|
|
76
|
+
let $ = s((e, t, n) => {
|
|
77
|
+
let i = se.current;
|
|
78
|
+
if (e === i.current) return;
|
|
79
|
+
let a = !1, o = r({
|
|
80
|
+
controlled: i.open,
|
|
81
|
+
initial: i.current,
|
|
82
|
+
onRequest: (e) => {
|
|
83
|
+
a = e.cancelled, i.onOpenChange?.(e.value, e);
|
|
84
|
+
}
|
|
85
|
+
}).request(e, t, n);
|
|
86
|
+
a || o && H(e);
|
|
87
|
+
}, []);
|
|
88
|
+
d(ee, () => ({
|
|
89
|
+
close: () => $(!1, "programmatic"),
|
|
90
|
+
open: () => $(!0, "programmatic"),
|
|
91
|
+
reposition: () => ie.current?.()
|
|
92
|
+
}), [$]);
|
|
93
|
+
let ce = {
|
|
94
|
+
align: e ?? R.align,
|
|
95
|
+
alignOffset: t ?? R.alignOffset,
|
|
96
|
+
anchorNode: G,
|
|
97
|
+
arrowNode: q,
|
|
98
|
+
arrowPadding: a ?? R.arrowPadding,
|
|
99
|
+
autoFocus: o ?? R.autoFocus,
|
|
100
|
+
closeOnEscape: l ?? R.closeOnEscape,
|
|
101
|
+
closeOnOutsidePress: f ?? R.closeOnOutsidePress,
|
|
102
|
+
collisionPadding: h ?? R.collisionPadding,
|
|
103
|
+
contentId: `${B}panel`,
|
|
104
|
+
contentNode: Y,
|
|
105
|
+
descriptionId: `${B}description`,
|
|
106
|
+
disabled: ae,
|
|
107
|
+
finalFocus: y,
|
|
108
|
+
flip: b ?? R.flip,
|
|
109
|
+
hasDescription: ne,
|
|
110
|
+
hasTitle: Z,
|
|
111
|
+
hideWhenDetached: x ?? R.hideWhenDetached,
|
|
112
|
+
initialFocus: S,
|
|
113
|
+
mount: T ?? R.mount,
|
|
114
|
+
open: Q,
|
|
115
|
+
portal: k ?? R.portal,
|
|
116
|
+
seen: oe.current,
|
|
117
|
+
setAnchorNode: K,
|
|
118
|
+
setArrowNode: J,
|
|
119
|
+
setContentNode: X,
|
|
120
|
+
setHasDescription: re,
|
|
121
|
+
setHasTitle: te,
|
|
122
|
+
setTriggerNode: W,
|
|
123
|
+
shift: M ?? R.shift,
|
|
124
|
+
showArrow: i ?? R.arrow,
|
|
125
|
+
side: N ?? R.side,
|
|
126
|
+
sideOffset: P ?? R.sideOffset,
|
|
127
|
+
size: F ?? R.size,
|
|
128
|
+
strategy: I ?? R.strategy,
|
|
129
|
+
t: z,
|
|
130
|
+
titleId: `${B}title`,
|
|
131
|
+
toggle: $,
|
|
132
|
+
triggerNode: U,
|
|
133
|
+
width: L ?? R.width
|
|
134
|
+
};
|
|
135
|
+
return /* @__PURE__ */ g(A.Provider, {
|
|
136
|
+
value: ce,
|
|
137
|
+
children: /* @__PURE__ */ g(j.Provider, {
|
|
138
|
+
value: ie,
|
|
139
|
+
children: c
|
|
140
|
+
})
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/popover/popover-parts.tsx
|
|
145
|
+
function P(e, t) {
|
|
146
|
+
return (n) => {
|
|
147
|
+
e?.(n), n.defaultPrevented || t(n);
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function F(e, ...t) {
|
|
151
|
+
for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
152
|
+
}
|
|
153
|
+
function I(e, t) {
|
|
154
|
+
return e === void 0 ? null : typeof e == "string" ? t?.querySelector(e) ?? null : e instanceof Element ? e : e.current ?? null;
|
|
155
|
+
}
|
|
156
|
+
function L(e, t, n, r) {
|
|
157
|
+
if (n === "center" || r === "anchor" && (t === "top" || t === "bottom")) return 0;
|
|
158
|
+
let i = Number.parseFloat(e.ownerDocument.defaultView?.getComputedStyle(e).paddingTop ?? "") || 0;
|
|
159
|
+
return n === "start" ? -i : i;
|
|
160
|
+
}
|
|
161
|
+
function R({ children: e, ref: t, render: n, ...r }) {
|
|
162
|
+
let i = M(), a = (e) => {
|
|
163
|
+
i.toggle(!i.open, e.detail === 0 ? "keyboard" : "pointer", e.nativeEvent);
|
|
164
|
+
}, o = {
|
|
165
|
+
...r,
|
|
166
|
+
children: e,
|
|
167
|
+
...i.contentNode === null ? {} : { "aria-controls": i.contentId },
|
|
168
|
+
"aria-expanded": i.open,
|
|
169
|
+
"aria-haspopup": "dialog",
|
|
170
|
+
...i.open ? { "data-open": "" } : {},
|
|
171
|
+
onClick: P(r.onClick, a)
|
|
172
|
+
}, c = s((e) => {
|
|
173
|
+
i.setTriggerNode(e), F(e, t);
|
|
174
|
+
}, [t, i.setTriggerNode]);
|
|
175
|
+
return n === void 0 ? /* @__PURE__ */ g("button", {
|
|
176
|
+
type: "button",
|
|
177
|
+
...o,
|
|
178
|
+
ref: c
|
|
179
|
+
}) : n({
|
|
180
|
+
...o,
|
|
181
|
+
ref: c
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function z({ children: e, ref: t, render: n, ...r }) {
|
|
185
|
+
let i = M(), a = s((e) => {
|
|
186
|
+
i.setAnchorNode(e), F(e, t);
|
|
187
|
+
}, [t, i.setAnchorNode]), o = {
|
|
188
|
+
...r,
|
|
189
|
+
children: e
|
|
190
|
+
};
|
|
191
|
+
return n === void 0 ? /* @__PURE__ */ g("div", {
|
|
192
|
+
...o,
|
|
193
|
+
ref: a
|
|
194
|
+
}) : n({
|
|
195
|
+
...o,
|
|
196
|
+
ref: a
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
function B({ children: e, ref: t, render: n, ...r }) {
|
|
200
|
+
let i = M(), a = ee(), [o, c] = m(null), [u, d] = m(null), [f, b] = m("unmounted"), [w, T] = m(!1), E = p(null), D = p(i);
|
|
201
|
+
D.current = i, l(() => {
|
|
202
|
+
let e = v({
|
|
203
|
+
present: D.current.open,
|
|
204
|
+
onStatusChange: b
|
|
205
|
+
});
|
|
206
|
+
return E.current = e, b(e.status), () => {
|
|
207
|
+
e.destroy(), E.current = null;
|
|
208
|
+
};
|
|
209
|
+
}, []), l(() => {
|
|
210
|
+
E.current?.sync(i.open);
|
|
211
|
+
}, [i.open]), l(() => {
|
|
212
|
+
E.current?.setNode(o);
|
|
213
|
+
}, [o]);
|
|
214
|
+
let O = i.mount === "eager" || i.mount === "lazy" && i.seen || f !== "unmounted";
|
|
215
|
+
l(() => {
|
|
216
|
+
if (!O) {
|
|
217
|
+
d(null);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
let e = y({
|
|
221
|
+
origin: i.anchorNode ?? i.triggerNode,
|
|
222
|
+
disabled: !i.portal
|
|
223
|
+
});
|
|
224
|
+
return d(e.container), () => e.release();
|
|
225
|
+
}, [
|
|
226
|
+
O,
|
|
227
|
+
i.anchorNode,
|
|
228
|
+
i.portal,
|
|
229
|
+
i.triggerNode
|
|
230
|
+
]);
|
|
231
|
+
let { align: k, alignOffset: A, arrowNode: j, arrowPadding: N, collisionPadding: P, flip: R, hideWhenDetached: z, shift: B, side: V, sideOffset: H, strategy: U, width: W } = i, G = i.anchorNode ?? i.triggerNode;
|
|
232
|
+
l(() => {
|
|
233
|
+
if (o === null || G === null) return;
|
|
234
|
+
let e = !0, t = S(G, o, {
|
|
235
|
+
align: k,
|
|
236
|
+
alignOffset: A + L(o, V, k, W),
|
|
237
|
+
boundaryPadding: P,
|
|
238
|
+
flip: R,
|
|
239
|
+
hideWhenDetached: z,
|
|
240
|
+
matchWidth: W === "anchor",
|
|
241
|
+
shift: B,
|
|
242
|
+
side: V,
|
|
243
|
+
sideOffset: H,
|
|
244
|
+
strategy: U,
|
|
245
|
+
...j ? {
|
|
246
|
+
arrow: j,
|
|
247
|
+
arrowPadding: N
|
|
248
|
+
} : {}
|
|
249
|
+
});
|
|
250
|
+
return a.current = () => void t.update(), t.update().then(() => {
|
|
251
|
+
e && T(!0);
|
|
252
|
+
}), () => {
|
|
253
|
+
e = !1, a.current = void 0, t.destroy(), T(!1);
|
|
254
|
+
};
|
|
255
|
+
}, [
|
|
256
|
+
k,
|
|
257
|
+
A,
|
|
258
|
+
G,
|
|
259
|
+
j,
|
|
260
|
+
N,
|
|
261
|
+
P,
|
|
262
|
+
R,
|
|
263
|
+
z,
|
|
264
|
+
o,
|
|
265
|
+
a,
|
|
266
|
+
B,
|
|
267
|
+
V,
|
|
268
|
+
H,
|
|
269
|
+
U,
|
|
270
|
+
W
|
|
271
|
+
]), l(() => {
|
|
272
|
+
if (o === null || !i.open) return;
|
|
273
|
+
let e = [i.triggerNode, i.anchorNode].filter((e) => e !== null), t = x(o, {
|
|
274
|
+
escape: i.closeOnEscape,
|
|
275
|
+
focusOutside: !1,
|
|
276
|
+
modal: !1,
|
|
277
|
+
outsidePress: i.closeOnOutsidePress,
|
|
278
|
+
scrollLock: !1,
|
|
279
|
+
...e.length > 0 ? { branches: e } : {},
|
|
280
|
+
onDismiss: (e) => {
|
|
281
|
+
D.current.toggle(!1, e.reason === "escape" ? "escape" : "outsidePress", e.source);
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
return () => t.destroy();
|
|
285
|
+
}, [
|
|
286
|
+
o,
|
|
287
|
+
i.anchorNode,
|
|
288
|
+
i.closeOnEscape,
|
|
289
|
+
i.closeOnOutsidePress,
|
|
290
|
+
i.open,
|
|
291
|
+
i.triggerNode
|
|
292
|
+
]);
|
|
293
|
+
let K = p(!1);
|
|
294
|
+
l(() => {
|
|
295
|
+
let { autoFocus: e, contentNode: t, finalFocus: n, initialFocus: r, open: i, triggerNode: a } = D.current;
|
|
296
|
+
if (i && w && !K.current) {
|
|
297
|
+
if (K.current = !0, !e) return;
|
|
298
|
+
(I(r, t) ?? t)?.focus();
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
if (!i && K.current) {
|
|
302
|
+
K.current = !1;
|
|
303
|
+
let e = o?.ownerDocument.activeElement ?? null;
|
|
304
|
+
if (o !== null && e !== null && !o.contains(e)) return;
|
|
305
|
+
(I(n, t) ?? a)?.focus();
|
|
306
|
+
}
|
|
307
|
+
}, [
|
|
308
|
+
o,
|
|
309
|
+
i.open,
|
|
310
|
+
w
|
|
311
|
+
]);
|
|
312
|
+
let q = () => {
|
|
313
|
+
let { toggle: e, triggerNode: t } = D.current;
|
|
314
|
+
e(!1, "keyboard"), t?.focus();
|
|
315
|
+
}, J = s((e) => {
|
|
316
|
+
c(e), F(e, t);
|
|
317
|
+
}, [t]);
|
|
318
|
+
if (!O || i.portal && u === null) return null;
|
|
319
|
+
let Y = /* @__PURE__ */ g("span", {
|
|
320
|
+
"aria-hidden": "true",
|
|
321
|
+
"data-part": "focus-guard",
|
|
322
|
+
onFocus: q,
|
|
323
|
+
tabIndex: 0
|
|
324
|
+
}), X = {
|
|
325
|
+
...r,
|
|
326
|
+
children: /* @__PURE__ */ _(h, { children: [
|
|
327
|
+
Y,
|
|
328
|
+
e,
|
|
329
|
+
Y
|
|
330
|
+
] }),
|
|
331
|
+
"data-align": k,
|
|
332
|
+
...i.open && w ? { "data-open": "" } : {},
|
|
333
|
+
"data-part": "root",
|
|
334
|
+
"data-size": i.size,
|
|
335
|
+
"data-ui": "popover",
|
|
336
|
+
"data-width": i.width
|
|
337
|
+
}, Z = n === void 0 ? /* @__PURE__ */ g("div", {
|
|
338
|
+
...X,
|
|
339
|
+
ref: J
|
|
340
|
+
}) : n({
|
|
341
|
+
...X,
|
|
342
|
+
ref: J
|
|
343
|
+
});
|
|
344
|
+
return u === null ? Z : C(Z, u);
|
|
345
|
+
}
|
|
346
|
+
function V({ children: e, ref: t, render: n, ...r }) {
|
|
347
|
+
let i = M(), a = s((e) => {
|
|
348
|
+
i.setContentNode(e), F(e, t);
|
|
349
|
+
}, [t, i.setContentNode]), o = {
|
|
350
|
+
...r,
|
|
351
|
+
children: e,
|
|
352
|
+
...i.hasTitle ? { "aria-labelledby": i.titleId } : {},
|
|
353
|
+
...i.hasDescription ? { "aria-describedby": i.descriptionId } : {},
|
|
354
|
+
"data-part": "content",
|
|
355
|
+
id: i.contentId,
|
|
356
|
+
role: r.role ?? "dialog",
|
|
357
|
+
tabIndex: -1
|
|
358
|
+
};
|
|
359
|
+
return n === void 0 ? /* @__PURE__ */ g("div", {
|
|
360
|
+
...o,
|
|
361
|
+
ref: a
|
|
362
|
+
}) : n({
|
|
363
|
+
...o,
|
|
364
|
+
ref: a
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
function H({ children: e, ref: t, render: n, ...r }) {
|
|
368
|
+
let i = {
|
|
369
|
+
...r,
|
|
370
|
+
children: e,
|
|
371
|
+
"data-part": "header"
|
|
372
|
+
};
|
|
373
|
+
return n === void 0 ? /* @__PURE__ */ g("div", {
|
|
374
|
+
...i,
|
|
375
|
+
ref: t
|
|
376
|
+
}) : n(i);
|
|
377
|
+
}
|
|
378
|
+
function U({ children: e, ref: t, render: n, ...r }) {
|
|
379
|
+
let i = M(), { setHasTitle: a } = i;
|
|
380
|
+
l(() => (a(!0), () => a(!1)), [a]);
|
|
381
|
+
let o = {
|
|
382
|
+
...r,
|
|
383
|
+
children: e,
|
|
384
|
+
"data-part": "title",
|
|
385
|
+
id: i.titleId
|
|
386
|
+
};
|
|
387
|
+
return n === void 0 ? /* @__PURE__ */ g("div", {
|
|
388
|
+
...o,
|
|
389
|
+
ref: t
|
|
390
|
+
}) : n(o);
|
|
391
|
+
}
|
|
392
|
+
function W({ children: e, ref: t, render: n, ...r }) {
|
|
393
|
+
let i = M(), { setHasDescription: a } = i;
|
|
394
|
+
l(() => (a(!0), () => a(!1)), [a]);
|
|
395
|
+
let o = {
|
|
396
|
+
...r,
|
|
397
|
+
children: e,
|
|
398
|
+
"data-part": "description",
|
|
399
|
+
id: i.descriptionId
|
|
400
|
+
};
|
|
401
|
+
return n === void 0 ? /* @__PURE__ */ g("p", {
|
|
402
|
+
...o,
|
|
403
|
+
ref: t
|
|
404
|
+
}) : n(o);
|
|
405
|
+
}
|
|
406
|
+
function G({ children: e, ref: t, render: n, ...r }) {
|
|
407
|
+
let i = {
|
|
408
|
+
...r,
|
|
409
|
+
children: e,
|
|
410
|
+
"data-part": "body"
|
|
411
|
+
};
|
|
412
|
+
return n === void 0 ? /* @__PURE__ */ g("div", {
|
|
413
|
+
...i,
|
|
414
|
+
ref: t
|
|
415
|
+
}) : n(i);
|
|
416
|
+
}
|
|
417
|
+
function K({ children: e, ref: t, render: n, ...r }) {
|
|
418
|
+
let i = {
|
|
419
|
+
...r,
|
|
420
|
+
children: e,
|
|
421
|
+
"data-part": "footer"
|
|
422
|
+
};
|
|
423
|
+
return n === void 0 ? /* @__PURE__ */ g("div", {
|
|
424
|
+
...i,
|
|
425
|
+
ref: t
|
|
426
|
+
}) : n(i);
|
|
427
|
+
}
|
|
428
|
+
function q({ children: n, ref: r, render: i, ...a }) {
|
|
429
|
+
let o = M(), c = p(null), [l, u] = m(null);
|
|
430
|
+
f(() => {
|
|
431
|
+
c.current !== null && u((c.current.textContent ?? "").trim() !== "");
|
|
432
|
+
});
|
|
433
|
+
let d = l ?? J(n), h = (e) => {
|
|
434
|
+
o.toggle(!1, "dismiss", e.nativeEvent);
|
|
435
|
+
}, _ = s((e) => {
|
|
436
|
+
c.current = e, F(e, r);
|
|
437
|
+
}, [r]), v = {
|
|
438
|
+
...a,
|
|
439
|
+
"aria-label": a["aria-label"] ?? (d ? void 0 : o.t("close")),
|
|
440
|
+
children: n ?? /* @__PURE__ */ g(t, {
|
|
441
|
+
size: "sm",
|
|
442
|
+
children: /* @__PURE__ */ g(e, { name: "x" })
|
|
443
|
+
}),
|
|
444
|
+
"data-part": "close",
|
|
445
|
+
onClick: P(a.onClick, h)
|
|
446
|
+
};
|
|
447
|
+
return i === void 0 ? /* @__PURE__ */ g("button", {
|
|
448
|
+
type: "button",
|
|
449
|
+
...v,
|
|
450
|
+
ref: _
|
|
451
|
+
}) : i({
|
|
452
|
+
...v,
|
|
453
|
+
ref: _
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
function J(e) {
|
|
457
|
+
return i.toArray(e).some((e) => typeof e == "string" || typeof e == "number" ? String(e).trim() !== "" : o(e) && J(e.props.children));
|
|
458
|
+
}
|
|
459
|
+
function Y({ ref: e, render: t, ...n }) {
|
|
460
|
+
let r = M(), i = s((t) => {
|
|
461
|
+
r.setArrowNode(t), F(t, e);
|
|
462
|
+
}, [e, r.setArrowNode]);
|
|
463
|
+
if (!r.showArrow) return null;
|
|
464
|
+
let a = {
|
|
465
|
+
...n,
|
|
466
|
+
"aria-hidden": !0,
|
|
467
|
+
"data-part": "arrow"
|
|
468
|
+
};
|
|
469
|
+
return t === void 0 ? /* @__PURE__ */ g("div", {
|
|
470
|
+
...a,
|
|
471
|
+
ref: i
|
|
472
|
+
}) : t(a);
|
|
473
|
+
}
|
|
474
|
+
//#endregion
|
|
475
|
+
export { V as a, H as c, R as d, N as f, D as g, O as h, q as i, B as l, T as m, Y as n, W as o, M as p, G as r, K as s, z as t, U as u };
|
package/dist/popover.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 "./popover-
|
|
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 "./popover-Be7JWbGJ.js";
|
|
2
2
|
export { c as POPOVER_FALLBACK, r as Popover, m as PopoverAnchor, l as PopoverArrow, f as PopoverBody, o as PopoverClose, e as PopoverContent, a as PopoverDefaultsProvider, u as PopoverDescription, p as PopoverFooter, t as PopoverHeader, s as PopoverLayer, h as PopoverTitle, n as PopoverTrigger, d as usePopover, i as usePopoverDefaults };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useEffect as e, useRef as t, useState as n } from "react";
|
|
2
|
+
import { flushSync as r } from "react-dom";
|
|
3
|
+
//#region src/press-selection/press-selection.ts
|
|
4
|
+
function i(i) {
|
|
5
|
+
let [a, o] = n(null), s = t(0), c = t({
|
|
6
|
+
frame: 0,
|
|
7
|
+
task: void 0
|
|
8
|
+
}), l = a !== null && !Object.is(i, a.from);
|
|
9
|
+
return e(() => {
|
|
10
|
+
l && o(null);
|
|
11
|
+
}, [l]), e(() => () => {
|
|
12
|
+
cancelAnimationFrame(c.current.frame), clearTimeout(c.current.task);
|
|
13
|
+
}, []), {
|
|
14
|
+
selected: a === null || l ? i : a.value,
|
|
15
|
+
select: (e, t) => {
|
|
16
|
+
let n = ++s.current;
|
|
17
|
+
cancelAnimationFrame(c.current.frame), clearTimeout(c.current.task), r(() => o({
|
|
18
|
+
value: e,
|
|
19
|
+
from: i
|
|
20
|
+
})), c.current.frame = requestAnimationFrame(() => {
|
|
21
|
+
c.current.task = setTimeout(() => {
|
|
22
|
+
n === s.current && t();
|
|
23
|
+
}, 0);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { i as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
2
|
import { r as n } from "./i18n-DpW8lqJ1.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { b as r } from "./field-
|
|
4
|
+
import { b as r } from "./field-NJaCxl2h.js";
|
|
5
5
|
import { createControllable as i } from "@slotted/core/state";
|
|
6
6
|
import { createContext as a, useContext as o, useEffect as s, useRef as c, useState as l } from "react";
|
|
7
7
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|