@descope/web-components-ui 1.0.64 → 1.0.66

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 (54) hide show
  1. package/dist/cjs/index.cjs.js +6 -4
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +706 -464
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/233.js +5 -1
  6. package/dist/umd/314.js +283 -0
  7. package/dist/umd/314.js.LICENSE.txt +27 -0
  8. package/dist/umd/541.js +744 -0
  9. package/dist/umd/541.js.LICENSE.txt +21 -0
  10. package/dist/umd/725.js +37 -1
  11. package/dist/umd/786.js +1 -1
  12. package/dist/umd/824.js +229 -0
  13. package/dist/umd/{54.js.LICENSE.txt → 824.js.LICENSE.txt} +0 -6
  14. package/dist/umd/840.js +9 -9
  15. package/dist/umd/860.js +1 -0
  16. package/dist/umd/descope-button-index-js.js +1 -1
  17. package/dist/umd/descope-checkbox-index-js.js +1 -1
  18. package/dist/umd/descope-combo-box-index-js.js +1 -0
  19. package/dist/umd/descope-container-index-js.js +1 -1
  20. package/dist/umd/descope-date-picker-index-js.js +1 -1
  21. package/dist/umd/descope-divider-index-js.js +1 -1
  22. package/dist/umd/descope-email-field-index-js.js +1 -1
  23. package/dist/umd/descope-link-index-js.js +1 -1
  24. package/dist/umd/descope-loader-linear-index-js.js +1 -1
  25. package/dist/umd/descope-loader-radial-index-js.js +1 -1
  26. package/dist/umd/descope-logo-index-js.js +1 -1
  27. package/dist/umd/descope-number-field-index-js.js +1 -1
  28. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
  29. package/dist/umd/descope-passcode-index-js.js +1 -1
  30. package/dist/umd/descope-password-field-index-js.js +1 -1
  31. package/dist/umd/descope-switch-toggle-index-js.js +1 -1
  32. package/dist/umd/descope-text-area-index-js.js +1 -1
  33. package/dist/umd/descope-text-field-index-js.js +1 -1
  34. package/dist/umd/descope-text-index-js.js +1 -1
  35. package/dist/umd/index.js +1 -1
  36. package/package.json +2 -1
  37. package/src/components/descope-combo-box/ComboBox.js +111 -0
  38. package/src/components/descope-combo-box/index.js +6 -0
  39. package/src/components/descope-passcode/Passcode.js +1 -0
  40. package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +9 -5
  41. package/src/constants.js +3 -1
  42. package/src/helpers/componentHelpers.js +55 -36
  43. package/src/helpers/index.js +2 -1
  44. package/src/helpers/themeHelpers/index.js +3 -3
  45. package/src/mixins/createStyleMixin/index.js +116 -90
  46. package/src/mixins/index.js +1 -0
  47. package/src/mixins/inputMixin.js +12 -7
  48. package/src/mixins/portalMixin.js +62 -0
  49. package/src/mixins/proxyInputMixin.js +23 -22
  50. package/src/theme/components/comboBox.js +32 -0
  51. package/src/theme/components/index.js +3 -1
  52. package/dist/umd/54.js +0 -971
  53. package/dist/umd/666.js +0 -37
  54. /package/dist/umd/{666.js.LICENSE.txt → 725.js.LICENSE.txt} +0 -0
package/dist/index.esm.js CHANGED
@@ -16,14 +16,18 @@ const kebabCase = (str) =>
16
16
  .replace(/[\s_.]+/g, '-')
17
17
  .toLowerCase();
18
18
 
19
- const kebabCaseJoin = (...args) => kebabCase(args.join('-'));
19
+ const kebabCaseJoin = (...args) => kebabCase(args.filter((arg) => !!arg).join('-'));
20
20
 
21
21
  const compose = (...fns) =>
22
22
  (val) =>
23
23
  fns.reduceRight((res, fn) => fn(res), val);
24
24
 
25
+ const upperFirst = (str) => str.charAt(0).toUpperCase() + str.slice(1);
26
+
25
27
  const DESCOPE_PREFIX = 'descope';
26
28
  const CSS_SELECTOR_SPECIFIER_MULTIPLY = 3;
29
+ const BASE_THEME_SECTION = 'host';
30
+ const PORTAL_THEME_PREFIX = '@';
27
31
 
28
32
  const observeAttributes = (
29
33
  ele,
@@ -31,15 +35,14 @@ const observeAttributes = (
31
35
  { excludeAttrs = [], includeAttrs = [] }
32
36
  ) => {
33
37
  // sync all attrs on init
34
- callback(
35
- ...Array.from(ele.attributes)
36
- .filter(
37
- (attr) =>
38
- !excludeAttrs.includes(attr.name) &&
39
- (!includeAttrs.length || includeAttrs.includes(attr.name))
40
- )
41
- .map((attr) => attr.name)
42
- );
38
+ const filteredAttrs = Array.from(ele.attributes)
39
+ .filter((attr) =>
40
+ !excludeAttrs.includes(attr.name) &&
41
+ (!includeAttrs.length || includeAttrs.includes(attr.name))
42
+ )
43
+ .map((attr) => attr.name);
44
+
45
+ callback(filteredAttrs);
43
46
 
44
47
  const observer = new MutationObserver((mutationsList) => {
45
48
  for (const mutation of mutationsList) {
@@ -56,21 +59,39 @@ const observeAttributes = (
56
59
  observer.observe(ele, { attributes: true });
57
60
  };
58
61
 
62
+ // calling the callback with this object: { addedNodes, removedNodes }
63
+ const observeChildren = (
64
+ ele,
65
+ callback,
66
+ ) => {
67
+ callback({ addedNodes: Array.from(ele.children), removedNodes: [] });
68
+
69
+ const observer = new MutationObserver((mutationsList) => {
70
+ for (const mutation of mutationsList) {
71
+ if (mutation.type === 'childList') {
72
+ callback(mutation);
73
+ }
74
+ }
75
+ });
76
+
77
+ observer.observe(ele, { childList: true });
78
+ };
79
+
59
80
  const createSyncAttrsCb =
60
81
  (srcEle, targetEle, mapAttrs = {}) =>
61
- (...attrNames) => {
62
- attrNames.forEach((attrName) => {
63
- const targetAttrName = mapAttrs[attrName] || attrName;
64
- const srcAttrVal = srcEle.getAttribute(attrName);
65
- if (srcAttrVal !== null) {
66
- if (targetEle.getAttribute(targetAttrName) !== srcAttrVal) {
67
- targetEle.setAttribute(targetAttrName, srcAttrVal);
82
+ (attrNames) => {
83
+ attrNames.forEach((attrName) => {
84
+ const targetAttrName = mapAttrs[attrName] || attrName;
85
+ const srcAttrVal = srcEle.getAttribute(attrName);
86
+ if (srcAttrVal !== null) {
87
+ if (targetEle.getAttribute(targetAttrName) !== srcAttrVal) {
88
+ targetEle.setAttribute(targetAttrName, srcAttrVal);
89
+ }
90
+ } else {
91
+ targetEle.removeAttribute(targetAttrName);
68
92
  }
69
- } else {
70
- targetEle.removeAttribute(targetAttrName);
71
- }
72
- });
73
- };
93
+ });
94
+ };
74
95
 
75
96
  const syncAttrs = (ele1, ele2, options) => {
76
97
  observeAttributes(ele1, createSyncAttrsCb(ele1, ele2), options);
@@ -80,27 +101,29 @@ const syncAttrs = (ele1, ele2, options) => {
80
101
  const getComponentName = (name) => kebabCaseJoin(DESCOPE_PREFIX, name);
81
102
 
82
103
  const getCssVarName = (...args) =>
83
- `--${kebabCaseJoin(...args.filter((arg) => !!arg))}`;
104
+ `--${kebabCaseJoin(...args)}`;
84
105
 
85
106
  const forwardAttrs = (source, dest, options = {}) => {
86
- observeAttributes(
87
- source,
88
- createSyncAttrsCb(source, dest, options.mapAttrs),
89
- options
90
- );
107
+ observeAttributes(
108
+ source,
109
+ createSyncAttrsCb(source, dest, options.mapAttrs),
110
+ options
111
+ );
91
112
  };
92
113
 
93
114
  const forwardProps = (src, target, props = []) => {
94
- if(!props.length) return;
115
+ if (!props.length) return;
95
116
 
96
- const config = props.reduce((acc, prop) => Object.assign(acc, {[prop] : {
97
- get () {
98
- return target[prop]
99
- },
100
- set (v) {
101
- target[prop] = v;
117
+ const config = props.reduce((acc, prop) => Object.assign(acc, {
118
+ [prop]: {
119
+ get() {
120
+ return target[prop]
121
+ },
122
+ set(v) {
123
+ target[prop] = v;
124
+ }
102
125
  }
103
- }}), {});
126
+ }), {});
104
127
 
105
128
  Object.defineProperties(src, config);
106
129
  };
@@ -232,108 +255,134 @@ const createClassSelectorSpecifier = (className, numOfRepeats) => Array(numOfRep
232
255
  .fill(`.${className}`)
233
256
  .join('');
234
257
 
235
- const createStyleMixin =
236
- ({ mappings = {} }) =>
237
- (superclass) => {
238
- const styleAttributes = Object.keys(mappings).map((key) =>
239
- kebabCaseJoin('st', key)
240
- );
241
- return class CustomStyleMixinClass extends superclass {
242
- static get observedAttributes() {
243
- const superAttrs = superclass.observedAttributes || [];
244
- return [...superAttrs, ...styleAttributes];
245
- }
258
+ const STYLE_OVERRIDE_ATTR_PREFIX = 'st';
246
259
 
247
- static get cssVarList() {
248
- return createCssVarsList(superclass.componentName, {
260
+
261
+ const createStyleMixin =
262
+ ({ mappings = {} }) => (superclass) =>
263
+ class CustomStyleMixinClass extends superclass {
264
+ static get cssVarList() {
265
+ return {
266
+ ...superclass.cssVarList,
267
+ ...createCssVarsList(superclass.componentName, {
249
268
  ...mappings,
250
- });
251
- }
269
+ })
270
+ };
271
+ }
252
272
 
253
- #overrideStyleEle = null;
254
- #themeStyleEle = null;
255
- #disconnectThemeManager
273
+ #overrideStyleEle;
274
+ #themeStyleEle;
275
+ #disconnectThemeManager
276
+ #componentNameSuffix
277
+ #themeSection
278
+ #rootElement
279
+ #baseSelector
280
+ #styleAttributes
281
+
282
+ // we are using this mixin also for portalMixin
283
+ // so we should be able to inject styles to other DOM elements
284
+ // this is why we need to support these overrides
285
+ constructor({
286
+ getRootElement,
287
+ componentNameSuffix = '',
288
+ themeSection = BASE_THEME_SECTION,
289
+ baseSelector
290
+ } = {}) {
291
+ super();
292
+ this.#componentNameSuffix = componentNameSuffix;
293
+ this.#themeSection = themeSection;
294
+ this.#rootElement = getRootElement?.(this) || this.shadowRoot;
295
+ this.#baseSelector = baseSelector ?? this.baseSelector;
296
+
297
+ this.#styleAttributes = Object.keys(mappings).map((key) =>
298
+ kebabCaseJoin(STYLE_OVERRIDE_ATTR_PREFIX, componentNameSuffix, key)
299
+ );
300
+ }
256
301
 
257
- constructor() {
258
- super();
302
+ get componentTheme() {
303
+ return componentsThemeManager.currentTheme?.[superclass.componentName] || ''
304
+ }
259
305
 
260
- this.classList.add(superclass.componentName);
306
+ #onComponentThemeChange() {
307
+ this.#themeStyleEle.innerHTML = this.componentTheme[this.#themeSection];
308
+ }
261
309
 
262
- this.#createComponentStyle();
263
- this.#createComponentTheme();
264
- this.#createAttrOverrideStyle();
265
- }
310
+ #createComponentTheme() {
311
+ this.#themeStyleEle = document.createElement('style');
312
+ this.#themeStyleEle.id = 'style-mixin-theme';
313
+ this.#rootElement.prepend(this.#themeStyleEle);
314
+ this.#disconnectThemeManager = componentsThemeManager.onCurrentThemeChange(this.#onComponentThemeChange.bind(this));
315
+ this.#onComponentThemeChange();
316
+ }
266
317
 
267
- get componentTheme() {
268
- return componentsThemeManager.currentTheme?.[superclass.componentName] || ''
269
- }
318
+ #createAttrOverrideStyle() {
319
+ this.#overrideStyleEle = document.createElement('style');
320
+ this.#overrideStyleEle.id = 'style-mixin-overrides';
270
321
 
271
- onComponentThemeChange() {
272
- this.#themeStyleEle.innerHTML = this.componentTheme.theme;
273
- }
322
+ const classSpecifier = createClassSelectorSpecifier(superclass.componentName, CSS_SELECTOR_SPECIFIER_MULTIPLY);
274
323
 
275
- #createComponentTheme() {
276
- this.#themeStyleEle = document.createElement('style');
277
- this.#themeStyleEle.id = 'style-mixin-component-theme';
278
- this.shadowRoot.prepend(this.#themeStyleEle);
279
- this.#disconnectThemeManager = componentsThemeManager.onCurrentThemeChange(this.onComponentThemeChange.bind(this));
280
- this.onComponentThemeChange();
281
- }
324
+ this.#overrideStyleEle.innerText = `:host(${classSpecifier}) {}`;
325
+ this.#rootElement.append(this.#overrideStyleEle);
326
+ }
282
327
 
283
- #createAttrOverrideStyle() {
284
- this.#overrideStyleEle = document.createElement('style');
285
- this.#overrideStyleEle.id = 'style-mixin-overrides';
328
+ #setAttrOverrideStyle(attrName, value) {
329
+ const style = this.#overrideStyleEle?.sheet?.cssRules[0].style;
330
+ if (!style) return;
286
331
 
287
- const classSpecifier = createClassSelectorSpecifier(superclass.componentName, CSS_SELECTOR_SPECIFIER_MULTIPLY);
288
- this.#overrideStyleEle.innerText = `:host(${classSpecifier}) {}`;
289
- this.shadowRoot.append(this.#overrideStyleEle);
290
- }
332
+ const varName = getCssVarName(
333
+ superclass.componentName,
334
+ attrName.replace(new RegExp(`^${STYLE_OVERRIDE_ATTR_PREFIX}-`), '')
335
+ );
291
336
 
292
- #updateAttrOverrideStyle(attrName, value) {
293
- const style = this.#overrideStyleEle.sheet?.cssRules[0].style;
294
- const varName = getCssVarName(
295
- superclass.componentName,
296
- attrName.replace(/^st-/, '')
297
- );
337
+ if (value) style?.setProperty(varName, value);
338
+ else style?.removeProperty(varName);
339
+ }
298
340
 
299
- if (value) style?.setProperty(varName, value);
300
- else style?.removeProperty(varName);
341
+ #updateOverrideStyle(attrs = []) {
342
+ for (const attr of attrs) {
343
+ if (this.#styleAttributes.includes(attr)) {
344
+ this.#setAttrOverrideStyle(attr, this.getAttribute(attr));
345
+ }
301
346
  }
302
347
 
303
- #createComponentStyle() {
304
- const themeStyle = document.createElement('style');
305
- themeStyle.id = 'style-mixin-component';
306
- themeStyle.innerHTML = createStyle(
307
- superclass.componentName,
308
- this.baseSelector,
309
- mappings
310
- );
311
- this.shadowRoot.prepend(themeStyle);
312
- }
348
+ // we are rewriting the style back to the style tag
349
+ this.#overrideStyleEle.innerHTML = this.#overrideStyleEle?.sheet?.cssRules[0].cssText;
350
+ }
313
351
 
314
- attributeChangedCallback(attrName, oldValue, newValue) {
315
- super.attributeChangedCallback?.(attrName, oldValue, newValue);
352
+ #createComponentStyle() {
353
+ const themeStyle = document.createElement('style');
354
+ themeStyle.id = 'style-mixin-mappings';
355
+ themeStyle.innerHTML = createStyle(
356
+ kebabCaseJoin(superclass.componentName, this.#componentNameSuffix),
357
+ this.#baseSelector,
358
+ mappings
359
+ );
360
+ this.#rootElement.prepend(themeStyle);
361
+ }
316
362
 
317
- if (styleAttributes.includes(attrName)) {
318
- this.#updateAttrOverrideStyle(attrName, newValue);
319
- }
320
- }
363
+ #addClassName(className) {
364
+ (this.#rootElement.classList || this.#rootElement.host.classList).add(className);
365
+ }
321
366
 
322
- connectedCallback() {
323
- super.connectedCallback?.();
324
- if (this.shadowRoot.isConnected) {
325
- Array.from(this.attributes).forEach((attr) => {
326
- if (styleAttributes.includes(attr.nodeName)) {
327
- this.#updateAttrOverrideStyle(attr.nodeName, attr.value);
328
- }
329
- });
330
- }
331
- }
367
+ connectedCallback() {
368
+ super.connectedCallback?.();
369
+ if (this.shadowRoot.isConnected) {
370
+
371
+ this.#addClassName(superclass.componentName);
372
+
373
+ this.#createComponentStyle();
374
+ this.#createComponentTheme();
375
+ this.#createAttrOverrideStyle();
376
+
377
+ // this is instead attributeChangedCallback because we cannot use static methods in this case
378
+ observeAttributes(this, this.#updateOverrideStyle.bind(this), {});
332
379
 
333
- disconnectedCallback() {
334
- this.#disconnectThemeManager?.();
335
380
  }
336
- };
381
+ }
382
+
383
+ disconnectedCallback() {
384
+ this.#disconnectThemeManager?.();
385
+ }
337
386
  };
338
387
 
339
388
  const draggableMixin = (superclass) =>
@@ -475,8 +524,6 @@ const createProxy = ({
475
524
  return compose(hoverableMixin())(ProxyElement);
476
525
  };
477
526
 
478
- const upperFirst = (str) => str.charAt(0).toUpperCase() + str.slice(1);
479
-
480
527
  const events = [
481
528
  'change',
482
529
  'input',
@@ -544,7 +591,13 @@ const inputMixin = (superclass) => class InputMixinClass extends superclass {
544
591
  }
545
592
  }
546
593
 
594
+ get isReadOnly() {
595
+ return this.getAttribute('readonly') !== 'false'
596
+ }
597
+
547
598
  setValidity() {
599
+ if (this.isReadOnly) return;
600
+
548
601
  const validity = this.getValidity();
549
602
  this.#internals.setValidity(validity, this.getErrorMessage(validity));
550
603
  }
@@ -570,8 +623,8 @@ const inputMixin = (superclass) => class InputMixinClass extends superclass {
570
623
  }
571
624
 
572
625
  setCustomValidity(errorMessage) {
573
- if(errorMessage){
574
- this.#internals.setValidity({customError: true}, errorMessage);
626
+ if (errorMessage) {
627
+ this.#internals.setValidity({ customError: true }, errorMessage);
575
628
  } else {
576
629
  this.#internals.setValidity({});
577
630
  this.setValidity();
@@ -624,9 +677,9 @@ const inputMixin = (superclass) => class InputMixinClass extends superclass {
624
677
  }
625
678
  }
626
679
 
627
- handleDispatchValidationEvents(){
628
- if(this.checkValidity()) {
629
- this.dispatchValid();
680
+ handleDispatchValidationEvents() {
681
+ if (this.checkValidity()) {
682
+ this.dispatchValid();
630
683
  } else {
631
684
  this.dispatchInvalid();
632
685
  }
@@ -689,28 +742,6 @@ const proxyInputMixin = (superclass) =>
689
742
 
690
743
  this.#inputElement = super.inputElement;
691
744
 
692
- // this is our way to identify that the form was submitted
693
- // in this case, we want the input to be in error state if it's not valid
694
- this.addEventListener('focus', (e) => {
695
- if (e.relatedTarget?.form) {
696
- if (!this.checkValidity()) {
697
- this.setAttribute('invalid', 'true');
698
- }
699
-
700
- if (this.hasAttribute('invalid')) {
701
- this.reportValidityOnInternalInput();
702
- }
703
- }
704
- });
705
-
706
- this.addEventListener('invalid', () => {
707
- this.setInternalInputErrorMessage();
708
- this.setAttribute('error-message', this.validationMessage);
709
- });
710
-
711
- this.addEventListener('valid', () => {
712
- this.removeAttribute('invalid');
713
- });
714
745
  }
715
746
 
716
747
  get inputElement() {
@@ -766,6 +797,29 @@ const proxyInputMixin = (superclass) =>
766
797
  connectedCallback() {
767
798
  this.baseEle = this.shadowRoot.querySelector(this.baseSelector);
768
799
 
800
+ // this is our way to identify that the form was submitted
801
+ // in this case, we want the input to be in error state if it's not valid
802
+ this.addEventListener('focus', (e) => {
803
+ if (e.relatedTarget?.form) {
804
+ if (!this.checkValidity()) {
805
+ this.setAttribute('invalid', 'true');
806
+ }
807
+
808
+ if (this.hasAttribute('invalid')) {
809
+ this.reportValidityOnInternalInput();
810
+ }
811
+ }
812
+ });
813
+
814
+ this.addEventListener('invalid', () => {
815
+ this.setInternalInputErrorMessage();
816
+ this.setAttribute('error-message', this.validationMessage);
817
+ });
818
+
819
+ this.addEventListener('valid', () => {
820
+ this.removeAttribute('invalid');
821
+ });
822
+
769
823
  super.connectedCallback?.();
770
824
 
771
825
  this.inputElement.addEventListener('input', () => {
@@ -825,7 +879,64 @@ const componentNameValidationMixin = (superclass) =>
825
879
  }
826
880
  };
827
881
 
828
- const componentName$h = getComponentName('button');
882
+ const sanitizeSelector = (selector) => selector.replace(/[^\w\s]/gi, '');
883
+
884
+ const appendSuffixToKeys = (obj, suffix) => Object.keys(obj).reduce((acc, key) =>
885
+ Object.assign(acc, { [suffix + upperFirst(key)]: obj[key] }), {});
886
+
887
+ const getDomNode = (maybeDomNode) => maybeDomNode.host || maybeDomNode;
888
+
889
+ const portalMixin = ({ name, selector, mappings = {} }) => (superclass) => {
890
+ const eleDisplayName = name || sanitizeSelector(selector);
891
+
892
+ const BaseClass = createStyleMixin({
893
+ mappings
894
+ })(superclass);
895
+
896
+ return class PortalMixinClass extends BaseClass {
897
+ static get cssVarList() {
898
+ return {
899
+ ...BaseClass.cssVarList,
900
+ ...createCssVarsList(superclass.componentName, appendSuffixToKeys(mappings, eleDisplayName))
901
+ };
902
+ }
903
+
904
+ #portalEle
905
+
906
+ constructor() {
907
+ // we cannot use "this" before calling "super"
908
+ const getRootElement = (that) => {
909
+ const baseEle = that.shadowRoot.querySelector(that.baseSelector);
910
+ const portal = baseEle.shadowRoot.querySelector(selector);
911
+
912
+ return portal.shadowRoot || portal
913
+ };
914
+
915
+ super({
916
+ getRootElement,
917
+ componentNameSuffix: eleDisplayName,
918
+ themeSection: PORTAL_THEME_PREFIX + eleDisplayName,
919
+ baseSelector: ':host'
920
+ });
921
+
922
+ this.#portalEle = getDomNode(getRootElement(this));
923
+ }
924
+
925
+ #handleHoverAttribute() {
926
+ this.#portalEle.onmouseenter = (e) => { e.target.setAttribute('hover', 'true'); };
927
+ this.#portalEle.onmouseleave = (e) => { e.target.removeAttribute('hover'); };
928
+ }
929
+
930
+ connectedCallback() {
931
+ super.connectedCallback?.();
932
+ forwardAttrs(this, this.#portalEle, { excludeAttrs: ['hover'] });
933
+
934
+ this.#handleHoverAttribute();
935
+ }
936
+ }
937
+ };
938
+
939
+ const componentName$i = getComponentName('button');
829
940
 
830
941
  const editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;
831
942
  const resetStyles = `
@@ -879,7 +990,7 @@ const Button = compose(
879
990
  style: () =>
880
991
  `${resetStyles} ${editorOverrides} ${iconStyles} ${loadingIndicatorStyles}`,
881
992
  excludeAttrsSync: ['tabindex'],
882
- componentName: componentName$h
993
+ componentName: componentName$i
883
994
  })
884
995
  );
885
996
 
@@ -916,9 +1027,9 @@ const loadingIndicatorStyles = `
916
1027
  }
917
1028
  `;
918
1029
 
919
- customElements.define(componentName$h, Button);
1030
+ customElements.define(componentName$i, Button);
920
1031
 
921
- const componentName$g = getComponentName('checkbox');
1032
+ const componentName$h = getComponentName('checkbox');
922
1033
 
923
1034
  const Checkbox = compose(
924
1035
  createStyleMixin({
@@ -944,17 +1055,17 @@ const Checkbox = compose(
944
1055
  }
945
1056
  `,
946
1057
  excludeAttrsSync: ['tabindex'],
947
- componentName: componentName$g
1058
+ componentName: componentName$h
948
1059
  })
949
1060
  );
950
1061
 
951
- customElements.define(componentName$g, Checkbox);
1062
+ customElements.define(componentName$h, Checkbox);
952
1063
 
953
- const componentName$f = getComponentName('loader-linear');
1064
+ const componentName$g = getComponentName('loader-linear');
954
1065
 
955
1066
  class RawLoaderLinear extends DescopeBaseClass {
956
1067
  static get componentName() {
957
- return componentName$f;
1068
+ return componentName$g;
958
1069
  }
959
1070
  constructor() {
960
1071
  super();
@@ -990,13 +1101,13 @@ class RawLoaderLinear extends DescopeBaseClass {
990
1101
  }
991
1102
  }
992
1103
 
993
- const selectors$4 = {
1104
+ const selectors$5 = {
994
1105
  root: {},
995
1106
  after: { selector: '::after' },
996
1107
  host: { selector: () => ':host' }
997
1108
  };
998
1109
 
999
- const { root: root$1, after: after$1, host: host$2 } = selectors$4;
1110
+ const { root: root$1, after: after$1, host: host$2 } = selectors$5;
1000
1111
 
1001
1112
  const LoaderLinear = compose(
1002
1113
  createStyleMixin({
@@ -1017,13 +1128,13 @@ const LoaderLinear = compose(
1017
1128
  componentNameValidationMixin
1018
1129
  )(RawLoaderLinear);
1019
1130
 
1020
- customElements.define(componentName$f, LoaderLinear);
1131
+ customElements.define(componentName$g, LoaderLinear);
1021
1132
 
1022
- const componentName$e = getComponentName('loader-radial');
1133
+ const componentName$f = getComponentName('loader-radial');
1023
1134
 
1024
1135
  class RawLoaderRadial extends DescopeBaseClass {
1025
1136
  static get componentName() {
1026
- return componentName$e;
1137
+ return componentName$f;
1027
1138
  }
1028
1139
  constructor() {
1029
1140
  super();
@@ -1075,13 +1186,13 @@ const LoaderRadial = compose(
1075
1186
  componentNameValidationMixin
1076
1187
  )(RawLoaderRadial);
1077
1188
 
1078
- customElements.define(componentName$e, LoaderRadial);
1189
+ customElements.define(componentName$f, LoaderRadial);
1079
1190
 
1080
- const componentName$d = getComponentName('container');
1191
+ const componentName$e = getComponentName('container');
1081
1192
 
1082
1193
  class RawContainer extends DescopeBaseClass {
1083
1194
  static get componentName() {
1084
- return componentName$d;
1195
+ return componentName$e;
1085
1196
  }
1086
1197
  constructor() {
1087
1198
  super();
@@ -1143,28 +1254,28 @@ const Container = compose(
1143
1254
  componentNameValidationMixin
1144
1255
  )(RawContainer);
1145
1256
 
1146
- customElements.define(componentName$d, Container);
1257
+ customElements.define(componentName$e, Container);
1147
1258
 
1148
- const componentName$c = getComponentName('date-picker');
1259
+ const componentName$d = getComponentName('date-picker');
1149
1260
 
1150
1261
  const DatePicker = compose(
1151
1262
  draggableMixin,
1152
1263
  componentNameValidationMixin
1153
1264
  )(
1154
1265
  createProxy({
1155
- componentName: componentName$c,
1266
+ componentName: componentName$d,
1156
1267
  slots: ['prefix', 'suffix'],
1157
1268
  wrappedEleName: 'vaadin-date-picker',
1158
1269
  style: ``
1159
1270
  })
1160
1271
  );
1161
1272
 
1162
- customElements.define(componentName$c, DatePicker);
1273
+ customElements.define(componentName$d, DatePicker);
1163
1274
 
1164
- const componentName$b = getComponentName('divider');
1275
+ const componentName$c = getComponentName('divider');
1165
1276
  class RawDivider extends DescopeBaseClass {
1166
1277
  static get componentName() {
1167
- return componentName$b;
1278
+ return componentName$c;
1168
1279
  }
1169
1280
  constructor() {
1170
1281
  super();
@@ -1216,7 +1327,7 @@ class RawDivider extends DescopeBaseClass {
1216
1327
  }
1217
1328
  }
1218
1329
 
1219
- const selectors$3 = {
1330
+ const selectors$4 = {
1220
1331
  root: { selector: '' },
1221
1332
  before: { selector: '::before' },
1222
1333
  after: { selector: '::after' },
@@ -1224,7 +1335,7 @@ const selectors$3 = {
1224
1335
  host: { selector: () => ':host' },
1225
1336
  };
1226
1337
 
1227
- const { root, before, after, text: text$2, host: host$1 } = selectors$3;
1338
+ const { root, before, after, text: text$2, host: host$1 } = selectors$4;
1228
1339
 
1229
1340
  const Divider = compose(
1230
1341
  createStyleMixin({
@@ -1248,11 +1359,11 @@ const Divider = compose(
1248
1359
  componentNameValidationMixin
1249
1360
  )(RawDivider);
1250
1361
 
1251
- const componentName$a = getComponentName('text');
1362
+ const componentName$b = getComponentName('text');
1252
1363
 
1253
1364
  class RawText extends DescopeBaseClass {
1254
1365
  static get componentName() {
1255
- return componentName$a;
1366
+ return componentName$b;
1256
1367
  }
1257
1368
  constructor() {
1258
1369
  super();
@@ -1300,11 +1411,11 @@ const Text = compose(
1300
1411
  componentNameValidationMixin
1301
1412
  )(RawText);
1302
1413
 
1303
- customElements.define(componentName$a, Text);
1414
+ customElements.define(componentName$b, Text);
1304
1415
 
1305
- customElements.define(componentName$b, Divider);
1416
+ customElements.define(componentName$c, Divider);
1306
1417
 
1307
- const selectors$2 = {
1418
+ const selectors$3 = {
1308
1419
  label: '::part(label)',
1309
1420
  input: '::part(input-field)',
1310
1421
  readOnlyInput: '[readonly]::part(input-field)::after',
@@ -1313,33 +1424,33 @@ const selectors$2 = {
1313
1424
  };
1314
1425
 
1315
1426
  var textFieldMappings = {
1316
- backgroundColor: { selector: selectors$2.input },
1317
- color: { selector: selectors$2.input },
1318
- width: { selector: selectors$2.host },
1427
+ backgroundColor: { selector: selectors$3.input },
1428
+ color: { selector: selectors$3.input },
1429
+ width: { selector: selectors$3.host },
1319
1430
  borderColor: [
1320
- { selector: selectors$2.input },
1321
- { selector: selectors$2.readOnlyInput }
1431
+ { selector: selectors$3.input },
1432
+ { selector: selectors$3.readOnlyInput }
1322
1433
  ],
1323
1434
  borderWidth: [
1324
- { selector: selectors$2.input },
1325
- { selector: selectors$2.readOnlyInput }
1435
+ { selector: selectors$3.input },
1436
+ { selector: selectors$3.readOnlyInput }
1326
1437
  ],
1327
1438
  borderStyle: [
1328
- { selector: selectors$2.input },
1329
- { selector: selectors$2.readOnlyInput }
1439
+ { selector: selectors$3.input },
1440
+ { selector: selectors$3.readOnlyInput }
1330
1441
  ],
1331
- borderRadius: { selector: selectors$2.input },
1332
- boxShadow: { selector: selectors$2.input },
1442
+ borderRadius: { selector: selectors$3.input },
1443
+ boxShadow: { selector: selectors$3.input },
1333
1444
  fontSize: {},
1334
- height: { selector: selectors$2.input },
1335
- padding: { selector: selectors$2.input },
1336
- outline: { selector: selectors$2.input },
1337
- outlineOffset: { selector: selectors$2.input },
1445
+ height: { selector: selectors$3.input },
1446
+ padding: { selector: selectors$3.input },
1447
+ outline: { selector: selectors$3.input },
1448
+ outlineOffset: { selector: selectors$3.input },
1338
1449
 
1339
- placeholderColor: { selector: selectors$2.placeholder, property: 'color' }
1450
+ placeholderColor: { selector: selectors$3.placeholder, property: 'color' }
1340
1451
  };
1341
1452
 
1342
- const componentName$9 = getComponentName('email-field');
1453
+ const componentName$a = getComponentName('email-field');
1343
1454
 
1344
1455
  let overrides$5 = ``;
1345
1456
 
@@ -1358,7 +1469,7 @@ const EmailField = compose(
1358
1469
  wrappedEleName: 'vaadin-email-field',
1359
1470
  style: () => overrides$5,
1360
1471
  excludeAttrsSync: ['tabindex'],
1361
- componentName: componentName$9
1472
+ componentName: componentName$a
1362
1473
  })
1363
1474
  );
1364
1475
 
@@ -1402,12 +1513,12 @@ overrides$5 = `
1402
1513
  }
1403
1514
  `;
1404
1515
 
1405
- customElements.define(componentName$9, EmailField);
1516
+ customElements.define(componentName$a, EmailField);
1406
1517
 
1407
- const componentName$8 = getComponentName('link');
1518
+ const componentName$9 = getComponentName('link');
1408
1519
  class RawLink extends DescopeBaseClass {
1409
1520
  static get componentName() {
1410
- return componentName$8;
1521
+ return componentName$9;
1411
1522
  }
1412
1523
  constructor() {
1413
1524
  super();
@@ -1449,13 +1560,13 @@ class RawLink extends DescopeBaseClass {
1449
1560
  }
1450
1561
  }
1451
1562
 
1452
- const selectors$1 = {
1563
+ const selectors$2 = {
1453
1564
  host: { selector: () => 'host' },
1454
1565
  anchor: { selector: '> a' },
1455
1566
  text: { selector: Text.componentName }
1456
1567
  };
1457
1568
 
1458
- const { anchor, text: text$1, host } = selectors$1;
1569
+ const { anchor, text: text$1, host } = selectors$2;
1459
1570
 
1460
1571
  const Link = compose(
1461
1572
  createStyleMixin({
@@ -1474,16 +1585,16 @@ const Link = compose(
1474
1585
  componentNameValidationMixin
1475
1586
  )(RawLink);
1476
1587
 
1477
- customElements.define(componentName$8, Link);
1588
+ customElements.define(componentName$9, Link);
1478
1589
 
1479
- const componentName$7 = getComponentName('logo');
1590
+ const componentName$8 = getComponentName('logo');
1480
1591
 
1481
1592
  let style;
1482
1593
  const getStyle = () => style;
1483
1594
 
1484
1595
  class RawLogo extends DescopeBaseClass {
1485
1596
  static get componentName() {
1486
- return componentName$7;
1597
+ return componentName$8;
1487
1598
  }
1488
1599
  constructor() {
1489
1600
  super();
@@ -1524,9 +1635,9 @@ style = `
1524
1635
  }
1525
1636
  `;
1526
1637
 
1527
- customElements.define(componentName$7, Logo);
1638
+ customElements.define(componentName$8, Logo);
1528
1639
 
1529
- const componentName$6 = getComponentName('number-field');
1640
+ const componentName$7 = getComponentName('number-field');
1530
1641
 
1531
1642
  let overrides$4 = ``;
1532
1643
 
@@ -1545,7 +1656,7 @@ const NumberField = compose(
1545
1656
  wrappedEleName: 'vaadin-number-field',
1546
1657
  style: () => overrides$4,
1547
1658
  excludeAttrsSync: ['tabindex'],
1548
- componentName: componentName$6
1659
+ componentName: componentName$7
1549
1660
  })
1550
1661
  );
1551
1662
 
@@ -1589,7 +1700,7 @@ overrides$4 = `
1589
1700
  }
1590
1701
  `;
1591
1702
 
1592
- customElements.define(componentName$6, NumberField);
1703
+ customElements.define(componentName$7, NumberField);
1593
1704
 
1594
1705
  var BaseInputClass = inputMixin(HTMLElement); //todo: maybe we should use base class?
1595
1706
 
@@ -1607,7 +1718,7 @@ const getSanitizedCharacters = (str) => {
1607
1718
  return [...pin]; // creating array of chars
1608
1719
  };
1609
1720
 
1610
- const componentName$5 = getComponentName('passcode-internal');
1721
+ const componentName$6 = getComponentName('passcode-internal');
1611
1722
 
1612
1723
  class PasscodeInternal extends BaseInputClass {
1613
1724
  static get observedAttributes() {
@@ -1615,12 +1726,13 @@ class PasscodeInternal extends BaseInputClass {
1615
1726
  ...BaseInputClass.observedAttributes,
1616
1727
  'disabled',
1617
1728
  'bordered',
1618
- 'size'
1729
+ 'size',
1730
+ 'readonly'
1619
1731
  ];
1620
1732
  }
1621
1733
 
1622
1734
  static get componentName() {
1623
- return componentName$5;
1735
+ return componentName$6;
1624
1736
  }
1625
1737
 
1626
1738
  constructor() {
@@ -1658,7 +1770,7 @@ class PasscodeInternal extends BaseInputClass {
1658
1770
  }
1659
1771
 
1660
1772
  set value(val) {
1661
- if(val === this.value) return;
1773
+ if (val === this.value) return;
1662
1774
 
1663
1775
  const charArr = getSanitizedCharacters(val);
1664
1776
 
@@ -1701,6 +1813,7 @@ class PasscodeInternal extends BaseInputClass {
1701
1813
 
1702
1814
  async connectedCallback() {
1703
1815
  super.connectedCallback();
1816
+
1704
1817
  this.initInputs();
1705
1818
 
1706
1819
  this.addEventListener('invalid', this.handleInputsInvalid);
@@ -1745,7 +1858,8 @@ class PasscodeInternal extends BaseInputClass {
1745
1858
  // in order to simulate blur on the input
1746
1859
  // we are checking if focus on one of the digits happened immediately after blur on another digit
1747
1860
  // if not, the component is no longer focused and we should simulate blur
1748
- input.addEventListener('blur', () => {
1861
+ input.addEventListener('blur', (e) => {
1862
+ e.stopPropagation();
1749
1863
  const timerId = setTimeout(() => {
1750
1864
  this.dispatchBlur();
1751
1865
  });
@@ -1755,7 +1869,8 @@ class PasscodeInternal extends BaseInputClass {
1755
1869
  );
1756
1870
  });
1757
1871
 
1758
- input.oninput = () => {
1872
+ input.oninput = (e) => {
1873
+ e.stopPropagation();
1759
1874
  const charArr = getSanitizedCharacters(input.value);
1760
1875
 
1761
1876
  if (!charArr.length) input.value = ''; // if we got an invalid value we want to clear the input
@@ -1774,7 +1889,7 @@ class PasscodeInternal extends BaseInputClass {
1774
1889
  !prevInput.hasAttribute('focused') && setTimeout(() => {
1775
1890
  focusElement(prevInput);
1776
1891
  });
1777
-
1892
+
1778
1893
  this.dispatchInput();
1779
1894
  } else if (key.match(/^(\d)$/g)) { // if input is a digit
1780
1895
  input.value = ''; // we are clearing the previous value so we can override it with the new value
@@ -1795,7 +1910,7 @@ class PasscodeInternal extends BaseInputClass {
1795
1910
  }
1796
1911
  }
1797
1912
 
1798
- const componentName$4 = getComponentName('text-field');
1913
+ const componentName$5 = getComponentName('text-field');
1799
1914
 
1800
1915
  let overrides$3 = ``;
1801
1916
 
@@ -1812,7 +1927,7 @@ const TextField = compose(
1812
1927
  wrappedEleName: 'vaadin-text-field',
1813
1928
  style: () => overrides$3,
1814
1929
  excludeAttrsSync: ['tabindex'],
1815
- componentName: componentName$4
1930
+ componentName: componentName$5
1816
1931
  })
1817
1932
  );
1818
1933
 
@@ -1857,7 +1972,7 @@ overrides$3 = `
1857
1972
  }
1858
1973
  `;
1859
1974
 
1860
- const componentName$3 = getComponentName('passcode');
1975
+ const componentName$4 = getComponentName('passcode');
1861
1976
 
1862
1977
  const customMixin = (superclass) =>
1863
1978
  class DraggableMixinClass extends superclass {
@@ -1874,12 +1989,12 @@ const customMixin = (superclass) =>
1874
1989
  const template = document.createElement('template');
1875
1990
 
1876
1991
  template.innerHTML = `
1877
- <${componentName$5}
1992
+ <${componentName$6}
1878
1993
  bordered="true"
1879
1994
  name="code"
1880
1995
  tabindex="-1"
1881
1996
  slot="input"
1882
- ></${componentName$5}>
1997
+ ></${componentName$6}>
1883
1998
  `;
1884
1999
 
1885
2000
  this.proxyElement.appendChild(template.content.cloneNode(true));
@@ -1888,7 +2003,7 @@ const customMixin = (superclass) =>
1888
2003
  // so the validations will be triggered blur event is dispatched from descope-passcode internal (and not every time focusing a digit)
1889
2004
  this.proxyElement._setFocused = () => { };
1890
2005
 
1891
- this.inputElement = this.shadowRoot.querySelector(componentName$5);
2006
+ this.inputElement = this.shadowRoot.querySelector(componentName$6);
1892
2007
 
1893
2008
  forwardAttrs(this.shadowRoot.host, this.inputElement, { includeAttrs: ['required', 'pattern'] });
1894
2009
 
@@ -1934,6 +2049,7 @@ const Passcode = compose(
1934
2049
  --vaadin-field-default-width: auto;
1935
2050
  display: inline-block;
1936
2051
  }
2052
+
1937
2053
  descope-passcode-internal {
1938
2054
  -webkit-mask-image: none;
1939
2055
  display: flex;
@@ -1969,17 +2085,17 @@ const Passcode = compose(
1969
2085
  }
1970
2086
  `,
1971
2087
  excludeAttrsSync: ['tabindex'],
1972
- componentName: componentName$3
2088
+ componentName: componentName$4
1973
2089
  })
1974
2090
  );
1975
2091
 
1976
- customElements.define(componentName$4, TextField);
2092
+ customElements.define(componentName$5, TextField);
1977
2093
 
1978
- customElements.define(componentName$5, PasscodeInternal);
2094
+ customElements.define(componentName$6, PasscodeInternal);
1979
2095
 
1980
- customElements.define(componentName$3, Passcode);
2096
+ customElements.define(componentName$4, Passcode);
1981
2097
 
1982
- const componentName$2 = getComponentName('password-field');
2098
+ const componentName$3 = getComponentName('password-field');
1983
2099
 
1984
2100
  let overrides$2 = ``;
1985
2101
 
@@ -2004,7 +2120,7 @@ const PasswordField = compose(
2004
2120
  wrappedEleName: 'vaadin-password-field',
2005
2121
  style: () => overrides$2,
2006
2122
  excludeAttrsSync: ['tabindex'],
2007
- componentName: componentName$2
2123
+ componentName: componentName$3
2008
2124
  })
2009
2125
  );
2010
2126
 
@@ -2048,9 +2164,9 @@ overrides$2 = `
2048
2164
  }
2049
2165
  `;
2050
2166
 
2051
- customElements.define(componentName$2, PasswordField);
2167
+ customElements.define(componentName$3, PasswordField);
2052
2168
 
2053
- const componentName$1 = getComponentName('switch-toggle');
2169
+ const componentName$2 = getComponentName('switch-toggle');
2054
2170
 
2055
2171
  let overrides$1 = ``;
2056
2172
 
@@ -2070,7 +2186,7 @@ const SwitchToggle = compose(
2070
2186
  wrappedEleName: 'vaadin-checkbox',
2071
2187
  style: () => overrides$1,
2072
2188
  excludeAttrsSync: ['tabindex'],
2073
- componentName: componentName$1
2189
+ componentName: componentName$2
2074
2190
  })
2075
2191
  );
2076
2192
 
@@ -2128,11 +2244,11 @@ overrides$1 = `
2128
2244
  }
2129
2245
  `;
2130
2246
 
2131
- customElements.define(componentName$1, SwitchToggle);
2247
+ customElements.define(componentName$2, SwitchToggle);
2132
2248
 
2133
- const componentName = getComponentName('text-area');
2249
+ const componentName$1 = getComponentName('text-area');
2134
2250
 
2135
- const selectors = {
2251
+ const selectors$1 = {
2136
2252
  label: '::part(label)',
2137
2253
  input: '::part(input-field)',
2138
2254
  required: '::part(required-indicator)::after',
@@ -2145,16 +2261,16 @@ const TextArea = compose(
2145
2261
  createStyleMixin({
2146
2262
  mappings: {
2147
2263
  resize: { selector: '> textarea' },
2148
- color: { selector: selectors.label },
2264
+ color: { selector: selectors$1.label },
2149
2265
  cursor: {},
2150
- width: { selector: selectors.host },
2151
- backgroundColor: { selector: selectors.input },
2152
- borderWidth: { selector: selectors.input },
2153
- borderStyle: { selector: selectors.input },
2154
- borderColor: { selector: selectors.input },
2155
- borderRadius: { selector: selectors.input },
2156
- outline: { selector: selectors.input },
2157
- outlineOffset: { selector: selectors.input }
2266
+ width: { selector: selectors$1.host },
2267
+ backgroundColor: { selector: selectors$1.input },
2268
+ borderWidth: { selector: selectors$1.input },
2269
+ borderStyle: { selector: selectors$1.input },
2270
+ borderColor: { selector: selectors$1.input },
2271
+ borderRadius: { selector: selectors$1.input },
2272
+ outline: { selector: selectors$1.input },
2273
+ outlineOffset: { selector: selectors$1.input }
2158
2274
  }
2159
2275
  }),
2160
2276
  draggableMixin,
@@ -2166,7 +2282,7 @@ const TextArea = compose(
2166
2282
  wrappedEleName: 'vaadin-text-area',
2167
2283
  style: () => overrides,
2168
2284
  excludeAttrsSync: ['tabindex'],
2169
- componentName
2285
+ componentName: componentName$1
2170
2286
  })
2171
2287
  );
2172
2288
 
@@ -2192,7 +2308,7 @@ overrides = `
2192
2308
  }
2193
2309
  `;
2194
2310
 
2195
- customElements.define(componentName, TextArea);
2311
+ customElements.define(componentName$1, TextArea);
2196
2312
 
2197
2313
  const getVarName = (path) => getCssVarName(DESCOPE_PREFIX, ...path);
2198
2314
 
@@ -2238,9 +2354,9 @@ const componentsThemeToStyleObj = (componentsTheme) =>
2238
2354
  // this allows us to generate those themes under different sections
2239
2355
  // if the theme has root level attribute that starts with #
2240
2356
  // we are generating a new theme
2241
- let themeName = 'theme';
2357
+ let themeName = BASE_THEME_SECTION;
2242
2358
 
2243
- if (restPath[0] && restPath[0].startsWith('#')) {
2359
+ if (restPath[0] && restPath[0].startsWith(PORTAL_THEME_PREFIX)) {
2244
2360
  themeName = restPath.shift();
2245
2361
  }
2246
2362
 
@@ -2466,7 +2582,7 @@ var globals = {
2466
2582
  };
2467
2583
 
2468
2584
  const globalRefs$7 = getThemeRefs(globals);
2469
- const vars$c = Button.cssVarList;
2585
+ const vars$d = Button.cssVarList;
2470
2586
 
2471
2587
  const mode = {
2472
2588
  primary: globalRefs$7.colors.primary,
@@ -2476,83 +2592,83 @@ const mode = {
2476
2592
  surface: globalRefs$7.colors.surface
2477
2593
  };
2478
2594
 
2479
- const [helperTheme$2, helperRefs$2] = createHelperVars({ mode }, componentName$h);
2595
+ const [helperTheme$2, helperRefs$2] = createHelperVars({ mode }, componentName$i);
2480
2596
 
2481
2597
  const button = {
2482
2598
  ...helperTheme$2,
2483
- [vars$c.width]: 'fit-content',
2599
+ [vars$d.width]: 'fit-content',
2484
2600
  size: {
2485
2601
  xs: {
2486
- [vars$c.height]: '10px',
2487
- [vars$c.fontSize]: '10px',
2488
- [vars$c.padding]: `0 ${globalRefs$7.spacing.xs}`
2602
+ [vars$d.height]: '10px',
2603
+ [vars$d.fontSize]: '10px',
2604
+ [vars$d.padding]: `0 ${globalRefs$7.spacing.xs}`
2489
2605
  },
2490
2606
  sm: {
2491
- [vars$c.height]: '20px',
2492
- [vars$c.fontSize]: '10px',
2493
- [vars$c.padding]: `0 ${globalRefs$7.spacing.sm}`
2607
+ [vars$d.height]: '20px',
2608
+ [vars$d.fontSize]: '10px',
2609
+ [vars$d.padding]: `0 ${globalRefs$7.spacing.sm}`
2494
2610
  },
2495
2611
  md: {
2496
- [vars$c.height]: '30px',
2497
- [vars$c.fontSize]: '14px',
2498
- [vars$c.padding]: `0 ${globalRefs$7.spacing.md}`
2612
+ [vars$d.height]: '30px',
2613
+ [vars$d.fontSize]: '14px',
2614
+ [vars$d.padding]: `0 ${globalRefs$7.spacing.md}`
2499
2615
  },
2500
2616
  lg: {
2501
- [vars$c.height]: '40px',
2502
- [vars$c.fontSize]: '20px',
2503
- [vars$c.padding]: `0 ${globalRefs$7.spacing.lg}`
2617
+ [vars$d.height]: '40px',
2618
+ [vars$d.fontSize]: '20px',
2619
+ [vars$d.padding]: `0 ${globalRefs$7.spacing.lg}`
2504
2620
  },
2505
2621
  xl: {
2506
- [vars$c.height]: '50px',
2507
- [vars$c.fontSize]: '25px',
2508
- [vars$c.padding]: `0 ${globalRefs$7.spacing.xl}`
2622
+ [vars$d.height]: '50px',
2623
+ [vars$d.fontSize]: '25px',
2624
+ [vars$d.padding]: `0 ${globalRefs$7.spacing.xl}`
2509
2625
  }
2510
2626
  },
2511
2627
 
2512
- [vars$c.borderRadius]: globalRefs$7.radius.lg,
2513
- [vars$c.cursor]: 'pointer',
2514
- [vars$c.borderWidth]: '2px',
2515
- [vars$c.borderStyle]: 'solid',
2516
- [vars$c.borderColor]: 'transparent',
2628
+ [vars$d.borderRadius]: globalRefs$7.radius.lg,
2629
+ [vars$d.cursor]: 'pointer',
2630
+ [vars$d.borderWidth]: '2px',
2631
+ [vars$d.borderStyle]: 'solid',
2632
+ [vars$d.borderColor]: 'transparent',
2517
2633
 
2518
2634
  _fullWidth: {
2519
- [vars$c.width]: '100%'
2635
+ [vars$d.width]: '100%'
2520
2636
  },
2521
2637
  _loading: {
2522
- [vars$c.cursor]: 'wait'
2638
+ [vars$d.cursor]: 'wait'
2523
2639
  },
2524
2640
 
2525
2641
  variant: {
2526
2642
  contained: {
2527
- [vars$c.color]: helperRefs$2.contrast,
2528
- [vars$c.backgroundColor]: helperRefs$2.main,
2643
+ [vars$d.color]: helperRefs$2.contrast,
2644
+ [vars$d.backgroundColor]: helperRefs$2.main,
2529
2645
  _hover: {
2530
- [vars$c.backgroundColor]: helperRefs$2.dark
2646
+ [vars$d.backgroundColor]: helperRefs$2.dark
2531
2647
  },
2532
2648
  _loading: {
2533
- [vars$c.backgroundColor]: helperRefs$2.main
2649
+ [vars$d.backgroundColor]: helperRefs$2.main
2534
2650
  }
2535
2651
  },
2536
2652
  outline: {
2537
- [vars$c.color]: helperRefs$2.main,
2538
- [vars$c.borderColor]: helperRefs$2.main,
2653
+ [vars$d.color]: helperRefs$2.main,
2654
+ [vars$d.borderColor]: helperRefs$2.main,
2539
2655
  _hover: {
2540
- [vars$c.color]: helperRefs$2.dark,
2541
- [vars$c.borderColor]: helperRefs$2.dark,
2656
+ [vars$d.color]: helperRefs$2.dark,
2657
+ [vars$d.borderColor]: helperRefs$2.dark,
2542
2658
  _error: {
2543
- [vars$c.color]: helperRefs$2.error
2659
+ [vars$d.color]: helperRefs$2.error
2544
2660
  }
2545
2661
  }
2546
2662
  },
2547
2663
  link: {
2548
- [vars$c.color]: helperRefs$2.main,
2549
- [vars$c.padding]: 0,
2550
- [vars$c.margin]: 0,
2551
- [vars$c.lineHeight]: helperRefs$2.height,
2552
- [vars$c.borderRadius]: 0,
2664
+ [vars$d.color]: helperRefs$2.main,
2665
+ [vars$d.padding]: 0,
2666
+ [vars$d.margin]: 0,
2667
+ [vars$d.lineHeight]: helperRefs$2.height,
2668
+ [vars$d.borderRadius]: 0,
2553
2669
  _hover: {
2554
- [vars$c.color]: helperRefs$2.main,
2555
- [vars$c.textDecoration]: 'underline'
2670
+ [vars$d.color]: helperRefs$2.main,
2671
+ [vars$d.textDecoration]: 'underline'
2556
2672
  }
2557
2673
  }
2558
2674
  }
@@ -2560,7 +2676,7 @@ const button = {
2560
2676
 
2561
2677
  const globalRefs$6 = getThemeRefs(globals);
2562
2678
 
2563
- const vars$b = TextField.cssVarList;
2679
+ const vars$c = TextField.cssVarList;
2564
2680
 
2565
2681
  const textField = (vars) => ({
2566
2682
  size: {
@@ -2626,13 +2742,13 @@ const textField = (vars) => ({
2626
2742
  }
2627
2743
  });
2628
2744
 
2629
- var textField$1 = textField(vars$b);
2745
+ var textField$1 = textField(vars$c);
2630
2746
 
2631
- const vars$a = PasswordField.cssVarList;
2747
+ const vars$b = PasswordField.cssVarList;
2632
2748
 
2633
2749
  const passwordField = {
2634
- ...textField(vars$a),
2635
- [vars$a.revealCursor]: 'pointer'
2750
+ ...textField(vars$b),
2751
+ [vars$b.revealCursor]: 'pointer'
2636
2752
  };
2637
2753
 
2638
2754
  const numberField = {
@@ -2644,57 +2760,57 @@ const emailField = {
2644
2760
  };
2645
2761
 
2646
2762
  const globalRefs$5 = getThemeRefs(globals);
2647
- const vars$9 = TextArea.cssVarList;
2763
+ const vars$a = TextArea.cssVarList;
2648
2764
 
2649
2765
  const textArea = {
2650
- [vars$9.width]: '100%',
2651
- [vars$9.color]: globalRefs$5.colors.primary.main,
2652
- [vars$9.backgroundColor]: globalRefs$5.colors.surface.light,
2653
- [vars$9.resize]: 'vertical',
2766
+ [vars$a.width]: '100%',
2767
+ [vars$a.color]: globalRefs$5.colors.primary.main,
2768
+ [vars$a.backgroundColor]: globalRefs$5.colors.surface.light,
2769
+ [vars$a.resize]: 'vertical',
2654
2770
 
2655
- [vars$9.borderRadius]: globalRefs$5.radius.sm,
2656
- [vars$9.borderWidth]: '1px',
2657
- [vars$9.borderStyle]: 'solid',
2658
- [vars$9.borderColor]: 'transparent',
2771
+ [vars$a.borderRadius]: globalRefs$5.radius.sm,
2772
+ [vars$a.borderWidth]: '1px',
2773
+ [vars$a.borderStyle]: 'solid',
2774
+ [vars$a.borderColor]: 'transparent',
2659
2775
 
2660
2776
  _bordered: {
2661
- [vars$9.borderColor]: globalRefs$5.colors.surface.main
2777
+ [vars$a.borderColor]: globalRefs$5.colors.surface.main
2662
2778
  },
2663
2779
 
2664
2780
  _focused: {
2665
- [vars$9.outline]: `2px solid ${globalRefs$5.colors.surface.main}`
2781
+ [vars$a.outline]: `2px solid ${globalRefs$5.colors.surface.main}`
2666
2782
  },
2667
2783
 
2668
2784
  _fullWidth: {
2669
- [vars$9.width]: '100%'
2785
+ [vars$a.width]: '100%'
2670
2786
  },
2671
2787
 
2672
2788
  _disabled: {
2673
- [vars$9.cursor]: 'not-allowed'
2789
+ [vars$a.cursor]: 'not-allowed'
2674
2790
  },
2675
2791
 
2676
2792
  _invalid: {
2677
- [vars$9.outline]: `2px solid ${globalRefs$5.colors.error.main}`
2793
+ [vars$a.outline]: `2px solid ${globalRefs$5.colors.error.main}`
2678
2794
  }
2679
2795
  };
2680
2796
 
2681
- const vars$8 = Checkbox.cssVarList;
2797
+ const vars$9 = Checkbox.cssVarList;
2682
2798
 
2683
2799
  const checkbox = {
2684
- [vars$8.cursor]: 'pointer',
2685
- [vars$8.width]: 'fit-content'
2800
+ [vars$9.cursor]: 'pointer',
2801
+ [vars$9.width]: 'fit-content'
2686
2802
  };
2687
2803
 
2688
- const vars$7 = SwitchToggle.cssVarList;
2804
+ const vars$8 = SwitchToggle.cssVarList;
2689
2805
 
2690
2806
  const swtichToggle = {
2691
- [vars$7.width]: '70px',
2692
- [vars$7.cursor]: [{}, { selector: '> label' }]
2807
+ [vars$8.width]: '70px',
2808
+ [vars$8.cursor]: [{}, { selector: '> label' }]
2693
2809
  };
2694
2810
 
2695
2811
  const globalRefs$4 = getThemeRefs(globals);
2696
2812
 
2697
- const vars$6 = Container.cssVarList;
2813
+ const vars$7 = Container.cssVarList;
2698
2814
 
2699
2815
  const verticalAlignment = {
2700
2816
  start: { verticalAlignment: 'start' },
@@ -2717,31 +2833,31 @@ const [helperTheme$1, helperRefs$1, helperVars] =
2717
2833
 
2718
2834
  const container = {
2719
2835
  ...helperTheme$1,
2720
- [vars$6.width]: '100%',
2836
+ [vars$7.width]: '100%',
2721
2837
  verticalPadding: {
2722
- sm: { [vars$6.verticalPadding]: '5px' },
2723
- md: { [vars$6.verticalPadding]: '10px' },
2724
- lg: { [vars$6.verticalPadding]: '20px' },
2838
+ sm: { [vars$7.verticalPadding]: '5px' },
2839
+ md: { [vars$7.verticalPadding]: '10px' },
2840
+ lg: { [vars$7.verticalPadding]: '20px' },
2725
2841
  },
2726
2842
  horizontalPadding: {
2727
- sm: { [vars$6.horizontalPadding]: '5px' },
2728
- md: { [vars$6.horizontalPadding]: '10px' },
2729
- lg: { [vars$6.horizontalPadding]: '20px' },
2843
+ sm: { [vars$7.horizontalPadding]: '5px' },
2844
+ md: { [vars$7.horizontalPadding]: '10px' },
2845
+ lg: { [vars$7.horizontalPadding]: '20px' },
2730
2846
  },
2731
2847
  direction: {
2732
2848
  row: {
2733
- [vars$6.flexDirection]: 'row',
2734
- [vars$6.alignItems]: helperRefs$1.verticalAlignment,
2735
- [vars$6.justifyContent]: helperRefs$1.horizontalAlignment,
2849
+ [vars$7.flexDirection]: 'row',
2850
+ [vars$7.alignItems]: helperRefs$1.verticalAlignment,
2851
+ [vars$7.justifyContent]: helperRefs$1.horizontalAlignment,
2736
2852
  horizontalAlignment: {
2737
2853
  spaceBetween: { [helperVars.horizontalAlignment]: 'space-between' },
2738
2854
  }
2739
2855
  },
2740
2856
 
2741
2857
  column: {
2742
- [vars$6.flexDirection]: 'column',
2743
- [vars$6.alignItems]: helperRefs$1.horizontalAlignment,
2744
- [vars$6.justifyContent]: helperRefs$1.verticalAlignment,
2858
+ [vars$7.flexDirection]: 'column',
2859
+ [vars$7.alignItems]: helperRefs$1.horizontalAlignment,
2860
+ [vars$7.justifyContent]: helperRefs$1.verticalAlignment,
2745
2861
  verticalAlignment: {
2746
2862
  spaceBetween: { [helperVars.verticalAlignment]: 'space-between' }
2747
2863
  }
@@ -2750,214 +2866,214 @@ const container = {
2750
2866
 
2751
2867
  spaceBetween: {
2752
2868
  sm: {
2753
- [vars$6.gap]: '10px'
2869
+ [vars$7.gap]: '10px'
2754
2870
  },
2755
2871
  md: {
2756
- [vars$6.gap]: '20px'
2872
+ [vars$7.gap]: '20px'
2757
2873
  },
2758
2874
  lg: {
2759
- [vars$6.gap]: '30px'
2875
+ [vars$7.gap]: '30px'
2760
2876
  }
2761
2877
  },
2762
2878
 
2763
2879
  shadow: {
2764
2880
  sm: {
2765
- [vars$6.boxShadow]: `${globalRefs$4.shadow.wide.sm} ${helperRefs$1.shadowColor}, ${globalRefs$4.shadow.narrow.sm} ${helperRefs$1.shadowColor}`
2881
+ [vars$7.boxShadow]: `${globalRefs$4.shadow.wide.sm} ${helperRefs$1.shadowColor}, ${globalRefs$4.shadow.narrow.sm} ${helperRefs$1.shadowColor}`
2766
2882
  },
2767
2883
  md: {
2768
- [vars$6.boxShadow]: `${globalRefs$4.shadow.wide.md} ${helperRefs$1.shadowColor}, ${globalRefs$4.shadow.narrow.md} ${helperRefs$1.shadowColor}`
2884
+ [vars$7.boxShadow]: `${globalRefs$4.shadow.wide.md} ${helperRefs$1.shadowColor}, ${globalRefs$4.shadow.narrow.md} ${helperRefs$1.shadowColor}`
2769
2885
  },
2770
2886
  lg: {
2771
- [vars$6.boxShadow]: `${globalRefs$4.shadow.wide.lg} ${helperRefs$1.shadowColor}, ${globalRefs$4.shadow.narrow.lg} ${helperRefs$1.shadowColor}`
2887
+ [vars$7.boxShadow]: `${globalRefs$4.shadow.wide.lg} ${helperRefs$1.shadowColor}, ${globalRefs$4.shadow.narrow.lg} ${helperRefs$1.shadowColor}`
2772
2888
  },
2773
2889
  xl: {
2774
- [vars$6.boxShadow]: `${globalRefs$4.shadow.wide.xl} ${helperRefs$1.shadowColor}, ${globalRefs$4.shadow.narrow.xl} ${helperRefs$1.shadowColor}`
2890
+ [vars$7.boxShadow]: `${globalRefs$4.shadow.wide.xl} ${helperRefs$1.shadowColor}, ${globalRefs$4.shadow.narrow.xl} ${helperRefs$1.shadowColor}`
2775
2891
  },
2776
2892
  '2xl': {
2777
2893
  [helperVars.shadowColor]: '#00000050',
2778
- [vars$6.boxShadow]: `${globalRefs$4.shadow.wide['2xl']} ${helperRefs$1.shadowColor}`
2894
+ [vars$7.boxShadow]: `${globalRefs$4.shadow.wide['2xl']} ${helperRefs$1.shadowColor}`
2779
2895
  },
2780
2896
  },
2781
2897
 
2782
2898
  borderRadius: {
2783
2899
  sm: {
2784
- [vars$6.borderRadius]: globalRefs$4.radius.sm
2900
+ [vars$7.borderRadius]: globalRefs$4.radius.sm
2785
2901
  },
2786
2902
  md: {
2787
- [vars$6.borderRadius]: globalRefs$4.radius.md
2903
+ [vars$7.borderRadius]: globalRefs$4.radius.md
2788
2904
  },
2789
2905
  lg: {
2790
- [vars$6.borderRadius]: globalRefs$4.radius.lg
2906
+ [vars$7.borderRadius]: globalRefs$4.radius.lg
2791
2907
  },
2792
2908
  }
2793
2909
  };
2794
2910
 
2795
- const vars$5 = Logo.cssVarList;
2911
+ const vars$6 = Logo.cssVarList;
2796
2912
 
2797
2913
  const logo = {
2798
- [vars$5.fallbackUrl]: 'url(https://content.app.descope.com/assets/flows/noLogoPlaceholder.svg)'
2914
+ [vars$6.fallbackUrl]: 'url(https://content.app.descope.com/assets/flows/noLogoPlaceholder.svg)'
2799
2915
  };
2800
2916
 
2801
2917
  const globalRefs$3 = getThemeRefs(globals);
2802
2918
 
2803
- const vars$4 = Text.cssVarList;
2919
+ const vars$5 = Text.cssVarList;
2804
2920
 
2805
2921
  const text = {
2806
- [vars$4.lineHeight]: '1em',
2807
- [vars$4.display]: 'inline-block',
2808
- [vars$4.textAlign]: 'left',
2809
- [vars$4.color]: globalRefs$3.colors.surface.dark,
2922
+ [vars$5.lineHeight]: '1em',
2923
+ [vars$5.display]: 'inline-block',
2924
+ [vars$5.textAlign]: 'left',
2925
+ [vars$5.color]: globalRefs$3.colors.surface.dark,
2810
2926
  variant: {
2811
2927
  h1: {
2812
- [vars$4.fontSize]: globalRefs$3.typography.h1.size,
2813
- [vars$4.fontWeight]: globalRefs$3.typography.h1.weight,
2814
- [vars$4.fontFamily]: globalRefs$3.typography.h1.font
2928
+ [vars$5.fontSize]: globalRefs$3.typography.h1.size,
2929
+ [vars$5.fontWeight]: globalRefs$3.typography.h1.weight,
2930
+ [vars$5.fontFamily]: globalRefs$3.typography.h1.font
2815
2931
  },
2816
2932
  h2: {
2817
- [vars$4.fontSize]: globalRefs$3.typography.h2.size,
2818
- [vars$4.fontWeight]: globalRefs$3.typography.h2.weight,
2819
- [vars$4.fontFamily]: globalRefs$3.typography.h2.font
2933
+ [vars$5.fontSize]: globalRefs$3.typography.h2.size,
2934
+ [vars$5.fontWeight]: globalRefs$3.typography.h2.weight,
2935
+ [vars$5.fontFamily]: globalRefs$3.typography.h2.font
2820
2936
  },
2821
2937
  h3: {
2822
- [vars$4.fontSize]: globalRefs$3.typography.h3.size,
2823
- [vars$4.fontWeight]: globalRefs$3.typography.h3.weight,
2824
- [vars$4.fontFamily]: globalRefs$3.typography.h3.font
2938
+ [vars$5.fontSize]: globalRefs$3.typography.h3.size,
2939
+ [vars$5.fontWeight]: globalRefs$3.typography.h3.weight,
2940
+ [vars$5.fontFamily]: globalRefs$3.typography.h3.font
2825
2941
  },
2826
2942
  subtitle1: {
2827
- [vars$4.fontSize]: globalRefs$3.typography.subtitle1.size,
2828
- [vars$4.fontWeight]: globalRefs$3.typography.subtitle1.weight,
2829
- [vars$4.fontFamily]: globalRefs$3.typography.subtitle1.font
2943
+ [vars$5.fontSize]: globalRefs$3.typography.subtitle1.size,
2944
+ [vars$5.fontWeight]: globalRefs$3.typography.subtitle1.weight,
2945
+ [vars$5.fontFamily]: globalRefs$3.typography.subtitle1.font
2830
2946
  },
2831
2947
  subtitle2: {
2832
- [vars$4.fontSize]: globalRefs$3.typography.subtitle2.size,
2833
- [vars$4.fontWeight]: globalRefs$3.typography.subtitle2.weight,
2834
- [vars$4.fontFamily]: globalRefs$3.typography.subtitle2.font
2948
+ [vars$5.fontSize]: globalRefs$3.typography.subtitle2.size,
2949
+ [vars$5.fontWeight]: globalRefs$3.typography.subtitle2.weight,
2950
+ [vars$5.fontFamily]: globalRefs$3.typography.subtitle2.font
2835
2951
  },
2836
2952
  body1: {
2837
- [vars$4.fontSize]: globalRefs$3.typography.body1.size,
2838
- [vars$4.fontWeight]: globalRefs$3.typography.body1.weight,
2839
- [vars$4.fontFamily]: globalRefs$3.typography.body1.font
2953
+ [vars$5.fontSize]: globalRefs$3.typography.body1.size,
2954
+ [vars$5.fontWeight]: globalRefs$3.typography.body1.weight,
2955
+ [vars$5.fontFamily]: globalRefs$3.typography.body1.font
2840
2956
  },
2841
2957
  body2: {
2842
- [vars$4.fontSize]: globalRefs$3.typography.body2.size,
2843
- [vars$4.fontWeight]: globalRefs$3.typography.body2.weight,
2844
- [vars$4.fontFamily]: globalRefs$3.typography.body2.font
2958
+ [vars$5.fontSize]: globalRefs$3.typography.body2.size,
2959
+ [vars$5.fontWeight]: globalRefs$3.typography.body2.weight,
2960
+ [vars$5.fontFamily]: globalRefs$3.typography.body2.font
2845
2961
  }
2846
2962
  },
2847
2963
  mode: {
2848
2964
  primary: {
2849
- [vars$4.color]: globalRefs$3.colors.primary.main
2965
+ [vars$5.color]: globalRefs$3.colors.primary.main
2850
2966
  },
2851
2967
  secondary: {
2852
- [vars$4.color]: globalRefs$3.colors.secondary.main
2968
+ [vars$5.color]: globalRefs$3.colors.secondary.main
2853
2969
  },
2854
2970
  error: {
2855
- [vars$4.color]: globalRefs$3.colors.error.main
2971
+ [vars$5.color]: globalRefs$3.colors.error.main
2856
2972
  },
2857
2973
  success: {
2858
- [vars$4.color]: globalRefs$3.colors.success.main
2974
+ [vars$5.color]: globalRefs$3.colors.success.main
2859
2975
  }
2860
2976
  },
2861
2977
  textAlign: {
2862
- right: { [vars$4.textAlign]: 'right' },
2863
- left: { [vars$4.textAlign]: 'left' },
2864
- center: { [vars$4.textAlign]: 'center' }
2978
+ right: { [vars$5.textAlign]: 'right' },
2979
+ left: { [vars$5.textAlign]: 'left' },
2980
+ center: { [vars$5.textAlign]: 'center' }
2865
2981
  },
2866
2982
  _fullWidth: {
2867
- [vars$4.width]: '100%',
2868
- [vars$4.display]: 'block'
2983
+ [vars$5.width]: '100%',
2984
+ [vars$5.display]: 'block'
2869
2985
  },
2870
2986
  _italic: {
2871
- [vars$4.fontStyle]: 'italic'
2987
+ [vars$5.fontStyle]: 'italic'
2872
2988
  },
2873
2989
  _uppercase: {
2874
- [vars$4.textTransform]: 'uppercase'
2990
+ [vars$5.textTransform]: 'uppercase'
2875
2991
  },
2876
2992
  _lowercase: {
2877
- [vars$4.textTransform]: 'lowercase'
2993
+ [vars$5.textTransform]: 'lowercase'
2878
2994
  }
2879
2995
  };
2880
2996
 
2881
2997
  const globalRefs$2 = getThemeRefs(globals);
2882
- const vars$3 = Link.cssVarList;
2998
+ const vars$4 = Link.cssVarList;
2883
2999
 
2884
3000
  const link = {
2885
- [vars$3.cursor]: 'pointer',
2886
- [vars$3.borderBottomWidth]: '2px',
2887
- [vars$3.borderBottomStyle]: 'solid',
2888
- [vars$3.borderBottomColor]: 'transparent',
2889
- [vars$3.color]: globalRefs$2.colors.primary.main,
3001
+ [vars$4.cursor]: 'pointer',
3002
+ [vars$4.borderBottomWidth]: '2px',
3003
+ [vars$4.borderBottomStyle]: 'solid',
3004
+ [vars$4.borderBottomColor]: 'transparent',
3005
+ [vars$4.color]: globalRefs$2.colors.primary.main,
2890
3006
 
2891
3007
  _hover: {
2892
- [vars$3.borderBottomColor]: globalRefs$2.colors.primary.main
3008
+ [vars$4.borderBottomColor]: globalRefs$2.colors.primary.main
2893
3009
  },
2894
3010
 
2895
3011
  textAlign: {
2896
- right: { [vars$3.textAlign]: 'right' },
2897
- left: { [vars$3.textAlign]: 'left' },
2898
- center: { [vars$3.textAlign]: 'center' }
3012
+ right: { [vars$4.textAlign]: 'right' },
3013
+ left: { [vars$4.textAlign]: 'left' },
3014
+ center: { [vars$4.textAlign]: 'center' }
2899
3015
  },
2900
3016
 
2901
3017
  _fullWidth: {
2902
- [vars$3.width]: '100%'
3018
+ [vars$4.width]: '100%'
2903
3019
  },
2904
3020
 
2905
3021
  mode: {
2906
3022
  primary: {
2907
- [vars$3.color]: globalRefs$2.colors.primary.main,
3023
+ [vars$4.color]: globalRefs$2.colors.primary.main,
2908
3024
  _hover: {
2909
- [vars$3.borderBottomColor]: globalRefs$2.colors.primary.main
3025
+ [vars$4.borderBottomColor]: globalRefs$2.colors.primary.main
2910
3026
  }
2911
3027
  },
2912
3028
  secondary: {
2913
- [vars$3.color]: globalRefs$2.colors.secondary.main,
3029
+ [vars$4.color]: globalRefs$2.colors.secondary.main,
2914
3030
  _hover: {
2915
- [vars$3.borderBottomColor]: globalRefs$2.colors.secondary.main
3031
+ [vars$4.borderBottomColor]: globalRefs$2.colors.secondary.main
2916
3032
  }
2917
3033
  },
2918
3034
  error: {
2919
- [vars$3.color]: globalRefs$2.colors.error.main,
3035
+ [vars$4.color]: globalRefs$2.colors.error.main,
2920
3036
  _hover: {
2921
- [vars$3.borderBottomColor]: globalRefs$2.colors.error.main
3037
+ [vars$4.borderBottomColor]: globalRefs$2.colors.error.main
2922
3038
  }
2923
3039
  },
2924
3040
  success: {
2925
- [vars$3.color]: globalRefs$2.colors.success.main,
3041
+ [vars$4.color]: globalRefs$2.colors.success.main,
2926
3042
  _hover: {
2927
- [vars$3.borderBottomColor]: globalRefs$2.colors.success.main
3043
+ [vars$4.borderBottomColor]: globalRefs$2.colors.success.main
2928
3044
  }
2929
3045
  }
2930
3046
  }
2931
3047
  };
2932
3048
 
2933
- const vars$2 = Divider.cssVarList;
3049
+ const vars$3 = Divider.cssVarList;
2934
3050
 
2935
3051
  const thickness = '2px';
2936
3052
  const textPaddingSize = '10px';
2937
- const [helperTheme, helperRefs] = createHelperVars({ thickness, textPaddingSize }, componentName$b);
3053
+ const [helperTheme, helperRefs] = createHelperVars({ thickness, textPaddingSize }, componentName$c);
2938
3054
 
2939
3055
 
2940
3056
  const divider = {
2941
3057
  ...helperTheme,
2942
- [vars$2.alignItems]: 'center',
2943
- [vars$2.dividerHeight]: helperRefs.thickness,
2944
- [vars$2.backgroundColor]: 'currentColor',
2945
- [vars$2.opacity]: '0.2',
2946
- [vars$2.textPadding]: `0 ${helperRefs.textPaddingSize}`,
2947
- [vars$2.width]: '100%',
2948
- [vars$2.flexDirection]: 'row',
2949
- [vars$2.alignSelf]: 'strech',
2950
- [vars$2.textWidth]: 'fit-content',
2951
- [vars$2.maxTextWidth]: 'calc(100% - 100px)',
3058
+ [vars$3.alignItems]: 'center',
3059
+ [vars$3.dividerHeight]: helperRefs.thickness,
3060
+ [vars$3.backgroundColor]: 'currentColor',
3061
+ [vars$3.opacity]: '0.2',
3062
+ [vars$3.textPadding]: `0 ${helperRefs.textPaddingSize}`,
3063
+ [vars$3.width]: '100%',
3064
+ [vars$3.flexDirection]: 'row',
3065
+ [vars$3.alignSelf]: 'strech',
3066
+ [vars$3.textWidth]: 'fit-content',
3067
+ [vars$3.maxTextWidth]: 'calc(100% - 100px)',
2952
3068
  _vertical: {
2953
- [vars$2.padding]: `0 calc(${thickness} * 3)`,
2954
- [vars$2.width]: 'fit-content',
2955
- [vars$2.textPadding]: `${helperRefs.textPaddingSize} 0`,
2956
- [vars$2.flexDirection]: 'column',
2957
- [vars$2.minHeight]: '200px',
2958
- [vars$2.textWidth]: 'fit-content',
2959
- [vars$2.dividerWidth]: helperRefs.thickness,
2960
- [vars$2.maxTextWidth]: '100%',
3069
+ [vars$3.padding]: `0 calc(${thickness} * 3)`,
3070
+ [vars$3.width]: 'fit-content',
3071
+ [vars$3.textPadding]: `${helperRefs.textPaddingSize} 0`,
3072
+ [vars$3.flexDirection]: 'column',
3073
+ [vars$3.minHeight]: '200px',
3074
+ [vars$3.textWidth]: 'fit-content',
3075
+ [vars$3.dividerWidth]: helperRefs.thickness,
3076
+ [vars$3.maxTextWidth]: '100%',
2961
3077
  }
2962
3078
  };
2963
3079
 
@@ -2967,102 +3083,227 @@ const passcode = {
2967
3083
 
2968
3084
  const globalRefs$1 = getThemeRefs(globals);
2969
3085
 
2970
- const vars$1 = LoaderLinear.cssVarList;
3086
+ const vars$2 = LoaderLinear.cssVarList;
2971
3087
 
2972
3088
  const loaderLinear = {
2973
- [vars$1.display]: 'inline-block',
2974
- [vars$1.barColor]: globalRefs$1.colors.surface.contrast,
2975
- [vars$1.barWidth]: '20%',
2976
- [vars$1.surfaceColor]: globalRefs$1.colors.surface.main,
2977
- [vars$1.borderRadius]: '4px',
2978
- [vars$1.animationDuration]: '2s',
2979
- [vars$1.animationTimingFunction]: 'linear',
2980
- [vars$1.animationIterationCount]: 'infinite',
2981
- [vars$1.width]: '100%',
3089
+ [vars$2.display]: 'inline-block',
3090
+ [vars$2.barColor]: globalRefs$1.colors.surface.contrast,
3091
+ [vars$2.barWidth]: '20%',
3092
+ [vars$2.surfaceColor]: globalRefs$1.colors.surface.main,
3093
+ [vars$2.borderRadius]: '4px',
3094
+ [vars$2.animationDuration]: '2s',
3095
+ [vars$2.animationTimingFunction]: 'linear',
3096
+ [vars$2.animationIterationCount]: 'infinite',
3097
+ [vars$2.width]: '100%',
2982
3098
  size: {
2983
3099
  xs: {
2984
- [vars$1.height]: '6px'
3100
+ [vars$2.height]: '6px'
2985
3101
  },
2986
3102
  sm: {
2987
- [vars$1.height]: '8px'
3103
+ [vars$2.height]: '8px'
2988
3104
  },
2989
3105
  md: {
2990
- [vars$1.height]: '10px'
3106
+ [vars$2.height]: '10px'
2991
3107
  },
2992
3108
  lg: {
2993
- [vars$1.height]: '12px'
3109
+ [vars$2.height]: '12px'
2994
3110
  },
2995
3111
  xl: {
2996
- [vars$1.height]: '14px'
3112
+ [vars$2.height]: '14px'
2997
3113
  }
2998
3114
  },
2999
3115
  mode: {
3000
3116
  primary: {
3001
- [vars$1.barColor]: globalRefs$1.colors.primary.main
3117
+ [vars$2.barColor]: globalRefs$1.colors.primary.main
3002
3118
  },
3003
3119
  secondary: {
3004
- [vars$1.barColor]: globalRefs$1.colors.secondary.main
3120
+ [vars$2.barColor]: globalRefs$1.colors.secondary.main
3005
3121
  }
3006
3122
  },
3007
3123
  _hidden: {
3008
- [vars$1.display]: 'none'
3124
+ [vars$2.display]: 'none'
3009
3125
  }
3010
3126
  };
3011
3127
 
3012
3128
  const globalRefs = getThemeRefs(globals);
3013
3129
 
3014
- const vars = LoaderRadial.cssVarList;
3130
+ const vars$1 = LoaderRadial.cssVarList;
3015
3131
 
3016
3132
  const loaderRadial = {
3017
- [vars.display]: 'inline-block',
3018
- [vars.color]: globalRefs.colors.surface.contrast,
3019
- [vars.animationDuration]: '2s',
3020
- [vars.animationTimingFunction]: 'linear',
3021
- [vars.animationIterationCount]: 'infinite',
3022
- [vars.spinnerStyle]: 'solid',
3023
- [vars.spinnerWidth]: '4px',
3024
- [vars.spinnerRadius]: '50%',
3025
- [vars.spinnerTopColor]: 'currentColor',
3026
- [vars.spinnerBottomColor]: 'transparent',
3027
- [vars.spinnerRightColor]: 'currentColor',
3028
- [vars.spinnerLeftColor]: 'transparent',
3133
+ [vars$1.display]: 'inline-block',
3134
+ [vars$1.color]: globalRefs.colors.surface.contrast,
3135
+ [vars$1.animationDuration]: '2s',
3136
+ [vars$1.animationTimingFunction]: 'linear',
3137
+ [vars$1.animationIterationCount]: 'infinite',
3138
+ [vars$1.spinnerStyle]: 'solid',
3139
+ [vars$1.spinnerWidth]: '4px',
3140
+ [vars$1.spinnerRadius]: '50%',
3141
+ [vars$1.spinnerTopColor]: 'currentColor',
3142
+ [vars$1.spinnerBottomColor]: 'transparent',
3143
+ [vars$1.spinnerRightColor]: 'currentColor',
3144
+ [vars$1.spinnerLeftColor]: 'transparent',
3029
3145
  size: {
3030
3146
  xs: {
3031
- [vars.width]: '20px',
3032
- [vars.height]: '20px',
3033
- [vars.spinnerWidth]: '2px'
3147
+ [vars$1.width]: '20px',
3148
+ [vars$1.height]: '20px',
3149
+ [vars$1.spinnerWidth]: '2px'
3034
3150
  },
3035
3151
  sm: {
3036
- [vars.width]: '30px',
3037
- [vars.height]: '30px',
3038
- [vars.spinnerWidth]: '3px'
3152
+ [vars$1.width]: '30px',
3153
+ [vars$1.height]: '30px',
3154
+ [vars$1.spinnerWidth]: '3px'
3039
3155
  },
3040
3156
  md: {
3041
- [vars.width]: '40px',
3042
- [vars.height]: '40px',
3043
- [vars.spinnerWidth]: '4px'
3157
+ [vars$1.width]: '40px',
3158
+ [vars$1.height]: '40px',
3159
+ [vars$1.spinnerWidth]: '4px'
3044
3160
  },
3045
3161
  lg: {
3046
- [vars.width]: '60px',
3047
- [vars.height]: '60px',
3048
- [vars.spinnerWidth]: '5px'
3162
+ [vars$1.width]: '60px',
3163
+ [vars$1.height]: '60px',
3164
+ [vars$1.spinnerWidth]: '5px'
3049
3165
  },
3050
3166
  xl: {
3051
- [vars.width]: '80px',
3052
- [vars.height]: '80px',
3053
- [vars.spinnerWidth]: '6px'
3167
+ [vars$1.width]: '80px',
3168
+ [vars$1.height]: '80px',
3169
+ [vars$1.spinnerWidth]: '6px'
3054
3170
  }
3055
3171
  },
3056
3172
  mode: {
3057
3173
  primary: {
3058
- [vars.color]: globalRefs.colors.primary.main
3174
+ [vars$1.color]: globalRefs.colors.primary.main
3059
3175
  },
3060
3176
  secondary: {
3061
- [vars.color]: globalRefs.colors.secondary.main
3177
+ [vars$1.color]: globalRefs.colors.secondary.main
3062
3178
  }
3063
3179
  },
3064
3180
  _hidden: {
3065
- [vars.display]: 'none'
3181
+ [vars$1.display]: 'none'
3182
+ }
3183
+ };
3184
+
3185
+ const componentName = getComponentName('combo-box');
3186
+
3187
+ const selectors = {
3188
+ input: { selector: '::part(input-field)' },
3189
+ toggle: { selector: '::part(toggle-button)' }
3190
+ };
3191
+
3192
+ const { input, toggle } = selectors;
3193
+
3194
+ const borderRadius = {
3195
+ topRightRadius: {
3196
+ selector: input.selector,
3197
+ property: 'border-top-right-radius'
3198
+ },
3199
+ bottomRightRadius: {
3200
+ selector: input.selector,
3201
+ property: 'border-bottom-right-radius'
3202
+ },
3203
+ topLeftRadius: {
3204
+ selector: input.selector,
3205
+ property: 'border-top-left-radius'
3206
+ },
3207
+ bottomLeftRadius: {
3208
+ selector: input.selector,
3209
+ property: 'border-bottom-left-radius'
3210
+ }
3211
+ };
3212
+
3213
+ const ComboBoxMixin = (superclass) => class ComboBoxMixinClass extends superclass {
3214
+
3215
+ // vaadin api is to set props on their combo box node,
3216
+ // in order to avoid it, we are passing the children of this component
3217
+ // to the items & renderer props, so it will be used as the combo box items
3218
+ #onChildrenChange() {
3219
+ const baseElement = this.shadowRoot.querySelector(this.baseSelector);
3220
+ const items = Array.from(this.children);
3221
+
3222
+ // we want the data-name attribute to be accessible as an object attribute
3223
+ baseElement.items = items.map((node) =>
3224
+ Object.defineProperty(node, 'data-name', {
3225
+ value: node.getAttribute('data-name')
3226
+ })
3227
+ );
3228
+
3229
+ baseElement.renderer = (root, combo, model) => {
3230
+ root.innerHTML = items[model.index].outerHTML;
3231
+ };
3232
+ }
3233
+
3234
+ connectedCallback() {
3235
+ super.connectedCallback?.();
3236
+
3237
+ observeChildren(this, this.#onChildrenChange.bind(this));
3238
+ }
3239
+ };
3240
+
3241
+ const ComboBox = compose(
3242
+ createStyleMixin({
3243
+ mappings: {
3244
+ ...borderRadius,
3245
+ backgroundColor: input,
3246
+ width: input,
3247
+ color: input,
3248
+ padding: input,
3249
+ borderColor: input,
3250
+ borderStyle: input,
3251
+ borderWidth: input,
3252
+ cursor: toggle,
3253
+ height: input,
3254
+ }
3255
+ }),
3256
+ draggableMixin,
3257
+ portalMixin({
3258
+ name: 'overlay',
3259
+ selector: 'vaadin-combo-box-scroller',
3260
+ mappings: {
3261
+ border: { selector: () => '::slotted(*)' },
3262
+ backgroundColor: {},
3263
+ }
3264
+ }),
3265
+ proxyInputMixin,
3266
+ componentNameValidationMixin,
3267
+ ComboBoxMixin
3268
+ )(
3269
+ createProxy({
3270
+ slots: ['prefix'],
3271
+ wrappedEleName: 'vaadin-combo-box',
3272
+ style: () => `
3273
+ :host {
3274
+ -webkit-mask-image: none;
3275
+ }
3276
+ `,
3277
+ excludeAttrsSync: ['tabindex'],
3278
+ includeAttrsSync: [],
3279
+ componentName,
3280
+ includeForwardProps: ['items', 'renderer']
3281
+ })
3282
+ );
3283
+
3284
+ getThemeRefs(globals);
3285
+
3286
+ const vars = ComboBox.cssVarList;
3287
+
3288
+ const comboBox = {
3289
+ ...textField(ComboBox.cssVarList),
3290
+ size: {
3291
+ xs: {
3292
+ [vars.width]: '30px'
3293
+ }
3294
+ },
3295
+ [vars.borderColor]: 'green',
3296
+ [vars.borderWidth]: '0',
3297
+ [vars.cursor]: 'pointer',
3298
+ [vars.padding]: '0',
3299
+
3300
+ '@overlay': {
3301
+ [vars.overlayBackgroundColor] : 'red',
3302
+ [vars.overlayBorder]: '3px solid blue',
3303
+
3304
+ _hover: {
3305
+ [vars.overlayBackgroundColor] : 'blue',
3306
+ }
3066
3307
  }
3067
3308
  };
3068
3309
 
@@ -3082,7 +3323,8 @@ var components = {
3082
3323
  divider,
3083
3324
  passcode,
3084
3325
  loaderRadial,
3085
- loaderLinear
3326
+ loaderLinear,
3327
+ comboBox
3086
3328
  };
3087
3329
 
3088
3330
  var index = { globals, components };