@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.
Files changed (175) hide show
  1. package/package.json +77 -56
  2. package/src/baseClasses/createBaseClass.js +18 -16
  3. package/src/baseClasses/createBaseInputClass.js +14 -8
  4. package/src/baseClasses/createCssVarImageClass.js +27 -23
  5. package/src/components/boolean-fields/booleanFieldMixin.js +18 -29
  6. package/src/components/boolean-fields/commonStyles.js +1 -1
  7. package/src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js +46 -51
  8. package/src/components/boolean-fields/descope-boolean-field-internal/index.js +1 -1
  9. package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +80 -85
  10. package/src/components/boolean-fields/descope-checkbox/index.js +2 -2
  11. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +88 -95
  12. package/src/components/boolean-fields/descope-switch-toggle/index.js +2 -2
  13. package/src/components/descope-button/ButtonClass.js +57 -47
  14. package/src/components/descope-button/clickableMixin.js +10 -0
  15. package/src/components/descope-combo-box/ComboBoxClass.js +156 -160
  16. package/src/components/descope-container/ContainerClass.js +32 -42
  17. package/src/components/descope-date-picker/index.js +9 -14
  18. package/src/components/descope-divider/DividerClass.js +52 -62
  19. package/src/components/descope-email-field/EmailFieldClass.js +25 -20
  20. package/src/components/descope-image/ImageClass.js +21 -24
  21. package/src/components/descope-link/LinkClass.js +31 -35
  22. package/src/components/descope-loader-linear/LoaderLinearClass.js +31 -36
  23. package/src/components/descope-loader-radial/LoaderRadialClass.js +23 -30
  24. package/src/components/descope-logo/LogoClass.js +5 -1
  25. package/src/components/descope-new-password/NewPasswordClass.js +63 -81
  26. package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +157 -162
  27. package/src/components/descope-new-password/descope-new-password-internal/componentName.js +1 -1
  28. package/src/components/descope-new-password/descope-new-password-internal/index.js +3 -3
  29. package/src/components/descope-new-password/index.js +3 -3
  30. package/src/components/descope-number-field/NumberFieldClass.js +25 -20
  31. package/src/components/descope-passcode/PasscodeClass.js +95 -95
  32. package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +151 -157
  33. package/src/components/descope-passcode/descope-passcode-internal/helpers.js +7 -8
  34. package/src/components/descope-passcode/descope-passcode-internal/index.js +2 -2
  35. package/src/components/descope-passcode/index.js +2 -2
  36. package/src/components/descope-password/PasswordClass.js +75 -83
  37. package/src/components/descope-password/passwordDraggableMixin.js +28 -27
  38. package/src/components/descope-phone-field/CountryCodes.js +1210 -1210
  39. package/src/components/descope-phone-field/PhoneFieldClass.js +139 -141
  40. package/src/components/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +157 -173
  41. package/src/components/descope-phone-field/helpers.js +3 -3
  42. package/src/components/descope-text/TextClass.js +25 -29
  43. package/src/components/descope-text-area/TextAreaClass.js +68 -67
  44. package/src/components/descope-text-field/TextFieldClass.js +42 -37
  45. package/src/components/descope-text-field/textFieldMappings.js +40 -55
  46. package/src/components/descope-totp-image/TotpImageClass.js +5 -1
  47. package/src/components/descope-upload-file/UploadFileClass.js +202 -0
  48. package/src/components/descope-upload-file/helpers.js +11 -0
  49. package/src/components/descope-upload-file/index.js +6 -0
  50. package/src/constants.js +3 -3
  51. package/src/helpers/componentHelpers.js +68 -74
  52. package/src/helpers/index.js +17 -16
  53. package/src/helpers/mixinsHelpers.js +21 -10
  54. package/src/helpers/themeHelpers/colorsHelpers.js +18 -18
  55. package/src/helpers/themeHelpers/componentsThemeManager.js +7 -6
  56. package/src/helpers/themeHelpers/index.js +114 -124
  57. package/src/helpers/themeHelpers/resetHelpers.js +16 -16
  58. package/src/index.cjs.js +3 -3
  59. package/src/index.d.ts +22 -21
  60. package/src/index.js +5 -4
  61. package/src/index.umd.js +14 -13
  62. package/src/mixins/changeMixin.js +18 -17
  63. package/src/mixins/componentNameValidationMixin.js +19 -19
  64. package/src/mixins/createProxy.js +33 -33
  65. package/src/mixins/createStyleMixin/helpers.js +54 -64
  66. package/src/mixins/createStyleMixin/index.js +155 -141
  67. package/src/mixins/draggableMixin.js +61 -61
  68. package/src/mixins/hoverableMixin.js +11 -13
  69. package/src/mixins/index.js +6 -6
  70. package/src/mixins/inputEventsDispatchingMixin.js +61 -60
  71. package/src/mixins/inputValidationMixin.js +153 -148
  72. package/src/mixins/lifecycleEventsMixin.js +17 -15
  73. package/src/mixins/normalizeBooleanAttributesMixin.js +31 -23
  74. package/src/mixins/portalMixin.js +58 -52
  75. package/src/mixins/proxyInputMixin.js +138 -132
  76. package/src/theme/components/button.js +86 -81
  77. package/src/theme/components/checkbox.js +26 -28
  78. package/src/theme/components/comboBox.js +32 -31
  79. package/src/theme/components/container.js +99 -89
  80. package/src/theme/components/divider.js +30 -31
  81. package/src/theme/components/emailField.js +20 -19
  82. package/src/theme/components/image.js +3 -3
  83. package/src/theme/components/index.js +33 -25
  84. package/src/theme/components/inputWrapper.js +28 -25
  85. package/src/theme/components/link.js +29 -36
  86. package/src/theme/components/loader/index.js +3 -3
  87. package/src/theme/components/loader/loaderLinear.js +34 -34
  88. package/src/theme/components/loader/loaderRadial.js +40 -34
  89. package/src/theme/components/logo.js +4 -4
  90. package/src/theme/components/newPassword.js +14 -13
  91. package/src/theme/components/numberField.js +20 -19
  92. package/src/theme/components/passcode.js +20 -22
  93. package/src/theme/components/password.js +22 -21
  94. package/src/theme/components/phoneField.js +23 -23
  95. package/src/theme/components/switchToggle.js +47 -46
  96. package/src/theme/components/text.js +72 -72
  97. package/src/theme/components/textArea.js +27 -25
  98. package/src/theme/components/textField.js +23 -22
  99. package/src/theme/components/totpImage.js +4 -4
  100. package/src/theme/components/uploadFile.js +60 -0
  101. package/src/theme/globals.js +123 -124
  102. package/src/theme/index.js +1 -1
  103. package/dist/cjs/index.cjs.js +0 -5924
  104. package/dist/cjs/index.cjs.js.map +0 -1
  105. package/dist/cjs/package.json +0 -1
  106. package/dist/index.d.ts +0 -51
  107. package/dist/index.esm.js +0 -6606
  108. package/dist/index.esm.js.map +0 -1
  109. package/dist/umd/1018.js +0 -577
  110. package/dist/umd/1018.js.LICENSE.txt +0 -23
  111. package/dist/umd/2481.js +0 -1
  112. package/dist/umd/3208.js +0 -2
  113. package/dist/umd/3208.js.LICENSE.txt +0 -5
  114. package/dist/umd/3585.js +0 -1
  115. package/dist/umd/3878.js +0 -1
  116. package/dist/umd/4201.js +0 -1
  117. package/dist/umd/422.js +0 -2
  118. package/dist/umd/422.js.LICENSE.txt +0 -5
  119. package/dist/umd/4447.js +0 -1
  120. package/dist/umd/4513.js +0 -1
  121. package/dist/umd/4803.js +0 -1
  122. package/dist/umd/541.js +0 -744
  123. package/dist/umd/541.js.LICENSE.txt +0 -21
  124. package/dist/umd/5767.js +0 -2
  125. package/dist/umd/5767.js.LICENSE.txt +0 -15
  126. package/dist/umd/5806.js +0 -109
  127. package/dist/umd/5806.js.LICENSE.txt +0 -5
  128. package/dist/umd/7056.js +0 -48
  129. package/dist/umd/7056.js.LICENSE.txt +0 -5
  130. package/dist/umd/7101.js +0 -148
  131. package/dist/umd/7101.js.LICENSE.txt +0 -11
  132. package/dist/umd/729.js +0 -1
  133. package/dist/umd/7824.js +0 -229
  134. package/dist/umd/7824.js.LICENSE.txt +0 -27
  135. package/dist/umd/7840.js +0 -356
  136. package/dist/umd/7840.js.LICENSE.txt +0 -61
  137. package/dist/umd/8725.js +0 -37
  138. package/dist/umd/8725.js.LICENSE.txt +0 -11
  139. package/dist/umd/9211.js +0 -312
  140. package/dist/umd/9211.js.LICENSE.txt +0 -5
  141. package/dist/umd/9241.js +0 -1
  142. package/dist/umd/9314.js +0 -283
  143. package/dist/umd/9314.js.LICENSE.txt +0 -27
  144. package/dist/umd/9437.js +0 -19
  145. package/dist/umd/9437.js.LICENSE.txt +0 -5
  146. package/dist/umd/9515.js +0 -202
  147. package/dist/umd/9515.js.LICENSE.txt +0 -11
  148. package/dist/umd/9789.js +0 -1
  149. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +0 -1
  150. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +0 -1
  151. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +0 -1
  152. package/dist/umd/descope-button-index-js.js +0 -1
  153. package/dist/umd/descope-combo-box-index-js.js +0 -1
  154. package/dist/umd/descope-container-index-js.js +0 -1
  155. package/dist/umd/descope-date-picker-index-js.js +0 -1
  156. package/dist/umd/descope-divider-index-js.js +0 -1
  157. package/dist/umd/descope-email-field-index-js.js +0 -1
  158. package/dist/umd/descope-image-index-js.js +0 -1
  159. package/dist/umd/descope-link-index-js.js +0 -1
  160. package/dist/umd/descope-loader-linear-index-js.js +0 -1
  161. package/dist/umd/descope-loader-radial-index-js.js +0 -1
  162. package/dist/umd/descope-logo-index-js.js +0 -1
  163. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +0 -1
  164. package/dist/umd/descope-new-password-index-js.js +0 -1
  165. package/dist/umd/descope-number-field-index-js.js +0 -1
  166. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +0 -1
  167. package/dist/umd/descope-passcode-index-js.js +0 -1
  168. package/dist/umd/descope-password-index-js.js +0 -1
  169. package/dist/umd/descope-phone-field-descope-phone-field-internal-index-js.js +0 -1
  170. package/dist/umd/descope-phone-field-index-js.js +0 -1
  171. package/dist/umd/descope-text-area-index-js.js +0 -1
  172. package/dist/umd/descope-text-field-index-js.js +0 -1
  173. package/dist/umd/descope-text-index-js.js +0 -1
  174. package/dist/umd/descope-totp-image-index-js.js +0 -1
  175. 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
- [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
- },
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
- 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
- },
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
- textAlign: {
66
- right: { [vars.textAlign]: 'right' },
67
- left: { [vars.textAlign]: 'left' },
68
- center: { [vars.textAlign]: 'center' }
69
- },
65
+ textAlign: {
66
+ right: { [vars.textAlign]: 'right' },
67
+ left: { [vars.textAlign]: 'left' },
68
+ center: { [vars.textAlign]: 'center' },
69
+ },
70
70
 
71
- _fullWidth: {
72
- [vars.hostWidth]: '100%',
73
- },
71
+ _fullWidth: {
72
+ [vars.hostWidth]: '100%',
73
+ },
74
74
 
75
- _italic: {
76
- [vars.fontStyle]: 'italic'
77
- },
75
+ _italic: {
76
+ [vars.fontStyle]: 'italic',
77
+ },
78
78
 
79
- _uppercase: {
80
- [vars.textTransform]: 'uppercase'
81
- },
79
+ _uppercase: {
80
+ [vars.textTransform]: 'uppercase',
81
+ },
82
82
 
83
- _lowercase: {
84
- [vars.textTransform]: 'lowercase'
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
- [vars.hostWidth]: refs.width,
11
- [vars.hostMinWidth]: refs.minWidth,
12
- [vars.fontSize]: '14px',
13
- [vars.fontFamily]: refs.fontFamily,
14
- [vars.labelTextColor]: refs.labelTextColor,
15
- [vars.labelRequiredIndicator]: refs.requiredIndicator,
16
- [vars.inputBackgroundColor]: refs.backgroundColor,
17
- [vars.inputValueTextColor]: refs.valueTextColor,
18
- [vars.inputPlaceholderTextColor]: refs.placeholderTextColor,
19
- [vars.inputBorderRadius]: refs.borderRadius,
20
- [vars.inputBorderWidth]: refs.borderWidth,
21
- [vars.inputBorderStyle]: refs.borderStyle,
22
- [vars.inputBorderColor]: refs.borderColor,
23
- [vars.inputOutlineWidth]: refs.outlineWidth,
24
- [vars.inputOutlineStyle]: refs.outlineStyle,
25
- [vars.inputOutlineColor]: refs.outlineColor,
26
- [vars.inputOutlineOffset]: refs.outlineOffset,
27
- [vars.inputResizeType]: 'vertical',
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
- _disabled: {
30
- [vars.inputBackgroundColor]: globalRefs.colors.surface.light,
31
- },
31
+ _disabled: {
32
+ [vars.inputBackgroundColor]: globalRefs.colors.surface.light,
33
+ },
32
34
 
33
- _readonly: {
34
- [vars.inputResizeType]: 'none',
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
- [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.inputValueTextColor]: refs.valueTextColor,
14
- [vars.inputPlaceholderColor]: refs.placeholderTextColor,
15
- [vars.inputBorderWidth]: refs.borderWidth,
16
- [vars.inputBorderStyle]: refs.borderStyle,
17
- [vars.inputBorderColor]: refs.borderColor,
18
- [vars.inputBorderRadius]: refs.borderRadius,
19
- [vars.inputOutlineWidth]: refs.outlineWidth,
20
- [vars.inputOutlineStyle]: refs.outlineStyle,
21
- [vars.inputOutlineColor]: refs.outlineColor,
22
- [vars.inputOutlineOffset]: refs.outlineOffset,
23
- [vars.inputBackgroundColor]: refs.backgroundColor,
24
- [vars.inputHeight]: refs.inputHeight,
25
- [vars.inputHorizontalPadding]: refs.horizontalPadding
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 "../../components/descope-totp-image/TotpImageClass";
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
- [vars.fallbackUrl]: 'url(https://app.descope.com/images/99ae31fd143ba38e072d.svg)'
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 };
@@ -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
- surface: {
7
- main: 'lightgray',
8
- light: '#fff',
9
- dark: '#000',
10
- },
11
- primary: '#0082B5',
12
- secondary: '#7D14EB',
13
- success: 'green',
14
- error: 'red'
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
- font1: {
19
- family: [
20
- "Roboto",
21
- "ui-sans-serif",
22
- "system-ui",
23
- "-apple-system",
24
- "BlinkMacSystemFont",
25
- "Segoe UI",
26
- "Helvetica Neue",
27
- "Arial",
28
- "Noto Sans",
29
- "sans-serif",
30
- "Apple Color Emoji",
31
- "Segoe UI Emoji",
32
- "Segoe UI Symbol",
33
- "Noto Color Emoji"
34
- ],
35
- label: "Roboto",
36
- url: "https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900"
37
- },
38
- font2: {
39
- family: [
40
- "ui-sans-serif",
41
- "system-ui",
42
- "-apple-system",
43
- "BlinkMacSystemFont",
44
- "Segoe UI",
45
- "Roboto",
46
- "Helvetica Neue",
47
- "Arial",
48
- "Noto Sans",
49
- "sans-serif",
50
- "Apple Color Emoji",
51
- "Segoe UI Emoji",
52
- "Segoe UI Symbol",
53
- "Noto Color Emoji"
54
- ],
55
- label: "Sans Serif"
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
- h1: {
63
- font: fontsRef.font1.family,
64
- weight: '900',
65
- size: '48px'
66
- },
67
- h2: {
68
- font: fontsRef.font1.family,
69
- weight: '800',
70
- size: '38px'
71
- },
72
- h3: {
73
- font: fontsRef.font1.family,
74
- weight: '600',
75
- size: '28px'
76
- },
77
- subtitle1: {
78
- font: fontsRef.font2.family,
79
- weight: '500',
80
- size: '22px'
81
- },
82
- subtitle2: {
83
- font: fontsRef.font2.family,
84
- weight: '400',
85
- size: '20px'
86
- },
87
- body1: {
88
- font: fontsRef.font1.family,
89
- weight: '400',
90
- size: '16px'
91
- },
92
- body2: {
93
- font: fontsRef.font1.family,
94
- weight: '400',
95
- size: '14px'
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
- xs: '2px',
101
- sm: '4px',
102
- md: '8px',
103
- lg: '16px',
104
- xl: '32px'
99
+ xs: '2px',
100
+ sm: '4px',
101
+ md: '8px',
102
+ lg: '16px',
103
+ xl: '32px',
105
104
  };
106
105
 
107
106
  const border = {
108
- xs: '1px',
109
- sm: '2px',
110
- md: '3px',
111
- lg: '4px',
112
- xl: '5px'
107
+ xs: '1px',
108
+ sm: '2px',
109
+ md: '3px',
110
+ lg: '4px',
111
+ xl: '5px',
113
112
  };
114
113
 
115
114
  const radius = {
116
- xs: '5px',
117
- sm: '10px',
118
- md: '15px',
119
- lg: '20px',
120
- xl: '25px',
121
- '2xl': '30px',
122
- '3xl': '35px'
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
- wide: {
127
- sm: '0 2px 3px -0.5px',
128
- md: '0 4px 6px -1px',
129
- lg: '0 10px 15px -3px',
130
- xl: '0 20px 25px -5px',
131
- '2xl': '0 25px 50px -12px'
132
- },
133
- narrow: {
134
- sm: '0 1px 2px -1px',
135
- md: '0 2px 4px -2px',
136
- lg: '0 4px 6px -4px',
137
- xl: '0 8px 10px -6px',
138
- '2xl': '0 16px 16px -8px'
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
- colors,
144
- typography,
145
- spacing,
146
- border,
147
- radius,
148
- shadow,
149
- fonts
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);
@@ -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 };