@descope/web-components-ui 1.0.136 → 1.0.150

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/package.json +76 -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
@@ -1,88 +1,93 @@
1
1
  import { compose } from '../../helpers';
2
2
  import { getComponentName, observeChildren } from '../../helpers/componentHelpers';
3
- import { resetInputCursor, resetInputPlaceholder, resetInputReadonlyStyle, useHostExternalPadding } from '../../helpers/themeHelpers/resetHelpers';
4
3
  import {
5
- createStyleMixin,
6
- draggableMixin,
7
- createProxy,
8
- componentNameValidationMixin,
9
- portalMixin,
10
- proxyInputMixin
4
+ resetInputCursor,
5
+ resetInputPlaceholder,
6
+ resetInputReadonlyStyle,
7
+ useHostExternalPadding,
8
+ } from '../../helpers/themeHelpers/resetHelpers';
9
+ import {
10
+ createStyleMixin,
11
+ draggableMixin,
12
+ createProxy,
13
+ componentNameValidationMixin,
14
+ portalMixin,
15
+ proxyInputMixin,
11
16
  } from '../../mixins';
12
17
 
13
18
  export const componentName = getComponentName('combo-box');
14
19
 
15
- const ComboBoxMixin = (superclass) => class ComboBoxMixinClass extends superclass {
16
- constructor() {
17
- super();
18
- }
19
-
20
- // vaadin api is to set props on their combo box node,
21
- // in order to avoid it, we are passing the children of this component
22
- // to the items & renderer props, so it will be used as the combo box items
23
- #onChildrenChange() {
24
- const baseElement = this.shadowRoot.querySelector(this.baseSelector)
25
- const items = Array.from(this.children)
26
-
27
- // we want the data-name attribute to be accessible as an object attribute
28
- if (items.length) {
29
- items.forEach((node) => {
30
- Object.defineProperty(node, 'data-name', {
31
- value: node.getAttribute('data-name'),
32
- })
33
- Object.defineProperty(node, 'data-id', {
34
- value: node.getAttribute('data-id')
35
- })
36
- });
37
-
38
- baseElement.items = items;
39
-
40
- baseElement.renderer = (root, combo, model) => {
41
- root.innerHTML = model.item.outerHTML;
42
- };
43
- }
44
- }
45
-
46
- // the default vaadin behavior is to attach the overlay to the body when opened
47
- // we do not want that because it's difficult to style the overlay in this way
48
- // so we override it to open inside the shadow DOM
49
- #overrideOverlaySettings() {
50
- const overlay = this.baseElement.shadowRoot.querySelector('vaadin-combo-box-overlay')
51
-
52
- overlay._attachOverlay = function () { this.bringToFront(); }
53
- overlay._detachOverlay = function () { }
54
- overlay._enterModalState = function () { }
55
- }
56
-
57
- init() {
58
- super.init?.()
59
-
60
- this.#overrideOverlaySettings();
61
- observeChildren(this, this.#onChildrenChange.bind(this));
62
- }
63
- }
20
+ const ComboBoxMixin = (superclass) =>
21
+ class ComboBoxMixinClass extends superclass {
22
+ // vaadin api is to set props on their combo box node,
23
+ // in order to avoid it, we are passing the children of this component
24
+ // to the items & renderer props, so it will be used as the combo box items
25
+ #onChildrenChange() {
26
+ const baseElement = this.shadowRoot.querySelector(this.baseSelector);
27
+ const items = Array.from(this.children);
28
+
29
+ // we want the data-name attribute to be accessible as an object attribute
30
+ if (items.length) {
31
+ items.forEach((node) => {
32
+ Object.defineProperty(node, 'data-name', {
33
+ value: node.getAttribute('data-name'),
34
+ });
35
+ Object.defineProperty(node, 'data-id', {
36
+ value: node.getAttribute('data-id'),
37
+ });
38
+ });
39
+
40
+ baseElement.items = items;
41
+
42
+ baseElement.renderer = (root, combo, model) => {
43
+ // eslint-disable-next-line no-param-reassign
44
+ root.innerHTML = model.item.outerHTML;
45
+ };
46
+ }
47
+ }
48
+
49
+ // the default vaadin behavior is to attach the overlay to the body when opened
50
+ // we do not want that because it's difficult to style the overlay in this way
51
+ // so we override it to open inside the shadow DOM
52
+ #overrideOverlaySettings() {
53
+ const overlay = this.baseElement.shadowRoot.querySelector('vaadin-combo-box-overlay');
54
+
55
+ overlay._attachOverlay = () => {
56
+ this.bringToFront();
57
+ };
58
+ overlay._detachOverlay = () => {};
59
+ overlay._enterModalState = () => {};
60
+ }
61
+
62
+ init() {
63
+ super.init?.();
64
+
65
+ this.#overrideOverlaySettings.bind(this);
66
+ observeChildren(this, this.#onChildrenChange.bind(this));
67
+ }
68
+ };
64
69
 
65
70
  const {
66
- host,
67
- inputField,
68
- inputElement,
69
- placeholder,
70
- toggle,
71
- label,
72
- requiredIndicator,
73
- helperText,
74
- errorMessage
71
+ host,
72
+ inputField,
73
+ inputElement,
74
+ placeholder,
75
+ toggle,
76
+ label,
77
+ requiredIndicator,
78
+ helperText,
79
+ errorMessage,
75
80
  } = {
76
- host: { selector: () => ':host' },
77
- inputField: { selector: '::part(input-field)' },
78
- inputElement: { selector: 'input' },
79
- placeholder: { selector: '> input:placeholder-shown' },
80
- toggle: { selector: '::part(toggle-button)' },
81
- label: { selector: '::part(label)' },
82
- requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
83
- helperText: { selector: '::part(helper-text)' },
84
- errorMessage: { selector: '::part(error-message)' }
85
- }
81
+ host: { selector: () => ':host' },
82
+ inputField: { selector: '::part(input-field)' },
83
+ inputElement: { selector: 'input' },
84
+ placeholder: { selector: '> input:placeholder-shown' },
85
+ toggle: { selector: '::part(toggle-button)' },
86
+ label: { selector: '::part(label)' },
87
+ requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
88
+ helperText: { selector: '::part(helper-text)' },
89
+ errorMessage: { selector: '::part(error-message)' },
90
+ };
86
91
 
87
92
  // const { slotted, selected } = {
88
93
  // slotted: { selector: () => '::slotted(*)' },
@@ -90,82 +95,74 @@ const {
90
95
  // }
91
96
 
92
97
  export const ComboBoxClass = compose(
93
- createStyleMixin({
94
- mappings: {
95
- hostWidth: { ...host, property: 'width' },
96
- // we apply font-size also on the host so we can set its width with em
97
- fontSize: [
98
- {},
99
- host,
100
- ],
101
- fontFamily: [
102
- label,
103
- placeholder,
104
- inputField,
105
- helperText,
106
- errorMessage
107
- ],
108
- labelTextColor: [
109
- { ...label, property: 'color' },
110
- { ...requiredIndicator, property: 'color' }
111
- ],
112
- inputHeight: { ...inputField, property: 'height' },
113
- inputBackgroundColor: { ...inputField, property: 'background-color' },
114
- inputBorderColor: { ...inputField, property: 'border-color' },
115
- inputBorderWidth: { ...inputField, property: 'border-width' },
116
- inputBorderStyle: { ...inputField, property: 'border-style' },
117
- inputBorderRadius: { ...inputField, property: 'border-radius' },
118
- labelRequiredIndicator: { ...requiredIndicator, property: 'content' },
119
- inputValueTextColor: { ...inputField, property: 'color' },
120
- inputPlaceholderTextColor: { ...placeholder, property: 'color' },
121
- inputDropdownButtonCursor: { ...toggle, property: 'cursor' },
122
- inputDropdownButtonColor: { ...toggle, property: 'color' },
123
- inputDropdownButtonSize: { ...toggle, property: 'font-size' },
124
- inputDropdownButtonOffset: [
125
- { ...toggle, property: 'margin-right' },
126
- { ...toggle, property: 'margin-left' },
127
- ],
128
- inputOutlineColor: { ...inputField, property: 'outline-color' },
129
- inputOutlineWidth: { ...inputField, property: 'outline-width' },
130
- inputOutlineStyle: { ...inputField, property: 'outline-style' },
131
- inputOutlineOffset: { ...inputField, property: 'outline-offset' },
132
- inputHorizontalPadding: [
133
- { ...inputElement, property: 'padding-left' },
134
- { ...inputElement, property: 'padding-right' }
135
- ],
136
-
137
- // we need to use the variables from the portal mixin
138
- // so we need to use an arrow function on the selector
139
- // for that to work, because ComboBox is not available
140
- // at this time.
141
- overlayBackground: { property: () => ComboBoxClass.cssVarList.overlay.backgroundColor },
142
- overlayBorder: { property: () => ComboBoxClass.cssVarList.overlay.border }
143
- }
144
- }),
145
- draggableMixin,
146
- portalMixin({
147
- name: 'overlay',
148
- selector: '',
149
- mappings: {
150
- backgroundColor: { selector: 'vaadin-combo-box-scroller' },
151
- cursor: { selector: 'vaadin-combo-box-item' }, // TODO: this mapping doesn't work, needs fixing.
152
- minHeight: { selector: 'vaadin-combo-box-overlay' },
153
- margin: { selector: 'vaadin-combo-box-overlay' },
154
- fontFamily: { selector: 'vaadin-combo-box-item' }
155
- },
156
- forward: {
157
- include: false,
158
- attributes: ['size']
159
- },
160
- }),
161
- proxyInputMixin,
162
- componentNameValidationMixin,
163
- ComboBoxMixin
98
+ createStyleMixin({
99
+ mappings: {
100
+ hostWidth: { ...host, property: 'width' },
101
+ // we apply font-size also on the host so we can set its width with em
102
+ fontSize: [{}, host],
103
+ fontFamily: [label, placeholder, inputField, helperText, errorMessage],
104
+ labelTextColor: [
105
+ { ...label, property: 'color' },
106
+ { ...requiredIndicator, property: 'color' },
107
+ ],
108
+ errorMessageTextColor: { ...errorMessage, property: 'color' },
109
+ inputHeight: { ...inputField, property: 'height' },
110
+ inputBackgroundColor: { ...inputField, property: 'background-color' },
111
+ inputBorderColor: { ...inputField, property: 'border-color' },
112
+ inputBorderWidth: { ...inputField, property: 'border-width' },
113
+ inputBorderStyle: { ...inputField, property: 'border-style' },
114
+ inputBorderRadius: { ...inputField, property: 'border-radius' },
115
+ labelRequiredIndicator: { ...requiredIndicator, property: 'content' },
116
+ inputValueTextColor: { ...inputField, property: 'color' },
117
+ inputPlaceholderTextColor: { ...placeholder, property: 'color' },
118
+ inputDropdownButtonCursor: { ...toggle, property: 'cursor' },
119
+ inputDropdownButtonColor: { ...toggle, property: 'color' },
120
+ inputDropdownButtonSize: { ...toggle, property: 'font-size' },
121
+ inputDropdownButtonOffset: [
122
+ { ...toggle, property: 'margin-right' },
123
+ { ...toggle, property: 'margin-left' },
124
+ ],
125
+ inputOutlineColor: { ...inputField, property: 'outline-color' },
126
+ inputOutlineWidth: { ...inputField, property: 'outline-width' },
127
+ inputOutlineStyle: { ...inputField, property: 'outline-style' },
128
+ inputOutlineOffset: { ...inputField, property: 'outline-offset' },
129
+ inputHorizontalPadding: [
130
+ { ...inputElement, property: 'padding-left' },
131
+ { ...inputElement, property: 'padding-right' },
132
+ ],
133
+
134
+ // we need to use the variables from the portal mixin
135
+ // so we need to use an arrow function on the selector
136
+ // for that to work, because ComboBox is not available
137
+ // at this time.
138
+ overlayBackground: { property: () => ComboBoxClass.cssVarList.overlay.backgroundColor },
139
+ overlayBorder: { property: () => ComboBoxClass.cssVarList.overlay.border },
140
+ },
141
+ }),
142
+ draggableMixin,
143
+ portalMixin({
144
+ name: 'overlay',
145
+ selector: '',
146
+ mappings: {
147
+ backgroundColor: { selector: 'vaadin-combo-box-scroller' },
148
+ cursor: { selector: 'vaadin-combo-box-item' }, // TODO: this mapping doesn't work, needs fixing.
149
+ minHeight: { selector: 'vaadin-combo-box-overlay' },
150
+ margin: { selector: 'vaadin-combo-box-overlay' },
151
+ fontFamily: { selector: 'vaadin-combo-box-item' },
152
+ },
153
+ forward: {
154
+ include: false,
155
+ attributes: ['size'],
156
+ },
157
+ }),
158
+ proxyInputMixin,
159
+ componentNameValidationMixin,
160
+ ComboBoxMixin
164
161
  )(
165
- createProxy({
166
- slots: ['prefix'],
167
- wrappedEleName: 'vaadin-combo-box',
168
- style: () => `
162
+ createProxy({
163
+ slots: ['prefix'],
164
+ wrappedEleName: 'vaadin-combo-box',
165
+ style: () => `
169
166
  :host {
170
167
  display: inline-flex;
171
168
  box-sizing: border-box;
@@ -175,7 +172,7 @@ export const ComboBoxClass = compose(
175
172
  ${resetInputReadonlyStyle('vaadin-combo-box')}
176
173
  ${resetInputPlaceholder('vaadin-combo-box')}
177
174
  ${resetInputCursor('vaadin-combo-box')}
178
-
175
+
179
176
  vaadin-combo-box {
180
177
  padding: 0;
181
178
  width: 100%;
@@ -194,13 +191,12 @@ export const ComboBoxClass = compose(
194
191
  box-shadow: none;
195
192
  }
196
193
  `,
197
- // Note: we exclude `size` to avoid overriding Vaadin's ComboBox property
198
- // with the same name. Including it will cause Vaadin to calculate NaN size,
199
- // and reset items to an empty array, and opening the list box with no items
200
- // to display.
201
- excludeAttrsSync: ['tabindex', 'size'],
202
- componentName,
203
- includeForwardProps: ['items', 'renderer', 'selectedItem']
204
- })
194
+ // Note: we exclude `size` to avoid overriding Vaadin's ComboBox property
195
+ // with the same name. Including it will cause Vaadin to calculate NaN size,
196
+ // and reset items to an empty array, and opening the list box with no items
197
+ // to display.
198
+ excludeAttrsSync: ['tabindex', 'size'],
199
+ componentName,
200
+ includeForwardProps: ['items', 'renderer', 'selectedItem'],
201
+ })
205
202
  );
206
-
@@ -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('container');
11
7
 
12
8
  class RawContainer extends createBaseClass({ componentName, baseSelector: ':host > slot' }) {
13
- constructor() {
14
- super();
9
+ constructor() {
10
+ super();
15
11
 
16
- this.attachShadow({ mode: 'open' }).innerHTML = `
12
+ this.attachShadow({ mode: 'open' }).innerHTML = `
17
13
  <style>
18
14
  :host > slot {
19
15
  box-sizing: border-box;
@@ -28,41 +24,35 @@ class RawContainer extends createBaseClass({ componentName, baseSelector: ':host
28
24
  </style>
29
25
  <slot></slot>
30
26
  `;
31
- }
27
+ }
32
28
  }
33
29
 
34
30
  export const ContainerClass = compose(
35
- createStyleMixin({
36
- mappings: {
37
- hostHeight: { selector: () => ':host', property: 'height' },
38
- hostWidth: { selector: () => ':host', property: 'width' },
39
-
40
- verticalPadding: [
41
- { property: 'padding-top' },
42
- { property: 'padding-bottom' }
43
- ],
44
- horizontalPadding: [
45
- { property: 'padding-left' },
46
- { property: 'padding-right' }
47
- ],
48
-
49
- flexDirection: {},
50
- justifyContent: {},
51
- alignItems: {},
52
- gap: {},
53
- flexWrap: {},
54
-
55
- backgroundColor: {},
56
- color: {},
57
- borderRadius: {},
58
-
59
- borderColor: {},
60
- borderStyle: {},
61
- borderWidth: {},
62
-
63
- boxShadow: {}
64
- }
65
- }),
66
- draggableMixin,
67
- componentNameValidationMixin
31
+ createStyleMixin({
32
+ mappings: {
33
+ hostHeight: { selector: () => ':host', property: 'height' },
34
+ hostWidth: { selector: () => ':host', property: 'width' },
35
+
36
+ verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],
37
+ horizontalPadding: [{ property: 'padding-left' }, { property: 'padding-right' }],
38
+
39
+ flexDirection: {},
40
+ justifyContent: {},
41
+ alignItems: {},
42
+ gap: {},
43
+ flexWrap: {},
44
+
45
+ backgroundColor: {},
46
+ color: {},
47
+ borderRadius: {},
48
+
49
+ borderColor: {},
50
+ borderStyle: {},
51
+ borderWidth: {},
52
+
53
+ boxShadow: {},
54
+ },
55
+ }),
56
+ draggableMixin,
57
+ componentNameValidationMixin
68
58
  )(RawContainer);
@@ -1,25 +1,20 @@
1
1
  import '@vaadin/date-picker';
2
- import {
3
- draggableMixin,
4
- createProxy,
5
- componentNameValidationMixin
6
- } from '../../mixins';
2
+ import { draggableMixin, createProxy, componentNameValidationMixin } from '../../mixins';
7
3
  import { compose } from '../../helpers';
8
4
  import { getComponentName } from '../../helpers/componentHelpers';
9
5
 
10
6
  const componentName = getComponentName('date-picker');
11
7
 
12
8
  export const DatePickerClass = compose(
13
- draggableMixin,
14
- componentNameValidationMixin
9
+ draggableMixin,
10
+ componentNameValidationMixin
15
11
  )(
16
- createProxy({
17
- componentName,
18
- slots: ['prefix', 'suffix'],
19
- wrappedEleName: 'vaadin-date-picker',
20
- style: ``
21
- })
12
+ createProxy({
13
+ componentName,
14
+ slots: ['prefix', 'suffix'],
15
+ wrappedEleName: 'vaadin-date-picker',
16
+ style: ``,
17
+ })
22
18
  );
23
19
 
24
20
  customElements.define(componentName, DatePickerClass);
25
-
@@ -1,18 +1,14 @@
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 { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';
9
5
 
10
6
  export const componentName = getComponentName('divider');
11
7
  class RawDivider extends createBaseClass({ componentName, baseSelector: ':host > div' }) {
12
- constructor() {
13
- super();
8
+ constructor() {
9
+ super();
14
10
 
15
- this.attachShadow({ mode: 'open' }).innerHTML = `
11
+ this.attachShadow({ mode: 'open' }).innerHTML = `
16
12
  <style>
17
13
  :host {
18
14
  display: inline-block;
@@ -45,67 +41,61 @@ class RawDivider extends createBaseClass({ componentName, baseSelector: ':host >
45
41
  </div>
46
42
  `;
47
43
 
48
- this.textComponent = this.shadowRoot.querySelector('descope-text');
44
+ this.textComponent = this.shadowRoot.querySelector('descope-text');
49
45
 
50
- forwardAttrs(this, this.textComponent, {
51
- includeAttrs: ['mode', 'variant', 'italic']
52
- });
53
- }
46
+ forwardAttrs(this, this.textComponent, {
47
+ includeAttrs: ['mode', 'variant', 'italic'],
48
+ });
49
+ }
54
50
  }
55
51
 
56
- const {
57
- host,
58
- before,
59
- after,
60
- text,
61
- } = {
62
- host: { selector: () => ':host' },
63
- before: { selector: '::before' },
64
- after: { selector: '::after' },
65
- text: { selector: 'descope-text' },
52
+ const { host, before, after, text } = {
53
+ host: { selector: () => ':host' },
54
+ before: { selector: '::before' },
55
+ after: { selector: '::after' },
56
+ text: { selector: 'descope-text' },
66
57
  };
67
58
 
68
59
  export const DividerClass = compose(
69
- createStyleMixin({
70
- mappings: {
71
- hostWidth: { ...host, property: 'width' },
72
- hostPadding: { ...host, property: 'padding' },
60
+ createStyleMixin({
61
+ mappings: {
62
+ hostWidth: { ...host, property: 'width' },
63
+ hostPadding: { ...host, property: 'padding' },
73
64
 
74
- minHeight: {},
75
- alignItems: {},
76
- alignSelf: {},
77
- flexDirection: {},
65
+ minHeight: {},
66
+ alignItems: {},
67
+ alignSelf: {},
68
+ flexDirection: {},
78
69
 
79
- labelTextWidth: { ...text, property: 'width' },
80
- labelTextMaxWidth: { ...text, property: 'max-width' },
81
- labelTextVerticalSpacing: [
82
- { ...text, property: 'padding-top' },
83
- { ...text, property: 'padding-bottom' }
84
- ],
85
- labelTextHorizontalSpacing: [
86
- { ...text, property: 'padding-right' },
87
- { ...text, property: 'padding-left' }
88
- ],
70
+ labelTextWidth: { ...text, property: 'width' },
71
+ labelTextMaxWidth: { ...text, property: 'max-width' },
72
+ labelTextVerticalSpacing: [
73
+ { ...text, property: 'padding-top' },
74
+ { ...text, property: 'padding-bottom' },
75
+ ],
76
+ labelTextHorizontalSpacing: [
77
+ { ...text, property: 'padding-right' },
78
+ { ...text, property: 'padding-left' },
79
+ ],
89
80
 
90
- stripeColor: [
91
- { ...before, property: 'background-color' },
92
- { ...after, property: 'background-color' }
93
- ],
94
- stripeHorizontalThickness: [
95
- { ...before, property: 'height' },
96
- { ...after, property: 'height' }
97
- ],
98
- stripeVerticalThickness: [
99
- { ...before, property: 'width' },
100
- { ...after, property: 'width' }
101
- ],
102
- stripeColorOpacity: [
103
- { ...before, property: 'opacity' },
104
- { ...after, property: 'opacity' }
105
- ],
106
- },
107
- }),
108
- draggableMixin,
109
- componentNameValidationMixin
81
+ stripeColor: [
82
+ { ...before, property: 'background-color' },
83
+ { ...after, property: 'background-color' },
84
+ ],
85
+ stripeHorizontalThickness: [
86
+ { ...before, property: 'height' },
87
+ { ...after, property: 'height' },
88
+ ],
89
+ stripeVerticalThickness: [
90
+ { ...before, property: 'width' },
91
+ { ...after, property: 'width' },
92
+ ],
93
+ stripeColorOpacity: [
94
+ { ...before, property: 'opacity' },
95
+ { ...after, property: 'opacity' },
96
+ ],
97
+ },
98
+ }),
99
+ draggableMixin,
100
+ componentNameValidationMixin
110
101
  )(RawDivider);
111
-