@ganpatiinfo/gids-core-web 8.0.0 → 8.2.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 +221 -0
- package/dist/css/index.css.map +1 -1
- 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-scrim.js +1 -1
- package/dist/gids-text-field.js +1 -1
- package/dist/gids-toggle-button.js +1 -1
- package/dist/{p-BVh4zbX4.js → p-Bg3lw2Ae.js} +1 -1
- package/dist/{p-BplPYg8z.js → p-DjvDBWCb.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/GidsBreadcrumbItem/GidsBreadcrumbItem.d.ts +2 -1
- package/dist/types/components/html/GidsFeedbackBlock/GidsFeedbackBlock.d.ts +4 -0
- package/dist/types/components/html/GidsProgressBar/GidsProgressBar.d.ts +4 -0
- package/dist/types/components/webComponents/GidsOverflowContainer/GidsOverflowContainer.d.ts +10 -0
- package/dist/types/components.d.ts +26 -2
- package/dist-bundled/es/gids-field.js +2 -2
- package/dist-bundled/es/gids-icon.js +1 -1
- package/dist-bundled/es/gids-input.js +4 -4
- package/dist-bundled/es/gids-overflow-container.js +39 -0
- package/dist-bundled/es/gids-overlay-provider.js +1 -1
- package/dist-bundled/es/gids-password-field.js +21 -21
- package/dist-bundled/es/gids-scrim.js +3 -3
- package/dist-bundled/es/gids-text-field.js +9 -9
- package/dist-bundled/es/gids-toggle-button.js +7 -7
- package/dist-bundled/es/{p-BVh4zbX4-C4UJ8LPX.js → p-Bg3lw2Ae-CkC8nUqv.js} +6 -6
- package/dist-bundled/es/{p-BplPYg8z-B8uAAfo4.js → p-DjvDBWCb-C9js0PPL.js} +9 -9
- package/dist-bundled/umd/gids-field.umd.js +1 -1
- package/dist-bundled/umd/gids-icon.umd.js +1 -1
- 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 +1 -1
- package/dist-bundled/umd/gids-password-field.umd.js +2 -2
- 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-complete/gids-core-web.umd.js +3 -3
- package/package.json +13 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FunctionalComponent } from '../../../stencil-public-runtime';
|
|
2
|
+
import { GidsAccordionItemContentCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
3
|
+
import { JSXBase } from '../../../stencil-public-runtime';
|
|
4
|
+
export type GidsAccordionItemContentProps = JSXBase.IntrinsicElements['div'] & Omit<GidsAccordionItemContentCommonProps<never>, 'children'>;
|
|
5
|
+
export declare const GidsAccordionItemContent: FunctionalComponent<GidsAccordionItemContentProps>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GidsAccordionItemHeaderCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import type { FunctionalComponent, JSXBase } from '../../../stencil-public-runtime';
|
|
3
|
+
export type GidsAccordionItemHeaderProps = JSXBase.IntrinsicElements['summary'] & Omit<GidsAccordionItemHeaderCommonProps<never>, 'children'>;
|
|
4
|
+
export declare const GidsAccordionItemHeader: FunctionalComponent<GidsAccordionItemHeaderProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type GidsBreadcrumbItemCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
2
|
import { type FunctionalComponent, type JSXBase, type VNode } from '../../../stencil-public-runtime';
|
|
3
|
-
|
|
3
|
+
import { IconName } from '@ganpatiinfo/gids-web-theme-interface';
|
|
4
|
+
export type GidsBreadcrumbItemProps = JSXBase.IntrinsicElements['li'] & GidsBreadcrumbItemCommonProps<VNode | string, IconName, string> & {
|
|
4
5
|
href?: string;
|
|
5
6
|
onClick?: (even: MouseEvent) => void;
|
|
6
7
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FunctionalComponent, VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { GidsFeedbackBlockCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
3
|
+
export type GidsFeedbackBlockProps = GidsFeedbackBlockCommonProps<VNode | VNode[], VNode[], VNode | VNode[] | string>;
|
|
4
|
+
export declare const GidsFeedbackBlock: FunctionalComponent<GidsFeedbackBlockProps>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type GidsProgressBarCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { FunctionalComponent, JSXBase } from '../../../stencil-public-runtime';
|
|
3
|
+
export type GidsProgressBarProps = JSXBase.IntrinsicElements['div'] & GidsProgressBarCommonProps;
|
|
4
|
+
export declare const GidsProgressBar: FunctionalComponent<GidsProgressBarProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type GidsOverflowContainerCommonProps, GidsOverflowContainerShadowLocation } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
export declare class GidsOverflowContainer implements Omit<GidsOverflowContainerCommonProps<never>, 'children'> {
|
|
3
|
+
private _el;
|
|
4
|
+
shadowLocation?: GidsOverflowContainerShadowLocation;
|
|
5
|
+
private _textArea;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
componentDidLoad(): void;
|
|
8
|
+
private calculateShadows;
|
|
9
|
+
render(): any;
|
|
10
|
+
}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { GidsComponentButtonClickHandler, GidsIconWebProps, GidsInputWebStatus, GidsWebFieldStatus, RemovedGidsOverlayProviderNotificationQueueWebProps, RemovedGidsOverlayProviderSnackbarQueueWebProps, RemoveGidsInputProps, RemoveGidsPasswordFieldProps, RemoveGidsTextFieldProps, TextInputTypes } from "@ganpatiinfo/gids-web-shared";
|
|
9
9
|
import { IconAppearance, IconName } from "@ganpatiinfo/gids-web-theme-interface";
|
|
10
|
-
import { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
|
|
10
|
+
import { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsOverflowContainerShadowLocation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
|
|
11
11
|
import { JSXBase } from "./stencil-public-runtime";
|
|
12
12
|
export { GidsComponentButtonClickHandler, GidsIconWebProps, GidsInputWebStatus, GidsWebFieldStatus, RemovedGidsOverlayProviderNotificationQueueWebProps, RemovedGidsOverlayProviderSnackbarQueueWebProps, RemoveGidsInputProps, RemoveGidsPasswordFieldProps, RemoveGidsTextFieldProps, TextInputTypes } from "@ganpatiinfo/gids-web-shared";
|
|
13
13
|
export { IconAppearance, IconName } from "@ganpatiinfo/gids-web-theme-interface";
|
|
14
|
-
export { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
|
|
14
|
+
export { GidsButtonSize, GidsButtonWidth, GidsComponentPosition, GidsInputAppearance, GidsLabelFieldRequirement, GidsLabelFieldRequirementTextFn, GidsNotificationPronunciation, GidsOverflowContainerShadowLocation, GidsRequirementsProps, GidsSnackbarContainerAppearance, GidsToggleButtonAppearance, IsLabelSentenceFn } from "@ganpatiinfo/gids-core-shared";
|
|
15
15
|
export { JSXBase } from "./stencil-public-runtime";
|
|
16
16
|
export namespace Components {
|
|
17
17
|
interface GidsField {
|
|
@@ -72,6 +72,12 @@ export namespace Components {
|
|
|
72
72
|
"show"?: boolean;
|
|
73
73
|
"timerInMs"?: number | undefined;
|
|
74
74
|
}
|
|
75
|
+
interface GidsOverflowContainer {
|
|
76
|
+
/**
|
|
77
|
+
* @default 'bottom'
|
|
78
|
+
*/
|
|
79
|
+
"shadowLocation"?: GidsOverflowContainerShadowLocation;
|
|
80
|
+
}
|
|
75
81
|
interface GidsOverlayProvider {
|
|
76
82
|
"queueComponent": (props: RemovedGidsOverlayProviderSnackbarQueueWebProps | RemovedGidsOverlayProviderNotificationQueueWebProps) => Promise<void>;
|
|
77
83
|
}
|
|
@@ -222,6 +228,12 @@ declare global {
|
|
|
222
228
|
prototype: HTMLGidsNotificationElement;
|
|
223
229
|
new (): HTMLGidsNotificationElement;
|
|
224
230
|
};
|
|
231
|
+
interface HTMLGidsOverflowContainerElement extends Components.GidsOverflowContainer, HTMLStencilElement {
|
|
232
|
+
}
|
|
233
|
+
var HTMLGidsOverflowContainerElement: {
|
|
234
|
+
prototype: HTMLGidsOverflowContainerElement;
|
|
235
|
+
new (): HTMLGidsOverflowContainerElement;
|
|
236
|
+
};
|
|
225
237
|
interface HTMLGidsOverlayProviderElement extends Components.GidsOverlayProvider, HTMLStencilElement {
|
|
226
238
|
}
|
|
227
239
|
var HTMLGidsOverlayProviderElement: {
|
|
@@ -297,6 +309,7 @@ declare global {
|
|
|
297
309
|
"gids-icon": HTMLGidsIconElement;
|
|
298
310
|
"gids-input": HTMLGidsInputElement;
|
|
299
311
|
"gids-notification": HTMLGidsNotificationElement;
|
|
312
|
+
"gids-overflow-container": HTMLGidsOverflowContainerElement;
|
|
300
313
|
"gids-overlay-provider": HTMLGidsOverlayProviderElement;
|
|
301
314
|
"gids-password-field": HTMLGidsPasswordFieldElement;
|
|
302
315
|
"gids-scrim": HTMLGidsScrimElement;
|
|
@@ -365,6 +378,12 @@ declare namespace LocalJSX {
|
|
|
365
378
|
"show"?: boolean;
|
|
366
379
|
"timerInMs"?: number | undefined;
|
|
367
380
|
}
|
|
381
|
+
interface GidsOverflowContainer {
|
|
382
|
+
/**
|
|
383
|
+
* @default 'bottom'
|
|
384
|
+
*/
|
|
385
|
+
"shadowLocation"?: GidsOverflowContainerShadowLocation;
|
|
386
|
+
}
|
|
368
387
|
interface GidsOverlayProvider {
|
|
369
388
|
}
|
|
370
389
|
interface GidsPasswordField {
|
|
@@ -518,6 +537,9 @@ declare namespace LocalJSX {
|
|
|
518
537
|
"position": GidsComponentPosition;
|
|
519
538
|
"timerInMs": number | undefined;
|
|
520
539
|
}
|
|
540
|
+
interface GidsOverflowContainerAttributes {
|
|
541
|
+
"shadowLocation": GidsOverflowContainerShadowLocation;
|
|
542
|
+
}
|
|
521
543
|
interface GidsPasswordFieldAttributes {
|
|
522
544
|
"label": string;
|
|
523
545
|
"showClearButton": boolean;
|
|
@@ -585,6 +607,7 @@ declare namespace LocalJSX {
|
|
|
585
607
|
"gids-icon": Omit<GidsIcon, keyof GidsIconAttributes> & { [K in keyof GidsIcon & keyof GidsIconAttributes]?: GidsIcon[K] } & { [K in keyof GidsIcon & keyof GidsIconAttributes as `attr:${K}`]?: GidsIconAttributes[K] } & { [K in keyof GidsIcon & keyof GidsIconAttributes as `prop:${K}`]?: GidsIcon[K] } & OneOf<"name", GidsIcon["name"], GidsIconAttributes["name"]>;
|
|
586
608
|
"gids-input": Omit<GidsInput, keyof GidsInputAttributes> & { [K in keyof GidsInput & keyof GidsInputAttributes]?: GidsInput[K] } & { [K in keyof GidsInput & keyof GidsInputAttributes as `attr:${K}`]?: GidsInputAttributes[K] } & { [K in keyof GidsInput & keyof GidsInputAttributes as `prop:${K}`]?: GidsInput[K] };
|
|
587
609
|
"gids-notification": Omit<GidsNotification, keyof GidsNotificationAttributes> & { [K in keyof GidsNotification & keyof GidsNotificationAttributes]?: GidsNotification[K] } & { [K in keyof GidsNotification & keyof GidsNotificationAttributes as `attr:${K}`]?: GidsNotificationAttributes[K] } & { [K in keyof GidsNotification & keyof GidsNotificationAttributes as `prop:${K}`]?: GidsNotification[K] };
|
|
610
|
+
"gids-overflow-container": Omit<GidsOverflowContainer, keyof GidsOverflowContainerAttributes> & { [K in keyof GidsOverflowContainer & keyof GidsOverflowContainerAttributes]?: GidsOverflowContainer[K] } & { [K in keyof GidsOverflowContainer & keyof GidsOverflowContainerAttributes as `attr:${K}`]?: GidsOverflowContainerAttributes[K] } & { [K in keyof GidsOverflowContainer & keyof GidsOverflowContainerAttributes as `prop:${K}`]?: GidsOverflowContainer[K] };
|
|
588
611
|
"gids-overlay-provider": GidsOverlayProvider;
|
|
589
612
|
"gids-password-field": Omit<GidsPasswordField, keyof GidsPasswordFieldAttributes> & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes]?: GidsPasswordField[K] } & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes as `attr:${K}`]?: GidsPasswordFieldAttributes[K] } & { [K in keyof GidsPasswordField & keyof GidsPasswordFieldAttributes as `prop:${K}`]?: GidsPasswordField[K] };
|
|
590
613
|
"gids-scrim": Omit<GidsScrim, keyof GidsScrimAttributes> & { [K in keyof GidsScrim & keyof GidsScrimAttributes]?: GidsScrim[K] } & { [K in keyof GidsScrim & keyof GidsScrimAttributes as `attr:${K}`]?: GidsScrimAttributes[K] } & { [K in keyof GidsScrim & keyof GidsScrimAttributes as `prop:${K}`]?: GidsScrim[K] };
|
|
@@ -601,6 +624,7 @@ declare module "@stencil/core" {
|
|
|
601
624
|
"gids-icon": LocalJSX.IntrinsicElements["gids-icon"] & JSXBase.HTMLAttributes<HTMLGidsIconElement>;
|
|
602
625
|
"gids-input": LocalJSX.IntrinsicElements["gids-input"] & JSXBase.HTMLAttributes<HTMLGidsInputElement>;
|
|
603
626
|
"gids-notification": LocalJSX.IntrinsicElements["gids-notification"] & JSXBase.HTMLAttributes<HTMLGidsNotificationElement>;
|
|
627
|
+
"gids-overflow-container": LocalJSX.IntrinsicElements["gids-overflow-container"] & JSXBase.HTMLAttributes<HTMLGidsOverflowContainerElement>;
|
|
604
628
|
"gids-overlay-provider": LocalJSX.IntrinsicElements["gids-overlay-provider"] & JSXBase.HTMLAttributes<HTMLGidsOverlayProviderElement>;
|
|
605
629
|
"gids-password-field": LocalJSX.IntrinsicElements["gids-password-field"] & JSXBase.HTMLAttributes<HTMLGidsPasswordFieldElement>;
|
|
606
630
|
"gids-scrim": LocalJSX.IntrinsicElements["gids-scrim"] & JSXBase.HTMLAttributes<HTMLGidsScrimElement>;
|
|
@@ -10,7 +10,7 @@ const t = o(class extends n {
|
|
|
10
10
|
i !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(i);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return d(c, { key: "
|
|
13
|
+
return d(c, { key: "55114b6e5f7f440dcb4a892c0a25b234509b884e", name: this.name, size: this.size, appearance: this.appearance, alt: this.alt, titleId: this.titleId });
|
|
14
14
|
}
|
|
15
15
|
get _el() {
|
|
16
16
|
return this;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { c as t, f as e } from "./p-Bg3lw2Ae-CkC8nUqv.js";
|
|
2
|
+
const s = t, m = e;
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
s as GidsInput,
|
|
5
|
+
m as defineCustomElement
|
|
6
6
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { C as i, f as n, R as e, H as o } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { i as l } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
|
+
const c = (t) => t === "top" || t === "top-bottom", h = (t) => t === "bottom" || t === "top-bottom", d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4
|
+
__proto__: null,
|
|
5
|
+
showGidsOverflowContainerBottomShadow: h,
|
|
6
|
+
showGidsOverflowContainerTopShadow: c
|
|
7
|
+
}, Symbol.toStringTag, { value: "Module" })), { showGidsOverflowContainerBottomShadow: s, showGidsOverflowContainerTopShadow: f } = d, r = i(class extends n {
|
|
8
|
+
constructor(t) {
|
|
9
|
+
super(), t !== !1 && this.__registerHost(), this.__attachShadow(), this.shadowLocation = "bottom";
|
|
10
|
+
}
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
const t = l();
|
|
13
|
+
t !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(t);
|
|
14
|
+
}
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
this._textArea = this._el.shadowRoot?.querySelector(".gids-overflow-container__text-area"), s(this.shadowLocation) && this._textArea.scrollHeight > this._textArea.offsetHeight && this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "1");
|
|
17
|
+
}
|
|
18
|
+
calculateShadows() {
|
|
19
|
+
const t = this._textArea.scrollTop <= 0 ? 0 : this._textArea.scrollTop;
|
|
20
|
+
this._textArea.scrollTop + this._textArea.offsetHeight >= this._textArea.scrollHeight ? this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "0") : t !== 0 ? t > 0 && (f(this.shadowLocation) && this._el.style.setProperty("--gidsOverflowContainer-before-opacity", "" + Math.min(t / 20, 1)), s(this.shadowLocation) && this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "" + Math.min((this._textArea.scrollHeight - (this._textArea.scrollTop + this._textArea.offsetHeight)) / 20, 1))) : this._el.style.setProperty("--gidsOverflowContainer-after-opacity", "0");
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return e("div", { key: "6ec89d7178cf344a3127aa5913df8ff65c523592", class: "gids-overflow-container__text-area", onScroll: this.calculateShadows.bind(this) }, e("slot", { key: "0cf9630efe8337aa0c7a239fa5f09ca30d368513" }));
|
|
24
|
+
}
|
|
25
|
+
get _el() {
|
|
26
|
+
return this;
|
|
27
|
+
}
|
|
28
|
+
}, [257, "gids-overflow-container", { shadowLocation: [513, "shadow-location"] }]);
|
|
29
|
+
function a() {
|
|
30
|
+
typeof customElements < "u" && ["gids-overflow-container"].forEach(((t) => {
|
|
31
|
+
t === "gids-overflow-container" && (customElements.get(o(t)) || customElements.define(o(t), r));
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
a();
|
|
35
|
+
const p = r, m = a;
|
|
36
|
+
export {
|
|
37
|
+
p as GidsOverflowContainer,
|
|
38
|
+
m as defineCustomElement
|
|
39
|
+
};
|
|
@@ -187,7 +187,7 @@ const Q = ({ appearance: t }, e) => h("gids-snackbar-container", {
|
|
|
187
187
|
}
|
|
188
188
|
render() {
|
|
189
189
|
const t = this._allowedComponentQueue[0]?.position || "bottom-center";
|
|
190
|
-
return o(w, { key: "
|
|
190
|
+
return o(w, { key: "f80c6557d382dc5af3ddcb77f20c58ffa9acbd53" }, o("slot", { key: "1d763f5cedecd8b8a2e0b7d1fb207e9ffde7ad97" }), this._isRoot() ? o("div", { class: G({ position: t }) }, [...this._allowedComponentQueue].reverse().map(((e) => this._renderComponent(e)))) : null);
|
|
191
191
|
}
|
|
192
192
|
get _el() {
|
|
193
193
|
return this;
|
|
@@ -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 {
|
|
6
|
+
import { h as E } from "./p-DjvDBWCb-C9js0PPL.js";
|
|
7
|
+
import { f as G } from "./p-Bg3lw2Ae-CkC8nUqv.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 === "")
|
|
11
11
|
return 0;
|
|
12
12
|
let n = 0;
|
|
13
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
|
-
},
|
|
14
|
+
}, A = ({ 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
|
+
}, B = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18
18
|
__proto__: null,
|
|
19
|
-
getColorModifierByScore:
|
|
19
|
+
getColorModifierByScore: A,
|
|
20
20
|
getStrengthMeterScore: z,
|
|
21
21
|
include1DigitReg: b,
|
|
22
22
|
include1LowercaseLetterReg: p,
|
|
23
23
|
include1SpecialCharReg: q,
|
|
24
24
|
include1UppercaseLetterReg: f
|
|
25
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
25
|
+
}, Symbol.toStringTag, { value: "Module" })), o = ({ 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 o({
|
|
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 o({
|
|
70
70
|
requirementRule: "include-min-length",
|
|
71
71
|
textMinLength: e
|
|
72
72
|
}) && t.push({
|
|
@@ -76,13 +76,13 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
76
76
|
defaultMeterRules: R(t),
|
|
77
77
|
defaultRequirementsMeterRules: t
|
|
78
78
|
};
|
|
79
|
-
},
|
|
79
|
+
}, N = /* @__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: o
|
|
85
|
+
}, Symbol.toStringTag, { value: "Module" })), $ = (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
|
+
}, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
99
99
|
__proto__: null,
|
|
100
|
-
getRequirementsMeterLabelLeadingIcon:
|
|
100
|
+
getRequirementsMeterLabelLeadingIcon: $
|
|
101
101
|
}, Symbol.toStringTag, { value: "Module" })), D = (e) => {
|
|
102
102
|
switch (e) {
|
|
103
103
|
case "error":
|
|
@@ -127,24 +127,24 @@ const f = /[A-Z]/, p = /[a-z]/, b = /[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 } = B, 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 d = c + 1, w = d <= l;
|
|
136
|
+
return s[d] === "include-min-length" ? o({ requirementRule: "include-min-length", textMinLength: t }) ? a(d, u, w) : null : a(d, u, w);
|
|
137
137
|
}));
|
|
138
138
|
})()) : null;
|
|
139
|
-
}, { getGidsRequirementsMeterLabelClassNames: ne } = J, { getRequirementsMeterLabelLeadingIcon: le } =
|
|
139
|
+
}, { getGidsRequirementsMeterLabelClassNames: ne } = J, { getRequirementsMeterLabelLeadingIcon: le } = V, 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 } = N, { getGidsRequirementsMeterClassNames: de } = Q, oe = ({ 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: de(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" ? o({ 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: "ac0547218330d8f736228ea80758fa093106c83b" }, i("gids-field", { key: "98c060a626789dbd002f5792cd80f1d774700ce8", disabled: this.disabled, count: void 0, helperText: this.helperText, statusText: this.statusText, status: ce(this.status) }, i(L, { key: "c3bc15ae28913dd303c6f1ac115a263eb6c957d6", 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: "27e62b83ad6ad35b88478e2098e27b90955831c8", ref: (d) => this.#e = d, 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: "be45ade51a541676a5b2e234fcbee46e60cde86c", name: "leadingIcon" }), i("slot", { key: "6cf1f874d8f94f0a47006f05784cbc96c6364a29", name: "leadingAccessory" }), i("div", { key: "8243a614ec6fc1d2b58f89c346123829b6ce4350", slot: "trailingAccessory", class: "gids-password-field__trailing-accessory" }, n && i(O, { key: "5a404ec6fbecf9d383bf11a1d06371d79b5bd1be", label: "clear text", size: "lg", onPressDismiss: this._handleDismiss }), a && i(F, { key: "c6cac51598118d8e6fed039a08a5f6d7ad4ae3ac", appearance: "default", size: "xs", width: "intrinsic", disabled: this.disabled, onClick: this._handleRevealPassword }, u ? "Hide" : "Show")))), i("div", { key: "dea7d30bac19ece0988437a663743020be7b9c47", class: "gids-password-field__meters-container" }, i(ie, { key: "0cd888450a7760a8c80b73ded9ccd91e2b30c39f", meterRules: _, text: this.value, textMinLength: c }), i(oe, { key: "f5960940724dabab47fceb265ae369d1ce23e9aa", requirements: this.requirementsMeterRequirements, text: this.value, textMinLength: c })));
|
|
194
194
|
}
|
|
195
195
|
get _el() {
|
|
196
196
|
return this;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as o, f as c, R as e, H as t } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
2
|
import { i as l } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
3
|
import { c as n } from "./clsx-OuTLNxxd.js";
|
|
4
4
|
const d = (s) => n("gids-scrim", s), m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5
5
|
__proto__: null,
|
|
6
6
|
getGidsScrimClassNames: d
|
|
7
|
-
}, Symbol.toStringTag, { value: "Module" })), { getGidsScrimClassNames: a } = m, r =
|
|
7
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsScrimClassNames: a } = m, r = o(class extends c {
|
|
8
8
|
constructor(s) {
|
|
9
9
|
super(), s !== !1 && this.__registerHost(), this.__attachShadow(), this.activeClasses = "";
|
|
10
10
|
}
|
|
@@ -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: "3a18dab725b1a061036e23781aaa55040bf8464c", class: this.activeClasses, part: "root" }, e("slot", { key: "81e1e0fa050d3ccb490cbe082f7a67422957096a" }));
|
|
20
20
|
}
|
|
21
21
|
get _el() {
|
|
22
22
|
return this;
|
|
@@ -1,8 +1,8 @@
|
|
|
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
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 {
|
|
4
|
+
import { h as g } from "./p-DjvDBWCb-C9js0PPL.js";
|
|
5
|
+
import { f as x } from "./p-Bg3lw2Ae-CkC8nUqv.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,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");
|
|
@@ -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: "79a6f89effd87741d2b07df6aeb47c7dca810738", disabled: this.disabled, count: F(this.value?.length, this.maxLength), helperText: this.helperText, statusText: this.statusText, status: O(this.status) }, i(p, { key: "04c15dd04008777bd1eff8b3e94fd26076fd0a6c", 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: "ae41600eca7cc769e3a4e271bc7d4718c5cb9069", 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: "0a1851ba9e1cb1deed77f88327e5411c0577c5d0", name: "leadingIcon" }), i("slot", { key: "140610e53fb52e6b24e0d91361c688e996de3849", name: "leadingAccessory" }), d && i(m, { key: "48b5b8d8adaa5693e57d6aca9eff32ca72a2c051", label: "clear text", slot: "trailingAccessory", size: "lg", onPressDismiss: this._handleDismiss }), i("slot", { key: "679c26844c467e15e144c393df13652dbe498421", 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
|
-
import { C as l, f as n, V as
|
|
2
|
-
import { a
|
|
1
|
+
import { C as l, f as n, V as c, R as t, D as d, H as s } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { a } from "./p-CWdkmFbc-D89ZE8Mi.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 = c(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(d, { key: "87505762161da81762e873e7c6318c03d9c17ef5" }, t("style", { key: "4e4c082b5435ca88e816310035c2989847d4f3de" }, `:host {
|
|
25
25
|
display: ${this.width === "full" ? "block" : "inline-block"}
|
|
26
|
-
}`), t(
|
|
26
|
+
}`), t(a, { key: "cc1ba98c103b2650fac9373764174b9d692a3887", 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: "009d3abc1604b5c387c1c29fad97d42e24ae70e9" })));
|
|
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
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as s, C as l, f as
|
|
1
|
+
import { H as s, C as l, f as u, R as a, L as d } 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,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(d, { key: "5d4e79f168da55c3c8dcb9b005919af697faa2e4" }, a("slot", { key: "a7c23b37ceaf94f06e53256b431e98e7a3a32602", name: "leadingIcon" }), this.leadingLabel && a("span", { key: "0ad81289035ada60d67b1df06fb60f703dc27eed", class: "gids-input__label" }, this.leadingLabel), a("slot", { key: "f5870caed190d279a95c688243607dfae8f79d60", name: "leadingAccessory" }), a("input", { key: "38ead647fc9069ed8de93293150134048fd6b4f1", ...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: "58ff0f57706d2c9b1e9b41549649c324c60a8f07", name: "trailingAccessory" }), this.trailingLabel && a("span", { key: "6d400670f8c64f64fbe732e726da4d7569c2c6f3", class: "gids-input__label" }, this.trailingLabel), a("slot", { key: "8b20ed8fb9169fd7c0e1415f7bcdf0df03b61534", name: "trailingIcon" }), this.status === "incomplete" && a(n, { key: "f7d4261f5c8faa51601d3fd6c400f4891847f62c", name: "warning", appearance: "filled", class: "gids-input__warning-icon" }), this.status === "complete" && a(n, { key: "6cbdc56ebc1854d0b4f6db30df670f665a9aff3f", name: "positive", appearance: "filled", class: "gids-input__positive-icon" }), this.loading && a(r, { key: "a369d7c3f7e2ac4d631926aefc1a15bf9cbba362", 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 c,
|
|
73
|
+
h as f
|
|
74
74
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as l, C as n, f as r, R as
|
|
1
|
+
import { H as l, C as n, f as r, R as a, D as d } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
2
|
import { d as h } from "./p-veoOgDXg-DElc87c0.js";
|
|
3
3
|
import { i as c } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
4
4
|
import { c as _ } from "./clsx-OuTLNxxd.js";
|
|
@@ -53,10 +53,10 @@ const g = (t) => _("gids-field", t), u = /* @__PURE__ */ Object.freeze(/* @__PUR
|
|
|
53
53
|
render() {
|
|
54
54
|
const t = this._hasStatusText(), e = this._controlValidationMessage !== void 0 ? this._controlValidationMessage : this._shouldRenderExplicitStatusText() ? this.statusText : void 0, s = this._getCurrentStatus(), i = ["gids-field__status-text"];
|
|
55
55
|
if (t) {
|
|
56
|
-
const
|
|
57
|
-
|
|
56
|
+
const o = this._getStatusModifierClass(s, "gids-field__status-text");
|
|
57
|
+
o != null && i.push(o);
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return a(d, { key: "a8e81000bf235a842ddf98ef3be3ff5a82201b5d" }, a("div", { key: "1c940955fd104dd85a5701f553d2ac5a7ddc14c8", class: p() }, a("div", { key: "62e2a77c0661fc5507fe86d5343f85351895b3e7", class: "gids-field__header", hidden: !this._hasLabelContent() }, a("slot", { key: "c94c3346cd083969831905e0d0a7091013d32f3d", ref: this._setLabelSlot, name: "label", onSlotchange: this._handleControlSlotChange }), a("div", { key: "ef4ba969b9ac7be32c9c88260e357661eff68d54", class: "gids-field__count", "aria-live": "polite" }, this.count)), a("div", { key: "cc2ea221e9c9725193238625f571848879e5c656", class: "gids-field__control" }, a("slot", { key: "8530e0748d181e0c3b90e7602545cc67b404ef02", ref: this._setControlSlot, onSlotchange: this._handleControlSlotChange })), a("p", { key: "654ce845b3a9b5bfe3833a8122a05f3158a43fe4", class: "gids-field__supporting-text", hidden: !this._shouldShowHelperText() }, this.helperText), t ? a("p", { class: i.join(" "), role: "status", "aria-live": "polite" }, this._renderStatusIcon(s), e !== void 0 ? a("span", null, e) : null) : null));
|
|
60
60
|
}
|
|
61
61
|
_hasLabelContent() {
|
|
62
62
|
return this._hasLabel;
|
|
@@ -79,8 +79,8 @@ const g = (t) => _("gids-field", t), u = /* @__PURE__ */ Object.freeze(/* @__PUR
|
|
|
79
79
|
if (e === void 0) return;
|
|
80
80
|
const s = ["gids-field__status-icon"], i = this._getStatusModifierClass(t, "gids-field__status-icon");
|
|
81
81
|
i != null && s.push(i);
|
|
82
|
-
let
|
|
83
|
-
return t === "error" && (
|
|
82
|
+
let o = t;
|
|
83
|
+
return t === "error" && (o = "danger"), t === "success" && (o = "positive"), a(h, { appearance: "filled", size: "sm", alt: "", name: e, class: s.join(" "), style: { "--gidsIcon-color": `var(--gids-color-icon-${o})` } });
|
|
84
84
|
}
|
|
85
85
|
_getCurrentStatus() {
|
|
86
86
|
return this._isImplicitStatus() && this._controlValidationMessage != null ? "error" : this.status ?? "implicit";
|
|
@@ -120,7 +120,7 @@ const g = (t) => _("gids-field", t), u = /* @__PURE__ */ Object.freeze(/* @__PUR
|
|
|
120
120
|
if (e && t.name != null) {
|
|
121
121
|
const s = e.elements.namedItem(t.name);
|
|
122
122
|
if (s instanceof RadioNodeList) {
|
|
123
|
-
const i = Array.from(s).filter(((
|
|
123
|
+
const i = Array.from(s).filter(((o) => o instanceof HTMLInputElement && o.type === "radio" && this._el.contains(o)));
|
|
124
124
|
if (i.length > 0) return i;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -141,8 +141,8 @@ const g = (t) => _("gids-field", t), u = /* @__PURE__ */ Object.freeze(/* @__PUR
|
|
|
141
141
|
if (e.nodeType !== Node.ELEMENT_NODE) continue;
|
|
142
142
|
const s = e, i = this._asTextControl(s);
|
|
143
143
|
if (i !== null) return i;
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
144
|
+
const o = s.querySelector("input, textarea");
|
|
145
|
+
if (o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement) return o;
|
|
146
146
|
}
|
|
147
147
|
return null;
|
|
148
148
|
}
|