@descope/web-components-ui 1.0.135 → 1.0.148
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +77 -56
- package/src/baseClasses/createBaseClass.js +18 -16
- package/src/baseClasses/createBaseInputClass.js +14 -8
- package/src/baseClasses/createCssVarImageClass.js +27 -23
- package/src/components/boolean-fields/booleanFieldMixin.js +18 -29
- package/src/components/boolean-fields/commonStyles.js +1 -1
- package/src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js +46 -51
- package/src/components/boolean-fields/descope-boolean-field-internal/index.js +1 -1
- package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +80 -85
- package/src/components/boolean-fields/descope-checkbox/index.js +2 -2
- package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +88 -95
- package/src/components/boolean-fields/descope-switch-toggle/index.js +2 -2
- package/src/components/descope-button/ButtonClass.js +57 -47
- package/src/components/descope-button/clickableMixin.js +10 -0
- package/src/components/descope-combo-box/ComboBoxClass.js +156 -160
- package/src/components/descope-container/ContainerClass.js +32 -42
- package/src/components/descope-date-picker/index.js +9 -14
- package/src/components/descope-divider/DividerClass.js +52 -62
- package/src/components/descope-email-field/EmailFieldClass.js +25 -20
- package/src/components/descope-image/ImageClass.js +21 -24
- package/src/components/descope-link/LinkClass.js +31 -35
- package/src/components/descope-loader-linear/LoaderLinearClass.js +31 -36
- package/src/components/descope-loader-radial/LoaderRadialClass.js +23 -30
- package/src/components/descope-logo/LogoClass.js +5 -1
- package/src/components/descope-new-password/NewPasswordClass.js +63 -81
- package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +157 -162
- package/src/components/descope-new-password/descope-new-password-internal/componentName.js +1 -1
- package/src/components/descope-new-password/descope-new-password-internal/index.js +3 -3
- package/src/components/descope-new-password/index.js +3 -3
- package/src/components/descope-number-field/NumberFieldClass.js +25 -20
- package/src/components/descope-passcode/PasscodeClass.js +95 -95
- package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +151 -157
- package/src/components/descope-passcode/descope-passcode-internal/helpers.js +7 -8
- package/src/components/descope-passcode/descope-passcode-internal/index.js +2 -2
- package/src/components/descope-passcode/index.js +2 -2
- package/src/components/descope-password/PasswordClass.js +75 -83
- package/src/components/descope-password/passwordDraggableMixin.js +28 -27
- package/src/components/descope-phone-field/CountryCodes.js +1210 -1210
- package/src/components/descope-phone-field/PhoneFieldClass.js +139 -141
- package/src/components/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +157 -173
- package/src/components/descope-phone-field/helpers.js +3 -3
- package/src/components/descope-text/TextClass.js +25 -29
- package/src/components/descope-text-area/TextAreaClass.js +68 -67
- package/src/components/descope-text-field/TextFieldClass.js +42 -37
- package/src/components/descope-text-field/textFieldMappings.js +40 -55
- package/src/components/descope-totp-image/TotpImageClass.js +5 -1
- package/src/components/descope-upload-file/UploadFileClass.js +202 -0
- package/src/components/descope-upload-file/helpers.js +11 -0
- package/src/components/descope-upload-file/index.js +6 -0
- package/src/constants.js +3 -3
- package/src/helpers/componentHelpers.js +68 -74
- package/src/helpers/index.js +17 -16
- package/src/helpers/mixinsHelpers.js +21 -10
- package/src/helpers/themeHelpers/colorsHelpers.js +18 -18
- package/src/helpers/themeHelpers/componentsThemeManager.js +7 -6
- package/src/helpers/themeHelpers/index.js +114 -124
- package/src/helpers/themeHelpers/resetHelpers.js +16 -16
- package/src/index.cjs.js +3 -3
- package/src/index.d.ts +22 -21
- package/src/index.js +5 -4
- package/src/index.umd.js +14 -13
- package/src/mixins/changeMixin.js +18 -17
- package/src/mixins/componentNameValidationMixin.js +19 -19
- package/src/mixins/createProxy.js +33 -33
- package/src/mixins/createStyleMixin/helpers.js +54 -64
- package/src/mixins/createStyleMixin/index.js +155 -141
- package/src/mixins/draggableMixin.js +61 -61
- package/src/mixins/hoverableMixin.js +11 -13
- package/src/mixins/index.js +6 -6
- package/src/mixins/inputEventsDispatchingMixin.js +61 -60
- package/src/mixins/inputValidationMixin.js +153 -148
- package/src/mixins/lifecycleEventsMixin.js +17 -15
- package/src/mixins/normalizeBooleanAttributesMixin.js +31 -23
- package/src/mixins/portalMixin.js +58 -52
- package/src/mixins/proxyInputMixin.js +138 -132
- package/src/theme/components/button.js +86 -81
- package/src/theme/components/checkbox.js +26 -28
- package/src/theme/components/comboBox.js +32 -31
- package/src/theme/components/container.js +99 -89
- package/src/theme/components/divider.js +30 -31
- package/src/theme/components/emailField.js +20 -19
- package/src/theme/components/image.js +3 -3
- package/src/theme/components/index.js +33 -25
- package/src/theme/components/inputWrapper.js +28 -25
- package/src/theme/components/link.js +29 -36
- package/src/theme/components/loader/index.js +3 -3
- package/src/theme/components/loader/loaderLinear.js +34 -34
- package/src/theme/components/loader/loaderRadial.js +40 -34
- package/src/theme/components/logo.js +4 -4
- package/src/theme/components/newPassword.js +14 -13
- package/src/theme/components/numberField.js +20 -19
- package/src/theme/components/passcode.js +20 -22
- package/src/theme/components/password.js +22 -21
- package/src/theme/components/phoneField.js +23 -23
- package/src/theme/components/switchToggle.js +47 -46
- package/src/theme/components/text.js +72 -72
- package/src/theme/components/textArea.js +27 -25
- package/src/theme/components/textField.js +23 -22
- package/src/theme/components/totpImage.js +4 -4
- package/src/theme/components/uploadFile.js +60 -0
- package/src/theme/globals.js +123 -124
- package/src/theme/index.js +1 -1
- package/dist/cjs/index.cjs.js +0 -5924
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/package.json +0 -1
- package/dist/index.d.ts +0 -51
- package/dist/index.esm.js +0 -6606
- package/dist/index.esm.js.map +0 -1
- package/dist/umd/1018.js +0 -577
- package/dist/umd/1018.js.LICENSE.txt +0 -23
- package/dist/umd/2481.js +0 -1
- package/dist/umd/3208.js +0 -2
- package/dist/umd/3208.js.LICENSE.txt +0 -5
- package/dist/umd/3585.js +0 -1
- package/dist/umd/3878.js +0 -1
- package/dist/umd/4201.js +0 -1
- package/dist/umd/422.js +0 -2
- package/dist/umd/422.js.LICENSE.txt +0 -5
- package/dist/umd/4447.js +0 -1
- package/dist/umd/4513.js +0 -1
- package/dist/umd/4803.js +0 -1
- package/dist/umd/541.js +0 -744
- package/dist/umd/541.js.LICENSE.txt +0 -21
- package/dist/umd/5767.js +0 -2
- package/dist/umd/5767.js.LICENSE.txt +0 -15
- package/dist/umd/5806.js +0 -109
- package/dist/umd/5806.js.LICENSE.txt +0 -5
- package/dist/umd/7056.js +0 -48
- package/dist/umd/7056.js.LICENSE.txt +0 -5
- package/dist/umd/7101.js +0 -148
- package/dist/umd/7101.js.LICENSE.txt +0 -11
- package/dist/umd/729.js +0 -1
- package/dist/umd/7824.js +0 -229
- package/dist/umd/7824.js.LICENSE.txt +0 -27
- package/dist/umd/7840.js +0 -356
- package/dist/umd/7840.js.LICENSE.txt +0 -61
- package/dist/umd/8725.js +0 -37
- package/dist/umd/8725.js.LICENSE.txt +0 -11
- package/dist/umd/9211.js +0 -312
- package/dist/umd/9211.js.LICENSE.txt +0 -5
- package/dist/umd/9241.js +0 -1
- package/dist/umd/9314.js +0 -283
- package/dist/umd/9314.js.LICENSE.txt +0 -27
- package/dist/umd/9437.js +0 -19
- package/dist/umd/9437.js.LICENSE.txt +0 -5
- package/dist/umd/9515.js +0 -202
- package/dist/umd/9515.js.LICENSE.txt +0 -11
- package/dist/umd/9789.js +0 -1
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +0 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +0 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +0 -1
- package/dist/umd/descope-button-index-js.js +0 -1
- package/dist/umd/descope-combo-box-index-js.js +0 -1
- package/dist/umd/descope-container-index-js.js +0 -1
- package/dist/umd/descope-date-picker-index-js.js +0 -1
- package/dist/umd/descope-divider-index-js.js +0 -1
- package/dist/umd/descope-email-field-index-js.js +0 -1
- package/dist/umd/descope-image-index-js.js +0 -1
- package/dist/umd/descope-link-index-js.js +0 -1
- package/dist/umd/descope-loader-linear-index-js.js +0 -1
- package/dist/umd/descope-loader-radial-index-js.js +0 -1
- package/dist/umd/descope-logo-index-js.js +0 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +0 -1
- package/dist/umd/descope-new-password-index-js.js +0 -1
- package/dist/umd/descope-number-field-index-js.js +0 -1
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +0 -1
- package/dist/umd/descope-passcode-index-js.js +0 -1
- package/dist/umd/descope-password-index-js.js +0 -1
- package/dist/umd/descope-phone-field-descope-phone-field-internal-index-js.js +0 -1
- package/dist/umd/descope-phone-field-index-js.js +0 -1
- package/dist/umd/descope-text-area-index-js.js +0 -1
- package/dist/umd/descope-text-field-index-js.js +0 -1
- package/dist/umd/descope-text-index-js.js +0 -1
- package/dist/umd/descope-totp-image-index-js.js +0 -1
- package/dist/umd/index.js +0 -1
@@ -1,38 +1,43 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
createStyleMixin,
|
3
|
+
draggableMixin,
|
4
|
+
createProxy,
|
5
|
+
proxyInputMixin,
|
6
|
+
componentNameValidationMixin,
|
7
7
|
} from '../../mixins';
|
8
8
|
import textFieldMappings from '../descope-text-field/textFieldMappings';
|
9
9
|
import { compose } from '../../helpers';
|
10
10
|
import { getComponentName } from '../../helpers/componentHelpers';
|
11
|
-
import {
|
11
|
+
import {
|
12
|
+
resetInputOverrides,
|
13
|
+
useHostExternalPadding,
|
14
|
+
} from '../../helpers/themeHelpers/resetHelpers';
|
12
15
|
|
13
16
|
export const componentName = getComponentName('email-field');
|
14
17
|
|
15
18
|
export const EmailFieldClass = compose(
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
createStyleMixin({
|
20
|
+
mappings: textFieldMappings,
|
21
|
+
}),
|
22
|
+
draggableMixin,
|
23
|
+
proxyInputMixin,
|
24
|
+
componentNameValidationMixin
|
22
25
|
)(
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
26
|
+
createProxy({
|
27
|
+
slots: ['suffix'],
|
28
|
+
wrappedEleName: 'vaadin-email-field',
|
29
|
+
style: () => `
|
27
30
|
:host {
|
28
31
|
display: inline-block;
|
29
32
|
max-width: 100%;
|
30
|
-
padding: calc(var(${EmailFieldClass.cssVarList.inputOutlineWidth}) + var(${
|
33
|
+
padding: calc(var(${EmailFieldClass.cssVarList.inputOutlineWidth}) + var(${
|
34
|
+
EmailFieldClass.cssVarList.inputOutlineOffset
|
35
|
+
}))
|
31
36
|
}
|
32
37
|
${useHostExternalPadding(EmailFieldClass.cssVarList)}
|
33
38
|
${resetInputOverrides('vaadin-email-field', EmailFieldClass.cssVarList)}
|
34
39
|
`,
|
35
|
-
|
36
|
-
|
37
|
-
|
40
|
+
excludeAttrsSync: ['tabindex'],
|
41
|
+
componentName,
|
42
|
+
})
|
38
43
|
);
|
@@ -1,25 +1,22 @@
|
|
1
|
-
import {
|
2
|
-
createStyleMixin,
|
3
|
-
draggableMixin,
|
4
|
-
} from '../../mixins';
|
1
|
+
import { createStyleMixin, draggableMixin } from '../../mixins';
|
5
2
|
import { createBaseClass } from '../../baseClasses/createBaseClass';
|
6
3
|
import { compose } from '../../helpers';
|
7
4
|
import { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';
|
8
5
|
|
9
|
-
const observedAttributes = ['src', 'alt']
|
6
|
+
const observedAttributes = ['src', 'alt'];
|
10
7
|
|
11
8
|
export const componentName = getComponentName('image');
|
12
9
|
|
13
|
-
const BaseClass = createBaseClass({ componentName, baseSelector: ':host > img' })
|
10
|
+
const BaseClass = createBaseClass({ componentName, baseSelector: ':host > img' });
|
14
11
|
class RawImage extends BaseClass {
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
static get observedAttributes() {
|
13
|
+
return observedAttributes.concat(BaseClass.observedAttributes || []);
|
14
|
+
}
|
18
15
|
|
19
|
-
|
20
|
-
|
16
|
+
constructor() {
|
17
|
+
super();
|
21
18
|
|
22
|
-
|
19
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
23
20
|
<style>
|
24
21
|
:host > img {
|
25
22
|
width: 100%;
|
@@ -31,21 +28,21 @@ class RawImage extends BaseClass {
|
|
31
28
|
</style>
|
32
29
|
<img/>
|
33
30
|
`;
|
34
|
-
|
31
|
+
}
|
35
32
|
|
36
|
-
|
37
|
-
|
33
|
+
connectedCallback() {
|
34
|
+
super.connectedCallback?.();
|
38
35
|
|
39
|
-
|
40
|
-
|
36
|
+
forwardAttrs(this, this.baseElement, { includeAttrs: observedAttributes });
|
37
|
+
}
|
41
38
|
}
|
42
39
|
|
43
40
|
export const ImageClass = compose(
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
41
|
+
createStyleMixin({
|
42
|
+
mappings: {
|
43
|
+
height: { selector: () => ':host' },
|
44
|
+
width: { selector: () => ':host' },
|
45
|
+
},
|
46
|
+
}),
|
47
|
+
draggableMixin
|
51
48
|
)(RawImage);
|
@@ -1,8 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
createStyleMixin,
|
3
|
-
draggableMixin,
|
4
|
-
componentNameValidationMixin,
|
5
|
-
} from '../../mixins';
|
1
|
+
import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';
|
6
2
|
import { createBaseClass } from '../../baseClasses/createBaseClass';
|
7
3
|
import { TextClass } from '../descope-text/TextClass';
|
8
4
|
import { compose } from '../../helpers';
|
@@ -11,10 +7,10 @@ import { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';
|
|
11
7
|
export const componentName = getComponentName('link');
|
12
8
|
|
13
9
|
class RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {
|
14
|
-
|
15
|
-
|
10
|
+
constructor() {
|
11
|
+
super();
|
16
12
|
|
17
|
-
|
13
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
18
14
|
<style>
|
19
15
|
:host {
|
20
16
|
display: inline-block;
|
@@ -36,40 +32,40 @@ class RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }
|
|
36
32
|
</div>
|
37
33
|
`;
|
38
34
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
35
|
+
forwardAttrs(this, this.shadowRoot.querySelector('a'), {
|
36
|
+
includeAttrs: ['href', 'target', 'tooltip'],
|
37
|
+
mapAttrs: {
|
38
|
+
tooltip: 'title',
|
39
|
+
},
|
40
|
+
});
|
45
41
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
42
|
+
forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {
|
43
|
+
includeAttrs: ['mode', 'variant'],
|
44
|
+
});
|
45
|
+
}
|
50
46
|
}
|
51
47
|
|
52
48
|
const selectors = {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
49
|
+
host: { selector: () => ':host' },
|
50
|
+
anchor: {},
|
51
|
+
wrapper: { selector: () => ':host > div' },
|
52
|
+
text: { selector: () => TextClass.componentName },
|
57
53
|
};
|
58
54
|
|
59
55
|
const { anchor, text, host, wrapper } = selectors;
|
60
56
|
|
61
57
|
export const LinkClass = compose(
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
58
|
+
createStyleMixin({
|
59
|
+
mappings: {
|
60
|
+
hostWidth: { ...host, property: 'width' },
|
61
|
+
textAlign: wrapper,
|
62
|
+
textColor: [
|
63
|
+
{ ...anchor, property: 'color' },
|
64
|
+
{ ...text, property: TextClass.cssVarList.textColor },
|
65
|
+
],
|
66
|
+
cursor: anchor,
|
67
|
+
},
|
68
|
+
}),
|
69
|
+
draggableMixin,
|
70
|
+
componentNameValidationMixin
|
75
71
|
)(RawLink);
|
@@ -1,8 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
createStyleMixin,
|
3
|
-
draggableMixin,
|
4
|
-
componentNameValidationMixin
|
5
|
-
} from '../../mixins';
|
1
|
+
import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';
|
6
2
|
import { createBaseClass } from '../../baseClasses/createBaseClass';
|
7
3
|
import { compose } from '../../helpers';
|
8
4
|
import { getComponentName } from '../../helpers/componentHelpers';
|
@@ -10,13 +6,14 @@ import { getComponentName } from '../../helpers/componentHelpers';
|
|
10
6
|
export const componentName = getComponentName('loader-linear');
|
11
7
|
|
12
8
|
class RawLoaderLinear extends createBaseClass({ componentName, baseSelector: ':host > div' }) {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
constructor() {
|
17
|
-
super();
|
9
|
+
static get componentName() {
|
10
|
+
return componentName;
|
11
|
+
}
|
18
12
|
|
19
|
-
|
13
|
+
constructor() {
|
14
|
+
super();
|
15
|
+
|
16
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
20
17
|
<style>
|
21
18
|
@keyframes tilt {
|
22
19
|
0% { transform: translateX(0); }
|
@@ -38,37 +35,35 @@ class RawLoaderLinear extends createBaseClass({ componentName, baseSelector: ':h
|
|
38
35
|
</style>
|
39
36
|
<div></div>
|
40
37
|
`;
|
41
|
-
|
38
|
+
}
|
42
39
|
}
|
43
40
|
|
44
41
|
const selectors = {
|
45
|
-
|
46
|
-
|
42
|
+
after: { selector: '::after' },
|
43
|
+
host: { selector: () => ':host' },
|
47
44
|
};
|
48
45
|
|
49
46
|
const { after, host } = selectors;
|
50
47
|
|
51
48
|
export const LoaderLinearClass = compose(
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
draggableMixin,
|
73
|
-
componentNameValidationMixin
|
49
|
+
createStyleMixin({
|
50
|
+
mappings: {
|
51
|
+
hostDisplay: {},
|
52
|
+
hostWidth: { ...host, property: 'width' },
|
53
|
+
barHeight: [{ property: 'height' }, { ...after, property: 'height' }],
|
54
|
+
barBorderRadius: [{ property: 'border-radius' }, { ...after, property: 'border-radius' }],
|
55
|
+
verticalPadding: [
|
56
|
+
{ ...host, property: 'padding-top' },
|
57
|
+
{ ...host, property: 'padding-bottom' },
|
58
|
+
],
|
59
|
+
barBackgroundColor: { property: 'background-color' },
|
60
|
+
barColor: { ...after, property: 'background-color' },
|
61
|
+
barWidth: { ...after, property: 'width' },
|
62
|
+
animationDuration: [{}, after],
|
63
|
+
animationTimingFunction: [{}, after],
|
64
|
+
animationIterationCount: [{}, after],
|
65
|
+
},
|
66
|
+
}),
|
67
|
+
draggableMixin,
|
68
|
+
componentNameValidationMixin
|
74
69
|
)(RawLoaderLinear);
|
@@ -1,8 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
createStyleMixin,
|
3
|
-
draggableMixin,
|
4
|
-
componentNameValidationMixin
|
5
|
-
} from '../../mixins';
|
1
|
+
import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';
|
6
2
|
import { createBaseClass } from '../../baseClasses/createBaseClass';
|
7
3
|
import { compose } from '../../helpers';
|
8
4
|
import { getComponentName } from '../../helpers/componentHelpers';
|
@@ -10,10 +6,10 @@ import { getComponentName } from '../../helpers/componentHelpers';
|
|
10
6
|
export const componentName = getComponentName('loader-radial');
|
11
7
|
|
12
8
|
class RawLoaderRadial extends createBaseClass({ componentName, baseSelector: ':host > div' }) {
|
13
|
-
|
14
|
-
|
9
|
+
constructor() {
|
10
|
+
super();
|
15
11
|
|
16
|
-
|
12
|
+
this.attachShadow({ mode: 'open' }).innerHTML = `
|
17
13
|
<style>
|
18
14
|
@keyframes spin {
|
19
15
|
0% { transform: rotate(0deg); }
|
@@ -29,29 +25,26 @@ class RawLoaderRadial extends createBaseClass({ componentName, baseSelector: ':h
|
|
29
25
|
</style>
|
30
26
|
<div></div>
|
31
27
|
`;
|
32
|
-
|
28
|
+
}
|
33
29
|
}
|
34
30
|
|
35
31
|
export const LoaderRadialClass = compose(
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
}),
|
55
|
-
draggableMixin,
|
56
|
-
componentNameValidationMixin
|
32
|
+
createStyleMixin({
|
33
|
+
mappings: {
|
34
|
+
hostDisplay: { property: 'display' },
|
35
|
+
spinnerSize: [{ property: 'width' }, { property: 'height' }],
|
36
|
+
spinnerBorderWidth: { property: 'border-width' },
|
37
|
+
spinnerBorderStyle: { property: 'border-style' },
|
38
|
+
spinnerBorderRadius: { property: 'border-radius' },
|
39
|
+
spinnerQuadrant1Color: { property: 'border-top-color' },
|
40
|
+
spinnerQuadrant2Color: { property: 'border-bottom-color' },
|
41
|
+
spinnerQuadrant3Color: { property: 'border-right-color' },
|
42
|
+
spinnerQuadrant4Color: { property: 'border-left-color' },
|
43
|
+
animationDuration: {},
|
44
|
+
animationTimingFunction: {},
|
45
|
+
animationIterationCount: {},
|
46
|
+
},
|
47
|
+
}),
|
48
|
+
draggableMixin,
|
49
|
+
componentNameValidationMixin
|
57
50
|
)(RawLoaderRadial);
|
@@ -3,4 +3,8 @@ import { createCssVarImageClass } from '../../baseClasses/createCssVarImageClass
|
|
3
3
|
|
4
4
|
export const componentName = getComponentName('logo');
|
5
5
|
|
6
|
-
export const LogoClass = createCssVarImageClass({
|
6
|
+
export const LogoClass = createCssVarImageClass({
|
7
|
+
componentName,
|
8
|
+
varName: 'url',
|
9
|
+
fallbackVarName: 'fallbackUrl',
|
10
|
+
});
|
@@ -1,11 +1,6 @@
|
|
1
1
|
import { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';
|
2
2
|
import { compose } from '../../helpers';
|
3
|
-
import {
|
4
|
-
createStyleMixin,
|
5
|
-
proxyInputMixin,
|
6
|
-
draggableMixin,
|
7
|
-
createProxy,
|
8
|
-
} from '../../mixins';
|
3
|
+
import { createStyleMixin, proxyInputMixin, draggableMixin, createProxy } from '../../mixins';
|
9
4
|
import { componentName as descopeInternalComponentName } from './descope-new-password-internal/componentName';
|
10
5
|
import { PasswordClass } from '../descope-password/PasswordClass';
|
11
6
|
import { useHostExternalPadding } from '../../helpers/themeHelpers/resetHelpers';
|
@@ -13,91 +8,78 @@ import { useHostExternalPadding } from '../../helpers/themeHelpers/resetHelpers'
|
|
13
8
|
export const componentName = getComponentName('new-password');
|
14
9
|
|
15
10
|
const customMixin = (superclass) =>
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
}
|
20
|
-
|
21
|
-
init() {
|
22
|
-
super.init?.();
|
11
|
+
class NewPasswordMixinClass extends superclass {
|
12
|
+
init() {
|
13
|
+
super.init?.();
|
23
14
|
|
24
|
-
|
15
|
+
const template = document.createElement('template');
|
25
16
|
|
26
|
-
|
27
|
-
<${descopeInternalComponentName}
|
28
|
-
name="new-password"
|
17
|
+
template.innerHTML = `
|
18
|
+
<${descopeInternalComponentName}
|
19
|
+
name="new-password"
|
29
20
|
tabindex="-1"
|
30
21
|
slot="input"
|
31
22
|
></${descopeInternalComponentName}>
|
32
23
|
`;
|
33
24
|
|
34
|
-
|
25
|
+
this.baseElement.appendChild(template.content.cloneNode(true));
|
35
26
|
|
36
|
-
|
27
|
+
this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);
|
37
28
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
29
|
+
forwardAttrs(this, this.inputElement, {
|
30
|
+
includeAttrs: [
|
31
|
+
'password-label',
|
32
|
+
'password-placeholder',
|
33
|
+
'confirm-label',
|
34
|
+
'confirm-placeholder',
|
35
|
+
'full-width',
|
36
|
+
'size',
|
37
|
+
'bordered',
|
38
|
+
'label',
|
39
|
+
'has-confirm',
|
40
|
+
'invalid',
|
41
|
+
'readonly',
|
42
|
+
'draggable',
|
43
|
+
],
|
44
|
+
});
|
45
|
+
}
|
46
|
+
};
|
56
47
|
|
57
|
-
const {
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
}
|
64
|
-
host: { selector: () => ':host' },
|
65
|
-
label: { selector: '::part(label)' },
|
66
|
-
internalInputsWrapper: { selector: 'descope-new-password-internal .wrapper' },
|
67
|
-
helperText: { selector: '::part(helper-text)' },
|
68
|
-
errorMessage: { selector: '::part(error-message)' }
|
69
|
-
}
|
48
|
+
const { host, label, internalInputsWrapper, errorMessage, helperText } = {
|
49
|
+
host: { selector: () => ':host' },
|
50
|
+
label: { selector: '::part(label)' },
|
51
|
+
internalInputsWrapper: { selector: 'descope-new-password-internal .wrapper' },
|
52
|
+
helperText: { selector: '::part(helper-text)' },
|
53
|
+
errorMessage: { selector: '::part(error-message)' },
|
54
|
+
};
|
70
55
|
|
71
56
|
export const NewPasswordClass = compose(
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
draggableMixin,
|
94
|
-
proxyInputMixin,
|
95
|
-
customMixin,
|
57
|
+
createStyleMixin({
|
58
|
+
mappings: {
|
59
|
+
fontSize: [
|
60
|
+
host,
|
61
|
+
{},
|
62
|
+
{
|
63
|
+
selector: PasswordClass.componentName,
|
64
|
+
property: PasswordClass.cssVarList.fontSize,
|
65
|
+
},
|
66
|
+
],
|
67
|
+
fontFamily: [label, errorMessage, helperText],
|
68
|
+
errorMessageTextColor: { ...errorMessage, property: 'color' },
|
69
|
+
hostWidth: { ...host, property: 'width' },
|
70
|
+
hostMinWidth: { ...host, property: 'min-width' },
|
71
|
+
inputsRequiredIndicator: { ...host, property: 'content' },
|
72
|
+
spaceBetweenInputs: { ...internalInputsWrapper, property: 'gap' },
|
73
|
+
},
|
74
|
+
}),
|
75
|
+
draggableMixin,
|
76
|
+
proxyInputMixin,
|
77
|
+
customMixin
|
96
78
|
)(
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
79
|
+
createProxy({
|
80
|
+
slots: [],
|
81
|
+
wrappedEleName: 'vaadin-text-field',
|
82
|
+
style: () => `
|
101
83
|
:host {
|
102
84
|
display: inline-block;
|
103
85
|
max-width: 100%;
|
@@ -140,7 +122,7 @@ export const NewPasswordClass = compose(
|
|
140
122
|
height: initial;
|
141
123
|
},
|
142
124
|
`,
|
143
|
-
|
144
|
-
|
145
|
-
|
125
|
+
excludeAttrsSync: ['tabindex'],
|
126
|
+
componentName,
|
127
|
+
})
|
146
128
|
);
|