@ganpatiinfo/gids-core-web 9.0.0 → 10.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 +1445 -1
- package/dist/css/index.css.map +1 -1
- package/dist/gids-activity-gauge.d.ts +11 -0
- package/dist/gids-activity-gauge.js +1 -0
- package/dist/gids-bar-chart.d.ts +11 -0
- package/dist/gids-bar-chart.js +1 -0
- package/dist/gids-calendar-header-panel.d.ts +11 -0
- package/dist/gids-calendar-header-panel.js +1 -0
- package/dist/gids-calendar-month-list.d.ts +11 -0
- package/dist/gids-calendar-month-list.js +1 -0
- package/dist/gids-calendar-year-list.d.ts +11 -0
- package/dist/gids-calendar-year-list.js +1 -0
- package/dist/gids-calendar.d.ts +11 -0
- package/dist/gids-calendar.js +1 -0
- package/dist/gids-chart-legend-item.d.ts +11 -0
- package/dist/gids-chart-legend-item.js +1 -0
- package/dist/gids-chart-legend.d.ts +11 -0
- package/dist/gids-chart-legend.js +1 -0
- package/dist/gids-chart.d.ts +11 -0
- package/dist/gids-chart.js +1 -0
- package/dist/gids-chevron-button.d.ts +11 -0
- package/dist/gids-chevron-button.js +1 -0
- package/dist/gids-dot.d.ts +11 -0
- package/dist/gids-dot.js +1 -0
- package/dist/gids-dropdown-field.d.ts +11 -0
- package/dist/gids-dropdown-field.js +1 -0
- package/dist/gids-dropdown-picker.d.ts +11 -0
- package/dist/gids-dropdown-picker.js +1 -0
- package/dist/gids-dropdown.d.ts +11 -0
- package/dist/gids-dropdown.js +1 -0
- package/dist/gids-field.d.ts +1 -1
- package/dist/gids-field.js +1 -1
- package/dist/gids-icon.d.ts +1 -1
- package/dist/gids-icon.js +1 -1
- package/dist/gids-input.d.ts +1 -1
- package/dist/gids-input.js +1 -1
- package/dist/gids-level-gauge.d.ts +11 -0
- package/dist/gids-level-gauge.js +1 -0
- package/dist/gids-line-chart.d.ts +11 -0
- package/dist/gids-line-chart.js +1 -0
- package/dist/gids-notification.d.ts +1 -1
- package/dist/gids-notification.js +1 -1
- package/dist/gids-overflow-container.d.ts +1 -1
- package/dist/gids-overflow-container.js +1 -1
- package/dist/gids-overlay-provider.d.ts +1 -1
- package/dist/gids-overlay-provider.js +1 -1
- package/dist/gids-password-field.d.ts +1 -1
- package/dist/gids-password-field.js +1 -1
- package/dist/gids-pie-chart.d.ts +11 -0
- package/dist/gids-pie-chart.js +1 -0
- package/dist/gids-popover.d.ts +1 -1
- package/dist/gids-popover.js +1 -1
- package/dist/gids-progress-circle.d.ts +11 -0
- package/dist/gids-progress-circle.js +1 -0
- package/dist/gids-scrim.d.ts +1 -1
- package/dist/gids-scrim.js +1 -1
- package/dist/gids-snackbar.d.ts +1 -1
- package/dist/gids-snackbar.js +1 -1
- package/dist/gids-text-field.d.ts +1 -1
- package/dist/gids-text-field.js +1 -1
- package/dist/gids-toggle-button.d.ts +1 -1
- package/dist/gids-toggle-button.js +1 -1
- package/dist/gids-tooltip.d.ts +1 -1
- package/dist/gids-tooltip.js +1 -1
- package/dist/index.js +1 -1
- package/dist/p-9_mrQ7ac.js +1 -0
- package/dist/p-B81J5HCC.js +1 -0
- package/dist/p-BFHWXEeg.js +1 -0
- package/dist/p-B_HaXpJZ.js +1 -0
- package/dist/p-BaO-kEWS.js +1 -0
- package/dist/p-BiPAgxAQ.js +1 -0
- package/dist/p-Bmb-HiXg.js +1 -0
- package/dist/{p-veoOgDXg.js → p-BnL97lOW.js} +1 -1
- package/dist/{p-iCAclJND.js → p-BvYnawkJ.js} +1 -1
- package/dist/p-CIP0xyhD.js +1 -0
- package/dist/p-CJzporPT.js +1 -0
- package/dist/p-CPSHPtGE.js +1 -0
- package/dist/p-CRngHsR7.js +1 -0
- package/dist/p-Ct3Ixgvf.js +1 -0
- package/dist/p-D93TNeOt.js +1 -0
- package/dist/p-DKsrt7dx.js +1 -0
- package/dist/p-DZWWuJac.js +1 -0
- package/dist/p-D_wcwB7E.js +1 -0
- package/dist/p-Dehss-X0.js +1 -0
- package/dist/{p-DvoHLz_5.js → p-DfFqFdmS.js} +1 -1
- package/dist/p-KxRqlvSh.js +1 -0
- package/dist/p-MgTlrSP_.js +1 -0
- package/dist/p-h6alWGT8.js +1 -0
- package/dist/p-quZYWCxU.js +1 -0
- package/dist/p-tyIgTtUC.js +1 -0
- package/dist/p-uqSjmNkw.js +1 -0
- package/dist/types/components/html/GidsCalendarCell/GidsCalendarCell.d.ts +7 -0
- package/dist/types/components/html/GidsCalendarDayCell/GidsCalendarDayCell.d.ts +4 -0
- package/dist/types/components/html/GidsDropdownItem/GidsDropdownItem.d.ts +1 -1
- package/dist/types/components/html/GidsDropdownMenu/GidsDropdownMenu.d.ts +1 -1
- package/dist/types/components/html/GidsDropdownMenuGroup/GidsDropdownMenuGroup.d.ts +1 -1
- package/dist/types/components/html/GidsListItem/GidsListItem.d.ts +2 -2
- package/dist/types/components/html/GidsPageTitle/GidsPageTitle.d.ts +4 -0
- package/dist/types/components/webComponents/GidsActivityGauge/GidsActivityGauge.d.ts +23 -0
- package/dist/types/components/webComponents/GidsBarChart/GidsBarChart.d.ts +27 -0
- package/dist/types/components/webComponents/GidsCalendar/GidsCalendar.d.ts +34 -0
- package/dist/types/components/webComponents/GidsCalendarHeaderPanel/GidsCalendarHeaderPanel.d.ts +67 -0
- package/dist/types/components/webComponents/GidsCalendarMonthList/GidsCalendarMonthList.d.ts +26 -0
- package/dist/types/components/webComponents/GidsCalendarYearList/GidsCalendarYearList.d.ts +31 -0
- package/dist/types/components/webComponents/GidsChart/GidsChart.d.ts +19 -0
- package/dist/types/components/webComponents/GidsChartLegend/GidsChartLegend.d.ts +7 -0
- package/dist/types/components/webComponents/GidsChartLegendItem/GidsChartLegendItem.d.ts +9 -0
- package/dist/types/components/webComponents/GidsChevronButton/GidsChevronButton.d.ts +21 -0
- package/dist/types/components/webComponents/GidsDot/GidsDot.d.ts +17 -0
- package/dist/types/components/webComponents/GidsDropdown/GidsDropdown.d.ts +78 -0
- package/dist/types/components/webComponents/GidsDropdownField/GidsDropdownField.d.ts +37 -0
- package/dist/types/components/webComponents/GidsDropdownPicker/GidsDropdownPicker.d.ts +52 -0
- package/dist/types/components/webComponents/GidsLevelGauge/GidsLevelGauge.d.ts +22 -0
- package/dist/types/components/webComponents/GidsLineChart/GidsLineChart.d.ts +27 -0
- package/dist/types/components/webComponents/GidsPieChart/GidsPieChart.d.ts +23 -0
- package/dist/types/components/webComponents/GidsProgressCircle/GidsProgressCircle.d.ts +24 -0
- package/dist/types/components.d.ts +1352 -71
- package/dist/types/utils/childrenValidityUtils.d.ts +1 -1
- package/dist-bundled/es/gids-activity-gauge.js +6 -0
- package/dist-bundled/es/gids-bar-chart.js +6 -0
- package/dist-bundled/es/gids-calendar-header-panel.js +6 -0
- package/dist-bundled/es/gids-calendar-month-list.js +6 -0
- package/dist-bundled/es/gids-calendar-year-list.js +6 -0
- package/dist-bundled/es/gids-calendar.js +153 -0
- package/dist-bundled/es/gids-chart-legend-item.js +6 -0
- package/dist-bundled/es/gids-chart-legend.js +6 -0
- package/dist-bundled/es/gids-chart.js +108 -0
- package/dist-bundled/es/gids-chevron-button.js +56 -0
- package/dist-bundled/es/gids-dot.js +6 -0
- package/dist-bundled/es/gids-dropdown-field.js +88 -0
- package/dist-bundled/es/gids-dropdown-picker.js +6 -0
- package/dist-bundled/es/gids-dropdown.js +6 -0
- package/dist-bundled/es/gids-field.js +1 -1
- package/dist-bundled/es/gids-icon.js +4 -30
- package/dist-bundled/es/gids-input.js +4 -4
- package/dist-bundled/es/gids-level-gauge.js +6 -0
- package/dist-bundled/es/gids-line-chart.js +6 -0
- package/dist-bundled/es/gids-notification.js +1 -1
- package/dist-bundled/es/gids-overflow-container.js +6 -6
- package/dist-bundled/es/gids-overlay-provider.js +17 -17
- package/dist-bundled/es/gids-password-field.js +29 -28
- package/dist-bundled/es/gids-pie-chart.js +6 -0
- package/dist-bundled/es/gids-popover.js +7 -7
- package/dist-bundled/es/gids-progress-circle.js +6 -0
- package/dist-bundled/es/gids-scrim.js +8 -8
- package/dist-bundled/es/gids-snackbar.js +1 -1
- package/dist-bundled/es/gids-text-field.js +16 -15
- package/dist-bundled/es/gids-toggle-button.js +8 -8
- package/dist-bundled/es/gids-tooltip.js +5 -5
- package/dist-bundled/es/index.js +1 -1
- package/dist-bundled/es/p-9_mrQ7ac-If6e6cvJ.js +71 -0
- package/dist-bundled/es/p-B81J5HCC-Bkt2yXKi.js +47 -0
- package/dist-bundled/es/p-BFHWXEeg-ByjSjz8i.js +133 -0
- package/dist-bundled/es/p-B_HaXpJZ-a2SDgQ0E.js +37 -0
- package/dist-bundled/es/p-BaO-kEWS-ZITkeP-j.js +241 -0
- package/dist-bundled/es/p-BiPAgxAQ-BtMBQpJY.js +31 -0
- package/dist-bundled/es/p-Bmb-HiXg-MyHWdhpw.js +80 -0
- package/dist-bundled/es/{p-veoOgDXg-fRinub-C.js → p-BnL97lOW-BO0p4EdC.js} +9 -9
- package/dist-bundled/es/{p-iCAclJND-Bmsvd-W1.js → p-BvYnawkJ-DohV9UNG.js} +3 -3
- package/dist-bundled/es/p-CIP0xyhD-D6y5soLj.js +180 -0
- package/dist-bundled/es/p-CJzporPT-I_OdjJsQ.js +92 -0
- package/dist-bundled/es/p-CPSHPtGE-C7baJgXR.js +115 -0
- package/dist-bundled/es/p-CRngHsR7-DL9wz3Z3.js +25 -0
- package/dist-bundled/es/p-Ct3Ixgvf-CNP_PKwP.js +646 -0
- package/dist-bundled/es/p-D93TNeOt-Vvshbux8.js +88 -0
- package/dist-bundled/es/{p-DybsMR13-DpmsG3Q1.js → p-DKsrt7dx-ImYLc4xz.js} +1 -1
- package/dist-bundled/es/p-DZWWuJac-DNQvnHAr.js +15 -0
- package/dist-bundled/es/p-D_wcwB7E-d3jYxfod.js +20 -0
- package/dist-bundled/es/p-Dehss-X0-Di5vMgvd.js +29 -0
- package/dist-bundled/es/{p-DvoHLz_5-C5EvA91N.js → p-DfFqFdmS-DjI2pk-0.js} +6 -6
- package/dist-bundled/es/{p-CFw4_-5A-Dzvju3VE.js → p-KxRqlvSh-JOFDmT0B.js} +5 -5
- package/dist-bundled/es/p-MgTlrSP_-DifRVv94.js +70 -0
- package/dist-bundled/es/p-h6alWGT8-CSY2g3c8.js +67 -0
- package/dist-bundled/es/p-quZYWCxU-CPyWW0nv.js +56 -0
- package/dist-bundled/es/p-tyIgTtUC-C8jR4A5G.js +71 -0
- package/dist-bundled/es/p-uqSjmNkw-Cz2T86sC.js +55 -0
- package/dist-bundled/umd/gids-activity-gauge.umd.js +5 -0
- package/dist-bundled/umd/gids-bar-chart.umd.js +13 -0
- package/dist-bundled/umd/gids-calendar-header-panel.umd.js +5 -0
- package/dist-bundled/umd/gids-calendar-month-list.umd.js +5 -0
- package/dist-bundled/umd/gids-calendar-year-list.umd.js +5 -0
- package/dist-bundled/umd/gids-calendar.umd.js +5 -0
- package/dist-bundled/umd/gids-chart-legend-item.umd.js +5 -0
- package/dist-bundled/umd/gids-chart-legend.umd.js +5 -0
- package/dist-bundled/umd/gids-chart.umd.js +13 -0
- package/dist-bundled/umd/gids-chevron-button.umd.js +5 -0
- package/dist-bundled/umd/gids-dot.umd.js +5 -0
- package/dist-bundled/umd/gids-dropdown-field.umd.js +5 -0
- package/dist-bundled/umd/gids-dropdown-picker.umd.js +5 -0
- package/dist-bundled/umd/gids-dropdown.umd.js +5 -0
- package/dist-bundled/umd/gids-field.umd.js +2 -2
- package/dist-bundled/umd/gids-icon.umd.js +2 -2
- package/dist-bundled/umd/gids-input.umd.js +2 -2
- package/dist-bundled/umd/gids-level-gauge.umd.js +5 -0
- package/dist-bundled/umd/gids-line-chart.umd.js +5 -0
- package/dist-bundled/umd/gids-notification.umd.js +2 -2
- package/dist-bundled/umd/gids-overflow-container.umd.js +2 -2
- package/dist-bundled/umd/gids-overlay-provider.umd.js +2 -2
- package/dist-bundled/umd/gids-password-field.umd.js +2 -2
- package/dist-bundled/umd/gids-pie-chart.umd.js +5 -0
- package/dist-bundled/umd/gids-popover.umd.js +2 -2
- package/dist-bundled/umd/gids-progress-circle.umd.js +5 -0
- package/dist-bundled/umd/gids-scrim.umd.js +2 -2
- package/dist-bundled/umd/gids-snackbar.umd.js +2 -2
- package/dist-bundled/umd/gids-text-field.umd.js +2 -2
- package/dist-bundled/umd/gids-toggle-button.umd.js +3 -3
- package/dist-bundled/umd/gids-tooltip.umd.js +2 -2
- package/dist-bundled/umd/index.umd.js +2 -2
- package/dist-bundled/umd-complete/gids-core-web.umd.js +11 -3
- package/package.json +148 -4
- package/dist/p-CFw4_-5A.js +0 -1
- package/dist/p-DijVkS9b.js +0 -1
- package/dist/p-DybsMR13.js +0 -1
- package/dist/p-ibikYq-w.js +0 -1
- package/dist-bundled/es/p-DijVkS9b-CeV1i4T-.js +0 -35
- package/dist-bundled/es/p-ibikYq-w-BsGxk8ro.js +0 -635
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { P as i, _ as s, u as n, T as t } from "./p-Ct3Ixgvf-CNP_PKwP.js";
|
|
2
|
+
import { d } from "./p-BnL97lOW-BO0p4EdC.js";
|
|
3
|
+
import { c as l } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
const o = ({ seriesType: e, orientation: a }, r) => l("gids-chart-legend-item", {
|
|
5
|
+
// 'gids-chart-legend-item--series-1': seriesType === '1', // by default
|
|
6
|
+
"gids-chart-legend-item--series-2": e === "2",
|
|
7
|
+
"gids-chart-legend-item--series-3": e === "3",
|
|
8
|
+
"gids-chart-legend-item--series-4": e === "4",
|
|
9
|
+
"gids-chart-legend-item--series-5": e === "5",
|
|
10
|
+
"gids-chart-legend-item--series-6": e === "6",
|
|
11
|
+
// 'gids-chart-legend-item--orientation-horizontal':
|
|
12
|
+
// orientation === 'horizontal', // not needed as by default
|
|
13
|
+
"gids-chart-legend-item--orientation-vertical": a === "vertical"
|
|
14
|
+
}, r), g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
15
|
+
__proto__: null,
|
|
16
|
+
getGidsChartLegendItemClassNames: o
|
|
17
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsChartLegendItemClassNames: c } = g, h = s(class extends n {
|
|
18
|
+
constructor(e) {
|
|
19
|
+
super(), e !== !1 && this.__registerHost(), this.orientation = "horizontal", this.seriesType = "1";
|
|
20
|
+
}
|
|
21
|
+
handleOrientationChange(e) {
|
|
22
|
+
this.orientation = e;
|
|
23
|
+
}
|
|
24
|
+
handleSeriesTypeChange(e) {
|
|
25
|
+
this.seriesType = e;
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const e = c({ seriesType: this.seriesType, orientation: this.orientation });
|
|
29
|
+
return t("div", { key: "8878b090e147405a847be15581708ec707a806b1", class: e }, t("div", { key: "8ac35d56d1e31cbc613490bec5e5d5a698c5aa7c", class: this.orientation === "vertical" ? "gids-chart-legend-item__dot-wrapper-vertical" : "gids-chart-legend-item__dot-wrapper-horizontal" }, t(d, { key: "2edad86b9fd18809923775308e580f39688a7f47", name: "new", alt: "new_icon", appearance: "filled" })), t("span", { key: "db1611c5d945b5e470623d0ac1c93a3bfd24f1e7", class: "gids-chart-legend-item__label" }, t("slot", { key: "e3ad93df0b136e4f80a214131caf77c01dac9049" })));
|
|
30
|
+
}
|
|
31
|
+
static get watchers() {
|
|
32
|
+
return { orientation: [{ handleOrientationChange: 0 }], seriesType: [{ handleSeriesTypeChange: 0 }] };
|
|
33
|
+
}
|
|
34
|
+
static get style() {
|
|
35
|
+
return ".gids-chart-legend-item{display:flex;align-items:center;gap:var(--gids-gap-100);--gidsChartLegendItemIcon-color:var(--gids-color-icon-subtle);--gidsIcon-color:var(--gidsChartLegendItemIcon-color);--gidsIcon-height:var(--gids-size-080)}.gids-chart-legend-item--orientation-vertical{display:flex}.gids-chart-legend-item--series-2{--gidsChartLegendItemIcon-color:var(--gids-color-icon-warning)}.gids-chart-legend-item--series-3{--gidsChartLegendItemIcon-color:var(--gids-color-icon-danger)}.gids-chart-legend-item--series-4{--gidsChartLegendItemIcon-color:var(--gids-color-background-positive-bold-hovered)}.gids-chart-legend-item--series-5{--gidsChartLegendItemIcon-color:var(--gids-color-background-information-bold-default)}.gids-chart-legend-item--series-6{--gidsChartLegendItemIcon-color:rgb(238, 70, 188)}.gids-chart-legend-item__label{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);text-align:left;color:var(--gids-color-text-subtlest)}.gids-chart-legend-item__dot-wrapper-vertical{display:flex;padding-top:var(--gids-padding-vertical-edge-to-element-075)}.gids-chart-legend-item__dot-wrapper-horizontal{display:flex;align-items:center}";
|
|
36
|
+
}
|
|
37
|
+
}, [260, "gids-chart-legend-item", { orientation: [1], seriesType: [1, "series-type"] }, void 0, { orientation: [{ handleOrientationChange: 0 }], seriesType: [{ handleSeriesTypeChange: 0 }] }]);
|
|
38
|
+
function m() {
|
|
39
|
+
typeof customElements < "u" && ["gids-chart-legend-item"].forEach(((e) => {
|
|
40
|
+
e === "gids-chart-legend-item" && (customElements.get(i(e)) || customElements.define(i(e), h));
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
m();
|
|
44
|
+
export {
|
|
45
|
+
h as d,
|
|
46
|
+
m as l
|
|
47
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { P as d, _ as r, u as l, T as s } from "./p-Ct3Ixgvf-CNP_PKwP.js";
|
|
2
|
+
import { o as h } from "./p-KxRqlvSh-JOFDmT0B.js";
|
|
3
|
+
import { d as c } from "./p-BnL97lOW-BO0p4EdC.js";
|
|
4
|
+
import { c as p } from "./clsx-OuTLNxxd.js";
|
|
5
|
+
const u = ({ expanded: e }, t) => p("gids-dropdown-picker", {
|
|
6
|
+
"gids-dropdown-picker--expanded": e
|
|
7
|
+
}, t), m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8
|
+
__proto__: null,
|
|
9
|
+
getGidsDropdownPickerClassNames: u
|
|
10
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsDropdownPickerClassNames: g } = m, f = r(class extends l {
|
|
11
|
+
constructor(e) {
|
|
12
|
+
super(), e !== !1 && this.__registerHost(), this.appearance = "subtle", this.size = "sm", this.idPicker = "", this.expanded = !1, this.hasLeadingIcon = !1, this.hasItemListener = !1, this.suppressNextMenuClickSelection = !1, this.hasDocumentListeners = !1, this.handleDropdownPickerItemSelect = (t) => {
|
|
13
|
+
const { value: i, title: n, disabled: o, id: a } = t.detail;
|
|
14
|
+
o || typeof i != "string" || (this.suppressNextMenuClickSelection = !0, queueMicrotask((() => {
|
|
15
|
+
this.suppressNextMenuClickSelection = !1;
|
|
16
|
+
})), this.applySelection({ id: a, value: i, title: n, disabled: !1, originalEvent: t }));
|
|
17
|
+
}, this.handleMenuClick = (t) => {
|
|
18
|
+
if (this.suppressNextMenuClickSelection) return;
|
|
19
|
+
const i = t.target;
|
|
20
|
+
if (!(i instanceof Element)) return;
|
|
21
|
+
const n = i.closest(".gids-dropdown-item");
|
|
22
|
+
if (!n || !this.hostElement.contains(n) || n.hasAttribute("disabled") || n.getAttribute("aria-disabled") === "true") return;
|
|
23
|
+
const o = n instanceof HTMLButtonElement ? n.value : n.getAttribute("value") ?? "";
|
|
24
|
+
if (typeof o != "string" || o.length === 0) return;
|
|
25
|
+
const a = n instanceof HTMLButtonElement ? n.id : n.getAttribute("id") ?? "";
|
|
26
|
+
typeof a == "string" && a.length !== 0 && this.applySelection({ id: a, value: o, title: n.textContent?.trim() ?? "", disabled: !1, originalEvent: t });
|
|
27
|
+
}, this.handleTriggerToggle = (t) => {
|
|
28
|
+
this.isInteractive() && this.setExpandedState(!this.expanded, t);
|
|
29
|
+
}, this.handleDropdownButtonClickToggle = (t) => {
|
|
30
|
+
t.defaultPrevented || (t.stopPropagation(), this.handleTriggerToggle(t));
|
|
31
|
+
}, this.handleOutSpaceClickOfDropdownButtonToggle = (t) => {
|
|
32
|
+
this.expanded && (t.stopPropagation(), this.setExpandedState(!1));
|
|
33
|
+
}, this.handleDocumentPointerDown = (t) => {
|
|
34
|
+
t.button !== 2 && this.expanded && ((typeof t.composedPath == "function" ? t.composedPath() : []).includes(this.hostElement) || this.hostElement.contains(t.target) || this.setExpandedState(!1, t));
|
|
35
|
+
}, this.handleDocumentKeyDown = (t) => {
|
|
36
|
+
if (!this.expanded) return;
|
|
37
|
+
const i = t.key;
|
|
38
|
+
if (i === "Escape" || i === "Esc") return t.preventDefault(), void this.setExpandedState(!1, t);
|
|
39
|
+
i === "Tab" && this.setExpandedState(!1, t);
|
|
40
|
+
}, this.handleFormReset = () => {
|
|
41
|
+
this.value = this.initialValue, this.selectedItemTitle = void 0, this.setExpandedState(!1);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
handleExpandedChange(e) {
|
|
45
|
+
e && !this.isInteractive() && (this.expanded = !1);
|
|
46
|
+
}
|
|
47
|
+
handleInteractivityChange() {
|
|
48
|
+
!this.isInteractive() && this.expanded && this.setExpandedState(!1);
|
|
49
|
+
}
|
|
50
|
+
connectedCallback() {
|
|
51
|
+
this.initialValue = this.value, this.attachItemListener(), this.attachDocumentListeners(), this.attachFormListener();
|
|
52
|
+
}
|
|
53
|
+
disconnectedCallback() {
|
|
54
|
+
this.detachItemListener(), this.detachDocumentListeners(), this.detachFormListener();
|
|
55
|
+
}
|
|
56
|
+
componentWillLoad() {
|
|
57
|
+
this.checkSlots();
|
|
58
|
+
}
|
|
59
|
+
componentWillUpdate() {
|
|
60
|
+
this.checkSlots();
|
|
61
|
+
}
|
|
62
|
+
checkSlots() {
|
|
63
|
+
this.hasLeadingIcon = !!this.hostElement.querySelector('[slot="leadingIconDropdownPicker"]');
|
|
64
|
+
}
|
|
65
|
+
getDropdownButtonControl() {
|
|
66
|
+
return this.hostElement.querySelector(".gids-button");
|
|
67
|
+
}
|
|
68
|
+
getItemElements() {
|
|
69
|
+
return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"));
|
|
70
|
+
}
|
|
71
|
+
attachItemListener() {
|
|
72
|
+
this.hasItemListener || (this.hostElement.addEventListener("onPressDropdownItem", this.handleDropdownPickerItemSelect), this.hasItemListener = !0);
|
|
73
|
+
}
|
|
74
|
+
detachItemListener() {
|
|
75
|
+
this.hasItemListener && (this.hostElement.removeEventListener("onPressDropdownItem", this.handleDropdownPickerItemSelect), this.hasItemListener = !1);
|
|
76
|
+
}
|
|
77
|
+
applySelection(e) {
|
|
78
|
+
this.value = e.value, this.selectedItemTitle = typeof e.title == "string" ? e.title : void 0, this.clearActive(), this.setExpandedState(!1, this.coerceEvent(e.originalEvent)), this.onSelectionChange?.(e), this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownPickerChange", { bubbles: !0, composed: !0, detail: e }));
|
|
79
|
+
}
|
|
80
|
+
clearActive() {
|
|
81
|
+
this.getItemElements().forEach(((e) => e.classList.remove("gids-dropdown-item--active")));
|
|
82
|
+
}
|
|
83
|
+
setExpandedState(e, t) {
|
|
84
|
+
const i = !!e;
|
|
85
|
+
i && !this.isInteractive() || this.expanded !== i && (this.expanded = i, i || (this.clearActive(), this.syncInputDisplayValue()), this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownPickerToggle", { bubbles: !0, composed: !0, detail: { expanded: i, originalEvent: t } })));
|
|
86
|
+
}
|
|
87
|
+
syncInputDisplayValue() {
|
|
88
|
+
const e = this.getDropdownButtonControl();
|
|
89
|
+
e && e.value !== (this.selectedItemTitle ?? "") && (e.value = this.selectedItemTitle ?? "");
|
|
90
|
+
}
|
|
91
|
+
attachDocumentListeners() {
|
|
92
|
+
this.hasDocumentListeners || typeof document > "u" || (document.addEventListener("pointerdown", this.handleDocumentPointerDown), document.addEventListener("keydown", this.handleDocumentKeyDown), this.hasDocumentListeners = !0);
|
|
93
|
+
}
|
|
94
|
+
detachDocumentListeners() {
|
|
95
|
+
this.hasDocumentListeners && typeof document < "u" && (document.removeEventListener("pointerdown", this.handleDocumentPointerDown), document.removeEventListener("keydown", this.handleDocumentKeyDown), this.hasDocumentListeners = !1);
|
|
96
|
+
}
|
|
97
|
+
attachFormListener() {
|
|
98
|
+
const e = this.hostElement.closest("form");
|
|
99
|
+
this.patternForm !== e && (this.patternForm && this.patternForm.removeEventListener("reset", this.handleFormReset), this.patternForm = e ?? void 0, this.patternForm?.addEventListener("reset", this.handleFormReset));
|
|
100
|
+
}
|
|
101
|
+
detachFormListener() {
|
|
102
|
+
this.patternForm && (this.patternForm.removeEventListener("reset", this.handleFormReset), this.patternForm = void 0);
|
|
103
|
+
}
|
|
104
|
+
isInteractive() {
|
|
105
|
+
return !this.disabled;
|
|
106
|
+
}
|
|
107
|
+
coerceEvent(e) {
|
|
108
|
+
if (typeof Event < "u" && e !== null) return e instanceof Event ? e : void 0;
|
|
109
|
+
}
|
|
110
|
+
render() {
|
|
111
|
+
const e = this.expanded && this.isInteractive(), t = g({ expanded: e }), i = typeof this.idPicker == "string" ? this.idPicker : void 0, n = i ? `${i}__menu` : void 0;
|
|
112
|
+
return s("div", { key: "60aba19be894123a4fb11cf8d682c89c1e1dfc9c", class: t, onClick: this.handleOutSpaceClickOfDropdownButtonToggle }, s(h, { key: "6e691f9fee63c676d7a66d42024a4688730f9503", role: "pickerbox", "aria-expanded": e ? "true" : "false", "aria-haspopup": "pickerlistbox", "aria-controls": n ?? "", onClick: this.handleDropdownButtonClickToggle, disabled: this.disabled, value: this.selectedItemTitle ?? this.value ?? "", loading: this.loading, appearance: this.appearance, size: this.size }, this.hasLeadingIcon ? s("slot", { name: "leadingIconDropdownPicker", slot: "leadingIcon" }) : s(c, { name: "chevron-down", size: this.size, appearance: "regular", alt: "", slot: "leadingIcon" })), s("div", { key: "b44514baae627324d71f1114c3ba18bc6b946b01", class: "gids-dropdown-picker__menu", id: n, role: "pickerbox", onClick: this.handleMenuClick }, s("slot", { key: "1e3b9e592646a1bda41d2cf5bfc8556908c0499f" })));
|
|
113
|
+
}
|
|
114
|
+
get hostElement() {
|
|
115
|
+
return this;
|
|
116
|
+
}
|
|
117
|
+
static get watchers() {
|
|
118
|
+
return { expanded: [{ handleExpandedChange: 0 }], disabled: [{ handleInteractivityChange: 0 }] };
|
|
119
|
+
}
|
|
120
|
+
static get style() {
|
|
121
|
+
return ".gids-dropdown-picker{position:relative}.gids-dropdown-picker__menu{position:absolute;inset-inline:0;top:calc(100% + var(--gids-gap-050));z-index:3;display:none;flex-direction:column;align-self:stretch;min-width:var(--gids-width-2-xs);min-height:55px;max-height:15rem;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-picker__menu>*{flex-shrink:0}.gids-dropdown-picker--expanded .gids-dropdown-picker__menu{display:flex}";
|
|
122
|
+
}
|
|
123
|
+
}, [260, "gids-dropdown-picker", { appearance: [1], size: [1], idPicker: [1, "id-picker"], expanded: [1540], disabled: [516], loading: [516], value: [513], name: [1], onSelectionChange: [16], selectedItemTitle: [32], hasLeadingIcon: [32] }, void 0, { expanded: [{ handleExpandedChange: 0 }], disabled: [{ handleInteractivityChange: 0 }] }]);
|
|
124
|
+
function v() {
|
|
125
|
+
typeof customElements < "u" && ["gids-dropdown-picker"].forEach(((e) => {
|
|
126
|
+
e === "gids-dropdown-picker" && (customElements.get(d(e)) || customElements.define(d(e), f));
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
v();
|
|
130
|
+
export {
|
|
131
|
+
f as h,
|
|
132
|
+
v as r
|
|
133
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { P as t, _ as a, u as r, T as n } from "./p-Ct3Ixgvf-CNP_PKwP.js";
|
|
2
|
+
import { c as s } from "./clsx-OuTLNxxd.js";
|
|
3
|
+
const o = ({ orientation: e }, i) => s("gids-chart-legend", {
|
|
4
|
+
// 'gids-chart-legend--orientation-horizontal':
|
|
5
|
+
// orientation === 'horizontal', // not needed as by default
|
|
6
|
+
"gids-chart-legend--orientation-vertical": e === "vertical"
|
|
7
|
+
}, i), d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8
|
+
__proto__: null,
|
|
9
|
+
getGidsChartLegendClassNames: o
|
|
10
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsChartLegendClassNames: c } = d, l = a(class extends r {
|
|
11
|
+
constructor(e) {
|
|
12
|
+
super(), e !== !1 && this.__registerHost(), this.orientation = "horizontal";
|
|
13
|
+
}
|
|
14
|
+
handleOrientationChange(e) {
|
|
15
|
+
this.orientation = e;
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const e = c({ orientation: this.orientation });
|
|
19
|
+
return n("div", { key: "cf7740304d4b3616d7bc15d2a2009c537665bbc7", class: e }, n("slot", { key: "940d3744a6ea0da0684ff2d16c9734e8d265b485" }));
|
|
20
|
+
}
|
|
21
|
+
static get watchers() {
|
|
22
|
+
return { orientation: [{ handleOrientationChange: 0 }] };
|
|
23
|
+
}
|
|
24
|
+
static get style() {
|
|
25
|
+
return ".gids-chart-legend{display:inline-flex;align-items:flex-start;gap:var(--gids-gap-150)}.gids-chart-legend--orientation-vertical{flex-direction:column;gap:var(--gids-gap-050)}";
|
|
26
|
+
}
|
|
27
|
+
}, [260, "gids-chart-legend", { orientation: [1] }, void 0, { orientation: [{ handleOrientationChange: 0 }] }]);
|
|
28
|
+
function g() {
|
|
29
|
+
typeof customElements < "u" && ["gids-chart-legend"].forEach(((e) => {
|
|
30
|
+
e === "gids-chart-legend" && (customElements.get(t(e)) || customElements.define(t(e), l));
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
g();
|
|
34
|
+
export {
|
|
35
|
+
g as d,
|
|
36
|
+
l as r
|
|
37
|
+
};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { P as r, _ as u, u as p, T as a } from "./p-Ct3Ixgvf-CNP_PKwP.js";
|
|
2
|
+
import { d as m } from "./p-BnL97lOW-BO0p4EdC.js";
|
|
3
|
+
import { r as g } from "./p-DfFqFdmS-DjI2pk-0.js";
|
|
4
|
+
import { c as l } from "./clsx-OuTLNxxd.js";
|
|
5
|
+
const v = ({ expanded: e }, t) => l("gids-dropdown", {
|
|
6
|
+
"gids-dropdown--expanded": e
|
|
7
|
+
}, t), f = ({ size: e }, t) => l("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: E } = y, d = "gids-dropdown-item--active", b = 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 } = 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 }));
|
|
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
|
+
typeof o == "string" && o.length !== 0 && this.applySelection({ id: o, value: s, title: n.textContent?.trim() ?? "", disabled: !1, originalEvent: t });
|
|
32
|
+
}, this.handleFilterInput = (t) => {
|
|
33
|
+
const i = t.target;
|
|
34
|
+
this.filterValue = i?.value ?? "", this.isFilterEditing = !0, this.clearActive(), this.expanded || this.setExpandedState(!0, t), this.applyFilter();
|
|
35
|
+
}, this.handleInputKeyDown = (t) => {
|
|
36
|
+
if (!this.isInteractive()) return;
|
|
37
|
+
const i = t.key, n = i === "ArrowDown";
|
|
38
|
+
if ((n || i === "ArrowUp") && !t.metaKey && !t.ctrlKey) return t.preventDefault(), this.expanded || this.setExpandedState(!0, t), void this.moveActive(n ? 1 : -1);
|
|
39
|
+
if (i === "Home" && this.expanded) return t.preventDefault(), void this.setActiveByIndex(0);
|
|
40
|
+
if (i === "End" && this.expanded) return t.preventDefault(), void this.setActiveByIndex(this.getVisibleEnabledItems().length - 1);
|
|
41
|
+
if (i === "Enter") {
|
|
42
|
+
if (!this.expanded) return t.preventDefault(), this.setExpandedState(!0, t), void this.setActiveByIndex(0);
|
|
43
|
+
this.selectActive() && t.preventDefault();
|
|
44
|
+
}
|
|
45
|
+
}, this.handleTriggerToggle = (t) => {
|
|
46
|
+
this.isInteractive() && this.setExpandedState(!this.expanded, t);
|
|
47
|
+
}, this.handleInputFocusAndBlur = (t) => {
|
|
48
|
+
this.hostElement.dispatchEvent(new FocusEvent(t.type, { relatedTarget: t.relatedTarget }));
|
|
49
|
+
}, this.handleInputClickToggle = (t) => {
|
|
50
|
+
t.defaultPrevented || this.handleTriggerToggle(t);
|
|
51
|
+
}, this.handleChevronClickToggle = (t) => {
|
|
52
|
+
t.defaultPrevented || (t.stopPropagation(), this.handleTriggerToggle(t));
|
|
53
|
+
}, this.handleDocumentPointerDown = (t) => {
|
|
54
|
+
t.button !== 2 && this.expanded && ((typeof t.composedPath == "function" ? t.composedPath() : []).includes(this.hostElement) || this.hostElement.contains(t.target) || this.setExpandedState(!1, t));
|
|
55
|
+
}, this.handleDocumentKeyDown = (t) => {
|
|
56
|
+
if (!this.expanded) return;
|
|
57
|
+
const i = t.key;
|
|
58
|
+
if (i === "Escape" || i === "Esc") return t.preventDefault(), void this.setExpandedState(!1, t);
|
|
59
|
+
i === "Tab" && this.setExpandedState(!1, t);
|
|
60
|
+
}, this.handleFormReset = () => {
|
|
61
|
+
this.value = this.initialValue, this.selectedItemTitle = void 0, this.isFilterEditing = !1, this.filterValue = "", this.setExpandedState(!1);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
handleExpandedChange(e) {
|
|
65
|
+
e && !this.isInteractive() && (this.expanded = !1);
|
|
66
|
+
}
|
|
67
|
+
handleInteractivityChange() {
|
|
68
|
+
!this.isInteractive() && this.expanded && this.setExpandedState(!1);
|
|
69
|
+
}
|
|
70
|
+
connectedCallback() {
|
|
71
|
+
this.initialValue = this.value, this.attachItemListener(), this.attachDocumentListeners(), this.attachFormListener();
|
|
72
|
+
}
|
|
73
|
+
disconnectedCallback() {
|
|
74
|
+
this.detachItemListener(), this.detachDocumentListeners(), this.detachFormListener();
|
|
75
|
+
}
|
|
76
|
+
componentWillLoad() {
|
|
77
|
+
this.checkSlots();
|
|
78
|
+
}
|
|
79
|
+
componentWillUpdate() {
|
|
80
|
+
this.checkSlots();
|
|
81
|
+
}
|
|
82
|
+
checkSlots() {
|
|
83
|
+
this.hasLeadingIcon = !!this.hostElement.querySelector('[slot="leadingIconDropdown"]'), this.hasLeadingAccessory = !!this.hostElement.querySelector('[slot="leadingAccessoryDropdown"]');
|
|
84
|
+
}
|
|
85
|
+
getItemElements() {
|
|
86
|
+
return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"));
|
|
87
|
+
}
|
|
88
|
+
getVisibleEnabledItems() {
|
|
89
|
+
return this.getItemElements().filter(((e) => e.style.display !== "none" && !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true"));
|
|
90
|
+
}
|
|
91
|
+
attachItemListener() {
|
|
92
|
+
this.hasItemListener || (this.hostElement.addEventListener("onPressDropdownItem", this.handleDropdownItemSelect), this.hasItemListener = !0);
|
|
93
|
+
}
|
|
94
|
+
detachItemListener() {
|
|
95
|
+
this.hasItemListener && (this.hostElement.removeEventListener("onPressDropdownItem", this.handleDropdownItemSelect), this.hasItemListener = !1);
|
|
96
|
+
}
|
|
97
|
+
applySelection(e) {
|
|
98
|
+
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 }));
|
|
99
|
+
}
|
|
100
|
+
getInputControl() {
|
|
101
|
+
return this.hostElement.querySelector(".gids-input__control");
|
|
102
|
+
}
|
|
103
|
+
emitNativeSelectionEvents(e) {
|
|
104
|
+
const t = this.getInputControl();
|
|
105
|
+
t && (t.value = e, t.dispatchEvent(new Event("input", { bubbles: !0, composed: !0 })), t.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })));
|
|
106
|
+
}
|
|
107
|
+
clearActive() {
|
|
108
|
+
this.activeIndex = -1, this.getItemElements().forEach(((e) => e.classList.remove(d))), this.setActiveDescendant(void 0);
|
|
109
|
+
}
|
|
110
|
+
setActiveByIndex(e) {
|
|
111
|
+
const t = this.getVisibleEnabledItems();
|
|
112
|
+
if (this.getItemElements().forEach(((s) => s.classList.remove(d))), t.length === 0) return this.activeIndex = -1, void this.setActiveDescendant(void 0);
|
|
113
|
+
const i = Math.max(0, Math.min(e, t.length - 1)), n = t[i];
|
|
114
|
+
if (!n) return this.activeIndex = -1, void this.setActiveDescendant(void 0);
|
|
115
|
+
this.activeIndex = i, n.classList.add(d), n.scrollIntoView({ block: "nearest" }), this.setActiveDescendant(n.id || void 0);
|
|
116
|
+
}
|
|
117
|
+
moveActive(e) {
|
|
118
|
+
const t = this.getVisibleEnabledItems();
|
|
119
|
+
t.length !== 0 ? this.setActiveByIndex(this.activeIndex === -1 ? e > 0 ? 0 : t.length - 1 : (this.activeIndex + e + t.length) % t.length) : this.clearActive();
|
|
120
|
+
}
|
|
121
|
+
selectActive() {
|
|
122
|
+
const e = this.getVisibleEnabledItems();
|
|
123
|
+
if (e.length === 0) return !1;
|
|
124
|
+
const t = this.activeIndex >= 0 ? e[this.activeIndex] : e[0];
|
|
125
|
+
return !!t && (t.click(), this.getInputControl()?.focus(), !0);
|
|
126
|
+
}
|
|
127
|
+
applyFilter() {
|
|
128
|
+
const e = this.filterValue.trim().toLowerCase();
|
|
129
|
+
this.getItemElements().forEach(((t) => {
|
|
130
|
+
const i = (t.textContent ?? "").toLowerCase(), n = e.length === 0 || i.includes(e);
|
|
131
|
+
t.style.display = n ? "" : "none";
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
setActiveDescendant(e) {
|
|
135
|
+
const t = this.getInputControl();
|
|
136
|
+
t && (e ? t.setAttribute("aria-activedescendant", e) : t.removeAttribute("aria-activedescendant"));
|
|
137
|
+
}
|
|
138
|
+
setExpandedState(e, t) {
|
|
139
|
+
const i = !!e;
|
|
140
|
+
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 } })));
|
|
141
|
+
}
|
|
142
|
+
syncInputDisplayValue() {
|
|
143
|
+
const e = this.getInputControl();
|
|
144
|
+
e && e.value !== (this.selectedItemTitle ?? "") && (e.value = this.selectedItemTitle ?? "");
|
|
145
|
+
}
|
|
146
|
+
attachDocumentListeners() {
|
|
147
|
+
this.hasDocumentListeners || typeof document > "u" || (document.addEventListener("pointerdown", this.handleDocumentPointerDown), document.addEventListener("keydown", this.handleDocumentKeyDown), this.hasDocumentListeners = !0);
|
|
148
|
+
}
|
|
149
|
+
detachDocumentListeners() {
|
|
150
|
+
this.hasDocumentListeners && typeof document < "u" && (document.removeEventListener("pointerdown", this.handleDocumentPointerDown), document.removeEventListener("keydown", this.handleDocumentKeyDown), this.hasDocumentListeners = !1);
|
|
151
|
+
}
|
|
152
|
+
attachFormListener() {
|
|
153
|
+
const e = this.hostElement.closest("form");
|
|
154
|
+
this.patternForm !== e && (this.patternForm && this.patternForm.removeEventListener("reset", this.handleFormReset), this.patternForm = e ?? void 0, this.patternForm?.addEventListener("reset", this.handleFormReset));
|
|
155
|
+
}
|
|
156
|
+
detachFormListener() {
|
|
157
|
+
this.patternForm && (this.patternForm.removeEventListener("reset", this.handleFormReset), this.patternForm = void 0);
|
|
158
|
+
}
|
|
159
|
+
get form() {
|
|
160
|
+
return this.getInputControl()?.form ?? this.patternForm ?? null;
|
|
161
|
+
}
|
|
162
|
+
get validity() {
|
|
163
|
+
return this.getInputControl()?.validity ?? {};
|
|
164
|
+
}
|
|
165
|
+
get validationMessage() {
|
|
166
|
+
return this.getInputControl()?.validationMessage ?? "";
|
|
167
|
+
}
|
|
168
|
+
get willValidate() {
|
|
169
|
+
return this.getInputControl()?.willValidate ?? !1;
|
|
170
|
+
}
|
|
171
|
+
async checkValidity() {
|
|
172
|
+
return this.getInputControl()?.checkValidity() ?? !0;
|
|
173
|
+
}
|
|
174
|
+
async reportValidity() {
|
|
175
|
+
return this.getInputControl()?.reportValidity() ?? !0;
|
|
176
|
+
}
|
|
177
|
+
async setCustomValidity(e) {
|
|
178
|
+
return this.getInputControl()?.setCustomValidity(e);
|
|
179
|
+
}
|
|
180
|
+
isInteractive() {
|
|
181
|
+
return !(this.disabled || this.readOnly);
|
|
182
|
+
}
|
|
183
|
+
coerceEvent(e) {
|
|
184
|
+
if (typeof Event < "u" && e !== null) return e instanceof Event ? e : void 0;
|
|
185
|
+
}
|
|
186
|
+
scheduleControlRevalidation() {
|
|
187
|
+
if (this.hasPendingControlRevalidation) return;
|
|
188
|
+
this.hasPendingControlRevalidation = !0;
|
|
189
|
+
const e = () => {
|
|
190
|
+
this.hasPendingControlRevalidation = !1, this.checkValidity();
|
|
191
|
+
};
|
|
192
|
+
typeof requestAnimationFrame != "function" ? e() : requestAnimationFrame(e);
|
|
193
|
+
}
|
|
194
|
+
getEnhancedInputProps() {
|
|
195
|
+
const e = { ...this.inputProps ?? {} };
|
|
196
|
+
typeof e.autoComplete == "string" && e?.autoComplete?.trim?.()?.length !== 0 || (e.autoComplete = "off");
|
|
197
|
+
const t = e.onInput;
|
|
198
|
+
e.onInput = (s) => {
|
|
199
|
+
t?.(s), this.handleFilterInput(s);
|
|
200
|
+
};
|
|
201
|
+
const i = e.onBlur;
|
|
202
|
+
e.onBlur = (s) => {
|
|
203
|
+
i?.(s), this.scheduleControlRevalidation();
|
|
204
|
+
};
|
|
205
|
+
const n = e.onKeyDown;
|
|
206
|
+
return e.onKeyDown = (s) => {
|
|
207
|
+
n?.(s), s.defaultPrevented || this.handleInputKeyDown(s);
|
|
208
|
+
}, e;
|
|
209
|
+
}
|
|
210
|
+
render() {
|
|
211
|
+
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;
|
|
212
|
+
i.role = "combobox", i["aria-expanded"] = e ? "true" : "false", i["aria-haspopup"] = "listbox", i["aria-autocomplete"] = "list", s && (i["aria-controls"] = s);
|
|
213
|
+
const o = this.isFilterEditing ? this.filterValue : this.selectedItemTitle ?? this.value ?? "", h = e ? "true" : "false", c = a("button", { key: "94ed9ae19e3a6e1e9e02c6e3fab0c70a5193667b", class: E({ size: "lg" }), slot: "trailingAccessory", type: "button", onClick: this.handleChevronClickToggle, "aria-label": e ? "Collapse options" : "Expanded options", "aria-expanded": h, "aria-haspopup": "listbox", "aria-controls": s, disabled: this.disabled || this.readOnly, tabIndex: -1 }, a("span", { key: "f6e79003a75a80623564c81c83158640c407c8f4", class: "gids-button__content" }, a(m, { key: "85c0caf667a50f629375652ead7c1e8d86bc96ed", name: "chevron-vertical", alt: "" })));
|
|
214
|
+
return a("div", { key: "d02c0b39097b0307ca22a7e86bccfb37083d447f", class: t }, a("gids-input", { key: "16475e8ebce7a5909f6c4c102ef781eed657a6e0", 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: "fbdf6ef356a9d1ade43eecfa3bb92ef0fe538f1c", name: "leadingIconDropdown", slot: "leadingIcon" }), this.hasLeadingAccessory && a("slot", { key: "f9e0fc631f4a3a4758d9b446312ae9d0ff9bcd01", name: "leadingAccessoryDropdown", slot: "leadingAccessory" }), c), a("div", { key: "ae2974b210c297fa1e1160ad93d22b45297a1613", class: "gids-dropdown__menu", id: s, role: "listbox", onClick: this.handleMenuClick }, a("slot", { key: "d7bd637af09568522549e2551173efd90fa40e4b" })));
|
|
215
|
+
}
|
|
216
|
+
get hostElement() {
|
|
217
|
+
return this;
|
|
218
|
+
}
|
|
219
|
+
static get watchers() {
|
|
220
|
+
return { expanded: [{ handleExpandedChange: 0 }], disabled: [{ handleInteractivityChange: 0 }], readOnly: [{ handleInteractivityChange: 0 }] };
|
|
221
|
+
}
|
|
222
|
+
static get style() {
|
|
223
|
+
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}';
|
|
224
|
+
}
|
|
225
|
+
}, [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 }] }]);
|
|
226
|
+
function x() {
|
|
227
|
+
typeof customElements < "u" && ["gids-dropdown", "gids-input"].forEach(((e) => {
|
|
228
|
+
switch (e) {
|
|
229
|
+
case "gids-dropdown":
|
|
230
|
+
customElements.get(r(e)) || customElements.define(r(e), b);
|
|
231
|
+
break;
|
|
232
|
+
case "gids-input":
|
|
233
|
+
customElements.get(r(e)) || g();
|
|
234
|
+
}
|
|
235
|
+
}));
|
|
236
|
+
}
|
|
237
|
+
x();
|
|
238
|
+
export {
|
|
239
|
+
b as c,
|
|
240
|
+
x as l
|
|
241
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { P as e, _ as t, u as s, T as o } from "./p-Ct3Ixgvf-CNP_PKwP.js";
|
|
2
|
+
import { i as d } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
|
+
import { d as a } from "./p-BnL97lOW-BO0p4EdC.js";
|
|
4
|
+
const c = t(class extends s {
|
|
5
|
+
constructor(i) {
|
|
6
|
+
super(), i !== !1 && this.__registerHost(), this.__attachShadow();
|
|
7
|
+
}
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
const i = d();
|
|
10
|
+
i !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(i);
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return o(a, { key: "7c74510543b6eae79c31fbf55124ad4e37f64c63", name: this.name, size: this.size, appearance: this.appearance, alt: this.alt, titleId: this.titleId });
|
|
14
|
+
}
|
|
15
|
+
get _el() {
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
static get style() {
|
|
19
|
+
return ".gids-icon{color:var(--gidsIcon-color, var(--gids-color-icon-default));fill:var(--gidsIcon-color, var(--gids-color-icon-default));width:auto;height:var(--gidsIcon-height, 100%);flex-shrink:0}.gids-icon--xs{--gidsIcon-height:var(--gids-size-120)}.gids-icon--sm{--gidsIcon-height:var(--gids-size-160)}.gids-icon--md{--gidsIcon-height:var(--gids-size-240)}.gids-icon--lg{--gidsIcon-height:var(--gids-size-320)}";
|
|
20
|
+
}
|
|
21
|
+
}, [1, "gids-icon", { name: [1], size: [1], appearance: [1], alt: [1], titleId: [1, "title-id"] }]);
|
|
22
|
+
function n() {
|
|
23
|
+
typeof customElements < "u" && ["gids-icon"].forEach(((i) => {
|
|
24
|
+
i === "gids-icon" && (customElements.get(e(i)) || customElements.define(e(i), c));
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
n();
|
|
28
|
+
export {
|
|
29
|
+
n as d,
|
|
30
|
+
c as n
|
|
31
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { P as o, _ as r, u as c, T as d } from "./p-Ct3Ixgvf-CNP_PKwP.js";
|
|
2
|
+
import { u as h, f as m, B as u } from "./p-MgTlrSP_-DifRVv94.js";
|
|
3
|
+
import { c as f } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
const p = (t) => f("gids-calendar-month-list", t), I = () => {
|
|
5
|
+
const t = [], s = new Intl.DateTimeFormat("en-US", { month: "long" });
|
|
6
|
+
for (let e = 1; e <= 12; e += 1) {
|
|
7
|
+
const n = new Date(2e3, e - 1, 1), i = s.format(n);
|
|
8
|
+
t.push({
|
|
9
|
+
id: `${e}`,
|
|
10
|
+
title: i,
|
|
11
|
+
value: e
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return t;
|
|
15
|
+
}, b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
16
|
+
__proto__: null,
|
|
17
|
+
getGidsCalendarMonthListClassNames: p,
|
|
18
|
+
getGidsCalendarMonthListMonths: I
|
|
19
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsCalendarMonthListClassNames: g, getGidsCalendarMonthListMonths: M } = b, C = r(class extends c {
|
|
20
|
+
constructor(t) {
|
|
21
|
+
super(), t !== !1 && this.__registerHost(), this.type = "default", this.disabledIndices = [], this.divider = !1, this.hasItemListener = !1, this.suppressNextMenuClickSelection = !1, this.handleCalendarMenuItemSelect = (s) => {
|
|
22
|
+
const { title: e, value: n, selectedIndex: i, disabled: l, id: a } = s.detail;
|
|
23
|
+
l || typeof e != "string" || (this.suppressNextMenuClickSelection = !0, queueMicrotask((() => {
|
|
24
|
+
this.suppressNextMenuClickSelection = !1;
|
|
25
|
+
})), this.applySelection({ id: a, month: e, monthInNumber: Number(n), disabled: !1, selectedIndex: i }));
|
|
26
|
+
}, this.handleMenuClick = (s) => {
|
|
27
|
+
if (this.suppressNextMenuClickSelection) return;
|
|
28
|
+
const e = s?.detail;
|
|
29
|
+
this.applySelection({ id: e.id, monthInNumber: Number(e.value), month: e.title, disabled: !1, selectedIndex: e.selectedIndex });
|
|
30
|
+
}, this.monthsList = () => M(), this.getSelectedItem = () => {
|
|
31
|
+
const s = this.selectedMonthNumber, e = this.monthsList(), n = e.findIndex(((l) => l.value === s));
|
|
32
|
+
let i;
|
|
33
|
+
return n != null && n !== -1 && (i = e[n]), { foundItem: i, foundIndex: n };
|
|
34
|
+
}, this.isItemSelected = (s) => {
|
|
35
|
+
const { foundIndex: e } = this.getSelectedItem();
|
|
36
|
+
return e === s;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
connectedCallback() {
|
|
40
|
+
this.attachItemListener();
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
this.detachItemListener();
|
|
44
|
+
}
|
|
45
|
+
getItemElements() {
|
|
46
|
+
return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"));
|
|
47
|
+
}
|
|
48
|
+
attachItemListener() {
|
|
49
|
+
this.hasItemListener || (this.hostElement.addEventListener("onPressDropdownItem", this.handleCalendarMenuItemSelect), this.hasItemListener = !0);
|
|
50
|
+
}
|
|
51
|
+
detachItemListener() {
|
|
52
|
+
this.hasItemListener && (this.hostElement.removeEventListener("onPressDropdownItem", this.handleCalendarMenuItemSelect), this.hasItemListener = !1);
|
|
53
|
+
}
|
|
54
|
+
applySelection(t) {
|
|
55
|
+
this.clearActive(), this.onSelectionMonthChange?.(t), this.hostElement.dispatchEvent(new CustomEvent("gidsCalendarMonthChange", { bubbles: !0, composed: !0, detail: t }));
|
|
56
|
+
}
|
|
57
|
+
clearActive() {
|
|
58
|
+
this.getItemElements().forEach(((t) => t.classList.remove("gids-dropdown-item--active")));
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
const t = g();
|
|
62
|
+
return d("div", { key: "a3d78c655f5f3d2fa1c26a06f78d96c6964a8f2b", class: t }, d(h, { key: "ee53fe9e5f94249400d4339c5baf0dcebb87218e", type: this.type, supportingText: this.noOptionsText }, d(m, { key: "50059fdc97b6e206ffd3389470d6fd2f25747cbd", sectionLabel: "Months" }, this.monthsList().map(((s, e) => {
|
|
63
|
+
const n = `${e + 1}`, i = this.disabledIndices?.includes(e);
|
|
64
|
+
return d(u, { title: s.title, value: `${s.value}`, key: `${e.toString()}`, index: e, id: n, selected: this.isItemSelected(e), onPressDropdownItem: this.handleMenuClick, disabled: i, divider: this.divider });
|
|
65
|
+
})))));
|
|
66
|
+
}
|
|
67
|
+
get hostElement() {
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
}, [0, "gids-calendar-month-list", { type: [1], noOptionsText: [1, "no-options-text"], disabledIndices: [16], divider: [4], selectedMonthNumber: [2, "selected-month-number"], onSelectionMonthChange: [16] }]);
|
|
71
|
+
function v() {
|
|
72
|
+
typeof customElements < "u" && ["gids-calendar-month-list"].forEach(((t) => {
|
|
73
|
+
t === "gids-calendar-month-list" && (customElements.get(o(t)) || customElements.define(o(t), C));
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
v();
|
|
77
|
+
export {
|
|
78
|
+
C as c,
|
|
79
|
+
v as l
|
|
80
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as s } from "./p-Ct3Ixgvf-CNP_PKwP.js";
|
|
2
2
|
import { h as y, o as k, g as d } from "./assets-Drv1fXkA.js";
|
|
3
3
|
import { c as S } from "./clsx-OuTLNxxd.js";
|
|
4
4
|
const x = ({ size: e }, t) => S("gids-icon", {
|
|
@@ -180,18 +180,18 @@ function u(e, t = "regular", n) {
|
|
|
180
180
|
let i = o ?? "";
|
|
181
181
|
return n && o && (i = n(o) ?? o), `${i}#${e}${t === "filled" ? "--filled" : ""}`;
|
|
182
182
|
}
|
|
183
|
-
const { getGidsIconClassNames: A } = I, M = ({ name: e, size: t, appearance: n, alt: o, class: i, titleId: m, src: g, ...
|
|
183
|
+
const { getGidsIconClassNames: A } = I, M = ({ name: e, size: t, appearance: n, alt: o, class: i, titleId: m, src: g, ...v }) => {
|
|
184
184
|
const a = P(m);
|
|
185
185
|
let r = g;
|
|
186
|
-
return r === void 0 && y() && (r = u(e, n, d)), s("svg", { ref: (
|
|
186
|
+
return r === void 0 && y() && (r = u(e, n, d)), s("svg", { ref: (f) => {
|
|
187
187
|
r === void 0 && k((() => {
|
|
188
|
-
(function(
|
|
189
|
-
if (!
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
})(
|
|
188
|
+
(function(c, w, b) {
|
|
189
|
+
if (!c) return;
|
|
190
|
+
const l = document.createElementNS("http://www.w3.org/2000/svg", "use");
|
|
191
|
+
l.setAttribute("href", u(w, b, d)), c.appendChild(l);
|
|
192
|
+
})(f, e, n);
|
|
193
193
|
}));
|
|
194
|
-
}, width: "16", height: "16", class: A({ size: t }, i), role: "img", "aria-hidden": o === "" ? "true" : void 0, "aria-labelledby": o === "" ? void 0 : a, ...
|
|
194
|
+
}, width: "16", height: "16", class: A({ size: t }, i), role: "img", "aria-hidden": o === "" ? "true" : void 0, "aria-labelledby": o === "" ? void 0 : a, ...v }, o !== "" && s("title", { id: a }, o || e), r !== void 0 ? s("use", { href: r }) : null);
|
|
195
195
|
};
|
|
196
196
|
export {
|
|
197
197
|
M as d,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as h } from "./p-
|
|
1
|
+
import { P as l, _ as n, u as r, T as o, H as d } from "./p-Ct3Ixgvf-CNP_PKwP.js";
|
|
2
|
+
import { d as h } from "./p-BnL97lOW-BO0p4EdC.js";
|
|
3
3
|
import { i as c } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
4
4
|
import { c as _ } from "./clsx-OuTLNxxd.js";
|
|
5
5
|
const g = (t) => _("gids-field", t), u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -56,7 +56,7 @@ const g = (t) => _("gids-field", t), u = /* @__PURE__ */ Object.freeze(/* @__PUR
|
|
|
56
56
|
const a = this._getStatusModifierClass(s, "gids-field__status-text");
|
|
57
57
|
a != null && i.push(a);
|
|
58
58
|
}
|
|
59
|
-
return o(d, { key: "
|
|
59
|
+
return o(d, { key: "98078538f6970b0cf756c7a172e635f3302381b2" }, o("div", { key: "6751ea942c38270fce42e025ca17e29a38207028", class: p() }, o("div", { key: "5c4969bedfd54b42603ff3de69c72bc513aeaeb6", class: "gids-field__header", hidden: !this._hasLabelContent() }, o("slot", { key: "9f98f47e3285551c67f7a350d058a55953c88756", ref: this._setLabelSlot, name: "label", onSlotchange: this._handleControlSlotChange }), o("div", { key: "6660ed1c29faf2ca838ba8714dee7feb79257187", class: "gids-field__count", "aria-live": "polite" }, this.count)), o("div", { key: "ab2bb081db7e8e8caddcc515580e02f32d4c054a", class: "gids-field__control" }, o("slot", { key: "5df4538b894f7daedcb03bcab1316c9452e65caf", ref: this._setControlSlot, onSlotchange: this._handleControlSlotChange })), o("p", { key: "d7dce2f4a0b03b056ac8888a918e88b15931c8e5", class: "gids-field__supporting-text", hidden: !this._shouldShowHelperText() }, this.helperText), t ? o("p", { class: i.join(" "), role: "status", "aria-live": "polite" }, this._renderStatusIcon(s), e !== void 0 ? o("span", null, e) : null) : null));
|
|
60
60
|
}
|
|
61
61
|
_hasLabelContent() {
|
|
62
62
|
return this._hasLabel;
|