@ganpatiinfo/gids-core-web 22.0.0 → 24.0.0
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/css/index.css +111 -64
- package/dist/css/index.css.map +1 -1
- package/dist/gids-action-bar.js +1 -1
- package/dist/gids-activity-gauge.js +1 -1
- package/dist/gids-advanced-tooltip.js +1 -1
- package/dist/gids-bar-chart.js +1 -1
- package/dist/gids-bento-card.js +1 -1
- package/dist/gids-calendar-header-panel.js +1 -1
- package/dist/gids-calendar-month-list.js +1 -1
- package/dist/gids-calendar-picker.d.ts +11 -0
- package/dist/gids-calendar-picker.js +1 -0
- package/dist/gids-calendar-year-list.js +1 -1
- package/dist/gids-calendar.js +1 -1
- package/dist/gids-chart-legend-item.js +1 -1
- package/dist/gids-chart-legend.js +1 -1
- package/dist/gids-chart.js +1 -1
- package/dist/gids-chevron-button.js +1 -1
- package/dist/gids-date-picker-field.d.ts +11 -0
- package/dist/gids-date-picker-field.js +1 -0
- package/dist/gids-date-picker.d.ts +11 -0
- package/dist/gids-date-picker.js +1 -0
- package/dist/gids-day-dropdown-picker.d.ts +11 -0
- package/dist/gids-day-dropdown-picker.js +1 -0
- package/dist/gids-dot.js +1 -1
- package/dist/gids-dropdown-field.js +1 -1
- package/dist/gids-dropdown-picker.js +1 -1
- package/dist/gids-dropdown.js +1 -1
- package/dist/gids-expansion-body-list-item.js +1 -1
- package/dist/gids-expansion-body-list.js +1 -1
- package/dist/gids-expansion-group.js +1 -1
- package/dist/gids-expansion.js +1 -1
- package/dist/gids-field.js +1 -1
- package/dist/gids-filter.js +1 -1
- package/dist/gids-flyout-panel.js +1 -1
- package/dist/gids-form.js +1 -1
- package/dist/gids-header-navigation-item.js +1 -1
- package/dist/gids-header-navigation.js +1 -1
- package/dist/gids-icon.js +1 -1
- package/dist/gids-input.js +1 -1
- package/dist/gids-line-chart.js +1 -1
- package/dist/gids-md-table.js +1 -1
- package/dist/gids-month-dropdown-picker.d.ts +11 -0
- package/dist/gids-month-dropdown-picker.js +1 -0
- package/dist/gids-overflow-container.js +1 -1
- package/dist/gids-overlay-provider.js +1 -1
- package/dist/gids-password-field.js +1 -1
- package/dist/gids-pie-chart.js +1 -1
- package/dist/gids-popover.js +1 -1
- package/dist/gids-profile-menu-header.js +1 -1
- package/dist/gids-profile-menu.js +1 -1
- package/dist/gids-profile.js +1 -1
- package/dist/gids-scrim.js +1 -1
- package/dist/gids-sidebar-item.js +1 -1
- package/dist/gids-sidebar-menu.js +1 -1
- package/dist/gids-sidebar.js +1 -1
- package/dist/gids-skeleton.js +1 -1
- package/dist/gids-tab-item.js +1 -1
- package/dist/gids-tab.js +1 -1
- package/dist/gids-text-field.js +1 -1
- package/dist/gids-toggle-button.js +1 -1
- package/dist/gids-tooltip.js +1 -1
- package/dist/gids-transfer-list.js +1 -1
- package/dist/gids-year-dropdown-picker.d.ts +11 -0
- package/dist/gids-year-dropdown-picker.js +1 -0
- package/dist/{p-TfH966_e.js → p-3H10HA8U.js} +1 -1
- package/dist/{p-_W77iniK.js → p-5SNf54JN.js} +1 -1
- package/dist/p-69VXkSHc.js +1 -0
- package/dist/{p-B_FEFM5I.js → p-B2CvDGSE.js} +1 -1
- package/dist/{p-DLRj-mUX.js → p-B3AB3GQ0.js} +1 -1
- package/dist/p-BBlUduEr.js +1 -0
- package/dist/p-BGBsQSqM.js +1 -0
- package/dist/{p-BIxBMTG9.js → p-BWrCtA6O.js} +1 -1
- package/dist/{p-D0RJMGGj.js → p-BZdaC92p.js} +1 -1
- package/dist/p-Bbw1WCO7.js +1 -0
- package/dist/{p-CIjK3iHM.js → p-Bi-yBBYT.js} +1 -1
- package/dist/{p-DQQhGF5N.js → p-BwDi-0yS.js} +1 -1
- package/dist/{p-DKSnGphd.js → p-By0R-oJV.js} +1 -1
- package/dist/p-CCX8DA2Z.js +1 -0
- package/dist/{p-Ds5IzXj3.js → p-CJ1tQlEt.js} +1 -1
- package/dist/{p-DnRuhvRw.js → p-CL9pZVrx.js} +1 -1
- package/dist/p-CS2U2Mro.js +1 -0
- package/dist/p-Cf9ipNLT.js +1 -0
- package/dist/{p-B2flLE0s.js → p-Cs-QTqUM.js} +1 -1
- package/dist/{p-E13ycS5K.js → p-CytAVtIP.js} +1 -1
- package/dist/{p-CV1-78HB.js → p-D2VR17v2.js} +1 -1
- package/dist/p-D8vooi3L.js +1 -0
- package/dist/{p-DMxvWIj1.js → p-DB0ZJi5J.js} +1 -1
- package/dist/{p-BAqWcL0K.js → p-DHOvFnv4.js} +1 -1
- package/dist/{p--kh67-_Z.js → p-DIrAYgqX.js} +1 -1
- package/dist/p-DJH7wtiu.js +1 -0
- package/dist/{p-bfWlRsx_.js → p-DMN5PI18.js} +1 -1
- package/dist/p-DdJKIFk0.js +1 -0
- package/dist/{p-BCbovLBE.js → p-Dt270JVs.js} +1 -1
- package/dist/p-DuonIHDh.js +1 -0
- package/dist/{p-DzOOjiNH.js → p-_OVEnTXa.js} +1 -1
- package/dist/{p-DrxfD2yZ.js → p-cXOH6OAQ.js} +1 -1
- package/dist/p-lVcUFx2e.js +1 -0
- package/dist/{p-mv_7K1EM.js → p-peMqbYbz.js} +1 -1
- package/dist/p-piTNUZit.js +1 -0
- package/dist/types/components/webComponents/GidsCalendar/GidsCalendar.d.ts +4 -2
- package/dist/types/components/webComponents/GidsCalendarPicker/GidsCalendarPicker.d.ts +55 -0
- package/dist/types/components/webComponents/GidsDatePicker/GidsDatePicker.d.ts +74 -0
- package/dist/types/components/webComponents/GidsDatePickerField/GidsDatePickerField.d.ts +75 -0
- package/dist/types/components/webComponents/GidsDayDropdownPicker/GidsDayDropdownPicker.d.ts +40 -0
- package/dist/types/components/webComponents/GidsDropdown/GidsDropdown.d.ts +10 -8
- package/dist/types/components/webComponents/GidsDropdownField/GidsDropdownField.d.ts +5 -1
- package/dist/types/components/webComponents/GidsDropdownPicker/GidsDropdownPicker.d.ts +1 -0
- package/dist/types/components/webComponents/GidsFlyoutPanel/GidsFlyoutPanel.d.ts +7 -2
- package/dist/types/components/webComponents/GidsForm/GidsForm.d.ts +8 -0
- package/dist/types/components/webComponents/GidsHeaderNavigation/GidsHeaderNavigation.d.ts +0 -1
- package/dist/types/components/webComponents/GidsHeaderNavigationItem/GidsHeaderNavigationItem.d.ts +4 -6
- package/dist/types/components/webComponents/GidsMonthDropdownPicker/GidsMonthDropdownPicker.d.ts +40 -0
- package/dist/types/components/webComponents/GidsYearDropdownPicker/GidsYearDropdownPicker.d.ts +40 -0
- package/dist/types/components.d.ts +894 -70
- package/dist-bundled/es/GidsDatePickerSharedUtils-Dh5qFlYA.js +105 -0
- package/dist-bundled/es/gids-action-bar.js +17 -17
- package/dist-bundled/es/gids-activity-gauge.js +3 -3
- package/dist-bundled/es/gids-advanced-tooltip.js +4 -4
- package/dist-bundled/es/gids-bar-chart.js +3 -3
- package/dist-bundled/es/gids-bento-card.js +1 -1
- package/dist-bundled/es/gids-calendar-header-panel.js +1 -1
- package/dist-bundled/es/gids-calendar-month-list.js +3 -3
- package/dist-bundled/es/gids-calendar-picker.js +6 -0
- package/dist-bundled/es/gids-calendar-year-list.js +4 -4
- package/dist-bundled/es/gids-calendar.js +4 -151
- package/dist-bundled/es/gids-chart-legend-item.js +4 -4
- package/dist-bundled/es/gids-chart-legend.js +3 -3
- package/dist-bundled/es/gids-chart.js +21 -21
- package/dist-bundled/es/gids-chevron-button.js +3 -3
- package/dist-bundled/es/gids-date-picker-field.js +181 -0
- package/dist-bundled/es/gids-date-picker.js +6 -0
- package/dist-bundled/es/gids-day-dropdown-picker.js +6 -0
- package/dist-bundled/es/gids-dot.js +1 -1
- package/dist-bundled/es/gids-dropdown-field.js +29 -19
- package/dist-bundled/es/gids-dropdown-picker.js +2 -2
- package/dist-bundled/es/gids-dropdown.js +3 -3
- package/dist-bundled/es/gids-expansion-body-list-item.js +1 -1
- package/dist-bundled/es/gids-expansion-body-list.js +2 -2
- package/dist-bundled/es/gids-expansion-group.js +1 -1
- package/dist-bundled/es/gids-expansion.js +8 -8
- package/dist-bundled/es/gids-field.js +4 -4
- package/dist-bundled/es/gids-filter.js +1 -1
- package/dist-bundled/es/gids-flyout-panel.js +1 -1
- package/dist-bundled/es/gids-form.js +65 -49
- package/dist-bundled/es/gids-header-navigation-item.js +3 -3
- package/dist-bundled/es/gids-header-navigation.js +59 -60
- package/dist-bundled/es/gids-icon.js +1 -1
- package/dist-bundled/es/gids-input.js +4 -4
- package/dist-bundled/es/gids-line-chart.js +4 -4
- package/dist-bundled/es/gids-md-table.js +60 -60
- package/dist-bundled/es/gids-month-dropdown-picker.js +6 -0
- package/dist-bundled/es/gids-overflow-container.js +1 -1
- package/dist-bundled/es/gids-overlay-provider.js +2 -2
- package/dist-bundled/es/gids-password-field.js +25 -25
- package/dist-bundled/es/gids-pie-chart.js +1 -1
- package/dist-bundled/es/gids-popover.js +1 -1
- package/dist-bundled/es/gids-profile-menu-header.js +4 -4
- package/dist-bundled/es/gids-profile-menu.js +3 -3
- package/dist-bundled/es/gids-profile.js +10 -10
- package/dist-bundled/es/gids-scrim.js +1 -1
- package/dist-bundled/es/gids-sidebar-item.js +1 -1
- package/dist-bundled/es/gids-sidebar-menu.js +1 -1
- package/dist-bundled/es/gids-sidebar.js +7 -7
- package/dist-bundled/es/gids-skeleton.js +1 -1
- package/dist-bundled/es/gids-tab-item.js +1 -1
- package/dist-bundled/es/gids-tab.js +4 -4
- package/dist-bundled/es/gids-text-field.js +12 -12
- package/dist-bundled/es/gids-toggle-button.js +1 -1
- package/dist-bundled/es/gids-tooltip.js +4 -4
- package/dist-bundled/es/gids-transfer-list.js +8 -8
- package/dist-bundled/es/gids-year-dropdown-picker.js +6 -0
- package/dist-bundled/es/{p-TfH966_e-BzZRV8Rj.js → p-3H10HA8U-DWG31yfh.js} +9 -9
- package/dist-bundled/es/{p-_W77iniK-ChKfEOp3.js → p-5SNf54JN-Dke4QoYK.js} +2 -2
- package/dist-bundled/es/{p-kWyyLyT3-VhX9LNzT.js → p-69VXkSHc-vZd5gQWS.js} +28 -28
- package/dist-bundled/es/{p-B_FEFM5I-JoBieRfG.js → p-B2CvDGSE-B-50q6JD.js} +5 -5
- package/dist-bundled/es/{p-DLRj-mUX-BapdQYpI.js → p-B3AB3GQ0-DdgNC9FJ.js} +5 -5
- package/dist-bundled/es/{p-CAjDiWIc-C9dOa7FT.js → p-BBlUduEr-CWdvgBS6.js} +7 -7
- package/dist-bundled/es/{p-BQT5yy5L-C1C_zTi-.js → p-BGBsQSqM-DtooH-AA.js} +8 -4
- package/dist-bundled/es/{p-BIxBMTG9-Ctr342ff.js → p-BWrCtA6O-DHaJx1bg.js} +3 -3
- package/dist-bundled/es/{p-D0RJMGGj-BflZ9l8y.js → p-BZdaC92p-DjVPKyfk.js} +5 -5
- package/dist-bundled/es/p-Bbw1WCO7-CJU0y0iF.js +240 -0
- package/dist-bundled/es/{p-CIjK3iHM-DEW8PRM5.js → p-Bi-yBBYT-CC0Ktxng.js} +1 -1
- package/dist-bundled/es/{p-DQQhGF5N-mCqb5VTE.js → p-BwDi-0yS-vyn3pUko.js} +8 -8
- package/dist-bundled/es/{p-DKSnGphd-CZSPfB-N.js → p-By0R-oJV-DkI-JpEG.js} +3 -3
- package/dist-bundled/es/p-CCX8DA2Z-D0OkaCKx.js +157 -0
- package/dist-bundled/es/{p-Ds5IzXj3-B2o0ML2C.js → p-CJ1tQlEt-B8GYL1we.js} +13 -13
- package/dist-bundled/es/{p-DnRuhvRw-Beh0bANh.js → p-CL9pZVrx-BYVOaGDA.js} +8 -8
- package/dist-bundled/es/{p-DpvdbdZ--C7QlXxK2.js → p-CS2U2Mro-6wGJ-t9P.js} +31 -19
- package/dist-bundled/es/p-Cf9ipNLT-HF4MWnLF.js +86 -0
- package/dist-bundled/es/{p-B2flLE0s-SMg7vg1a.js → p-Cs-QTqUM-CcvsSUzr.js} +2 -2
- package/dist-bundled/es/{p-E13ycS5K-BBDydae3.js → p-CytAVtIP-IZSm6SZx.js} +1 -1
- package/dist-bundled/es/p-D8vooi3L-C5jeoC6H.js +122 -0
- package/dist-bundled/es/{p-DMxvWIj1-BxbvrlFL.js → p-DB0ZJi5J-BEYBVVuq.js} +9 -9
- package/dist-bundled/es/{p-BAqWcL0K-DNkV1R_C.js → p-DHOvFnv4-DZQmbUn3.js} +2 -2
- package/dist-bundled/es/{p--kh67-_Z-B-vf_gng.js → p-DIrAYgqX-BoR42JaL.js} +4 -4
- package/dist-bundled/es/p-DJH7wtiu-BDWtYcRw.js +148 -0
- package/dist-bundled/es/{p-bfWlRsx_-CNZjBYOE.js → p-DMN5PI18-CiBpBUeE.js} +3 -3
- package/dist-bundled/es/{p-Do_VlNHg-Ck03dQOR.js → p-DdJKIFk0-Co3FvR3K.js} +1 -1
- package/dist-bundled/es/{p-BCbovLBE-CDxKiOtS.js → p-Dt270JVs-DJODMRWa.js} +1 -1
- package/dist-bundled/es/p-DuonIHDh-B6YKWTfP.js +86 -0
- package/dist-bundled/es/{p-DzOOjiNH-CqI4E-mj.js → p-_OVEnTXa-q7qjnzI3.js} +2 -2
- package/dist-bundled/es/{p-DrxfD2yZ-Cetyr3S9.js → p-cXOH6OAQ-BRmZ0lXm.js} +10 -10
- package/dist-bundled/es/p-lVcUFx2e-D6N6qefs.js +86 -0
- package/dist-bundled/es/{p-mv_7K1EM-U3yKC45e.js → p-peMqbYbz-BnWVSfKD.js} +1 -1
- package/dist-bundled/es/p-piTNUZit-Jq4qQLgn.js +137 -0
- package/dist-bundled/umd/gids-action-bar.umd.js +3 -3
- package/dist-bundled/umd/gids-activity-gauge.umd.js +1 -1
- package/dist-bundled/umd/gids-advanced-tooltip.umd.js +1 -1
- package/dist-bundled/umd/gids-bar-chart.umd.js +1 -1
- package/dist-bundled/umd/gids-bento-card.umd.js +1 -1
- package/dist-bundled/umd/gids-calendar-header-panel.umd.js +1 -1
- package/dist-bundled/umd/gids-calendar-month-list.umd.js +1 -1
- package/dist-bundled/umd/gids-calendar-picker.umd.js +5 -0
- package/dist-bundled/umd/gids-calendar-year-list.umd.js +1 -1
- package/dist-bundled/umd/gids-calendar.umd.js +2 -2
- package/dist-bundled/umd/gids-chart-legend-item.umd.js +1 -1
- package/dist-bundled/umd/gids-chart-legend.umd.js +1 -1
- package/dist-bundled/umd/gids-chart.umd.js +1 -1
- package/dist-bundled/umd/gids-chevron-button.umd.js +1 -1
- package/dist-bundled/umd/gids-date-picker-field.umd.js +5 -0
- package/dist-bundled/umd/gids-date-picker.umd.js +5 -0
- package/dist-bundled/umd/gids-day-dropdown-picker.umd.js +5 -0
- package/dist-bundled/umd/gids-dot.umd.js +1 -1
- package/dist-bundled/umd/gids-dropdown-field.umd.js +2 -2
- package/dist-bundled/umd/gids-dropdown-picker.umd.js +2 -2
- package/dist-bundled/umd/gids-dropdown.umd.js +2 -2
- package/dist-bundled/umd/gids-expansion-body-list-item.umd.js +1 -1
- package/dist-bundled/umd/gids-expansion-body-list.umd.js +1 -1
- package/dist-bundled/umd/gids-expansion-group.umd.js +2 -2
- package/dist-bundled/umd/gids-expansion.umd.js +1 -1
- package/dist-bundled/umd/gids-field.umd.js +1 -1
- package/dist-bundled/umd/gids-filter.umd.js +2 -2
- package/dist-bundled/umd/gids-flyout-panel.umd.js +2 -2
- package/dist-bundled/umd/gids-form.umd.js +2 -2
- package/dist-bundled/umd/gids-header-navigation-item.umd.js +2 -2
- package/dist-bundled/umd/gids-header-navigation.umd.js +2 -2
- package/dist-bundled/umd/gids-icon.umd.js +2 -2
- package/dist-bundled/umd/gids-input.umd.js +1 -1
- package/dist-bundled/umd/gids-line-chart.umd.js +1 -1
- package/dist-bundled/umd/gids-md-table.umd.js +1 -1
- package/dist-bundled/umd/gids-month-dropdown-picker.umd.js +5 -0
- package/dist-bundled/umd/gids-overflow-container.umd.js +1 -1
- package/dist-bundled/umd/gids-overlay-provider.umd.js +1 -1
- package/dist-bundled/umd/gids-password-field.umd.js +1 -1
- package/dist-bundled/umd/gids-pie-chart.umd.js +2 -2
- package/dist-bundled/umd/gids-popover.umd.js +1 -1
- package/dist-bundled/umd/gids-profile-menu-header.umd.js +1 -1
- package/dist-bundled/umd/gids-profile-menu.umd.js +1 -1
- package/dist-bundled/umd/gids-profile.umd.js +1 -1
- package/dist-bundled/umd/gids-scrim.umd.js +1 -1
- package/dist-bundled/umd/gids-sidebar-item.umd.js +2 -2
- package/dist-bundled/umd/gids-sidebar-menu.umd.js +2 -2
- package/dist-bundled/umd/gids-sidebar.umd.js +2 -2
- package/dist-bundled/umd/gids-skeleton.umd.js +2 -2
- package/dist-bundled/umd/gids-tab-item.umd.js +1 -1
- package/dist-bundled/umd/gids-tab.umd.js +1 -1
- package/dist-bundled/umd/gids-text-field.umd.js +1 -1
- package/dist-bundled/umd/gids-toggle-button.umd.js +2 -2
- package/dist-bundled/umd/gids-tooltip.umd.js +2 -2
- package/dist-bundled/umd/gids-transfer-list.umd.js +1 -1
- package/dist-bundled/umd/gids-year-dropdown-picker.umd.js +5 -0
- package/dist-bundled/umd-complete/gids-core-web.umd.js +9 -9
- package/package.json +55 -7
- package/dist/p-BQT5yy5L.js +0 -1
- package/dist/p-B_St7yaX.js +0 -1
- package/dist/p-CAjDiWIc.js +0 -1
- package/dist/p-Do_VlNHg.js +0 -1
- package/dist/p-DpvdbdZ-.js +0 -1
- package/dist/p-kWyyLyT3.js +0 -1
- package/dist/p-tEbUT3n3.js +0 -1
- package/dist-bundled/es/p-B_St7yaX-Da4DWjGh.js +0 -151
- package/dist-bundled/es/p-tEbUT3n3-Byef6fQN.js +0 -244
- /package/dist-bundled/es/{p-CV1-78HB-C0k_l_CT.js → p-D2VR17v2-C0k_l_CT.js} +0 -0
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { q as l, L as u, u as p, D as a } from "./p-B4hcsDH0-CPqEc-vc.js";
|
|
2
|
-
import { d as m } from "./p-iQRr_fAH-Dvv1n8QD.js";
|
|
3
|
-
import { r as g } from "./p-DzOOjiNH-CqI4E-mj.js";
|
|
4
|
-
import { c } from "./clsx-OuTLNxxd.js";
|
|
5
|
-
const v = ({ expanded: e }, t) => c("gids-dropdown", {
|
|
6
|
-
"gids-dropdown--expanded": e
|
|
7
|
-
}, t), f = ({ size: e }, t) => c("gids-chevron-button-control", {
|
|
8
|
-
"gids-chevron-button-control--small": e === "sm",
|
|
9
|
-
// 'gids-chevron-button-control--medium': size === 'md', // Default
|
|
10
|
-
"gids-chevron-button-control--large": e === "lg"
|
|
11
|
-
}, t), y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12
|
-
__proto__: null,
|
|
13
|
-
getGidsChevronButtonControlClassNames: f,
|
|
14
|
-
getGidsDropdownClassNames: v
|
|
15
|
-
}, Symbol.toStringTag, { value: "Module" })), { getGidsDropdownClassNames: I, getGidsChevronButtonControlClassNames: b } = y, h = "gids-dropdown-item--active", E = u(class extends p {
|
|
16
|
-
constructor(e) {
|
|
17
|
-
super(), e !== !1 && this.__registerHost(), this.appearance = "default", this.expanded = !1, this.filterValue = "", this.isFilterEditing = !1, this.hasLeadingIcon = !1, this.hasLeadingAccessory = !1, this.activeIndex = -1, this.hasItemListener = !1, this.suppressNextMenuClickSelection = !1, this.hasDocumentListeners = !1, this.hasPendingControlRevalidation = !1, this.handleDropdownItemSelect = (t) => {
|
|
18
|
-
const { value: i, title: n, disabled: s, id: o, isPlaceholderItem: r } = t.detail;
|
|
19
|
-
s || typeof i != "string" || (this.suppressNextMenuClickSelection = !0, queueMicrotask((() => {
|
|
20
|
-
this.suppressNextMenuClickSelection = !1;
|
|
21
|
-
})), this.applySelection({ id: o, value: i, title: n, disabled: !1, originalEvent: t, isPlaceholderItem: r }));
|
|
22
|
-
}, this.handleMenuClick = (t) => {
|
|
23
|
-
if (this.suppressNextMenuClickSelection) return;
|
|
24
|
-
const i = t.target;
|
|
25
|
-
if (!(i instanceof Element)) return;
|
|
26
|
-
const n = i.closest(".gids-dropdown-item");
|
|
27
|
-
if (!n || !this.hostElement.contains(n) || n.hasAttribute("disabled") || n.getAttribute("aria-disabled") === "true") return;
|
|
28
|
-
const s = n instanceof HTMLButtonElement ? n.value : n.getAttribute("value") || "";
|
|
29
|
-
if (typeof s != "string" || s.length === 0) return;
|
|
30
|
-
const o = n instanceof HTMLButtonElement ? n.id : n.getAttribute("id") ?? "";
|
|
31
|
-
if (typeof o != "string" || o.length === 0) return;
|
|
32
|
-
const r = n.getAttribute("is-placeholder-item") ?? "";
|
|
33
|
-
let d = n.textContent?.trim() ?? "";
|
|
34
|
-
d.endsWith("checkmark") && (d = d.slice(0, -9).trim()), this.applySelection({ id: o, value: s, title: d.trim(), disabled: !1, originalEvent: t, isPlaceholderItem: !(!r || r !== "true") });
|
|
35
|
-
}, this.handleFilterInput = (t) => {
|
|
36
|
-
const i = t.target;
|
|
37
|
-
this.filterValue = i?.value ?? "", this.isFilterEditing = !0, this.clearActive(), this.expanded || this.setExpandedState(!0, t), this.applyFilter();
|
|
38
|
-
}, this.handleInputKeyDown = (t) => {
|
|
39
|
-
if (!this.isInteractive()) return;
|
|
40
|
-
const i = t.key, n = i === "ArrowDown";
|
|
41
|
-
if ((n || i === "ArrowUp") && !t.metaKey && !t.ctrlKey) return t.preventDefault(), this.expanded || this.setExpandedState(!0, t), void this.moveActive(n ? 1 : -1);
|
|
42
|
-
if (i === "Home" && this.expanded) return t.preventDefault(), void this.setActiveByIndex(0);
|
|
43
|
-
if (i === "End" && this.expanded) return t.preventDefault(), void this.setActiveByIndex(this.getVisibleEnabledItems().length - 1);
|
|
44
|
-
if (i === "Enter") {
|
|
45
|
-
if (!this.expanded) return t.preventDefault(), this.setExpandedState(!0, t), void this.setActiveByIndex(0);
|
|
46
|
-
this.selectActive() && t.preventDefault();
|
|
47
|
-
}
|
|
48
|
-
}, this.handleTriggerToggle = (t) => {
|
|
49
|
-
this.isInteractive() && this.setExpandedState(!this.expanded, t);
|
|
50
|
-
}, this.handleInputFocusAndBlur = (t) => {
|
|
51
|
-
this.hostElement.dispatchEvent(new FocusEvent(t.type, { relatedTarget: t.relatedTarget }));
|
|
52
|
-
}, this.handleInputClickToggle = (t) => {
|
|
53
|
-
t.defaultPrevented || this.handleTriggerToggle(t);
|
|
54
|
-
}, this.handleChevronClickToggle = (t) => {
|
|
55
|
-
t.defaultPrevented || (t.stopPropagation(), this.handleTriggerToggle(t));
|
|
56
|
-
}, this.handleDocumentPointerDown = (t) => {
|
|
57
|
-
t.button !== 2 && this.expanded && ((typeof t.composedPath == "function" ? t.composedPath() : []).includes(this.hostElement) || this.hostElement.contains(t.target) || this.setExpandedState(!1, t));
|
|
58
|
-
}, this.handleDocumentKeyDown = (t) => {
|
|
59
|
-
if (!this.expanded) return;
|
|
60
|
-
const i = t.key;
|
|
61
|
-
if (i === "Escape" || i === "Esc") return t.preventDefault(), void this.setExpandedState(!1, t);
|
|
62
|
-
i === "Tab" && this.setExpandedState(!1, t);
|
|
63
|
-
}, this.handleFormReset = () => {
|
|
64
|
-
this.value = this.initialValue, this.selectedItemTitle = void 0, this.isFilterEditing = !1, this.filterValue = "", this.setExpandedState(!1);
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
handleExpandedChange(e) {
|
|
68
|
-
e && !this.isInteractive() && (this.expanded = !1);
|
|
69
|
-
}
|
|
70
|
-
handleInteractivityChange() {
|
|
71
|
-
!this.isInteractive() && this.expanded && this.setExpandedState(!1);
|
|
72
|
-
}
|
|
73
|
-
connectedCallback() {
|
|
74
|
-
this.initialValue = this.value, this.attachItemListener(), this.attachDocumentListeners(), this.attachFormListener();
|
|
75
|
-
}
|
|
76
|
-
disconnectedCallback() {
|
|
77
|
-
this.detachItemListener(), this.detachDocumentListeners(), this.detachFormListener();
|
|
78
|
-
}
|
|
79
|
-
componentWillLoad() {
|
|
80
|
-
this.checkSlots();
|
|
81
|
-
}
|
|
82
|
-
componentWillUpdate() {
|
|
83
|
-
this.checkSlots();
|
|
84
|
-
}
|
|
85
|
-
checkSlots() {
|
|
86
|
-
this.hasLeadingIcon = !!this.hostElement.querySelector('[slot="leadingIconDropdown"]'), this.hasLeadingAccessory = !!this.hostElement.querySelector('[slot="leadingAccessoryDropdown"]');
|
|
87
|
-
}
|
|
88
|
-
getItemElements() {
|
|
89
|
-
return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"));
|
|
90
|
-
}
|
|
91
|
-
getVisibleEnabledItems() {
|
|
92
|
-
return this.getItemElements().filter(((e) => e.style.display !== "none" && !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true"));
|
|
93
|
-
}
|
|
94
|
-
attachItemListener() {
|
|
95
|
-
this.hasItemListener || (this.hostElement.addEventListener("onPressDropdownItem", this.handleDropdownItemSelect), this.hasItemListener = !0);
|
|
96
|
-
}
|
|
97
|
-
detachItemListener() {
|
|
98
|
-
this.hasItemListener && (this.hostElement.removeEventListener("onPressDropdownItem", this.handleDropdownItemSelect), this.hasItemListener = !1);
|
|
99
|
-
}
|
|
100
|
-
applySelection(e) {
|
|
101
|
-
this.value = e.value, this.selectedItemTitle = typeof e.title == "string" ? e.title : void 0, this.isFilterEditing = !1, this.filterValue = "", this.clearActive(), this.emitNativeSelectionEvents(this.selectedItemTitle ?? ""), this.setExpandedState(!1, this.coerceEvent(e.originalEvent)), this.onSelectionChange?.(e), this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownChange", { bubbles: !0, composed: !0, detail: e }));
|
|
102
|
-
}
|
|
103
|
-
getInputControl() {
|
|
104
|
-
return this.hostElement.querySelector(".gids-input__control");
|
|
105
|
-
}
|
|
106
|
-
emitNativeSelectionEvents(e) {
|
|
107
|
-
const t = this.getInputControl();
|
|
108
|
-
t && (t.value = e, t.dispatchEvent(new Event("input", { bubbles: !0, composed: !0 })), t.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })));
|
|
109
|
-
}
|
|
110
|
-
clearActive() {
|
|
111
|
-
this.activeIndex = -1, this.getItemElements().forEach(((e) => e.classList.remove(h))), this.setActiveDescendant(void 0);
|
|
112
|
-
}
|
|
113
|
-
setActiveByIndex(e) {
|
|
114
|
-
const t = this.getVisibleEnabledItems();
|
|
115
|
-
if (this.getItemElements().forEach(((s) => s.classList.remove(h))), t.length === 0) return this.activeIndex = -1, void this.setActiveDescendant(void 0);
|
|
116
|
-
const i = Math.max(0, Math.min(e, t.length - 1)), n = t[i];
|
|
117
|
-
if (!n) return this.activeIndex = -1, void this.setActiveDescendant(void 0);
|
|
118
|
-
this.activeIndex = i, n.classList.add(h), n.scrollIntoView({ block: "nearest" }), this.setActiveDescendant(n.id || void 0);
|
|
119
|
-
}
|
|
120
|
-
moveActive(e) {
|
|
121
|
-
const t = this.getVisibleEnabledItems();
|
|
122
|
-
t.length !== 0 ? this.setActiveByIndex(this.activeIndex === -1 ? e > 0 ? 0 : t.length - 1 : (this.activeIndex + e + t.length) % t.length) : this.clearActive();
|
|
123
|
-
}
|
|
124
|
-
selectActive() {
|
|
125
|
-
const e = this.getVisibleEnabledItems();
|
|
126
|
-
if (e.length === 0) return !1;
|
|
127
|
-
const t = this.activeIndex >= 0 ? e[this.activeIndex] : e[0];
|
|
128
|
-
return !!t && (t.click(), this.getInputControl()?.focus(), !0);
|
|
129
|
-
}
|
|
130
|
-
applyFilter() {
|
|
131
|
-
const e = this.filterValue.trim().toLowerCase();
|
|
132
|
-
this.getItemElements().forEach(((t) => {
|
|
133
|
-
const i = (t.textContent ?? "").toLowerCase(), n = e.length === 0 || i.includes(e);
|
|
134
|
-
t.style.display = n ? "" : "none";
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
setActiveDescendant(e) {
|
|
138
|
-
const t = this.getInputControl();
|
|
139
|
-
t && (e ? t.setAttribute("aria-activedescendant", e) : t.removeAttribute("aria-activedescendant"));
|
|
140
|
-
}
|
|
141
|
-
setExpandedState(e, t) {
|
|
142
|
-
const i = !!e;
|
|
143
|
-
i && !this.isInteractive() || this.expanded !== i && (this.expanded = i, i || (this.isFilterEditing = !1, this.filterValue = "", this.clearActive(), this.applyFilter(), this.syncInputDisplayValue()), this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownToggle", { bubbles: !0, composed: !0, detail: { expanded: i, originalEvent: t } })));
|
|
144
|
-
}
|
|
145
|
-
syncInputDisplayValue() {
|
|
146
|
-
const e = this.getInputControl();
|
|
147
|
-
e && e.value !== (this.selectedItemTitle ?? "") && (e.value = this.selectedItemTitle ?? "");
|
|
148
|
-
}
|
|
149
|
-
attachDocumentListeners() {
|
|
150
|
-
this.hasDocumentListeners || typeof document > "u" || (document.addEventListener("pointerdown", this.handleDocumentPointerDown), document.addEventListener("keydown", this.handleDocumentKeyDown), this.hasDocumentListeners = !0);
|
|
151
|
-
}
|
|
152
|
-
detachDocumentListeners() {
|
|
153
|
-
this.hasDocumentListeners && typeof document < "u" && (document.removeEventListener("pointerdown", this.handleDocumentPointerDown), document.removeEventListener("keydown", this.handleDocumentKeyDown), this.hasDocumentListeners = !1);
|
|
154
|
-
}
|
|
155
|
-
attachFormListener() {
|
|
156
|
-
const e = this.hostElement.closest("form");
|
|
157
|
-
this.patternForm !== e && (this.patternForm && this.patternForm.removeEventListener("reset", this.handleFormReset), this.patternForm = e ?? void 0, this.patternForm?.addEventListener("reset", this.handleFormReset));
|
|
158
|
-
}
|
|
159
|
-
detachFormListener() {
|
|
160
|
-
this.patternForm && (this.patternForm.removeEventListener("reset", this.handleFormReset), this.patternForm = void 0);
|
|
161
|
-
}
|
|
162
|
-
get form() {
|
|
163
|
-
return this.getInputControl()?.form ?? this.patternForm ?? null;
|
|
164
|
-
}
|
|
165
|
-
get validity() {
|
|
166
|
-
return this.getInputControl()?.validity ?? {};
|
|
167
|
-
}
|
|
168
|
-
get validationMessage() {
|
|
169
|
-
return this.getInputControl()?.validationMessage ?? "";
|
|
170
|
-
}
|
|
171
|
-
get willValidate() {
|
|
172
|
-
return this.getInputControl()?.willValidate ?? !1;
|
|
173
|
-
}
|
|
174
|
-
async checkValidity() {
|
|
175
|
-
return this.getInputControl()?.checkValidity() ?? !0;
|
|
176
|
-
}
|
|
177
|
-
async reportValidity() {
|
|
178
|
-
return this.getInputControl()?.reportValidity() ?? !0;
|
|
179
|
-
}
|
|
180
|
-
async setCustomValidity(e) {
|
|
181
|
-
return this.getInputControl()?.setCustomValidity(e);
|
|
182
|
-
}
|
|
183
|
-
isInteractive() {
|
|
184
|
-
return !(this.disabled || this.readOnly);
|
|
185
|
-
}
|
|
186
|
-
coerceEvent(e) {
|
|
187
|
-
if (typeof Event < "u" && e !== null) return e instanceof Event ? e : void 0;
|
|
188
|
-
}
|
|
189
|
-
scheduleControlRevalidation() {
|
|
190
|
-
if (this.hasPendingControlRevalidation) return;
|
|
191
|
-
this.hasPendingControlRevalidation = !0;
|
|
192
|
-
const e = () => {
|
|
193
|
-
this.hasPendingControlRevalidation = !1, this.checkValidity();
|
|
194
|
-
};
|
|
195
|
-
typeof requestAnimationFrame != "function" ? e() : requestAnimationFrame(e);
|
|
196
|
-
}
|
|
197
|
-
getEnhancedInputProps() {
|
|
198
|
-
const e = { ...this.inputProps ?? {} };
|
|
199
|
-
typeof e.autoComplete == "string" && e?.autoComplete?.trim?.()?.length !== 0 || (e.autoComplete = "off");
|
|
200
|
-
const t = e.onInput;
|
|
201
|
-
e.onInput = (s) => {
|
|
202
|
-
t?.(s), this.handleFilterInput(s);
|
|
203
|
-
};
|
|
204
|
-
const i = e.onBlur;
|
|
205
|
-
e.onBlur = (s) => {
|
|
206
|
-
i?.(s), this.scheduleControlRevalidation();
|
|
207
|
-
};
|
|
208
|
-
const n = e.onKeyDown;
|
|
209
|
-
return e.onKeyDown = (s) => {
|
|
210
|
-
n?.(s), s.defaultPrevented || this.handleInputKeyDown(s);
|
|
211
|
-
}, e;
|
|
212
|
-
}
|
|
213
|
-
render() {
|
|
214
|
-
const e = this.expanded && this.isInteractive(), t = I({ expanded: e }), i = this.getEnhancedInputProps(), n = typeof i.id == "string" ? i.id : void 0, s = n ? `${n}__menu` : void 0;
|
|
215
|
-
i.role = "combobox", i["aria-expanded"] = e ? "true" : "false", i["aria-haspopup"] = "listbox", i["aria-autocomplete"] = "list", s && (i["aria-controls"] = s);
|
|
216
|
-
const o = this.isFilterEditing ? this.filterValue : this.selectedItemTitle ?? this.value ?? "", r = e ? "true" : "false", d = a("button", { key: "ef56b4d650c7ede283ac956e1bb3fdb99f0464b9", class: b({ size: "lg" }), slot: "trailingAccessory", type: "button", onClick: this.handleChevronClickToggle, "aria-label": e ? "Collapse options" : "Expanded options", "aria-expanded": r, "aria-haspopup": "listbox", "aria-controls": s, disabled: this.disabled || this.readOnly, tabIndex: -1 }, a("span", { key: "3707be6a0a5b247f6c624486c3ff5f69add5991c", class: "gids-button__content" }, a(m, { key: "b36624f20725a6093fbe786dd34ae70131035b1d", name: "chevron-vertical", alt: "" })));
|
|
217
|
-
return a("div", { key: "07368ce8b66a08e4f874e9335a774a305d07b709", class: t }, a("gids-input", { key: "13f996dabaf673f24ccb3752f5239a6461d8612e", appearance: this.appearance, loading: this.loading, disabled: this.disabled, readOnly: this.readOnly, required: this.required, value: o, name: this.name, inputProps: i, onClick: this.handleInputClickToggle, onFocus: this.handleInputFocusAndBlur, onBlur: this.handleInputFocusAndBlur }, this.hasLeadingIcon && a("slot", { key: "7ec0577f5a08094ca8caf73882dd5fee142f8229", name: "leadingIconDropdown", slot: "leadingIcon" }), this.hasLeadingAccessory && a("slot", { key: "41a33c1e726a203c096de11b82ce4bd7e39b4641", name: "leadingAccessoryDropdown", slot: "leadingAccessory" }), d), a("div", { key: "c59f22dec8e5ca68bfa4bee0ba5ffc7150602468", class: "gids-dropdown__menu", id: s, role: "listbox", onClick: this.handleMenuClick }, a("slot", { key: "93bb68248f925d570f01533382d71044079ee786" })));
|
|
218
|
-
}
|
|
219
|
-
get hostElement() {
|
|
220
|
-
return this;
|
|
221
|
-
}
|
|
222
|
-
static get watchers() {
|
|
223
|
-
return { expanded: [{ handleExpandedChange: 0 }], disabled: [{ handleInteractivityChange: 0 }], readOnly: [{ handleInteractivityChange: 0 }] };
|
|
224
|
-
}
|
|
225
|
-
static get style() {
|
|
226
|
-
return '@charset "UTF-8";.gids-dropdown{position:relative}.gids-dropdown__menu{position:absolute;inset-inline:0;top:calc(100% + var(--gids-gap-050));z-index:3;display:none;flex-direction:column;min-height:55px;max-height:20rem;overflow-x:hidden;overflow-y:auto;background-color:var(--gids-elevation-surface-overlay-default);box-shadow:var(--gids-elevation-shadow-overlay);border-radius:var(--gids-border-radius-lg)}.gids-dropdown__menu>*{flex-shrink:0}.gids-dropdown--expanded .gids-dropdown__menu{display:flex}.gids-dropdown__leading-icon{display:flex;align-items:center}.gids-dropdown__accessory{display:flex;align-items:center}';
|
|
227
|
-
}
|
|
228
|
-
}, [260, "gids-dropdown", { appearance: [1], expanded: [1540], inputProps: [16], disabled: [516], readOnly: [516, "read-only"], loading: [516], value: [513], name: [1], onSelectionChange: [16], required: [4], filterValue: [32], isFilterEditing: [32], selectedItemTitle: [32], hasLeadingIcon: [32], hasLeadingAccessory: [32], checkValidity: [64], reportValidity: [64], setCustomValidity: [64] }, void 0, { expanded: [{ handleExpandedChange: 0 }], disabled: [{ handleInteractivityChange: 0 }], readOnly: [{ handleInteractivityChange: 0 }] }]);
|
|
229
|
-
function x() {
|
|
230
|
-
typeof customElements < "u" && ["gids-dropdown", "gids-input"].forEach(((e) => {
|
|
231
|
-
switch (e) {
|
|
232
|
-
case "gids-dropdown":
|
|
233
|
-
customElements.get(l(e)) || customElements.define(l(e), E);
|
|
234
|
-
break;
|
|
235
|
-
case "gids-input":
|
|
236
|
-
customElements.get(l(e)) || g();
|
|
237
|
-
}
|
|
238
|
-
}));
|
|
239
|
-
}
|
|
240
|
-
x();
|
|
241
|
-
export {
|
|
242
|
-
E as c,
|
|
243
|
-
x as l
|
|
244
|
-
};
|
|
File without changes
|