@ganpatiinfo/gids-core-web 4.0.0 → 5.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 +130 -0
- package/dist/css/index.css.map +1 -1
- package/dist/gids-field.d.ts +1 -1
- package/dist/gids-field.js +1 -1
- package/dist/gids-icon.d.ts +1 -1
- package/dist/gids-icon.js +1 -1
- package/dist/gids-input.d.ts +1 -1
- package/dist/gids-input.js +1 -1
- package/dist/gids-notification.d.ts +1 -1
- package/dist/gids-overlay-provider.d.ts +1 -1
- package/dist/gids-overlay-provider.js +1 -1
- package/dist/gids-password-field.d.ts +1 -1
- package/dist/gids-password-field.js +1 -1
- package/dist/gids-scrim.d.ts +11 -0
- package/dist/gids-scrim.js +1 -0
- package/dist/gids-snackbar.d.ts +1 -1
- package/dist/gids-text-field.d.ts +1 -1
- package/dist/gids-text-field.js +1 -1
- package/dist/gids-toggle-button.d.ts +1 -1
- package/dist/gids-toggle-button.js +1 -1
- package/dist/{p-RqpjvEHh.js → p-BVh4zbX4.js} +1 -1
- package/dist/{p-D4xtPT_U.js → p-BplPYg8z.js} +1 -1
- package/dist/types/components/html/GidsSegmentedControl/GidsSegmentedControl.d.ts +1 -1
- package/dist/types/components/html/GidsSegmentedTabItem/GidsSegmentedTabItem.d.ts +1 -1
- package/dist/types/components/html/GidsTopNavigation/GidsTopNavigation.d.ts +1 -1
- package/dist/types/components/html/_GidsSideMenuItem/GidsSideMenuItem.d.ts +7 -0
- package/dist/types/components/webComponents/GidsScrim/GidsScrim.d.ts +7 -0
- package/dist/types/components.d.ts +18 -0
- package/dist-bundled/es/gids-field.js +3 -3
- package/dist-bundled/es/gids-icon.js +3 -3
- package/dist-bundled/es/gids-input.js +2 -2
- package/dist-bundled/es/gids-overlay-provider.js +1 -1
- package/dist-bundled/es/gids-password-field.js +25 -25
- package/dist-bundled/es/gids-scrim.js +35 -0
- package/dist-bundled/es/gids-text-field.js +11 -11
- package/dist-bundled/es/gids-toggle-button.js +5 -5
- package/dist-bundled/es/{p-RqpjvEHh-BGGYsIBf.js → p-BVh4zbX4-C4UJ8LPX.js} +6 -6
- package/dist-bundled/es/{p-D4xtPT_U-04HkZiXU.js → p-BplPYg8z-B8uAAfo4.js} +4 -4
- package/dist-bundled/umd/gids-field.umd.js +1 -1
- package/dist-bundled/umd/gids-icon.umd.js +1 -1
- package/dist-bundled/umd/gids-input.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-scrim.umd.js +5 -0
- package/dist-bundled/umd/gids-text-field.umd.js +1 -1
- package/dist-bundled/umd/gids-toggle-button.umd.js +2 -2
- package/dist-bundled/umd-complete/gids-core-web.umd.js +3 -3
- package/package.json +12 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { type GidsSideMenuItemOnPressEvent, type GidsSideMenuItemWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { FunctionalComponent, JSXBase } from '../../../stencil-public-runtime';
|
|
4
|
+
export interface GidsSideMenuItemProps extends GidsSideMenuItemWebProps<VNode | string, VNode, VNode>, Omit<JSXBase.IntrinsicElements['div'], 'children' | 'onClick' | 'click'> {
|
|
5
|
+
onPressSideMenuItem?: GidsSideMenuItemOnPressEvent;
|
|
6
|
+
}
|
|
7
|
+
export declare const GidsSideMenuItem: FunctionalComponent<GidsSideMenuItemProps>;
|
|
@@ -104,6 +104,9 @@ export namespace Components {
|
|
|
104
104
|
"textMinLength"?: number;
|
|
105
105
|
"value"?: string;
|
|
106
106
|
}
|
|
107
|
+
interface GidsScrim {
|
|
108
|
+
"extraClasses"?: string | undefined;
|
|
109
|
+
}
|
|
107
110
|
interface GidsSnackbar {
|
|
108
111
|
/**
|
|
109
112
|
* @default 'default'
|
|
@@ -243,6 +246,12 @@ declare global {
|
|
|
243
246
|
prototype: HTMLGidsPasswordFieldElement;
|
|
244
247
|
new (): HTMLGidsPasswordFieldElement;
|
|
245
248
|
};
|
|
249
|
+
interface HTMLGidsScrimElement extends Components.GidsScrim, HTMLStencilElement {
|
|
250
|
+
}
|
|
251
|
+
var HTMLGidsScrimElement: {
|
|
252
|
+
prototype: HTMLGidsScrimElement;
|
|
253
|
+
new (): HTMLGidsScrimElement;
|
|
254
|
+
};
|
|
246
255
|
interface HTMLGidsSnackbarElement extends Components.GidsSnackbar, HTMLStencilElement {
|
|
247
256
|
}
|
|
248
257
|
var HTMLGidsSnackbarElement: {
|
|
@@ -290,6 +299,7 @@ declare global {
|
|
|
290
299
|
"gids-notification": HTMLGidsNotificationElement;
|
|
291
300
|
"gids-overlay-provider": HTMLGidsOverlayProviderElement;
|
|
292
301
|
"gids-password-field": HTMLGidsPasswordFieldElement;
|
|
302
|
+
"gids-scrim": HTMLGidsScrimElement;
|
|
293
303
|
"gids-snackbar": HTMLGidsSnackbarElement;
|
|
294
304
|
"gids-text-field": HTMLGidsTextFieldElement;
|
|
295
305
|
"gids-toggle-button": HTMLGidsToggleButtonElement;
|
|
@@ -388,6 +398,9 @@ declare namespace LocalJSX {
|
|
|
388
398
|
"textMinLength"?: number;
|
|
389
399
|
"value"?: string;
|
|
390
400
|
}
|
|
401
|
+
interface GidsScrim {
|
|
402
|
+
"extraClasses"?: string | undefined;
|
|
403
|
+
}
|
|
391
404
|
interface GidsSnackbar {
|
|
392
405
|
/**
|
|
393
406
|
* @default 'default'
|
|
@@ -525,6 +538,9 @@ declare namespace LocalJSX {
|
|
|
525
538
|
"fieldRequirementRequiredText": string | GidsLabelFieldRequirementTextFn;
|
|
526
539
|
"textMinLength": number;
|
|
527
540
|
}
|
|
541
|
+
interface GidsScrimAttributes {
|
|
542
|
+
"extraClasses": string | undefined;
|
|
543
|
+
}
|
|
528
544
|
interface GidsSnackbarAttributes {
|
|
529
545
|
"message": string;
|
|
530
546
|
"appearance": GidsSnackbarContainerAppearance;
|
|
@@ -571,6 +587,7 @@ declare namespace LocalJSX {
|
|
|
571
587
|
"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] };
|
|
572
588
|
"gids-overlay-provider": GidsOverlayProvider;
|
|
573
589
|
"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
|
+
"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] };
|
|
574
591
|
"gids-snackbar": Omit<GidsSnackbar, keyof GidsSnackbarAttributes> & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes]?: GidsSnackbar[K] } & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes as `attr:${K}`]?: GidsSnackbarAttributes[K] } & { [K in keyof GidsSnackbar & keyof GidsSnackbarAttributes as `prop:${K}`]?: GidsSnackbar[K] };
|
|
575
592
|
"gids-text-field": Omit<GidsTextField, keyof GidsTextFieldAttributes> & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes]?: GidsTextField[K] } & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes as `attr:${K}`]?: GidsTextFieldAttributes[K] } & { [K in keyof GidsTextField & keyof GidsTextFieldAttributes as `prop:${K}`]?: GidsTextField[K] };
|
|
576
593
|
"gids-toggle-button": Omit<GidsToggleButton, keyof GidsToggleButtonAttributes> & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes]?: GidsToggleButton[K] } & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes as `attr:${K}`]?: GidsToggleButtonAttributes[K] } & { [K in keyof GidsToggleButton & keyof GidsToggleButtonAttributes as `prop:${K}`]?: GidsToggleButton[K] };
|
|
@@ -586,6 +603,7 @@ declare module "@stencil/core" {
|
|
|
586
603
|
"gids-notification": LocalJSX.IntrinsicElements["gids-notification"] & JSXBase.HTMLAttributes<HTMLGidsNotificationElement>;
|
|
587
604
|
"gids-overlay-provider": LocalJSX.IntrinsicElements["gids-overlay-provider"] & JSXBase.HTMLAttributes<HTMLGidsOverlayProviderElement>;
|
|
588
605
|
"gids-password-field": LocalJSX.IntrinsicElements["gids-password-field"] & JSXBase.HTMLAttributes<HTMLGidsPasswordFieldElement>;
|
|
606
|
+
"gids-scrim": LocalJSX.IntrinsicElements["gids-scrim"] & JSXBase.HTMLAttributes<HTMLGidsScrimElement>;
|
|
589
607
|
"gids-snackbar": LocalJSX.IntrinsicElements["gids-snackbar"] & JSXBase.HTMLAttributes<HTMLGidsSnackbarElement>;
|
|
590
608
|
"gids-text-field": LocalJSX.IntrinsicElements["gids-text-field"] & JSXBase.HTMLAttributes<HTMLGidsTextFieldElement>;
|
|
591
609
|
"gids-toggle-button": LocalJSX.IntrinsicElements["gids-toggle-button"] & JSXBase.HTMLAttributes<HTMLGidsToggleButtonElement>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as o, H as t, f as
|
|
1
|
+
import { C as o, H as t, f as a, R as d } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
2
|
import { i as n } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
3
|
import { d as c } from "./p-veoOgDXg-DElc87c0.js";
|
|
4
|
-
const e = o(class extends
|
|
4
|
+
const e = o(class extends a {
|
|
5
5
|
constructor(i) {
|
|
6
6
|
super(), i !== !1 && this.__registerHost(), this.__attachShadow();
|
|
7
7
|
}
|
|
@@ -10,7 +10,7 @@ const e = o(class extends d {
|
|
|
10
10
|
i !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(i);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return
|
|
13
|
+
return d(c, { key: "d1215bf1b178ca6fb73458ecb8370b315239fa5b", 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;
|
|
@@ -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: "cc411e4a7fd0174d11d189a107dc1558a93c8ea2" }, o("slot", { key: "724e2c2ccdd2e3e7917808906d7308067da2ae87" }), 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 { r as G } from "./p-
|
|
6
|
+
import { h as E } from "./p-BplPYg8z-B8uAAfo4.js";
|
|
7
|
+
import { r as G } from "./p-BVh4zbX4-C4UJ8LPX.js";
|
|
8
8
|
import { c as g } from "./clsx-OuTLNxxd.js";
|
|
9
|
-
const f = /[A-Z]/,
|
|
9
|
+
const f = /[A-Z]/, p = /[a-z]/, b = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e, meterRules: t = [], textMinLength: s = 0 }) => {
|
|
10
10
|
if (!e || e === "")
|
|
11
11
|
return 0;
|
|
12
12
|
let n = 0;
|
|
13
|
-
return t.includes("1-uppercase") && f.test(e) && n++, t.includes("1-lowercase") &&
|
|
14
|
-
},
|
|
13
|
+
return t.includes("1-uppercase") && f.test(e) && n++, t.includes("1-lowercase") && p.test(e) && n++, t.includes("1-digit") && b.test(e) && n++, t.includes("1-special-character") && q.test(e) && n++, t.includes("include-min-length") && s && s > 0 && e.length >= s && n++, n;
|
|
14
|
+
}, B = ({ textScore: e, maxScore: t }) => {
|
|
15
15
|
const s = t > 0 ? e / t * 100 : 0;
|
|
16
16
|
return s <= 20 ? "is-weak" : s <= 40 ? "is-medium" : s <= 60 ? "is-good-enough" : s <= 80 ? "is-good" : "is-strong";
|
|
17
|
-
},
|
|
17
|
+
}, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18
18
|
__proto__: null,
|
|
19
|
-
getColorModifierByScore:
|
|
19
|
+
getColorModifierByScore: B,
|
|
20
20
|
getStrengthMeterScore: z,
|
|
21
|
-
include1DigitReg:
|
|
22
|
-
include1LowercaseLetterReg:
|
|
21
|
+
include1DigitReg: b,
|
|
22
|
+
include1LowercaseLetterReg: p,
|
|
23
23
|
include1SpecialCharReg: q,
|
|
24
24
|
include1UppercaseLetterReg: f
|
|
25
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
25
|
+
}, Symbol.toStringTag, { value: "Module" })), d = ({ requirementRule: e, textMinLength: t }) => e === "include-min-length" && t && t > 0, R = (e) => {
|
|
26
26
|
const t = [];
|
|
27
27
|
return e && e.length > 0 && e.map((s) => {
|
|
28
28
|
s?.requirementRule && t.push(s.requirementRule);
|
|
@@ -34,13 +34,13 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
34
34
|
case "1-uppercase":
|
|
35
35
|
return f.test(s);
|
|
36
36
|
case "1-lowercase":
|
|
37
|
-
return b.test(s);
|
|
38
|
-
case "1-digit":
|
|
39
37
|
return p.test(s);
|
|
38
|
+
case "1-digit":
|
|
39
|
+
return b.test(s);
|
|
40
40
|
case "1-special-character":
|
|
41
41
|
return q.test(s);
|
|
42
42
|
case "include-min-length":
|
|
43
|
-
return
|
|
43
|
+
return d({
|
|
44
44
|
requirementRule: "include-min-length",
|
|
45
45
|
textMinLength: t
|
|
46
46
|
}) === !0 && s.length >= t;
|
|
@@ -66,7 +66,7 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
66
66
|
requirementText: "Password must contain atleast 1 lowercase letter."
|
|
67
67
|
}
|
|
68
68
|
];
|
|
69
|
-
return
|
|
69
|
+
return d({
|
|
70
70
|
requirementRule: "include-min-length",
|
|
71
71
|
textMinLength: e
|
|
72
72
|
}) && t.push({
|
|
@@ -76,13 +76,13 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
76
76
|
defaultMeterRules: R(t),
|
|
77
77
|
defaultRequirementsMeterRules: t
|
|
78
78
|
};
|
|
79
|
-
},
|
|
79
|
+
}, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
80
80
|
__proto__: null,
|
|
81
81
|
checkRequirementRuleSatisfied: I,
|
|
82
82
|
getDefaultRulesAndRequirementsForMeters: m,
|
|
83
83
|
getMeterRulesFromRequirements: R,
|
|
84
|
-
minLengthRuleCanBeApplied:
|
|
85
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
84
|
+
minLengthRuleCanBeApplied: d
|
|
85
|
+
}, Symbol.toStringTag, { value: "Module" })), N = (e) => {
|
|
86
86
|
switch (e) {
|
|
87
87
|
case "error":
|
|
88
88
|
return "danger";
|
|
@@ -97,7 +97,7 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
97
97
|
}
|
|
98
98
|
}, $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
99
99
|
__proto__: null,
|
|
100
|
-
getRequirementsMeterLabelLeadingIcon:
|
|
100
|
+
getRequirementsMeterLabelLeadingIcon: N
|
|
101
101
|
}, Symbol.toStringTag, { value: "Module" })), D = (e) => {
|
|
102
102
|
switch (e) {
|
|
103
103
|
case "error":
|
|
@@ -127,24 +127,24 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[0-9]/, q = /[^A-Za-z0-9]/, z = ({ text: e,
|
|
|
127
127
|
}, Symbol.toStringTag, { value: "Module" })), { inputToGidsFieldStatusForPassword: X } = H, Y = (e) => e === "implicit" || e === void 0 ? "implicit" : X(e), ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
128
128
|
__proto__: null,
|
|
129
129
|
inputToGidsFieldStatusForPassword: Y
|
|
130
|
-
}, Symbol.toStringTag, { value: "Module" })), { getGidsStrengthMeterClassNames: te } = Z, { getStrengthMeterScore: se, getColorModifierByScore: re } =
|
|
130
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsStrengthMeterClassNames: te } = Z, { getStrengthMeterScore: se, getColorModifierByScore: re } = A, ie = ({ text: e, textMinLength: t, meterRules: s = ["1-uppercase", "1-lowercase", "1-digit", "1-special-character", "include-min-length"], class: n }) => {
|
|
131
131
|
const a = (r, l, u) => i("div", { key: r, class: ["gids-strength-meter__strength-" + r, u ? "is-active" : "", u ? l : ""].filter(Boolean).join(" ") });
|
|
132
132
|
return s.length > 0 ? i("div", { class: te(n) }, (() => {
|
|
133
133
|
const r = s.length, l = se({ text: e, textMinLength: t, meterRules: s }), u = re({ textScore: l, maxScore: r });
|
|
134
134
|
return Array.from({ length: r }, ((_, c) => {
|
|
135
|
-
const
|
|
136
|
-
return s[
|
|
135
|
+
const o = c + 1, w = o <= l;
|
|
136
|
+
return s[o] === "include-min-length" ? d({ requirementRule: "include-min-length", textMinLength: t }) ? a(o, u, w) : null : a(o, u, w);
|
|
137
137
|
}));
|
|
138
138
|
})()) : null;
|
|
139
139
|
}, { getGidsRequirementsMeterLabelClassNames: ne } = J, { getRequirementsMeterLabelLeadingIcon: le } = $, ae = (e) => {
|
|
140
140
|
const { label: t, status: s = "default", leadingIconVisible: n = !0, class: a } = e, r = le(s);
|
|
141
141
|
return i("div", { class: ne({ status: s }, a) }, n && s && r ? i(j, { name: r, size: "sm", appearance: "filled" }) : null, t && t !== "" ? i("span", null, t) : null);
|
|
142
|
-
}, { checkRequirementRuleSatisfied: ue } =
|
|
142
|
+
}, { checkRequirementRuleSatisfied: ue } = V, { getGidsRequirementsMeterClassNames: oe } = Q, de = ({ requirements: e = [], text: t, textMinLength: s, class: n }) => {
|
|
143
143
|
const a = (r, l) => i(ae, { status: l ? "success" : "error", label: r.requirementText });
|
|
144
|
-
return i("div", { class:
|
|
144
|
+
return i("div", { class: oe(n) }, (console.log("requirements", e), e.map(((r) => {
|
|
145
145
|
if (r?.requirementText && r?.requirementRule) {
|
|
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 }) ? a(r, l) : null : a(r, l);
|
|
148
148
|
}
|
|
149
149
|
return null;
|
|
150
150
|
}))));
|
|
@@ -190,7 +190,7 @@ const f = /[A-Z]/, b = /[a-z]/, p = /[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 && 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: "84bc020da1e496c4127ef65e4f7432b1ffb9654c" }, i("gids-field", { key: "484452f7974320a9aa937435cfb2a38027de9bc8", disabled: this.disabled, count: void 0, helperText: this.helperText, statusText: this.statusText, status: ce(this.status) }, i(L, { key: "d89c25ed9f385009ce353bb5ceee083f25b6a685", 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: "83c256b3a95e253c9fed98c31b28350dfaa91f01", 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: "7c60013a0c976f72e68c7055885969d0dfcc86bc", name: "leadingIcon" }), i("slot", { key: "d04ba13ed7d1188085cee4f77f2ead6f5d63688e", name: "leadingAccessory" }), i("div", { key: "a527bcf421410accbb74effe758eee728c152ac8", slot: "trailingAccessory", class: "gids-password-field__trailing-accessory" }, n && i(O, { key: "9a2aa3cd9bd7cb11dc48976e7bafa1ac9c86fde8", label: "clear text", size: "lg", onPressDismiss: this._handleDismiss }), a && i(F, { key: "d1b11a62438c98f74ce0c52b49ebd72727a42305", appearance: "default", size: "xs", width: "intrinsic", disabled: this.disabled, onClick: this._handleRevealPassword }, u ? "Hide" : "Show")))), i("div", { key: "2ba8e5b0e4c3fef3c19d151455cdefea6c619126", class: "gids-password-field__meters-container" }, i(ie, { key: "57b83f9ac75d5fac702b7992863ea6603fc48dd1", meterRules: _, text: this.value, textMinLength: c }), i(de, { key: "018f5c35f66b3d80aade1b827b323274b27fd7bb", requirements: this.requirementsMeterRequirements, text: this.value, textMinLength: c })));
|
|
194
194
|
}
|
|
195
195
|
get _el() {
|
|
196
196
|
return this;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { C as i, f as c, R as t, H as s } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
|
+
import { i as a } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
|
+
import { c as n } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
const l = (e) => n("gids-scrim", e), d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5
|
+
__proto__: null,
|
|
6
|
+
getGidsScrimClassNames: l
|
|
7
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsScrimClassNames: m } = d, o = i(class extends c {
|
|
8
|
+
constructor(e) {
|
|
9
|
+
super(), e !== !1 && this.__registerHost(), this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
const e = a();
|
|
13
|
+
e !== void 0 && this._el.shadowRoot?.adoptedStyleSheets.push(e);
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return t("div", { key: "befcd12706dbf780586972ee76bda7d7a64e8702", class: m(this.extraClasses) }, t("slot", { key: "a7bf7c4732706d7bc954d5160b6154868a785913" }));
|
|
17
|
+
}
|
|
18
|
+
get _el() {
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
static get style() {
|
|
22
|
+
return ".gids-scrim{display:flex;flex-direction:column;background-color:var(--gids-color-background-scrim);height:100vh !important;position:absolute;top:0;bottom:0;left:0;right:0;z-index:1001;align-items:center;justify-content:center;backdrop-filter:blur(calc(var(24px) / 2))}";
|
|
23
|
+
}
|
|
24
|
+
}, [257, "gids-scrim", { extraClasses: [513, "extra-classes"] }]);
|
|
25
|
+
function r() {
|
|
26
|
+
typeof customElements < "u" && ["gids-scrim"].forEach(((e) => {
|
|
27
|
+
e === "gids-scrim" && (customElements.get(s(e)) || customElements.define(s(e), o));
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
r();
|
|
31
|
+
const b = o, p = r;
|
|
32
|
+
export {
|
|
33
|
+
b as GidsScrim,
|
|
34
|
+
p as defineCustomElement
|
|
35
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as u, f as
|
|
1
|
+
import { C as u, f as c, V as h, N as f, R as i, H as s } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
2
|
import { i as b } from "./p-B2zUuNXz-BLBgQDu7.js";
|
|
3
3
|
import { o as m, n as p } from "./p-DijVkS9b-CtFkEtlE.js";
|
|
4
|
-
import { h as g } from "./p-
|
|
5
|
-
import { r as x } from "./p-
|
|
4
|
+
import { h as g } from "./p-BplPYg8z-B8uAAfo4.js";
|
|
5
|
+
import { r as x } from "./p-BVh4zbX4-C4UJ8LPX.js";
|
|
6
6
|
import { g as _ } from "./p-veoOgDXg-DElc87c0.js";
|
|
7
7
|
const v = (e, t) => {
|
|
8
8
|
if (!(e === void 0 || t === void 0))
|
|
@@ -16,16 +16,16 @@ const v = (e, t) => {
|
|
|
16
16
|
default:
|
|
17
17
|
return "default";
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
20
20
|
__proto__: null,
|
|
21
21
|
formatCharCount: v,
|
|
22
22
|
inputToGidsFieldStatus: T
|
|
23
|
-
}, Symbol.toStringTag, { value: "Module" })), { inputToGidsFieldStatus: y } =
|
|
23
|
+
}, Symbol.toStringTag, { value: "Module" })), { inputToGidsFieldStatus: y } = n, q = (e) => e === "implicit" || e === void 0 ? "implicit" : y(e), C = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
24
24
|
__proto__: null,
|
|
25
25
|
inputToGidsFieldStatus: q
|
|
26
|
-
}, Symbol.toStringTag, { value: "Module" })), { formatCharCount: F } =
|
|
26
|
+
}, Symbol.toStringTag, { value: "Module" })), { formatCharCount: F } = n, { inputToGidsFieldStatus: O } = C, l = u(class extends c {
|
|
27
27
|
constructor(e) {
|
|
28
|
-
super(), e !== !1 && this.__registerHost(), this.gidsTextFieldClear =
|
|
28
|
+
super(), e !== !1 && this.__registerHost(), this.gidsTextFieldClear = h(this, "gidsTextFieldClear"), this.#e = _(), this._handleDismiss = () => {
|
|
29
29
|
const t = this.#t?.querySelector("input.gids-input__control");
|
|
30
30
|
t && (t.value = "", t.dispatchEvent(new globalThis.Event("input", { bubbles: !0 }))), this.value = "", this.gidsTextFieldClear.emit();
|
|
31
31
|
}, this._handleInput = (t) => {
|
|
@@ -49,8 +49,8 @@ const v = (e, t) => {
|
|
|
49
49
|
#e;
|
|
50
50
|
#t;
|
|
51
51
|
render() {
|
|
52
|
-
const { id: e, ...t } = this.inputProps ?? {},
|
|
53
|
-
return i("gids-field", { key: "
|
|
52
|
+
const { id: e, ...t } = this.inputProps ?? {}, a = e ?? this.#e, d = this.showClearButton && this.value !== void 0 && this.value.length > 0;
|
|
53
|
+
return i("gids-field", { key: "7aa5bbe489adc1310365d37aac41ca9772fa1d0f", disabled: this.disabled, count: F(this.value?.length, this.maxLength), helperText: this.helperText, statusText: this.statusText, status: O(this.status) }, i(p, { key: "5a9bf6cfe25a0800b466a0aaccd21ac80aca59bb", slot: "label", disabled: this.disabled, info: i("slot", { name: "info" }), fieldRequirement: this.fieldRequirement, fieldRequirementOptionalText: this.fieldRequirementOptionalText, fieldRequirementRequiredText: this.fieldRequirementRequiredText, isLabelSentence: this.isLabelSentence, htmlFor: a }, this.label), i("gids-input", { key: "53f0d81f5227ed7a872ec9acebb559d21c4adc6e", ref: (o) => this.#t = o, appearance: this.appearance, status: this.status, loading: this.loading, value: this.value, defaultValue: this.defaultValue, name: this.name, required: this.required, disabled: this.disabled, readOnly: this.readOnly, leadingLabel: this.leadingLabel, trailingLabel: this.trailingLabel, onFocus: this._handleInputFocusAndBlur, onBlur: this._handleInputFocusAndBlur, onInput: this._handleInput, inputProps: { ...t, type: this.type, id: a, maxLength: this.maxLength } }, i("slot", { key: "42a2856da9b6d31452fc3fb199eacb336bff3475", name: "leadingIcon" }), i("slot", { key: "3b5cbe26cc943ffeab09231a7d7df750f7b473f7", name: "leadingAccessory" }), d && i(m, { key: "51a7942f8e31430bf1d74abad31049e9ad11f92e", label: "clear text", slot: "trailingAccessory", size: "lg", onPressDismiss: this._handleDismiss }), i("slot", { key: "ae4eccacb0f60d70b57e5df949f7a0dbc9098654", name: "trailingIcon" })));
|
|
54
54
|
}
|
|
55
55
|
get _el() {
|
|
56
56
|
return this;
|
|
@@ -60,7 +60,7 @@ function r() {
|
|
|
60
60
|
typeof customElements < "u" && ["gids-text-field", "gids-field", "gids-input"].forEach(((e) => {
|
|
61
61
|
switch (e) {
|
|
62
62
|
case "gids-text-field":
|
|
63
|
-
customElements.get(s(e)) || customElements.define(s(e),
|
|
63
|
+
customElements.get(s(e)) || customElements.define(s(e), l);
|
|
64
64
|
break;
|
|
65
65
|
case "gids-field":
|
|
66
66
|
customElements.get(s(e)) || g();
|
|
@@ -71,7 +71,7 @@ function r() {
|
|
|
71
71
|
}));
|
|
72
72
|
}
|
|
73
73
|
r();
|
|
74
|
-
const I =
|
|
74
|
+
const I = l, G = r;
|
|
75
75
|
export {
|
|
76
76
|
I as GidsTextField,
|
|
77
77
|
G as defineCustomElement
|
|
@@ -21,9 +21,9 @@ const i = l(class extends n {
|
|
|
21
21
|
this._el.selected = e, this.select?.emit(e);
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return t(a, { key: "
|
|
24
|
+
return t(a, { key: "629bf94de5dcf8979c4c52f749e6f1528506cb7f" }, t("style", { key: "45b2ada2ba3e26b574f7c34675622db5352802d2" }, `:host {
|
|
25
25
|
display: ${this.width === "full" ? "block" : "inline-block"}
|
|
26
|
-
}`), t(c, { key: "
|
|
26
|
+
}`), t(c, { key: "2f93e85e5dbf968c09c245e71a41a9b587ead04c", appearance: this.appearance, size: this.size, width: this.width, disabled: this.disabled, onClick: this._toggle, "aria-pressed": this.selected ? "true" : "false", leadingIcon: t("slot", { name: "leadingIcon" }), trailingIcon: t("slot", { name: "trailingIcon" }), forceIconOnly: this._onlyHasLeadingIcon() }, t("slot", { key: "599d014741a1d931f44976866e92837ed2184e5f" })));
|
|
27
27
|
}
|
|
28
28
|
_onlyHasLeadingIcon() {
|
|
29
29
|
const e = this._el.childNodes;
|
|
@@ -39,8 +39,8 @@ function o() {
|
|
|
39
39
|
}));
|
|
40
40
|
}
|
|
41
41
|
o();
|
|
42
|
-
const
|
|
42
|
+
const u = i, b = o;
|
|
43
43
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
u as GidsToggleButton,
|
|
45
|
+
b as defineCustomElement
|
|
46
46
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as s, C as l, f as
|
|
1
|
+
import { H as s, C as l, f as d, R as a, L as u } from "./p-ibikYq-w-BsGxk8ro.js";
|
|
2
2
|
import { d as n } from "./p-veoOgDXg-DElc87c0.js";
|
|
3
3
|
import { l as r } from "./p-DybsMR13-DpmsG3Q1.js";
|
|
4
4
|
const c = (e) => e.type === "hidden", f = (e) => {
|
|
@@ -15,11 +15,11 @@ const c = (e) => e.type === "hidden", f = (e) => {
|
|
|
15
15
|
"SELECT",
|
|
16
16
|
"TEXTAREA"
|
|
17
17
|
].includes(t) || t === "A" && e.hasAttribute("href") || e instanceof HTMLInputElement && !c(e) || ["AUDIO", "VIDEO"].includes(t) && e.hasAttribute("controls") || ["IMG", "OBJECT"].includes(t) && e.hasAttribute("usemap") || e.hasAttribute("tabindex") && e.tabIndex > -1);
|
|
18
|
-
}, o = l(class extends
|
|
18
|
+
}, o = l(class extends d {
|
|
19
19
|
constructor(e) {
|
|
20
20
|
super(), e !== !1 && this.__registerHost(), this.#e = {}, this._focusInput = (t) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const i = t.target;
|
|
22
|
+
i === this.#t || this._isWithinInteractiveElement(i) || this.#t?.focus();
|
|
23
23
|
}, this._handleInputFocusAndBlur = (t) => {
|
|
24
24
|
this._el.dispatchEvent(new FocusEvent(t.type, { relatedTarget: t.relatedTarget }));
|
|
25
25
|
};
|
|
@@ -54,9 +54,9 @@ const c = (e) => e.type === "hidden", f = (e) => {
|
|
|
54
54
|
this._el.removeEventListener("click", this._focusInput);
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return
|
|
57
|
+
return a(u, { key: "281c832656cace745109fdd8208fe24b90f2c126" }, a("slot", { key: "5f8424a1d9bc196e3efee9d1e5d099bed15ddb4b", name: "leadingIcon" }), this.leadingLabel && a("span", { key: "2ce161a38f74618d60f38028c646c80e361aeced", class: "gids-input__label" }, this.leadingLabel), a("slot", { key: "12383525faf774eef618705cf68338a4fc9c9e55", name: "leadingAccessory" }), a("input", { key: "19de1aa1ad2a47db2979dfcbbf9b8e49d045f5af", ...this.inputProps, ref: (e) => {
|
|
58
58
|
this.#t = e, this.#e.value !== void 0 && (this.#t.value = this.#e.value, delete this.#e.value), this.#e.defaultValue !== void 0 && (this.#t.defaultValue = this.#e.defaultValue, delete this.#e.defaultValue);
|
|
59
|
-
}, class: "gids-input__control", name: this.name, disabled: this.disabled, readOnly: this.readOnly, required: this.required, onFocus: this._handleInputFocusAndBlur, onBlur: this._handleInputFocusAndBlur }),
|
|
59
|
+
}, class: "gids-input__control", name: this.name, disabled: this.disabled, readOnly: this.readOnly, required: this.required, onFocus: this._handleInputFocusAndBlur, onBlur: this._handleInputFocusAndBlur }), a("slot", { key: "3e0f6ae8c23b2536891ddd0adb7be1215d86ac66", name: "trailingAccessory" }), this.trailingLabel && a("span", { key: "9b2ac9fbf6c198dd0a4e1decf4631b2b46902587", class: "gids-input__label" }, this.trailingLabel), a("slot", { key: "d9848f786ce38136f1ad8c07d685215ede87f157", name: "trailingIcon" }), this.status === "incomplete" && a(n, { key: "bc8bcc01f07bd345b448f4662a37b28d8029a94f", name: "warning", appearance: "filled", class: "gids-input__warning-icon" }), this.status === "complete" && a(n, { key: "cafc44041a1d4eac859face7ec5eea2ced1ca3f5", name: "positive", appearance: "filled", class: "gids-input__positive-icon" }), this.loading && a(r, { key: "0daca638742b098d06da6cd9a7b9cfd6e9c90921", size: "md", indeterminate: !0 }));
|
|
60
60
|
}
|
|
61
61
|
get _el() {
|
|
62
62
|
return this;
|
|
@@ -5,7 +5,7 @@ import { c as _ } from "./clsx-OuTLNxxd.js";
|
|
|
5
5
|
const g = (t) => _("gids-field", t), u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
6
|
__proto__: null,
|
|
7
7
|
getGidsFieldClassNames: g
|
|
8
|
-
}, Symbol.toStringTag, { value: "Module" })), { getGidsFieldClassNames:
|
|
8
|
+
}, Symbol.toStringTag, { value: "Module" })), { getGidsFieldClassNames: p } = u, f = n(class extends r {
|
|
9
9
|
constructor(t) {
|
|
10
10
|
super(), t !== !1 && this.__registerHost(), this.__attachShadow(), this.status = "implicit", this._hasLabel = !1, this._controlListenerTargets = [], this._controlTouched = !1, this._handleLabelSlotChange = () => {
|
|
11
11
|
this._hasLabel = (this._labelSlot?.assignedElements()?.length ?? 0) > 0;
|
|
@@ -56,7 +56,7 @@ const g = (t) => _("gids-field", t), u = /* @__PURE__ */ Object.freeze(/* @__PUR
|
|
|
56
56
|
const a = this._getStatusModifierClass(s, "gids-field__status-text");
|
|
57
57
|
a != null && i.push(a);
|
|
58
58
|
}
|
|
59
|
-
return o(d, { key: "
|
|
59
|
+
return o(d, { key: "4bd0ef4ac11ded5f563595485082650801fdbe1b" }, o("div", { key: "3617e3301f53dcb21a9beb98b4a23d620e3dd39d", class: p() }, o("div", { key: "bb1f6710ee27c94346f7ee9459389d901b23d913", class: "gids-field__header", hidden: !this._hasLabelContent() }, o("slot", { key: "8fa03ca31936bc6082052b099ac29afea2ec3032", ref: this._setLabelSlot, name: "label", onSlotchange: this._handleControlSlotChange }), o("div", { key: "1b50c69005c2d0b89c47dc01c2dcbb343bdeecff", class: "gids-field__count", "aria-live": "polite" }, this.count)), o("div", { key: "b8664a96496a6e7289fb14bdadbb59dcee9af3d1", class: "gids-field__control" }, o("slot", { key: "bff757557406c0165be3569c4eb34adb1fe346ca", ref: this._setControlSlot, onSlotchange: this._handleControlSlotChange })), o("p", { key: "0638e493fc4ac98f6c10a8392c45ffde8b8340a4", class: "gids-field__supporting-text", hidden: !this._shouldShowHelperText() }, this.helperText), t ? o("p", { class: i.join(" "), role: "status", "aria-live": "polite" }, this._renderStatusIcon(s), e !== void 0 ? o("span", null, e) : null) : null));
|
|
60
60
|
}
|
|
61
61
|
_hasLabelContent() {
|
|
62
62
|
return this._hasLabel;
|
|
@@ -171,11 +171,11 @@ const g = (t) => _("gids-field", t), u = /* @__PURE__ */ Object.freeze(/* @__PUR
|
|
|
171
171
|
}, [257, "gids-field", { disabled: [516], count: [513], helperText: [513, "helper-text"], statusText: [513, "status-text"], status: [513], _controlValidationMessage: [32], _hasLabel: [32], reScanControl: [64] }, void 0, { status: [{ _handleStatusChange: 0 }] }]);
|
|
172
172
|
function m() {
|
|
173
173
|
typeof customElements < "u" && ["gids-field"].forEach(((t) => {
|
|
174
|
-
t === "gids-field" && (customElements.get(l(t)) || customElements.define(l(t),
|
|
174
|
+
t === "gids-field" && (customElements.get(l(t)) || customElements.define(l(t), f));
|
|
175
175
|
}));
|
|
176
176
|
}
|
|
177
177
|
m();
|
|
178
178
|
export {
|
|
179
|
-
|
|
179
|
+
f as d,
|
|
180
180
|
m as h
|
|
181
181
|
};
|