@ganpatiinfo/gids-core-web 9.0.0 → 10.1.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 +1504 -1
- package/dist/css/index.css.map +1 -1
- package/dist/gids-action-bar.d.ts +11 -0
- package/dist/gids-action-bar.js +1 -0
- 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.js +1 -1
- package/dist/gids-filter.d.ts +11 -0
- package/dist/gids-filter.js +1 -0
- package/dist/gids-icon.js +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.js +1 -1
- 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.d.ts +11 -0
- package/dist/gids-pie-chart.js +1 -0
- 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.js +1 -1
- package/dist/gids-snackbar.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/index.js +1 -1
- package/dist/{p-DvoHLz_5.js → p-BQ-ZnlnH.js} +1 -1
- package/dist/p-BZCJlqVe.js +1 -0
- package/dist/p-Bf3p-DY2.js +1 -0
- package/dist/p-BpQB6ncp.js +1 -0
- package/dist/{p-DybsMR13.js → p-CHGTBObD.js} +1 -1
- package/dist/p-CP1wz2PI.js +1 -0
- package/dist/p-CQH7eAs3.js +1 -0
- package/dist/p-CW7tw1Fb.js +1 -0
- package/dist/p-CaauwQNd.js +1 -0
- package/dist/p-Cn3-K5eR.js +1 -0
- package/dist/p-CoS0NuDU.js +1 -0
- package/dist/{p-veoOgDXg.js → p-D4Pimu_8.js} +1 -1
- package/dist/p-D6lxqcxP.js +1 -0
- package/dist/p-DMNS1d8v.js +1 -0
- package/dist/{p-iCAclJND.js → p-DNTv2BQ5.js} +1 -1
- package/dist/p-DPIK2ayL.js +1 -0
- package/dist/p-Db62Pz3n.js +1 -0
- package/dist/p-Degg_WJz.js +1 -0
- package/dist/p-DfxTsSdZ.js +1 -0
- package/dist/p-Dg2yoUxw.js +1 -0
- package/dist/p-DmLoB2Dn.js +1 -0
- package/dist/p-DoCwI_bx.js +1 -0
- package/dist/p-H1JIMJ2t.js +1 -0
- package/dist/p-JjN8U9B5.js +1 -0
- package/dist/p-UVmSPzTd.js +1 -0
- package/dist/p-UxDcM-C5.js +1 -0
- package/dist/p-V48JyMbP.js +1 -0
- package/dist/p-mZJdpfOo.js +1 -0
- package/dist/types/components/html/GidsButtonGroup/GidsButtonGroup.d.ts +2 -2
- 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/GidsActionBar/GidsActionBar.d.ts +59 -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/GidsFilter/GidsFilter.d.ts +55 -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/webComponents/GidsToggleButton/GidsToggleButton.d.ts +5 -3
- package/dist/types/components.d.ts +1585 -49
- package/dist/types/utils/childrenValidityUtils.d.ts +1 -1
- package/dist-bundled/es/gids-action-bar.js +177 -0
- 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-filter.js +6 -0
- package/dist-bundled/es/gids-icon.js +3 -29
- 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 +39 -38
- package/dist-bundled/es/gids-pie-chart.js +6 -0
- package/dist-bundled/es/gids-popover.js +10 -10
- 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 +15 -14
- package/dist-bundled/es/gids-toggle-button.js +4 -44
- package/dist-bundled/es/gids-tooltip.js +2 -2
- package/dist-bundled/es/index.js +3 -3
- package/dist-bundled/es/{p-DvoHLz_5-C5EvA91N.js → p-BQ-ZnlnH-CUVdDHzX.js} +5 -5
- package/dist-bundled/es/p-BZCJlqVe-BcSwze-q.js +71 -0
- package/dist-bundled/es/p-Bf3p-DY2-CPqEc-vc.js +672 -0
- package/dist-bundled/es/p-BpQB6ncp-C2AWddf-.js +180 -0
- package/dist-bundled/es/{p-DybsMR13-DpmsG3Q1.js → p-CHGTBObD-EN4cCwtX.js} +3 -3
- package/dist-bundled/es/p-CP1wz2PI-DhVAsHFS.js +115 -0
- package/dist-bundled/es/p-CQH7eAs3-BVowyVGn.js +88 -0
- package/dist-bundled/es/p-CW7tw1Fb-DtJ5TwCU.js +92 -0
- package/dist-bundled/es/p-CaauwQNd-D6_PbcRr.js +20 -0
- package/dist-bundled/es/p-Cn3-K5eR-tQ1EOnDF.js +243 -0
- package/dist-bundled/es/p-CoS0NuDU-CqmDcRWj.js +56 -0
- package/dist-bundled/es/{p-veoOgDXg-fRinub-C.js → p-D4Pimu_8-DfEGRQGf.js} +9 -9
- package/dist-bundled/es/p-D6lxqcxP-DWrZi1Xi.js +74 -0
- package/dist-bundled/es/p-DMNS1d8v-CHF62UXm.js +29 -0
- package/dist-bundled/es/{p-iCAclJND-Bmsvd-W1.js → p-DNTv2BQ5-Bwgd30mM.js} +6 -6
- package/dist-bundled/es/p-DPIK2ayL-DPEbctqo.js +71 -0
- package/dist-bundled/es/p-Db62Pz3n-DpQjwBYb.js +31 -0
- package/dist-bundled/es/p-Degg_WJz-BLua06el.js +55 -0
- package/dist-bundled/es/p-DfxTsSdZ-C2Afv1lS.js +67 -0
- package/dist-bundled/es/p-Dg2yoUxw-Cca8ROd_.js +25 -0
- package/dist-bundled/es/p-DmLoB2Dn-D-FSoCvI.js +44 -0
- package/dist-bundled/es/p-DoCwI_bx-BXHlZI7-.js +37 -0
- package/dist-bundled/es/p-H1JIMJ2t-DEXp7M4I.js +152 -0
- package/dist-bundled/es/p-JjN8U9B5-GeWjfJBY.js +135 -0
- package/dist-bundled/es/{p-CFw4_-5A-Dzvju3VE.js → p-UVmSPzTd-DiTxS9kW.js} +9 -9
- package/dist-bundled/es/p-UxDcM-C5-Dr5d_WpJ.js +15 -0
- package/dist-bundled/es/p-V48JyMbP-Bx-0od-Z.js +80 -0
- package/dist-bundled/es/p-mZJdpfOo-DicbKil0.js +47 -0
- package/dist-bundled/umd/gids-action-bar.umd.js +7 -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-filter.umd.js +7 -0
- 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 +164 -4
- package/dist/p-CFw4_-5A.js +0 -1
- package/dist/p-DijVkS9b.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,243 @@
|
|
|
1
|
+
import { q as d, L as u, u as p, D as a } from "./p-Bf3p-DY2-CPqEc-vc.js";
|
|
2
|
+
import { d as m } from "./p-D4Pimu_8-DfEGRQGf.js";
|
|
3
|
+
import { r as g } from "./p-BQ-ZnlnH-CUVdDHzX.js";
|
|
4
|
+
import { c as h } from "./clsx-OuTLNxxd.js";
|
|
5
|
+
const v = ({ expanded: e }, t) => h("gids-dropdown", {
|
|
6
|
+
"gids-dropdown--expanded": e
|
|
7
|
+
}, t), f = ({ size: e }, t) => h("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: b, getGidsChevronButtonControlClassNames: I } = y, l = "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
|
+
this.applySelection({ id: o, value: s, title: n.textContent?.trim() ?? "", disabled: !1, originalEvent: t, isPlaceholderItem: !(!r || r !== "true") });
|
|
34
|
+
}, this.handleFilterInput = (t) => {
|
|
35
|
+
const i = t.target;
|
|
36
|
+
this.filterValue = i?.value ?? "", this.isFilterEditing = !0, this.clearActive(), this.expanded || this.setExpandedState(!0, t), this.applyFilter();
|
|
37
|
+
}, this.handleInputKeyDown = (t) => {
|
|
38
|
+
if (!this.isInteractive()) return;
|
|
39
|
+
const i = t.key, n = i === "ArrowDown";
|
|
40
|
+
if ((n || i === "ArrowUp") && !t.metaKey && !t.ctrlKey) return t.preventDefault(), this.expanded || this.setExpandedState(!0, t), void this.moveActive(n ? 1 : -1);
|
|
41
|
+
if (i === "Home" && this.expanded) return t.preventDefault(), void this.setActiveByIndex(0);
|
|
42
|
+
if (i === "End" && this.expanded) return t.preventDefault(), void this.setActiveByIndex(this.getVisibleEnabledItems().length - 1);
|
|
43
|
+
if (i === "Enter") {
|
|
44
|
+
if (!this.expanded) return t.preventDefault(), this.setExpandedState(!0, t), void this.setActiveByIndex(0);
|
|
45
|
+
this.selectActive() && t.preventDefault();
|
|
46
|
+
}
|
|
47
|
+
}, this.handleTriggerToggle = (t) => {
|
|
48
|
+
this.isInteractive() && this.setExpandedState(!this.expanded, t);
|
|
49
|
+
}, this.handleInputFocusAndBlur = (t) => {
|
|
50
|
+
this.hostElement.dispatchEvent(new FocusEvent(t.type, { relatedTarget: t.relatedTarget }));
|
|
51
|
+
}, this.handleInputClickToggle = (t) => {
|
|
52
|
+
t.defaultPrevented || this.handleTriggerToggle(t);
|
|
53
|
+
}, this.handleChevronClickToggle = (t) => {
|
|
54
|
+
t.defaultPrevented || (t.stopPropagation(), this.handleTriggerToggle(t));
|
|
55
|
+
}, this.handleDocumentPointerDown = (t) => {
|
|
56
|
+
t.button !== 2 && this.expanded && ((typeof t.composedPath == "function" ? t.composedPath() : []).includes(this.hostElement) || this.hostElement.contains(t.target) || this.setExpandedState(!1, t));
|
|
57
|
+
}, this.handleDocumentKeyDown = (t) => {
|
|
58
|
+
if (!this.expanded) return;
|
|
59
|
+
const i = t.key;
|
|
60
|
+
if (i === "Escape" || i === "Esc") return t.preventDefault(), void this.setExpandedState(!1, t);
|
|
61
|
+
i === "Tab" && this.setExpandedState(!1, t);
|
|
62
|
+
}, this.handleFormReset = () => {
|
|
63
|
+
this.value = this.initialValue, this.selectedItemTitle = void 0, this.isFilterEditing = !1, this.filterValue = "", this.setExpandedState(!1);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
handleExpandedChange(e) {
|
|
67
|
+
e && !this.isInteractive() && (this.expanded = !1);
|
|
68
|
+
}
|
|
69
|
+
handleInteractivityChange() {
|
|
70
|
+
!this.isInteractive() && this.expanded && this.setExpandedState(!1);
|
|
71
|
+
}
|
|
72
|
+
connectedCallback() {
|
|
73
|
+
this.initialValue = this.value, this.attachItemListener(), this.attachDocumentListeners(), this.attachFormListener();
|
|
74
|
+
}
|
|
75
|
+
disconnectedCallback() {
|
|
76
|
+
this.detachItemListener(), this.detachDocumentListeners(), this.detachFormListener();
|
|
77
|
+
}
|
|
78
|
+
componentWillLoad() {
|
|
79
|
+
this.checkSlots();
|
|
80
|
+
}
|
|
81
|
+
componentWillUpdate() {
|
|
82
|
+
this.checkSlots();
|
|
83
|
+
}
|
|
84
|
+
checkSlots() {
|
|
85
|
+
this.hasLeadingIcon = !!this.hostElement.querySelector('[slot="leadingIconDropdown"]'), this.hasLeadingAccessory = !!this.hostElement.querySelector('[slot="leadingAccessoryDropdown"]');
|
|
86
|
+
}
|
|
87
|
+
getItemElements() {
|
|
88
|
+
return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"));
|
|
89
|
+
}
|
|
90
|
+
getVisibleEnabledItems() {
|
|
91
|
+
return this.getItemElements().filter(((e) => e.style.display !== "none" && !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true"));
|
|
92
|
+
}
|
|
93
|
+
attachItemListener() {
|
|
94
|
+
this.hasItemListener || (this.hostElement.addEventListener("onPressDropdownItem", this.handleDropdownItemSelect), this.hasItemListener = !0);
|
|
95
|
+
}
|
|
96
|
+
detachItemListener() {
|
|
97
|
+
this.hasItemListener && (this.hostElement.removeEventListener("onPressDropdownItem", this.handleDropdownItemSelect), this.hasItemListener = !1);
|
|
98
|
+
}
|
|
99
|
+
applySelection(e) {
|
|
100
|
+
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 }));
|
|
101
|
+
}
|
|
102
|
+
getInputControl() {
|
|
103
|
+
return this.hostElement.querySelector(".gids-input__control");
|
|
104
|
+
}
|
|
105
|
+
emitNativeSelectionEvents(e) {
|
|
106
|
+
const t = this.getInputControl();
|
|
107
|
+
t && (t.value = e, t.dispatchEvent(new Event("input", { bubbles: !0, composed: !0 })), t.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })));
|
|
108
|
+
}
|
|
109
|
+
clearActive() {
|
|
110
|
+
this.activeIndex = -1, this.getItemElements().forEach(((e) => e.classList.remove(l))), this.setActiveDescendant(void 0);
|
|
111
|
+
}
|
|
112
|
+
setActiveByIndex(e) {
|
|
113
|
+
const t = this.getVisibleEnabledItems();
|
|
114
|
+
if (this.getItemElements().forEach(((s) => s.classList.remove(l))), t.length === 0) return this.activeIndex = -1, void this.setActiveDescendant(void 0);
|
|
115
|
+
const i = Math.max(0, Math.min(e, t.length - 1)), n = t[i];
|
|
116
|
+
if (!n) return this.activeIndex = -1, void this.setActiveDescendant(void 0);
|
|
117
|
+
this.activeIndex = i, n.classList.add(l), n.scrollIntoView({ block: "nearest" }), this.setActiveDescendant(n.id || void 0);
|
|
118
|
+
}
|
|
119
|
+
moveActive(e) {
|
|
120
|
+
const t = this.getVisibleEnabledItems();
|
|
121
|
+
t.length !== 0 ? this.setActiveByIndex(this.activeIndex === -1 ? e > 0 ? 0 : t.length - 1 : (this.activeIndex + e + t.length) % t.length) : this.clearActive();
|
|
122
|
+
}
|
|
123
|
+
selectActive() {
|
|
124
|
+
const e = this.getVisibleEnabledItems();
|
|
125
|
+
if (e.length === 0) return !1;
|
|
126
|
+
const t = this.activeIndex >= 0 ? e[this.activeIndex] : e[0];
|
|
127
|
+
return !!t && (t.click(), this.getInputControl()?.focus(), !0);
|
|
128
|
+
}
|
|
129
|
+
applyFilter() {
|
|
130
|
+
const e = this.filterValue.trim().toLowerCase();
|
|
131
|
+
this.getItemElements().forEach(((t) => {
|
|
132
|
+
const i = (t.textContent ?? "").toLowerCase(), n = e.length === 0 || i.includes(e);
|
|
133
|
+
t.style.display = n ? "" : "none";
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
setActiveDescendant(e) {
|
|
137
|
+
const t = this.getInputControl();
|
|
138
|
+
t && (e ? t.setAttribute("aria-activedescendant", e) : t.removeAttribute("aria-activedescendant"));
|
|
139
|
+
}
|
|
140
|
+
setExpandedState(e, t) {
|
|
141
|
+
const i = !!e;
|
|
142
|
+
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 } })));
|
|
143
|
+
}
|
|
144
|
+
syncInputDisplayValue() {
|
|
145
|
+
const e = this.getInputControl();
|
|
146
|
+
e && e.value !== (this.selectedItemTitle ?? "") && (e.value = this.selectedItemTitle ?? "");
|
|
147
|
+
}
|
|
148
|
+
attachDocumentListeners() {
|
|
149
|
+
this.hasDocumentListeners || typeof document > "u" || (document.addEventListener("pointerdown", this.handleDocumentPointerDown), document.addEventListener("keydown", this.handleDocumentKeyDown), this.hasDocumentListeners = !0);
|
|
150
|
+
}
|
|
151
|
+
detachDocumentListeners() {
|
|
152
|
+
this.hasDocumentListeners && typeof document < "u" && (document.removeEventListener("pointerdown", this.handleDocumentPointerDown), document.removeEventListener("keydown", this.handleDocumentKeyDown), this.hasDocumentListeners = !1);
|
|
153
|
+
}
|
|
154
|
+
attachFormListener() {
|
|
155
|
+
const e = this.hostElement.closest("form");
|
|
156
|
+
this.patternForm !== e && (this.patternForm && this.patternForm.removeEventListener("reset", this.handleFormReset), this.patternForm = e ?? void 0, this.patternForm?.addEventListener("reset", this.handleFormReset));
|
|
157
|
+
}
|
|
158
|
+
detachFormListener() {
|
|
159
|
+
this.patternForm && (this.patternForm.removeEventListener("reset", this.handleFormReset), this.patternForm = void 0);
|
|
160
|
+
}
|
|
161
|
+
get form() {
|
|
162
|
+
return this.getInputControl()?.form ?? this.patternForm ?? null;
|
|
163
|
+
}
|
|
164
|
+
get validity() {
|
|
165
|
+
return this.getInputControl()?.validity ?? {};
|
|
166
|
+
}
|
|
167
|
+
get validationMessage() {
|
|
168
|
+
return this.getInputControl()?.validationMessage ?? "";
|
|
169
|
+
}
|
|
170
|
+
get willValidate() {
|
|
171
|
+
return this.getInputControl()?.willValidate ?? !1;
|
|
172
|
+
}
|
|
173
|
+
async checkValidity() {
|
|
174
|
+
return this.getInputControl()?.checkValidity() ?? !0;
|
|
175
|
+
}
|
|
176
|
+
async reportValidity() {
|
|
177
|
+
return this.getInputControl()?.reportValidity() ?? !0;
|
|
178
|
+
}
|
|
179
|
+
async setCustomValidity(e) {
|
|
180
|
+
return this.getInputControl()?.setCustomValidity(e);
|
|
181
|
+
}
|
|
182
|
+
isInteractive() {
|
|
183
|
+
return !(this.disabled || this.readOnly);
|
|
184
|
+
}
|
|
185
|
+
coerceEvent(e) {
|
|
186
|
+
if (typeof Event < "u" && e !== null) return e instanceof Event ? e : void 0;
|
|
187
|
+
}
|
|
188
|
+
scheduleControlRevalidation() {
|
|
189
|
+
if (this.hasPendingControlRevalidation) return;
|
|
190
|
+
this.hasPendingControlRevalidation = !0;
|
|
191
|
+
const e = () => {
|
|
192
|
+
this.hasPendingControlRevalidation = !1, this.checkValidity();
|
|
193
|
+
};
|
|
194
|
+
typeof requestAnimationFrame != "function" ? e() : requestAnimationFrame(e);
|
|
195
|
+
}
|
|
196
|
+
getEnhancedInputProps() {
|
|
197
|
+
const e = { ...this.inputProps ?? {} };
|
|
198
|
+
typeof e.autoComplete == "string" && e?.autoComplete?.trim?.()?.length !== 0 || (e.autoComplete = "off");
|
|
199
|
+
const t = e.onInput;
|
|
200
|
+
e.onInput = (s) => {
|
|
201
|
+
t?.(s), this.handleFilterInput(s);
|
|
202
|
+
};
|
|
203
|
+
const i = e.onBlur;
|
|
204
|
+
e.onBlur = (s) => {
|
|
205
|
+
i?.(s), this.scheduleControlRevalidation();
|
|
206
|
+
};
|
|
207
|
+
const n = e.onKeyDown;
|
|
208
|
+
return e.onKeyDown = (s) => {
|
|
209
|
+
n?.(s), s.defaultPrevented || this.handleInputKeyDown(s);
|
|
210
|
+
}, e;
|
|
211
|
+
}
|
|
212
|
+
render() {
|
|
213
|
+
const e = this.expanded && this.isInteractive(), t = b({ expanded: e }), i = this.getEnhancedInputProps(), n = typeof i.id == "string" ? i.id : void 0, s = n ? `${n}__menu` : void 0;
|
|
214
|
+
i.role = "combobox", i["aria-expanded"] = e ? "true" : "false", i["aria-haspopup"] = "listbox", i["aria-autocomplete"] = "list", s && (i["aria-controls"] = s);
|
|
215
|
+
const o = this.isFilterEditing ? this.filterValue : this.selectedItemTitle ?? this.value ?? "", r = e ? "true" : "false", c = a("button", { key: "7308fb3cd3804b1945e023107018d16bafd166b3", class: I({ 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: "39816bde9d3e2e43f3f0b19bd6abda300e1362c4", class: "gids-button__content" }, a(m, { key: "95d25d7a9f0b9e0ee2f7dcd9bad178580198184b", name: "chevron-vertical", alt: "" })));
|
|
216
|
+
return a("div", { key: "c86f983fe0481939441ef4750ac3af7f41ba1334", class: t }, a("gids-input", { key: "00f171ce20bd3dca41c799993259e19c86ad9df5", 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: "fbeb48c6376fb0d35f989bbc97bb7b186a237029", name: "leadingIconDropdown", slot: "leadingIcon" }), this.hasLeadingAccessory && a("slot", { key: "32bd6bea5335946f1e78efe067be89dead314ea9", name: "leadingAccessoryDropdown", slot: "leadingAccessory" }), c), a("div", { key: "0ea93131baf32b00593992131a4eb866a87af1bf", class: "gids-dropdown__menu", id: s, role: "listbox", onClick: this.handleMenuClick }, a("slot", { key: "d2b232c3a364e9e467340b45f4ad08e9b5431cf7" })));
|
|
217
|
+
}
|
|
218
|
+
get hostElement() {
|
|
219
|
+
return this;
|
|
220
|
+
}
|
|
221
|
+
static get watchers() {
|
|
222
|
+
return { expanded: [{ handleExpandedChange: 0 }], disabled: [{ handleInteractivityChange: 0 }], readOnly: [{ handleInteractivityChange: 0 }] };
|
|
223
|
+
}
|
|
224
|
+
static get style() {
|
|
225
|
+
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}';
|
|
226
|
+
}
|
|
227
|
+
}, [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 }] }]);
|
|
228
|
+
function x() {
|
|
229
|
+
typeof customElements < "u" && ["gids-dropdown", "gids-input"].forEach(((e) => {
|
|
230
|
+
switch (e) {
|
|
231
|
+
case "gids-dropdown":
|
|
232
|
+
customElements.get(d(e)) || customElements.define(d(e), E);
|
|
233
|
+
break;
|
|
234
|
+
case "gids-input":
|
|
235
|
+
customElements.get(d(e)) || g();
|
|
236
|
+
}
|
|
237
|
+
}));
|
|
238
|
+
}
|
|
239
|
+
x();
|
|
240
|
+
export {
|
|
241
|
+
x as c,
|
|
242
|
+
E as l
|
|
243
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { q as c, L as _, u as y, D as e } from "./p-Bf3p-DY2-CPqEc-vc.js";
|
|
2
|
+
import { r as m, e as f, d as v, H as x, F as b } from "./p-CaauwQNd-D6_PbcRr.js";
|
|
3
|
+
import { p as u } from "./p-DMNS1d8v-CHF62UXm.js";
|
|
4
|
+
import { c as w } from "./clsx-OuTLNxxd.js";
|
|
5
|
+
const z = ({ breakpoint: s }, t) => w("gids-progress-circle", {
|
|
6
|
+
"gids-progress-circle--breakpoint-mobile": s === "mobile"
|
|
7
|
+
}, t), k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8
|
+
__proto__: null,
|
|
9
|
+
getGidsProgressCircleClassNames: z
|
|
10
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsProgressCircleClassNames: L } = k, C = _(class extends y {
|
|
11
|
+
constructor(s) {
|
|
12
|
+
super(), s !== !1 && this.__registerHost(), this.breakpoint = "desktop", this.value = 0, this.shape = "circle", this.label = "", this.size = "xs", this.chartLoaderSize = "lg", this.chartLoading = !1, this.width = 0, this.height = 0;
|
|
13
|
+
}
|
|
14
|
+
valueChanged() {
|
|
15
|
+
this.updateDimensions();
|
|
16
|
+
}
|
|
17
|
+
componentDidLoad() {
|
|
18
|
+
this.updateDimensions(), this.resizeObserver = new ResizeObserver((() => this.updateDimensions())), this.hostElement.parentElement && this.resizeObserver.observe(this.hostElement.parentElement);
|
|
19
|
+
}
|
|
20
|
+
disconnectedCallback() {
|
|
21
|
+
this.resizeObserver && this.resizeObserver.disconnect();
|
|
22
|
+
}
|
|
23
|
+
updateDimensions() {
|
|
24
|
+
const s = this.hostElement.getBoundingClientRect();
|
|
25
|
+
this.width = s.width, this.height = s.height > 0 ? s.height : 240;
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
if (this.chartLoading) return e("div", { class: "gids-progress-circle__no-data" }, e(u, { label: this.chartLoadingTitle, supportingText: this.chartLoadingSupportingText, size: this?.chartLoaderSize ?? "lg" }));
|
|
29
|
+
const s = this.shape === "half-circle" ? x : b;
|
|
30
|
+
if (!(typeof this.value == "number" && !isNaN(this.value) && this.value <= s && this.value >= 0)) return e("div", { class: "gids-progress-circle__no-data" }, e(m, { title: f, supportingText: v(s) }));
|
|
31
|
+
const t = this.value / s, h = `${this.value}%`, d = L({ breakpoint: this.breakpoint }), l = this.shape === "half-circle";
|
|
32
|
+
let i = 2 * Math.PI * 40, r = t * i, a = 0, g = "0 0 100 100", o = "rotate(-90 50 50)";
|
|
33
|
+
l && (i = 40 * Math.PI, r = t * i, a = 0, g = "0 0 100 50", o = "");
|
|
34
|
+
const p = this.size === "xxs", n = typeof this.label == "string" && this.label.trim() !== "";
|
|
35
|
+
return e("div", { class: d }, e("div", { class: "gids-progress-circle__main-container" }, e("div", { class: `gids-progress-circle__svg-wrapper gids-progress-circle__svg-wrapper--shape-${this.shape}--size-${this.size}` }, e("svg", { viewBox: g, class: "gids-progress-circle__chart-vector" }, l ? e("g", null, e("path", { d: "M 10,50 A 40,40 0 0,1 90,50", fill: "none", class: "gids-progress-circle__track-background" }), e("path", { d: "M 10,50 A 40,40 0 0,1 90,50", fill: "none", class: "gids-progress-circle__segment", "stroke-dasharray": `${r} ${i}`, "stroke-dashoffset": a })) : e("g", null, e("circle", { cx: "50", cy: "50", r: 40, class: "gids-progress-circle__track-background" }), e("circle", { cx: "50", cy: "50", r: 40, class: "gids-progress-circle__segment", "stroke-dasharray": `${r} ${i}`, "stroke-dashoffset": a, transform: o }))), e("div", { class: `gids-progress-circle__center-content gids-progress-circle__shape-${this.shape}` }, n && !p ? e("span", { class: `gids-progress-circle__label-common gids-progress-circle__label-${this.size}` }, this.label) : null, e("span", { class: `gids-progress-circle__percentage-common gids-progress-circle__percentage-${this.size}` }, h))), p && n ? e("div", { class: "gids-progress-circle__bottom-content" }, e("span", { class: `gids-progress-circle__label-common gids-progress-circle__label-${this.size}` }, this.label)) : null));
|
|
36
|
+
}
|
|
37
|
+
get hostElement() {
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
static get watchers() {
|
|
41
|
+
return { value: [{ valueChanged: 0 }], shape: [{ valueChanged: 0 }] };
|
|
42
|
+
}
|
|
43
|
+
static get style() {
|
|
44
|
+
return ":host{display:block;box-sizing:border-box}.gids-progress-circle{display:block;box-sizing:border-box}.gids-progress-circle--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-progress-circle__main-container{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%}.gids-progress-circle{}.gids-progress-circle__svg-wrapper{position:relative;display:block;flex-shrink:0;}.gids-progress-circle__svg-wrapper--shape-circle--size-xxs{width:180px;height:180px}.gids-progress-circle__svg-wrapper--shape-circle--size-xs{width:220px;height:220px}.gids-progress-circle__svg-wrapper--shape-circle--size-sm{width:260px;height:260px}.gids-progress-circle__svg-wrapper--shape-circle--size-md{width:300px;height:300px}.gids-progress-circle__svg-wrapper--shape-circle--size-lg{width:340px;height:340px}.gids-progress-circle__svg-wrapper{}.gids-progress-circle__svg-wrapper--shape-half-circle--size-xxs{width:180px;height:144px}.gids-progress-circle__svg-wrapper--shape-half-circle--size-xs{width:220px;height:130px}.gids-progress-circle__svg-wrapper--shape-half-circle--size-sm{width:260px;height:152px}.gids-progress-circle__svg-wrapper--shape-half-circle--size-md{width:300px;height:174px}.gids-progress-circle__svg-wrapper--shape-half-circle--size-lg{width:340px;height:194px}.gids-progress-circle__chart-vector{display:block;width:100%;height:100%}.gids-progress-circle{}.gids-progress-circle__track-background{fill:none;stroke:var(--gids-color-background-neutral-default);stroke-width:6;stroke-linecap:round}.gids-progress-circle{}.gids-progress-circle__segment{fill:none;stroke:var(--gids-color-text-brand);stroke-width:6;stroke-linecap:round;transition:stroke-dasharray 0.4s ease-out, stroke-dashoffset 0.4s ease-out}.gids-progress-circle{}.gids-progress-circle__center-content{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none}.gids-progress-circle__shape-half-circle{justify-content:flex-end;align-items:center;bottom:var(--gids-padding-vertical-edge-to-element-300)}.gids-progress-circle__label-xxs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-progress-circle__label-xs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-progress-circle__label-sm{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-progress-circle__label-md{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)}.gids-progress-circle__label-lg{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)}.gids-progress-circle__label-common{color:var(--gids-color-text-subtlest)}.gids-progress-circle__percentage-xxs{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)}.gids-progress-circle__percentage-xs{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-progress-circle__percentage-sm{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-progress-circle__percentage-md{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-progress-circle__percentage-lg{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-progress-circle__percentage-common{color:var(--gids-color-text-default)}.gids-progress-circle{}.gids-progress-circle__bottom-content{display:flex;justify-content:center;text-align:center}.gids-progress-circle__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}";
|
|
45
|
+
}
|
|
46
|
+
}, [0, "gids-progress-circle", { breakpoint: [1], value: [2], shape: [1], label: [1], size: [1], chartLoaderSize: [1, "chart-loader-size"], chartLoading: [4, "chart-loading"], chartLoadingTitle: [1, "chart-loading-title"], chartLoadingSupportingText: [1, "chart-loading-supporting-text"], width: [32], height: [32] }, void 0, { value: [{ valueChanged: 0 }], shape: [{ valueChanged: 0 }] }]);
|
|
47
|
+
function E() {
|
|
48
|
+
typeof customElements < "u" && ["gids-progress-circle"].forEach(((s) => {
|
|
49
|
+
s === "gids-progress-circle" && (customElements.get(c(s)) || customElements.define(c(s), C));
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
E();
|
|
53
|
+
export {
|
|
54
|
+
E as d,
|
|
55
|
+
C as h
|
|
56
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as s } from "./p-Bf3p-DY2-CPqEc-vc.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,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { D as t, F as w } from "./p-Bf3p-DY2-CPqEc-vc.js";
|
|
2
|
+
import { p as O } from "./p-DMNS1d8v-CHF62UXm.js";
|
|
3
|
+
import { d as C } from "./p-D4Pimu_8-DfEGRQGf.js";
|
|
4
|
+
import { c as a } from "./clsx-OuTLNxxd.js";
|
|
5
|
+
const T = ({ orientation: e }, i) => a("gids-divider", {
|
|
6
|
+
"gids-divider--vertical": e === "vertical"
|
|
7
|
+
}, i), z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8
|
+
__proto__: null,
|
|
9
|
+
getGidsDividerClassNames: T
|
|
10
|
+
}, Symbol.toStringTag, { value: "Module" })), M = ({ layout: e }, i) => a("gids-button-group", {
|
|
11
|
+
"gids-button-group--scroll": e === "scroll"
|
|
12
|
+
}, i), D = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13
|
+
__proto__: null,
|
|
14
|
+
getGidsButtonGroupClassNames: M
|
|
15
|
+
}, Symbol.toStringTag, { value: "Module" })), B = (e) => a("gids-heading", e), E = (e) => e && e.toString() !== "" && e !== "(none)" ? `gids-typography-${e}` : "", A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
16
|
+
__proto__: null,
|
|
17
|
+
getGidsHeadingClassNames: B,
|
|
18
|
+
getGidsHeadingSupportingTextTypographyClass: E
|
|
19
|
+
}, Symbol.toStringTag, { value: "Module" })), L = ({ size: e }, i) => a("gids-edit-button", {
|
|
20
|
+
"gids-edit-button--xs": e === "xs",
|
|
21
|
+
"gids-edit-button--sm": e === "sm",
|
|
22
|
+
// 'gids-button--md': size === 'md',
|
|
23
|
+
"gids-edit-button--lg": e === "lg"
|
|
24
|
+
}, i), $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
25
|
+
__proto__: null,
|
|
26
|
+
getGidsEditButtonClassNames: L
|
|
27
|
+
}, Symbol.toStringTag, { value: "Module" })), k = ({ disabled: e, selected: i }, n) => a("gids-list-item", {
|
|
28
|
+
// selected
|
|
29
|
+
"gids-list-item--selected": i,
|
|
30
|
+
// Disable
|
|
31
|
+
"gids-list-item--disabled": e
|
|
32
|
+
}, n), H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
33
|
+
__proto__: null,
|
|
34
|
+
getGidsListItemClassNames: k
|
|
35
|
+
}, Symbol.toStringTag, { value: "Module" })), F = (e) => a("gids-dropdown-item", e), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
36
|
+
__proto__: null,
|
|
37
|
+
getGidsDropdownItemClassNames: F
|
|
38
|
+
}, Symbol.toStringTag, { value: "Module" })), J = (e) => a("gids-dropdown-menu", e), K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
39
|
+
__proto__: null,
|
|
40
|
+
getGidsDropdownMenuClassNames: J
|
|
41
|
+
}, Symbol.toStringTag, { value: "Module" })), Q = ({ type: e }, i) => a("gids-dropdown-menu-group", {
|
|
42
|
+
"gids-dropdown-menu-group--default": e === "default",
|
|
43
|
+
// by default so no need to have this class
|
|
44
|
+
"gids-dropdown-menu-group--no-options": e === "no-options",
|
|
45
|
+
"gids-dropdown-menu-group--loading": e === "loading"
|
|
46
|
+
}, i), R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
47
|
+
__proto__: null,
|
|
48
|
+
getGidsDropdownMenuGroupClassNames: Q
|
|
49
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsButtonGroupClassNames: U } = D, V = ({ layout: e, class: i }, n) => t("span", { class: U({ layout: e }, i) }, n), { getGidsDropdownMenuGroupClassNames: W } = R, ue = ({ type: e = "no-options", supportingText: i = "No options", class: n, ...l }, s) => t("div", { class: W({ type: e }, n), ...l }, e === "loading" ? t(O, { indeterminate: !0, size: "md" }) : null, e === "no-options" ? t("span", null, i) : null, e === "default" && s != null ? s : null), { getGidsHeadingClassNames: X, getGidsHeadingSupportingTextTypographyClass: Y } = A, Z = ({ heading: e, supportingText: i, level: n = "section", children: l, supportingTextTypography: s, class: r }) => t("div", { class: X(r) }, t("div", { class: "gids-heading__content-container" }, e != null && e !== "" ? typeof e == "string" ? e !== "" ? t("span", { class: n === "section" ? "gids-heading__heading-text-section" : "gids-heading__heading-text-group" }, e) : null : e : null, i != null && i !== "" ? typeof i == "string" ? i !== "" ? t("span", { class: `${n === "section" ? "gids-heading__supporting-text-section" : "gids-heading__supporting-text-group"} ${Y(s)}` }, i) : null : i : null), l ? t(V, { layout: "wrap" }, l) : null), { getGidsDropdownMenuClassNames: ee } = K, pe = ({ sectionLabel: e, class: i, ...n }, l) => t("div", { class: ee(i), ...n }, e != null && e !== "" ? t(Z, { supportingText: e, supportingTextTypography: "eyebrow-medium" }) : null, l != null ? t("div", { class: "gids-dropdown-menu__children" }, l) : null), { getGidsEditButtonClassNames: te } = $, ie = ({ disabled: e, children: i, size: n = "md", editButtonType: l = "add", onPressEditButton: s, class: r, ...o }) => t("button", { class: te({ size: n }, r), ...o, onClick: s, disabled: e }, l === "custom" && i ? t("div", null, i) : l === "add" ? t("div", { class: e ? "gids-edit-button__add gids-edit-button__disabled" : "gids-edit-button__add" }, t(C, { name: "add", appearance: "filled", size: n })) : l === "remove" ? t("div", { class: e ? "gids-edit-button__remove gids-edit-button__disabled" : "gids-edit-button__remove" }, t(C, { appearance: "filled", name: "remove", size: n })) : void 0), { getGidsDividerClassNames: se } = z, ne = ({ orientation: e }) => t("hr", { class: se({ orientation: e }) }), { getGidsListItemClassNames: le } = H, de = ({ id: e, value: i, index: n, defaultSelected: l, disabled: s, selected: r, editButton: o, onPressEditButton: v, onPressListItem: x, leadingAccessory: b, leadingSupport: g, leadingParagraph: u, trailingContent: p, trailingAccessory: f, trailingSupport: m, trailingParagraph: _, divider: h, role: S = "list-item-option", isPlaceholderItem: G, class: N, ...j }, P) => {
|
|
50
|
+
const y = r || l;
|
|
51
|
+
return t("button", { type: "button", id: e, class: le({ selected: y, disabled: s }, N), role: S, "aria-selected": y ? "true" : "false", disabled: s, value: (() => {
|
|
52
|
+
if (typeof i == "string" && i.trim() !== "") return i;
|
|
53
|
+
const c = P;
|
|
54
|
+
return c ? (Array.isArray(c) ? c : [c]).map(((d) => typeof d == "string" || typeof d == "number" ? String(d) : d && typeof d == "object" && "text" in d ? d.text ?? "" : "")).join("").trim() : "";
|
|
55
|
+
})(), tabIndex: n, onClick: (c) => {
|
|
56
|
+
const d = c.currentTarget;
|
|
57
|
+
if (!d || c.defaultPrevented || d.disabled) return;
|
|
58
|
+
const I = new CustomEvent("onPressListItem", { bubbles: !0, composed: !0, detail: { selectedIndex: n, defaultSelected: l, isPlaceholderItem: G } });
|
|
59
|
+
x?.(I);
|
|
60
|
+
}, "is-placeholder-item": G ? "true" : "false", ...j }, t("div", { class: "gids-list-item__main-container" }, o == null || o === "none" || s ? null : t(ie, { size: "md", editButtonType: o, onPressEditButton: v }), b != null ? t("div", { class: s ? "gids-list-item__leading-accessory-container gids-list-item__accessory-content-disabled" : "gids-list-item__leading-accessory-container" }, b) : null, t("div", { class: "gids-list-item__middle-content-container" }, t("div", { class: "gids-list-item__leading-content-container" }, t(w, null, P != null ? t("span", { class: s ? "gids-list-item__leading-content-label gids-list-item__text-content-disabled" : "gids-list-item__leading-content-label" }, P) : null, t("div", { class: "gids-list-item__leading-support-content" }, g != null ? typeof g == "string" ? t("p", { class: s ? "gids-list-item__leading-content-supporting-text gids-list-item__text-content-disabled" : "gids-list-item__leading-content-supporting-text" }, g) : g : null, u != null ? typeof u == "string" ? t("p", { class: s ? "gids-list-item__leading-content-paragraph-text gids-list-item__text-content-disabled" : "gids-list-item__leading-content-paragraph-text" }, u) : u : null))), t("div", { class: "gids-list-item__trailing-content-container" }, t(w, null, p != null ? typeof p == "string" ? t("span", { class: s ? "gids-list-item__trailing-content-label gids-list-item__text-content-disabled" : "gids-list-item__trailing-content-label" }, p) : p : null, t("div", { class: "gids-list-item__trailing-support-content" }, m != null ? typeof m == "string" ? t("p", { class: s ? "gids-list-item__trailing-content-supporting-text gids-list-item__text-content-disabled" : "gids-list-item__trailing-content-supporting-text" }, m) : m : null, _ != null ? typeof _ == "string" ? t("p", { class: s ? "gids-list-item__trailing-content-paragraph-text gids-list-item__text-content-disabled" : "gids-list-item__trailing-content-paragraph-text" }, _) : _ : null)))), y ? t("div", { class: s ? "gids-list-item__trailing-accessory-container gids-list-item__accessory-content-disabled" : "gids-list-item__trailing-accessory-container" }, t(C, { name: "checkmark", size: "md", appearance: "regular" })) : null, y || f == null ? null : t("div", { class: s ? "gids-list-item__trailing-accessory-container gids-list-item__accessory-content-disabled" : "gids-list-item__trailing-accessory-container" }, f)), h && !y ? t("div", { class: "gids-list-item__divider" }, t(ne, { orientation: "horizontal" })) : null);
|
|
61
|
+
}, { getGidsDropdownItemClassNames: oe } = q, me = ({ id: e, title: i, class: n, selected: l = !1, disabled: s = !1, role: r = "list-item-option", value: o, name: v, onPressDropdownItem: x, index: b, defaultSelected: g, leadingAccessory: u, divider: p, isPlaceholderItem: f, ...m }) => {
|
|
62
|
+
const _ = oe(typeof n == "string" ? n : void 0);
|
|
63
|
+
return t(de, { id: e, index: b ?? 0, defaultSelected: g, selected: l, disabled: s, role: r, value: o, name: v, leadingAccessory: u, class: _, onPressListItem: (h) => {
|
|
64
|
+
if (h.defaultPrevented) return;
|
|
65
|
+
const S = new CustomEvent("onPressDropdownItem", { bubbles: !0, composed: !0, detail: { id: e, title: i, value: o, disabled: s, selectedIndex: b, defaultSelected: g, isPlaceholderItem: f } });
|
|
66
|
+
x?.(S);
|
|
67
|
+
}, divider: p, isPlaceholderItem: f, ...m }, i);
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
me as N,
|
|
71
|
+
ue as m,
|
|
72
|
+
V as p,
|
|
73
|
+
pe as x
|
|
74
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { D as n } from "./p-Bf3p-DY2-CPqEc-vc.js";
|
|
2
|
+
import { l as m } from "./p-CHGTBObD-EN4cCwtX.js";
|
|
3
|
+
import { c } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
const d = ({ size: e }, t) => c("gids-spinner", {
|
|
5
|
+
"gids-spinner--xs": e === "xs",
|
|
6
|
+
"gids-spinner--sm": e === "sm",
|
|
7
|
+
// 'gids-spinner--md': size === 'md',
|
|
8
|
+
"gids-spinner--lg": e === "lg",
|
|
9
|
+
"gids-spinner--xl": e === "xl",
|
|
10
|
+
"gids-spinner--2xl": e === "2xl"
|
|
11
|
+
}, t), u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12
|
+
__proto__: null,
|
|
13
|
+
getGidsSpinnerClassNames: d
|
|
14
|
+
}, Symbol.toStringTag, { value: "Module" })), x = (e) => {
|
|
15
|
+
const { label: t, supportingText: s } = e, i = typeof t == "string" && t.trim().length > 0, r = typeof s == "string" && s.trim().length > 0;
|
|
16
|
+
return {
|
|
17
|
+
hasLabel: i,
|
|
18
|
+
hasSupportingText: r
|
|
19
|
+
};
|
|
20
|
+
}, b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
21
|
+
__proto__: null,
|
|
22
|
+
getElementVisibility: x
|
|
23
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsSpinnerClassNames: _ } = u, { getElementVisibility: f } = b, h = ({ label: e, supportingText: t, size: s, indeterminate: i, value: r, max: l, class: o, ...p }) => {
|
|
24
|
+
const { hasLabel: a, hasSupportingText: g } = f({ label: e, supportingText: t });
|
|
25
|
+
return n("span", { class: _({ size: s }, o), ...p }, n(m, { size: s, indeterminate: i, value: r, max: l }), a && n("span", { class: "gids-spinner__label" }, e), g && n("span", { class: "gids-spinner__supporting-text" }, t));
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
h as p
|
|
29
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as h } from "./p-
|
|
1
|
+
import { q as l, L as n, u as r, D as o, P as d } from "./p-Bf3p-DY2-CPqEc-vc.js";
|
|
2
|
+
import { d as h } from "./p-D4Pimu_8-DfEGRQGf.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({
|
|
6
6
|
__proto__: null,
|
|
7
7
|
getGidsFieldClassNames: g
|
|
8
|
-
}, Symbol.toStringTag, { value: "Module" })), { getGidsFieldClassNames:
|
|
8
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsFieldClassNames: f } = u, p = n(class extends r {
|
|
9
9
|
constructor(t) {
|
|
10
10
|
super(), t !== !1 && this.__registerHost(), this.__attachShadow(), this.status = "implicit", this._hasLabel = !1, this._controlListenerTargets = [], this._controlTouched = !1, this._handleLabelSlotChange = () => {
|
|
11
11
|
this._hasLabel = (this._labelSlot?.assignedElements()?.length ?? 0) > 0;
|
|
@@ -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: "f830ae3da5de21c80d9fd5b7161fa3f2845a82df" }, o("div", { key: "8c6c4af1b4ebe897873a49c42975a8730905cf27", class: f() }, o("div", { key: "3afa55c23b729296ff65fb03b501919dcaa420d3", class: "gids-field__header", hidden: !this._hasLabelContent() }, o("slot", { key: "6d8c9adf2b04d19a446fdd2707259d931dbc2eb9", ref: this._setLabelSlot, name: "label", onSlotchange: this._handleControlSlotChange }), o("div", { key: "46cc09d9414bb88622f95e7ccffba84b602b25f0", class: "gids-field__count", "aria-live": "polite" }, this.count)), o("div", { key: "0e6ddf85cf459c53f2cfc5f453cd4fe35e532d9b", class: "gids-field__control" }, o("slot", { key: "d2d007d50a5f7001872b368dee5d648a8751c1af", ref: this._setControlSlot, onSlotchange: this._handleControlSlotChange })), o("p", { key: "09e08e474051efd8bb9e526311cd8d3bb14f8671", 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;
|
|
@@ -171,11 +171,11 @@ const g = (t) => _("gids-field", t), u = /* @__PURE__ */ Object.freeze(/* @__PUR
|
|
|
171
171
|
}, [257, "gids-field", { disabled: [516], count: [513], helperText: [513, "helper-text"], statusText: [513, "status-text"], status: [513], _controlValidationMessage: [32], _hasLabel: [32], reScanControl: [64] }, void 0, { status: [{ _handleStatusChange: 0 }] }]);
|
|
172
172
|
function m() {
|
|
173
173
|
typeof customElements < "u" && ["gids-field"].forEach(((t) => {
|
|
174
|
-
t === "gids-field" && (customElements.get(l(t)) || customElements.define(l(t),
|
|
174
|
+
t === "gids-field" && (customElements.get(l(t)) || customElements.define(l(t), p));
|
|
175
175
|
}));
|
|
176
176
|
}
|
|
177
177
|
m();
|
|
178
178
|
export {
|
|
179
|
-
|
|
179
|
+
p as d,
|
|
180
180
|
m as h
|
|
181
181
|
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { q as a, L as _, u as m, D as t } from "./p-Bf3p-DY2-CPqEc-vc.js";
|
|
2
|
+
import { p as b } from "./p-DMNS1d8v-CHF62UXm.js";
|
|
3
|
+
import { o as u } from "./p-DoCwI_bx-BXHlZI7-.js";
|
|
4
|
+
import { d as v } from "./p-mZJdpfOo-DicbKil0.js";
|
|
5
|
+
import { c as x } from "./clsx-OuTLNxxd.js";
|
|
6
|
+
const f = ({ breakpoint: e }, r) => x("gids-pie-chart", {
|
|
7
|
+
"gids-pie-chart--breakpoint-mobile": e === "mobile"
|
|
8
|
+
}, r), k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9
|
+
__proto__: null,
|
|
10
|
+
getGidsPieChartClassNames: f
|
|
11
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsPieChartClassNames: w } = k, y = _(class extends m {
|
|
12
|
+
constructor(e) {
|
|
13
|
+
super(), e !== !1 && this.__registerHost(), this.breakpoint = "desktop", this.legendVisible = !1, this.chartData = [], this.size = "xxs", this.chartLoaderSize = "lg", this.chartLoading = !1, this.width = 0, this.height = 0;
|
|
14
|
+
}
|
|
15
|
+
chartDataChanged() {
|
|
16
|
+
this.updateDimensions();
|
|
17
|
+
}
|
|
18
|
+
legendVisibilityChanged(e) {
|
|
19
|
+
this.legendVisible = e;
|
|
20
|
+
}
|
|
21
|
+
componentDidLoad() {
|
|
22
|
+
this.updateDimensions(), this.resizeObserver = new ResizeObserver((() => this.updateDimensions())), this.hostElement.parentElement && this.resizeObserver.observe(this.hostElement.parentElement);
|
|
23
|
+
}
|
|
24
|
+
disconnectedCallback() {
|
|
25
|
+
this.resizeObserver && this.resizeObserver.disconnect();
|
|
26
|
+
}
|
|
27
|
+
updateDimensions() {
|
|
28
|
+
const e = this.hostElement.getBoundingClientRect();
|
|
29
|
+
this.width = e.width, this.height = e.height > 0 ? e.height : 240;
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
if (this.chartLoading) return t("div", { class: "gids-pie-chart__no-data" }, t(b, { label: this.chartLoadingTitle, supportingText: this.chartLoadingSupportingText, size: this?.chartLoaderSize ?? "lg" }));
|
|
33
|
+
const e = this.chartData.length, r = this.chartData.reduce(((i, s) => i + (s.value || 0)), 0);
|
|
34
|
+
let d = r;
|
|
35
|
+
e < 6 && e > 0 && (d = r + r / e * (6 - e));
|
|
36
|
+
const c = d > 0 ? d : 1, o = w({ breakpoint: this.breakpoint }), n = 2 * Math.PI * 25;
|
|
37
|
+
let h = 0;
|
|
38
|
+
return t("div", { class: o }, t("div", { class: "gids-pie-chart__main-container" }, t("div", { class: "gids-pie-chart__chart-stage-container" }, t("div", { class: `gids-pie-chart__svg-wrapper gids-pie-chart__svg-wrapper--size-${this.size}` }, t("svg", { viewBox: "0 0 100 100", class: "gids-pie-chart__chart-vector" }, t("circle", { cx: "50", cy: "50", r: 25, class: "gids-pie-chart__track-background" }), this.chartData.map(((i, s) => {
|
|
39
|
+
const g = (i.value || 0) / c, l = `${g * n} ${n}`, p = -h * n;
|
|
40
|
+
return h += g, t("circle", { key: i.label || s, cx: "50", cy: "50", r: 25, class: `gids-pie-chart__segment gids-pie-chart__segment-series-${s + 1}`, "stroke-dasharray": l, "stroke-dashoffset": p, transform: "rotate(-90 50 50)" });
|
|
41
|
+
}))))), this.legendVisible ? t("div", { class: "gids-pie-chart__legend-container" }, t("gids-chart-legend", { orientation: "vertical" }, this.chartData.map(((i, s) => t("gids-chart-legend-item", { key: i.label, seriesType: `${s + 1}`, orientation: "vertical" }, i.label))))) : null));
|
|
42
|
+
}
|
|
43
|
+
get hostElement() {
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
static get watchers() {
|
|
47
|
+
return { chartData: [{ chartDataChanged: 0 }], legendVisible: [{ legendVisibilityChanged: 0 }] };
|
|
48
|
+
}
|
|
49
|
+
static get style() {
|
|
50
|
+
return ":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-pie-chart{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box}.gids-pie-chart--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-pie-chart__main-container{display:inline-flex;justify-content:center;gap:var(--gids-gap-200);width:100%;height:100%}.gids-pie-chart__chart-stage-container{display:flex;justify-content:center;align-items:center}.gids-pie-chart{}.gids-pie-chart__svg-wrapper{position:relative;display:block;flex-shrink:0}.gids-pie-chart__svg-wrapper--size-xxs{width:180px;height:180px}.gids-pie-chart__svg-wrapper--size-xs{width:220px;height:220px}.gids-pie-chart__svg-wrapper--size-sm{width:260px;height:260px}.gids-pie-chart__svg-wrapper--size-md{width:300px;height:300px}.gids-pie-chart__svg-wrapper--size-lg{width:340px;height:340px}.gids-pie-chart__chart-vector{display:block;width:100%;height:100%}.gids-pie-chart{}.gids-pie-chart__track-background{fill:none;stroke:var(--gids-color-background-neutral-default);stroke-width:12;}.gids-pie-chart__segment{fill:none;stroke-width:12;stroke-linecap:butt;transition:stroke-dashoffset 0.3s ease;}.gids-pie-chart__segment.gids-pie-chart__segment-series-1{stroke:var(--gids-color-icon-subtle);}.gids-pie-chart__segment.gids-pie-chart__segment-series-2{stroke:var(--gids-color-icon-warning);}.gids-pie-chart__segment.gids-pie-chart__segment-series-3{stroke:var(--gids-color-icon-danger);}.gids-pie-chart__segment.gids-pie-chart__segment-series-4{stroke:var(--gids-color-background-positive-bold-hovered);}.gids-pie-chart__segment.gids-pie-chart__segment-series-5{stroke:var(--gids-color-background-information-bold-default);}.gids-pie-chart__segment.gids-pie-chart__segment-series-6{stroke:rgb(238, 70, 188);}.gids-pie-chart__legend-container{display:inline-flex;align-items:flex-start}.gids-pie-chart__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}";
|
|
51
|
+
}
|
|
52
|
+
}, [0, "gids-pie-chart", { breakpoint: [1], legendVisible: [4, "legend-visible"], chartData: [16], size: [1], chartLoaderSize: [1, "chart-loader-size"], chartLoading: [4, "chart-loading"], chartLoadingTitle: [1, "chart-loading-title"], chartLoadingSupportingText: [1, "chart-loading-supporting-text"], width: [32], height: [32] }, void 0, { chartData: [{ chartDataChanged: 0 }], legendVisible: [{ legendVisibilityChanged: 0 }] }]);
|
|
53
|
+
function z() {
|
|
54
|
+
typeof customElements < "u" && ["gids-pie-chart", "gids-chart-legend", "gids-chart-legend-item"].forEach(((e) => {
|
|
55
|
+
switch (e) {
|
|
56
|
+
case "gids-pie-chart":
|
|
57
|
+
customElements.get(a(e)) || customElements.define(a(e), y);
|
|
58
|
+
break;
|
|
59
|
+
case "gids-chart-legend":
|
|
60
|
+
customElements.get(a(e)) || u();
|
|
61
|
+
break;
|
|
62
|
+
case "gids-chart-legend-item":
|
|
63
|
+
customElements.get(a(e)) || v();
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
z();
|
|
68
|
+
export {
|
|
69
|
+
z as c,
|
|
70
|
+
y as n
|
|
71
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { q as e, L as t, u as s, D as o } from "./p-Bf3p-DY2-CPqEc-vc.js";
|
|
2
|
+
import { i as d } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
|
+
import { d as a } from "./p-D4Pimu_8-DfEGRQGf.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: "38a60d81d2e4682272e7892c137bad482b471f52", 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
|
+
c,
|
|
30
|
+
n as d
|
|
31
|
+
};
|