@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,42 +1,44 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
2
|
import { r as n } from "./i18n-DpW8lqJ1.js";
|
|
3
|
-
import { n as r } from "./icon-button-
|
|
4
|
-
import { a as i, i as a, n as o, r as s } from "./tooltip-
|
|
5
|
-
import { t as c } from "./checkbox-
|
|
3
|
+
import { n as r } from "./icon-button-CCWkCDMs.js";
|
|
4
|
+
import { a as i, i as a, n as o, r as s } from "./tooltip-DbKTPe_i.js";
|
|
5
|
+
import { t as c } from "./checkbox-DfxFHZaU.js";
|
|
6
6
|
import { i as l } from "./skeleton-2LSpg84Z.js";
|
|
7
|
-
import { t as u } from "./text-field-
|
|
8
|
-
import { a as d, d as f, f as p, l as m } from "./popover-
|
|
7
|
+
import { t as u } from "./text-field-DLfIZ0fk.js";
|
|
8
|
+
import { a as d, d as f, f as p, l as m } from "./popover-Be7JWbGJ.js";
|
|
9
9
|
import { t as h } from "./visually-hidden-CE6u5JLW.js";
|
|
10
|
-
import { t as g } from "./date-picker-
|
|
11
|
-
import { t as _ } from "./date-range-picker-
|
|
12
|
-
import { t as ee } from "./datetime-picker-
|
|
13
|
-
import { t as te } from "./datetime-range-picker-
|
|
14
|
-
import { t as ne } from "./number-field-
|
|
15
|
-
import { c as re, i as ie, n as ae, o as oe, s as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { n as ce, t as b } from "./radio-group-
|
|
19
|
-
import { t as x } from "./tags-input-
|
|
10
|
+
import { t as g } from "./date-picker-D3-y2Jxw.js";
|
|
11
|
+
import { t as _ } from "./date-range-picker-y3b82Wmf.js";
|
|
12
|
+
import { t as ee } from "./datetime-picker-CIRHVLQp.js";
|
|
13
|
+
import { t as te } from "./datetime-range-picker-DM-1m98z.js";
|
|
14
|
+
import { t as ne } from "./number-field-BFIAmv-z.js";
|
|
15
|
+
import { c as re, i as ie, n as ae, o as oe, s as se } from "./select-M7Io4UL9.js";
|
|
16
|
+
import { t as v } from "./time-picker-CRQsMJbQ.js";
|
|
17
|
+
import { t as y } from "./time-range-picker-DlZJsj1e.js";
|
|
18
|
+
import { n as ce, t as b } from "./radio-group-BaVIP9UH.js";
|
|
19
|
+
import { t as x } from "./tags-input-CcOkm0AW.js";
|
|
20
20
|
import { createControllable as le } from "@slotted/core/state";
|
|
21
|
-
import { createContext as S, useCallback as C, useContext as w, useEffect as ue, useId as de, useImperativeHandle as T, useMemo as E, useRef as
|
|
22
|
-
import { Fragment as
|
|
23
|
-
import { createScrollAffordance as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
21
|
+
import { createContext as S, useCallback as C, useContext as w, useEffect as ue, useId as de, useImperativeHandle as T, useMemo as E, useRef as fe, useState as D } from "react";
|
|
22
|
+
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
23
|
+
import { createScrollAffordance as j } from "@slotted/core/overflow";
|
|
24
|
+
import { isRowAction as M } from "@slotted/core/pointer-intent";
|
|
25
|
+
import { tableMessages as pe } from "@slotted/core/i18n";
|
|
26
|
+
import { getLiveAnnouncer as me } from "@slotted/core/live-announcer";
|
|
27
|
+
import { isPlainDate as he, isPlainDateTime as N, isPlainTime as ge, parseISODate as P, parseISODateTime as F, parseISOTime as I, toISODate as _e, toISOTime as L } from "@slotted/core/date";
|
|
28
|
+
import { createFilter as ve, nextSelection as ye } from "@slotted/core/collection";
|
|
29
|
+
import { defaultOperator as be, describeFilter as xe, emptyFilter as Se, isConditionActive as R, isFilterActive as Ce, normalizeFilter as we, operandCount as z, operatorsFor as B, serializeFilter as V, withCondition as Te, withJoin as Ee } from "@slotted/core/filter";
|
|
29
30
|
//#region src/table/table-defaults.tsx
|
|
30
|
-
var
|
|
31
|
-
function
|
|
32
|
-
return w(
|
|
31
|
+
var De = S({});
|
|
32
|
+
function H() {
|
|
33
|
+
return w(De);
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
-
let n =
|
|
36
|
-
return /* @__PURE__ */
|
|
35
|
+
function U({ children: e, ...t }) {
|
|
36
|
+
let n = H();
|
|
37
|
+
return /* @__PURE__ */ k(De.Provider, {
|
|
37
38
|
value: {
|
|
38
39
|
cellAlign: t.cellAlign ?? n.cellAlign,
|
|
39
40
|
columns: t.columns ?? n.columns,
|
|
41
|
+
edges: t.edges ?? n.edges,
|
|
40
42
|
layout: t.layout ?? n.layout,
|
|
41
43
|
selectionMode: t.selectionMode ?? n.selectionMode,
|
|
42
44
|
stickyFooter: t.stickyFooter ?? n.stickyFooter,
|
|
@@ -56,112 +58,113 @@ function K() {
|
|
|
56
58
|
if (e === void 0) throw Error("Every Table part must be rendered inside Table.");
|
|
57
59
|
return e;
|
|
58
60
|
}
|
|
59
|
-
function
|
|
61
|
+
function Oe() {
|
|
60
62
|
return w(G);
|
|
61
63
|
}
|
|
62
|
-
function
|
|
63
|
-
let v =
|
|
64
|
-
|
|
65
|
-
}, [
|
|
66
|
-
function
|
|
64
|
+
function q({ children: e, columns: t, defaultExpanded: r, defaultSort: i, defaultValue: a, edges: o, expanded: s, layout: c, loading: l, messages: u, onExpandedChange: d, onSortChange: f, onValueChange: p, ref: m, render: h, selectionMode: g, sort: _, cellAlign: ee, stickyFooter: te, stickyHeader: ne, stickyTo: re, striped: ie, value: ae, variant: oe, ...se }) {
|
|
65
|
+
let v = H(), y = n(pe, u), ce = de(), [b, x] = D(i ?? null), [S, w] = D(a ?? []), [ue, T] = D(r ?? []), E = fe(null), O = fe(void 0), A = _ === void 0 ? b : _, j = ae ?? S, M = s ?? ue, he = t ?? v.columns ?? 1, N = o ?? v.edges ?? "inset", ge = c ?? v.layout ?? "auto", P = g ?? v.selectionMode ?? "none", F = (ne ?? v.stickyHeader ?? !1) === !0, I = (te ?? v.stickyFooter ?? !1) === !0, _e = ee ?? v.cellAlign ?? "center", L = re ?? v.stickyTo ?? "scroll", ve = (ie ?? v.striped ?? !1) === !0, be = oe ?? v.variant ?? "ruled", xe = C((e) => {
|
|
66
|
+
E.current = e, typeof m == "function" ? m(e) : m != null && (m.current = e);
|
|
67
|
+
}, [m]), Se = C(() => [...E.current?.querySelectorAll("[data-part=\"body\"] > [data-part=\"row\"][data-value]") ?? []].filter((e) => !e.hasAttribute("data-disabled")).map((e) => e.getAttribute("data-value") ?? ""), []);
|
|
68
|
+
function R(e, t, n) {
|
|
67
69
|
le({
|
|
68
|
-
controlled:
|
|
70
|
+
controlled: ae,
|
|
69
71
|
initial: j,
|
|
70
72
|
equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
|
|
71
|
-
onRequest: (e) =>
|
|
72
|
-
}).request(e, t, n) &&
|
|
73
|
+
onRequest: (e) => p?.(e.value, e)
|
|
74
|
+
}).request(e, t, n) && w(e);
|
|
73
75
|
}
|
|
74
|
-
let
|
|
75
|
-
columns:
|
|
76
|
+
let Ce = {
|
|
77
|
+
columns: he,
|
|
76
78
|
expanded: M,
|
|
77
|
-
id:
|
|
79
|
+
id: ce,
|
|
78
80
|
isExpanded: (e) => M.includes(e),
|
|
79
81
|
isSelected: (e) => j.includes(e),
|
|
80
|
-
loading:
|
|
81
|
-
rows:
|
|
82
|
+
loading: l === !0,
|
|
83
|
+
rows: Se,
|
|
82
84
|
requestSort(e, t) {
|
|
83
|
-
let n =
|
|
85
|
+
let n = A?.column === e ? A.direction === "ascending" ? {
|
|
84
86
|
column: e,
|
|
85
87
|
direction: "descending"
|
|
86
88
|
} : null : {
|
|
87
89
|
column: e,
|
|
88
90
|
direction: "ascending"
|
|
89
91
|
}, r = le({
|
|
90
|
-
controlled:
|
|
91
|
-
initial:
|
|
92
|
+
controlled: _,
|
|
93
|
+
initial: A,
|
|
92
94
|
equals: (e, t) => e?.column === t?.column && e?.direction === t?.direction,
|
|
93
|
-
onRequest: (e) =>
|
|
95
|
+
onRequest: (e) => f?.(e.value, e)
|
|
94
96
|
}), i = n === null ? "clear" : "pointer", a = r.request(n, i, t), o = t?.currentTarget?.textContent?.trim() ?? e, s = n === null ? y("sortCleared", { column: o }) : n.direction === "ascending" ? y("sortedAscending", { column: o }) : y("sortedDescending", { column: o });
|
|
95
|
-
|
|
97
|
+
me(E.current?.ownerDocument).announce(s), a && x(n);
|
|
96
98
|
},
|
|
97
|
-
selectionMode:
|
|
98
|
-
sort:
|
|
99
|
-
stickyTo:
|
|
99
|
+
selectionMode: P,
|
|
100
|
+
sort: A,
|
|
101
|
+
stickyTo: L,
|
|
100
102
|
toggleExpanded(e, t) {
|
|
101
103
|
let n = M.includes(e) ? M.filter((t) => t !== e) : [...M, e];
|
|
102
104
|
le({
|
|
103
|
-
controlled:
|
|
105
|
+
controlled: s,
|
|
104
106
|
initial: M,
|
|
105
107
|
equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
|
|
106
|
-
onRequest: (e) =>
|
|
107
|
-
}).request(n, "pointer", t) &&
|
|
108
|
+
onRequest: (e) => d?.(e.value, e)
|
|
109
|
+
}).request(n, "pointer", t) && T(n);
|
|
108
110
|
},
|
|
109
111
|
toggleSelected(e, { range: t, source: n }) {
|
|
110
|
-
let r =
|
|
111
|
-
action: t &&
|
|
112
|
-
anchor:
|
|
112
|
+
let r = ye({
|
|
113
|
+
action: t && P === "multiple" ? "range" : "toggle",
|
|
114
|
+
anchor: O.current,
|
|
113
115
|
behavior: "toggle",
|
|
114
116
|
key: e,
|
|
115
|
-
keys:
|
|
116
|
-
mode:
|
|
117
|
+
keys: Se(),
|
|
118
|
+
mode: P,
|
|
117
119
|
selected: j
|
|
118
120
|
});
|
|
119
|
-
t || (
|
|
121
|
+
t || (O.current = e), R(r.selected, t ? "select" : "pointer", n);
|
|
120
122
|
},
|
|
121
123
|
toggleSelectAll(e) {
|
|
122
|
-
let t =
|
|
124
|
+
let t = ye({
|
|
123
125
|
action: "all",
|
|
124
|
-
keys:
|
|
125
|
-
mode:
|
|
126
|
+
keys: Se(),
|
|
127
|
+
mode: P,
|
|
126
128
|
selected: j
|
|
127
129
|
});
|
|
128
|
-
|
|
130
|
+
R(t.selected, t.selected.length === 0 ? "clear" : "select", e);
|
|
129
131
|
},
|
|
130
132
|
t: y,
|
|
131
133
|
value: j
|
|
132
|
-
},
|
|
133
|
-
...
|
|
134
|
+
}, we = {
|
|
135
|
+
...se,
|
|
134
136
|
children: e,
|
|
135
|
-
"data-cell-align":
|
|
136
|
-
"data-
|
|
137
|
-
|
|
137
|
+
"data-cell-align": _e,
|
|
138
|
+
"data-edges": N,
|
|
139
|
+
"data-layout": ge,
|
|
140
|
+
...l === !0 ? { "data-loading": "" } : {},
|
|
138
141
|
"data-part": "root",
|
|
139
|
-
...
|
|
140
|
-
...
|
|
141
|
-
"data-sticky-to":
|
|
142
|
-
...
|
|
142
|
+
...F ? { "data-sticky-header": "" } : {},
|
|
143
|
+
...I ? { "data-sticky-footer": "" } : {},
|
|
144
|
+
"data-sticky-to": L,
|
|
145
|
+
...ve ? { "data-striped": "" } : {},
|
|
143
146
|
"data-ui": "table",
|
|
144
|
-
"data-variant":
|
|
145
|
-
ref:
|
|
147
|
+
"data-variant": be,
|
|
148
|
+
ref: xe
|
|
146
149
|
};
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
-
value:
|
|
149
|
-
children:
|
|
150
|
+
return /* @__PURE__ */ k(G.Provider, {
|
|
151
|
+
value: Ce,
|
|
152
|
+
children: h === void 0 ? /* @__PURE__ */ k("div", { ...we }) : h(we)
|
|
150
153
|
});
|
|
151
154
|
}
|
|
152
155
|
//#endregion
|
|
153
156
|
//#region src/table/table-content.tsx
|
|
154
|
-
function
|
|
155
|
-
let s = K(), [c, l] =
|
|
157
|
+
function ke({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProps: i, totalRowCount: a, ...o }) {
|
|
158
|
+
let s = K(), [c, l] = D(null), [u, d] = D({
|
|
156
159
|
overflowing: !1,
|
|
157
160
|
atStart: !0,
|
|
158
161
|
atEnd: !0
|
|
159
|
-
}), f =
|
|
162
|
+
}), f = fe(null), { ref: p, ...m } = i ?? {}, h = C((e) => {
|
|
160
163
|
l(e), typeof p == "function" ? p(e) : p != null && (p.current = e);
|
|
161
164
|
}, [p]);
|
|
162
165
|
ue(() => {
|
|
163
166
|
if (c === null || s.stickyTo === "page") return;
|
|
164
|
-
let e =
|
|
167
|
+
let e = j(c, { onChange: d });
|
|
165
168
|
return f.current = e, d(e.state()), () => {
|
|
166
169
|
e.destroy(), f.current = null;
|
|
167
170
|
};
|
|
@@ -178,9 +181,9 @@ function q({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProps
|
|
|
178
181
|
"data-part": "scroll",
|
|
179
182
|
ref: h
|
|
180
183
|
};
|
|
181
|
-
return u.overflowing && (g["data-overflowing"] = "", u.atStart && (g["data-at-start"] = ""), u.atEnd && (g["data-at-end"] = ""), g.role = m.role ?? "region", g.tabIndex = m.tabIndex ?? 0, r === void 0 ? m["aria-label"] === void 0 && (g["aria-label"] = s.t("scroll")) : g["aria-labelledby"] = r), /* @__PURE__ */
|
|
184
|
+
return u.overflowing && (g["data-overflowing"] = "", u.atStart && (g["data-at-start"] = ""), u.atEnd && (g["data-at-end"] = ""), g.role = m.role ?? "region", g.tabIndex = m.tabIndex ?? 0, r === void 0 ? m["aria-label"] === void 0 && (g["aria-label"] = s.t("scroll")) : g["aria-labelledby"] = r), /* @__PURE__ */ k("div", {
|
|
182
185
|
...g,
|
|
183
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ k("table", {
|
|
184
187
|
...o,
|
|
185
188
|
...a === void 0 ? {} : { "aria-rowcount": a },
|
|
186
189
|
...s.loading ? { "aria-busy": !0 } : {},
|
|
@@ -192,12 +195,12 @@ function q({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProps
|
|
|
192
195
|
}
|
|
193
196
|
//#endregion
|
|
194
197
|
//#region src/table/table-parts.tsx
|
|
195
|
-
var
|
|
196
|
-
function je() {
|
|
197
|
-
return w(Ae);
|
|
198
|
-
}
|
|
198
|
+
var Ae = S(void 0), je = S(void 0);
|
|
199
199
|
function Me() {
|
|
200
|
-
|
|
200
|
+
return w(je);
|
|
201
|
+
}
|
|
202
|
+
function Ne() {
|
|
203
|
+
let e = w(Ae);
|
|
201
204
|
if (e === void 0) throw Error("TableSelect, TableExpander and TableRowHeader belong inside TableRow.");
|
|
202
205
|
return e;
|
|
203
206
|
}
|
|
@@ -214,74 +217,82 @@ function J({ align: e, blockAlign: t, numeric: n, sticky: r, stickyOffset: i, te
|
|
|
214
217
|
} }
|
|
215
218
|
};
|
|
216
219
|
}
|
|
217
|
-
function
|
|
218
|
-
return /* @__PURE__ */
|
|
220
|
+
function Pe({ ref: e, ...t }) {
|
|
221
|
+
return /* @__PURE__ */ k("caption", {
|
|
219
222
|
...t,
|
|
220
223
|
"data-part": "caption",
|
|
221
224
|
ref: e
|
|
222
225
|
});
|
|
223
226
|
}
|
|
224
|
-
function
|
|
225
|
-
return /* @__PURE__ */
|
|
227
|
+
function Fe({ ref: e, ...t }) {
|
|
228
|
+
return /* @__PURE__ */ k("thead", {
|
|
226
229
|
...t,
|
|
227
230
|
"data-part": "head",
|
|
228
231
|
ref: e
|
|
229
232
|
});
|
|
230
233
|
}
|
|
231
|
-
function
|
|
232
|
-
return /* @__PURE__ */
|
|
234
|
+
function Ie({ ref: e, ...t }) {
|
|
235
|
+
return /* @__PURE__ */ k("tbody", {
|
|
233
236
|
...t,
|
|
234
237
|
"data-part": "body",
|
|
235
238
|
ref: e
|
|
236
239
|
});
|
|
237
240
|
}
|
|
238
|
-
function
|
|
239
|
-
return /* @__PURE__ */
|
|
241
|
+
function Le({ ref: e, ...t }) {
|
|
242
|
+
return /* @__PURE__ */ k("tfoot", {
|
|
240
243
|
...t,
|
|
241
244
|
"data-part": "summary",
|
|
242
245
|
ref: e
|
|
243
246
|
});
|
|
244
247
|
}
|
|
245
|
-
function
|
|
246
|
-
return /* @__PURE__ */
|
|
248
|
+
function Re({ ref: e, ...t }) {
|
|
249
|
+
return /* @__PURE__ */ k("div", {
|
|
247
250
|
...t,
|
|
248
251
|
"data-part": "footer",
|
|
249
252
|
ref: e
|
|
250
253
|
});
|
|
251
254
|
}
|
|
252
|
-
function
|
|
253
|
-
let
|
|
254
|
-
|
|
255
|
+
function ze({ children: e, current: t, disabled: n, interactive: r, onAction: i, onClick: a, ref: o, render: s, rowIndex: c, value: l, ...u }) {
|
|
256
|
+
let d = K(), f = l !== void 0 && d.isSelected(l), p = l !== void 0 && d.isExpanded(l), m = r ?? i !== void 0, h = i === void 0 ? a : (e) => {
|
|
257
|
+
a?.(e), !(e.defaultPrevented || n === !0) && M(e.currentTarget, e.target) && i(e);
|
|
258
|
+
}, g = {
|
|
259
|
+
...u,
|
|
255
260
|
children: e,
|
|
256
|
-
...t === !0 ? {
|
|
257
|
-
|
|
261
|
+
...t === !0 ? {
|
|
262
|
+
"aria-current": "true",
|
|
263
|
+
"data-current": ""
|
|
264
|
+
} : {},
|
|
265
|
+
...n === !0 ? { "data-disabled": "" } : {},
|
|
266
|
+
...p ? { "data-expanded": "" } : {},
|
|
267
|
+
...m ? { "data-interactive": "" } : {},
|
|
268
|
+
...h === void 0 ? {} : { onClick: h },
|
|
258
269
|
"data-part": "row",
|
|
259
|
-
...
|
|
260
|
-
...
|
|
261
|
-
...
|
|
262
|
-
},
|
|
263
|
-
detailId: `${
|
|
264
|
-
disabled:
|
|
265
|
-
expanded:
|
|
266
|
-
selected:
|
|
267
|
-
value:
|
|
270
|
+
...f ? { "data-selected": "" } : {},
|
|
271
|
+
...l === void 0 ? {} : { "data-value": l },
|
|
272
|
+
...c === void 0 ? {} : { "aria-rowindex": c }
|
|
273
|
+
}, _ = {
|
|
274
|
+
detailId: `${d.id}detail${l ?? ""}`,
|
|
275
|
+
disabled: n === !0,
|
|
276
|
+
expanded: p,
|
|
277
|
+
selected: f,
|
|
278
|
+
value: l
|
|
268
279
|
};
|
|
269
|
-
return /* @__PURE__ */
|
|
270
|
-
value:
|
|
271
|
-
children:
|
|
272
|
-
...
|
|
273
|
-
ref:
|
|
274
|
-
}) :
|
|
280
|
+
return /* @__PURE__ */ k(Ae.Provider, {
|
|
281
|
+
value: _,
|
|
282
|
+
children: s === void 0 ? /* @__PURE__ */ k("tr", {
|
|
283
|
+
...g,
|
|
284
|
+
ref: o
|
|
285
|
+
}) : s(g)
|
|
275
286
|
});
|
|
276
287
|
}
|
|
277
|
-
function
|
|
288
|
+
function Be(e, ...t) {
|
|
278
289
|
for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
279
290
|
}
|
|
280
|
-
function
|
|
281
|
-
return /* @__PURE__ */
|
|
291
|
+
function Ve({ header: e }) {
|
|
292
|
+
return /* @__PURE__ */ k(O, { children: (e.current?.textContent ?? "").trim() });
|
|
282
293
|
}
|
|
283
|
-
function
|
|
284
|
-
let g = K(), _ =
|
|
294
|
+
function He({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref: l, scope: u, sticky: d, stickyOffset: f, style: p, text: m, ...h }) {
|
|
295
|
+
let g = K(), _ = fe(null), ee = r !== void 0 && g.sort?.column === r, te = {
|
|
285
296
|
...h,
|
|
286
297
|
...J({
|
|
287
298
|
align: e,
|
|
@@ -296,27 +307,27 @@ function Ve({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref:
|
|
|
296
307
|
"data-part": "column-header",
|
|
297
308
|
scope: u ?? "col"
|
|
298
309
|
};
|
|
299
|
-
return /* @__PURE__ */
|
|
310
|
+
return /* @__PURE__ */ k(je.Provider, {
|
|
300
311
|
value: r,
|
|
301
|
-
children: /* @__PURE__ */
|
|
312
|
+
children: /* @__PURE__ */ A(i, {
|
|
302
313
|
describes: "none",
|
|
303
314
|
openOn: "hover",
|
|
304
315
|
side: "bottom",
|
|
305
316
|
whenClipped: !0,
|
|
306
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ k(a, {
|
|
307
318
|
...te,
|
|
308
|
-
render: (e) => /* @__PURE__ */
|
|
319
|
+
render: (e) => /* @__PURE__ */ k("th", {
|
|
309
320
|
...e,
|
|
310
321
|
ref: (t) => {
|
|
311
|
-
e.ref?.(t), _.current = t,
|
|
322
|
+
e.ref?.(t), _.current = t, Be(t, l);
|
|
312
323
|
}
|
|
313
324
|
})
|
|
314
|
-
}), /* @__PURE__ */
|
|
325
|
+
}), /* @__PURE__ */ k(s, { children: /* @__PURE__ */ k(o, { children: /* @__PURE__ */ k(Ve, { header: _ }) }) })]
|
|
315
326
|
})
|
|
316
327
|
});
|
|
317
328
|
}
|
|
318
|
-
function
|
|
319
|
-
return /* @__PURE__ */
|
|
329
|
+
function Ue({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a, stickyOffset: o, style: s, text: c, ...l }) {
|
|
330
|
+
return /* @__PURE__ */ k("th", {
|
|
320
331
|
...l,
|
|
321
332
|
...J({
|
|
322
333
|
align: e,
|
|
@@ -331,8 +342,8 @@ function He({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a,
|
|
|
331
342
|
scope: i ?? "row"
|
|
332
343
|
});
|
|
333
344
|
}
|
|
334
|
-
function
|
|
335
|
-
return /* @__PURE__ */
|
|
345
|
+
function We({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...c }) {
|
|
346
|
+
return /* @__PURE__ */ k("td", {
|
|
336
347
|
...c,
|
|
337
348
|
...J({
|
|
338
349
|
align: e,
|
|
@@ -346,33 +357,33 @@ function Ue({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
346
357
|
ref: r
|
|
347
358
|
});
|
|
348
359
|
}
|
|
349
|
-
function
|
|
350
|
-
let c = K(), l = w(
|
|
360
|
+
function Ge({ children: n, column: r, onClick: i, ref: a, render: o, ...s }) {
|
|
361
|
+
let c = K(), l = w(je), u = r ?? l;
|
|
351
362
|
function d(e) {
|
|
352
363
|
i?.(e), !(e.defaultPrevented || u === void 0) && c.requestSort(u, e);
|
|
353
364
|
}
|
|
354
365
|
let f = {
|
|
355
366
|
...s,
|
|
356
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ A(O, { children: [n, /* @__PURE__ */ k(t, { children: /* @__PURE__ */ k(e, { name: "chevron-down" }) })] }),
|
|
357
368
|
"data-part": "sort",
|
|
358
369
|
onClick: d,
|
|
359
370
|
type: "button"
|
|
360
371
|
};
|
|
361
|
-
return o === void 0 ? /* @__PURE__ */
|
|
372
|
+
return o === void 0 ? /* @__PURE__ */ k("button", {
|
|
362
373
|
...f,
|
|
363
374
|
ref: a
|
|
364
375
|
}) : o(f);
|
|
365
376
|
}
|
|
366
|
-
function
|
|
367
|
-
return /* @__PURE__ */
|
|
377
|
+
function Ke({ ref: e, ...t }) {
|
|
378
|
+
return /* @__PURE__ */ k("span", {
|
|
368
379
|
...t,
|
|
369
380
|
"data-part": "column-actions",
|
|
370
381
|
ref: e
|
|
371
382
|
});
|
|
372
383
|
}
|
|
373
|
-
function
|
|
374
|
-
let d = K(), f =
|
|
375
|
-
return /* @__PURE__ */
|
|
384
|
+
function qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, value: l, ...u }) {
|
|
385
|
+
let d = K(), f = Ne(), p = l ?? f.value;
|
|
386
|
+
return /* @__PURE__ */ k("td", {
|
|
376
387
|
...u,
|
|
377
388
|
...J({
|
|
378
389
|
align: e,
|
|
@@ -384,7 +395,7 @@ function Ke({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
384
395
|
}, o),
|
|
385
396
|
"data-part": "selection",
|
|
386
397
|
ref: r,
|
|
387
|
-
children: /* @__PURE__ */
|
|
398
|
+
children: /* @__PURE__ */ k(c, {
|
|
388
399
|
checked: p !== void 0 && d.isSelected(p),
|
|
389
400
|
disabled: f.disabled,
|
|
390
401
|
onCheckedChange: (e, t) => {
|
|
@@ -395,13 +406,13 @@ function Ke({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
395
406
|
source: t.source
|
|
396
407
|
});
|
|
397
408
|
},
|
|
398
|
-
children: /* @__PURE__ */
|
|
409
|
+
children: /* @__PURE__ */ k(h, { children: d.t("selectRow", { row: p ?? "" }).trim() })
|
|
399
410
|
})
|
|
400
411
|
});
|
|
401
412
|
}
|
|
402
|
-
function
|
|
413
|
+
function Je({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...l }) {
|
|
403
414
|
let u = K(), d = u.value.length;
|
|
404
|
-
return /* @__PURE__ */
|
|
415
|
+
return /* @__PURE__ */ k("th", {
|
|
405
416
|
...l,
|
|
406
417
|
...J({
|
|
407
418
|
align: e,
|
|
@@ -414,66 +425,90 @@ function qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
414
425
|
"data-part": "selection",
|
|
415
426
|
ref: r,
|
|
416
427
|
scope: "col",
|
|
417
|
-
children: /* @__PURE__ */
|
|
428
|
+
children: /* @__PURE__ */ k(c, {
|
|
418
429
|
checked: d > 0 && d === u.rows().length,
|
|
419
430
|
indeterminate: d > 0 && d < u.rows().length,
|
|
420
431
|
onCheckedChange: (e, t) => u.toggleSelectAll(t.source),
|
|
421
|
-
children: /* @__PURE__ */
|
|
432
|
+
children: /* @__PURE__ */ k(h, { children: u.t("selectAll", { count: d }) })
|
|
422
433
|
})
|
|
423
434
|
});
|
|
424
435
|
}
|
|
425
|
-
function
|
|
426
|
-
let o = K(), s =
|
|
436
|
+
function Ye({ onClick: n, ref: r, value: i, ...a }) {
|
|
437
|
+
let o = K(), s = Ne(), c = i ?? s.value, l = c !== void 0 && o.isExpanded(c);
|
|
427
438
|
function u(e) {
|
|
428
439
|
n?.(e), !(e.defaultPrevented || c === void 0) && o.toggleExpanded(c, e);
|
|
429
440
|
}
|
|
430
|
-
return /* @__PURE__ */
|
|
441
|
+
return /* @__PURE__ */ k("button", {
|
|
431
442
|
...a,
|
|
432
443
|
"aria-controls": l ? s.detailId : void 0,
|
|
433
444
|
"aria-expanded": l,
|
|
434
445
|
"aria-label": a["aria-label"] ?? (l ? o.t("collapse") : o.t("expand")),
|
|
435
|
-
children: a.children ?? /* @__PURE__ */
|
|
446
|
+
children: a.children ?? /* @__PURE__ */ k(t, { children: /* @__PURE__ */ k(e, { name: "chevron-right" }) }),
|
|
436
447
|
"data-part": "expander",
|
|
437
448
|
onClick: u,
|
|
438
449
|
ref: r,
|
|
439
450
|
type: "button"
|
|
440
451
|
});
|
|
441
452
|
}
|
|
442
|
-
function
|
|
453
|
+
function Xe({ children: e, colSpan: t, ref: n, value: r, ...i }) {
|
|
443
454
|
let a = K();
|
|
444
|
-
return a.isExpanded(r) ? /* @__PURE__ */
|
|
455
|
+
return a.isExpanded(r) ? /* @__PURE__ */ k("tr", {
|
|
445
456
|
...i,
|
|
446
457
|
"data-part": "detail",
|
|
447
458
|
id: `${a.id}detail${r}`,
|
|
448
459
|
ref: n,
|
|
449
|
-
children: /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ k("td", {
|
|
450
461
|
colSpan: t ?? a.columns,
|
|
451
462
|
"data-part": "cell",
|
|
452
463
|
children: e
|
|
453
464
|
})
|
|
454
465
|
}) : null;
|
|
455
466
|
}
|
|
456
|
-
function
|
|
467
|
+
function Ze({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
|
|
468
|
+
let o = K();
|
|
469
|
+
return /* @__PURE__ */ k("tr", {
|
|
470
|
+
...a,
|
|
471
|
+
"data-part": "group-row",
|
|
472
|
+
...i === !0 ? { "data-sticky": "" } : {},
|
|
473
|
+
ref: r,
|
|
474
|
+
children: /* @__PURE__ */ k("th", {
|
|
475
|
+
colSpan: t ?? o.columns,
|
|
476
|
+
"data-part": "group-header",
|
|
477
|
+
scope: "rowgroup",
|
|
478
|
+
children: /* @__PURE__ */ A("div", {
|
|
479
|
+
"data-part": "group-content",
|
|
480
|
+
children: [/* @__PURE__ */ k("span", {
|
|
481
|
+
"data-part": "group-start",
|
|
482
|
+
children: e
|
|
483
|
+
}), n == null ? null : /* @__PURE__ */ k("span", {
|
|
484
|
+
"data-part": "group-end",
|
|
485
|
+
children: n
|
|
486
|
+
})]
|
|
487
|
+
})
|
|
488
|
+
})
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
function Qe({ colSpan: e, ref: t, ...n }) {
|
|
457
492
|
let r = K();
|
|
458
|
-
return /* @__PURE__ */
|
|
493
|
+
return /* @__PURE__ */ k("td", {
|
|
459
494
|
...n,
|
|
460
495
|
colSpan: e ?? r.columns,
|
|
461
496
|
"data-part": "empty",
|
|
462
497
|
ref: t
|
|
463
498
|
});
|
|
464
499
|
}
|
|
465
|
-
function
|
|
500
|
+
function $e({ children: e, ref: t, skeletonRows: n, ...r }) {
|
|
466
501
|
let i = K();
|
|
467
|
-
return /* @__PURE__ */
|
|
502
|
+
return /* @__PURE__ */ k("tbody", {
|
|
468
503
|
...r,
|
|
469
504
|
"aria-hidden": !0,
|
|
470
505
|
"data-part": "loader",
|
|
471
506
|
ref: t,
|
|
472
|
-
children: e ?? Array.from({ length: n ?? 5 }, (e, t) => /* @__PURE__ */
|
|
507
|
+
children: e ?? Array.from({ length: n ?? 5 }, (e, t) => /* @__PURE__ */ k("tr", {
|
|
473
508
|
"data-part": "row",
|
|
474
|
-
children: Array.from({ length: i.columns }, (e, t) => /* @__PURE__ */
|
|
509
|
+
children: Array.from({ length: i.columns }, (e, t) => /* @__PURE__ */ k("td", {
|
|
475
510
|
"data-part": "cell",
|
|
476
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ k(l, {
|
|
477
512
|
inlineSize: "100%",
|
|
478
513
|
loading: !0
|
|
479
514
|
})
|
|
@@ -483,8 +518,8 @@ function Ze({ children: e, ref: t, skeletonRows: n, ...r }) {
|
|
|
483
518
|
}
|
|
484
519
|
//#endregion
|
|
485
520
|
//#region src/table/table-filter.tsx
|
|
486
|
-
function
|
|
487
|
-
return /* @__PURE__ */
|
|
521
|
+
function et() {
|
|
522
|
+
return /* @__PURE__ */ k("svg", {
|
|
488
523
|
"aria-hidden": "true",
|
|
489
524
|
fill: "none",
|
|
490
525
|
stroke: "currentColor",
|
|
@@ -492,124 +527,124 @@ function Qe() {
|
|
|
492
527
|
strokeLinejoin: "round",
|
|
493
528
|
strokeWidth: "2",
|
|
494
529
|
viewBox: "0 0 24 24",
|
|
495
|
-
children: /* @__PURE__ */
|
|
530
|
+
children: /* @__PURE__ */ k("path", { d: "M22 3H2l8 9.46V19l4 2v-8.54L22 3z" })
|
|
496
531
|
});
|
|
497
532
|
}
|
|
498
|
-
function
|
|
533
|
+
function tt(e, t) {
|
|
499
534
|
return V(e) === V(t);
|
|
500
535
|
}
|
|
501
536
|
function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOperand: o, singleCondition: s }) {
|
|
502
|
-
let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: ee, label: te, mount: ne, onOpenChange:
|
|
503
|
-
function
|
|
504
|
-
|
|
537
|
+
let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: ee, label: te, mount: ne, onOpenChange: v, onValueChange: y, open: x, portal: S, renderOperand: C, side: w, sideOffset: ue, value: T } = a, E = K(), j = Me(), M = de(), [pe, he] = D(ee ?? null), N = T === void 0 ? pe : T, ge = _ ?? be(t), P = () => Se(t, ge), [F, I] = D(N ?? P()), [_e, L] = D(!1), ve = x ?? _e, ye = fe(null), B = E.t, V = u ?? j ?? "", De = Ce(N), H = s ? 1 : h;
|
|
538
|
+
function U(e) {
|
|
539
|
+
me(ye.current?.ownerDocument).announce(e);
|
|
505
540
|
}
|
|
506
|
-
let
|
|
507
|
-
join: (e) =>
|
|
508
|
-
operator: (e) =>
|
|
541
|
+
let W = {
|
|
542
|
+
join: (e) => B(`filterJoins.${e}`),
|
|
543
|
+
operator: (e) => B(`filterOperators.${e}`)
|
|
509
544
|
};
|
|
510
|
-
function
|
|
545
|
+
function G(e, t, n) {
|
|
511
546
|
le({
|
|
512
547
|
controlled: T,
|
|
513
548
|
initial: N,
|
|
514
|
-
equals:
|
|
515
|
-
onRequest: (e) =>
|
|
549
|
+
equals: tt,
|
|
550
|
+
onRequest: (e) => y?.(e.value, e)
|
|
516
551
|
}).request(e, t, n) && he(e);
|
|
517
552
|
}
|
|
518
553
|
function Oe(e, t) {
|
|
519
|
-
x === void 0 && L(e),
|
|
554
|
+
x === void 0 && L(e), v?.(e, t), I(N ?? P());
|
|
520
555
|
}
|
|
521
|
-
let q = (e) => F.conditions[e] ?? { operator: ge }, ke = q(0), Ae =
|
|
522
|
-
function
|
|
523
|
-
let n = q(e), r =
|
|
556
|
+
let q = (e) => F.conditions[e] ?? { operator: ge }, ke = q(0), Ae = H === 2 && R(t, ke);
|
|
557
|
+
function je(e, t) {
|
|
558
|
+
let n = q(e), r = z(n.operator), i = z(t), a = {
|
|
524
559
|
operator: t,
|
|
525
560
|
...i >= 1 && r >= 1 ? { value: n.value } : {},
|
|
526
561
|
...i === 2 && r === 2 ? { end: n.end } : {}
|
|
527
562
|
};
|
|
528
|
-
I(
|
|
529
|
-
operator:
|
|
563
|
+
I(Te(F, e, a)), i !== r && U(B("filterOperands", {
|
|
564
|
+
operator: W.operator(t),
|
|
530
565
|
count: i
|
|
531
566
|
}));
|
|
532
567
|
}
|
|
533
|
-
function
|
|
534
|
-
let i = q(e), a =
|
|
568
|
+
function Ne(e, n, r) {
|
|
569
|
+
let i = q(e), a = R(t, i), o = n === 0 ? {
|
|
535
570
|
...i,
|
|
536
571
|
value: r
|
|
537
572
|
} : {
|
|
538
573
|
...i,
|
|
539
574
|
end: r
|
|
540
575
|
};
|
|
541
|
-
I(
|
|
576
|
+
I(Te(F, e, o)), e === 0 && H === 2 && !a && R(t, o) && U(B("filterConditionAdded"));
|
|
542
577
|
}
|
|
543
|
-
function
|
|
544
|
-
let i = q(e), a =
|
|
578
|
+
function J(e, n, r) {
|
|
579
|
+
let i = q(e), a = R(t, i), o = {
|
|
545
580
|
...i,
|
|
546
581
|
value: n,
|
|
547
582
|
end: r
|
|
548
583
|
};
|
|
549
|
-
I(
|
|
584
|
+
I(Te(F, e, o)), e === 0 && H === 2 && !a && R(t, o) && U(B("filterConditionAdded"));
|
|
550
585
|
}
|
|
551
586
|
function Pe(e, t) {
|
|
552
|
-
let n =
|
|
553
|
-
|
|
554
|
-
column:
|
|
555
|
-
filter:
|
|
556
|
-
}) :
|
|
587
|
+
let n = we(F);
|
|
588
|
+
G(n, t, e), U(n ? B("filterApplied", {
|
|
589
|
+
column: V,
|
|
590
|
+
filter: xe(n, W)
|
|
591
|
+
}) : B("filterCleared", { column: V })), x === void 0 && L(!1), v?.(!1, e);
|
|
557
592
|
}
|
|
558
593
|
function Fe(e) {
|
|
559
|
-
I(P()),
|
|
594
|
+
I(P()), U(B("filterCleared", { column: V })), G(null, "clear", e), x === void 0 && L(!1), v?.(!1, e);
|
|
560
595
|
}
|
|
561
|
-
let Ie = te ?? (
|
|
562
|
-
column:
|
|
563
|
-
filter:
|
|
564
|
-
}) :
|
|
596
|
+
let Ie = te ?? (De ? B("filterApplied", {
|
|
597
|
+
column: V,
|
|
598
|
+
filter: xe(N, W)
|
|
599
|
+
}) : B("filterColumn", { column: V }).trim());
|
|
565
600
|
function Le(r) {
|
|
566
|
-
let a = q(r), s =
|
|
601
|
+
let a = q(r), s = z(a.operator), c = (e) => ({
|
|
567
602
|
apply: () => Pe(null, "keyboard"),
|
|
568
603
|
index: e,
|
|
569
|
-
label:
|
|
570
|
-
onValueChange: (t) =>
|
|
604
|
+
label: B(s === 2 ? e === 0 ? "filterFrom" : "filterTo" : "filterValue"),
|
|
605
|
+
onValueChange: (t) => Ne(r, e, t),
|
|
571
606
|
operator: a.operator,
|
|
572
607
|
value: (e === 0 ? a.value : a.end) ?? null
|
|
573
608
|
});
|
|
574
|
-
return /* @__PURE__ */
|
|
609
|
+
return /* @__PURE__ */ A("div", {
|
|
575
610
|
"data-operands": s,
|
|
576
611
|
"data-part": "filter-condition",
|
|
577
|
-
children: [/* @__PURE__ */
|
|
612
|
+
children: [/* @__PURE__ */ k("div", {
|
|
578
613
|
"data-part": "filter-operator",
|
|
579
|
-
children: /* @__PURE__ */
|
|
614
|
+
children: /* @__PURE__ */ A(re, {
|
|
580
615
|
fullWidth: !0,
|
|
581
616
|
items: i.map((e) => ({
|
|
582
|
-
label:
|
|
617
|
+
label: W.operator(e),
|
|
583
618
|
value: e
|
|
584
619
|
})),
|
|
585
|
-
onValueChange: (e) =>
|
|
620
|
+
onValueChange: (e) => je(r, e),
|
|
586
621
|
size: "sm",
|
|
587
622
|
value: a.operator,
|
|
588
|
-
children: [/* @__PURE__ */
|
|
589
|
-
"aria-label":
|
|
590
|
-
children: /* @__PURE__ */
|
|
591
|
-
}), /* @__PURE__ */
|
|
623
|
+
children: [/* @__PURE__ */ k(oe, {
|
|
624
|
+
"aria-label": B("filterOperator"),
|
|
625
|
+
children: /* @__PURE__ */ k(se, {})
|
|
626
|
+
}), /* @__PURE__ */ k(ie, { children: i.map((e) => /* @__PURE__ */ k(ae, {
|
|
592
627
|
value: e,
|
|
593
|
-
children:
|
|
628
|
+
children: W.operator(e)
|
|
594
629
|
}, e)) })]
|
|
595
630
|
})
|
|
596
|
-
}), s === 0 ? null : /* @__PURE__ */
|
|
631
|
+
}), s === 0 ? null : /* @__PURE__ */ k("div", {
|
|
597
632
|
"data-kind": t,
|
|
598
633
|
"data-part": "filter-operand",
|
|
599
634
|
...n === void 0 || C ? {} : { "data-operand": n },
|
|
600
635
|
...o && s === 2 && !C ? { "data-range": "" } : {},
|
|
601
636
|
children: C ? Array.from({ length: s }, (e, t) => C(c(t))) : e({
|
|
602
|
-
announce:
|
|
637
|
+
announce: U,
|
|
603
638
|
apply: () => Pe(null, "keyboard"),
|
|
604
639
|
condition: a,
|
|
605
|
-
setOperand: (e, t) =>
|
|
606
|
-
setOperands: (e, t) =>
|
|
607
|
-
t:
|
|
640
|
+
setOperand: (e, t) => Ne(r, e, t),
|
|
641
|
+
setOperands: (e, t) => J(r, e, t),
|
|
642
|
+
t: B
|
|
608
643
|
})
|
|
609
644
|
})]
|
|
610
645
|
}, r);
|
|
611
646
|
}
|
|
612
|
-
return /* @__PURE__ */
|
|
647
|
+
return /* @__PURE__ */ A(p, {
|
|
613
648
|
onOpenChange: (e, t) => Oe(e, t),
|
|
614
649
|
open: ve,
|
|
615
650
|
...c === void 0 ? {} : { align: c },
|
|
@@ -619,56 +654,56 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
619
654
|
...S === void 0 ? {} : { portal: S },
|
|
620
655
|
...w === void 0 ? {} : { side: w },
|
|
621
656
|
...ue === void 0 ? {} : { sideOffset: ue },
|
|
622
|
-
children: [/* @__PURE__ */
|
|
657
|
+
children: [/* @__PURE__ */ k(f, { render: (e) => /* @__PURE__ */ k("button", {
|
|
623
658
|
...e,
|
|
624
659
|
"aria-label": Ie,
|
|
625
660
|
"data-part": "filter",
|
|
626
|
-
...
|
|
661
|
+
...De ? { "data-filtered": "" } : {},
|
|
627
662
|
type: "button",
|
|
628
|
-
children: /* @__PURE__ */
|
|
629
|
-
}) }), /* @__PURE__ */
|
|
663
|
+
children: /* @__PURE__ */ k(et, {})
|
|
664
|
+
}) }), /* @__PURE__ */ k(m, { children: /* @__PURE__ */ k(d, {
|
|
630
665
|
"aria-label": Ie,
|
|
631
|
-
children: /* @__PURE__ */
|
|
666
|
+
children: /* @__PURE__ */ A("div", {
|
|
632
667
|
"data-kind": t,
|
|
633
668
|
"data-part": "filter-panel",
|
|
634
669
|
"data-ui": "table",
|
|
635
|
-
id:
|
|
636
|
-
ref:
|
|
670
|
+
id: M,
|
|
671
|
+
ref: ye,
|
|
637
672
|
children: [
|
|
638
673
|
Le(0),
|
|
639
|
-
Ae ? /* @__PURE__ */
|
|
674
|
+
Ae ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ A("div", {
|
|
640
675
|
"data-part": "filter-join",
|
|
641
|
-
children: [/* @__PURE__ */
|
|
676
|
+
children: [/* @__PURE__ */ k("span", {
|
|
642
677
|
"data-label": "",
|
|
643
|
-
children:
|
|
644
|
-
}), /* @__PURE__ */
|
|
645
|
-
"aria-label":
|
|
646
|
-
onValueChange: (e) => I(
|
|
678
|
+
children: B("filterJoin")
|
|
679
|
+
}), /* @__PURE__ */ A(ce, {
|
|
680
|
+
"aria-label": B("filterJoin"),
|
|
681
|
+
onValueChange: (e) => I(Ee(F, e)),
|
|
647
682
|
orientation: "horizontal",
|
|
648
683
|
size: "sm",
|
|
649
684
|
value: F.join,
|
|
650
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ k(b, {
|
|
651
686
|
value: "and",
|
|
652
|
-
children:
|
|
653
|
-
}), /* @__PURE__ */
|
|
687
|
+
children: W.join("and")
|
|
688
|
+
}), /* @__PURE__ */ k(b, {
|
|
654
689
|
value: "or",
|
|
655
|
-
children:
|
|
690
|
+
children: W.join("or")
|
|
656
691
|
})]
|
|
657
692
|
})]
|
|
658
693
|
}), Le(1)] }) : null,
|
|
659
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ A("div", {
|
|
660
695
|
"data-part": "filter-actions",
|
|
661
|
-
children: [/* @__PURE__ */
|
|
662
|
-
disabled: !
|
|
696
|
+
children: [/* @__PURE__ */ k(r, {
|
|
697
|
+
disabled: !Ce(F),
|
|
663
698
|
onClick: (e) => Fe(e),
|
|
664
699
|
size: "sm",
|
|
665
700
|
tone: "secondary",
|
|
666
701
|
variant: "ghost",
|
|
667
|
-
children:
|
|
668
|
-
}), /* @__PURE__ */
|
|
702
|
+
children: B("filterClear")
|
|
703
|
+
}), /* @__PURE__ */ k(r, {
|
|
669
704
|
onClick: (e) => Pe(e, "pointer"),
|
|
670
705
|
size: "sm",
|
|
671
|
-
children:
|
|
706
|
+
children: B("filterApply")
|
|
672
707
|
})]
|
|
673
708
|
})
|
|
674
709
|
]
|
|
@@ -682,11 +717,11 @@ function X(e) {
|
|
|
682
717
|
};
|
|
683
718
|
}
|
|
684
719
|
function Z(e, t) {
|
|
685
|
-
return t ??
|
|
720
|
+
return t ?? B(e);
|
|
686
721
|
}
|
|
687
|
-
function
|
|
688
|
-
return /* @__PURE__ */
|
|
689
|
-
body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */
|
|
722
|
+
function nt(e) {
|
|
723
|
+
return /* @__PURE__ */ k(Y, {
|
|
724
|
+
body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */ k(u, {
|
|
690
725
|
"aria-label": r("filterValue"),
|
|
691
726
|
onChange: (e) => n(0, e.target.value),
|
|
692
727
|
onKeyDown: X(e),
|
|
@@ -700,14 +735,14 @@ function et(e) {
|
|
|
700
735
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
701
736
|
});
|
|
702
737
|
}
|
|
703
|
-
function
|
|
738
|
+
function rt(e) {
|
|
704
739
|
let { format: t, locale: n, step: r } = e;
|
|
705
|
-
return /* @__PURE__ */
|
|
706
|
-
body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */
|
|
707
|
-
"aria-label":
|
|
740
|
+
return /* @__PURE__ */ k(Y, {
|
|
741
|
+
body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */ k(O, { children: [0, 1].slice(0, z(i.operator)).map((s) => /* @__PURE__ */ k(ne, {
|
|
742
|
+
"aria-label": z(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
|
|
708
743
|
onKeyDown: X(e),
|
|
709
744
|
onValueChange: (e) => a(s, e),
|
|
710
|
-
placeholder:
|
|
745
|
+
placeholder: z(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
|
|
711
746
|
size: "sm",
|
|
712
747
|
value: (s === 0 ? i.value : i.end) ?? null,
|
|
713
748
|
...t === void 0 ? {} : { format: t },
|
|
@@ -720,10 +755,10 @@ function tt(e) {
|
|
|
720
755
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
721
756
|
});
|
|
722
757
|
}
|
|
723
|
-
function
|
|
724
|
-
let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ?
|
|
725
|
-
return /* @__PURE__ */
|
|
726
|
-
body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) =>
|
|
758
|
+
function it(e) {
|
|
759
|
+
let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ? P(String(e)) : null, o = (e) => he(e) ? _e(e) : null;
|
|
760
|
+
return /* @__PURE__ */ k(Y, {
|
|
761
|
+
body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) => z(s.operator) === 2 ? /* @__PURE__ */ k(_, {
|
|
727
762
|
messages: {
|
|
728
763
|
end: u("filterTo"),
|
|
729
764
|
start: u("filterFrom")
|
|
@@ -739,7 +774,7 @@ function nt(e) {
|
|
|
739
774
|
...a(r) ? { min: a(r) } : {},
|
|
740
775
|
...a(n) ? { max: a(n) } : {},
|
|
741
776
|
...i === void 0 ? {} : { presets: i }
|
|
742
|
-
}) : /* @__PURE__ */
|
|
777
|
+
}) : /* @__PURE__ */ k(g, {
|
|
743
778
|
"aria-label": u("filterValue"),
|
|
744
779
|
onKeyDown: X(e),
|
|
745
780
|
onValueChange: (e) => c(0, o(e)),
|
|
@@ -759,15 +794,15 @@ function nt(e) {
|
|
|
759
794
|
function Q(e) {
|
|
760
795
|
if (!e) return null;
|
|
761
796
|
let t = String(e);
|
|
762
|
-
return
|
|
797
|
+
return I(/^\d{2}$/.test(t) ? `${t}:00` : t);
|
|
763
798
|
}
|
|
764
799
|
function $(e) {
|
|
765
800
|
if (!e) return null;
|
|
766
801
|
let t = String(e);
|
|
767
|
-
return /^\d{4}-\d{2}-\d{2}$/.test(t) ?
|
|
802
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(t) ? F(`${t}T00:00`) : /^\d{4}-\d{2}-\d{2}T\d{2}$/.test(t) ? F(`${t}:00`) : F(t);
|
|
768
803
|
}
|
|
769
|
-
function
|
|
770
|
-
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, options: o, presets: s, step: c } = e, l = (e) =>
|
|
804
|
+
function at(e) {
|
|
805
|
+
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, options: o, presets: s, step: c } = e, l = (e) => ge(e) ? L(e, t ?? "minute") : null, u = {
|
|
771
806
|
...t === void 0 ? {} : { granularity: t },
|
|
772
807
|
...n === void 0 ? {} : { hourCycle: n },
|
|
773
808
|
...r === void 0 ? {} : { locale: r },
|
|
@@ -776,8 +811,8 @@ function rt(e) {
|
|
|
776
811
|
...Q(a) ? { min: Q(a) } : {},
|
|
777
812
|
...Q(i) ? { max: Q(i) } : {}
|
|
778
813
|
};
|
|
779
|
-
return /* @__PURE__ */
|
|
780
|
-
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) =>
|
|
814
|
+
return /* @__PURE__ */ k(Y, {
|
|
815
|
+
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => z(t.operator) === 2 ? /* @__PURE__ */ k(y, {
|
|
781
816
|
messages: {
|
|
782
817
|
start: i("filterFrom"),
|
|
783
818
|
end: i("filterTo")
|
|
@@ -790,7 +825,7 @@ function rt(e) {
|
|
|
790
825
|
},
|
|
791
826
|
...u,
|
|
792
827
|
...s === void 0 ? {} : { presets: s }
|
|
793
|
-
}) : /* @__PURE__ */
|
|
828
|
+
}) : /* @__PURE__ */ k(v, {
|
|
794
829
|
"aria-label": i("filterValue"),
|
|
795
830
|
onKeyDown: X(e),
|
|
796
831
|
onValueChange: (e) => n(0, l(e)),
|
|
@@ -805,8 +840,8 @@ function rt(e) {
|
|
|
805
840
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
806
841
|
});
|
|
807
842
|
}
|
|
808
|
-
function
|
|
809
|
-
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, presets: o, step: s, timeZone: c } = e, l = (e) =>
|
|
843
|
+
function ot(e) {
|
|
844
|
+
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, presets: o, step: s, timeZone: c } = e, l = (e) => N(e) ? `${_e(e.date)}T${L(e.time, t ?? "minute")}` : null, u = {
|
|
810
845
|
...t === void 0 ? {} : { granularity: t },
|
|
811
846
|
...n === void 0 ? {} : { hourCycle: n },
|
|
812
847
|
...r === void 0 ? {} : { locale: r },
|
|
@@ -815,8 +850,8 @@ function it(e) {
|
|
|
815
850
|
...$(a) ? { min: $(a) } : {},
|
|
816
851
|
...$(i) ? { max: $(i) } : {}
|
|
817
852
|
};
|
|
818
|
-
return /* @__PURE__ */
|
|
819
|
-
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) =>
|
|
853
|
+
return /* @__PURE__ */ k(Y, {
|
|
854
|
+
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => z(t.operator) === 2 ? /* @__PURE__ */ k(te, {
|
|
820
855
|
messages: {
|
|
821
856
|
start: i("filterFrom"),
|
|
822
857
|
end: i("filterTo")
|
|
@@ -829,7 +864,7 @@ function it(e) {
|
|
|
829
864
|
},
|
|
830
865
|
...u,
|
|
831
866
|
...o === void 0 ? {} : { presets: o }
|
|
832
|
-
}) : /* @__PURE__ */
|
|
867
|
+
}) : /* @__PURE__ */ k(ee, {
|
|
833
868
|
"aria-label": i("filterValue"),
|
|
834
869
|
onKeyDown: X(e),
|
|
835
870
|
onValueChange: (e) => n(0, l(e)),
|
|
@@ -844,18 +879,18 @@ function it(e) {
|
|
|
844
879
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
845
880
|
});
|
|
846
881
|
}
|
|
847
|
-
function
|
|
848
|
-
return /* @__PURE__ */
|
|
849
|
-
body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */
|
|
882
|
+
function st(e) {
|
|
883
|
+
return /* @__PURE__ */ k(Y, {
|
|
884
|
+
body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */ A(ce, {
|
|
850
885
|
"aria-label": n("filterValue"),
|
|
851
886
|
onValueChange: (e) => t(0, e === "true"),
|
|
852
887
|
orientation: "horizontal",
|
|
853
888
|
size: "sm",
|
|
854
889
|
value: e.value === void 0 || e.value === null ? "" : String(e.value),
|
|
855
|
-
children: [/* @__PURE__ */
|
|
890
|
+
children: [/* @__PURE__ */ k(b, {
|
|
856
891
|
value: "true",
|
|
857
892
|
children: n("true")
|
|
858
|
-
}), /* @__PURE__ */
|
|
893
|
+
}), /* @__PURE__ */ k(b, {
|
|
859
894
|
value: "false",
|
|
860
895
|
children: n("false")
|
|
861
896
|
})]
|
|
@@ -866,16 +901,16 @@ function at(e) {
|
|
|
866
901
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
867
902
|
});
|
|
868
903
|
}
|
|
869
|
-
function
|
|
904
|
+
function ct(e) {
|
|
870
905
|
let { operand: t = "list", options: n = [], searchThreshold: r = 8, searchable: i } = e;
|
|
871
|
-
return /* @__PURE__ */
|
|
872
|
-
body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */
|
|
906
|
+
return /* @__PURE__ */ k(Y, {
|
|
907
|
+
body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */ k(lt, {
|
|
873
908
|
apply: a,
|
|
874
909
|
chosen: o.value ?? [],
|
|
875
910
|
onChange: (e) => s(0, e),
|
|
876
911
|
options: n,
|
|
877
912
|
t: c
|
|
878
|
-
}) : /* @__PURE__ */
|
|
913
|
+
}) : /* @__PURE__ */ k(ut, {
|
|
879
914
|
announce: e,
|
|
880
915
|
chosen: o.value ?? [],
|
|
881
916
|
onChange: (e) => s(0, e),
|
|
@@ -891,9 +926,9 @@ function ot(e) {
|
|
|
891
926
|
singleCondition: !0
|
|
892
927
|
});
|
|
893
928
|
}
|
|
894
|
-
function
|
|
929
|
+
function lt({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
|
|
895
930
|
let a = de(), o = E(() => new Map(r.map((e) => [e.value, e])), [r]), s = r.length > 0;
|
|
896
|
-
return /* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(x, {
|
|
897
932
|
"aria-label": i("filterValue"),
|
|
898
933
|
formatLabel: (e) => o.get(e)?.label ?? e,
|
|
899
934
|
fullWidth: !0,
|
|
@@ -908,19 +943,19 @@ function st({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
|
|
|
908
943
|
list: `${a}-options`,
|
|
909
944
|
validate: (e) => o.has(e)
|
|
910
945
|
} : {}
|
|
911
|
-
}), s ? /* @__PURE__ */
|
|
946
|
+
}), s ? /* @__PURE__ */ k("datalist", {
|
|
912
947
|
id: `${a}-options`,
|
|
913
|
-
children: r.map((e) => /* @__PURE__ */
|
|
948
|
+
children: r.map((e) => /* @__PURE__ */ k("option", {
|
|
914
949
|
value: e.value,
|
|
915
950
|
children: e.label ?? e.value
|
|
916
951
|
}, e.value))
|
|
917
952
|
}) : null] });
|
|
918
953
|
}
|
|
919
|
-
function
|
|
920
|
-
let s = de(), [l, d] =
|
|
921
|
-
return /* @__PURE__ */
|
|
954
|
+
function ut({ announce: e, chosen: t, onChange: n, options: r, searchThreshold: i, searchable: a, t: o }) {
|
|
955
|
+
let s = de(), [l, d] = D(""), f = E(() => ve({ sensitivity: "base" }), []), p = (e) => e === "" ? r : r.filter((t) => f.contains(t.label ?? t.value, e)), m = p(l), h = m.filter((e) => t.includes(e.value)), g = a ?? r.length >= i;
|
|
956
|
+
return /* @__PURE__ */ A(O, { children: [g ? /* @__PURE__ */ k("div", {
|
|
922
957
|
"data-part": "filter-search",
|
|
923
|
-
children: /* @__PURE__ */
|
|
958
|
+
children: /* @__PURE__ */ k(u, {
|
|
924
959
|
"aria-controls": `${s}-list`,
|
|
925
960
|
"aria-label": o("filterSearch"),
|
|
926
961
|
clearable: !0,
|
|
@@ -932,16 +967,16 @@ function ct({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
932
967
|
size: "sm",
|
|
933
968
|
value: l
|
|
934
969
|
})
|
|
935
|
-
}) : null, m.length === 0 ? /* @__PURE__ */
|
|
970
|
+
}) : null, m.length === 0 ? /* @__PURE__ */ k("p", {
|
|
936
971
|
"data-part": "filter-empty",
|
|
937
972
|
children: o("filterEmpty")
|
|
938
|
-
}) : /* @__PURE__ */
|
|
973
|
+
}) : /* @__PURE__ */ A("div", {
|
|
939
974
|
"data-part": "filter-list",
|
|
940
975
|
id: `${s}-list`,
|
|
941
|
-
children: [/* @__PURE__ */
|
|
976
|
+
children: [/* @__PURE__ */ A("div", {
|
|
942
977
|
"data-covering": "",
|
|
943
978
|
"data-part": "filter-option",
|
|
944
|
-
children: [/* @__PURE__ */
|
|
979
|
+
children: [/* @__PURE__ */ k(c, {
|
|
945
980
|
checked: h.length > 0 && h.length === m.length,
|
|
946
981
|
indeterminate: h.length > 0 && h.length < m.length,
|
|
947
982
|
onCheckedChange: (e) => {
|
|
@@ -949,17 +984,17 @@ function ct({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
949
984
|
n(e ? [.../* @__PURE__ */ new Set([...t, ...r])] : t.filter((e) => !r.includes(e)));
|
|
950
985
|
},
|
|
951
986
|
children: o("filterSelectAll")
|
|
952
|
-
}), /* @__PURE__ */
|
|
987
|
+
}), /* @__PURE__ */ k("span", {
|
|
953
988
|
"data-count": "",
|
|
954
989
|
children: m.length
|
|
955
990
|
})]
|
|
956
|
-
}), m.map((e) => /* @__PURE__ */
|
|
991
|
+
}), m.map((e) => /* @__PURE__ */ A("div", {
|
|
957
992
|
"data-part": "filter-option",
|
|
958
|
-
children: [/* @__PURE__ */
|
|
993
|
+
children: [/* @__PURE__ */ k(c, {
|
|
959
994
|
checked: t.includes(e.value),
|
|
960
995
|
onCheckedChange: (r) => n(r ? [...t, e.value] : t.filter((t) => t !== e.value)),
|
|
961
996
|
children: e.label ?? e.value
|
|
962
|
-
}), e.count === void 0 ? null : /* @__PURE__ */
|
|
997
|
+
}), e.count === void 0 ? null : /* @__PURE__ */ k("span", {
|
|
963
998
|
"data-count": "",
|
|
964
999
|
children: e.count
|
|
965
1000
|
})]
|
|
@@ -967,4 +1002,4 @@ function ct({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
967
1002
|
})] });
|
|
968
1003
|
}
|
|
969
1004
|
//#endregion
|
|
970
|
-
export {
|
|
1005
|
+
export { q as A, Je as C, Ne as D, Me as E, K as M, U as N, ke as O, H as P, qe as S, Le as T, Ze as _, ct as a, ze as b, Ie as c, Ke as d, He as f, Re as g, Ye as h, rt as i, Oe as j, W as k, Pe as l, Qe as m, it as n, nt as o, Xe as p, ot as r, at as s, st as t, We as u, Fe as v, Ge as w, Ue as x, $e as y };
|