@ganpatiinfo/gids-core-web 8.2.0 → 9.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 +475 -0
- package/dist/css/index.css.map +1 -1
- package/dist/custom-elements.json +332 -0
- package/dist/gids-field.js +1 -1
- package/dist/gids-icon.js +1 -1
- package/dist/gids-input.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-popover.d.ts +11 -0
- package/dist/gids-popover.js +1 -0
- package/dist/gids-scrim.js +1 -1
- package/dist/gids-text-field.js +1 -1
- package/dist/gids-toggle-button.js +1 -1
- package/dist/gids-tooltip.d.ts +11 -0
- package/dist/gids-tooltip.js +1 -0
- package/dist/index.js +1 -1
- package/dist/p-B8kX8Vqv.js +1 -0
- package/dist/p-CFw4_-5A.js +1 -0
- package/dist/{p-Bg3lw2Ae.js → p-DvoHLz_5.js} +1 -1
- package/dist/p-a3JfEYJp.js +1 -0
- package/dist/{p-DjvDBWCb.js → p-iCAclJND.js} +1 -1
- package/dist/types/components/html/GidsButton/GidsButton.d.ts +1 -1
- package/dist/types/components/html/GidsDropdownItem/GidsDropdownItem.d.ts +9 -0
- package/dist/types/components/html/GidsDropdownMenu/GidsDropdownMenu.d.ts +6 -0
- package/dist/types/components/html/GidsDropdownMenuGroup/GidsDropdownMenuGroup.d.ts +5 -0
- package/dist/types/components/html/GidsEditButton/GidsEditButton.d.ts +7 -0
- package/dist/types/components/html/GidsListItem/GidsListItem.d.ts +11 -0
- package/dist/types/components/html/GidsMenu/GidsMenu.d.ts +6 -0
- package/dist/types/components/html/GidsMenuGroup/GidsMenuGroup.d.ts +5 -0
- package/dist/types/components/shared/GidsFloatingElementManager.d.ts +57 -0
- package/dist/types/components/shared/GidsFloatingElementTypes.d.ts +4 -0
- package/dist/types/components/webComponents/GidsPopover/GidsPopover.d.ts +24 -0
- package/dist/types/components/webComponents/GidsTooltip/GidsTooltip.d.ts +23 -0
- package/dist/types/components.d.ts +77 -2
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/childrenValidityUtils.d.ts +8 -0
- package/dist-bundled/es/gids-field.js +1 -1
- package/dist-bundled/es/gids-icon.js +9 -9
- package/dist-bundled/es/gids-input.js +4 -4
- package/dist-bundled/es/gids-overflow-container.js +4 -4
- package/dist-bundled/es/gids-overlay-provider.js +3 -3
- package/dist-bundled/es/gids-password-field.js +19 -19
- package/dist-bundled/es/gids-popover.js +110 -0
- package/dist-bundled/es/gids-scrim.js +3 -3
- package/dist-bundled/es/gids-text-field.js +7 -7
- package/dist-bundled/es/gids-toggle-button.js +5 -5
- package/dist-bundled/es/gids-tooltip.js +66 -0
- package/dist-bundled/es/index.js +33 -19
- package/dist-bundled/es/p-B8kX8Vqv-trBz4jdS.js +7 -0
- package/dist-bundled/es/p-CFw4_-5A-Dzvju3VE.js +25 -0
- package/dist-bundled/es/{p-DijVkS9b-CtFkEtlE.js → p-DijVkS9b-CeV1i4T-.js} +1 -1
- package/dist-bundled/es/{p-Bg3lw2Ae-CkC8nUqv.js → p-DvoHLz_5-C5EvA91N.js} +7 -7
- package/dist-bundled/es/p-a3JfEYJp-DyhDK6VZ.js +1128 -0
- package/dist-bundled/es/{p-DjvDBWCb-C9js0PPL.js → p-iCAclJND-Bmsvd-W1.js} +10 -10
- package/dist-bundled/es/{p-veoOgDXg-DElc87c0.js → p-veoOgDXg-fRinub-C.js} +12 -5
- 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-overflow-container.umd.js +1 -1
- package/dist-bundled/umd/gids-overlay-provider.umd.js +2 -2
- package/dist-bundled/umd/gids-password-field.umd.js +1 -1
- package/dist-bundled/umd/gids-popover.umd.js +5 -0
- package/dist-bundled/umd/gids-scrim.umd.js +1 -1
- package/dist-bundled/umd/gids-text-field.umd.js +1 -1
- package/dist-bundled/umd/gids-toggle-button.umd.js +2 -2
- package/dist-bundled/umd/gids-tooltip.umd.js +5 -0
- package/dist-bundled/umd/index.umd.js +2 -2
- package/dist-bundled/umd-complete/gids-core-web.umd.js +3 -3
- package/package.json +278 -262
- package/dist/p-CWdkmFbc.js +0 -1
- package/dist-bundled/es/p-CWdkmFbc-D89ZE8Mi.js +0 -24
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { C as S, f as P, V as v, N as x, R as i, L as T, H as h } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
2
|
import { i as C } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
|
-
import { n as L, o as O } from "./p-DijVkS9b-
|
|
4
|
-
import {
|
|
5
|
-
import { g as k, d as j } from "./p-veoOgDXg-
|
|
6
|
-
import { h as E } from "./p-
|
|
7
|
-
import {
|
|
3
|
+
import { n as L, o as O } from "./p-DijVkS9b-CeV1i4T-.js";
|
|
4
|
+
import { o as F } from "./p-CFw4_-5A-Dzvju3VE.js";
|
|
5
|
+
import { g as k, d as j } from "./p-veoOgDXg-fRinub-C.js";
|
|
6
|
+
import { h as E } from "./p-iCAclJND-Bmsvd-W1.js";
|
|
7
|
+
import { r as G } from "./p-DvoHLz_5-C5EvA91N.js";
|
|
8
8
|
import { c as g } from "./clsx-OuTLNxxd.js";
|
|
9
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 === "")
|
|
@@ -22,7 +22,7 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
22
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);
|
|
@@ -40,7 +40,7 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
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]/, p = /[a-z]/, b = /[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({
|
|
@@ -81,8 +81,8 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
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" })), V = (e) => {
|
|
86
86
|
switch (e) {
|
|
87
87
|
case "error":
|
|
88
88
|
return "danger";
|
|
@@ -95,9 +95,9 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
95
95
|
default:
|
|
96
96
|
return "globe";
|
|
97
97
|
}
|
|
98
|
-
},
|
|
98
|
+
}, $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
99
99
|
__proto__: null,
|
|
100
|
-
getRequirementsMeterLabelLeadingIcon:
|
|
100
|
+
getRequirementsMeterLabelLeadingIcon: V
|
|
101
101
|
}, Symbol.toStringTag, { value: "Module" })), D = (e) => {
|
|
102
102
|
switch (e) {
|
|
103
103
|
case "error":
|
|
@@ -132,19 +132,19 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
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
|
-
}, { getGidsRequirementsMeterLabelClassNames: ne } = J, { getRequirementsMeterLabelLeadingIcon: le } =
|
|
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 } = N, { getGidsRequirementsMeterClassNames:
|
|
142
|
+
}, { checkRequirementRuleSatisfied: ue } = N, { 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:
|
|
144
|
+
return i("div", { class: oe(n) }, e.map(((r) => {
|
|
145
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
|
})));
|
|
@@ -190,7 +190,7 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
190
190
|
#e;
|
|
191
191
|
render() {
|
|
192
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: "
|
|
193
|
+
return i(T, { key: "674d6baf90ed0a3b9bf6821fb288972ffe255909" }, i("gids-field", { key: "2b1f7f67ef3616edf29843b663c4e1efa8ce416a", disabled: this.disabled, count: void 0, helperText: this.helperText, statusText: this.statusText, status: ce(this.status) }, i(L, { key: "ccd09eba06b8876d216181b8dd7fbcb1ff742d86", 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: "f9a8c8f13347b5dd7620e8498aeb85ec646f000f", 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: "56c43774f755d7ae1ac6e633e39426d2b489414a", name: "leadingIcon" }), i("slot", { key: "1e964257af8f053e0d7c9de51fc0ec48a38b6d18", name: "leadingAccessory" }), i("div", { key: "f453197e76a4c8c01f1fa12a6f0c551a14f71f5d", slot: "trailingAccessory", class: "gids-password-field__trailing-accessory" }, n && i(O, { key: "3127641007c6eb5db4e9b8c6bd521e6cdf80e59b", label: "clear text", size: "lg", onPressDismiss: this._handleDismiss }), a && i(F, { key: "bc537fa18fabe13e16ec2a7c8b5f4611e589c4c7", appearance: "default", size: "xs", width: "intrinsic", disabled: this.disabled, onClick: this._handleRevealPassword }, u ? "Hide" : "Show")))), i("div", { key: "355033afd60090f7b04e48db5c1d675f29663e18", class: "gids-password-field__meters-container" }, i(ie, { key: "fb407fffb5de91b9bc30c1e7593fee01b5fa2a09", meterRules: _, text: this.value, textMinLength: c }), i(de, { key: "6888d147c99ea7902954e55ad91a5d64d7c1a031", requirements: this.requirementsMeterRequirements, text: this.value, textMinLength: c })));
|
|
194
194
|
}
|
|
195
195
|
get _el() {
|
|
196
196
|
return this;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { C as v, f as p, R as a, L as f, H as l } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { g as b } from "./p-a3JfEYJp-DyhDK6VZ.js";
|
|
3
|
+
import { o as E } from "./p-B8kX8Vqv-trBz4jdS.js";
|
|
4
|
+
const h = v(class extends p {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
super(), e !== !1 && this.__registerHost(), this.__attachShadow(), this.placement = "bottom", this.previouslyFocusedElement = null, this.focusableElements = [], this.handleToggleEvent = (t) => {
|
|
7
|
+
t.stopPropagation();
|
|
8
|
+
const n = this.floatingElementManager.isVisible();
|
|
9
|
+
this.floatingElementManager.toggle(), !n && this.floatingElementManager.isVisible() ? this.onPopoverShow() : n && !this.floatingElementManager.isVisible() && this.onPopoverHide();
|
|
10
|
+
}, this.handleDocumentClick = (t) => {
|
|
11
|
+
this.floatingElementManager.isVisible() && !this._el.contains(t.target) && (this.floatingElementManager.hide(), this.onPopoverHide());
|
|
12
|
+
}, this.handleKeyDown = (t) => {
|
|
13
|
+
if (this.floatingElementManager.isVisible()) return t.key === "Escape" ? (t.preventDefault(), this.floatingElementManager.hide(), void this.onPopoverHide()) : void (t.key === "Tab" && this.trapFocus(t));
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
componentDidLoad() {
|
|
17
|
+
this.floatingElementManager = new b(this._el, { htmlFor: this.htmlFor, placement: this.placement, showWithoutDelay: !0, floatingElementSelector: "#popover", arrowElementSelector: "#arrow", visibilityClass: "gids-popover--visible", elementType: E.POPOVER, getAnchorElementFromSlot: (e) => e.querySelector('slot[name="anchor"]')?.assignedElements()[0] || null }), this.floatingElementManager.initialize(), this.setupEventListeners();
|
|
18
|
+
}
|
|
19
|
+
setupEventListeners() {
|
|
20
|
+
const e = this.floatingElementManager.getAnchorElement();
|
|
21
|
+
e && (e.addEventListener("click", this.handleToggleEvent), document.addEventListener("click", this.handleDocumentClick), document.addEventListener("keydown", this.handleKeyDown));
|
|
22
|
+
}
|
|
23
|
+
onPopoverShow() {
|
|
24
|
+
this.previouslyFocusedElement = document.activeElement, this.updateFocusableElements(), setTimeout((() => {
|
|
25
|
+
this.focusableElements.length > 0 && this.focusableElements[0] && this.focusableElements[0].focus();
|
|
26
|
+
}), 50);
|
|
27
|
+
}
|
|
28
|
+
onPopoverHide() {
|
|
29
|
+
this.previouslyFocusedElement && (this.previouslyFocusedElement.focus(), this.previouslyFocusedElement = null);
|
|
30
|
+
}
|
|
31
|
+
updateFocusableElements() {
|
|
32
|
+
const e = this._el.shadowRoot?.querySelector("#popover");
|
|
33
|
+
if (!e) return;
|
|
34
|
+
const t = [], n = c(e);
|
|
35
|
+
t.push(...n);
|
|
36
|
+
const o = this._el.shadowRoot?.querySelector("slot:not([name])");
|
|
37
|
+
o && o.assignedElements({ flatten: !0 }).forEach(((i) => {
|
|
38
|
+
const s = c(i);
|
|
39
|
+
t.push(...s);
|
|
40
|
+
})), this.focusableElements = t.sort(((i, s) => {
|
|
41
|
+
const r = i.compareDocumentPosition(s), m = !!(r & Node.DOCUMENT_POSITION_FOLLOWING), u = !!(r & Node.DOCUMENT_POSITION_PRECEDING);
|
|
42
|
+
return m ? -1 : u ? 1 : 0;
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
trapFocus(e) {
|
|
46
|
+
if (this.focusableElements.length === 0) return;
|
|
47
|
+
const t = this.focusableElements[0], n = this.focusableElements[this.focusableElements.length - 1];
|
|
48
|
+
let o = document.activeElement;
|
|
49
|
+
if (o === this._el) {
|
|
50
|
+
const s = this._el.shadowRoot?.activeElement;
|
|
51
|
+
s !== null && (o = s);
|
|
52
|
+
}
|
|
53
|
+
const i = this.focusableElements.indexOf(o) !== -1;
|
|
54
|
+
e.shiftKey ? o !== t && i || (e.preventDefault(), n && n.focus()) : o !== n && i || (e.preventDefault(), t && t.focus());
|
|
55
|
+
}
|
|
56
|
+
placementChanged(e) {
|
|
57
|
+
this.floatingElementManager?.updateConfig({ placement: e }), this.floatingElementManager?.isVisible() && this.floatingElementManager?.reposition();
|
|
58
|
+
}
|
|
59
|
+
htmlForChanged(e) {
|
|
60
|
+
this.floatingElementManager?.updateConfig({ htmlFor: e }), this.cleanupEventListeners(), this.floatingElementManager?.initialize(), this.setupEventListeners();
|
|
61
|
+
}
|
|
62
|
+
cleanupEventListeners() {
|
|
63
|
+
const e = this.floatingElementManager?.getAnchorElement();
|
|
64
|
+
e && e.removeEventListener("click", this.handleToggleEvent), document.removeEventListener("click", this.handleDocumentClick), document.removeEventListener("keydown", this.handleKeyDown);
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
return a(f, { key: "da6cbab41d3390a940444809d9fe809225c9426e" }, a("slot", { key: "5a5e5f72ab9c793e02b7bd633381363ab37cbf22", name: "anchor" }), a("div", { key: "49ab365961e8a3d9bf0e6ac67f2c73fda1eb7bb3", id: "popover", part: "popover", role: "dialog", "aria-modal": "true", tabindex: "-1" }, a("span", { key: "9815148f291ebca88b4a2bbe09b0e93fcbaab4a7", id: "arrow" }), a("div", { key: "b6d83da9bd180933b5f2453f3e66f66f692e35c1" }, a("slot", { key: "90aaeadfe9d09ebdd6534afa762b35c38a5cc57f" }))));
|
|
68
|
+
}
|
|
69
|
+
disconnectedCallback() {
|
|
70
|
+
this.cleanupEventListeners(), this.floatingElementManager?.destroy();
|
|
71
|
+
}
|
|
72
|
+
get _el() {
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
static get watchers() {
|
|
76
|
+
return { placement: [{ placementChanged: 0 }], htmlFor: [{ htmlForChanged: 0 }] };
|
|
77
|
+
}
|
|
78
|
+
static get style() {
|
|
79
|
+
return "gids-popover{--gidsPopover-background:var(--gids-elevation-surface-overlay-default);--gidsPopover-text-color:var(--gids-color-text-default);--gidsPopover-padding:var(--gids-padding-vertical-edge-to-element-200) var(--gids-padding-horizontal-edge-to-element-300);--gidsPopover-border-radius:var(--gids-border-radius-lg);--gidsPopover-tip-border-radius:2px;--gidsPopover-tip-size:12px;--gidsPopover-shadow:var(--gids-elevation-shadow-overlay);--gidsFloatingElement-background:var(--gidsPopover-background);--gidsFloatingElement-tip-border-radius:var(--gidsPopover-tip-border-radius)}[part=popover]{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);position:absolute;display:inline-block;background-color:var(--gidsPopover-background);color:var(--gidsPopover-text-color);border-radius:var(--gidsPopover-border-radius);box-shadow:var(--gidsPopover-shadow);z-index:1000;opacity:0;pointer-events:none;outline:none}[part=popover]:focus{outline:none}[part=popover].gids-popover--visible{pointer-events:initial;opacity:1}[part=popover] span#arrow{position:absolute;height:var(--gidsPopover-tip-size);width:var(--gidsPopover-tip-size);background-color:var(--gidsPopover-background)}";
|
|
80
|
+
}
|
|
81
|
+
}, [257, "gids-popover", { htmlFor: [513, "for"], placement: [513] }, void 0, { placement: [{ placementChanged: 0 }], htmlFor: [{ htmlForChanged: 0 }] }]), d = (e) => {
|
|
82
|
+
if (!(e instanceof p) || e.tabIndex === -1 || e.hasAttribute("disabled")) return !1;
|
|
83
|
+
const t = getComputedStyle(e);
|
|
84
|
+
if (t.display === "none" || t.visibility === "hidden" || e.hidden) return !1;
|
|
85
|
+
try {
|
|
86
|
+
const n = e.tabIndex;
|
|
87
|
+
e.tabIndex = -1, e.focus();
|
|
88
|
+
const o = document.activeElement === e;
|
|
89
|
+
return e.tabIndex = n, o && e.blur(), o;
|
|
90
|
+
} catch {
|
|
91
|
+
return !1;
|
|
92
|
+
}
|
|
93
|
+
}, c = (e) => {
|
|
94
|
+
const t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (i) => d(i) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP }), n = [];
|
|
95
|
+
d(e) && n.push(e);
|
|
96
|
+
let o = t.nextNode();
|
|
97
|
+
for (; o !== null; ) n.push(o), o = t.nextNode();
|
|
98
|
+
return n;
|
|
99
|
+
};
|
|
100
|
+
function g() {
|
|
101
|
+
typeof customElements < "u" && ["gids-popover"].forEach(((e) => {
|
|
102
|
+
e === "gids-popover" && (customElements.get(l(e)) || customElements.define(l(e), h));
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
g();
|
|
106
|
+
const k = h, F = g;
|
|
107
|
+
export {
|
|
108
|
+
k as GidsPopover,
|
|
109
|
+
F as defineCustomElement
|
|
110
|
+
};
|
|
@@ -16,7 +16,7 @@ const d = (s) => n("gids-scrim", s), m = /* @__PURE__ */ Object.freeze(/* @__PUR
|
|
|
16
16
|
s !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(s), this.activeClasses = a(this.extraClasses);
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return e("div", { key: "
|
|
19
|
+
return e("div", { key: "da4b587303359a6075411a1843e03eff6eed68ce", class: this.activeClasses, part: "root" }, e("slot", { key: "5a52f6e5628c771b2dd0f5a6221005a0ed8b9fbb" }));
|
|
20
20
|
}
|
|
21
21
|
get _el() {
|
|
22
22
|
return this;
|
|
@@ -34,8 +34,8 @@ function i() {
|
|
|
34
34
|
}));
|
|
35
35
|
}
|
|
36
36
|
i();
|
|
37
|
-
const
|
|
37
|
+
const u = r, C = i;
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
u as GidsScrim,
|
|
40
40
|
C as defineCustomElement
|
|
41
41
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
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
|
-
import { i as
|
|
3
|
-
import { o as
|
|
4
|
-
import { h as g } from "./p-
|
|
5
|
-
import {
|
|
6
|
-
import { g as _ } from "./p-veoOgDXg-
|
|
2
|
+
import { i as m } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
|
+
import { o as b, n as p } from "./p-DijVkS9b-CeV1i4T-.js";
|
|
4
|
+
import { h as g } from "./p-iCAclJND-Bmsvd-W1.js";
|
|
5
|
+
import { r as x } from "./p-DvoHLz_5-C5EvA91N.js";
|
|
6
|
+
import { g as _ } from "./p-veoOgDXg-fRinub-C.js";
|
|
7
7
|
const v = (e, t) => {
|
|
8
8
|
if (!(e === void 0 || t === void 0))
|
|
9
9
|
return `${e} / ${Math.max(t, 0)}`;
|
|
@@ -40,7 +40,7 @@ const v = (e, t) => {
|
|
|
40
40
|
})), this._slotContentObserver.observe(this._el, { childList: !0, subtree: !1, attributes: !0, attributeFilter: ["slot"] });
|
|
41
41
|
}
|
|
42
42
|
connectedCallback() {
|
|
43
|
-
const e =
|
|
43
|
+
const e = m();
|
|
44
44
|
e !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(e), this._startSlotContentObserver();
|
|
45
45
|
}
|
|
46
46
|
disconnectedCallback() {
|
|
@@ -50,7 +50,7 @@ const v = (e, t) => {
|
|
|
50
50
|
#t;
|
|
51
51
|
render() {
|
|
52
52
|
const { id: e, ...t } = this.inputProps ?? {}, n = e ?? this.#e, d = this.showClearButton && this.value !== void 0 && this.value.length > 0;
|
|
53
|
-
return i("gids-field", { key: "
|
|
53
|
+
return i("gids-field", { key: "80f1981d584f417e010322b2c5ec07a60dc1f388", disabled: this.disabled, count: F(this.value?.length, this.maxLength), helperText: this.helperText, statusText: this.statusText, status: O(this.status) }, i(p, { key: "f222a99181809cf9ccdc1ad9ceed98c985681553", slot: "label", disabled: this.disabled, info: i("slot", { name: "info" }), fieldRequirement: this.fieldRequirement, fieldRequirementOptionalText: this.fieldRequirementOptionalText, fieldRequirementRequiredText: this.fieldRequirementRequiredText, isLabelSentence: this.isLabelSentence, htmlFor: n }, this.label), i("gids-input", { key: "7ff6cf33f16be119ecc705af8a7fb8965b01b74c", 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: n, maxLength: this.maxLength } }, i("slot", { key: "d3e260125c8d8f56870e6f484894bd1a1aa8e03b", name: "leadingIcon" }), i("slot", { key: "0445885d41f43d6a76f48ed482673a266b6a0182", name: "leadingAccessory" }), d && i(b, { key: "be16083a8e414be66ceb37e076f9ebc01cc4fc8f", label: "clear text", slot: "trailingAccessory", size: "lg", onPressDismiss: this._handleDismiss }), i("slot", { key: "0dc7436a9ca21e57409cc18340747295915d2d5f", name: "trailingIcon" })));
|
|
54
54
|
}
|
|
55
55
|
get _el() {
|
|
56
56
|
return this;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as l, f as n, V as
|
|
2
|
-
import {
|
|
1
|
+
import { C as l, f as n, V as d, R as t, D as a, H as s } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { o as c } from "./p-CFw4_-5A-Dzvju3VE.js";
|
|
3
3
|
import { i as h } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
4
4
|
const i = l(class extends n {
|
|
5
5
|
get selected() {
|
|
@@ -9,7 +9,7 @@ const i = l(class extends n {
|
|
|
9
9
|
this.#e = e === void 0 ? void 0 : !!e;
|
|
10
10
|
}
|
|
11
11
|
constructor(e) {
|
|
12
|
-
super(), e !== !1 && this.__registerHost(), this.__attachShadow(), this.select =
|
|
12
|
+
super(), e !== !1 && this.__registerHost(), this.__attachShadow(), this.select = d(this, "select"), this._toggle = this._toggle.bind(this);
|
|
13
13
|
}
|
|
14
14
|
#e;
|
|
15
15
|
connectedCallback() {
|
|
@@ -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(
|
|
24
|
+
return t(a, { key: "56bc99780f392c4d5064eaa47819ee1ff0897c79" }, t("style", { key: "e330f982d625eeb7f72ede3f382231fb5791ec47" }, `:host {
|
|
25
25
|
display: ${this.width === "full" ? "block" : "inline-block"}
|
|
26
|
-
}`), t(
|
|
26
|
+
}`), t(c, { key: "ccef97603f645ba92fd4180263d2cbeff0a54a07", 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: "7094015cf47ef8d045955419aa43f03174145928" })));
|
|
27
27
|
}
|
|
28
28
|
_onlyHasLeadingIcon() {
|
|
29
29
|
const e = this._el.childNodes;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { C as n, f as l, R as e, L as s, H as i } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { g as r } from "./p-a3JfEYJp-DyhDK6VZ.js";
|
|
3
|
+
import { i as d } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
4
|
+
import { o as h } from "./p-B8kX8Vqv-trBz4jdS.js";
|
|
5
|
+
const o = n(class extends l {
|
|
6
|
+
constructor(t) {
|
|
7
|
+
super(), t !== !1 && this.__registerHost(), this.__attachShadow(), this.placement = "bottom", this.showWithoutDelay = !1, this.lockToMainAxis = !1, this.handleShowEvent = () => {
|
|
8
|
+
this.floatingElementManager.showAfterDelay();
|
|
9
|
+
}, this.handleHideEvent = () => {
|
|
10
|
+
this.floatingElementManager.hideAfterDelay();
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
connectedCallback() {
|
|
14
|
+
const t = d();
|
|
15
|
+
t !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(t);
|
|
16
|
+
}
|
|
17
|
+
componentDidLoad() {
|
|
18
|
+
this.floatingElementManager = new r(this._el, { htmlFor: this.htmlFor, placement: this.placement, showWithoutDelay: this.showWithoutDelay, lockToMainAxis: this.lockToMainAxis, floatingElementSelector: "#tooltip", arrowElementSelector: "#arrow", visibilityClass: "gids-tooltip--visible", elementType: h.TOOLTIP, getAnchorElementFromSlot: (t) => t.querySelector("slot")?.assignedElements()[0] || null }), this.floatingElementManager.initialize(), this.setupEventListeners();
|
|
19
|
+
}
|
|
20
|
+
setupEventListeners() {
|
|
21
|
+
const t = this.floatingElementManager.getAnchorElement();
|
|
22
|
+
t && (t.addEventListener("mouseenter", this.handleShowEvent), t.addEventListener("focus", this.handleShowEvent), t.addEventListener("mouseleave", this.handleHideEvent), t.addEventListener("blur", this.handleHideEvent));
|
|
23
|
+
}
|
|
24
|
+
placementChanged(t) {
|
|
25
|
+
this.floatingElementManager?.updateConfig({ placement: t }), this.floatingElementManager?.isVisible() && this.floatingElementManager?.reposition();
|
|
26
|
+
}
|
|
27
|
+
showWithoutDelayChanged(t) {
|
|
28
|
+
this.floatingElementManager?.updateConfig({ showWithoutDelay: t });
|
|
29
|
+
}
|
|
30
|
+
lockToMainAxisChanged(t) {
|
|
31
|
+
this.floatingElementManager?.updateConfig({ lockToMainAxis: t });
|
|
32
|
+
}
|
|
33
|
+
htmlForChanged(t) {
|
|
34
|
+
this.floatingElementManager?.updateConfig({ htmlFor: t }), this.cleanupEventListeners(), this.floatingElementManager?.initialize(), this.setupEventListeners();
|
|
35
|
+
}
|
|
36
|
+
cleanupEventListeners() {
|
|
37
|
+
const t = this.floatingElementManager?.getAnchorElement();
|
|
38
|
+
t && (t.removeEventListener("mouseenter", this.handleShowEvent), t.removeEventListener("focus", this.handleShowEvent), t.removeEventListener("mouseleave", this.handleHideEvent), t.removeEventListener("blur", this.handleHideEvent));
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return e(s, { key: "49747828eaa09ead2d1e2f6d9d28b66c2db76103" }, e("slot", { key: "9ad53320553f1377f01f026a95f7cb894d91c98a" }), e("span", { key: "6116e418faa09d82975a3830f7e0bedcbdd8e87f", id: "tooltip", part: "tooltip", role: "tooltip" }, e("span", { key: "677d275b2e161441d76315c50a60a941d6dd010a", id: "arrow" }), this.tooltipText));
|
|
42
|
+
}
|
|
43
|
+
disconnectedCallback() {
|
|
44
|
+
this.cleanupEventListeners(), this.floatingElementManager?.destroy();
|
|
45
|
+
}
|
|
46
|
+
get _el() {
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
static get watchers() {
|
|
50
|
+
return { placement: [{ placementChanged: 0 }], showWithoutDelay: [{ showWithoutDelayChanged: 0 }], lockToMainAxis: [{ lockToMainAxisChanged: 0 }], htmlFor: [{ htmlForChanged: 0 }] };
|
|
51
|
+
}
|
|
52
|
+
static get style() {
|
|
53
|
+
return "gids-tooltip{--gidsTooltip-background:var(--gids-color-background-neutral-bold-default);--gidsTooltip-text-color:var(--gids-color-text-inverse);--gidsTooltip-padding:var(--gids-padding-vertical-edge-to-element-100) var(--gids-padding-horizontal-edge-to-element-200);--gidsTooltip-border-radius:var(--gids-border-radius-sm);--gidsTooltip-tip-border-radius:2px;--gidsTooltip-tip-size:12px;--gidsFloatingElement-background:var(--gidsTooltip-background);--gidsFloatingElement-tip-border-radius:var(--gidsTooltip-tip-border-radius)}[part=tooltip]{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);position:absolute;display:inline-block;hyphens:auto;background-color:var(--gidsTooltip-background);color:var(--gidsTooltip-text-color);padding:var(--gidsTooltip-padding);border-radius:var(--gidsTooltip-border-radius);z-index:1000;opacity:0;pointer-events:none}[part=tooltip].gids-tooltip--visible{pointer-events:initial;opacity:1}[part=tooltip] span#arrow{position:absolute;height:var(--gidsTooltip-tip-size);width:var(--gidsTooltip-tip-size)}";
|
|
54
|
+
}
|
|
55
|
+
}, [257, "gids-tooltip", { htmlFor: [513, "for"], tooltipText: [513, "tooltip-text"], placement: [513], showWithoutDelay: [516, "show-without-delay"], lockToMainAxis: [4, "lock-to-main-axis"] }, void 0, { placement: [{ placementChanged: 0 }], showWithoutDelay: [{ showWithoutDelayChanged: 0 }], lockToMainAxis: [{ lockToMainAxisChanged: 0 }], htmlFor: [{ htmlForChanged: 0 }] }]);
|
|
56
|
+
function a() {
|
|
57
|
+
typeof customElements < "u" && ["gids-tooltip"].forEach(((t) => {
|
|
58
|
+
t === "gids-tooltip" && (customElements.get(i(t)) || customElements.define(i(t), o));
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
a();
|
|
62
|
+
const v = o, f = a;
|
|
63
|
+
export {
|
|
64
|
+
v as GidsTooltip,
|
|
65
|
+
f as defineCustomElement
|
|
66
|
+
};
|
package/dist-bundled/es/index.js
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { w as y, a as A, j as u, F as G, b as P } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { i as E, n as x } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
|
+
import { o as $ } from "./p-B8kX8Vqv-trBz4jdS.js";
|
|
4
|
+
import { s as d } from "./assets-Drv1fXkA.js";
|
|
5
|
+
function i(e, r) {
|
|
6
|
+
d(e, r);
|
|
6
7
|
}
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
|
|
8
|
+
const c = (e) => {
|
|
9
|
+
i(e);
|
|
10
|
+
}, f = (e) => {
|
|
11
|
+
i(e);
|
|
12
|
+
}, h = ({ children: e, classNameToBeValidated: r, childrenToBeValidated: o, currentComponentName: a }) => {
|
|
13
|
+
if (e != null) {
|
|
14
|
+
const n = Array.isArray(e) ? e : [e];
|
|
15
|
+
for (const s of n) {
|
|
16
|
+
if (!s || typeof s != "object" || !("vtag" in s)) throw Error(`HTML/JSX Render Error: Invalid child type passed to ${a}. Expected ${o}.`);
|
|
17
|
+
{
|
|
18
|
+
const t = s.vtag;
|
|
19
|
+
if (t !== r && t !== o) throw Error(`HTML/JSX Render Error: <${a}> only accepts <${o}> as direct children. Received element tag: "${typeof t == "function" ? t.name : t}".`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
11
23
|
};
|
|
12
24
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
i as
|
|
21
|
-
|
|
22
|
-
G as
|
|
25
|
+
$ as GidsFloatingElementType,
|
|
26
|
+
y as getAssetPath,
|
|
27
|
+
E as getConstructedGidsStylesheet,
|
|
28
|
+
x as refreshConstructedGidsStylesheet,
|
|
29
|
+
A as render,
|
|
30
|
+
u as setAssetPath,
|
|
31
|
+
c as setGidsAssetFilePaths,
|
|
32
|
+
i as setGidsAssetPaths,
|
|
33
|
+
f as setGidsDefaultAssetDirPath,
|
|
34
|
+
G as setNonce,
|
|
35
|
+
P as setPlatformOptions,
|
|
36
|
+
h as testHtmlChildrenValidity
|
|
23
37
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { R as a } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { l as h } from "./p-DybsMR13-DpmsG3Q1.js";
|
|
3
|
+
import { c as _ } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
const v = ({ appearance: t, size: n, width: d, destructive: s, positive: o, loading: l }, i, e) => _("gids-button", {
|
|
5
|
+
"gids-button--primary": t === "primary",
|
|
6
|
+
"gids-button--subtle": t === "subtle",
|
|
7
|
+
"gids-button--xs": n === "xs",
|
|
8
|
+
"gids-button--sm": n === "sm",
|
|
9
|
+
// 'gids-button--md': size === 'md',
|
|
10
|
+
"gids-button--lg": n === "lg",
|
|
11
|
+
"gids-button--full-width": d === "full",
|
|
12
|
+
"gids-button--destructive": s && !o,
|
|
13
|
+
"gids-button--positive": o && !s,
|
|
14
|
+
"gids-button--icon-only": i,
|
|
15
|
+
"gids-button--loading": l
|
|
16
|
+
}, e), w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
17
|
+
__proto__: null,
|
|
18
|
+
getGidsButtonClassNames: v
|
|
19
|
+
}, Symbol.toStringTag, { value: "Module" })), b = (t) => t !== void 0 && (!Array.isArray(t) || t.length > 0), { getGidsButtonClassNames: x } = w, z = ({ appearance: t, size: n, destructive: d, positive: s, loading: o, width: l, leadingIcon: i, trailingIcon: e, as: c, disabled: p, class: m, forceIconOnly: y = !1, ...u }, g) => {
|
|
20
|
+
const r = c || "button", f = n === "lg" || n === void 0 ? "md" : n;
|
|
21
|
+
return r !== "button" || "type" in u || (u.type = "button"), a(r, { class: x({ appearance: t, size: n, destructive: d, loading: o, width: l, positive: s }, y || g.length === 0 && b(i) && !b(e), m), disabled: r === "button" ? p : void 0, ...u }, a("span", { class: "gids-button__content" }, i, g), o && a(h, { size: f, indeterminate: !0 }), e);
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
z as o
|
|
25
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { R as o } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
-
import { d as f } from "./p-veoOgDXg-
|
|
2
|
+
import { d as f } from "./p-veoOgDXg-fRinub-C.js";
|
|
3
3
|
import { c as u } from "./clsx-OuTLNxxd.js";
|
|
4
4
|
const _ = ({ disabled: e }, s) => u("gids-label", { "gids-label--disabled": e }, s), y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5
5
|
__proto__: null,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as s, C as l, f as u, R as a, L as
|
|
2
|
-
import { d as n } from "./p-veoOgDXg-
|
|
3
|
-
import { l as
|
|
1
|
+
import { H as s, C as l, f as u, R as a, L as r } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { d as n } from "./p-veoOgDXg-fRinub-C.js";
|
|
3
|
+
import { l as d } from "./p-DybsMR13-DpmsG3Q1.js";
|
|
4
4
|
const c = (e) => e.type === "hidden", f = (e) => {
|
|
5
5
|
if (!(e instanceof HTMLElement))
|
|
6
6
|
return !1;
|
|
@@ -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 a(
|
|
57
|
+
return a(r, { key: "c1e035111a8a80ef0b442bc0298785f0c7445113" }, a("slot", { key: "49bd52d5bbc7c9b962b27f6404ca9817de699b31", name: "leadingIcon" }), this.leadingLabel && a("span", { key: "2863a61da1f009b7287af508d9809d66787ddaf7", class: "gids-input__label" }, this.leadingLabel), a("slot", { key: "f74e8993fb8b1dd186a53c4557ceffac681f2881", name: "leadingAccessory" }), a("input", { key: "2bc7f84858a8533f33c66834ad212c38ad698075", ...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 }), a("slot", { key: "
|
|
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: "2116db712ac02853ae4974b4ad618b5eee372b3f", name: "trailingAccessory" }), this.trailingLabel && a("span", { key: "35dc9b1c2bd2ef493b0ce1a602688f41854c922d", class: "gids-input__label" }, this.trailingLabel), a("slot", { key: "6cc1b37e9a0b979f04de753d8527aaae2970762c", name: "trailingIcon" }), this.status === "incomplete" && a(n, { key: "8c963877cee9bc941b1236a6b647fc1790a41cdc", name: "warning", appearance: "filled", class: "gids-input__warning-icon" }), this.status === "complete" && a(n, { key: "a2c401261ff8defa2802b5bbc336a6b4cc177ff4", name: "positive", appearance: "filled", class: "gids-input__positive-icon" }), this.loading && a(d, { key: "4dd22cd62d87ff444794fc8f1c4f0cc78e14738a", size: "md", indeterminate: !0 }));
|
|
60
60
|
}
|
|
61
61
|
get _el() {
|
|
62
62
|
return this;
|
|
@@ -69,6 +69,6 @@ function h() {
|
|
|
69
69
|
}
|
|
70
70
|
h();
|
|
71
71
|
export {
|
|
72
|
-
o as
|
|
73
|
-
h as
|
|
72
|
+
o as l,
|
|
73
|
+
h as r
|
|
74
74
|
};
|