@ganpatiinfo/gids-core-web 4.0.0 → 6.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 +394 -6
- package/dist/css/index.css.map +1 -1
- 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-notification.d.ts +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-scrim.d.ts +11 -0
- package/dist/gids-scrim.js +1 -0
- package/dist/gids-snackbar.d.ts +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/{p-RqpjvEHh.js → p-BVh4zbX4.js} +1 -1
- package/dist/{p-D4xtPT_U.js → p-BplPYg8z.js} +1 -1
- package/dist/types/components/html/GidsHeading/GidsHeading.d.ts +2 -2
- package/dist/types/components/html/GidsSearchBar/GidsSearchBar.d.ts +1 -2
- package/dist/types/components/html/GidsSegmentedControl/GidsSegmentedControl.d.ts +1 -1
- package/dist/types/components/html/GidsSegmentedTabItem/GidsSegmentedTabItem.d.ts +1 -1
- package/dist/types/components/html/GidsSideMenu/GidsSideMenu.d.ts +5 -0
- package/dist/types/components/html/GidsSideMenuHeader/GidsSideMenuHeader.d.ts +8 -0
- package/dist/types/components/html/GidsSideMenuItem/GidsSideMenuItem.d.ts +7 -0
- package/dist/types/components/html/GidsSideNavigation/GidsSideNavigation.d.ts +7 -0
- package/dist/types/components/html/GidsTopNavigation/GidsTopNavigation.d.ts +1 -1
- package/dist/types/components/webComponents/GidsScrim/GidsScrim.d.ts +7 -0
- package/dist/types/components.d.ts +18 -0
- package/dist-bundled/es/gids-field.js +3 -3
- package/dist-bundled/es/gids-icon.js +8 -8
- package/dist-bundled/es/gids-input.js +2 -2
- package/dist-bundled/es/gids-overlay-provider.js +4 -4
- package/dist-bundled/es/gids-password-field.js +28 -28
- package/dist-bundled/es/gids-scrim.js +35 -0
- package/dist-bundled/es/gids-text-field.js +11 -11
- package/dist-bundled/es/gids-toggle-button.js +5 -5
- package/dist-bundled/es/{p-RqpjvEHh-BGGYsIBf.js → p-BVh4zbX4-C4UJ8LPX.js} +6 -6
- package/dist-bundled/es/{p-D4xtPT_U-04HkZiXU.js → p-BplPYg8z-B8uAAfo4.js} +4 -4
- package/dist-bundled/umd/gids-field.umd.js +1 -1
- package/dist-bundled/umd/gids-icon.umd.js +2 -2
- package/dist-bundled/umd/gids-input.umd.js +1 -1
- package/dist-bundled/umd/gids-overlay-provider.umd.js +1 -1
- package/dist-bundled/umd/gids-password-field.umd.js +1 -1
- package/dist-bundled/umd/gids-scrim.umd.js +5 -0
- package/dist-bundled/umd/gids-text-field.umd.js +1 -1
- package/dist-bundled/umd/gids-toggle-button.umd.js +2 -2
- package/dist-bundled/umd-complete/gids-core-web.umd.js +3 -3
- package/package.json +14 -8
|
@@ -3,26 +3,26 @@ import { i as C } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
|
3
3
|
import { n as L, o as O } from "./p-DijVkS9b-CtFkEtlE.js";
|
|
4
4
|
import { a as F } from "./p-CWdkmFbc-D89ZE8Mi.js";
|
|
5
5
|
import { g as k, d as j } from "./p-veoOgDXg-DElc87c0.js";
|
|
6
|
-
import { h as E } from "./p-
|
|
7
|
-
import { r as G } from "./p-
|
|
6
|
+
import { h as E } from "./p-BplPYg8z-B8uAAfo4.js";
|
|
7
|
+
import { r as G } from "./p-BVh4zbX4-C4UJ8LPX.js";
|
|
8
8
|
import { c as g } from "./clsx-OuTLNxxd.js";
|
|
9
|
-
const f = /[A-Z]/,
|
|
9
|
+
const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e, meterRules: t = [], textMinLength: s = 0 }) => {
|
|
10
10
|
if (!e || e === "")
|
|
11
11
|
return 0;
|
|
12
12
|
let n = 0;
|
|
13
|
-
return t.includes("1-uppercase") && f.test(e) && n++, t.includes("1-lowercase") &&
|
|
14
|
-
},
|
|
13
|
+
return t.includes("1-uppercase") && f.test(e) && n++, t.includes("1-lowercase") && p.test(e) && n++, t.includes("1-digit") && b.test(e) && n++, t.includes("1-special-character") && q.test(e) && n++, t.includes("include-min-length") && s && s > 0 && e.length >= s && n++, n;
|
|
14
|
+
}, B = ({ textScore: e, maxScore: t }) => {
|
|
15
15
|
const s = t > 0 ? e / t * 100 : 0;
|
|
16
16
|
return s <= 20 ? "is-weak" : s <= 40 ? "is-medium" : s <= 60 ? "is-good-enough" : s <= 80 ? "is-good" : "is-strong";
|
|
17
|
-
},
|
|
17
|
+
}, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18
18
|
__proto__: null,
|
|
19
|
-
getColorModifierByScore:
|
|
19
|
+
getColorModifierByScore: B,
|
|
20
20
|
getStrengthMeterScore: z,
|
|
21
|
-
include1DigitReg:
|
|
22
|
-
include1LowercaseLetterReg:
|
|
21
|
+
include1DigitReg: b,
|
|
22
|
+
include1LowercaseLetterReg: p,
|
|
23
23
|
include1SpecialCharReg: q,
|
|
24
24
|
include1UppercaseLetterReg: f
|
|
25
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
25
|
+
}, Symbol.toStringTag, { value: "Module" })), d = ({ requirementRule: e, textMinLength: t }) => e === "include-min-length" && t && t > 0, R = (e) => {
|
|
26
26
|
const t = [];
|
|
27
27
|
return e && e.length > 0 && e.map((s) => {
|
|
28
28
|
s?.requirementRule && t.push(s.requirementRule);
|
|
@@ -34,13 +34,13 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
34
34
|
case "1-uppercase":
|
|
35
35
|
return f.test(s);
|
|
36
36
|
case "1-lowercase":
|
|
37
|
-
return b.test(s);
|
|
38
|
-
case "1-digit":
|
|
39
37
|
return p.test(s);
|
|
38
|
+
case "1-digit":
|
|
39
|
+
return b.test(s);
|
|
40
40
|
case "1-special-character":
|
|
41
41
|
return q.test(s);
|
|
42
42
|
case "include-min-length":
|
|
43
|
-
return
|
|
43
|
+
return d({
|
|
44
44
|
requirementRule: "include-min-length",
|
|
45
45
|
textMinLength: t
|
|
46
46
|
}) === !0 && s.length >= t;
|
|
@@ -66,7 +66,7 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
66
66
|
requirementText: "Password must contain atleast 1 lowercase letter."
|
|
67
67
|
}
|
|
68
68
|
];
|
|
69
|
-
return
|
|
69
|
+
return d({
|
|
70
70
|
requirementRule: "include-min-length",
|
|
71
71
|
textMinLength: e
|
|
72
72
|
}) && t.push({
|
|
@@ -76,13 +76,13 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
76
76
|
defaultMeterRules: R(t),
|
|
77
77
|
defaultRequirementsMeterRules: t
|
|
78
78
|
};
|
|
79
|
-
},
|
|
79
|
+
}, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
80
80
|
__proto__: null,
|
|
81
81
|
checkRequirementRuleSatisfied: I,
|
|
82
82
|
getDefaultRulesAndRequirementsForMeters: m,
|
|
83
83
|
getMeterRulesFromRequirements: R,
|
|
84
|
-
minLengthRuleCanBeApplied:
|
|
85
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
84
|
+
minLengthRuleCanBeApplied: d
|
|
85
|
+
}, Symbol.toStringTag, { value: "Module" })), N = (e) => {
|
|
86
86
|
switch (e) {
|
|
87
87
|
case "error":
|
|
88
88
|
return "danger";
|
|
@@ -97,7 +97,7 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
97
97
|
}
|
|
98
98
|
}, $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
99
99
|
__proto__: null,
|
|
100
|
-
getRequirementsMeterLabelLeadingIcon:
|
|
100
|
+
getRequirementsMeterLabelLeadingIcon: N
|
|
101
101
|
}, Symbol.toStringTag, { value: "Module" })), D = (e) => {
|
|
102
102
|
switch (e) {
|
|
103
103
|
case "error":
|
|
@@ -127,27 +127,27 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
127
127
|
}, Symbol.toStringTag, { value: "Module" })), { inputToGidsFieldStatusForPassword: X } = H, Y = (e) => e === "implicit" || e === void 0 ? "implicit" : X(e), ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
128
128
|
__proto__: null,
|
|
129
129
|
inputToGidsFieldStatusForPassword: Y
|
|
130
|
-
}, Symbol.toStringTag, { value: "Module" })), { getGidsStrengthMeterClassNames: te } = Z, { getStrengthMeterScore: se, getColorModifierByScore: re } =
|
|
130
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsStrengthMeterClassNames: te } = Z, { getStrengthMeterScore: se, getColorModifierByScore: re } = A, ie = ({ text: e, textMinLength: t, meterRules: s = ["1-uppercase", "1-lowercase", "1-digit", "1-special-character", "include-min-length"], class: n }) => {
|
|
131
131
|
const a = (r, l, u) => i("div", { key: r, class: ["gids-strength-meter__strength-" + r, u ? "is-active" : "", u ? l : ""].filter(Boolean).join(" ") });
|
|
132
132
|
return s.length > 0 ? i("div", { class: te(n) }, (() => {
|
|
133
133
|
const r = s.length, l = se({ text: e, textMinLength: t, meterRules: s }), u = re({ textScore: l, maxScore: r });
|
|
134
134
|
return Array.from({ length: r }, ((_, c) => {
|
|
135
|
-
const
|
|
136
|
-
return s[
|
|
135
|
+
const o = c + 1, w = o <= l;
|
|
136
|
+
return s[o] === "include-min-length" ? d({ requirementRule: "include-min-length", textMinLength: t }) ? a(o, u, w) : null : a(o, u, w);
|
|
137
137
|
}));
|
|
138
138
|
})()) : null;
|
|
139
139
|
}, { getGidsRequirementsMeterLabelClassNames: ne } = J, { getRequirementsMeterLabelLeadingIcon: le } = $, ae = (e) => {
|
|
140
140
|
const { label: t, status: s = "default", leadingIconVisible: n = !0, class: a } = e, r = le(s);
|
|
141
141
|
return i("div", { class: ne({ status: s }, a) }, n && s && r ? i(j, { name: r, size: "sm", appearance: "filled" }) : null, t && t !== "" ? i("span", null, t) : null);
|
|
142
|
-
}, { checkRequirementRuleSatisfied: ue } =
|
|
142
|
+
}, { checkRequirementRuleSatisfied: ue } = V, { getGidsRequirementsMeterClassNames: oe } = Q, de = ({ requirements: e = [], text: t, textMinLength: s, class: n }) => {
|
|
143
143
|
const a = (r, l) => i(ae, { status: l ? "success" : "error", label: r.requirementText });
|
|
144
|
-
return i("div", { class:
|
|
145
|
-
if (r?.requirementText && r?.requirementRule) {
|
|
144
|
+
return i("div", { class: oe(n) }, e.map(((r) => {
|
|
145
|
+
if (r?.requirementText != null && r?.requirementRule != null) {
|
|
146
146
|
const l = ue({ rule: r.requirementRule, textMinLength: s, text: t });
|
|
147
|
-
return r.requirementRule === "include-min-length" ?
|
|
147
|
+
return r.requirementRule === "include-min-length" ? d({ requirementRule: r.requirementRule, textMinLength: s }) === !0 ? a(r, l) : null : a(r, l);
|
|
148
148
|
}
|
|
149
149
|
return null;
|
|
150
|
-
})))
|
|
150
|
+
})));
|
|
151
151
|
}, { inputToGidsFieldStatusForPassword: ce } = ee, M = S(class extends P {
|
|
152
152
|
constructor(e) {
|
|
153
153
|
super(), e !== !1 && this.__registerHost(), this.gidsPasswordFieldClear = v(this, "gidsPasswordFieldClear"), this.gidsPasswordFieldRevealPassword = v(this, "gidsPasswordFieldRevealPassword"), this.isPasswordRevealed = !1, this.meterRules = [], this.requirementsMeterRequirements = [], this.requirements = [], this.#t = k(), this._handleDismiss = () => {
|
|
@@ -189,8 +189,8 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
189
189
|
#t;
|
|
190
190
|
#e;
|
|
191
191
|
render() {
|
|
192
|
-
const { id: e, ...t } = this.inputProps ?? {}, s = e ?? this.#t, n = this.showClearButton && this.value !== void 0 && this.value.length > 0, a = this.showRevealPasswordButton, r = { ...t }, l = r?.placeholder && r.placeholder != "" ? r.placeholder : "Enter password", u = this.isPasswordRevealed, _ = this.meterRules, c = this.textMinLength !== void 0 ? this.textMinLength : 8;
|
|
193
|
-
return i(T, { key: "
|
|
192
|
+
const { id: e, ...t } = this.inputProps ?? {}, s = e ?? this.#t, n = this.showClearButton && this.value !== void 0 && this.value.length > 0, a = this.showRevealPasswordButton, r = { ...t }, l = r?.placeholder !== void 0 && r.placeholder !== null && r.placeholder != "" ? r.placeholder : "Enter password", u = this.isPasswordRevealed, _ = this.meterRules, c = this.textMinLength !== void 0 ? this.textMinLength : 8;
|
|
193
|
+
return i(T, { key: "b83ca111267e69120811c23a02754fc2f3132131" }, i("gids-field", { key: "b10ea7b36a8f7daa4b5877e541ffa468ca06c474", disabled: this.disabled, count: void 0, helperText: this.helperText, statusText: this.statusText, status: ce(this.status) }, i(L, { key: "04f8c7ee920968585e77dff7e67494547285b6a6", slot: "label", disabled: this.disabled, info: i("slot", { name: "info" }), fieldRequirement: this.fieldRequirement, fieldRequirementOptionalText: this.fieldRequirementOptionalText, fieldRequirementRequiredText: this.fieldRequirementRequiredText, isLabelSentence: this.isLabelSentence, htmlFor: s }, this.label), i("gids-input", { key: "2892c5cda5ac6125e1b1c16195cbe45fed9ed0cd", ref: (o) => this.#e = o, appearance: "default", status: this.status, loading: this.loading, value: this.value, defaultValue: this.defaultValue, name: this.name, required: this.required, disabled: this.disabled, readOnly: this.readOnly, leadingLabel: void 0, trailingLabel: void 0, onFocus: this._handleInputFocusAndBlur, onBlur: this._handleInputFocusAndBlur, onInput: this._handleInput, inputProps: { ...r, placeholder: l, type: u ? "text" : "password", id: s, maxLength: this.maxLength } }, i("slot", { key: "e6690ff215ac059385463b250d4b75876af23b6b", name: "leadingIcon" }), i("slot", { key: "a22761b031bc9e5d7d115d2c82969685dc4ec150", name: "leadingAccessory" }), i("div", { key: "6e4ddee96b624e07453b06966d02fe22060bdddf", slot: "trailingAccessory", class: "gids-password-field__trailing-accessory" }, n && i(O, { key: "1499342b7785379b68472713b19f2846cb39315c", label: "clear text", size: "lg", onPressDismiss: this._handleDismiss }), a && i(F, { key: "b309f288c0e7108f0896de407e1b8b4b6cd1f628", appearance: "default", size: "xs", width: "intrinsic", disabled: this.disabled, onClick: this._handleRevealPassword }, u ? "Hide" : "Show")))), i("div", { key: "7cbcb6a793de21d9f990b26ee0ff956a73d3f20e", class: "gids-password-field__meters-container" }, i(ie, { key: "f0085914442e068821fc01304e75a0fab47d3dd5", meterRules: _, text: this.value, textMinLength: c }), i(de, { key: "832be45d45074a520896001b80a20a0fd54695b7", requirements: this.requirementsMeterRequirements, text: this.value, textMinLength: c })));
|
|
194
194
|
}
|
|
195
195
|
get _el() {
|
|
196
196
|
return this;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { C as c, f as i, R as t, H as s } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { i as a } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
|
+
import { c as n } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
const l = (e) => n("gids-scrim", e), d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5
|
+
__proto__: null,
|
|
6
|
+
getGidsScrimClassNames: l
|
|
7
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsScrimClassNames: m } = d, o = c(class extends i {
|
|
8
|
+
constructor(e) {
|
|
9
|
+
super(), e !== !1 && this.__registerHost(), this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
const e = a();
|
|
13
|
+
e !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(e);
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return t("div", { key: "e00fc92fcb3ec6168367571260a8bfabc41d620a", class: m(this.extraClasses) }, t("slot", { key: "c5dbff95f6d3b14ec79fa7102ad3948fcbc94965" }));
|
|
17
|
+
}
|
|
18
|
+
get _el() {
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
static get style() {
|
|
22
|
+
return ".gids-scrim{display:flex;flex-direction:column;background-color:var(--gids-color-background-scrim);height:100vh !important;position:absolute;top:0;bottom:0;left:0;right:0;z-index:1001;align-items:center;justify-content:center;backdrop-filter:blur(12)}";
|
|
23
|
+
}
|
|
24
|
+
}, [257, "gids-scrim", { extraClasses: [513, "extra-classes"] }]);
|
|
25
|
+
function r() {
|
|
26
|
+
typeof customElements < "u" && ["gids-scrim"].forEach(((e) => {
|
|
27
|
+
e === "gids-scrim" && (customElements.get(s(e)) || customElements.define(s(e), o));
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
r();
|
|
31
|
+
const b = o, h = r;
|
|
32
|
+
export {
|
|
33
|
+
b as GidsScrim,
|
|
34
|
+
h as defineCustomElement
|
|
35
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as u, f as
|
|
1
|
+
import { C as u, f as c, V as h, N as f, R as i, H as s } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
2
|
import { i as b } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
3
|
import { o as m, n as p } from "./p-DijVkS9b-CtFkEtlE.js";
|
|
4
|
-
import { h as g } from "./p-
|
|
5
|
-
import { r as x } from "./p-
|
|
4
|
+
import { h as g } from "./p-BplPYg8z-B8uAAfo4.js";
|
|
5
|
+
import { r as x } from "./p-BVh4zbX4-C4UJ8LPX.js";
|
|
6
6
|
import { g as _ } from "./p-veoOgDXg-DElc87c0.js";
|
|
7
7
|
const v = (e, t) => {
|
|
8
8
|
if (!(e === void 0 || t === void 0))
|
|
@@ -16,16 +16,16 @@ const v = (e, t) => {
|
|
|
16
16
|
default:
|
|
17
17
|
return "default";
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
20
20
|
__proto__: null,
|
|
21
21
|
formatCharCount: v,
|
|
22
22
|
inputToGidsFieldStatus: T
|
|
23
|
-
}, Symbol.toStringTag, { value: "Module" })), { inputToGidsFieldStatus: y } =
|
|
23
|
+
}, Symbol.toStringTag, { value: "Module" })), { inputToGidsFieldStatus: y } = n, q = (e) => e === "implicit" || e === void 0 ? "implicit" : y(e), C = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
24
24
|
__proto__: null,
|
|
25
25
|
inputToGidsFieldStatus: q
|
|
26
|
-
}, Symbol.toStringTag, { value: "Module" })), { formatCharCount: F } =
|
|
26
|
+
}, Symbol.toStringTag, { value: "Module" })), { formatCharCount: F } = n, { inputToGidsFieldStatus: O } = C, l = u(class extends c {
|
|
27
27
|
constructor(e) {
|
|
28
|
-
super(), e !== !1 && this.__registerHost(), this.gidsTextFieldClear =
|
|
28
|
+
super(), e !== !1 && this.__registerHost(), this.gidsTextFieldClear = h(this, "gidsTextFieldClear"), this.#e = _(), this._handleDismiss = () => {
|
|
29
29
|
const t = this.#t?.querySelector("input.gids-input__control");
|
|
30
30
|
t && (t.value = "", t.dispatchEvent(new globalThis.Event("input", { bubbles: !0 }))), this.value = "", this.gidsTextFieldClear.emit();
|
|
31
31
|
}, this._handleInput = (t) => {
|
|
@@ -49,8 +49,8 @@ const v = (e, t) => {
|
|
|
49
49
|
#e;
|
|
50
50
|
#t;
|
|
51
51
|
render() {
|
|
52
|
-
const { id: e, ...t } = this.inputProps ?? {},
|
|
53
|
-
return i("gids-field", { key: "
|
|
52
|
+
const { id: e, ...t } = this.inputProps ?? {}, a = e ?? this.#e, d = this.showClearButton && this.value !== void 0 && this.value.length > 0;
|
|
53
|
+
return i("gids-field", { key: "7aa5bbe489adc1310365d37aac41ca9772fa1d0f", disabled: this.disabled, count: F(this.value?.length, this.maxLength), helperText: this.helperText, statusText: this.statusText, status: O(this.status) }, i(p, { key: "5a9bf6cfe25a0800b466a0aaccd21ac80aca59bb", slot: "label", disabled: this.disabled, info: i("slot", { name: "info" }), fieldRequirement: this.fieldRequirement, fieldRequirementOptionalText: this.fieldRequirementOptionalText, fieldRequirementRequiredText: this.fieldRequirementRequiredText, isLabelSentence: this.isLabelSentence, htmlFor: a }, this.label), i("gids-input", { key: "53f0d81f5227ed7a872ec9acebb559d21c4adc6e", ref: (o) => this.#t = o, appearance: this.appearance, status: this.status, loading: this.loading, value: this.value, defaultValue: this.defaultValue, name: this.name, required: this.required, disabled: this.disabled, readOnly: this.readOnly, leadingLabel: this.leadingLabel, trailingLabel: this.trailingLabel, onFocus: this._handleInputFocusAndBlur, onBlur: this._handleInputFocusAndBlur, onInput: this._handleInput, inputProps: { ...t, type: this.type, id: a, maxLength: this.maxLength } }, i("slot", { key: "42a2856da9b6d31452fc3fb199eacb336bff3475", name: "leadingIcon" }), i("slot", { key: "3b5cbe26cc943ffeab09231a7d7df750f7b473f7", name: "leadingAccessory" }), d && i(m, { key: "51a7942f8e31430bf1d74abad31049e9ad11f92e", label: "clear text", slot: "trailingAccessory", size: "lg", onPressDismiss: this._handleDismiss }), i("slot", { key: "ae4eccacb0f60d70b57e5df949f7a0dbc9098654", name: "trailingIcon" })));
|
|
54
54
|
}
|
|
55
55
|
get _el() {
|
|
56
56
|
return this;
|
|
@@ -60,7 +60,7 @@ function r() {
|
|
|
60
60
|
typeof customElements < "u" && ["gids-text-field", "gids-field", "gids-input"].forEach(((e) => {
|
|
61
61
|
switch (e) {
|
|
62
62
|
case "gids-text-field":
|
|
63
|
-
customElements.get(s(e)) || customElements.define(s(e),
|
|
63
|
+
customElements.get(s(e)) || customElements.define(s(e), l);
|
|
64
64
|
break;
|
|
65
65
|
case "gids-field":
|
|
66
66
|
customElements.get(s(e)) || g();
|
|
@@ -71,7 +71,7 @@ function r() {
|
|
|
71
71
|
}));
|
|
72
72
|
}
|
|
73
73
|
r();
|
|
74
|
-
const I =
|
|
74
|
+
const I = l, G = r;
|
|
75
75
|
export {
|
|
76
76
|
I as GidsTextField,
|
|
77
77
|
G as defineCustomElement
|
|
@@ -21,9 +21,9 @@ const i = l(class extends n {
|
|
|
21
21
|
this._el.selected = e, this.select?.emit(e);
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return t(a, { key: "
|
|
24
|
+
return t(a, { key: "629bf94de5dcf8979c4c52f749e6f1528506cb7f" }, t("style", { key: "45b2ada2ba3e26b574f7c34675622db5352802d2" }, `:host {
|
|
25
25
|
display: ${this.width === "full" ? "block" : "inline-block"}
|
|
26
|
-
}`), t(c, { key: "
|
|
26
|
+
}`), t(c, { key: "2f93e85e5dbf968c09c245e71a41a9b587ead04c", appearance: this.appearance, size: this.size, width: this.width, disabled: this.disabled, onClick: this._toggle, "aria-pressed": this.selected ? "true" : "false", leadingIcon: t("slot", { name: "leadingIcon" }), trailingIcon: t("slot", { name: "trailingIcon" }), forceIconOnly: this._onlyHasLeadingIcon() }, t("slot", { key: "599d014741a1d931f44976866e92837ed2184e5f" })));
|
|
27
27
|
}
|
|
28
28
|
_onlyHasLeadingIcon() {
|
|
29
29
|
const e = this._el.childNodes;
|
|
@@ -39,8 +39,8 @@ function o() {
|
|
|
39
39
|
}));
|
|
40
40
|
}
|
|
41
41
|
o();
|
|
42
|
-
const
|
|
42
|
+
const u = i, b = o;
|
|
43
43
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
u as GidsToggleButton,
|
|
45
|
+
b as defineCustomElement
|
|
46
46
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as s, C as l, f as
|
|
1
|
+
import { H as s, C as l, f as d, R as a, L as u } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
2
|
import { d as n } from "./p-veoOgDXg-DElc87c0.js";
|
|
3
3
|
import { l as r } from "./p-DybsMR13-DpmsG3Q1.js";
|
|
4
4
|
const c = (e) => e.type === "hidden", f = (e) => {
|
|
@@ -15,11 +15,11 @@ const c = (e) => e.type === "hidden", f = (e) => {
|
|
|
15
15
|
"SELECT",
|
|
16
16
|
"TEXTAREA"
|
|
17
17
|
].includes(t) || t === "A" && e.hasAttribute("href") || e instanceof HTMLInputElement && !c(e) || ["AUDIO", "VIDEO"].includes(t) && e.hasAttribute("controls") || ["IMG", "OBJECT"].includes(t) && e.hasAttribute("usemap") || e.hasAttribute("tabindex") && e.tabIndex > -1);
|
|
18
|
-
}, o = l(class extends
|
|
18
|
+
}, o = l(class extends d {
|
|
19
19
|
constructor(e) {
|
|
20
20
|
super(), e !== !1 && this.__registerHost(), this.#e = {}, this._focusInput = (t) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const i = t.target;
|
|
22
|
+
i === this.#t || this._isWithinInteractiveElement(i) || this.#t?.focus();
|
|
23
23
|
}, this._handleInputFocusAndBlur = (t) => {
|
|
24
24
|
this._el.dispatchEvent(new FocusEvent(t.type, { relatedTarget: t.relatedTarget }));
|
|
25
25
|
};
|
|
@@ -54,9 +54,9 @@ const c = (e) => e.type === "hidden", f = (e) => {
|
|
|
54
54
|
this._el.removeEventListener("click", this._focusInput);
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return
|
|
57
|
+
return a(u, { key: "281c832656cace745109fdd8208fe24b90f2c126" }, a("slot", { key: "5f8424a1d9bc196e3efee9d1e5d099bed15ddb4b", name: "leadingIcon" }), this.leadingLabel && a("span", { key: "2ce161a38f74618d60f38028c646c80e361aeced", class: "gids-input__label" }, this.leadingLabel), a("slot", { key: "12383525faf774eef618705cf68338a4fc9c9e55", name: "leadingAccessory" }), a("input", { key: "19de1aa1ad2a47db2979dfcbbf9b8e49d045f5af", ...this.inputProps, ref: (e) => {
|
|
58
58
|
this.#t = e, this.#e.value !== void 0 && (this.#t.value = this.#e.value, delete this.#e.value), this.#e.defaultValue !== void 0 && (this.#t.defaultValue = this.#e.defaultValue, delete this.#e.defaultValue);
|
|
59
|
-
}, class: "gids-input__control", name: this.name, disabled: this.disabled, readOnly: this.readOnly, required: this.required, onFocus: this._handleInputFocusAndBlur, onBlur: this._handleInputFocusAndBlur }),
|
|
59
|
+
}, class: "gids-input__control", name: this.name, disabled: this.disabled, readOnly: this.readOnly, required: this.required, onFocus: this._handleInputFocusAndBlur, onBlur: this._handleInputFocusAndBlur }), a("slot", { key: "3e0f6ae8c23b2536891ddd0adb7be1215d86ac66", name: "trailingAccessory" }), this.trailingLabel && a("span", { key: "9b2ac9fbf6c198dd0a4e1decf4631b2b46902587", class: "gids-input__label" }, this.trailingLabel), a("slot", { key: "d9848f786ce38136f1ad8c07d685215ede87f157", name: "trailingIcon" }), this.status === "incomplete" && a(n, { key: "bc8bcc01f07bd345b448f4662a37b28d8029a94f", name: "warning", appearance: "filled", class: "gids-input__warning-icon" }), this.status === "complete" && a(n, { key: "cafc44041a1d4eac859face7ec5eea2ced1ca3f5", name: "positive", appearance: "filled", class: "gids-input__positive-icon" }), this.loading && a(r, { key: "0daca638742b098d06da6cd9a7b9cfd6e9c90921", size: "md", indeterminate: !0 }));
|
|
60
60
|
}
|
|
61
61
|
get _el() {
|
|
62
62
|
return this;
|
|
@@ -5,7 +5,7 @@ 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: p } = u, f = 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: "4bd0ef4ac11ded5f563595485082650801fdbe1b" }, o("div", { key: "3617e3301f53dcb21a9beb98b4a23d620e3dd39d", class: p() }, o("div", { key: "bb1f6710ee27c94346f7ee9459389d901b23d913", class: "gids-field__header", hidden: !this._hasLabelContent() }, o("slot", { key: "8fa03ca31936bc6082052b099ac29afea2ec3032", ref: this._setLabelSlot, name: "label", onSlotchange: this._handleControlSlotChange }), o("div", { key: "1b50c69005c2d0b89c47dc01c2dcbb343bdeecff", class: "gids-field__count", "aria-live": "polite" }, this.count)), o("div", { key: "b8664a96496a6e7289fb14bdadbb59dcee9af3d1", class: "gids-field__control" }, o("slot", { key: "bff757557406c0165be3569c4eb34adb1fe346ca", ref: this._setControlSlot, onSlotchange: this._handleControlSlotChange })), o("p", { key: "0638e493fc4ac98f6c10a8392c45ffde8b8340a4", 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), f));
|
|
175
175
|
}));
|
|
176
176
|
}
|
|
177
177
|
m();
|
|
178
178
|
export {
|
|
179
|
-
|
|
179
|
+
f as d,
|
|
180
180
|
m as h
|
|
181
181
|
};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
Flattening is not supported for Stencil non-shadow slots.
|
|
3
3
|
You can use \`.childNodes\` to nested slot fallback content.
|
|
4
4
|
If you have a particular use case, please open an issue on the Stencil repo.
|
|
5
|
-
`);const S=this["s-cr"].parentElement;return(S.__childNodes?S.childNodes:(y=>{const _=[];for(let m=0;m<y.length;m++){const p=y[m]["s-nr"]||void 0;p&&p.isConnected&&_.push(p)}return _})(S.childNodes)).forEach((y=>{h===G(y)&&g.push(y)})),d?g.filter((y=>y.nodeType===1)):g}).bind(c);c.assignedElements=u(!0),c.assignedNodes=u(!1)})(i),a=e&&e.m&&e.m[o],a&&a.O===n.O&&e.S&&je(e.S)),i},je=e=>{C.i|=1;const t=e.closest(P.toLowerCase());if(t!=null){const o=Array.from(t.__childNodes||t.childNodes).find((n=>n["s-cr"])),s=Array.from(e.__childNodes||e.childNodes);for(const n of o?s.reverse():s)n["s-sh"]!=null&&(L(t,n,o??null),n["s-sh"]=void 0,K=!0)}C.i&=-2},Z=(e,t)=>{C.i|=1;const o=Array.from(e.__childNodes||e.childNodes);if(e["s-sr"]){let s=e;for(;s=s.nextSibling;)s&&s["s-sn"]===e["s-sn"]&&s["s-sh"]===P&&o.push(s)}for(let s=o.length-1;s>=0;s--){const n=o[s];n["s-hn"]!==P&&n["s-ol"]&&(L(B(n).parentNode,n,B(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,K=!0),t&&Z(n,t)}C.i&=-2},Me=(e,t,o,s,n,i)=>{let r,a=e["s-cr"]&&e["s-cr"].parentNode||e;for(a.shadowRoot&&a.tagName===P&&(a=a.shadowRoot),o.O==="template"&&(a=a.content);n<=i;++n)s[n]&&(r=Y(null,o,n),r&&(s[n].S=r,L(a,r,B(t))))},Pe=(e,t,o)=>{for(let s=t;s<=o;++s){const n=e[s];if(n){const i=n.S;Ie(n),i&&(U=!0,i["s-ol"]?i["s-ol"].remove():Z(i,!0),i.remove())}}},J=(e,t,o=!1)=>e.O===t.O&&(e.O==="slot"?e.j===t.j:o?(o&&!e.$&&t.$&&(e.$=t.$),!0):e.$===t.$),B=e=>e&&e["s-ol"]||e,V=(e,t,o=!1)=>{const s=t.S=e.S,n=e.m,i=t.m,r=t.O,a=t.h;let l;a==null?(N=r==="svg"||r!=="foreignObject"&&N,r!=="slot"||D||e.j!==t.j&&(t.S["s-sn"]=t.j||"",je(t.S.parentElement)),re(e,t,N),n!==null&&i!==null?((c,u,d,f,g=!1)=>{let h,S,y=0,_=0,m=0,p=0,w=u.length-1,v=u[0],x=u[w],$=f.length-1,T=f[0],O=f[$];const Qe=d.O==="template"?c.content:c;for(;y<=w&&_<=$;)if(v==null)v=u[++y];else if(x==null)x=u[--w];else if(T==null)T=f[++_];else if(O==null)O=f[--$];else if(J(v,T,g))V(v,T,g),v=u[++y],T=f[++_];else if(J(x,O,g))V(x,O,g),x=u[--w],O=f[--$];else if(J(v,O,g))v.O!=="slot"&&O.O!=="slot"||Z(v.S.parentNode,!1),V(v,O,g),L(Qe,v.S,x.S.nextSibling),v=u[++y],O=f[--$];else if(J(x,T,g))v.O!=="slot"&&O.O!=="slot"||Z(x.S.parentNode,!1),V(x,T,g),L(Qe,x.S,v.S),x=u[--w],T=f[++_];else{for(m=-1,p=y;p<=w;++p)if(u[p]&&u[p].$!==null&&u[p].$===T.$){m=p;break}m>=0?(S=u[m],S.O!==T.O?h=Y(u&&u[_],d,m):(V(S,T,g),u[m]=void 0,h=S.S),T=f[++_]):(h=Y(u&&u[_],d,_),T=f[++_]),h&&L(B(v.S).parentNode,h,B(v.S))}y>w?Me(c,f[$+1]==null?null:f[$+1].S,d,f,_,$):_>$&&Pe(u,y,w)})(s,n,t,i,o):i!==null?(e.h!==null&&(s.textContent=""),Me(s,null,t,i,0,i.length-1)):!o&&n!==null&&Pe(n,0,n.length-1),N&&r==="svg"&&(N=!1)):(l=s["s-cr"])?l.parentNode.textContent=a:e.h!==a&&(s.data=a)},k=[],Re=e=>{let t,o,s;const n=e.__childNodes||e.childNodes;for(const i of n){if(i["s-sr"]&&(t=i["s-cr"])&&t.parentNode){o=t.parentNode.__childNodes||t.parentNode.childNodes;const r=i["s-sn"];for(s=o.length-1;s>=0;s--)if(t=o[s],!(t["s-cn"]||t["s-nr"]||t["s-hn"]===i["s-hn"]||t["s-sh"]&&t["s-sh"]===i["s-hn"]))if(we(t,r)){let a=k.find((l=>l.k===t));U=!0,t["s-sn"]=t["s-sn"]||r,a?(a.k["s-sh"]=i["s-hn"],a.N=i):(t["s-sh"]=i["s-hn"],k.push({N:i,k:t})),t["s-sr"]&&k.map((l=>{we(l.k,t["s-sn"])&&(a=k.find((c=>c.k===t)),a&&!l.N&&(l.N=a.N))}))}else k.some((a=>a.k===t))||k.push({k:t})}i.nodeType===1&&Re(i)}},Ie=e=>{e.v&&e.v.ref&&ae.push((()=>e.v.ref(null))),e.m&&e.m.map(Ie)},ct=(e,t)=>{de.push((()=>e(t)))},L=(e,t,o,s)=>{if(typeof t["s-sn"]=="string"){e.insertBefore(t,o);const{slotNode:n}=(function(i,r){var a;if(!(r=r||((a=i["s-ol"])==null?void 0:a.parentElement)))return{slotNode:null,slotName:""};const l=i["s-sn"]=G(i)||"";return{slotNode:oe(ne(r,"childNodes"),r.tagName,l)[0],slotName:l}})(t);return n&&!s&&n.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),t}return e.__insertBefore?e.__insertBefore(t,o):e?.insertBefore(t,o)},ht=(e,t,o=!1)=>{var s,n,i,r,a;const l=e.$hostElement$,c=e.o,u=e.M||q(null,null);var d;const f=(d=t)&&d.O===Ee?t:E(null,null,t);if(P=l.tagName,c._&&(f.v=f.v||{},c._.forEach((([g,h])=>{f.v[h]=l[g]}))),o&&f.v)for(const g of Object.keys(f.v))l.hasAttribute(g)&&!["key","ref","style","class"].includes(g)&&(f.v[g]=l[g]);if(f.O=null,f.i|=4,e.M=f,f.S=u.S=l.shadowRoot||l,D=!(!(1&c.i)||128&c.i),ie=l["s-cr"],U=!1,V(u,f,o),C.i|=1,K){Re(f.S);for(const g of k){const h=g.k;if(!h["s-ol"]&&b.document){const S=b.document.createTextNode("");S["s-nr"]=h,L(h.parentNode,h["s-ol"]=S,h,o)}}for(const g of k){const h=g.k,S=g.N;if(h.nodeType===1&&o&&(h["s-ih"]=(s=h.hidden)!=null&&s),S){const y=S.parentNode;let _=S.nextSibling;if(_&&_.nodeType===1){let m=(n=h["s-ol"])==null?void 0:n.previousSibling;for(;m;){let p=(i=m["s-nr"])!=null?i:null;if(p&&p["s-sn"]===h["s-sn"]&&y===(p.__parentNode||p.parentNode)){for(p=p.nextSibling;p===h||p?.["s-sr"];)p=p?.nextSibling;if(!p||!p["s-nr"]){_=p;break}}m=m.previousSibling}}if((!_&&y!==(h.__parentNode||h.parentNode)||(h.__nextSibling||h.nextSibling)!==_)&&h!==_){if(L(y,h,_,o),h.nodeType===8&&h.nodeValue.startsWith("s-nt-")){const m=b.document.createTextNode(h.nodeValue.replace(/^s-nt-/,""));m["s-hn"]=h["s-hn"],m["s-sn"]=h["s-sn"],m["s-sh"]=h["s-sh"],m["s-sr"]=h["s-sr"],m["s-ol"]=h["s-ol"],m["s-ol"]["s-nr"]=m,L(h.parentNode,m,h,o),h.parentNode.removeChild(h)}h.nodeType===1&&h.tagName!=="SLOT-FB"&&(h.hidden=(r=h["s-ih"])!=null&&r)}h&&typeof S["s-rf"]=="function"&&S["s-rf"](S)}else h.nodeType===1&&(h.hidden=!0)}}if(U&&xe(f.S),C.i&=-2,k.length=0,!D&&!(1&c.i)&&l["s-cr"]){const g=f.S.__childNodes||f.S.childNodes;for(const h of g)if(h["s-hn"]!==P&&!h["s-sh"]){if(o&&h["s-ih"]==null&&(h["s-ih"]=(a=h.hidden)!=null&&a),h.nodeType===1)h.hidden=!0;else if(h.nodeType===3&&h.nodeValue.trim()){const S=b.document.createComment("s-nt-"+h.nodeValue);S["s-sn"]=h["s-sn"],L(h.parentNode,S,h,o),h.parentNode.removeChild(h)}}}ie=void 0,ae.forEach((g=>g())),ae.length=0,de.forEach((g=>g())),de.length=0},Ve=(e,t)=>{if(t&&!e.A&&t["s-p"]){const o=t["s-p"].push(new Promise((s=>e.A=()=>{t["s-p"].splice(o-1,1),s()})))}},ce=(e,t)=>{if(e.i|=16,4&e.i)return void(e.i|=512);Ve(e,e.C);const o=()=>ut(e,t);if(!t)return st(o);queueMicrotask((()=>{o()}))},ut=(e,t)=>{const o=e.$hostElement$,s=o;if(!s)throw new Error(`Can't render component <${o.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let n;return n=z(s,t?"componentWillLoad":"componentWillUpdate",void 0,o),n=Fe(n,(()=>z(s,"componentWillRender",void 0,o))),Fe(n,(()=>pt(e,s,t)))},Fe=(e,t)=>ft(e)?e.then(t).catch((o=>{console.error(o),t()})):t(),ft=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",pt=async(e,t,o)=>{var s;const n=e.$hostElement$,i=n["s-rc"];o&&(r=>{const a=r.o,l=r.$hostElement$,c=a.i,u=((d,f)=>{var g,h,S;const y=Ce(f),_=W.get(y);if(!b.document)return y;if(d=d.nodeType===11?d:b.document,_)if(typeof _=="string"){let m,p=j.get(d=d.head||d);if(p||j.set(d,p=new Set),!p.has(y)){m=b.document.createElement("style"),m.textContent=_;const w=(g=C.L)!=null?g:(function(){var v,x,$;return($=(x=(v=b.document.head)==null?void 0:v.querySelector('meta[name="csp-nonce"]'))==null?void 0:x.getAttribute("content"))!=null?$:void 0})();if(w!=null&&m.setAttribute("nonce",w),!(1&f.i))if(d.nodeName==="HEAD"){const v=d.querySelectorAll("link[rel=preconnect]"),x=v.length>0?v[v.length-1].nextSibling:d.querySelector("style");d.insertBefore(m,x?.parentNode===d?x:null)}else if("host"in d)if(Q){const v=new((h=d.defaultView)!=null?h:d.ownerDocument.defaultView).CSSStyleSheet;v.replaceSync(_),X?d.adoptedStyleSheets.unshift(v):d.adoptedStyleSheets=[v,...d.adoptedStyleSheets]}else{const v=d.querySelector("style");v?v.textContent=_+v.textContent:d.prepend(m)}else d.append(m);1&f.i&&d.insertBefore(m,null),4&f.i&&(m.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),p&&p.add(y)}}else{let m=j.get(d);if(m||j.set(d,m=new Set),!m.has(y)){const p=(S=d.defaultView)!=null?S:d.ownerDocument.defaultView;let w;if(_.constructor===p.CSSStyleSheet)w=_;else{w=new p.CSSStyleSheet;for(let v=0;v<_.cssRules.length;v++)w.insertRule(_.cssRules[v].cssText,v)}X?d.adoptedStyleSheets.push(w):d.adoptedStyleSheets=[...d.adoptedStyleSheets,w],m.add(y)}}return y})(l.shadowRoot?l.shadowRoot:l.getRootNode(),a);10&c&&(l["s-sc"]=u,l.classList.add(u+"-h"))})(e),gt(e,t,n,o),i&&(i.map((r=>r())),n["s-rc"]=void 0);{const r=(s=n["s-p"])!=null?s:[],a=()=>mt(e);r.length===0?a():(Promise.all(r).then(a).catch(a),e.i|=4,r.length=0)}},gt=(e,t,o,s)=>{try{t=t.render(),e.i&=-17,e.i|=2,ht(e,t,s)}catch(n){I(n,e.$hostElement$)}return null},mt=e=>{const t=e.$hostElement$,o=t,s=e.C;z(o,"componentDidRender",void 0,t),64&e.i?z(o,"componentDidUpdate",void 0,t):(e.i|=64,vt(t),z(o,"componentDidLoad",void 0,t),e.F(t),s||_t()),e.A&&(e.A(),e.A=void 0),512&e.i&&se((()=>ce(e,!1))),e.i&=-517},_t=()=>{se((()=>rt(b,"appload",{detail:{namespace:"gids-core-web"}})))},z=(e,t,o,s)=>{if(e&&e[t])try{return e[t](o)}catch(n){I(n,s)}},vt=e=>e.classList.add("hydrated"),He=(e,t,o,s)=>{const n=A(e);if(!n)return;const i=e,r=n.l.get(t),a=n.i,l=i;o=$e(o,s.t[t][0]);const c=Number.isNaN(r)&&Number.isNaN(o);if(o!==r&&!c){if(n.l.set(t,o),s.R){const u=s.R[t];u&&u.map((d=>{try{const[[f,g]]=Object.entries(d);(128&a||1&g)&&(l?l[f](o,r,t):n.T.push((()=>{n.D[f](o,r,t)})))}catch(f){I(f,i)}}))}if(2&a){if(l.componentShouldUpdate&&l.componentShouldUpdate(o,r,t)===!1&&!(16&a))return;16&a||ce(n,!1)}}},yt=(e,t)=>{var o,s;const n=e.prototype;{e.watchers&&!t.R&&(t.R=Te(e.watchers)),e.deserializers&&!t.H&&(t.H=e.deserializers),e.serializers&&!t.P&&(t.P=e.serializers);const i=Object.entries((o=t.t)!=null?o:{});i.map((([r,[a]])=>{if(31&a||32&a){const{get:l,set:c}=R(n,r)||{};l&&(t.t[r][0]|=2048),c&&(t.t[r][0]|=4096),Object.defineProperty(n,r,{get(){return l?l.apply(this):(u=r,A(this).l.get(u));var u},configurable:!0,enumerable:!0}),Object.defineProperty(n,r,{set(u){const d=A(this);if(d){if(c)return(32&a?this[r]:d.$hostElement$[r])===void 0&&d.l.get(r)&&(u=d.l.get(r)),c.apply(this,[$e(u,a)]),void He(this,r,u=32&a?this[r]:d.$hostElement$[r],t);He(this,r,u,t)}}})}}));{const r=new Map;n.attributeChangedCallback=function(a,l,c){C.jmp((()=>{var u;const d=r.get(a),f=A(this);if(this.hasOwnProperty(d),n.hasOwnProperty(d)&&typeof this[d]=="number"&&this[d]==c)return;if(d==null){const _=f?.i;if(f&&_&&!(8&_)&&c!==l){const m=this,p=(u=t.R)==null?void 0:u[a];p?.forEach((w=>{const[[v,x]]=Object.entries(w);m[v]!=null&&(128&_||1&x)&&m[v].call(m,c,l,a)}))}return}const g=i.find((([_])=>_===d)),h=g&&4&g[1][0],S=h&&c===null&&this[d]===void 0;h&&(c=c!==null&&c!=="false");const y=Object.getOwnPropertyDescriptor(n,d);S||c==this[d]||y.get&&!y.set||(this[d]=c)}))},e.observedAttributes=Array.from(new Set([...Object.keys((s=t.R)!=null?s:{}),...i.filter((([a,l])=>31&l[0])).map((([a,l])=>{var c;const u=l[1]||a;return r.set(u,a),512&l[0]&&((c=t._)==null||c.push([a,u])),u}))]))}}return e},St=(e,t)=>{const o={i:t[0],p:t[1]};try{o.t=t[2],o.R=Te(e.R),o.H=e.H,o.P=e.P,o._=[];const s=e.prototype.connectedCallback,n=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){((i,r)=>{const a={i:0,$hostElement$:i,o:r,l:new Map,U:new Map};a.W=new Promise((c=>a.F=c)),i["s-p"]=[],i["s-rc"]=[];const l=a;i.__stencil__getHostRef=()=>l,512&r.i&&Xe(i,a)})(this,o)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!A(this))return;this.__hasHostListenerAttached=!0}(i=>{if(!(1&C.i)){const r=A(i);if(!r)return;const a=r.o;if(1&r.i)r?.D||r?.W&&r.W.then((()=>{}));else{r.i|=1,12&a.i&&(l=>{if(!b.document)return;const c=l["s-cr"]=b.document.createComment("");c["s-cn"]=!0,L(l,c,l.firstChild)})(i);{let l=i;for(;l=l.parentNode||l.host;)if(l["s-p"]){Ve(r,r.C=l);break}}a.t&&Object.entries(a.t).map((([l,[c]])=>{if(31&c&&Object.prototype.hasOwnProperty.call(i,l)){const u=i[l];delete i[l],i[l]=u}})),(async(l,c,u)=>{let d;try{if(!(32&c.i)&&(c.i|=32,d=l.constructor,customElements.whenDefined(l.localName).then((()=>c.i|=128)),d&&d.style)){let h;typeof d.style=="string"&&(h=d.style);const S=Ce(u);W.has(S)||((y,_,m)=>{let p=W.get(y);Q&&m?(p=p||new CSSStyleSheet,typeof p=="string"?p=_:p.replaceSync(_)):p=_,W.set(y,p)})(S,h,!!(1&u.i))}const f=c.C,g=()=>ce(c,!0);f&&f["s-rc"]?f["s-rc"].push(g):g()}catch(f){I(f,l),c.A&&(c.A(),c.A=void 0),c.F&&c.F(l)}})(i,r,a)}}})(this),s&&s.call(this)},disconnectedCallback(){(async i=>{1&C.i||A(i),j.has(i)&&j.delete(i),i.shadowRoot&&j.has(i.shadowRoot)&&j.delete(i.shadowRoot)})(this),n&&n.call(this)},__attachShadow(){if(this.shadowRoot){if(this.shadowRoot.mode!=="open")throw new Error(`Unable to re-use existing shadow root for ${o.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else ot.call(this,o)}}),Object.defineProperty(e,"is",{value:o.p,configurable:!0}),yt(e,o)}catch(s){return I(s),e}};function It(e){return e}function Ge(e){var t,o,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=Ge(e[t]))&&(s&&(s+=" "),s+=o)}else for(o in e)e[o]&&(s&&(s+=" "),s+=o);return s}function De(){for(var e,t,o=0,s="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=Ge(e))&&(s&&(s+=" "),s+=t);return s}const bt=Object.freeze(Object.defineProperty({__proto__:null,getGidsIconClassNames:({size:e},t)=>De("gids-icon",{"gids-icon--xs":e==="xs","gids-icon--sm":e==="sm","gids-icon--md":e==="md","gids-icon--lg":e==="lg"},t)},Symbol.toStringTag,{value:"Module"})),xt=Object.freeze(Object.defineProperty({__proto__:null,getGidsFieldClassNames:e=>De("gids-field",e)},Symbol.toStringTag,{value:"Module"})),he=Symbol("defaultPath"),Be=Symbol("pathSet"),ue="gids-asset-paths-set";class wt extends EventTarget{#s=new Map;constructor(){super()}#e(t,o){this.#s.set(t,o)}#t(t){return this.#s.get(t)??null}#o=()=>{this.dispatchEvent(new Event(ue))};haveAssetPathsBeenSet(){return this.#t(Be)!==null}setAssetPaths(t,o){if(!this.haveAssetPathsBeenSet()){if(typeof t=="string")this.#e(he,t);else{for(const s in t)this.#e(s,t[s]);o&&this.#e(he,o)}this.#e(Be,"true"),setTimeout(this.#o,0)}}getAssetFilePath(t){const o=this.#t(t);if(o===null){const s=this.#t(he);if(s!==null)return`${s}${s.endsWith("/")?"":"/"}${t}`}return o}onAssetPathsSet(t){if(!this.haveAssetPathsBeenSet())return this.addEventListener(ue,t,{once:!0}),()=>{this.removeEventListener(ue,t)}}}const fe=Symbol.for("GIDS"),Ct=()=>(globalThis[fe]===void 0&&(globalThis[fe]={assetPaths:{}}),globalThis[fe]),Et=e=>{const t=Ct().assetPaths;return t[e]===void 0&&(t[e]=new wt),t[e]};function pe(){return Et("@ganpatiinfo/gids-web-shared")}function Nt(){return pe().haveAssetPathsBeenSet()}function ze(e){return pe().getAssetFilePath(e)}function Tt(e){return pe().onAssetPathsSet(e)}let $t=0;const Lt=(e,t="gids")=>e||`${t}-${$t++}`,We={"icons-other.svg":["accessibility","announcement","approval","archive","audio","backward","banking","battery","bluetooth","bookmark","bulb","calendar","camera","card","cart","chart","chat","cloud","code","compass","desktop","email","emergency","exchange","finance","fingerprint","flag","folder","forward","gift","globe","goals","happy","hashtag","headphones","history","image","insurance","investment","key","link","list","location","lock","map","maximise","microphone","minimise","mobile","moon","network","neutral","new","new-chat","pause","percent","placeholder","play","power","rain","refresh","repeat","sad","save","savings","shield","shuffle","side-navigation","snow","speaker","stop","sun","tablet","temperature","thumbs-down","thumbs-up","travel","trend-down","trend-up","unlock","upset","verified","very-happy","video","volume-down","volume-max","volume-min","volume-mute","volume-up","wallet","wealth","wi-fi","wind"],"icons-core.svg":["arrow-down","arrow-left","arrow-right","arrow-up","attachment","checkmark","chevron-down","chevron-horizontal","chevron-left","chevron-right","chevron-up","chevron-vertical","copy","cross","danger","dashboard","delete","document","download","drag","edit","external","eye","filter","grid","hide","home","information","log-in","log-out","menu","minus","more","notifications","options","phone","plus","positive","printer","question","search","select","select-all","send","settings","share","star","time","upload","user","users","warning"]},qe=new Map;for(const e in We)for(const t of We[e])qe.set(t,e);function Ot(e){return qe.get(e)}function Ue(e,t="regular",o){const s=Ot(e);let n=s??"";return o&&s&&(n=o(s)??s),`${n}#${e}${t==="filled"?"--filled":""}`}const{getGidsIconClassNames:kt}=bt,At=({name:e,size:t,appearance:o,alt:s,class:n,titleId:i,src:r,...a})=>{const l=Lt(i);let c=r;return c===void 0&&Nt()&&(c=Ue(e,o,ze)),E("svg",{ref:u=>{c===void 0&&Tt((()=>{(function(d,f,g){if(!d)return;const h=document.createElementNS("http://www.w3.org/2000/svg","use");h.setAttribute("href",Ue(f,g,ze)),d.appendChild(h)})(u,e,o)}))},width:"16",height:"16",class:kt({size:t},n),role:"img","aria-hidden":s===""?"true":void 0,"aria-labelledby":s===""?void 0:l,...a},s!==""&&E("title",{id:l},s||e),c!==void 0?E("use",{href:c}):null)},F=globalThis.CSSStyleSheet!==void 0?new CSSStyleSheet:void 0;let Ke=!1;F&&document.adoptedStyleSheets?document.adoptedStyleSheets.push(F):console.warn("CSSStyleSheet is not defined. Omitting constructed stylesheet behaviour.");let ge=null;const me=globalThis.MutationObserver!==void 0?new MutationObserver((()=>{Ye()})):void 0,Ye=()=>{if(F===void 0)return!1;const e=(()=>{if(F===void 0)return;const t=[];for(let o=0;o<document.styleSheets.length;o++){const s=document.styleSheets.item(o);if(s)try{let n=-1,i=0;for(let r=0;r<s.cssRules.length;r++){const a=s.cssRules.item(r);if(a?.cssText.startsWith("gids-global-styles-start"))n=r;else if(n>-1){if(a?.cssText.startsWith("gids-global-styles-end")){i=r-n+1;break}t.push(a)}}if(n>-1)return{rulesStartIndex:n,originalRulesCount:i,rules:t,styleSheet:s}}catch(n){if(!(n instanceof DOMException))throw n}}})();if(e!==void 0){const t=e.styleSheet.ownerNode;return me!==void 0&&t!==ge&&(ge&&me.disconnect(),t instanceof Element&&me.observe(t,{childList:!0,characterData:!0,subtree:!0}),ge=t),F.replaceSync((o=>o.rules.map((s=>s.cssText)).join(""))(e)),(o=>{const{rulesStartIndex:s,originalRulesCount:n,styleSheet:i}=o;for(let r=0;r<n;r++)i.deleteRule(s)})(e),!0}return console.warn("refreshConstructedGidsStylesheet: Gids stylesheet is not found in document."),!1},jt=()=>(Ke||(Ke=Ye()),F),{getGidsFieldClassNames:Mt}=xt,Ze=St(class extends et{constructor(e){super(),e!==!1&&this.__registerHost(),this.__attachShadow(),this.status="implicit",this._hasLabel=!1,this._controlListenerTargets=[],this._controlTouched=!1,this._handleLabelSlotChange=()=>{this._hasLabel=(this._labelSlot?.assignedElements()?.length??0)>0},this._setLabelSlot=t=>{this._labelSlot=t??void 0,this._handleLabelSlotChange()},this._setControlSlot=t=>{this._controlSlot=t??void 0,this._handleControlSlotChange()},this._handleControlSlotChange=()=>{const t=this._controlSlot?.assignedNodes({flatten:!0})??[],o=this._findTextControl(t);this._attachControlElement(o)},this._handleControlValueInput=t=>{if(!this._controlTouched){const o=t.target;o instanceof HTMLInputElement&&(o.type==="checkbox"||o.type==="radio")&&(this._controlTouched=!0)}this._updateControlValidationState()},this._handleControlBlur=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleControlInvalid=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleFormReset=()=>{this._controlTouched=!1,this._updateControlValidationState()},this._handleFormSubmit=()=>{this._controlTouched=!0,this._updateControlValidationState()}}_handleStatusChange(){this._isImplicitStatus()||this._controlValidationMessage===void 0?this._updateControlValidationState():this._controlValidationMessage=void 0}connectedCallback(){const e=jt();e!==void 0&&this._el.shadowRoot?.adoptedStyleSheets.push(e)}componentDidLoad(){setTimeout((()=>{this._handleControlSlotChange(),this._handleLabelSlotChange()}))}async reScanControl(){this._handleControlSlotChange()}disconnectedCallback(){this._detachControlElement(),this._detachFormListeners()}render(){const e=this._hasStatusText(),t=this._controlValidationMessage!==void 0?this._controlValidationMessage:this._shouldRenderExplicitStatusText()?this.statusText:void 0,o=this._getCurrentStatus(),s=["gids-field__status-text"];if(e){const n=this._getStatusModifierClass(o,"gids-field__status-text");n!=null&&s.push(n)}return E(Ee,{key:"fed52ee2bacf334f4ec630fdaea5285d8aee56b3"},E("div",{key:"fe65a5714ae0e8369a2e6d91f5ccbe37ce1b04b4",class:Mt()},E("div",{key:"37d656971e39e9c26085b54fd253f9758e6110fa",class:"gids-field__header",hidden:!this._hasLabelContent()},E("slot",{key:"eda62c8170fb5caf2e69f66bae079d1646a52ff8",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),E("div",{key:"28677c5ebd0e8bfb7f9f0c43634c9a70b84f4cd0",class:"gids-field__count","aria-live":"polite"},this.count)),E("div",{key:"0a816504a863304e13be74c64429b74700fc3590",class:"gids-field__control"},E("slot",{key:"1081771bfb182da6b0527303132555458de3ff2e",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),E("p",{key:"632636f8c4d819b6c32658a7ae72ab9308973fda",class:"gids-field__supporting-text",hidden:!this._shouldShowHelperText()},this.helperText),e?E("p",{class:s.join(" "),role:"status","aria-live":"polite"},this._renderStatusIcon(o),t!==void 0?E("span",null,t):null):null))}_hasLabelContent(){return this._hasLabel}_hasHelperText(){return this._hasText(this.helperText)}_shouldShowHelperText(){return!!this._hasHelperText()&&!this._hasStatusText()}_hasStatusText(){return this._isImplicitStatus()?this._controlValidationMessage!==void 0:this._shouldRenderExplicitStatusText()}_shouldRenderExplicitStatusText(){return!this._isImplicitStatus()&&this.status!=="default"&&this._hasText(this.statusText)}_renderStatusIcon(e){if(!this._hasStatusText())return;const t=this._getStatusIconName(e);if(t===void 0)return;const o=["gids-field__status-icon"],s=this._getStatusModifierClass(e,"gids-field__status-icon");s!=null&&o.push(s);let n=e;return e==="error"&&(n="danger"),e==="success"&&(n="positive"),E(At,{appearance:"filled",size:"sm",alt:"",name:t,class:o.join(" "),style:{"--gidsIcon-color":`var(--gids-color-icon-${n})`}})}_getCurrentStatus(){return this._isImplicitStatus()&&this._controlValidationMessage!=null?"error":this.status??"implicit"}_getStatusIconName(e){if(e!=="implicit")return e==="success"?"positive":e==="error"?"danger":void 0}_isImplicitStatus(){return this.status==="implicit"||this.status===void 0}_hasText(e){return typeof e=="string"&&e.trim().length>0}_getStatusModifierClass(e,t){if(e!=="implicit")return`${t}--${e}`}_attachControlElement(e){if(this._controlElement===e)return this._updateControlValidationState(),void this._attachFormListeners(e?.form??this._el.closest("form"));if(this._detachControlElement(),this._controlElement=e,this._resetControlValidationState(),this._controlListenerTargets=[],e){const t=this._getControlListenerTargets(e);this._controlListenerTargets=t,t.forEach((o=>{o.addEventListener("input",this._handleControlValueInput),o.addEventListener("change",this._handleControlValueInput),o.addEventListener("blur",this._handleControlBlur,!0),o.addEventListener("invalid",this._handleControlInvalid)})),this._attachFormListeners(e.form??this._el.closest("form"))}this._updateControlValidationState()}_detachControlElement(){this._controlListenerTargets.length>0&&(this._controlListenerTargets?.forEach((e=>{e.removeEventListener("input",this._handleControlValueInput),e.removeEventListener("change",this._handleControlValueInput),e.removeEventListener("blur",this._handleControlBlur,!0),e.removeEventListener("invalid",this._handleControlInvalid)})),this._controlListenerTargets=[]),this._controlElement=null,this._resetControlValidationState(),this._detachFormListeners()}_getControlListenerTargets(e){return e instanceof HTMLInputElement&&e.type==="radio"&&e.name!=null?this._getRadioGroupControls(e):[e]}_getRadioGroupControls(e){const t=e.form;if(t&&e.name!=null){const o=t.elements.namedItem(e.name);if(o instanceof RadioNodeList){const s=Array.from(o).filter((n=>n instanceof HTMLInputElement&&n.type==="radio"&&this._el.contains(n)));if(s.length>0)return s}}if(e.name!=null){const o=`input[type="radio"][name="${CSS.escape(e.name)}"]`,s=Array.from(this._el.querySelectorAll(o));if(s.length>0)return s}return[e]}_attachFormListeners(e){e!==void 0&&(e!==null?e!==this._formElement&&(this._detachFormListeners(),this._formElement=e,this._formElement.addEventListener("reset",this._handleFormReset),this._formElement.addEventListener("submit",this._handleFormSubmit)):this._detachFormListeners())}_detachFormListeners(){this._formElement&&(this._formElement.removeEventListener("reset",this._handleFormReset),this._formElement.removeEventListener("submit",this._handleFormSubmit),this._formElement=null)}_findTextControl(e){for(const t of e){if(t.nodeType!==Node.ELEMENT_NODE)continue;const o=t,s=this._asTextControl(o);if(s!==null)return s;const n=o.querySelector("input, textarea");if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)return n}return null}_asTextControl(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:null}_resetControlValidationState(){this._controlTouched=!1,this._controlValidationMessage!==void 0&&(this._controlValidationMessage=void 0)}_updateControlValidationState(){if(!this._isImplicitStatus())return void(this._controlValidationMessage!==void 0&&(this._controlValidationMessage=void 0));const e=this._controlElement;if(!e||e.disabled)return void(this._controlValidationMessage!==void 0&&(this._controlValidationMessage=void 0));const t=e.validationMessage?.trim()??"";this._controlTouched&&e.matches(":user-invalid")&&t.length>0?this._controlValidationMessage!==t&&(this._controlValidationMessage=t):this._controlValidationMessage!==void 0&&(this._controlValidationMessage=void 0)}get _el(){return this}static get watchers(){return{status:[{_handleStatusChange:0}]}}static get style(){return".gids-field{display:flex;flex-direction:column;gap:var(--gids-gap-075)}.gids-field__header{display:flex;gap:var(--gids-gap-100);align-items:flex-start}.gids-field__header[hidden]{display:none}.gids-field__count{margin-left:auto;color:var(--gids-color-text-subtle);text-align:right;white-space:nowrap;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)}:host([disabled]) .gids-field__count{color:var(--gids-color-text-disabled)}.gids-field__control{display:flex;flex-direction:column;gap:var(--gids-gap-050)}.gids-field__supporting-text,.gids-field__status-text{margin:0;padding-top:var(--gids-padding-vertical-edge-to-element-050);font-family:var(--gids-typography-paragraph-x-small__font-family);font-size:var(--gids-typography-paragraph-x-small__font-size);font-weight:var(--gids-typography-paragraph-x-small__font-weight);letter-spacing:var(--gids-typography-paragraph-x-small__letter-spacing);line-height:var(--gids-typography-paragraph-x-small__line-height);text-transform:var(--gids-typography-paragraph-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-x-small__font-variant-caps, inherit)}.gids-field__supporting-text{color:var(--gids-color-text-subtlest)}.gids-field__status-text{display:flex;align-items:flex-start;gap:var(--gids-gap-050)}.gids-field__status-text .gids-field__status-icon{margin-top:max(0px, -1 * (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-text>span{margin-top:max(0px, (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-icon{flex-shrink:0}.gids-field__status-text--information{color:var(--gids-color-text-information);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--information{--gidsIcon-color:$icon-color}.gids-field__status-text--success{color:var(--gids-color-text-positive);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--success{--gidsIcon-color:$icon-color}.gids-field__status-text--warning{color:var(--gids-color-text-warning);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--warning{--gidsIcon-color:$icon-color}.gids-field__status-text--error{color:var(--gids-color-text-danger);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--error{--gidsIcon-color:$icon-color}"}},[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}]}]);function Je(){typeof customElements<"u"&&["gids-field"].forEach((e=>{e==="gids-field"&&(customElements.get(e)||customElements.define(e,Ze))}))}Je();const Pt=Ze,Rt=Je;M.GidsField=Pt,M.defineCustomElement=Rt,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|
|
5
|
+
`);const S=this["s-cr"].parentElement;return(S.__childNodes?S.childNodes:(y=>{const _=[];for(let m=0;m<y.length;m++){const p=y[m]["s-nr"]||void 0;p&&p.isConnected&&_.push(p)}return _})(S.childNodes)).forEach((y=>{h===G(y)&&g.push(y)})),d?g.filter((y=>y.nodeType===1)):g}).bind(c);c.assignedElements=u(!0),c.assignedNodes=u(!1)})(i),a=e&&e.m&&e.m[o],a&&a.O===n.O&&e.S&&je(e.S)),i},je=e=>{C.i|=1;const t=e.closest(P.toLowerCase());if(t!=null){const o=Array.from(t.__childNodes||t.childNodes).find((n=>n["s-cr"])),s=Array.from(e.__childNodes||e.childNodes);for(const n of o?s.reverse():s)n["s-sh"]!=null&&(L(t,n,o??null),n["s-sh"]=void 0,K=!0)}C.i&=-2},Z=(e,t)=>{C.i|=1;const o=Array.from(e.__childNodes||e.childNodes);if(e["s-sr"]){let s=e;for(;s=s.nextSibling;)s&&s["s-sn"]===e["s-sn"]&&s["s-sh"]===P&&o.push(s)}for(let s=o.length-1;s>=0;s--){const n=o[s];n["s-hn"]!==P&&n["s-ol"]&&(L(B(n).parentNode,n,B(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,K=!0),t&&Z(n,t)}C.i&=-2},Me=(e,t,o,s,n,i)=>{let r,a=e["s-cr"]&&e["s-cr"].parentNode||e;for(a.shadowRoot&&a.tagName===P&&(a=a.shadowRoot),o.O==="template"&&(a=a.content);n<=i;++n)s[n]&&(r=Y(null,o,n),r&&(s[n].S=r,L(a,r,B(t))))},Pe=(e,t,o)=>{for(let s=t;s<=o;++s){const n=e[s];if(n){const i=n.S;Ie(n),i&&(U=!0,i["s-ol"]?i["s-ol"].remove():Z(i,!0),i.remove())}}},J=(e,t,o=!1)=>e.O===t.O&&(e.O==="slot"?e.j===t.j:o?(o&&!e.$&&t.$&&(e.$=t.$),!0):e.$===t.$),B=e=>e&&e["s-ol"]||e,V=(e,t,o=!1)=>{const s=t.S=e.S,n=e.m,i=t.m,r=t.O,a=t.h;let l;a==null?(N=r==="svg"||r!=="foreignObject"&&N,r!=="slot"||D||e.j!==t.j&&(t.S["s-sn"]=t.j||"",je(t.S.parentElement)),re(e,t,N),n!==null&&i!==null?((c,u,d,f,g=!1)=>{let h,S,y=0,_=0,m=0,p=0,w=u.length-1,v=u[0],x=u[w],$=f.length-1,T=f[0],O=f[$];const Qe=d.O==="template"?c.content:c;for(;y<=w&&_<=$;)if(v==null)v=u[++y];else if(x==null)x=u[--w];else if(T==null)T=f[++_];else if(O==null)O=f[--$];else if(J(v,T,g))V(v,T,g),v=u[++y],T=f[++_];else if(J(x,O,g))V(x,O,g),x=u[--w],O=f[--$];else if(J(v,O,g))v.O!=="slot"&&O.O!=="slot"||Z(v.S.parentNode,!1),V(v,O,g),L(Qe,v.S,x.S.nextSibling),v=u[++y],O=f[--$];else if(J(x,T,g))v.O!=="slot"&&O.O!=="slot"||Z(x.S.parentNode,!1),V(x,T,g),L(Qe,x.S,v.S),x=u[--w],T=f[++_];else{for(m=-1,p=y;p<=w;++p)if(u[p]&&u[p].$!==null&&u[p].$===T.$){m=p;break}m>=0?(S=u[m],S.O!==T.O?h=Y(u&&u[_],d,m):(V(S,T,g),u[m]=void 0,h=S.S),T=f[++_]):(h=Y(u&&u[_],d,_),T=f[++_]),h&&L(B(v.S).parentNode,h,B(v.S))}y>w?Me(c,f[$+1]==null?null:f[$+1].S,d,f,_,$):_>$&&Pe(u,y,w)})(s,n,t,i,o):i!==null?(e.h!==null&&(s.textContent=""),Me(s,null,t,i,0,i.length-1)):!o&&n!==null&&Pe(n,0,n.length-1),N&&r==="svg"&&(N=!1)):(l=s["s-cr"])?l.parentNode.textContent=a:e.h!==a&&(s.data=a)},k=[],Re=e=>{let t,o,s;const n=e.__childNodes||e.childNodes;for(const i of n){if(i["s-sr"]&&(t=i["s-cr"])&&t.parentNode){o=t.parentNode.__childNodes||t.parentNode.childNodes;const r=i["s-sn"];for(s=o.length-1;s>=0;s--)if(t=o[s],!(t["s-cn"]||t["s-nr"]||t["s-hn"]===i["s-hn"]||t["s-sh"]&&t["s-sh"]===i["s-hn"]))if(we(t,r)){let a=k.find((l=>l.k===t));U=!0,t["s-sn"]=t["s-sn"]||r,a?(a.k["s-sh"]=i["s-hn"],a.N=i):(t["s-sh"]=i["s-hn"],k.push({N:i,k:t})),t["s-sr"]&&k.map((l=>{we(l.k,t["s-sn"])&&(a=k.find((c=>c.k===t)),a&&!l.N&&(l.N=a.N))}))}else k.some((a=>a.k===t))||k.push({k:t})}i.nodeType===1&&Re(i)}},Ie=e=>{e.v&&e.v.ref&&ae.push((()=>e.v.ref(null))),e.m&&e.m.map(Ie)},ct=(e,t)=>{de.push((()=>e(t)))},L=(e,t,o,s)=>{if(typeof t["s-sn"]=="string"){e.insertBefore(t,o);const{slotNode:n}=(function(i,r){var a;if(!(r=r||((a=i["s-ol"])==null?void 0:a.parentElement)))return{slotNode:null,slotName:""};const l=i["s-sn"]=G(i)||"";return{slotNode:oe(ne(r,"childNodes"),r.tagName,l)[0],slotName:l}})(t);return n&&!s&&n.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),t}return e.__insertBefore?e.__insertBefore(t,o):e?.insertBefore(t,o)},ht=(e,t,o=!1)=>{var s,n,i,r,a;const l=e.$hostElement$,c=e.o,u=e.M||q(null,null);var d;const f=(d=t)&&d.O===Ee?t:E(null,null,t);if(P=l.tagName,c._&&(f.v=f.v||{},c._.forEach((([g,h])=>{f.v[h]=l[g]}))),o&&f.v)for(const g of Object.keys(f.v))l.hasAttribute(g)&&!["key","ref","style","class"].includes(g)&&(f.v[g]=l[g]);if(f.O=null,f.i|=4,e.M=f,f.S=u.S=l.shadowRoot||l,D=!(!(1&c.i)||128&c.i),ie=l["s-cr"],U=!1,V(u,f,o),C.i|=1,K){Re(f.S);for(const g of k){const h=g.k;if(!h["s-ol"]&&b.document){const S=b.document.createTextNode("");S["s-nr"]=h,L(h.parentNode,h["s-ol"]=S,h,o)}}for(const g of k){const h=g.k,S=g.N;if(h.nodeType===1&&o&&(h["s-ih"]=(s=h.hidden)!=null&&s),S){const y=S.parentNode;let _=S.nextSibling;if(_&&_.nodeType===1){let m=(n=h["s-ol"])==null?void 0:n.previousSibling;for(;m;){let p=(i=m["s-nr"])!=null?i:null;if(p&&p["s-sn"]===h["s-sn"]&&y===(p.__parentNode||p.parentNode)){for(p=p.nextSibling;p===h||p?.["s-sr"];)p=p?.nextSibling;if(!p||!p["s-nr"]){_=p;break}}m=m.previousSibling}}if((!_&&y!==(h.__parentNode||h.parentNode)||(h.__nextSibling||h.nextSibling)!==_)&&h!==_){if(L(y,h,_,o),h.nodeType===8&&h.nodeValue.startsWith("s-nt-")){const m=b.document.createTextNode(h.nodeValue.replace(/^s-nt-/,""));m["s-hn"]=h["s-hn"],m["s-sn"]=h["s-sn"],m["s-sh"]=h["s-sh"],m["s-sr"]=h["s-sr"],m["s-ol"]=h["s-ol"],m["s-ol"]["s-nr"]=m,L(h.parentNode,m,h,o),h.parentNode.removeChild(h)}h.nodeType===1&&h.tagName!=="SLOT-FB"&&(h.hidden=(r=h["s-ih"])!=null&&r)}h&&typeof S["s-rf"]=="function"&&S["s-rf"](S)}else h.nodeType===1&&(h.hidden=!0)}}if(U&&xe(f.S),C.i&=-2,k.length=0,!D&&!(1&c.i)&&l["s-cr"]){const g=f.S.__childNodes||f.S.childNodes;for(const h of g)if(h["s-hn"]!==P&&!h["s-sh"]){if(o&&h["s-ih"]==null&&(h["s-ih"]=(a=h.hidden)!=null&&a),h.nodeType===1)h.hidden=!0;else if(h.nodeType===3&&h.nodeValue.trim()){const S=b.document.createComment("s-nt-"+h.nodeValue);S["s-sn"]=h["s-sn"],L(h.parentNode,S,h,o),h.parentNode.removeChild(h)}}}ie=void 0,ae.forEach((g=>g())),ae.length=0,de.forEach((g=>g())),de.length=0},Ve=(e,t)=>{if(t&&!e.A&&t["s-p"]){const o=t["s-p"].push(new Promise((s=>e.A=()=>{t["s-p"].splice(o-1,1),s()})))}},ce=(e,t)=>{if(e.i|=16,4&e.i)return void(e.i|=512);Ve(e,e.C);const o=()=>ut(e,t);if(!t)return st(o);queueMicrotask((()=>{o()}))},ut=(e,t)=>{const o=e.$hostElement$,s=o;if(!s)throw new Error(`Can't render component <${o.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let n;return n=z(s,t?"componentWillLoad":"componentWillUpdate",void 0,o),n=Fe(n,(()=>z(s,"componentWillRender",void 0,o))),Fe(n,(()=>pt(e,s,t)))},Fe=(e,t)=>ft(e)?e.then(t).catch((o=>{console.error(o),t()})):t(),ft=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",pt=async(e,t,o)=>{var s;const n=e.$hostElement$,i=n["s-rc"];o&&(r=>{const a=r.o,l=r.$hostElement$,c=a.i,u=((d,f)=>{var g,h,S;const y=Ce(f),_=W.get(y);if(!b.document)return y;if(d=d.nodeType===11?d:b.document,_)if(typeof _=="string"){let m,p=j.get(d=d.head||d);if(p||j.set(d,p=new Set),!p.has(y)){m=b.document.createElement("style"),m.textContent=_;const w=(g=C.L)!=null?g:(function(){var v,x,$;return($=(x=(v=b.document.head)==null?void 0:v.querySelector('meta[name="csp-nonce"]'))==null?void 0:x.getAttribute("content"))!=null?$:void 0})();if(w!=null&&m.setAttribute("nonce",w),!(1&f.i))if(d.nodeName==="HEAD"){const v=d.querySelectorAll("link[rel=preconnect]"),x=v.length>0?v[v.length-1].nextSibling:d.querySelector("style");d.insertBefore(m,x?.parentNode===d?x:null)}else if("host"in d)if(Q){const v=new((h=d.defaultView)!=null?h:d.ownerDocument.defaultView).CSSStyleSheet;v.replaceSync(_),X?d.adoptedStyleSheets.unshift(v):d.adoptedStyleSheets=[v,...d.adoptedStyleSheets]}else{const v=d.querySelector("style");v?v.textContent=_+v.textContent:d.prepend(m)}else d.append(m);1&f.i&&d.insertBefore(m,null),4&f.i&&(m.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),p&&p.add(y)}}else{let m=j.get(d);if(m||j.set(d,m=new Set),!m.has(y)){const p=(S=d.defaultView)!=null?S:d.ownerDocument.defaultView;let w;if(_.constructor===p.CSSStyleSheet)w=_;else{w=new p.CSSStyleSheet;for(let v=0;v<_.cssRules.length;v++)w.insertRule(_.cssRules[v].cssText,v)}X?d.adoptedStyleSheets.push(w):d.adoptedStyleSheets=[...d.adoptedStyleSheets,w],m.add(y)}}return y})(l.shadowRoot?l.shadowRoot:l.getRootNode(),a);10&c&&(l["s-sc"]=u,l.classList.add(u+"-h"))})(e),gt(e,t,n,o),i&&(i.map((r=>r())),n["s-rc"]=void 0);{const r=(s=n["s-p"])!=null?s:[],a=()=>mt(e);r.length===0?a():(Promise.all(r).then(a).catch(a),e.i|=4,r.length=0)}},gt=(e,t,o,s)=>{try{t=t.render(),e.i&=-17,e.i|=2,ht(e,t,s)}catch(n){I(n,e.$hostElement$)}return null},mt=e=>{const t=e.$hostElement$,o=t,s=e.C;z(o,"componentDidRender",void 0,t),64&e.i?z(o,"componentDidUpdate",void 0,t):(e.i|=64,vt(t),z(o,"componentDidLoad",void 0,t),e.F(t),s||_t()),e.A&&(e.A(),e.A=void 0),512&e.i&&se((()=>ce(e,!1))),e.i&=-517},_t=()=>{se((()=>rt(b,"appload",{detail:{namespace:"gids-core-web"}})))},z=(e,t,o,s)=>{if(e&&e[t])try{return e[t](o)}catch(n){I(n,s)}},vt=e=>e.classList.add("hydrated"),He=(e,t,o,s)=>{const n=A(e);if(!n)return;const i=e,r=n.l.get(t),a=n.i,l=i;o=$e(o,s.t[t][0]);const c=Number.isNaN(r)&&Number.isNaN(o);if(o!==r&&!c){if(n.l.set(t,o),s.R){const u=s.R[t];u&&u.map((d=>{try{const[[f,g]]=Object.entries(d);(128&a||1&g)&&(l?l[f](o,r,t):n.T.push((()=>{n.D[f](o,r,t)})))}catch(f){I(f,i)}}))}if(2&a){if(l.componentShouldUpdate&&l.componentShouldUpdate(o,r,t)===!1&&!(16&a))return;16&a||ce(n,!1)}}},yt=(e,t)=>{var o,s;const n=e.prototype;{e.watchers&&!t.R&&(t.R=Te(e.watchers)),e.deserializers&&!t.H&&(t.H=e.deserializers),e.serializers&&!t.P&&(t.P=e.serializers);const i=Object.entries((o=t.t)!=null?o:{});i.map((([r,[a]])=>{if(31&a||32&a){const{get:l,set:c}=R(n,r)||{};l&&(t.t[r][0]|=2048),c&&(t.t[r][0]|=4096),Object.defineProperty(n,r,{get(){return l?l.apply(this):(u=r,A(this).l.get(u));var u},configurable:!0,enumerable:!0}),Object.defineProperty(n,r,{set(u){const d=A(this);if(d){if(c)return(32&a?this[r]:d.$hostElement$[r])===void 0&&d.l.get(r)&&(u=d.l.get(r)),c.apply(this,[$e(u,a)]),void He(this,r,u=32&a?this[r]:d.$hostElement$[r],t);He(this,r,u,t)}}})}}));{const r=new Map;n.attributeChangedCallback=function(a,l,c){C.jmp((()=>{var u;const d=r.get(a),f=A(this);if(this.hasOwnProperty(d),n.hasOwnProperty(d)&&typeof this[d]=="number"&&this[d]==c)return;if(d==null){const _=f?.i;if(f&&_&&!(8&_)&&c!==l){const m=this,p=(u=t.R)==null?void 0:u[a];p?.forEach((w=>{const[[v,x]]=Object.entries(w);m[v]!=null&&(128&_||1&x)&&m[v].call(m,c,l,a)}))}return}const g=i.find((([_])=>_===d)),h=g&&4&g[1][0],S=h&&c===null&&this[d]===void 0;h&&(c=c!==null&&c!=="false");const y=Object.getOwnPropertyDescriptor(n,d);S||c==this[d]||y.get&&!y.set||(this[d]=c)}))},e.observedAttributes=Array.from(new Set([...Object.keys((s=t.R)!=null?s:{}),...i.filter((([a,l])=>31&l[0])).map((([a,l])=>{var c;const u=l[1]||a;return r.set(u,a),512&l[0]&&((c=t._)==null||c.push([a,u])),u}))]))}}return e},St=(e,t)=>{const o={i:t[0],p:t[1]};try{o.t=t[2],o.R=Te(e.R),o.H=e.H,o.P=e.P,o._=[];const s=e.prototype.connectedCallback,n=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){((i,r)=>{const a={i:0,$hostElement$:i,o:r,l:new Map,U:new Map};a.W=new Promise((c=>a.F=c)),i["s-p"]=[],i["s-rc"]=[];const l=a;i.__stencil__getHostRef=()=>l,512&r.i&&Xe(i,a)})(this,o)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!A(this))return;this.__hasHostListenerAttached=!0}(i=>{if(!(1&C.i)){const r=A(i);if(!r)return;const a=r.o;if(1&r.i)r?.D||r?.W&&r.W.then((()=>{}));else{r.i|=1,12&a.i&&(l=>{if(!b.document)return;const c=l["s-cr"]=b.document.createComment("");c["s-cn"]=!0,L(l,c,l.firstChild)})(i);{let l=i;for(;l=l.parentNode||l.host;)if(l["s-p"]){Ve(r,r.C=l);break}}a.t&&Object.entries(a.t).map((([l,[c]])=>{if(31&c&&Object.prototype.hasOwnProperty.call(i,l)){const u=i[l];delete i[l],i[l]=u}})),(async(l,c,u)=>{let d;try{if(!(32&c.i)&&(c.i|=32,d=l.constructor,customElements.whenDefined(l.localName).then((()=>c.i|=128)),d&&d.style)){let h;typeof d.style=="string"&&(h=d.style);const S=Ce(u);W.has(S)||((y,_,m)=>{let p=W.get(y);Q&&m?(p=p||new CSSStyleSheet,typeof p=="string"?p=_:p.replaceSync(_)):p=_,W.set(y,p)})(S,h,!!(1&u.i))}const f=c.C,g=()=>ce(c,!0);f&&f["s-rc"]?f["s-rc"].push(g):g()}catch(f){I(f,l),c.A&&(c.A(),c.A=void 0),c.F&&c.F(l)}})(i,r,a)}}})(this),s&&s.call(this)},disconnectedCallback(){(async i=>{1&C.i||A(i),j.has(i)&&j.delete(i),i.shadowRoot&&j.has(i.shadowRoot)&&j.delete(i.shadowRoot)})(this),n&&n.call(this)},__attachShadow(){if(this.shadowRoot){if(this.shadowRoot.mode!=="open")throw new Error(`Unable to re-use existing shadow root for ${o.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else ot.call(this,o)}}),Object.defineProperty(e,"is",{value:o.p,configurable:!0}),yt(e,o)}catch(s){return I(s),e}};function It(e){return e}function Ge(e){var t,o,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=Ge(e[t]))&&(s&&(s+=" "),s+=o)}else for(o in e)e[o]&&(s&&(s+=" "),s+=o);return s}function De(){for(var e,t,o=0,s="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=Ge(e))&&(s&&(s+=" "),s+=t);return s}const bt=Object.freeze(Object.defineProperty({__proto__:null,getGidsIconClassNames:({size:e},t)=>De("gids-icon",{"gids-icon--xs":e==="xs","gids-icon--sm":e==="sm","gids-icon--md":e==="md","gids-icon--lg":e==="lg"},t)},Symbol.toStringTag,{value:"Module"})),xt=Object.freeze(Object.defineProperty({__proto__:null,getGidsFieldClassNames:e=>De("gids-field",e)},Symbol.toStringTag,{value:"Module"})),he=Symbol("defaultPath"),Be=Symbol("pathSet"),ue="gids-asset-paths-set";class wt extends EventTarget{#s=new Map;constructor(){super()}#e(t,o){this.#s.set(t,o)}#t(t){return this.#s.get(t)??null}#o=()=>{this.dispatchEvent(new Event(ue))};haveAssetPathsBeenSet(){return this.#t(Be)!==null}setAssetPaths(t,o){if(!this.haveAssetPathsBeenSet()){if(typeof t=="string")this.#e(he,t);else{for(const s in t)this.#e(s,t[s]);o&&this.#e(he,o)}this.#e(Be,"true"),setTimeout(this.#o,0)}}getAssetFilePath(t){const o=this.#t(t);if(o===null){const s=this.#t(he);if(s!==null)return`${s}${s.endsWith("/")?"":"/"}${t}`}return o}onAssetPathsSet(t){if(!this.haveAssetPathsBeenSet())return this.addEventListener(ue,t,{once:!0}),()=>{this.removeEventListener(ue,t)}}}const fe=Symbol.for("GIDS"),Ct=()=>(globalThis[fe]===void 0&&(globalThis[fe]={assetPaths:{}}),globalThis[fe]),Et=e=>{const t=Ct().assetPaths;return t[e]===void 0&&(t[e]=new wt),t[e]};function pe(){return Et("@ganpatiinfo/gids-web-shared")}function Nt(){return pe().haveAssetPathsBeenSet()}function ze(e){return pe().getAssetFilePath(e)}function Tt(e){return pe().onAssetPathsSet(e)}let $t=0;const Lt=(e,t="gids")=>e||`${t}-${$t++}`,We={"icons-other.svg":["accessibility","announcement","approval","archive","audio","backward","banking","battery","bluetooth","bookmark","bulb","calendar","camera","card","cart","chart","chat","cloud","code","compass","desktop","email","emergency","exchange","finance","fingerprint","flag","folder","forward","gift","globe","goals","happy","hashtag","headphones","history","image","insurance","investment","key","link","list","location","lock","map","maximise","microphone","minimise","mobile","moon","network","neutral","new","new-chat","pause","percent","placeholder","play","power","rain","refresh","repeat","sad","save","savings","shield","shuffle","side-navigation","snow","speaker","stop","sun","tablet","temperature","thumbs-down","thumbs-up","travel","trend-down","trend-up","unlock","upset","verified","very-happy","video","volume-down","volume-max","volume-min","volume-mute","volume-up","wallet","wealth","wi-fi","wind"],"icons-core.svg":["arrow-down","arrow-left","arrow-right","arrow-up","attachment","checkmark","chevron-down","chevron-horizontal","chevron-left","chevron-right","chevron-up","chevron-vertical","copy","cross","danger","dashboard","delete","document","download","drag","edit","external","eye","filter","grid","hide","home","information","log-in","log-out","menu","minus","more","notifications","options","phone","plus","positive","printer","question","search","select","select-all","send","settings","share","star","time","upload","user","users","warning"]},qe=new Map;for(const e in We)for(const t of We[e])qe.set(t,e);function Ot(e){return qe.get(e)}function Ue(e,t="regular",o){const s=Ot(e);let n=s??"";return o&&s&&(n=o(s)??s),`${n}#${e}${t==="filled"?"--filled":""}`}const{getGidsIconClassNames:kt}=bt,At=({name:e,size:t,appearance:o,alt:s,class:n,titleId:i,src:r,...a})=>{const l=Lt(i);let c=r;return c===void 0&&Nt()&&(c=Ue(e,o,ze)),E("svg",{ref:u=>{c===void 0&&Tt((()=>{(function(d,f,g){if(!d)return;const h=document.createElementNS("http://www.w3.org/2000/svg","use");h.setAttribute("href",Ue(f,g,ze)),d.appendChild(h)})(u,e,o)}))},width:"16",height:"16",class:kt({size:t},n),role:"img","aria-hidden":s===""?"true":void 0,"aria-labelledby":s===""?void 0:l,...a},s!==""&&E("title",{id:l},s||e),c!==void 0?E("use",{href:c}):null)},F=globalThis.CSSStyleSheet!==void 0?new CSSStyleSheet:void 0;let Ke=!1;F&&document.adoptedStyleSheets?document.adoptedStyleSheets.push(F):console.warn("CSSStyleSheet is not defined. Omitting constructed stylesheet behaviour.");let ge=null;const me=globalThis.MutationObserver!==void 0?new MutationObserver((()=>{Ye()})):void 0,Ye=()=>{if(F===void 0)return!1;const e=(()=>{if(F===void 0)return;const t=[];for(let o=0;o<document.styleSheets.length;o++){const s=document.styleSheets.item(o);if(s)try{let n=-1,i=0;for(let r=0;r<s.cssRules.length;r++){const a=s.cssRules.item(r);if(a?.cssText.startsWith("gids-global-styles-start"))n=r;else if(n>-1){if(a?.cssText.startsWith("gids-global-styles-end")){i=r-n+1;break}t.push(a)}}if(n>-1)return{rulesStartIndex:n,originalRulesCount:i,rules:t,styleSheet:s}}catch(n){if(!(n instanceof DOMException))throw n}}})();if(e!==void 0){const t=e.styleSheet.ownerNode;return me!==void 0&&t!==ge&&(ge&&me.disconnect(),t instanceof Element&&me.observe(t,{childList:!0,characterData:!0,subtree:!0}),ge=t),F.replaceSync((o=>o.rules.map((s=>s.cssText)).join(""))(e)),(o=>{const{rulesStartIndex:s,originalRulesCount:n,styleSheet:i}=o;for(let r=0;r<n;r++)i.deleteRule(s)})(e),!0}return console.warn("refreshConstructedGidsStylesheet: Gids stylesheet is not found in document."),!1},jt=()=>(Ke||(Ke=Ye()),F),{getGidsFieldClassNames:Mt}=xt,Ze=St(class extends et{constructor(e){super(),e!==!1&&this.__registerHost(),this.__attachShadow(),this.status="implicit",this._hasLabel=!1,this._controlListenerTargets=[],this._controlTouched=!1,this._handleLabelSlotChange=()=>{this._hasLabel=(this._labelSlot?.assignedElements()?.length??0)>0},this._setLabelSlot=t=>{this._labelSlot=t??void 0,this._handleLabelSlotChange()},this._setControlSlot=t=>{this._controlSlot=t??void 0,this._handleControlSlotChange()},this._handleControlSlotChange=()=>{const t=this._controlSlot?.assignedNodes({flatten:!0})??[],o=this._findTextControl(t);this._attachControlElement(o)},this._handleControlValueInput=t=>{if(!this._controlTouched){const o=t.target;o instanceof HTMLInputElement&&(o.type==="checkbox"||o.type==="radio")&&(this._controlTouched=!0)}this._updateControlValidationState()},this._handleControlBlur=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleControlInvalid=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleFormReset=()=>{this._controlTouched=!1,this._updateControlValidationState()},this._handleFormSubmit=()=>{this._controlTouched=!0,this._updateControlValidationState()}}_handleStatusChange(){this._isImplicitStatus()||this._controlValidationMessage===void 0?this._updateControlValidationState():this._controlValidationMessage=void 0}connectedCallback(){const e=jt();e!==void 0&&this._el.shadowRoot?.adoptedStyleSheets.push(e)}componentDidLoad(){setTimeout((()=>{this._handleControlSlotChange(),this._handleLabelSlotChange()}))}async reScanControl(){this._handleControlSlotChange()}disconnectedCallback(){this._detachControlElement(),this._detachFormListeners()}render(){const e=this._hasStatusText(),t=this._controlValidationMessage!==void 0?this._controlValidationMessage:this._shouldRenderExplicitStatusText()?this.statusText:void 0,o=this._getCurrentStatus(),s=["gids-field__status-text"];if(e){const n=this._getStatusModifierClass(o,"gids-field__status-text");n!=null&&s.push(n)}return E(Ee,{key:"4bd0ef4ac11ded5f563595485082650801fdbe1b"},E("div",{key:"3617e3301f53dcb21a9beb98b4a23d620e3dd39d",class:Mt()},E("div",{key:"bb1f6710ee27c94346f7ee9459389d901b23d913",class:"gids-field__header",hidden:!this._hasLabelContent()},E("slot",{key:"8fa03ca31936bc6082052b099ac29afea2ec3032",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),E("div",{key:"1b50c69005c2d0b89c47dc01c2dcbb343bdeecff",class:"gids-field__count","aria-live":"polite"},this.count)),E("div",{key:"b8664a96496a6e7289fb14bdadbb59dcee9af3d1",class:"gids-field__control"},E("slot",{key:"bff757557406c0165be3569c4eb34adb1fe346ca",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),E("p",{key:"0638e493fc4ac98f6c10a8392c45ffde8b8340a4",class:"gids-field__supporting-text",hidden:!this._shouldShowHelperText()},this.helperText),e?E("p",{class:s.join(" "),role:"status","aria-live":"polite"},this._renderStatusIcon(o),t!==void 0?E("span",null,t):null):null))}_hasLabelContent(){return this._hasLabel}_hasHelperText(){return this._hasText(this.helperText)}_shouldShowHelperText(){return!!this._hasHelperText()&&!this._hasStatusText()}_hasStatusText(){return this._isImplicitStatus()?this._controlValidationMessage!==void 0:this._shouldRenderExplicitStatusText()}_shouldRenderExplicitStatusText(){return!this._isImplicitStatus()&&this.status!=="default"&&this._hasText(this.statusText)}_renderStatusIcon(e){if(!this._hasStatusText())return;const t=this._getStatusIconName(e);if(t===void 0)return;const o=["gids-field__status-icon"],s=this._getStatusModifierClass(e,"gids-field__status-icon");s!=null&&o.push(s);let n=e;return e==="error"&&(n="danger"),e==="success"&&(n="positive"),E(At,{appearance:"filled",size:"sm",alt:"",name:t,class:o.join(" "),style:{"--gidsIcon-color":`var(--gids-color-icon-${n})`}})}_getCurrentStatus(){return this._isImplicitStatus()&&this._controlValidationMessage!=null?"error":this.status??"implicit"}_getStatusIconName(e){if(e!=="implicit")return e==="success"?"positive":e==="error"?"danger":void 0}_isImplicitStatus(){return this.status==="implicit"||this.status===void 0}_hasText(e){return typeof e=="string"&&e.trim().length>0}_getStatusModifierClass(e,t){if(e!=="implicit")return`${t}--${e}`}_attachControlElement(e){if(this._controlElement===e)return this._updateControlValidationState(),void this._attachFormListeners(e?.form??this._el.closest("form"));if(this._detachControlElement(),this._controlElement=e,this._resetControlValidationState(),this._controlListenerTargets=[],e){const t=this._getControlListenerTargets(e);this._controlListenerTargets=t,t.forEach((o=>{o.addEventListener("input",this._handleControlValueInput),o.addEventListener("change",this._handleControlValueInput),o.addEventListener("blur",this._handleControlBlur,!0),o.addEventListener("invalid",this._handleControlInvalid)})),this._attachFormListeners(e.form??this._el.closest("form"))}this._updateControlValidationState()}_detachControlElement(){this._controlListenerTargets.length>0&&(this._controlListenerTargets?.forEach((e=>{e.removeEventListener("input",this._handleControlValueInput),e.removeEventListener("change",this._handleControlValueInput),e.removeEventListener("blur",this._handleControlBlur,!0),e.removeEventListener("invalid",this._handleControlInvalid)})),this._controlListenerTargets=[]),this._controlElement=null,this._resetControlValidationState(),this._detachFormListeners()}_getControlListenerTargets(e){return e instanceof HTMLInputElement&&e.type==="radio"&&e.name!=null?this._getRadioGroupControls(e):[e]}_getRadioGroupControls(e){const t=e.form;if(t&&e.name!=null){const o=t.elements.namedItem(e.name);if(o instanceof RadioNodeList){const s=Array.from(o).filter((n=>n instanceof HTMLInputElement&&n.type==="radio"&&this._el.contains(n)));if(s.length>0)return s}}if(e.name!=null){const o=`input[type="radio"][name="${CSS.escape(e.name)}"]`,s=Array.from(this._el.querySelectorAll(o));if(s.length>0)return s}return[e]}_attachFormListeners(e){e!==void 0&&(e!==null?e!==this._formElement&&(this._detachFormListeners(),this._formElement=e,this._formElement.addEventListener("reset",this._handleFormReset),this._formElement.addEventListener("submit",this._handleFormSubmit)):this._detachFormListeners())}_detachFormListeners(){this._formElement&&(this._formElement.removeEventListener("reset",this._handleFormReset),this._formElement.removeEventListener("submit",this._handleFormSubmit),this._formElement=null)}_findTextControl(e){for(const t of e){if(t.nodeType!==Node.ELEMENT_NODE)continue;const o=t,s=this._asTextControl(o);if(s!==null)return s;const n=o.querySelector("input, textarea");if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)return n}return null}_asTextControl(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:null}_resetControlValidationState(){this._controlTouched=!1,this._controlValidationMessage!==void 0&&(this._controlValidationMessage=void 0)}_updateControlValidationState(){if(!this._isImplicitStatus())return void(this._controlValidationMessage!==void 0&&(this._controlValidationMessage=void 0));const e=this._controlElement;if(!e||e.disabled)return void(this._controlValidationMessage!==void 0&&(this._controlValidationMessage=void 0));const t=e.validationMessage?.trim()??"";this._controlTouched&&e.matches(":user-invalid")&&t.length>0?this._controlValidationMessage!==t&&(this._controlValidationMessage=t):this._controlValidationMessage!==void 0&&(this._controlValidationMessage=void 0)}get _el(){return this}static get watchers(){return{status:[{_handleStatusChange:0}]}}static get style(){return".gids-field{display:flex;flex-direction:column;gap:var(--gids-gap-075)}.gids-field__header{display:flex;gap:var(--gids-gap-100);align-items:flex-start}.gids-field__header[hidden]{display:none}.gids-field__count{margin-left:auto;color:var(--gids-color-text-subtle);text-align:right;white-space:nowrap;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)}:host([disabled]) .gids-field__count{color:var(--gids-color-text-disabled)}.gids-field__control{display:flex;flex-direction:column;gap:var(--gids-gap-050)}.gids-field__supporting-text,.gids-field__status-text{margin:0;padding-top:var(--gids-padding-vertical-edge-to-element-050);font-family:var(--gids-typography-paragraph-x-small__font-family);font-size:var(--gids-typography-paragraph-x-small__font-size);font-weight:var(--gids-typography-paragraph-x-small__font-weight);letter-spacing:var(--gids-typography-paragraph-x-small__letter-spacing);line-height:var(--gids-typography-paragraph-x-small__line-height);text-transform:var(--gids-typography-paragraph-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-x-small__font-variant-caps, inherit)}.gids-field__supporting-text{color:var(--gids-color-text-subtlest)}.gids-field__status-text{display:flex;align-items:flex-start;gap:var(--gids-gap-050)}.gids-field__status-text .gids-field__status-icon{margin-top:max(0px, -1 * (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-text>span{margin-top:max(0px, (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-icon{flex-shrink:0}.gids-field__status-text--information{color:var(--gids-color-text-information);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--information{--gidsIcon-color:$icon-color}.gids-field__status-text--success{color:var(--gids-color-text-positive);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--success{--gidsIcon-color:$icon-color}.gids-field__status-text--warning{color:var(--gids-color-text-warning);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--warning{--gidsIcon-color:$icon-color}.gids-field__status-text--error{color:var(--gids-color-text-danger);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--error{--gidsIcon-color:$icon-color}"}},[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}]}]);function Je(){typeof customElements<"u"&&["gids-field"].forEach((e=>{e==="gids-field"&&(customElements.get(e)||customElements.define(e,Ze))}))}Je();const Pt=Ze,Rt=Je;M.GidsField=Pt,M.defineCustomElement=Rt,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|