@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
@@ -6,84 +6,84 @@ const globalRefs = getThemeRefs(globals);
|
|
6
6
|
const vars = TextClass.cssVarList;
|
7
7
|
|
8
8
|
const text = {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
9
|
+
[vars.textLineHeight]: '1em',
|
10
|
+
[vars.textAlign]: 'left',
|
11
|
+
[vars.textColor]: globalRefs.colors.surface.dark,
|
12
|
+
variant: {
|
13
|
+
h1: {
|
14
|
+
[vars.fontSize]: globalRefs.typography.h1.size,
|
15
|
+
[vars.fontWeight]: globalRefs.typography.h1.weight,
|
16
|
+
[vars.fontFamily]: globalRefs.typography.h1.font,
|
17
|
+
},
|
18
|
+
h2: {
|
19
|
+
[vars.fontSize]: globalRefs.typography.h2.size,
|
20
|
+
[vars.fontWeight]: globalRefs.typography.h2.weight,
|
21
|
+
[vars.fontFamily]: globalRefs.typography.h2.font,
|
22
|
+
},
|
23
|
+
h3: {
|
24
|
+
[vars.fontSize]: globalRefs.typography.h3.size,
|
25
|
+
[vars.fontWeight]: globalRefs.typography.h3.weight,
|
26
|
+
[vars.fontFamily]: globalRefs.typography.h3.font,
|
27
|
+
},
|
28
|
+
subtitle1: {
|
29
|
+
[vars.fontSize]: globalRefs.typography.subtitle1.size,
|
30
|
+
[vars.fontWeight]: globalRefs.typography.subtitle1.weight,
|
31
|
+
[vars.fontFamily]: globalRefs.typography.subtitle1.font,
|
32
|
+
},
|
33
|
+
subtitle2: {
|
34
|
+
[vars.fontSize]: globalRefs.typography.subtitle2.size,
|
35
|
+
[vars.fontWeight]: globalRefs.typography.subtitle2.weight,
|
36
|
+
[vars.fontFamily]: globalRefs.typography.subtitle2.font,
|
37
|
+
},
|
38
|
+
body1: {
|
39
|
+
[vars.fontSize]: globalRefs.typography.body1.size,
|
40
|
+
[vars.fontWeight]: globalRefs.typography.body1.weight,
|
41
|
+
[vars.fontFamily]: globalRefs.typography.body1.font,
|
42
|
+
},
|
43
|
+
body2: {
|
44
|
+
[vars.fontSize]: globalRefs.typography.body2.size,
|
45
|
+
[vars.fontWeight]: globalRefs.typography.body2.weight,
|
46
|
+
[vars.fontFamily]: globalRefs.typography.body2.font,
|
47
|
+
},
|
48
|
+
},
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
50
|
+
mode: {
|
51
|
+
primary: {
|
52
|
+
[vars.textColor]: globalRefs.colors.primary.main,
|
53
|
+
},
|
54
|
+
secondary: {
|
55
|
+
[vars.textColor]: globalRefs.colors.secondary.main,
|
56
|
+
},
|
57
|
+
error: {
|
58
|
+
[vars.textColor]: globalRefs.colors.error.main,
|
59
|
+
},
|
60
|
+
success: {
|
61
|
+
[vars.textColor]: globalRefs.colors.success.main,
|
62
|
+
},
|
63
|
+
},
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
65
|
+
textAlign: {
|
66
|
+
right: { [vars.textAlign]: 'right' },
|
67
|
+
left: { [vars.textAlign]: 'left' },
|
68
|
+
center: { [vars.textAlign]: 'center' },
|
69
|
+
},
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
_fullWidth: {
|
72
|
+
[vars.hostWidth]: '100%',
|
73
|
+
},
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
_italic: {
|
76
|
+
[vars.fontStyle]: 'italic',
|
77
|
+
},
|
78
78
|
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
_uppercase: {
|
80
|
+
[vars.textTransform]: 'uppercase',
|
81
|
+
},
|
82
82
|
|
83
|
-
|
84
|
-
|
85
|
-
|
83
|
+
_lowercase: {
|
84
|
+
[vars.textTransform]: 'lowercase',
|
85
|
+
},
|
86
86
|
};
|
87
87
|
|
88
88
|
export default text;
|
89
|
-
export { vars }
|
89
|
+
export { vars };
|
@@ -7,33 +7,35 @@ const globalRefs = getThemeRefs(globals);
|
|
7
7
|
const vars = TextAreaClass.cssVarList;
|
8
8
|
|
9
9
|
const textArea = {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
10
|
+
[vars.hostWidth]: refs.width,
|
11
|
+
[vars.hostMinWidth]: refs.minWidth,
|
12
|
+
[vars.fontSize]: globalRefs.typography.body2.size,
|
13
|
+
[vars.fontFamily]: refs.fontFamily,
|
14
|
+
[vars.labelTextColor]: refs.labelTextColor,
|
15
|
+
[vars.labelRequiredIndicator]: refs.requiredIndicator,
|
16
|
+
[vars.errorMessageTextColor]: refs.errorMessageTextColor,
|
17
|
+
[vars.inputBackgroundColor]: refs.backgroundColor,
|
18
|
+
[vars.inputValueTextColor]: refs.valueTextColor,
|
19
|
+
[vars.inputPlaceholderTextColor]: refs.placeholderTextColor,
|
20
|
+
[vars.inputBorderRadius]: refs.borderRadius,
|
21
|
+
[vars.inputBorderWidth]: refs.borderWidth,
|
22
|
+
[vars.inputBorderStyle]: refs.borderStyle,
|
23
|
+
[vars.inputBorderColor]: refs.borderColor,
|
24
|
+
[vars.inputOutlineWidth]: refs.outlineWidth,
|
25
|
+
[vars.inputOutlineStyle]: refs.outlineStyle,
|
26
|
+
[vars.inputOutlineColor]: refs.outlineColor,
|
27
|
+
[vars.inputOutlineOffset]: refs.outlineOffset,
|
28
|
+
[vars.inputResizeType]: 'vertical',
|
29
|
+
[vars.inputMinHeight]: '5em',
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
31
|
+
_disabled: {
|
32
|
+
[vars.inputBackgroundColor]: globalRefs.colors.surface.light,
|
33
|
+
},
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
-
|
35
|
+
_readonly: {
|
36
|
+
[vars.inputResizeType]: 'none',
|
37
|
+
},
|
36
38
|
};
|
37
39
|
|
38
40
|
export default textArea;
|
39
|
-
export { vars }
|
41
|
+
export { vars };
|
@@ -3,27 +3,28 @@ import { refs } from './inputWrapper';
|
|
3
3
|
|
4
4
|
const vars = TextFieldClass.cssVarList;
|
5
5
|
|
6
|
-
export const textField =
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
6
|
+
export const textField = {
|
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.labelRequiredIndicator]: refs.requiredIndicator,
|
13
|
+
[vars.errorMessageTextColor]: refs.errorMessageTextColor,
|
14
|
+
[vars.inputValueTextColor]: refs.valueTextColor,
|
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.inputHeight]: refs.inputHeight,
|
26
|
+
[vars.inputHorizontalPadding]: refs.horizontalPadding,
|
27
|
+
};
|
27
28
|
|
28
29
|
export default textField;
|
29
|
-
export { vars }
|
30
|
+
export { vars };
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { TotpImageClass } from
|
1
|
+
import { TotpImageClass } from '../../components/descope-totp-image/TotpImageClass';
|
2
2
|
|
3
|
-
const vars = TotpImageClass.cssVarList
|
3
|
+
const vars = TotpImageClass.cssVarList;
|
4
4
|
|
5
5
|
const logo = {
|
6
|
-
|
6
|
+
[vars.fallbackUrl]: 'url(https://imgs.descope.com/components/totp-placeholder.svg)',
|
7
7
|
};
|
8
8
|
|
9
9
|
export default logo;
|
10
|
-
export { vars }
|
10
|
+
export { vars };
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { UploadFileClass } from '../../components/descope-upload-file/UploadFileClass';
|
2
|
+
import { refs } from './inputWrapper';
|
3
|
+
|
4
|
+
const vars = UploadFileClass.cssVarList;
|
5
|
+
|
6
|
+
const uploadFile = {
|
7
|
+
[vars.labelTextColor]: refs.labelTextColor,
|
8
|
+
[vars.requiredIndicator]: refs.requiredIndicator,
|
9
|
+
[vars.fontFamily]: refs.fontFamily,
|
10
|
+
|
11
|
+
[vars.icon]: 'url(https://imgs.descope.com/components/upload-file-outlined.svg)',
|
12
|
+
[vars.iconSize]: '2em',
|
13
|
+
|
14
|
+
[vars.hostPadding]: '0.75em',
|
15
|
+
[vars.gap]: '0.5em',
|
16
|
+
|
17
|
+
[vars.fontSize]: '16px',
|
18
|
+
[vars.titleFontWeight]: '500',
|
19
|
+
[vars.fileNameFontWeight]: '300',
|
20
|
+
[vars.lineHeight]: '1em',
|
21
|
+
|
22
|
+
[vars.borderWidth]: refs.borderWidth,
|
23
|
+
[vars.borderColor]: refs.borderColor,
|
24
|
+
[vars.borderRadius]: refs.borderRadius,
|
25
|
+
[vars.borderStyle]: 'dashed',
|
26
|
+
|
27
|
+
size: {
|
28
|
+
xs: {
|
29
|
+
[vars.hostHeight]: '196px',
|
30
|
+
[vars.hostWidth]: '200px',
|
31
|
+
[vars.titleFontSize]: '0.875em',
|
32
|
+
[vars.descriptionFontSize]: '0.875em',
|
33
|
+
[vars.lineHeight]: '1.25em',
|
34
|
+
},
|
35
|
+
sm: {
|
36
|
+
[vars.hostHeight]: '216px',
|
37
|
+
[vars.hostWidth]: '230px',
|
38
|
+
[vars.titleFontSize]: '1em',
|
39
|
+
[vars.descriptionFontSize]: '0.875em',
|
40
|
+
[vars.lineHeight]: '1.25em',
|
41
|
+
},
|
42
|
+
md: {
|
43
|
+
[vars.hostHeight]: '256px',
|
44
|
+
[vars.hostWidth]: '312px',
|
45
|
+
[vars.titleFontSize]: '1.125em',
|
46
|
+
[vars.descriptionFontSize]: '1em',
|
47
|
+
[vars.lineHeight]: '1.5em',
|
48
|
+
},
|
49
|
+
lg: {
|
50
|
+
[vars.hostHeight]: '280px',
|
51
|
+
[vars.hostWidth]: '336px',
|
52
|
+
[vars.titleFontSize]: '1.125em',
|
53
|
+
[vars.descriptionFontSize]: '1.125em',
|
54
|
+
[vars.lineHeight]: '1.75em',
|
55
|
+
},
|
56
|
+
},
|
57
|
+
};
|
58
|
+
|
59
|
+
export default uploadFile;
|
60
|
+
export { vars };
|
package/src/theme/globals.js
CHANGED
@@ -1,153 +1,152 @@
|
|
1
1
|
import { getThemeRefs, getThemeVars } from '../helpers/themeHelpers';
|
2
2
|
import { genColors } from '../helpers/themeHelpers/colorsHelpers';
|
3
3
|
|
4
|
-
|
5
4
|
export const colors = genColors({
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
5
|
+
surface: {
|
6
|
+
main: 'lightgray',
|
7
|
+
light: '#fff',
|
8
|
+
dark: '#000',
|
9
|
+
},
|
10
|
+
primary: '#006af5',
|
11
|
+
secondary: '#7D14EB',
|
12
|
+
success: 'green',
|
13
|
+
error: '#e21d12',
|
15
14
|
});
|
16
15
|
|
17
16
|
const fonts = {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
-
|
17
|
+
font1: {
|
18
|
+
family: [
|
19
|
+
'Roboto',
|
20
|
+
'ui-sans-serif',
|
21
|
+
'system-ui',
|
22
|
+
'-apple-system',
|
23
|
+
'BlinkMacSystemFont',
|
24
|
+
'Segoe UI',
|
25
|
+
'Helvetica Neue',
|
26
|
+
'Arial',
|
27
|
+
'Noto Sans',
|
28
|
+
'sans-serif',
|
29
|
+
'Apple Color Emoji',
|
30
|
+
'Segoe UI Emoji',
|
31
|
+
'Segoe UI Symbol',
|
32
|
+
'Noto Color Emoji',
|
33
|
+
],
|
34
|
+
label: 'Roboto',
|
35
|
+
url: 'https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900',
|
36
|
+
},
|
37
|
+
font2: {
|
38
|
+
family: [
|
39
|
+
'ui-sans-serif',
|
40
|
+
'system-ui',
|
41
|
+
'-apple-system',
|
42
|
+
'BlinkMacSystemFont',
|
43
|
+
'Segoe UI',
|
44
|
+
'Roboto',
|
45
|
+
'Helvetica Neue',
|
46
|
+
'Arial',
|
47
|
+
'Noto Sans',
|
48
|
+
'sans-serif',
|
49
|
+
'Apple Color Emoji',
|
50
|
+
'Segoe UI Emoji',
|
51
|
+
'Segoe UI Symbol',
|
52
|
+
'Noto Color Emoji',
|
53
|
+
],
|
54
|
+
label: 'Sans Serif',
|
55
|
+
},
|
57
56
|
};
|
58
57
|
|
59
58
|
const fontsRef = getThemeRefs({ fonts }).fonts;
|
60
59
|
|
61
60
|
const typography = {
|
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
|
-
|
61
|
+
h1: {
|
62
|
+
font: fontsRef.font1.family,
|
63
|
+
weight: '900',
|
64
|
+
size: '48px',
|
65
|
+
},
|
66
|
+
h2: {
|
67
|
+
font: fontsRef.font1.family,
|
68
|
+
weight: '800',
|
69
|
+
size: '38px',
|
70
|
+
},
|
71
|
+
h3: {
|
72
|
+
font: fontsRef.font1.family,
|
73
|
+
weight: '600',
|
74
|
+
size: '28px',
|
75
|
+
},
|
76
|
+
subtitle1: {
|
77
|
+
font: fontsRef.font2.family,
|
78
|
+
weight: '500',
|
79
|
+
size: '22px',
|
80
|
+
},
|
81
|
+
subtitle2: {
|
82
|
+
font: fontsRef.font2.family,
|
83
|
+
weight: '400',
|
84
|
+
size: '20px',
|
85
|
+
},
|
86
|
+
body1: {
|
87
|
+
font: fontsRef.font1.family,
|
88
|
+
weight: '400',
|
89
|
+
size: '16px',
|
90
|
+
},
|
91
|
+
body2: {
|
92
|
+
font: fontsRef.font1.family,
|
93
|
+
weight: '400',
|
94
|
+
size: '14px',
|
95
|
+
},
|
97
96
|
};
|
98
97
|
|
99
98
|
const spacing = {
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
99
|
+
xs: '2px',
|
100
|
+
sm: '4px',
|
101
|
+
md: '8px',
|
102
|
+
lg: '16px',
|
103
|
+
xl: '32px',
|
105
104
|
};
|
106
105
|
|
107
106
|
const border = {
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
107
|
+
xs: '1px',
|
108
|
+
sm: '2px',
|
109
|
+
md: '3px',
|
110
|
+
lg: '4px',
|
111
|
+
xl: '5px',
|
113
112
|
};
|
114
113
|
|
115
114
|
const radius = {
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
115
|
+
xs: '5px',
|
116
|
+
sm: '10px',
|
117
|
+
md: '15px',
|
118
|
+
lg: '20px',
|
119
|
+
xl: '25px',
|
120
|
+
'2xl': '30px',
|
121
|
+
'3xl': '35px',
|
123
122
|
};
|
124
123
|
|
125
124
|
const shadow = {
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
125
|
+
wide: {
|
126
|
+
sm: '0 2px 3px -0.5px',
|
127
|
+
md: '0 4px 6px -1px',
|
128
|
+
lg: '0 10px 15px -3px',
|
129
|
+
xl: '0 20px 25px -5px',
|
130
|
+
'2xl': '0 25px 50px -12px',
|
131
|
+
},
|
132
|
+
narrow: {
|
133
|
+
sm: '0 1px 2px -1px',
|
134
|
+
md: '0 2px 4px -2px',
|
135
|
+
lg: '0 4px 6px -4px',
|
136
|
+
xl: '0 8px 10px -6px',
|
137
|
+
'2xl': '0 16px 16px -8px',
|
138
|
+
},
|
140
139
|
};
|
141
140
|
|
142
141
|
const globals = {
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
142
|
+
colors,
|
143
|
+
typography,
|
144
|
+
spacing,
|
145
|
+
border,
|
146
|
+
radius,
|
147
|
+
shadow,
|
148
|
+
fonts,
|
150
149
|
};
|
151
150
|
|
152
|
-
export default globals
|
153
|
-
export const vars = getThemeVars(globals)
|
151
|
+
export default globals;
|
152
|
+
export const vars = getThemeVars(globals);
|
package/src/theme/index.js
CHANGED
@@ -2,4 +2,4 @@ import globals, { vars as globalsVars } from './globals';
|
|
2
2
|
import components, { vars as componentsVars } from './components';
|
3
3
|
|
4
4
|
export const defaultTheme = { globals, components };
|
5
|
-
export const themeVars = { globals: globalsVars, components: componentsVars }
|
5
|
+
export const themeVars = { globals: globalsVars, components: componentsVars };
|