@slotted/react 0.1.0-beta.10 → 0.1.0-beta.12
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-z2DPc1Wy.js +285 -0
- package/dist/action-bar.js +1 -1
- package/dist/action-sheet-BnedGewu.js +360 -0
- package/dist/action-sheet.js +1 -1
- package/dist/{alert-BTcqbG8w.js → alert-BTAXJ69M.js} +5 -5
- package/dist/alert.js +1 -1
- package/dist/{app-shell-BlkqQrOx.js → app-shell-Cb_kDBeV.js} +232 -173
- package/dist/app-shell.js +1 -1
- package/dist/{attachment-zlOPJvIm.js → attachment-D1O4qS8H.js} +28 -28
- package/dist/attachment.js +1 -1
- package/dist/{breadcrumb-DCGynpkb.js → breadcrumb-CnFjxxI2.js} +10 -10
- package/dist/breadcrumb.js +1 -1
- package/dist/{button-BCVjdzkn.js → button-D31perSu.js} +2 -2
- package/dist/button.js +2 -2
- package/dist/{calendar-qGUJ-kAy.js → calendar-DZyC1gAT.js} +8 -8
- package/dist/calendar.js +1 -1
- package/dist/{carousel-CjRTu8m7.js → carousel-Dso3gcYd.js} +14 -14
- package/dist/carousel.js +1 -1
- package/dist/cascader-BbajBwsX.js +1157 -0
- package/dist/cascader.js +1 -1
- package/dist/{chart-CPFq3jIE.js → chart-Bb6ctahn.js} +9 -9
- package/dist/chart.js +1 -1
- package/dist/{checkbox-CMY2KIih.js → checkbox-C_8GVtjD.js} +3 -3
- package/dist/{checkbox-group-DzMtLF7f.js → checkbox-group-DXCcusol.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{code-block-Bh_2Eg3M.js → code-block-C4mtsROE.js} +8 -8
- package/dist/code-block.js +1 -1
- package/dist/{color-picker-DlepH5co.js → color-picker-JZPnPb7s.js} +49 -49
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-CV9tCnKa.js → column-manager-BDUj-WIs.js} +31 -31
- package/dist/column-manager.js +1 -1
- package/dist/combobox-Dn69QwGX.js +904 -0
- package/dist/combobox.js +1 -1
- package/dist/command-palette-Dh1HKz_F.js +744 -0
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-Dbc0KkFp.js → context-menu-uJjEmAN3.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{currency-field--wIfgVAx.js → currency-field-lHcrNJ7X.js} +13 -13
- package/dist/currency-field.js +1 -1
- package/dist/{dashboard-grid-D_LbWfdZ.js → dashboard-grid-z-SOm9H0.js} +65 -65
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-XH5fGoGj.js → data-grid-Kj1b9RD-.js} +1316 -1272
- package/dist/data-grid.js +1 -1
- package/dist/data-list-BgdkA3bD.js +587 -0
- package/dist/data-list.js +1 -1
- package/dist/{date-field-BrNyJBiJ.js → date-field-B2lQzE3p.js} +5 -5
- package/dist/date-field.js +1 -1
- package/dist/{date-picker-Nl55so0C.js → date-picker-DpTRb-Y1.js} +16 -16
- package/dist/date-picker.js +1 -1
- package/dist/{date-range-picker-DLkvfUJD.js → date-range-picker-CBUPJep5.js} +17 -17
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-CZRhRDPb.js → datetime-field-BZ44uJ_B.js} +7 -7
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-_GHra2WL.js → datetime-picker-BK_bV3Yr.js} +21 -21
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-Dy1A0Wqy.js → datetime-range-picker-ChdbRgzQ.js} +21 -21
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{description-list-Cc4JYZ-3.js → description-list-CYlfHDwx.js} +11 -11
- package/dist/description-list.js +1 -1
- package/dist/{detail-panel-BI_wHSoz.js → detail-panel-DimjnPI8.js} +91 -91
- package/dist/detail-panel.js +1 -1
- package/dist/{dialog-B6MP7GYI.js → dialog-BB5MdJex.js} +108 -108
- package/dist/dialog.js +1 -1
- package/dist/docs/action-bar.json +4 -4
- package/dist/docs/action-bar.md +3 -3
- package/dist/docs/calendar.md +2 -2
- package/dist/docs/command-palette.json +1 -0
- package/dist/docs/command-palette.md +1 -1
- package/dist/docs/data-grid.examples.md +8 -2
- package/dist/docs/data-grid.json +12 -2
- package/dist/docs/data-grid.md +3 -1
- package/dist/docs/detail-panel.json +4 -2
- package/dist/docs/detail-panel.md +15 -5
- package/dist/docs/dialog.json +1 -0
- package/dist/docs/dialog.md +1 -1
- package/dist/docs/drawer.json +6 -4
- package/dist/docs/drawer.md +3 -3
- package/dist/docs/event-calendar.md +2 -2
- package/dist/docs/guidelines/index.md +4 -3
- package/dist/docs/guidelines/layout-alignment.md +17 -7
- package/dist/docs/guidelines/list-pages.md +3 -3
- package/dist/docs/page-header.json +18 -2
- package/dist/docs/page-header.md +5 -3
- package/dist/docs/page.json +1 -0
- package/dist/docs/page.md +1 -1
- package/dist/docs/rating.md +1 -1
- package/dist/docs/section.json +1 -1
- package/dist/docs/section.md +1 -1
- package/dist/docs/skills/compose-screen/SKILL.md +12 -4
- package/dist/docs/skills/review-screen/SKILL.md +20 -18
- package/dist/docs/skills/theme-app/SKILL.md +12 -1
- package/dist/docs/toast.json +1 -0
- package/dist/docs/toast.md +1 -1
- package/dist/docs/tokens.md +1 -1
- package/dist/docs/toolbar.json +1 -1
- package/dist/docs/toolbar.md +1 -1
- package/dist/docs/typography.md +1 -1
- package/dist/{drawer-CkpFlKYa.js → drawer-fyPyxnYQ.js} +216 -206
- package/dist/drawer.js +1 -1
- package/dist/entity-picker-ClyhBTyK.js +1283 -0
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-BDjI5T44.js → event-calendar-COgC24UG.js} +23 -23
- package/dist/event-calendar.js +1 -1
- package/dist/{field-group-CCM2vPKL.js → field-group-Bj-EbPIU.js} +2 -2
- package/dist/field-group.js +1 -1
- package/dist/{field-CzSGs7wo.js → field-tnEZiRLg.js} +19 -19
- package/dist/field.js +1 -1
- package/dist/filter-bar-BRuCz79-.js +1342 -0
- package/dist/filter-bar.js +1 -1
- package/dist/{form-CDq04WDY.js → form-DEcJ7tHf.js} +1 -1
- package/dist/form.js +1 -1
- package/dist/{fullscreen-6GW4naDP.js → fullscreen-BwweNj3-.js} +13 -13
- package/dist/fullscreen.js +1 -1
- package/dist/{hover-card-aadyPXzF.js → hover-card-BWcU37Yp.js} +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/{i18n-DpW8lqJ1.js → i18n-D7xXDd8-.js} +11 -4
- package/dist/i18n.js +1 -1
- package/dist/{icon-button-CRB218_z.js → icon-button-DbSZKGT4.js} +73 -71
- package/dist/{import-export-center-DUrNwRKP.js → import-export-center-CYf0Qxl_.js} +291 -289
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +100 -100
- package/dist/{kbd-Z4YmSPRy.js → kbd-dNz8QHfL.js} +1 -1
- package/dist/kbd.js +1 -1
- package/dist/{link-BsSlZ1ts.js → link-DLPyg54C.js} +5 -5
- package/dist/link.js +1 -1
- package/dist/{listbox-VFcfZT70.js → listbox-BSqx_ARf.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{loading-overlay-BZPBDK4w.js → loading-overlay-BLIrcaoj.js} +9 -9
- package/dist/loading-overlay.js +1 -1
- package/dist/{markdown-BmCU_sOv.js → markdown-DccRb1xf.js} +17 -17
- package/dist/markdown.js +1 -1
- package/dist/{menu-parts-DS9JEUCt.js → menu-parts-CNNHRduK.js} +42 -42
- package/dist/menu.js +1 -1
- package/dist/{menubar-BV43BKep.js → menubar-Bdr6zigi.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/message-BkTiWsUp.js +436 -0
- package/dist/message-scroller-akQEtQLn.js +218 -0
- package/dist/message-scroller.js +1 -1
- package/dist/message.js +1 -1
- package/dist/{multi-select-YaxhhH9y.js → multi-select-BvlJIEtz.js} +445 -443
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-menu-parts-B64gKl8B.js → navigation-menu-parts-CEW4fgCo.js} +12 -12
- package/dist/navigation-menu.js +1 -1
- package/dist/{notification-center-Ci-OLWTO.js → notification-center-BQO0Ey3h.js} +40 -40
- package/dist/notification-center.js +1 -1
- package/dist/{number-field-BYQmPyM-.js → number-field-D1MqT8_A.js} +13 -13
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-BKO0WPZc.js → otp-input-Cub9H9Di.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{page-CfjGviUA.js → page-CwYmBoZQ.js} +1 -1
- package/dist/{page-header-w_PFLnLG.js → page-header-CMxCQqu_.js} +117 -114
- package/dist/page-header.js +1 -1
- package/dist/page.js +1 -1
- package/dist/{pagination-Cm9665gb.js → pagination-IEuos7H1.js} +12 -12
- package/dist/pagination.js +1 -1
- package/dist/{popover-D1krYeP-.js → popover-C7NpEzq6.js} +22 -22
- package/dist/popover.js +1 -1
- package/dist/prompt-composer-Cu8bj1Vb.js +276 -0
- package/dist/prompt-composer.js +1 -1
- package/dist/{prose-Bl5OjXTb.js → prose-CQN4Bqqh.js} +1 -1
- package/dist/prose.js +1 -1
- package/dist/{radio-group-D9VTBLUB.js → radio-group-BHlDgCLk.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-BRqsV5OF.js → rating-Cr0lXaAV.js} +15 -15
- package/dist/rating.js +1 -1
- package/dist/{saved-views-C_76obIv.js → saved-views-CyLSn8a2.js} +151 -151
- package/dist/saved-views.js +1 -1
- package/dist/{scroll-area-vrm2bbtZ.js → scroll-area-Fr0PmnRS.js} +1 -1
- package/dist/scroll-area.js +1 -1
- package/dist/{segmented-control-5DTOKO3g.js → segmented-control-uPnQYklX.js} +2 -2
- package/dist/segmented-control.js +1 -1
- package/dist/select-C0JYHwBy.js +1020 -0
- package/dist/select.js +1 -1
- package/dist/{side-navigation-MNMSkj9b.js → side-navigation-D8lRpHwj.js} +64 -64
- package/dist/side-navigation.js +1 -1
- package/dist/{skeleton-DyOwgYmF.js → skeleton-DeEOmm1y.js} +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/{slider-OMe1DAC-.js → slider-BSI1xvjw.js} +2 -2
- package/dist/slider.js +1 -1
- package/dist/{sparkline-ChkaLVdY.js → sparkline-CYU4_lCD.js} +1 -1
- package/dist/sparkline.js +1 -1
- package/dist/spinner-ring-DyfaYloA.js +19 -0
- package/dist/{split-button-DbmRwfMC.js → split-button-CkbylOMN.js} +2 -2
- package/dist/split-button.js +1 -1
- package/dist/{stat-card-BSnsTmsq.js → stat-card-CAh4SdeY.js} +16 -16
- package/dist/stat-card.js +1 -1
- package/dist/{status-indicator-CyKhBdvN.js → status-indicator-BVMnpcm8.js} +4 -4
- package/dist/status-indicator.js +1 -1
- package/dist/{stepper-Cw1Auv3n.js → stepper-BLfvMz04.js} +16 -16
- package/dist/stepper.js +1 -1
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/action-sheet.css +2 -2
- package/dist/styles/button.css +2 -2
- package/dist/styles/cascader.css +2 -2
- package/dist/styles/chart.css +1 -1
- package/dist/styles/column-manager.css +3 -3
- package/dist/styles/command-palette.css +3 -3
- package/dist/styles/dashboard-grid.css +2 -2
- package/dist/styles/data-grid.css +3 -3
- package/dist/styles/data-list.css +2 -2
- package/dist/styles/detail-panel.css +4 -4
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/entity-picker.css +1 -1
- package/dist/styles/event-calendar.css +1 -1
- package/dist/styles/filter-bar.css +3 -3
- package/dist/styles/import-export-center.css +4 -4
- package/dist/styles/index.css +12 -12
- package/dist/styles/markdown.css +2 -2
- package/dist/styles/multi-select.css +1 -1
- package/dist/styles/notification-center.css +3 -3
- package/dist/styles/page-header.css +2 -2
- package/dist/styles/page.css +1 -1
- package/dist/styles/prompt-composer.css +1 -1
- package/dist/styles/saved-views.css +2 -2
- package/dist/styles/split-button.css +2 -2
- package/dist/styles/table.css +2 -2
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/timeline.css +1 -1
- package/dist/styles/toast.css +1 -1
- package/dist/styles/tour.css +2 -2
- package/dist/styles/transfer.css +2 -2
- package/dist/styles/upload.css +1 -1
- package/dist/styles/wizard.css +2 -2
- package/dist/styles.css +1 -1
- package/dist/{switch-CQ1rpuKa.js → switch-BHyKHqeI.js} +5 -5
- package/dist/switch.js +1 -1
- package/dist/{table-DpGTPtnb.js → table-C8zOHDcY.js} +30 -30
- package/dist/{table-of-contents-BFVERMZy.js → table-of-contents-BAIuPCdy.js} +8 -8
- package/dist/table-of-contents.js +1 -1
- package/dist/table.js +1 -1
- package/dist/{tag-aX7uyAN0.js → tag-XYGEPUHR.js} +14 -14
- package/dist/tag.js +1 -1
- package/dist/{tags-input-BgpS22sf.js → tags-input-ClYSd-No.js} +40 -40
- package/dist/tags-input.js +1 -1
- package/dist/text-field-Cguj75tn.js +205 -0
- package/dist/text-field.js +1 -1
- package/dist/{textarea-DNCjsQYd.js → textarea-BKsh_jAo.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-Cm6iBjwH.js → time-field-BIE4WMpS.js} +7 -7
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-Ce18FSO2.js → time-picker-CNfafRDF.js} +18 -18
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-kDnw4PQ3.js → time-range-picker-D7gM_Wno.js} +20 -20
- package/dist/time-range-picker.js +1 -1
- package/dist/timeline-BLadNUkS.js +449 -0
- package/dist/timeline.js +1 -1
- package/dist/{toast-58ex8PDK.js → toast-CjbiXiza.js} +16 -16
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-YxVJlCnI.js → toggle-group-BZmghKac.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/toolbar-BI4ZepBs.js +243 -0
- package/dist/toolbar.js +1 -1
- package/dist/{top-navigation-DorkYBnR.js → top-navigation-BTZpx5VA.js} +13 -13
- package/dist/top-navigation.js +1 -1
- package/dist/{tour-CwK_m_Jp.js → tour-_CQ1kYov.js} +23 -23
- package/dist/tour.js +1 -1
- package/dist/{transfer-DxGDWIEt.js → transfer-BVhBdIGp.js} +59 -59
- package/dist/transfer.js +1 -1
- package/dist/tree-DfI9UWLA.js +794 -0
- package/dist/tree.js +1 -1
- package/dist/types/action-bar/action-bar-overflow.d.ts.map +1 -1
- package/dist/types/action-bar/action-bar.types.d.ts +2 -2
- package/dist/types/action-sheet/action-sheet-parts.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell.types.d.ts +21 -14
- package/dist/types/app-shell/app-shell.types.d.ts.map +1 -1
- package/dist/types/app-shell/index.d.ts +1 -1
- package/dist/types/app-shell/index.d.ts.map +1 -1
- package/dist/types/button/button-indicator.d.ts.map +1 -1
- package/dist/types/button/spinner-ring.d.ts +8 -0
- package/dist/types/button/spinner-ring.d.ts.map +1 -0
- package/dist/types/cascader/cascader-surface.d.ts.map +1 -1
- package/dist/types/cascader/cascader.d.ts.map +1 -1
- package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
- package/dist/types/command-palette/command-palette.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid-body.d.ts +7 -2
- package/dist/types/data-grid/data-grid-body.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid-header.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid.d.ts +1 -1
- package/dist/types/data-grid/data-grid.d.ts.map +1 -1
- package/dist/types/detail-panel/detail-panel-parts.d.ts +2 -1
- package/dist/types/detail-panel/detail-panel-parts.d.ts.map +1 -1
- package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
- package/dist/types/entity-picker/entity-picker-control.d.ts.map +1 -1
- package/dist/types/filter-bar/filter-bar.d.ts.map +1 -1
- package/dist/types/i18n/slotted-provider.d.ts +6 -0
- package/dist/types/i18n/slotted-provider.d.ts.map +1 -1
- package/dist/types/import-export-center/import-export-center.d.ts.map +1 -1
- package/dist/types/message/message-parts.d.ts.map +1 -1
- package/dist/types/message-scroller/message-scroller.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
- package/dist/types/page-header/page-header-defaults.d.ts +1 -1
- package/dist/types/page-header/page-header-defaults.d.ts.map +1 -1
- package/dist/types/page-header/page-header.d.ts +1 -1
- package/dist/types/page-header/page-header.d.ts.map +1 -1
- package/dist/types/page-header/page-header.types.d.ts +9 -0
- package/dist/types/page-header/page-header.types.d.ts.map +1 -1
- package/dist/types/prompt-composer/prompt-composer.d.ts.map +1 -1
- package/dist/types/select/select-parts.d.ts.map +1 -1
- package/dist/types/text-field/text-field.d.ts.map +1 -1
- package/dist/types/timeline/timeline-parts.d.ts.map +1 -1
- package/dist/types/timeline/timeline.d.ts.map +1 -1
- package/dist/types/toolbar/toolbar-overflow.d.ts.map +1 -1
- package/dist/types/toolbar/toolbar.types.d.ts +2 -2
- package/dist/types/tree/tree-parts.d.ts.map +1 -1
- package/dist/{upload-CEDsfMWz.js → upload-N2-nyO8x.js} +65 -65
- package/dist/upload.js +1 -1
- package/dist/{wizard-B3p7zCSj.js → wizard-CK1x2fs3.js} +16 -16
- package/dist/wizard.js +1 -1
- package/package.json +6 -6
- package/dist/action-bar-CJgBierN.js +0 -283
- package/dist/action-sheet-tRrjm7WQ.js +0 -358
- package/dist/cascader-DqlC1z5b.js +0 -1154
- package/dist/combobox-YWFkxaQ3.js +0 -902
- package/dist/command-palette-DXNq-zKN.js +0 -741
- package/dist/data-list-DZCN_uW1.js +0 -587
- package/dist/entity-picker-CFwLGQeU.js +0 -1281
- package/dist/filter-bar-G50WdRac.js +0 -1340
- package/dist/message-Dtck9RJy.js +0 -434
- package/dist/message-scroller-niUJ8RoL.js +0 -216
- package/dist/prompt-composer-sh_TXKYZ.js +0 -273
- package/dist/select-BFx5EgAa.js +0 -1018
- package/dist/text-field-DL_uhNXV.js +0 -203
- package/dist/timeline-pEL30Jp8.js +0 -446
- package/dist/toolbar-BtIyVbs4.js +0 -241
- package/dist/tree-DbLRyItM.js +0 -792
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { t as e } from "./button-defaults-DNq_DDJh.js";
|
|
2
|
+
import { r as t } from "./i18n-D7xXDd8-.js";
|
|
3
|
+
import { n, t as r } from "./icon-DjqSEQ-o.js";
|
|
4
|
+
import { _ as i, g as a, n as o, t as s } from "./menu-parts-CNNHRduK.js";
|
|
5
|
+
import { keyedProps as c } from "@slotted/core/selector-key";
|
|
6
|
+
import { Fragment as l, createContext as u, useCallback as d, useContext as f, useEffect as p, useId as m, useMemo as h, useRef as g, useState as _ } from "react";
|
|
7
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
8
|
+
import { createCollapse as b } from "@slotted/core/overflow";
|
|
9
|
+
import { createPresence as x } from "@slotted/core/presence";
|
|
10
|
+
import { actionBarMessages as S } from "@slotted/core/i18n";
|
|
11
|
+
var C = u({
|
|
12
|
+
counterpart: () => null,
|
|
13
|
+
declare: () => void 0,
|
|
14
|
+
registerActions: () => void 0,
|
|
15
|
+
registerTrigger: () => void 0,
|
|
16
|
+
release: () => void 0,
|
|
17
|
+
surface: []
|
|
18
|
+
});
|
|
19
|
+
function w() {
|
|
20
|
+
return f(C);
|
|
21
|
+
}
|
|
22
|
+
var T = "data-unit", E = "data-priority", D = "--_stacked", O = Object.freeze({
|
|
23
|
+
always: 0,
|
|
24
|
+
hide: 0,
|
|
25
|
+
high: 2,
|
|
26
|
+
low: 1,
|
|
27
|
+
pinned: 0
|
|
28
|
+
});
|
|
29
|
+
function k(e, t) {
|
|
30
|
+
return e === void 0 ? t ? "low" : "pinned" : e === "hide" || e === "pinned" || t ? e : "pinned";
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/action-bar/action-bar-defaults.tsx
|
|
34
|
+
var A = u({
|
|
35
|
+
align: "end",
|
|
36
|
+
size: "md",
|
|
37
|
+
sticky: !1,
|
|
38
|
+
variant: "plain"
|
|
39
|
+
});
|
|
40
|
+
function j() {
|
|
41
|
+
return f(A);
|
|
42
|
+
}
|
|
43
|
+
function M({ children: e, ...t }) {
|
|
44
|
+
let n = j();
|
|
45
|
+
return /* @__PURE__ */ v(A.Provider, {
|
|
46
|
+
value: {
|
|
47
|
+
align: t.align ?? n.align,
|
|
48
|
+
size: t.size ?? n.size,
|
|
49
|
+
sticky: t.sticky ?? n.sticky,
|
|
50
|
+
variant: t.variant ?? n.variant
|
|
51
|
+
},
|
|
52
|
+
children: e
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/action-bar/action-bar.tsx
|
|
57
|
+
var N = Object.freeze([]);
|
|
58
|
+
function P(e) {
|
|
59
|
+
return [...e.children].filter((e) => e instanceof HTMLElement && e.getAttribute("data-part") !== "overflow" && e.getAttribute("data-priority") !== "always");
|
|
60
|
+
}
|
|
61
|
+
function F(e) {
|
|
62
|
+
return e.getAttribute("data-priority") ?? "pinned";
|
|
63
|
+
}
|
|
64
|
+
function I(e, t) {
|
|
65
|
+
for (let n = e.nextElementSibling; n !== null && n !== t; n = n.nextElementSibling) if (n.getAttribute("data-part") === "separator") return !0;
|
|
66
|
+
return !1;
|
|
67
|
+
}
|
|
68
|
+
function L(e, t) {
|
|
69
|
+
let n = new Set(t), r = [...e.children].filter((e) => e instanceof HTMLElement && e.hasAttribute("data-unit") && (n.has(e) || e.getAttribute("data-priority") === "always"));
|
|
70
|
+
return r.map((e, t) => {
|
|
71
|
+
let n = r[t - 1];
|
|
72
|
+
return {
|
|
73
|
+
id: e.getAttribute("data-unit") ?? "",
|
|
74
|
+
separatorBefore: n !== void 0 && I(n, e)
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function ee(e, t) {
|
|
79
|
+
return e.length === t.length && e.every((e, n) => e.id === t[n]?.id && e.separatorBefore === t[n]?.separatorBefore);
|
|
80
|
+
}
|
|
81
|
+
function R({ align: t, children: n, className: r, onOverflowChange: i, present: a, ref: o, render: s, size: l, sticky: u, style: f, variant: m, ...y }) {
|
|
82
|
+
let S = j(), w = g(null), k = g(/* @__PURE__ */ new Map()), A = g([]), M = g(null), [I, R] = _(null), [z, B] = _(null), [V, H] = _(!1), [U, W] = _(N), G = g(i);
|
|
83
|
+
G.current = i;
|
|
84
|
+
let te = t ?? S.align, K = l ?? S.size, ne = u ?? S.sticky, re = m ?? S.variant, q = a ?? !0, [J, ie] = _(q ? "open" : "unmounted"), Y = g(null);
|
|
85
|
+
Y.current ??= x({
|
|
86
|
+
onStatusChange: ie,
|
|
87
|
+
present: q,
|
|
88
|
+
skipInitialAnimation: !0
|
|
89
|
+
}), p(() => {
|
|
90
|
+
Y.current?.sync(q);
|
|
91
|
+
}, [q]), p(() => {
|
|
92
|
+
let e = Y.current;
|
|
93
|
+
return () => e?.stop();
|
|
94
|
+
}, []);
|
|
95
|
+
let X = d((e) => R(e), []), Z = d((e) => B(e), []), ae = h(() => ({
|
|
96
|
+
counterpart: (e) => k.current.get(e) ?? null,
|
|
97
|
+
declare: (e, t) => {
|
|
98
|
+
k.current.set(e, t);
|
|
99
|
+
},
|
|
100
|
+
registerActions: X,
|
|
101
|
+
registerTrigger: Z,
|
|
102
|
+
release: (e) => {
|
|
103
|
+
k.current.delete(e);
|
|
104
|
+
},
|
|
105
|
+
surface: U
|
|
106
|
+
}), [
|
|
107
|
+
X,
|
|
108
|
+
Z,
|
|
109
|
+
U
|
|
110
|
+
]), Q = d((e) => {
|
|
111
|
+
if (w.current = e, Y.current?.setNode(e), typeof o == "function") return o(e);
|
|
112
|
+
o && (o.current = e);
|
|
113
|
+
}, [o]);
|
|
114
|
+
if (p(() => {
|
|
115
|
+
let e = I;
|
|
116
|
+
if (e === null) return;
|
|
117
|
+
let t = () => {
|
|
118
|
+
let t = (e.ownerDocument?.defaultView)?.getComputedStyle(e).getPropertyValue(D).trim() === "1";
|
|
119
|
+
H((e) => e === t ? e : t);
|
|
120
|
+
};
|
|
121
|
+
if (t(), typeof ResizeObserver > "u") return;
|
|
122
|
+
let n = new ResizeObserver(t);
|
|
123
|
+
return n.observe(e), () => n.disconnect();
|
|
124
|
+
}, [I]), p(() => {
|
|
125
|
+
let e = I;
|
|
126
|
+
if (e === null || V) return;
|
|
127
|
+
let t = () => {
|
|
128
|
+
let t = L(e, A.current);
|
|
129
|
+
W((e) => ee(e, t) ? e : t);
|
|
130
|
+
}, n = b(e, {
|
|
131
|
+
collapsible: (e) => F(e) !== "pinned",
|
|
132
|
+
divides: (e) => e.getAttribute("data-part") === "separator",
|
|
133
|
+
onChange: (e) => {
|
|
134
|
+
A.current = e, t(), G.current?.(e.filter((e) => e.hasAttribute(T)).length);
|
|
135
|
+
},
|
|
136
|
+
rank: (e) => O[F(e)],
|
|
137
|
+
trigger: () => z,
|
|
138
|
+
triggerAlways: () => e.querySelector(`[${E}='always']`) !== null,
|
|
139
|
+
units: () => P(e)
|
|
140
|
+
});
|
|
141
|
+
M.current = n, t();
|
|
142
|
+
let r = new MutationObserver(() => {
|
|
143
|
+
n.refresh(), t();
|
|
144
|
+
});
|
|
145
|
+
return r.observe(e, {
|
|
146
|
+
childList: !0,
|
|
147
|
+
subtree: !0
|
|
148
|
+
}), () => {
|
|
149
|
+
r.disconnect(), n.destroy(), M.current = null, A.current = [], W(N);
|
|
150
|
+
};
|
|
151
|
+
}, [
|
|
152
|
+
I,
|
|
153
|
+
V,
|
|
154
|
+
z
|
|
155
|
+
]), J === "unmounted") return null;
|
|
156
|
+
let oe = A.current.length, $ = c({
|
|
157
|
+
role: "group",
|
|
158
|
+
...y,
|
|
159
|
+
children: /* @__PURE__ */ v(e, {
|
|
160
|
+
size: K,
|
|
161
|
+
children: n
|
|
162
|
+
}),
|
|
163
|
+
className: r,
|
|
164
|
+
"data-align": te,
|
|
165
|
+
...z === null ? {} : { "data-collapsed": String(oe) },
|
|
166
|
+
"data-part": "root",
|
|
167
|
+
"data-size": K,
|
|
168
|
+
...J === "open" ? {} : { "data-status": J },
|
|
169
|
+
...ne ? { "data-sticky": "" } : {},
|
|
170
|
+
"data-ui": "action-bar",
|
|
171
|
+
"data-variant": re,
|
|
172
|
+
style: f
|
|
173
|
+
});
|
|
174
|
+
return /* @__PURE__ */ v(C.Provider, {
|
|
175
|
+
value: ae,
|
|
176
|
+
children: s === void 0 ? /* @__PURE__ */ v("div", {
|
|
177
|
+
...$,
|
|
178
|
+
ref: Q
|
|
179
|
+
}) : s({
|
|
180
|
+
...$,
|
|
181
|
+
ref: Q
|
|
182
|
+
})
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/action-bar/action-bar-overflow.tsx
|
|
187
|
+
function z(e, ...t) {
|
|
188
|
+
for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
189
|
+
}
|
|
190
|
+
function B(e, t, n) {
|
|
191
|
+
return typeof e == "function" ? e(t) : e === void 0 ? n : e;
|
|
192
|
+
}
|
|
193
|
+
function V({ align: e, label: u, menuRef: f, ref: p, render: m, side: h, size: _, ...b }) {
|
|
194
|
+
let x = w(), C = t(S), T = x.surface, { registerTrigger: E } = x, D = g(void 0), O = d((e) => {
|
|
195
|
+
E(e), z(e, D.current, p);
|
|
196
|
+
}, [p, E]);
|
|
197
|
+
return /* @__PURE__ */ y(i, {
|
|
198
|
+
...e === void 0 ? {} : { align: e },
|
|
199
|
+
...f === void 0 ? {} : { ref: f },
|
|
200
|
+
...h === void 0 ? {} : { side: h },
|
|
201
|
+
..._ === void 0 ? {} : { size: _ },
|
|
202
|
+
children: [/* @__PURE__ */ v(o, { render: ({ ref: e, ...t }) => {
|
|
203
|
+
D.current = e;
|
|
204
|
+
let i = c({
|
|
205
|
+
...t,
|
|
206
|
+
...b,
|
|
207
|
+
"aria-label": B(u, T.length, C("more", { count: T.length })),
|
|
208
|
+
children: /* @__PURE__ */ v(r, { children: /* @__PURE__ */ v(n, { name: "ellipsis" }) }),
|
|
209
|
+
"data-part": "overflow"
|
|
210
|
+
});
|
|
211
|
+
return m === void 0 ? /* @__PURE__ */ v("button", {
|
|
212
|
+
...i,
|
|
213
|
+
ref: O,
|
|
214
|
+
type: "button"
|
|
215
|
+
}) : m({
|
|
216
|
+
...i,
|
|
217
|
+
ref: O
|
|
218
|
+
});
|
|
219
|
+
} }), /* @__PURE__ */ v(s, { children: T.map((e) => /* @__PURE__ */ y(l, { children: [e.separatorBefore ? /* @__PURE__ */ v(a, {}) : null, x.counterpart(e.id)] }, e.id)) })]
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region src/action-bar/action-bar-parts.tsx
|
|
224
|
+
function H({ children: e, ref: t, render: n, ...r }) {
|
|
225
|
+
let i = c({
|
|
226
|
+
...r,
|
|
227
|
+
children: e,
|
|
228
|
+
"data-part": "status"
|
|
229
|
+
});
|
|
230
|
+
return n === void 0 ? /* @__PURE__ */ v("div", {
|
|
231
|
+
...i,
|
|
232
|
+
ref: t
|
|
233
|
+
}) : n(i);
|
|
234
|
+
}
|
|
235
|
+
function U({ children: e, ref: t, render: n, ...r }) {
|
|
236
|
+
let { registerActions: i } = w(), a = d((e) => {
|
|
237
|
+
if (i(e), typeof t == "function") return t(e);
|
|
238
|
+
t && (t.current = e);
|
|
239
|
+
}, [t, i]);
|
|
240
|
+
p(() => () => i(null), [i]);
|
|
241
|
+
let o = c({
|
|
242
|
+
...r,
|
|
243
|
+
children: e,
|
|
244
|
+
"data-part": "actions"
|
|
245
|
+
});
|
|
246
|
+
return n === void 0 ? /* @__PURE__ */ v("div", {
|
|
247
|
+
...o,
|
|
248
|
+
ref: a
|
|
249
|
+
}) : n({
|
|
250
|
+
...o,
|
|
251
|
+
ref: a
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
function W({ children: e, counterpart: t, priority: n, ref: r, render: i, ...a }) {
|
|
255
|
+
let o = w(), s = m(), l = t != null && t !== !1, u = k(n, l);
|
|
256
|
+
l && o.declare(s, t);
|
|
257
|
+
let { release: d } = o;
|
|
258
|
+
p(() => () => d(s), [s, d]);
|
|
259
|
+
let f = c({
|
|
260
|
+
...a,
|
|
261
|
+
...l ? { [T]: s } : {},
|
|
262
|
+
...u === "always" ? { hidden: !0 } : {},
|
|
263
|
+
children: e,
|
|
264
|
+
"data-part": "action",
|
|
265
|
+
"data-priority": u
|
|
266
|
+
});
|
|
267
|
+
return i === void 0 ? /* @__PURE__ */ v("div", {
|
|
268
|
+
...f,
|
|
269
|
+
ref: r
|
|
270
|
+
}) : i(f);
|
|
271
|
+
}
|
|
272
|
+
function G({ ref: e, render: t, ...n }) {
|
|
273
|
+
let r = c({
|
|
274
|
+
"aria-orientation": "vertical",
|
|
275
|
+
...n,
|
|
276
|
+
"data-part": "separator",
|
|
277
|
+
role: "separator"
|
|
278
|
+
});
|
|
279
|
+
return t === void 0 ? /* @__PURE__ */ v("div", {
|
|
280
|
+
...r,
|
|
281
|
+
ref: e
|
|
282
|
+
}) : t(r);
|
|
283
|
+
}
|
|
284
|
+
//#endregion
|
|
285
|
+
export { V as a, j as c, H as i, w as l, U as n, R as o, G as r, M as s, W as t };
|
package/dist/action-bar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./action-bar-
|
|
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 "./action-bar-z2DPc1Wy.js";
|
|
2
2
|
export { a as ActionBar, c as ActionBarAction, i as ActionBarActions, s as ActionBarDefaultsProvider, e as ActionBarOverflow, o as ActionBarSeparator, n as ActionBarStatus, t as useActionBarDefaults, r as useActionBarOverflow };
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { r as e } from "./i18n-D7xXDd8-.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { c as t, d as n, l as r, o as i, r as a, u as o } from "./drawer-fyPyxnYQ.js";
|
|
4
|
+
import { t as s } from "./spinner-ring-DyfaYloA.js";
|
|
5
|
+
import { keyedProps as c, withSelectorKey as l } from "@slotted/core/selector-key";
|
|
6
|
+
import { createRovingTabindex as u } from "@slotted/core/focus";
|
|
7
|
+
import { createControllable as d } from "@slotted/core/state";
|
|
8
|
+
import { createContext as f, useCallback as p, useContext as m, useEffect as h, useId as g, useImperativeHandle as _, useMemo as v, useRef as y, useState as b } from "react";
|
|
9
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
10
|
+
import { actionSheetMessages as w } from "@slotted/core/i18n";
|
|
11
|
+
import { createTypeahead as T, isPrintable as E } from "@slotted/core/typeahead";
|
|
12
|
+
//#region src/action-sheet/action-sheet-defaults.tsx
|
|
13
|
+
var D = f({
|
|
14
|
+
back: "close",
|
|
15
|
+
closeOnSelect: !0,
|
|
16
|
+
escape: "close",
|
|
17
|
+
modal: !0,
|
|
18
|
+
mount: "active",
|
|
19
|
+
outsidePress: "close"
|
|
20
|
+
});
|
|
21
|
+
function O() {
|
|
22
|
+
return m(D);
|
|
23
|
+
}
|
|
24
|
+
function k({ children: e, ...t }) {
|
|
25
|
+
let n = O();
|
|
26
|
+
return /* @__PURE__ */ S(D.Provider, {
|
|
27
|
+
value: {
|
|
28
|
+
back: t.back ?? n.back,
|
|
29
|
+
closeOnSelect: t.closeOnSelect ?? n.closeOnSelect,
|
|
30
|
+
escape: t.escape ?? n.escape,
|
|
31
|
+
modal: t.modal ?? n.modal,
|
|
32
|
+
mount: t.mount ?? n.mount,
|
|
33
|
+
outsidePress: t.outsidePress ?? n.outsidePress
|
|
34
|
+
},
|
|
35
|
+
children: e
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/action-sheet/action-sheet-entry.ts
|
|
40
|
+
var A = "[data-part='item']", j = (e) => e === null ? [] : [...e.querySelectorAll(A)], M = (e) => e.dataset.disabled === void 0 && e.dataset.loading === void 0;
|
|
41
|
+
function N(e) {
|
|
42
|
+
let t = j(e.querySelector("[data-part='list']")).filter(M), n = t[0];
|
|
43
|
+
if (n !== void 0 && n.dataset.tone !== "danger") return n;
|
|
44
|
+
let r = e.querySelector("[data-part='cancel']");
|
|
45
|
+
return r === null ? t.find((e) => e.dataset.tone !== "danger") ?? e : r;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/action-sheet/action-sheet.tsx
|
|
49
|
+
var P = f(void 0);
|
|
50
|
+
function F() {
|
|
51
|
+
let e = m(P);
|
|
52
|
+
if (e === void 0) throw Error("Every action sheet part must be rendered inside ActionSheet.");
|
|
53
|
+
return e;
|
|
54
|
+
}
|
|
55
|
+
var I = 2;
|
|
56
|
+
function L({ back: t, children: n, closeOnSelect: r, container: i, defaultOpen: a, escape: s, finalFocus: c, initialFocus: l, messages: u, modal: f, mount: m, onOpenChange: h, open: g, outsidePress: x, ref: C }) {
|
|
57
|
+
let T = O(), E = e(w, u), [D, k] = b(a ?? !1), A = g ?? D, j = f ?? T.modal, M = y(null), F = y({
|
|
58
|
+
list: null,
|
|
59
|
+
panel: null
|
|
60
|
+
}), L = p((e, t, n, r) => {
|
|
61
|
+
if (e === A) return !0;
|
|
62
|
+
let i = !1, a = d({
|
|
63
|
+
controlled: g,
|
|
64
|
+
initial: A,
|
|
65
|
+
onRequest: (e) => {
|
|
66
|
+
h?.(e.value, {
|
|
67
|
+
get cancelled() {
|
|
68
|
+
return e.cancelled;
|
|
69
|
+
},
|
|
70
|
+
cancel: () => e.cancel(),
|
|
71
|
+
previous: e.previous,
|
|
72
|
+
reason: t,
|
|
73
|
+
result: n,
|
|
74
|
+
source: e.source,
|
|
75
|
+
value: e.value
|
|
76
|
+
}), i = e.cancelled;
|
|
77
|
+
}
|
|
78
|
+
}).request(e, t, r);
|
|
79
|
+
return !i && (a && k(e), !0);
|
|
80
|
+
}, [
|
|
81
|
+
A,
|
|
82
|
+
h,
|
|
83
|
+
g
|
|
84
|
+
]), R = p((e, t) => {
|
|
85
|
+
L(e, t.reason, void 0, t.source) || t.cancel();
|
|
86
|
+
}, [L]), z = v(() => l !== !1 && { get current() {
|
|
87
|
+
let e = M.current?.panel ?? null;
|
|
88
|
+
return l?.current ?? (e === null ? null : N(e));
|
|
89
|
+
} }, [l]);
|
|
90
|
+
_(C, () => ({
|
|
91
|
+
open: () => void L(!0, "programmatic", void 0, void 0),
|
|
92
|
+
close: () => void L(!1, "programmatic", void 0, void 0),
|
|
93
|
+
focus: () => {
|
|
94
|
+
(F.current.list?.querySelector("[data-part='item'][tabindex='0']") ?? F.current.panel)?.focus();
|
|
95
|
+
}
|
|
96
|
+
}), [L]);
|
|
97
|
+
let B = v(() => ({
|
|
98
|
+
close: (e, t, n) => void L(!1, e, t, n),
|
|
99
|
+
closeOnSelect: r ?? T.closeOnSelect,
|
|
100
|
+
nodes: F.current,
|
|
101
|
+
t: E
|
|
102
|
+
}), [
|
|
103
|
+
r,
|
|
104
|
+
T,
|
|
105
|
+
L,
|
|
106
|
+
E
|
|
107
|
+
]);
|
|
108
|
+
return /* @__PURE__ */ S(o, {
|
|
109
|
+
back: t ?? T.back,
|
|
110
|
+
container: i,
|
|
111
|
+
drag: "panel",
|
|
112
|
+
escape: s ?? T.escape,
|
|
113
|
+
initialFocus: z,
|
|
114
|
+
modal: j,
|
|
115
|
+
mode: "overlay",
|
|
116
|
+
mount: m ?? T.mount,
|
|
117
|
+
onOpenChange: R,
|
|
118
|
+
open: A,
|
|
119
|
+
outsidePress: x ?? T.outsidePress,
|
|
120
|
+
ref: M,
|
|
121
|
+
scrimFrom: j ? 0 : I,
|
|
122
|
+
side: "bottom",
|
|
123
|
+
size: "content",
|
|
124
|
+
...c === void 0 ? {} : { finalFocus: c },
|
|
125
|
+
children: /* @__PURE__ */ S(P.Provider, {
|
|
126
|
+
value: B,
|
|
127
|
+
children: n
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/action-sheet/action-sheet-parts.tsx
|
|
133
|
+
function R(e, ...t) {
|
|
134
|
+
for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
135
|
+
}
|
|
136
|
+
function z(e, t) {
|
|
137
|
+
return (n) => {
|
|
138
|
+
e?.(n), n.defaultPrevented || t(n);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function B(e) {
|
|
142
|
+
return e.detail === 0 ? "keyboard" : "pointer";
|
|
143
|
+
}
|
|
144
|
+
var V = (e) => e.dataset.textValue ?? e.querySelector("[data-part='label']")?.textContent?.trim() ?? e.textContent?.trim() ?? "";
|
|
145
|
+
function H({ render: e, ...t }) {
|
|
146
|
+
return /* @__PURE__ */ S(r, {
|
|
147
|
+
...t,
|
|
148
|
+
...e === void 0 ? {} : { render: (t) => e(t) }
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
var U = { "--slotted-drawer-sheet-inline-size": "var(--slotted-action-sheet-inline-size, 32rem)" };
|
|
152
|
+
function W({ children: e, ref: t, render: n, style: r, ...a }) {
|
|
153
|
+
let o = F();
|
|
154
|
+
return /* @__PURE__ */ S(i, {
|
|
155
|
+
...a,
|
|
156
|
+
ref: (e) => {
|
|
157
|
+
o.nodes.panel = e, R(e, t);
|
|
158
|
+
},
|
|
159
|
+
style: {
|
|
160
|
+
...U,
|
|
161
|
+
...r
|
|
162
|
+
},
|
|
163
|
+
tabIndex: -1,
|
|
164
|
+
...n === void 0 ? {} : { render: (e) => n(e) },
|
|
165
|
+
children: /* @__PURE__ */ S("div", {
|
|
166
|
+
"data-part": "root",
|
|
167
|
+
"data-part-root": "",
|
|
168
|
+
"data-ui": "action-sheet",
|
|
169
|
+
"data-ui-action-sheet": "",
|
|
170
|
+
children: e
|
|
171
|
+
})
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function G(e) {
|
|
175
|
+
return /* @__PURE__ */ S("header", {
|
|
176
|
+
"data-part": "header",
|
|
177
|
+
"data-part-header": "",
|
|
178
|
+
...e
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function K({ ref: e, render: n, ...r }) {
|
|
182
|
+
return /* @__PURE__ */ S(t, {
|
|
183
|
+
...r,
|
|
184
|
+
render: (t) => {
|
|
185
|
+
let r = {
|
|
186
|
+
...t,
|
|
187
|
+
ref: (t) => R(t, e)
|
|
188
|
+
};
|
|
189
|
+
return n === void 0 ? /* @__PURE__ */ S("h2", { ...r }) : n(r);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
function q({ ref: e, render: t, ...n }) {
|
|
194
|
+
return /* @__PURE__ */ S(a, {
|
|
195
|
+
...n,
|
|
196
|
+
render: (n) => {
|
|
197
|
+
let r = c({
|
|
198
|
+
...n,
|
|
199
|
+
"data-part": "message",
|
|
200
|
+
ref: (t) => R(t, e)
|
|
201
|
+
});
|
|
202
|
+
return t === void 0 ? /* @__PURE__ */ S("p", { ...r }) : t(r);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function J({ onFocus: e, onKeyDown: t, ref: r, ...i }) {
|
|
207
|
+
let a = F(), { titleId: o } = n(), [s, c] = b(null), d = y(null), f = y(null);
|
|
208
|
+
h(() => {
|
|
209
|
+
if (s === null) return;
|
|
210
|
+
let e = u(s, {
|
|
211
|
+
includeAriaDisabled: !0,
|
|
212
|
+
itemSelector: A,
|
|
213
|
+
orientation: () => "vertical"
|
|
214
|
+
});
|
|
215
|
+
d.current = e;
|
|
216
|
+
let t = T();
|
|
217
|
+
return f.current = t, () => {
|
|
218
|
+
e.destroy(), t.destroy(), d.current = null, f.current = null;
|
|
219
|
+
};
|
|
220
|
+
}, [s]), h(() => {
|
|
221
|
+
d.current?.refresh();
|
|
222
|
+
});
|
|
223
|
+
let p = o !== "" && i["aria-label"] === void 0;
|
|
224
|
+
return /* @__PURE__ */ S("div", {
|
|
225
|
+
"aria-orientation": "vertical",
|
|
226
|
+
...p ? { "aria-labelledby": o } : {},
|
|
227
|
+
...l(i, "part", "list"),
|
|
228
|
+
onFocus: z(e, (e) => {
|
|
229
|
+
let t = j(s).indexOf(e.target);
|
|
230
|
+
t !== -1 && d.current?.setActive(t);
|
|
231
|
+
}),
|
|
232
|
+
onKeyDown: z(t, (e) => {
|
|
233
|
+
let t = f.current;
|
|
234
|
+
if (t === null || e.ctrlKey || e.metaKey || e.altKey || !E(e.key, t.query.length > 0)) return;
|
|
235
|
+
e.preventDefault();
|
|
236
|
+
let n = j(s), r = n.indexOf(e.target);
|
|
237
|
+
n[t.match(e.key, n.map(V), r)]?.focus();
|
|
238
|
+
}),
|
|
239
|
+
ref: (e) => {
|
|
240
|
+
c(e), a.nodes.list = e, R(e, r);
|
|
241
|
+
},
|
|
242
|
+
role: "menu"
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
function Y(e) {
|
|
246
|
+
return /* @__PURE__ */ S("div", {
|
|
247
|
+
"data-part": "group-label",
|
|
248
|
+
"data-part-group-label": "",
|
|
249
|
+
...e
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
function X({ children: e, label: t, ...n }) {
|
|
253
|
+
let r = `${g()}label`;
|
|
254
|
+
return /* @__PURE__ */ C("div", {
|
|
255
|
+
...t === void 0 ? {} : { "aria-labelledby": r },
|
|
256
|
+
...l(n, "part", "group"),
|
|
257
|
+
role: "group",
|
|
258
|
+
children: [t === void 0 ? null : /* @__PURE__ */ S(Y, {
|
|
259
|
+
id: r,
|
|
260
|
+
children: t
|
|
261
|
+
}), e]
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
function Z(e) {
|
|
265
|
+
return /* @__PURE__ */ S("hr", {
|
|
266
|
+
"data-part": "separator",
|
|
267
|
+
"data-part-separator": "",
|
|
268
|
+
role: "separator",
|
|
269
|
+
...e
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
function Q({ children: e, closeOnSelect: t, description: n, disabled: r, icon: i, loading: a, onClick: o, onPointerLeave: l, onPointerMove: u, onSelect: d, ref: f, render: p, textValue: m, tone: h, value: _, ...v }) {
|
|
273
|
+
let y = F(), b = `${g()}description`, w = r === !0 || a === !0, T = (e, n) => {
|
|
274
|
+
if (w) return;
|
|
275
|
+
let r = !1;
|
|
276
|
+
d?.({
|
|
277
|
+
reason: e,
|
|
278
|
+
source: n,
|
|
279
|
+
value: _,
|
|
280
|
+
get defaultPrevented() {
|
|
281
|
+
return r;
|
|
282
|
+
},
|
|
283
|
+
preventDefault: () => {
|
|
284
|
+
r = !0;
|
|
285
|
+
}
|
|
286
|
+
}), !r && (t ?? y.closeOnSelect) && y.close("select", _, n);
|
|
287
|
+
}, E = c({
|
|
288
|
+
...v,
|
|
289
|
+
type: "button",
|
|
290
|
+
children: /* @__PURE__ */ C(x, { children: [
|
|
291
|
+
i === void 0 && a !== !0 ? null : /* @__PURE__ */ S("span", {
|
|
292
|
+
"aria-hidden": "true",
|
|
293
|
+
"data-part": "icon",
|
|
294
|
+
"data-part-icon": "",
|
|
295
|
+
children: a === !0 ? /* @__PURE__ */ S("span", {
|
|
296
|
+
"data-ui": "spinner",
|
|
297
|
+
"data-ui-spinner": "",
|
|
298
|
+
children: s
|
|
299
|
+
}) : i
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ S("span", {
|
|
302
|
+
"data-part": "label",
|
|
303
|
+
"data-part-label": "",
|
|
304
|
+
children: e
|
|
305
|
+
}),
|
|
306
|
+
n === void 0 ? null : /* @__PURE__ */ S("span", {
|
|
307
|
+
"data-part": "description",
|
|
308
|
+
"data-part-description": "",
|
|
309
|
+
id: b,
|
|
310
|
+
children: n
|
|
311
|
+
})
|
|
312
|
+
] }),
|
|
313
|
+
...n === void 0 ? {} : { "aria-describedby": b },
|
|
314
|
+
...w ? { "aria-disabled": !0 } : {},
|
|
315
|
+
...a === !0 ? {
|
|
316
|
+
"aria-busy": !0,
|
|
317
|
+
"data-loading": ""
|
|
318
|
+
} : {},
|
|
319
|
+
...r === !0 ? { "data-disabled": "" } : {},
|
|
320
|
+
...m === void 0 ? {} : { "data-text-value": m },
|
|
321
|
+
...h === void 0 ? {} : { "data-tone": h },
|
|
322
|
+
..._ === void 0 ? {} : { "data-value": _ },
|
|
323
|
+
"data-part": "item",
|
|
324
|
+
onClick: z(o, (e) => T(B(e), e.nativeEvent)),
|
|
325
|
+
onPointerMove: z(u, (e) => {
|
|
326
|
+
if (e.pointerType === "touch") return;
|
|
327
|
+
let t = e.currentTarget;
|
|
328
|
+
t.ownerDocument.activeElement !== t && t.focus({ preventScroll: !0 });
|
|
329
|
+
}),
|
|
330
|
+
onPointerLeave: z(l, (e) => {
|
|
331
|
+
if (e.pointerType === "touch") return;
|
|
332
|
+
let t = e.currentTarget;
|
|
333
|
+
t.ownerDocument.activeElement === t && y.nodes.panel?.focus({ preventScroll: !0 });
|
|
334
|
+
}),
|
|
335
|
+
ref: (e) => R(e, f),
|
|
336
|
+
role: "menuitem",
|
|
337
|
+
tabIndex: -1
|
|
338
|
+
});
|
|
339
|
+
return p === void 0 ? /* @__PURE__ */ S("button", { ...E }) : p(E);
|
|
340
|
+
}
|
|
341
|
+
function $({ children: e, onClick: t, ref: n, render: r, ...i }) {
|
|
342
|
+
let a = F(), o = c({
|
|
343
|
+
...i,
|
|
344
|
+
children: e ?? a.t("cancel"),
|
|
345
|
+
"data-part": "cancel",
|
|
346
|
+
onClick: z(t, (e) => a.close("dismiss", void 0, e.nativeEvent)),
|
|
347
|
+
ref: (e) => R(e, n),
|
|
348
|
+
type: "button"
|
|
349
|
+
});
|
|
350
|
+
return /* @__PURE__ */ S("div", {
|
|
351
|
+
"data-part": "footer",
|
|
352
|
+
"data-part-footer": "",
|
|
353
|
+
children: r === void 0 ? /* @__PURE__ */ S("button", {
|
|
354
|
+
...o,
|
|
355
|
+
disabled: !1
|
|
356
|
+
}) : r(o)
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
//#endregion
|
|
360
|
+
export { G as a, q as c, H as d, L as f, O as h, Y as i, Z as l, k as m, W as n, Q as o, F as p, X as r, J as s, $ as t, K as u };
|
package/dist/action-sheet.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./action-sheet-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./action-sheet-BnedGewu.js";
|
|
2
2
|
export { r as ActionSheet, p as ActionSheetCancel, c as ActionSheetContent, s as ActionSheetDefaultsProvider, d as ActionSheetGroup, a as ActionSheetGroupLabel, e as ActionSheetHeader, l as ActionSheetItem, f as ActionSheetList, t as ActionSheetMessage, o as ActionSheetSeparator, m as ActionSheetTitle, n as ActionSheetTrigger, u as useActionSheet, i as useActionSheetDefaults };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { r as e } from "./i18n-D7xXDd8-.js";
|
|
2
|
+
import { n as t, t as n } from "./icon-DjqSEQ-o.js";
|
|
3
3
|
import { keyedProps as r } from "@slotted/core/selector-key";
|
|
4
4
|
import { createControllable as i } from "@slotted/core/state";
|
|
5
5
|
import { createContext as a, useCallback as o, useContext as s, useEffect as c, useId as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
@@ -83,7 +83,7 @@ var D = {
|
|
|
83
83
|
danger: "circle-x"
|
|
84
84
|
};
|
|
85
85
|
function O({ children: a, defaultOpen: s = !0, dismissible: g = !1, hideIcon: v = !1, icon: y, live: x, messages: S, onBlur: C, onFocus: w, onOpenChange: T, open: E, reach: O, ref: k, render: A, restoreFocus: j = !0, tone: M, variant: N, ...P }) {
|
|
86
|
-
let F = _(), I =
|
|
86
|
+
let F = _(), I = e(h, S), [L, R] = f(s), [z, B] = f(!1), V = `${l()}title`, H = x ?? F.live, U = E ?? L, W = d(null), G = d(!1), K = d(U), q = d(j);
|
|
87
87
|
c(() => {
|
|
88
88
|
q.current = j;
|
|
89
89
|
}, [j]);
|
|
@@ -119,7 +119,7 @@ function O({ children: a, defaultOpen: s = !0, dismissible: g = !1, hideIcon: v
|
|
|
119
119
|
"aria-hidden": "true",
|
|
120
120
|
"data-part": "icon",
|
|
121
121
|
"data-part-icon": "",
|
|
122
|
-
children: y ?? (Z === null ? null : /* @__PURE__ */ p(
|
|
122
|
+
children: y ?? (Z === null ? null : /* @__PURE__ */ p(n, { children: /* @__PURE__ */ p(t, {
|
|
123
123
|
name: Z,
|
|
124
124
|
solid: !0
|
|
125
125
|
}) }))
|
|
@@ -133,7 +133,7 @@ function O({ children: a, defaultOpen: s = !0, dismissible: g = !1, hideIcon: v
|
|
|
133
133
|
e.defaultPrevented || X("dismiss", e);
|
|
134
134
|
},
|
|
135
135
|
type: "button",
|
|
136
|
-
children: /* @__PURE__ */ p(
|
|
136
|
+
children: /* @__PURE__ */ p(n, { children: /* @__PURE__ */ p(t, { name: "x" }) })
|
|
137
137
|
}) : null
|
|
138
138
|
]
|
|
139
139
|
}),
|
package/dist/alert.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 "./alert-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./alert-BTAXJ69M.js";
|
|
2
2
|
export { o as Alert, n as AlertActions, i as AlertContent, r as AlertDefaultsProvider, t as AlertDescription, e as AlertTitle, a as useAlertDefaults };
|