@ganpatiinfo/gids-core-web 8.1.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 +696 -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.d.ts +11 -0
- package/dist/gids-overflow-container.js +1 -0
- 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-BVh4zbX4.js → p-DvoHLz_5.js} +1 -1
- package/dist/p-a3JfEYJp.js +1 -0
- package/dist/{p-BplPYg8z.js → p-iCAclJND.js} +1 -1
- package/dist/types/components/html/GidsAccordionItem/GidsAccordionItem.d.ts +4 -0
- package/dist/types/components/html/GidsAccordionItemContent/GidsAccordionItemContent.d.ts +5 -0
- package/dist/types/components/html/GidsAccordionItemHeader/GidsAccordionItemHeader.d.ts +4 -0
- 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/GidsFeedbackBlock/GidsFeedbackBlock.d.ts +4 -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/html/GidsProgressBar/GidsProgressBar.d.ts +4 -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/GidsOverflowContainer/GidsOverflowContainer.d.ts +10 -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 +101 -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 +2 -2
- package/dist-bundled/es/gids-icon.js +9 -9
- package/dist-bundled/es/gids-input.js +1 -1
- package/dist-bundled/es/gids-overflow-container.js +39 -0
- package/dist-bundled/es/gids-overlay-provider.js +3 -3
- package/dist-bundled/es/gids-password-field.js +14 -14
- package/dist-bundled/es/gids-popover.js +110 -0
- package/dist-bundled/es/gids-scrim.js +5 -5
- package/dist-bundled/es/gids-text-field.js +13 -13
- 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-BVh4zbX4-C4UJ8LPX.js → p-DvoHLz_5-C5EvA91N.js} +6 -6
- package/dist-bundled/es/p-a3JfEYJp-DyhDK6VZ.js +1128 -0
- package/dist-bundled/es/{p-BplPYg8z-B8uAAfo4.js → p-iCAclJND-Bmsvd-W1.js} +2 -2
- 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 +5 -0
- package/dist-bundled/umd/gids-overlay-provider.umd.js +2 -2
- package/dist-bundled/umd/gids-password-field.umd.js +2 -2
- package/dist-bundled/umd/gids-popover.umd.js +5 -0
- package/dist-bundled/umd/gids-scrim.umd.js +2 -2
- package/dist-bundled/umd/gids-text-field.umd.js +2 -2
- package/dist-bundled/umd/gids-toggle-button.umd.js +3 -3
- package/dist-bundled/umd/gids-tooltip.umd.js +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 -254
- package/dist/p-CWdkmFbc.js +0 -1
- package/dist-bundled/es/p-CWdkmFbc-D89ZE8Mi.js +0 -24
|
@@ -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 { r as x } from "./p-
|
|
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)}`;
|
|
@@ -16,14 +16,14 @@ const v = (e, t) => {
|
|
|
16
16
|
default:
|
|
17
17
|
return "default";
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, l = /* @__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 } = l, 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 } = l, { inputToGidsFieldStatus: O } = C, a = u(class extends c {
|
|
27
27
|
constructor(e) {
|
|
28
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");
|
|
@@ -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() {
|
|
@@ -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 ?? {}, n = e ?? this.#e, d = this.showClearButton && this.value !== void 0 && this.value.length > 0;
|
|
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;
|
|
@@ -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), a);
|
|
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 = a, G = r;
|
|
75
75
|
export {
|
|
76
76
|
I as GidsTextField,
|
|
77
77
|
G as defineCustomElement
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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 {
|
|
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() {
|
|
@@ -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: "56bc99780f392c4d5064eaa47819ee1ff0897c79" }, t("style", { key: "e330f982d625eeb7f72ede3f382231fb5791ec47" }, `:host {
|
|
25
25
|
display: ${this.width === "full" ? "block" : "inline-block"}
|
|
26
|
-
}`), t(c, { key: "
|
|
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;
|
|
@@ -39,8 +39,8 @@ function o() {
|
|
|
39
39
|
}));
|
|
40
40
|
}
|
|
41
41
|
o();
|
|
42
|
-
const u = i,
|
|
42
|
+
const u = i, m = o;
|
|
43
43
|
export {
|
|
44
44
|
u as GidsToggleButton,
|
|
45
|
-
|
|
45
|
+
m as defineCustomElement
|
|
46
46
|
};
|
|
@@ -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
|
|
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;
|
|
@@ -15,7 +15,7 @@ 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 u {
|
|
19
19
|
constructor(e) {
|
|
20
20
|
super(), e !== !1 && this.__registerHost(), this.#e = {}, this._focusInput = (t) => {
|
|
21
21
|
const i = t.target;
|
|
@@ -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;
|