@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
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
-
7
- /**
8
- * @license
9
- * Copyright (c) 2021 - 2023 Vaadin Ltd.
10
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
11
- */
package/dist/umd/9211.js DELETED
@@ -1,312 +0,0 @@
1
- /*! For license information please see 9211.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9211],{7078:(t,e,o)=>{o.d(e,{z:()=>p});var r=o(4241),i=o(6155),a=o(1402),n=o(4463),s=o(5128);const l=o(9897).iv`
3
- :host {
4
- display: inline-block;
5
- position: relative;
6
- outline: none;
7
- white-space: nowrap;
8
- -webkit-user-select: none;
9
- -moz-user-select: none;
10
- user-select: none;
11
- }
12
-
13
- :host([hidden]) {
14
- display: none !important;
15
- }
16
-
17
- /* Aligns the button with form fields when placed on the same line.
18
- Note, to make it work, the form fields should have the same "::before" pseudo-element. */
19
- .vaadin-button-container::before {
20
- content: '\\2003';
21
- display: inline-block;
22
- width: 0;
23
- max-height: 100%;
24
- }
25
-
26
- .vaadin-button-container {
27
- display: inline-flex;
28
- align-items: center;
29
- justify-content: center;
30
- text-align: center;
31
- width: 100%;
32
- height: 100%;
33
- min-height: inherit;
34
- text-shadow: inherit;
35
- }
36
-
37
- [part='prefix'],
38
- [part='suffix'] {
39
- flex: none;
40
- }
41
-
42
- [part='label'] {
43
- white-space: nowrap;
44
- overflow: hidden;
45
- text-overflow: ellipsis;
46
- }
47
- `;var c=o(5767),m=o(2527),h=o(4062);const u=t=>class extends((0,c.D)((0,h.N)((0,m.W)(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}};(0,s.hC)("vaadin-button",l,{moduleId:"vaadin-button-styles"});class p extends(u((0,a.S)((0,s.Tb)((0,i.k)(r.H3))))){static get is(){return"vaadin-button"}static get template(){return r.dy`
48
- <div class="vaadin-button-container">
49
- <span part="prefix" aria-hidden="true">
50
- <slot name="prefix"></slot>
51
- </span>
52
- <span part="label">
53
- <slot></slot>
54
- </span>
55
- <span part="suffix" aria-hidden="true">
56
- <slot name="suffix"></slot>
57
- </span>
58
- </div>
59
- <slot name="tooltip"></slot>
60
- `}ready(){super.ready(),this._tooltipController=new n.f(this),this.addController(this._tooltipController)}}customElements.define(p.is,p)},4750:(t,e,o)=>{o.d(e,{L:()=>i}),o(1195),o(9098),o(9416),o(9849),o(4173);var r=o(5128);const i=r.iv`
61
- :host {
62
- /* Sizing */
63
- --lumo-button-size: var(--lumo-size-m);
64
- min-width: calc(var(--lumo-button-size) * 2);
65
- height: var(--lumo-button-size);
66
- padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2);
67
- margin: var(--lumo-space-xs) 0;
68
- box-sizing: border-box;
69
- /* Style */
70
- font-family: var(--lumo-font-family);
71
- font-size: var(--lumo-font-size-m);
72
- font-weight: 500;
73
- color: var(--_lumo-button-color, var(--lumo-primary-text-color));
74
- background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
75
- border-radius: var(--lumo-border-radius-m);
76
- cursor: var(--lumo-clickable-cursor);
77
- -webkit-tap-highlight-color: transparent;
78
- -webkit-font-smoothing: antialiased;
79
- -moz-osx-font-smoothing: grayscale;
80
- flex-shrink: 0;
81
- }
82
-
83
- /* Set only for the internal parts so we don't affect the host vertical alignment */
84
- [part='label'],
85
- [part='prefix'],
86
- [part='suffix'] {
87
- line-height: var(--lumo-line-height-xs);
88
- }
89
-
90
- [part='label'] {
91
- padding: calc(var(--lumo-button-size) / 6) 0;
92
- }
93
-
94
- :host([theme~='small']) {
95
- font-size: var(--lumo-font-size-s);
96
- --lumo-button-size: var(--lumo-size-s);
97
- }
98
-
99
- :host([theme~='large']) {
100
- font-size: var(--lumo-font-size-l);
101
- --lumo-button-size: var(--lumo-size-l);
102
- }
103
-
104
- /* For interaction states */
105
- :host::before,
106
- :host::after {
107
- content: '';
108
- /* We rely on the host always being relative */
109
- position: absolute;
110
- z-index: 1;
111
- top: 0;
112
- right: 0;
113
- bottom: 0;
114
- left: 0;
115
- background-color: currentColor;
116
- border-radius: inherit;
117
- opacity: 0;
118
- pointer-events: none;
119
- }
120
-
121
- /* Hover */
122
-
123
- @media (any-hover: hover) {
124
- :host(:hover)::before {
125
- opacity: 0.02;
126
- }
127
- }
128
-
129
- /* Active */
130
-
131
- :host::after {
132
- transition: opacity 1.4s, transform 0.1s;
133
- filter: blur(8px);
134
- }
135
-
136
- :host([active])::before {
137
- opacity: 0.05;
138
- transition-duration: 0s;
139
- }
140
-
141
- :host([active])::after {
142
- opacity: 0.1;
143
- transition-duration: 0s, 0s;
144
- transform: scale(0);
145
- }
146
-
147
- /* Keyboard focus */
148
-
149
- :host([focus-ring]) {
150
- box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
151
- }
152
-
153
- :host([theme~='primary'][focus-ring]) {
154
- box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
155
- }
156
-
157
- /* Types (primary, tertiary, tertiary-inline */
158
-
159
- :host([theme~='tertiary']),
160
- :host([theme~='tertiary-inline']) {
161
- background-color: transparent !important;
162
- min-width: 0;
163
- }
164
-
165
- :host([theme~='tertiary']) {
166
- padding: 0 calc(var(--lumo-button-size) / 6);
167
- }
168
-
169
- :host([theme~='tertiary-inline'])::before {
170
- display: none;
171
- }
172
-
173
- :host([theme~='tertiary-inline']) {
174
- margin: 0;
175
- height: auto;
176
- padding: 0;
177
- line-height: inherit;
178
- font-size: inherit;
179
- }
180
-
181
- :host([theme~='tertiary-inline']) [part='label'] {
182
- padding: 0;
183
- overflow: visible;
184
- line-height: inherit;
185
- }
186
-
187
- :host([theme~='primary']) {
188
- background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
189
- color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
190
- font-weight: 600;
191
- min-width: calc(var(--lumo-button-size) * 2.5);
192
- }
193
-
194
- :host([theme~='primary'])::before {
195
- background-color: black;
196
- }
197
-
198
- @media (any-hover: hover) {
199
- :host([theme~='primary']:hover)::before {
200
- opacity: 0.05;
201
- }
202
- }
203
-
204
- :host([theme~='primary'][active])::before {
205
- opacity: 0.1;
206
- }
207
-
208
- :host([theme~='primary'][active])::after {
209
- opacity: 0.2;
210
- }
211
-
212
- /* Colors (success, error, contrast) */
213
-
214
- :host([theme~='success']) {
215
- color: var(--lumo-success-text-color);
216
- }
217
-
218
- :host([theme~='success'][theme~='primary']) {
219
- background-color: var(--lumo-success-color);
220
- color: var(--lumo-success-contrast-color);
221
- }
222
-
223
- :host([theme~='error']) {
224
- color: var(--lumo-error-text-color);
225
- }
226
-
227
- :host([theme~='error'][theme~='primary']) {
228
- background-color: var(--lumo-error-color);
229
- color: var(--lumo-error-contrast-color);
230
- }
231
-
232
- :host([theme~='contrast']) {
233
- color: var(--lumo-contrast);
234
- }
235
-
236
- :host([theme~='contrast'][theme~='primary']) {
237
- background-color: var(--lumo-contrast);
238
- color: var(--lumo-base-color);
239
- }
240
-
241
- /* Disabled state. Keep selectors after other color variants. */
242
-
243
- :host([disabled]) {
244
- pointer-events: none;
245
- color: var(--lumo-disabled-text-color);
246
- }
247
-
248
- :host([theme~='primary'][disabled]) {
249
- background-color: var(--lumo-contrast-30pct);
250
- color: var(--lumo-base-color);
251
- }
252
-
253
- :host([theme~='primary'][disabled]) [part] {
254
- opacity: 0.7;
255
- }
256
-
257
- /* Icons */
258
-
259
- [part] ::slotted(vaadin-icon) {
260
- display: inline-block;
261
- width: var(--lumo-icon-size-m);
262
- height: var(--lumo-icon-size-m);
263
- }
264
-
265
- /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
266
- [part] ::slotted(vaadin-icon[icon^='vaadin:']) {
267
- padding: 0.25em;
268
- box-sizing: border-box !important;
269
- }
270
-
271
- [part='prefix'] {
272
- margin-left: -0.25em;
273
- margin-right: 0.25em;
274
- }
275
-
276
- [part='suffix'] {
277
- margin-left: 0.25em;
278
- margin-right: -0.25em;
279
- }
280
-
281
- /* Icon-only */
282
-
283
- :host([theme~='icon']:not([theme~='tertiary-inline'])) {
284
- min-width: var(--lumo-button-size);
285
- padding-left: calc(var(--lumo-button-size) / 4);
286
- padding-right: calc(var(--lumo-button-size) / 4);
287
- }
288
-
289
- :host([theme~='icon']) [part='prefix'],
290
- :host([theme~='icon']) [part='suffix'] {
291
- margin-left: 0;
292
- margin-right: 0;
293
- }
294
-
295
- /* RTL specific styles */
296
-
297
- :host([dir='rtl']) [part='prefix'] {
298
- margin-left: 0.25em;
299
- margin-right: -0.25em;
300
- }
301
-
302
- :host([dir='rtl']) [part='suffix'] {
303
- margin-left: -0.25em;
304
- margin-right: 0.25em;
305
- }
306
-
307
- :host([dir='rtl'][theme~='icon']) [part='prefix'],
308
- :host([dir='rtl'][theme~='icon']) [part='suffix'] {
309
- margin-left: 0;
310
- margin-right: 0;
311
- }
312
- `;(0,r.hC)("vaadin-button",i,{moduleId:"lumo-button"})}}]);
@@ -1,5 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
package/dist/umd/9241.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9241],{693:(t,e,s)=>{s.d(e,{s:()=>o});var i=s(2061),n=s(357);const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}};var a=s(8084);const o=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(n.A,r,a.Q)(s)}},5279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>n,qM:()=>a,qg:()=>r});const i="descope",n=3,r="host",a="@"},4567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>r,P$:()=>a,Tk:()=>u,iY:()=>h,oP:()=>c,tg:()=>l});var i=s(2061),n=s(5279);const r=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const n=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{for(const n of t)"attributes"!==n.type||s.includes(n.attributeName)||i.length&&!i.includes(n.attributeName)||e([n.attributeName])})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{for(const s of t)"childList"===s.type&&e(s)})).observe(t,{childList:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const n=s[i]||i,r=t.getAttribute(i);null!==r?e.getAttribute(n)!==r&&e.setAttribute(n,r):e.removeAttribute(n)}))},l=(t,e,s)=>{r(t,o(t,e),s),r(e,o(e,t),s)},h=t=>(0,i.E3)(n.gh,t),u=(...t)=>`--${(0,i.E3)(...t)}`,c=(t,e,s={})=>{r(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>n,GL:()=>i,mf:()=>a,qC:()=>r});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>i(t.filter((t=>!!t)).join("-")),r=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#s(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#s()}}},9241:(t,e,s)=>{s.d(e,{li:()=>M,Ae:()=>A.A,DM:()=>p,yk:()=>u,e4:()=>c,mE:()=>L,wX:()=>b,QT:()=>C.Q,Iw:()=>S,dj:()=>f});var i=s(5279),n=s(2061),r=s(4567),a=s(5561);const o=(t,...e)=>`var(${t}${e.length?` , ${o(...e)}`:""})`;class l{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>t+`${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const h=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),u=({mappings:t={},componentNameOverride:e=""})=>s=>{const u=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...h(u,{...t})}}#i;#n;#r;#a;#o;#l;#h;#u;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#a=s,this.#o=r,this.#l=e?.(this)||this.shadowRoot,this.#h=a??this.baseSelector,this.#u=Object.keys(t).map((t=>(0,n.E3)("st",s,t))),this.#c(),this.#d(),this.#m()}get#p(){return a.componentsThemeManager.currentTheme?.[u]||""}#g(){this.#n.innerHTML=this.#p[this.#o]}#d(){this.#n=document.createElement("style"),this.#n.id=`style-mixin-theme__${u}`,this.#l.prepend(this.#n),this.#r=a.componentsThemeManager.onCurrentThemeChange(this.#g.bind(this)),this.#g()}#m(){if(this.#u.length){this.#i=document.createElement("style"),this.#i.id=`style-mixin-overrides__${u}`;const s=(t=u,e=i.k4,Array(e).fill(`.${t}`).join(""));this.#i.innerText=`:host(${s}) {}`,this.#l.append(this.#i)}var t,e}#b(t,e){const s=this.#i?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(u,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#E(t=[]){let e=!1;for(const s of t)this.#u.includes(s)&&(this.#b(s,this.getAttribute(s)),e=!0);e&&(this.#i.innerHTML=this.#i?.sheet?.cssRules[0].cssText)}#c(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${u}`,e.innerHTML=((t,e,s)=>{const i=new l;return Object.keys(s).forEach((a=>{const l=((t,e)=>{const s={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>Object.assign({},s,t))):[Object.assign({},s,e)]:[s]})(a,s[a]),h=(0,r.Tk)(t,a);l.forEach((({selector:t,property:s})=>{i.add(((t="",e="")=>(0,n.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,n.mf)(s)?s():s,o(h))}))})),i.toString()})((0,n.E3)(u,this.#a),this.#h,t),this.#l.prepend(e)}}#v(t){(this.#l.classList||this.#l.host.classList).add(t)}init(){super.init?.(),this.shadowRoot.isConnected&&(this.#v(u),(0,r.FX)(this,this.#E.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#r?.()}}},c=t=>class extends t{#y=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#y=document.createElement("style"),this.#y.innerText="* { cursor: inherit!important }"}#f(t){t?this.shadowRoot.appendChild(this.#y):this.#y.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#f("true"===s)}};var d=s(693);function m(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}const p=({componentName:t,wrappedEleName:e,slots:s=[],style:i,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[]})=>{class h extends((0,d.s)({componentName:t,baseSelector:e})){#A=m.bind(this,"blur");#S=m.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:!0}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(i)?i():i}</style>\n\t\t\t<${e}>\n\t\t\t<slot></slot>\n\t\t\t${s.map((t=>`<slot name="${t}" slot="${t}"></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#A()})),this.baseElement.addEventListener("focus",(t=>{this.#S()})),(0,r.Db)(this.baseElement,this,l),(0,r.tg)(this.baseElement,this,{excludeAttrs:a,includeAttrs:o})}}return h},g=["required","pattern"],b=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...g]}static get formAssociated(){return!0}#M;constructor(){super(),this.#M=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:u}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||o||l||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case u:return this.validationMessage;default:return""}}#C(){const t=this.isReadOnly?{}:this.getValidity();this.#M.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#M.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#M.validity.valid}reportValidity(){return this.#M.reportValidity()}get validity(){return this.#M.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#M.setValidity({customError:!0},t,this.validationTarget):(this.#M.setValidity({}),this.#C())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#M.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),g.includes(t)&&this.#C()}init(){super.init?.(),this.addEventListener("change",this.#C),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#C),setTimeout((()=>this.#C()))}},E=["invalid","required"],v=(t,e,s)=>{Object.defineProperty(t,s,{set:function(t){return e[s]=t},get:function(){return e[s]},configurable:!0})},y=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if(e=e.assignedElements()[0],"slot"!==e.localName)return e},f=(0,n.qC)((t=>class extends(b(t)){static get observedAttributes(){return[...t.observedAttributes||[],...E]}#L;#T=m.bind(this,"change");constructor(){super(),this.#L=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#L&&console.warn(this.localName,"no input was found")}),0)}get name(){return this.getAttribute("name")}get inputElement(){this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#L??=y(t)||y(e),this.#L}set inputElement(t){this.#L=t}getValidity(){return this.inputElement?.validity||{}}handleInternalInputErrorMessage(){this.inputElement.checkValidity()||this.inputElement.setCustomValidity(this.validationMessage)}#w(){this.handleInternalInputErrorMessage(),this.setAttribute("error-message",this.validationMessage)}init(){super.init?.(),this.inputElement.addEventListener("input",(t=>{this.inputElement.checkValidity()||(this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.baseElement.__onInput(t),this.#w())})),this.baseElement.addEventListener("change",(()=>{this.#T()})),this.#L.addEventListener("blur",(()=>{this.checkValidity()||(this.setAttribute("invalid","true"),this.#w())})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#w()})),this.handleInternalInputErrorMessage(),v(this,this.inputElement,"value"),v(this,this.inputElement,"selectionStart"),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})}}),u({componentNameOverride:(0,r.iY)("input-wrapper")}));var A=s(357);const S=({name:t,selector:e,mappings:s={},forward:{attributes:a=[],include:o=!0}={}})=>l=>{const c=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=u({mappings:s})(l);return class extends d{static get cssVarList(){return{...d.cssVarList,[c]:h((0,n.E3)(l.componentName,"_"+c),s)}}#x;constructor(){const t=t=>{const s=t.shadowRoot.querySelector(t.baseSelector),i=e?s.shadowRoot.querySelector(e):s;return i.shadowRoot||i};var s;super({getRootElement:t,componentNameSuffix:"_"+c,themeSection:i.qM+c,baseSelector:":host"}),this.#x=(s=t(this)).host||s}#k(){this.#x.onmouseenter=t=>{t.target.setAttribute("hover","true")},this.#x.onmouseleave=t=>{t.target.removeAttribute("hover")}}init(){super.init?.(),(0,r.oP)(this,this.#x,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#k()}}},M=t=>class extends t{#T=m.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#T(),this.prevValue=this.value)}))}};var C=s(8084);const L=t=>class extends t{init(){this.#N(),super.init?.()}#N(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,m.call(this,"blur"),m.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(m.call(this,"focus"),m.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.warn(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}}}]);