@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,39 +1,37 @@
|
|
1
|
-
import globals from '../globals';
|
2
|
-
import { getThemeRefs } from '../../helpers/themeHelpers';
|
3
1
|
import { CheckboxClass } from '../../components/boolean-fields/descope-checkbox/CheckboxClass';
|
4
2
|
import { refs } from './inputWrapper';
|
5
3
|
|
6
|
-
const globalRefs = getThemeRefs(globals);
|
7
4
|
const vars = CheckboxClass.cssVarList;
|
8
5
|
|
9
6
|
const checkbox = {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
7
|
+
[vars.hostWidth]: refs.width,
|
8
|
+
[vars.fontSize]: refs.fontSize,
|
9
|
+
[vars.fontFamily]: refs.fontFamily,
|
10
|
+
[vars.labelTextColor]: refs.labelTextColor,
|
11
|
+
[vars.labelRequiredIndicator]: refs.requiredIndicator,
|
12
|
+
[vars.labelFontWeight]: '400',
|
13
|
+
[vars.labelSpacing]: '0.75em',
|
14
|
+
[vars.errorMessageTextColor]: refs.errorMessageTextColor,
|
15
|
+
[vars.inputOutlineWidth]: refs.outlineWidth,
|
16
|
+
[vars.inputOutlineOffset]: refs.outlineOffset,
|
17
|
+
[vars.inputOutlineColor]: refs.outlineColor,
|
18
|
+
[vars.inputOutlineStyle]: refs.outlineStyle,
|
19
|
+
[vars.inputBorderRadius]: refs.borderRadius,
|
20
|
+
[vars.inputBorderColor]: refs.borderColor,
|
21
|
+
[vars.inputBorderWidth]: refs.borderWidth,
|
22
|
+
[vars.inputBorderStyle]: refs.borderStyle,
|
23
|
+
[vars.inputBackgroundColor]: refs.inputBackgroundColor,
|
24
|
+
[vars.inputSize]: '2em',
|
27
25
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
_checked: {
|
27
|
+
[vars.inputBackgroundColor]: refs.backgroundColor,
|
28
|
+
[vars.inputValueTextColor]: refs.valueTextColor,
|
29
|
+
},
|
32
30
|
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
_disabled: {
|
32
|
+
[vars.labelTextColor]: refs.labelTextColor,
|
33
|
+
},
|
36
34
|
};
|
37
35
|
|
38
36
|
export default checkbox;
|
39
|
-
export { vars }
|
37
|
+
export { vars };
|
@@ -7,40 +7,41 @@ const globalRefs = getThemeRefs(globals);
|
|
7
7
|
const vars = ComboBoxClass.cssVarList;
|
8
8
|
|
9
9
|
export const comboBox = {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
10
|
+
[vars.hostWidth]: refs.width,
|
11
|
+
[vars.fontSize]: refs.fontSize,
|
12
|
+
[vars.fontFamily]: refs.fontFamily,
|
13
|
+
[vars.labelTextColor]: refs.labelTextColor,
|
14
|
+
[vars.errorMessageTextColor]: refs.errorMessageTextColor,
|
15
|
+
[vars.inputBorderColor]: refs.borderColor,
|
16
|
+
[vars.inputBorderWidth]: refs.borderWidth,
|
17
|
+
[vars.inputBorderStyle]: refs.borderStyle,
|
18
|
+
[vars.inputBorderRadius]: refs.borderRadius,
|
19
|
+
[vars.inputOutlineColor]: refs.outlineColor,
|
20
|
+
[vars.inputOutlineOffset]: refs.outlineOffset,
|
21
|
+
[vars.inputOutlineWidth]: refs.outlineWidth,
|
22
|
+
[vars.inputOutlineStyle]: refs.outlineStyle,
|
23
|
+
[vars.labelRequiredIndicator]: refs.requiredIndicator,
|
24
|
+
[vars.inputValueTextColor]: refs.valueTextColor,
|
25
|
+
[vars.inputPlaceholderTextColor]: refs.placeholderTextColor,
|
26
|
+
[vars.inputBackgroundColor]: refs.backgroundColor,
|
27
|
+
[vars.inputHorizontalPadding]: refs.horizontalPadding,
|
28
|
+
[vars.inputHeight]: refs.inputHeight,
|
29
|
+
[vars.inputDropdownButtonColor]: globalRefs.colors.surface.contrast,
|
30
|
+
[vars.inputDropdownButtonCursor]: 'pointer',
|
31
|
+
[vars.inputDropdownButtonSize]: refs.toggleButtonSize,
|
32
|
+
[vars.inputDropdownButtonOffset]: globalRefs.spacing.xs,
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
34
|
+
_readonly: {
|
35
|
+
[vars.inputDropdownButtonCursor]: 'default',
|
36
|
+
},
|
36
37
|
|
37
|
-
|
38
|
-
|
38
|
+
[vars.overlay.minHeight]: '400px',
|
39
|
+
[vars.overlay.margin]: '0 auto',
|
39
40
|
|
40
|
-
|
41
|
-
|
42
|
-
|
41
|
+
// [vars.overlayCursor]: 'pointer',
|
42
|
+
// [vars.overlayBackground]: globalRefs.colors.surface.light,
|
43
|
+
// [vars.overlayBorder]: `2px solid red`,
|
43
44
|
};
|
44
45
|
|
45
46
|
export default comboBox;
|
46
|
-
export { vars }
|
47
|
+
export { vars };
|
@@ -1,106 +1,116 @@
|
|
1
|
-
import globals from
|
2
|
-
import { getThemeRefs, createHelperVars } from
|
3
|
-
import { ContainerClass, componentName } from
|
1
|
+
import globals from '../globals';
|
2
|
+
import { getThemeRefs, createHelperVars } from '../../helpers/themeHelpers';
|
3
|
+
import { ContainerClass, componentName } from '../../components/descope-container/ContainerClass';
|
4
4
|
|
5
5
|
const globalRefs = getThemeRefs(globals);
|
6
6
|
|
7
|
-
const compVars = ContainerClass.cssVarList
|
7
|
+
const compVars = ContainerClass.cssVarList;
|
8
8
|
|
9
9
|
const verticalAlignment = {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
}
|
10
|
+
start: { verticalAlignment: 'start' },
|
11
|
+
center: { verticalAlignment: 'safe center' },
|
12
|
+
end: { verticalAlignment: 'end' },
|
13
|
+
};
|
14
14
|
|
15
15
|
const horizontalAlignment = {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
}
|
20
|
-
|
21
|
-
const [helperTheme, helperRefs, helperVars] =
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
16
|
+
start: { horizontalAlignment: 'start' },
|
17
|
+
center: { horizontalAlignment: 'safe center' },
|
18
|
+
end: { horizontalAlignment: 'end' },
|
19
|
+
};
|
20
|
+
|
21
|
+
const [helperTheme, helperRefs, helperVars] = createHelperVars(
|
22
|
+
{
|
23
|
+
verticalAlignment,
|
24
|
+
horizontalAlignment,
|
25
|
+
shadowColor: '#00000020', // if we want to support transparency vars, we should use different color format
|
26
|
+
},
|
27
|
+
componentName
|
28
|
+
);
|
27
29
|
|
28
30
|
const { shadowColor } = helperRefs;
|
29
31
|
|
30
32
|
const container = {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
33
|
+
...helperTheme,
|
34
|
+
|
35
|
+
[compVars.hostWidth]: '100%',
|
36
|
+
[compVars.boxShadow]: 'none',
|
37
|
+
[compVars.backgroundColor]: globalRefs.colors.surface.light,
|
38
|
+
[compVars.color]: globalRefs.colors.surface.contrast,
|
39
|
+
|
40
|
+
verticalPadding: {
|
41
|
+
sm: { [compVars.verticalPadding]: '5px' },
|
42
|
+
md: { [compVars.verticalPadding]: '10px' },
|
43
|
+
lg: { [compVars.verticalPadding]: '20px' },
|
44
|
+
},
|
45
|
+
|
46
|
+
horizontalPadding: {
|
47
|
+
sm: { [compVars.horizontalPadding]: '5px' },
|
48
|
+
md: { [compVars.horizontalPadding]: '10px' },
|
49
|
+
lg: { [compVars.horizontalPadding]: '20px' },
|
50
|
+
},
|
51
|
+
|
52
|
+
direction: {
|
53
|
+
row: {
|
54
|
+
[compVars.flexDirection]: 'row',
|
55
|
+
[compVars.alignItems]: helperRefs.verticalAlignment,
|
56
|
+
[compVars.justifyContent]: helperRefs.horizontalAlignment,
|
57
|
+
[compVars.flexWrap]: 'wrap',
|
58
|
+
horizontalAlignment: {
|
59
|
+
spaceBetween: {
|
60
|
+
[helperVars.horizontalAlignment]: 'space-between',
|
61
|
+
},
|
62
|
+
},
|
63
|
+
},
|
64
|
+
column: {
|
65
|
+
[compVars.flexDirection]: 'column',
|
66
|
+
[compVars.alignItems]: helperRefs.horizontalAlignment,
|
67
|
+
[compVars.justifyContent]: helperRefs.verticalAlignment,
|
68
|
+
verticalAlignment: {
|
69
|
+
spaceBetween: {
|
70
|
+
[helperVars.verticalAlignment]: 'space-between',
|
71
|
+
},
|
72
|
+
},
|
73
|
+
},
|
74
|
+
},
|
75
|
+
|
76
|
+
spaceBetween: {
|
77
|
+
sm: { [compVars.gap]: '10px' },
|
78
|
+
md: { [compVars.gap]: '20px' },
|
79
|
+
lg: { [compVars.gap]: '30px' },
|
80
|
+
},
|
81
|
+
|
82
|
+
shadow: {
|
83
|
+
sm: {
|
84
|
+
[compVars.boxShadow]: `${globalRefs.shadow.wide.sm} ${shadowColor}, ${globalRefs.shadow.narrow.sm} ${shadowColor}`,
|
85
|
+
},
|
86
|
+
md: {
|
87
|
+
[compVars.boxShadow]: `${globalRefs.shadow.wide.md} ${shadowColor}, ${globalRefs.shadow.narrow.md} ${shadowColor}`,
|
88
|
+
},
|
89
|
+
lg: {
|
90
|
+
[compVars.boxShadow]: `${globalRefs.shadow.wide.lg} ${shadowColor}, ${globalRefs.shadow.narrow.lg} ${shadowColor}`,
|
91
|
+
},
|
92
|
+
xl: {
|
93
|
+
[compVars.boxShadow]: `${globalRefs.shadow.wide.xl} ${shadowColor}, ${globalRefs.shadow.narrow.xl} ${shadowColor}`,
|
94
|
+
},
|
95
|
+
'2xl': {
|
96
|
+
[helperVars.shadowColor]: '#00000050', // mimic daisyUI shadow settings
|
97
|
+
[compVars.boxShadow]: `${globalRefs.shadow.wide['2xl']} ${shadowColor}`,
|
98
|
+
},
|
99
|
+
},
|
100
|
+
|
101
|
+
borderRadius: {
|
102
|
+
sm: { [compVars.borderRadius]: globalRefs.radius.sm },
|
103
|
+
md: { [compVars.borderRadius]: globalRefs.radius.md },
|
104
|
+
lg: { [compVars.borderRadius]: globalRefs.radius.lg },
|
105
|
+
xl: { [compVars.borderRadius]: globalRefs.radius.xl },
|
106
|
+
'2xl': { [compVars.borderRadius]: globalRefs.radius['2xl'] },
|
107
|
+
'3xl': { [compVars.borderRadius]: globalRefs.radius['3xl'] },
|
108
|
+
},
|
99
109
|
};
|
100
110
|
|
101
111
|
export default container;
|
102
112
|
|
103
113
|
export const vars = {
|
104
|
-
|
105
|
-
|
114
|
+
...compVars,
|
115
|
+
...helperVars,
|
106
116
|
};
|
@@ -5,44 +5,43 @@ import { createHelperVars, getThemeRefs } from '../../helpers/themeHelpers';
|
|
5
5
|
const globalRefs = getThemeRefs(globals);
|
6
6
|
const compVars = DividerClass.cssVarList;
|
7
7
|
|
8
|
-
const [
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
}, componentName);
|
8
|
+
const [helperTheme, helperRefs, helperVars] = createHelperVars(
|
9
|
+
{
|
10
|
+
thickness: '2px',
|
11
|
+
spacing: '10px',
|
12
|
+
},
|
13
|
+
componentName
|
14
|
+
);
|
16
15
|
|
17
16
|
const divider = {
|
18
|
-
|
17
|
+
...helperTheme,
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
19
|
+
[compVars.alignItems]: 'center',
|
20
|
+
[compVars.flexDirection]: 'row',
|
21
|
+
[compVars.alignSelf]: 'stretch',
|
22
|
+
[compVars.hostWidth]: '100%',
|
23
|
+
[compVars.stripeColor]: globalRefs.colors.surface.main,
|
24
|
+
[compVars.stripeColorOpacity]: '0.5',
|
25
|
+
[compVars.stripeHorizontalThickness]: helperRefs.thickness,
|
26
|
+
[compVars.labelTextWidth]: 'fit-content',
|
27
|
+
[compVars.labelTextMaxWidth]: 'calc(100% - 100px)',
|
28
|
+
[compVars.labelTextHorizontalSpacing]: helperRefs.spacing,
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
30
|
+
_vertical: {
|
31
|
+
[compVars.minHeight]: '200px',
|
32
|
+
[compVars.flexDirection]: 'column',
|
33
|
+
[compVars.hostWidth]: 'fit-content',
|
34
|
+
[compVars.hostPadding]: `0 calc(${helperRefs.thickness} * 3)`,
|
35
|
+
[compVars.stripeVerticalThickness]: helperRefs.thickness,
|
36
|
+
[compVars.labelTextWidth]: 'fit-content',
|
37
|
+
[compVars.labelTextMaxWidth]: '100%',
|
38
|
+
[compVars.labelTextVerticalSpacing]: helperRefs.spacing,
|
39
|
+
},
|
41
40
|
};
|
42
41
|
|
43
42
|
export default divider;
|
44
43
|
|
45
44
|
export const vars = {
|
46
|
-
|
47
|
-
|
45
|
+
...compVars,
|
46
|
+
...helperVars,
|
48
47
|
};
|
@@ -4,25 +4,26 @@ import { refs } from './inputWrapper';
|
|
4
4
|
const vars = EmailFieldClass.cssVarList;
|
5
5
|
|
6
6
|
const emailField = {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
7
|
+
[vars.hostWidth]: refs.width,
|
8
|
+
[vars.hostMinWidth]: refs.minWidth,
|
9
|
+
[vars.fontSize]: refs.fontSize,
|
10
|
+
[vars.fontFamily]: refs.fontFamily,
|
11
|
+
[vars.labelTextColor]: refs.labelTextColor,
|
12
|
+
[vars.errorMessageTextColor]: refs.errorMessageTextColor,
|
13
|
+
[vars.inputValueTextColor]: refs.valueTextColor,
|
14
|
+
[vars.labelRequiredIndicator]: refs.requiredIndicator,
|
15
|
+
[vars.inputPlaceholderColor]: refs.placeholderTextColor,
|
16
|
+
[vars.inputBorderWidth]: refs.borderWidth,
|
17
|
+
[vars.inputBorderStyle]: refs.borderStyle,
|
18
|
+
[vars.inputBorderColor]: refs.borderColor,
|
19
|
+
[vars.inputBorderRadius]: refs.borderRadius,
|
20
|
+
[vars.inputOutlineWidth]: refs.outlineWidth,
|
21
|
+
[vars.inputOutlineStyle]: refs.outlineStyle,
|
22
|
+
[vars.inputOutlineColor]: refs.outlineColor,
|
23
|
+
[vars.inputOutlineOffset]: refs.outlineOffset,
|
24
|
+
[vars.inputBackgroundColor]: refs.backgroundColor,
|
25
|
+
[vars.inputHorizontalPadding]: refs.horizontalPadding,
|
26
|
+
[vars.inputHeight]: refs.inputHeight,
|
26
27
|
};
|
27
28
|
|
28
29
|
export default emailField;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { ImageClass } from
|
1
|
+
import { ImageClass } from '../../components/descope-image/ImageClass';
|
2
2
|
|
3
|
-
const vars = ImageClass.cssVarList
|
3
|
+
const vars = ImageClass.cssVarList;
|
4
4
|
|
5
5
|
const image = {};
|
6
6
|
|
7
7
|
export default image;
|
8
|
-
export { vars }
|
8
|
+
export { vars };
|
@@ -19,34 +19,42 @@ import * as image from './image';
|
|
19
19
|
import * as phoneField from './phoneField';
|
20
20
|
import * as newPassword from './newPassword';
|
21
21
|
import * as inputWrapper from './inputWrapper';
|
22
|
+
import * as uploadFile from './uploadFile';
|
22
23
|
|
23
24
|
const components = {
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
25
|
+
button,
|
26
|
+
textField,
|
27
|
+
password,
|
28
|
+
numberField,
|
29
|
+
emailField,
|
30
|
+
textArea,
|
31
|
+
checkbox,
|
32
|
+
switchToggle,
|
33
|
+
container,
|
34
|
+
logo,
|
35
|
+
totpImage,
|
36
|
+
text,
|
37
|
+
link,
|
38
|
+
divider,
|
39
|
+
passcode,
|
40
|
+
loaderRadial,
|
41
|
+
loaderLinear,
|
42
|
+
comboBox,
|
43
|
+
image,
|
44
|
+
phoneField,
|
45
|
+
newPassword,
|
46
|
+
inputWrapper,
|
47
|
+
uploadFile,
|
46
48
|
};
|
47
49
|
|
48
|
-
const theme = Object.keys(components).reduce(
|
49
|
-
|
50
|
+
const theme = Object.keys(components).reduce(
|
51
|
+
(acc, comp) => ({ ...acc, [comp]: components[comp].default }),
|
52
|
+
{}
|
53
|
+
);
|
54
|
+
const vars = Object.keys(components).reduce(
|
55
|
+
(acc, comp) => ({ ...acc, [comp]: components[comp].vars }),
|
56
|
+
{}
|
57
|
+
);
|
50
58
|
|
51
59
|
export default theme;
|
52
|
-
export { vars }
|
60
|
+
export { vars };
|
@@ -1,16 +1,17 @@
|
|
1
1
|
import globals from '../globals';
|
2
|
-
import { getThemeRefs } from '../../helpers/themeHelpers';
|
3
|
-
import { createHelperVars } from '../../helpers/themeHelpers';
|
2
|
+
import { getThemeRefs, createHelperVars } from '../../helpers/themeHelpers';
|
4
3
|
import { getComponentName } from '../../helpers/componentHelpers';
|
5
4
|
|
6
5
|
const componentName = getComponentName('input-wrapper');
|
7
6
|
const globalRefs = getThemeRefs(globals);
|
8
7
|
|
9
|
-
const [theme, refs, vars] = createHelperVars(
|
8
|
+
const [theme, refs, vars] = createHelperVars(
|
9
|
+
{
|
10
10
|
labelTextColor: globalRefs.colors.surface.contrast,
|
11
11
|
valueTextColor: globalRefs.colors.surface.contrast,
|
12
12
|
placeholderTextColor: globalRefs.colors.surface.main,
|
13
13
|
requiredIndicator: "'*'",
|
14
|
+
errorMessageTextColor: globalRefs.colors.error.main,
|
14
15
|
|
15
16
|
borderWidth: globalRefs.border.xs,
|
16
17
|
borderRadius: globalRefs.radius.xs,
|
@@ -32,40 +33,42 @@ const [theme, refs, vars] = createHelperVars({
|
|
32
33
|
fontFamily: globalRefs.fonts.font1.family,
|
33
34
|
|
34
35
|
size: {
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
xs: { fontSize: '12px' },
|
37
|
+
sm: { fontSize: '14px' },
|
38
|
+
md: { fontSize: '16px' },
|
39
|
+
lg: { fontSize: '18px' },
|
39
40
|
},
|
40
41
|
|
41
42
|
_fullWidth: {
|
42
|
-
|
43
|
+
width: '100%',
|
43
44
|
},
|
44
45
|
|
45
46
|
_focused: {
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
outlineColor: globalRefs.colors.surface.main,
|
48
|
+
_invalid: {
|
49
|
+
outlineColor: globalRefs.colors.error.main,
|
50
|
+
},
|
50
51
|
},
|
51
52
|
|
52
53
|
_bordered: {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
54
|
+
outlineWidth: globalRefs.border.xs,
|
55
|
+
borderColor: globalRefs.colors.surface.main,
|
56
|
+
borderStyle: 'solid',
|
57
|
+
_invalid: {
|
58
|
+
borderColor: globalRefs.colors.error.main,
|
59
|
+
},
|
59
60
|
},
|
60
61
|
|
61
62
|
_disabled: {
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
}
|
68
|
-
},
|
63
|
+
labelTextColor: globalRefs.colors.surface.main,
|
64
|
+
borderColor: globalRefs.colors.surface.main,
|
65
|
+
valueTextColor: globalRefs.colors.surface.dark,
|
66
|
+
placeholderTextColor: globalRefs.colors.surface.dark,
|
67
|
+
backgroundColor: globalRefs.colors.surface.main,
|
68
|
+
},
|
69
|
+
},
|
70
|
+
componentName
|
71
|
+
);
|
69
72
|
|
70
73
|
export { refs, vars };
|
71
74
|
export default theme;
|