@descope/web-components-ui 1.0.65 → 1.0.67

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) 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 +663 -433
  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/constants.js +3 -1
  40. package/src/helpers/componentHelpers.js +55 -36
  41. package/src/helpers/index.js +2 -1
  42. package/src/helpers/themeHelpers/index.js +3 -3
  43. package/src/mixins/createStyleMixin/index.js +117 -91
  44. package/src/mixins/index.js +1 -0
  45. package/src/mixins/inputMixin.js +2 -3
  46. package/src/mixins/portalMixin.js +62 -0
  47. package/src/theme/components/comboBox.js +32 -0
  48. package/src/theme/components/index.js +3 -1
  49. package/dist/umd/54.js +0 -971
  50. package/dist/umd/666.js +0 -37
  51. /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, {
249
- ...mappings,
250
- });
251
- }
252
260
 
253
- #overrideStyleEle = null;
254
- #themeStyleEle = null;
255
- #disconnectThemeManager
261
+ const createStyleMixin =
262
+ ({ mappings = {} }) => (superclass) =>
263
+ class CustomStyleMixinClass extends superclass {
264
+ static get cssVarList() {
265
+ return {
266
+ ...superclass.cssVarList,
267
+ ...createCssVarsList(superclass.componentName, {
268
+ ...mappings,
269
+ })
270
+ };
271
+ }
256
272
 
257
- constructor() {
258
- super();
259
- }
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
+ }
260
301
 
261
- get componentTheme() {
262
- return componentsThemeManager.currentTheme?.[superclass.componentName] || ''
263
- }
302
+ get componentTheme() {
303
+ return componentsThemeManager.currentTheme?.[superclass.componentName] || ''
304
+ }
264
305
 
265
- onComponentThemeChange() {
266
- this.#themeStyleEle.innerHTML = this.componentTheme.theme;
267
- }
306
+ #onComponentThemeChange() {
307
+ this.#themeStyleEle.innerHTML = this.componentTheme[this.#themeSection];
308
+ }
268
309
 
269
- #createComponentTheme() {
270
- this.#themeStyleEle = document.createElement('style');
271
- this.#themeStyleEle.id = 'style-mixin-component-theme';
272
- this.shadowRoot.prepend(this.#themeStyleEle);
273
- this.#disconnectThemeManager = componentsThemeManager.onCurrentThemeChange(this.onComponentThemeChange.bind(this));
274
- this.onComponentThemeChange();
275
- }
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
+ }
276
317
 
277
- #createAttrOverrideStyle() {
278
- this.#overrideStyleEle = document.createElement('style');
279
- this.#overrideStyleEle.id = 'style-mixin-overrides';
318
+ #createAttrOverrideStyle() {
319
+ this.#overrideStyleEle = document.createElement('style');
320
+ this.#overrideStyleEle.id = 'style-mixin-overrides';
280
321
 
281
- const classSpecifier = createClassSelectorSpecifier(superclass.componentName, CSS_SELECTOR_SPECIFIER_MULTIPLY);
282
- this.#overrideStyleEle.innerText = `:host(${classSpecifier}) {}`;
283
- this.shadowRoot.append(this.#overrideStyleEle);
284
- }
322
+ const classSpecifier = createClassSelectorSpecifier(superclass.componentName, CSS_SELECTOR_SPECIFIER_MULTIPLY);
285
323
 
286
- #updateAttrOverrideStyle(attrName, value) {
287
- const style = this.#overrideStyleEle?.sheet?.cssRules[0].style;
288
- const varName = getCssVarName(
289
- superclass.componentName,
290
- attrName.replace(/^st-/, '')
291
- );
324
+ this.#overrideStyleEle.innerText = `:host(${classSpecifier}) {}`;
325
+ this.#rootElement.append(this.#overrideStyleEle);
326
+ }
292
327
 
293
- if (value) style?.setProperty(varName, value);
294
- else style?.removeProperty(varName);
295
- }
328
+ #setAttrOverrideStyle(attrName, value) {
329
+ const style = this.#overrideStyleEle?.sheet?.cssRules[0].style;
330
+ if (!style) return;
296
331
 
297
- #createComponentStyle() {
298
- const themeStyle = document.createElement('style');
299
- themeStyle.id = 'style-mixin-component';
300
- themeStyle.innerHTML = createStyle(
301
- superclass.componentName,
302
- this.baseSelector,
303
- mappings
304
- );
305
- this.shadowRoot.prepend(themeStyle);
306
- }
332
+ const varName = getCssVarName(
333
+ superclass.componentName,
334
+ attrName.replace(new RegExp(`^${STYLE_OVERRIDE_ATTR_PREFIX}-`), '')
335
+ );
307
336
 
308
- attributeChangedCallback(attrName, oldValue, newValue) {
309
- super.attributeChangedCallback?.(attrName, oldValue, newValue);
337
+ if (value) style?.setProperty(varName, value);
338
+ else style?.removeProperty(varName);
339
+ }
310
340
 
311
- if (styleAttributes.includes(attrName)) {
312
- this.#updateAttrOverrideStyle(attrName, newValue);
341
+ #updateOverrideStyle(attrs = []) {
342
+ for (const attr of attrs) {
343
+ if (this.#styleAttributes.includes(attr)) {
344
+ this.#setAttrOverrideStyle(attr, this.getAttribute(attr));
313
345
  }
314
346
  }
315
347
 
316
- connectedCallback() {
317
- super.connectedCallback?.();
318
- if (this.shadowRoot.isConnected) {
319
- this.classList.add(superclass.componentName);
348
+ // we are rewriting the style back to the style tag
349
+ this.#overrideStyleEle.innerHTML = this.#overrideStyleEle?.sheet?.cssRules[0].cssText;
350
+ }
320
351
 
321
- this.#createComponentStyle();
322
- this.#createComponentTheme();
323
- this.#createAttrOverrideStyle();
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
+ }
324
362
 
325
- Array.from(this.attributes).forEach((attr) => {
326
- if (styleAttributes.includes(attr.nodeName)) {
327
- this.#updateAttrOverrideStyle(attr.nodeName, attr.value);
328
- }
329
- });
330
- }
331
- }
363
+ #addClassName(className) {
364
+ (this.#rootElement.classList || this.#rootElement.host.classList).add(className);
365
+ }
366
+
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',
@@ -545,7 +592,7 @@ const inputMixin = (superclass) => class InputMixinClass extends superclass {
545
592
  }
546
593
 
547
594
  get isReadOnly() {
548
- return this.getAttribute('readonly') !== 'false'
595
+ return this.hasAttribute('readonly') && this.getAttribute('readonly') !== 'false'
549
596
  }
550
597
 
551
598
  setValidity() {
@@ -832,7 +879,64 @@ const componentNameValidationMixin = (superclass) =>
832
879
  }
833
880
  };
834
881
 
835
- 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');
836
940
 
837
941
  const editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;
838
942
  const resetStyles = `
@@ -886,7 +990,7 @@ const Button = compose(
886
990
  style: () =>
887
991
  `${resetStyles} ${editorOverrides} ${iconStyles} ${loadingIndicatorStyles}`,
888
992
  excludeAttrsSync: ['tabindex'],
889
- componentName: componentName$h
993
+ componentName: componentName$i
890
994
  })
891
995
  );
892
996
 
@@ -923,9 +1027,9 @@ const loadingIndicatorStyles = `
923
1027
  }
924
1028
  `;
925
1029
 
926
- customElements.define(componentName$h, Button);
1030
+ customElements.define(componentName$i, Button);
927
1031
 
928
- const componentName$g = getComponentName('checkbox');
1032
+ const componentName$h = getComponentName('checkbox');
929
1033
 
930
1034
  const Checkbox = compose(
931
1035
  createStyleMixin({
@@ -951,17 +1055,17 @@ const Checkbox = compose(
951
1055
  }
952
1056
  `,
953
1057
  excludeAttrsSync: ['tabindex'],
954
- componentName: componentName$g
1058
+ componentName: componentName$h
955
1059
  })
956
1060
  );
957
1061
 
958
- customElements.define(componentName$g, Checkbox);
1062
+ customElements.define(componentName$h, Checkbox);
959
1063
 
960
- const componentName$f = getComponentName('loader-linear');
1064
+ const componentName$g = getComponentName('loader-linear');
961
1065
 
962
1066
  class RawLoaderLinear extends DescopeBaseClass {
963
1067
  static get componentName() {
964
- return componentName$f;
1068
+ return componentName$g;
965
1069
  }
966
1070
  constructor() {
967
1071
  super();
@@ -997,13 +1101,13 @@ class RawLoaderLinear extends DescopeBaseClass {
997
1101
  }
998
1102
  }
999
1103
 
1000
- const selectors$4 = {
1104
+ const selectors$5 = {
1001
1105
  root: {},
1002
1106
  after: { selector: '::after' },
1003
1107
  host: { selector: () => ':host' }
1004
1108
  };
1005
1109
 
1006
- 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;
1007
1111
 
1008
1112
  const LoaderLinear = compose(
1009
1113
  createStyleMixin({
@@ -1024,13 +1128,13 @@ const LoaderLinear = compose(
1024
1128
  componentNameValidationMixin
1025
1129
  )(RawLoaderLinear);
1026
1130
 
1027
- customElements.define(componentName$f, LoaderLinear);
1131
+ customElements.define(componentName$g, LoaderLinear);
1028
1132
 
1029
- const componentName$e = getComponentName('loader-radial');
1133
+ const componentName$f = getComponentName('loader-radial');
1030
1134
 
1031
1135
  class RawLoaderRadial extends DescopeBaseClass {
1032
1136
  static get componentName() {
1033
- return componentName$e;
1137
+ return componentName$f;
1034
1138
  }
1035
1139
  constructor() {
1036
1140
  super();
@@ -1082,13 +1186,13 @@ const LoaderRadial = compose(
1082
1186
  componentNameValidationMixin
1083
1187
  )(RawLoaderRadial);
1084
1188
 
1085
- customElements.define(componentName$e, LoaderRadial);
1189
+ customElements.define(componentName$f, LoaderRadial);
1086
1190
 
1087
- const componentName$d = getComponentName('container');
1191
+ const componentName$e = getComponentName('container');
1088
1192
 
1089
1193
  class RawContainer extends DescopeBaseClass {
1090
1194
  static get componentName() {
1091
- return componentName$d;
1195
+ return componentName$e;
1092
1196
  }
1093
1197
  constructor() {
1094
1198
  super();
@@ -1150,28 +1254,28 @@ const Container = compose(
1150
1254
  componentNameValidationMixin
1151
1255
  )(RawContainer);
1152
1256
 
1153
- customElements.define(componentName$d, Container);
1257
+ customElements.define(componentName$e, Container);
1154
1258
 
1155
- const componentName$c = getComponentName('date-picker');
1259
+ const componentName$d = getComponentName('date-picker');
1156
1260
 
1157
1261
  const DatePicker = compose(
1158
1262
  draggableMixin,
1159
1263
  componentNameValidationMixin
1160
1264
  )(
1161
1265
  createProxy({
1162
- componentName: componentName$c,
1266
+ componentName: componentName$d,
1163
1267
  slots: ['prefix', 'suffix'],
1164
1268
  wrappedEleName: 'vaadin-date-picker',
1165
1269
  style: ``
1166
1270
  })
1167
1271
  );
1168
1272
 
1169
- customElements.define(componentName$c, DatePicker);
1273
+ customElements.define(componentName$d, DatePicker);
1170
1274
 
1171
- const componentName$b = getComponentName('divider');
1275
+ const componentName$c = getComponentName('divider');
1172
1276
  class RawDivider extends DescopeBaseClass {
1173
1277
  static get componentName() {
1174
- return componentName$b;
1278
+ return componentName$c;
1175
1279
  }
1176
1280
  constructor() {
1177
1281
  super();
@@ -1223,7 +1327,7 @@ class RawDivider extends DescopeBaseClass {
1223
1327
  }
1224
1328
  }
1225
1329
 
1226
- const selectors$3 = {
1330
+ const selectors$4 = {
1227
1331
  root: { selector: '' },
1228
1332
  before: { selector: '::before' },
1229
1333
  after: { selector: '::after' },
@@ -1231,7 +1335,7 @@ const selectors$3 = {
1231
1335
  host: { selector: () => ':host' },
1232
1336
  };
1233
1337
 
1234
- 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;
1235
1339
 
1236
1340
  const Divider = compose(
1237
1341
  createStyleMixin({
@@ -1255,11 +1359,11 @@ const Divider = compose(
1255
1359
  componentNameValidationMixin
1256
1360
  )(RawDivider);
1257
1361
 
1258
- const componentName$a = getComponentName('text');
1362
+ const componentName$b = getComponentName('text');
1259
1363
 
1260
1364
  class RawText extends DescopeBaseClass {
1261
1365
  static get componentName() {
1262
- return componentName$a;
1366
+ return componentName$b;
1263
1367
  }
1264
1368
  constructor() {
1265
1369
  super();
@@ -1307,11 +1411,11 @@ const Text = compose(
1307
1411
  componentNameValidationMixin
1308
1412
  )(RawText);
1309
1413
 
1310
- customElements.define(componentName$a, Text);
1414
+ customElements.define(componentName$b, Text);
1311
1415
 
1312
- customElements.define(componentName$b, Divider);
1416
+ customElements.define(componentName$c, Divider);
1313
1417
 
1314
- const selectors$2 = {
1418
+ const selectors$3 = {
1315
1419
  label: '::part(label)',
1316
1420
  input: '::part(input-field)',
1317
1421
  readOnlyInput: '[readonly]::part(input-field)::after',
@@ -1320,33 +1424,33 @@ const selectors$2 = {
1320
1424
  };
1321
1425
 
1322
1426
  var textFieldMappings = {
1323
- backgroundColor: { selector: selectors$2.input },
1324
- color: { selector: selectors$2.input },
1325
- width: { selector: selectors$2.host },
1427
+ backgroundColor: { selector: selectors$3.input },
1428
+ color: { selector: selectors$3.input },
1429
+ width: { selector: selectors$3.host },
1326
1430
  borderColor: [
1327
- { selector: selectors$2.input },
1328
- { selector: selectors$2.readOnlyInput }
1431
+ { selector: selectors$3.input },
1432
+ { selector: selectors$3.readOnlyInput }
1329
1433
  ],
1330
1434
  borderWidth: [
1331
- { selector: selectors$2.input },
1332
- { selector: selectors$2.readOnlyInput }
1435
+ { selector: selectors$3.input },
1436
+ { selector: selectors$3.readOnlyInput }
1333
1437
  ],
1334
1438
  borderStyle: [
1335
- { selector: selectors$2.input },
1336
- { selector: selectors$2.readOnlyInput }
1439
+ { selector: selectors$3.input },
1440
+ { selector: selectors$3.readOnlyInput }
1337
1441
  ],
1338
- borderRadius: { selector: selectors$2.input },
1339
- boxShadow: { selector: selectors$2.input },
1442
+ borderRadius: { selector: selectors$3.input },
1443
+ boxShadow: { selector: selectors$3.input },
1340
1444
  fontSize: {},
1341
- height: { selector: selectors$2.input },
1342
- padding: { selector: selectors$2.input },
1343
- outline: { selector: selectors$2.input },
1344
- 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 },
1345
1449
 
1346
- placeholderColor: { selector: selectors$2.placeholder, property: 'color' }
1450
+ placeholderColor: { selector: selectors$3.placeholder, property: 'color' }
1347
1451
  };
1348
1452
 
1349
- const componentName$9 = getComponentName('email-field');
1453
+ const componentName$a = getComponentName('email-field');
1350
1454
 
1351
1455
  let overrides$5 = ``;
1352
1456
 
@@ -1365,7 +1469,7 @@ const EmailField = compose(
1365
1469
  wrappedEleName: 'vaadin-email-field',
1366
1470
  style: () => overrides$5,
1367
1471
  excludeAttrsSync: ['tabindex'],
1368
- componentName: componentName$9
1472
+ componentName: componentName$a
1369
1473
  })
1370
1474
  );
1371
1475
 
@@ -1409,12 +1513,12 @@ overrides$5 = `
1409
1513
  }
1410
1514
  `;
1411
1515
 
1412
- customElements.define(componentName$9, EmailField);
1516
+ customElements.define(componentName$a, EmailField);
1413
1517
 
1414
- const componentName$8 = getComponentName('link');
1518
+ const componentName$9 = getComponentName('link');
1415
1519
  class RawLink extends DescopeBaseClass {
1416
1520
  static get componentName() {
1417
- return componentName$8;
1521
+ return componentName$9;
1418
1522
  }
1419
1523
  constructor() {
1420
1524
  super();
@@ -1456,13 +1560,13 @@ class RawLink extends DescopeBaseClass {
1456
1560
  }
1457
1561
  }
1458
1562
 
1459
- const selectors$1 = {
1563
+ const selectors$2 = {
1460
1564
  host: { selector: () => 'host' },
1461
1565
  anchor: { selector: '> a' },
1462
1566
  text: { selector: Text.componentName }
1463
1567
  };
1464
1568
 
1465
- const { anchor, text: text$1, host } = selectors$1;
1569
+ const { anchor, text: text$1, host } = selectors$2;
1466
1570
 
1467
1571
  const Link = compose(
1468
1572
  createStyleMixin({
@@ -1481,16 +1585,16 @@ const Link = compose(
1481
1585
  componentNameValidationMixin
1482
1586
  )(RawLink);
1483
1587
 
1484
- customElements.define(componentName$8, Link);
1588
+ customElements.define(componentName$9, Link);
1485
1589
 
1486
- const componentName$7 = getComponentName('logo');
1590
+ const componentName$8 = getComponentName('logo');
1487
1591
 
1488
1592
  let style;
1489
1593
  const getStyle = () => style;
1490
1594
 
1491
1595
  class RawLogo extends DescopeBaseClass {
1492
1596
  static get componentName() {
1493
- return componentName$7;
1597
+ return componentName$8;
1494
1598
  }
1495
1599
  constructor() {
1496
1600
  super();
@@ -1531,9 +1635,9 @@ style = `
1531
1635
  }
1532
1636
  `;
1533
1637
 
1534
- customElements.define(componentName$7, Logo);
1638
+ customElements.define(componentName$8, Logo);
1535
1639
 
1536
- const componentName$6 = getComponentName('number-field');
1640
+ const componentName$7 = getComponentName('number-field');
1537
1641
 
1538
1642
  let overrides$4 = ``;
1539
1643
 
@@ -1552,7 +1656,7 @@ const NumberField = compose(
1552
1656
  wrappedEleName: 'vaadin-number-field',
1553
1657
  style: () => overrides$4,
1554
1658
  excludeAttrsSync: ['tabindex'],
1555
- componentName: componentName$6
1659
+ componentName: componentName$7
1556
1660
  })
1557
1661
  );
1558
1662
 
@@ -1596,7 +1700,7 @@ overrides$4 = `
1596
1700
  }
1597
1701
  `;
1598
1702
 
1599
- customElements.define(componentName$6, NumberField);
1703
+ customElements.define(componentName$7, NumberField);
1600
1704
 
1601
1705
  var BaseInputClass = inputMixin(HTMLElement); //todo: maybe we should use base class?
1602
1706
 
@@ -1614,7 +1718,7 @@ const getSanitizedCharacters = (str) => {
1614
1718
  return [...pin]; // creating array of chars
1615
1719
  };
1616
1720
 
1617
- const componentName$5 = getComponentName('passcode-internal');
1721
+ const componentName$6 = getComponentName('passcode-internal');
1618
1722
 
1619
1723
  class PasscodeInternal extends BaseInputClass {
1620
1724
  static get observedAttributes() {
@@ -1628,7 +1732,7 @@ class PasscodeInternal extends BaseInputClass {
1628
1732
  }
1629
1733
 
1630
1734
  static get componentName() {
1631
- return componentName$5;
1735
+ return componentName$6;
1632
1736
  }
1633
1737
 
1634
1738
  constructor() {
@@ -1806,7 +1910,7 @@ class PasscodeInternal extends BaseInputClass {
1806
1910
  }
1807
1911
  }
1808
1912
 
1809
- const componentName$4 = getComponentName('text-field');
1913
+ const componentName$5 = getComponentName('text-field');
1810
1914
 
1811
1915
  let overrides$3 = ``;
1812
1916
 
@@ -1823,7 +1927,7 @@ const TextField = compose(
1823
1927
  wrappedEleName: 'vaadin-text-field',
1824
1928
  style: () => overrides$3,
1825
1929
  excludeAttrsSync: ['tabindex'],
1826
- componentName: componentName$4
1930
+ componentName: componentName$5
1827
1931
  })
1828
1932
  );
1829
1933
 
@@ -1868,7 +1972,7 @@ overrides$3 = `
1868
1972
  }
1869
1973
  `;
1870
1974
 
1871
- const componentName$3 = getComponentName('passcode');
1975
+ const componentName$4 = getComponentName('passcode');
1872
1976
 
1873
1977
  const customMixin = (superclass) =>
1874
1978
  class DraggableMixinClass extends superclass {
@@ -1885,12 +1989,12 @@ const customMixin = (superclass) =>
1885
1989
  const template = document.createElement('template');
1886
1990
 
1887
1991
  template.innerHTML = `
1888
- <${componentName$5}
1992
+ <${componentName$6}
1889
1993
  bordered="true"
1890
1994
  name="code"
1891
1995
  tabindex="-1"
1892
1996
  slot="input"
1893
- ></${componentName$5}>
1997
+ ></${componentName$6}>
1894
1998
  `;
1895
1999
 
1896
2000
  this.proxyElement.appendChild(template.content.cloneNode(true));
@@ -1899,7 +2003,7 @@ const customMixin = (superclass) =>
1899
2003
  // so the validations will be triggered blur event is dispatched from descope-passcode internal (and not every time focusing a digit)
1900
2004
  this.proxyElement._setFocused = () => { };
1901
2005
 
1902
- this.inputElement = this.shadowRoot.querySelector(componentName$5);
2006
+ this.inputElement = this.shadowRoot.querySelector(componentName$6);
1903
2007
 
1904
2008
  forwardAttrs(this.shadowRoot.host, this.inputElement, { includeAttrs: ['required', 'pattern'] });
1905
2009
 
@@ -1981,17 +2085,17 @@ const Passcode = compose(
1981
2085
  }
1982
2086
  `,
1983
2087
  excludeAttrsSync: ['tabindex'],
1984
- componentName: componentName$3
2088
+ componentName: componentName$4
1985
2089
  })
1986
2090
  );
1987
2091
 
1988
- customElements.define(componentName$4, TextField);
2092
+ customElements.define(componentName$5, TextField);
1989
2093
 
1990
- customElements.define(componentName$5, PasscodeInternal);
2094
+ customElements.define(componentName$6, PasscodeInternal);
1991
2095
 
1992
- customElements.define(componentName$3, Passcode);
2096
+ customElements.define(componentName$4, Passcode);
1993
2097
 
1994
- const componentName$2 = getComponentName('password-field');
2098
+ const componentName$3 = getComponentName('password-field');
1995
2099
 
1996
2100
  let overrides$2 = ``;
1997
2101
 
@@ -2016,7 +2120,7 @@ const PasswordField = compose(
2016
2120
  wrappedEleName: 'vaadin-password-field',
2017
2121
  style: () => overrides$2,
2018
2122
  excludeAttrsSync: ['tabindex'],
2019
- componentName: componentName$2
2123
+ componentName: componentName$3
2020
2124
  })
2021
2125
  );
2022
2126
 
@@ -2060,9 +2164,9 @@ overrides$2 = `
2060
2164
  }
2061
2165
  `;
2062
2166
 
2063
- customElements.define(componentName$2, PasswordField);
2167
+ customElements.define(componentName$3, PasswordField);
2064
2168
 
2065
- const componentName$1 = getComponentName('switch-toggle');
2169
+ const componentName$2 = getComponentName('switch-toggle');
2066
2170
 
2067
2171
  let overrides$1 = ``;
2068
2172
 
@@ -2082,7 +2186,7 @@ const SwitchToggle = compose(
2082
2186
  wrappedEleName: 'vaadin-checkbox',
2083
2187
  style: () => overrides$1,
2084
2188
  excludeAttrsSync: ['tabindex'],
2085
- componentName: componentName$1
2189
+ componentName: componentName$2
2086
2190
  })
2087
2191
  );
2088
2192
 
@@ -2140,11 +2244,11 @@ overrides$1 = `
2140
2244
  }
2141
2245
  `;
2142
2246
 
2143
- customElements.define(componentName$1, SwitchToggle);
2247
+ customElements.define(componentName$2, SwitchToggle);
2144
2248
 
2145
- const componentName = getComponentName('text-area');
2249
+ const componentName$1 = getComponentName('text-area');
2146
2250
 
2147
- const selectors = {
2251
+ const selectors$1 = {
2148
2252
  label: '::part(label)',
2149
2253
  input: '::part(input-field)',
2150
2254
  required: '::part(required-indicator)::after',
@@ -2157,16 +2261,16 @@ const TextArea = compose(
2157
2261
  createStyleMixin({
2158
2262
  mappings: {
2159
2263
  resize: { selector: '> textarea' },
2160
- color: { selector: selectors.label },
2264
+ color: { selector: selectors$1.label },
2161
2265
  cursor: {},
2162
- width: { selector: selectors.host },
2163
- backgroundColor: { selector: selectors.input },
2164
- borderWidth: { selector: selectors.input },
2165
- borderStyle: { selector: selectors.input },
2166
- borderColor: { selector: selectors.input },
2167
- borderRadius: { selector: selectors.input },
2168
- outline: { selector: selectors.input },
2169
- 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 }
2170
2274
  }
2171
2275
  }),
2172
2276
  draggableMixin,
@@ -2178,7 +2282,7 @@ const TextArea = compose(
2178
2282
  wrappedEleName: 'vaadin-text-area',
2179
2283
  style: () => overrides,
2180
2284
  excludeAttrsSync: ['tabindex'],
2181
- componentName
2285
+ componentName: componentName$1
2182
2286
  })
2183
2287
  );
2184
2288
 
@@ -2204,7 +2308,7 @@ overrides = `
2204
2308
  }
2205
2309
  `;
2206
2310
 
2207
- customElements.define(componentName, TextArea);
2311
+ customElements.define(componentName$1, TextArea);
2208
2312
 
2209
2313
  const getVarName = (path) => getCssVarName(DESCOPE_PREFIX, ...path);
2210
2314
 
@@ -2250,9 +2354,9 @@ const componentsThemeToStyleObj = (componentsTheme) =>
2250
2354
  // this allows us to generate those themes under different sections
2251
2355
  // if the theme has root level attribute that starts with #
2252
2356
  // we are generating a new theme
2253
- let themeName = 'theme';
2357
+ let themeName = BASE_THEME_SECTION;
2254
2358
 
2255
- if (restPath[0] && restPath[0].startsWith('#')) {
2359
+ if (restPath[0] && restPath[0].startsWith(PORTAL_THEME_PREFIX)) {
2256
2360
  themeName = restPath.shift();
2257
2361
  }
2258
2362
 
@@ -2478,7 +2582,7 @@ var globals = {
2478
2582
  };
2479
2583
 
2480
2584
  const globalRefs$7 = getThemeRefs(globals);
2481
- const vars$c = Button.cssVarList;
2585
+ const vars$d = Button.cssVarList;
2482
2586
 
2483
2587
  const mode = {
2484
2588
  primary: globalRefs$7.colors.primary,
@@ -2488,83 +2592,83 @@ const mode = {
2488
2592
  surface: globalRefs$7.colors.surface
2489
2593
  };
2490
2594
 
2491
- const [helperTheme$2, helperRefs$2] = createHelperVars({ mode }, componentName$h);
2595
+ const [helperTheme$2, helperRefs$2] = createHelperVars({ mode }, componentName$i);
2492
2596
 
2493
2597
  const button = {
2494
2598
  ...helperTheme$2,
2495
- [vars$c.width]: 'fit-content',
2599
+ [vars$d.width]: 'fit-content',
2496
2600
  size: {
2497
2601
  xs: {
2498
- [vars$c.height]: '10px',
2499
- [vars$c.fontSize]: '10px',
2500
- [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}`
2501
2605
  },
2502
2606
  sm: {
2503
- [vars$c.height]: '20px',
2504
- [vars$c.fontSize]: '10px',
2505
- [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}`
2506
2610
  },
2507
2611
  md: {
2508
- [vars$c.height]: '30px',
2509
- [vars$c.fontSize]: '14px',
2510
- [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}`
2511
2615
  },
2512
2616
  lg: {
2513
- [vars$c.height]: '40px',
2514
- [vars$c.fontSize]: '20px',
2515
- [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}`
2516
2620
  },
2517
2621
  xl: {
2518
- [vars$c.height]: '50px',
2519
- [vars$c.fontSize]: '25px',
2520
- [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}`
2521
2625
  }
2522
2626
  },
2523
2627
 
2524
- [vars$c.borderRadius]: globalRefs$7.radius.lg,
2525
- [vars$c.cursor]: 'pointer',
2526
- [vars$c.borderWidth]: '2px',
2527
- [vars$c.borderStyle]: 'solid',
2528
- [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',
2529
2633
 
2530
2634
  _fullWidth: {
2531
- [vars$c.width]: '100%'
2635
+ [vars$d.width]: '100%'
2532
2636
  },
2533
2637
  _loading: {
2534
- [vars$c.cursor]: 'wait'
2638
+ [vars$d.cursor]: 'wait'
2535
2639
  },
2536
2640
 
2537
2641
  variant: {
2538
2642
  contained: {
2539
- [vars$c.color]: helperRefs$2.contrast,
2540
- [vars$c.backgroundColor]: helperRefs$2.main,
2643
+ [vars$d.color]: helperRefs$2.contrast,
2644
+ [vars$d.backgroundColor]: helperRefs$2.main,
2541
2645
  _hover: {
2542
- [vars$c.backgroundColor]: helperRefs$2.dark
2646
+ [vars$d.backgroundColor]: helperRefs$2.dark
2543
2647
  },
2544
2648
  _loading: {
2545
- [vars$c.backgroundColor]: helperRefs$2.main
2649
+ [vars$d.backgroundColor]: helperRefs$2.main
2546
2650
  }
2547
2651
  },
2548
2652
  outline: {
2549
- [vars$c.color]: helperRefs$2.main,
2550
- [vars$c.borderColor]: helperRefs$2.main,
2653
+ [vars$d.color]: helperRefs$2.main,
2654
+ [vars$d.borderColor]: helperRefs$2.main,
2551
2655
  _hover: {
2552
- [vars$c.color]: helperRefs$2.dark,
2553
- [vars$c.borderColor]: helperRefs$2.dark,
2656
+ [vars$d.color]: helperRefs$2.dark,
2657
+ [vars$d.borderColor]: helperRefs$2.dark,
2554
2658
  _error: {
2555
- [vars$c.color]: helperRefs$2.error
2659
+ [vars$d.color]: helperRefs$2.error
2556
2660
  }
2557
2661
  }
2558
2662
  },
2559
2663
  link: {
2560
- [vars$c.color]: helperRefs$2.main,
2561
- [vars$c.padding]: 0,
2562
- [vars$c.margin]: 0,
2563
- [vars$c.lineHeight]: helperRefs$2.height,
2564
- [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,
2565
2669
  _hover: {
2566
- [vars$c.color]: helperRefs$2.main,
2567
- [vars$c.textDecoration]: 'underline'
2670
+ [vars$d.color]: helperRefs$2.main,
2671
+ [vars$d.textDecoration]: 'underline'
2568
2672
  }
2569
2673
  }
2570
2674
  }
@@ -2572,7 +2676,7 @@ const button = {
2572
2676
 
2573
2677
  const globalRefs$6 = getThemeRefs(globals);
2574
2678
 
2575
- const vars$b = TextField.cssVarList;
2679
+ const vars$c = TextField.cssVarList;
2576
2680
 
2577
2681
  const textField = (vars) => ({
2578
2682
  size: {
@@ -2638,13 +2742,13 @@ const textField = (vars) => ({
2638
2742
  }
2639
2743
  });
2640
2744
 
2641
- var textField$1 = textField(vars$b);
2745
+ var textField$1 = textField(vars$c);
2642
2746
 
2643
- const vars$a = PasswordField.cssVarList;
2747
+ const vars$b = PasswordField.cssVarList;
2644
2748
 
2645
2749
  const passwordField = {
2646
- ...textField(vars$a),
2647
- [vars$a.revealCursor]: 'pointer'
2750
+ ...textField(vars$b),
2751
+ [vars$b.revealCursor]: 'pointer'
2648
2752
  };
2649
2753
 
2650
2754
  const numberField = {
@@ -2656,57 +2760,57 @@ const emailField = {
2656
2760
  };
2657
2761
 
2658
2762
  const globalRefs$5 = getThemeRefs(globals);
2659
- const vars$9 = TextArea.cssVarList;
2763
+ const vars$a = TextArea.cssVarList;
2660
2764
 
2661
2765
  const textArea = {
2662
- [vars$9.width]: '100%',
2663
- [vars$9.color]: globalRefs$5.colors.primary.main,
2664
- [vars$9.backgroundColor]: globalRefs$5.colors.surface.light,
2665
- [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',
2666
2770
 
2667
- [vars$9.borderRadius]: globalRefs$5.radius.sm,
2668
- [vars$9.borderWidth]: '1px',
2669
- [vars$9.borderStyle]: 'solid',
2670
- [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',
2671
2775
 
2672
2776
  _bordered: {
2673
- [vars$9.borderColor]: globalRefs$5.colors.surface.main
2777
+ [vars$a.borderColor]: globalRefs$5.colors.surface.main
2674
2778
  },
2675
2779
 
2676
2780
  _focused: {
2677
- [vars$9.outline]: `2px solid ${globalRefs$5.colors.surface.main}`
2781
+ [vars$a.outline]: `2px solid ${globalRefs$5.colors.surface.main}`
2678
2782
  },
2679
2783
 
2680
2784
  _fullWidth: {
2681
- [vars$9.width]: '100%'
2785
+ [vars$a.width]: '100%'
2682
2786
  },
2683
2787
 
2684
2788
  _disabled: {
2685
- [vars$9.cursor]: 'not-allowed'
2789
+ [vars$a.cursor]: 'not-allowed'
2686
2790
  },
2687
2791
 
2688
2792
  _invalid: {
2689
- [vars$9.outline]: `2px solid ${globalRefs$5.colors.error.main}`
2793
+ [vars$a.outline]: `2px solid ${globalRefs$5.colors.error.main}`
2690
2794
  }
2691
2795
  };
2692
2796
 
2693
- const vars$8 = Checkbox.cssVarList;
2797
+ const vars$9 = Checkbox.cssVarList;
2694
2798
 
2695
2799
  const checkbox = {
2696
- [vars$8.cursor]: 'pointer',
2697
- [vars$8.width]: 'fit-content'
2800
+ [vars$9.cursor]: 'pointer',
2801
+ [vars$9.width]: 'fit-content'
2698
2802
  };
2699
2803
 
2700
- const vars$7 = SwitchToggle.cssVarList;
2804
+ const vars$8 = SwitchToggle.cssVarList;
2701
2805
 
2702
2806
  const swtichToggle = {
2703
- [vars$7.width]: '70px',
2704
- [vars$7.cursor]: [{}, { selector: '> label' }]
2807
+ [vars$8.width]: '70px',
2808
+ [vars$8.cursor]: [{}, { selector: '> label' }]
2705
2809
  };
2706
2810
 
2707
2811
  const globalRefs$4 = getThemeRefs(globals);
2708
2812
 
2709
- const vars$6 = Container.cssVarList;
2813
+ const vars$7 = Container.cssVarList;
2710
2814
 
2711
2815
  const verticalAlignment = {
2712
2816
  start: { verticalAlignment: 'start' },
@@ -2729,31 +2833,31 @@ const [helperTheme$1, helperRefs$1, helperVars] =
2729
2833
 
2730
2834
  const container = {
2731
2835
  ...helperTheme$1,
2732
- [vars$6.width]: '100%',
2836
+ [vars$7.width]: '100%',
2733
2837
  verticalPadding: {
2734
- sm: { [vars$6.verticalPadding]: '5px' },
2735
- md: { [vars$6.verticalPadding]: '10px' },
2736
- lg: { [vars$6.verticalPadding]: '20px' },
2838
+ sm: { [vars$7.verticalPadding]: '5px' },
2839
+ md: { [vars$7.verticalPadding]: '10px' },
2840
+ lg: { [vars$7.verticalPadding]: '20px' },
2737
2841
  },
2738
2842
  horizontalPadding: {
2739
- sm: { [vars$6.horizontalPadding]: '5px' },
2740
- md: { [vars$6.horizontalPadding]: '10px' },
2741
- lg: { [vars$6.horizontalPadding]: '20px' },
2843
+ sm: { [vars$7.horizontalPadding]: '5px' },
2844
+ md: { [vars$7.horizontalPadding]: '10px' },
2845
+ lg: { [vars$7.horizontalPadding]: '20px' },
2742
2846
  },
2743
2847
  direction: {
2744
2848
  row: {
2745
- [vars$6.flexDirection]: 'row',
2746
- [vars$6.alignItems]: helperRefs$1.verticalAlignment,
2747
- [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,
2748
2852
  horizontalAlignment: {
2749
2853
  spaceBetween: { [helperVars.horizontalAlignment]: 'space-between' },
2750
2854
  }
2751
2855
  },
2752
2856
 
2753
2857
  column: {
2754
- [vars$6.flexDirection]: 'column',
2755
- [vars$6.alignItems]: helperRefs$1.horizontalAlignment,
2756
- [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,
2757
2861
  verticalAlignment: {
2758
2862
  spaceBetween: { [helperVars.verticalAlignment]: 'space-between' }
2759
2863
  }
@@ -2762,214 +2866,214 @@ const container = {
2762
2866
 
2763
2867
  spaceBetween: {
2764
2868
  sm: {
2765
- [vars$6.gap]: '10px'
2869
+ [vars$7.gap]: '10px'
2766
2870
  },
2767
2871
  md: {
2768
- [vars$6.gap]: '20px'
2872
+ [vars$7.gap]: '20px'
2769
2873
  },
2770
2874
  lg: {
2771
- [vars$6.gap]: '30px'
2875
+ [vars$7.gap]: '30px'
2772
2876
  }
2773
2877
  },
2774
2878
 
2775
2879
  shadow: {
2776
2880
  sm: {
2777
- [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}`
2778
2882
  },
2779
2883
  md: {
2780
- [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}`
2781
2885
  },
2782
2886
  lg: {
2783
- [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}`
2784
2888
  },
2785
2889
  xl: {
2786
- [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}`
2787
2891
  },
2788
2892
  '2xl': {
2789
2893
  [helperVars.shadowColor]: '#00000050',
2790
- [vars$6.boxShadow]: `${globalRefs$4.shadow.wide['2xl']} ${helperRefs$1.shadowColor}`
2894
+ [vars$7.boxShadow]: `${globalRefs$4.shadow.wide['2xl']} ${helperRefs$1.shadowColor}`
2791
2895
  },
2792
2896
  },
2793
2897
 
2794
2898
  borderRadius: {
2795
2899
  sm: {
2796
- [vars$6.borderRadius]: globalRefs$4.radius.sm
2900
+ [vars$7.borderRadius]: globalRefs$4.radius.sm
2797
2901
  },
2798
2902
  md: {
2799
- [vars$6.borderRadius]: globalRefs$4.radius.md
2903
+ [vars$7.borderRadius]: globalRefs$4.radius.md
2800
2904
  },
2801
2905
  lg: {
2802
- [vars$6.borderRadius]: globalRefs$4.radius.lg
2906
+ [vars$7.borderRadius]: globalRefs$4.radius.lg
2803
2907
  },
2804
2908
  }
2805
2909
  };
2806
2910
 
2807
- const vars$5 = Logo.cssVarList;
2911
+ const vars$6 = Logo.cssVarList;
2808
2912
 
2809
2913
  const logo = {
2810
- [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)'
2811
2915
  };
2812
2916
 
2813
2917
  const globalRefs$3 = getThemeRefs(globals);
2814
2918
 
2815
- const vars$4 = Text.cssVarList;
2919
+ const vars$5 = Text.cssVarList;
2816
2920
 
2817
2921
  const text = {
2818
- [vars$4.lineHeight]: '1em',
2819
- [vars$4.display]: 'inline-block',
2820
- [vars$4.textAlign]: 'left',
2821
- [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,
2822
2926
  variant: {
2823
2927
  h1: {
2824
- [vars$4.fontSize]: globalRefs$3.typography.h1.size,
2825
- [vars$4.fontWeight]: globalRefs$3.typography.h1.weight,
2826
- [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
2827
2931
  },
2828
2932
  h2: {
2829
- [vars$4.fontSize]: globalRefs$3.typography.h2.size,
2830
- [vars$4.fontWeight]: globalRefs$3.typography.h2.weight,
2831
- [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
2832
2936
  },
2833
2937
  h3: {
2834
- [vars$4.fontSize]: globalRefs$3.typography.h3.size,
2835
- [vars$4.fontWeight]: globalRefs$3.typography.h3.weight,
2836
- [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
2837
2941
  },
2838
2942
  subtitle1: {
2839
- [vars$4.fontSize]: globalRefs$3.typography.subtitle1.size,
2840
- [vars$4.fontWeight]: globalRefs$3.typography.subtitle1.weight,
2841
- [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
2842
2946
  },
2843
2947
  subtitle2: {
2844
- [vars$4.fontSize]: globalRefs$3.typography.subtitle2.size,
2845
- [vars$4.fontWeight]: globalRefs$3.typography.subtitle2.weight,
2846
- [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
2847
2951
  },
2848
2952
  body1: {
2849
- [vars$4.fontSize]: globalRefs$3.typography.body1.size,
2850
- [vars$4.fontWeight]: globalRefs$3.typography.body1.weight,
2851
- [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
2852
2956
  },
2853
2957
  body2: {
2854
- [vars$4.fontSize]: globalRefs$3.typography.body2.size,
2855
- [vars$4.fontWeight]: globalRefs$3.typography.body2.weight,
2856
- [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
2857
2961
  }
2858
2962
  },
2859
2963
  mode: {
2860
2964
  primary: {
2861
- [vars$4.color]: globalRefs$3.colors.primary.main
2965
+ [vars$5.color]: globalRefs$3.colors.primary.main
2862
2966
  },
2863
2967
  secondary: {
2864
- [vars$4.color]: globalRefs$3.colors.secondary.main
2968
+ [vars$5.color]: globalRefs$3.colors.secondary.main
2865
2969
  },
2866
2970
  error: {
2867
- [vars$4.color]: globalRefs$3.colors.error.main
2971
+ [vars$5.color]: globalRefs$3.colors.error.main
2868
2972
  },
2869
2973
  success: {
2870
- [vars$4.color]: globalRefs$3.colors.success.main
2974
+ [vars$5.color]: globalRefs$3.colors.success.main
2871
2975
  }
2872
2976
  },
2873
2977
  textAlign: {
2874
- right: { [vars$4.textAlign]: 'right' },
2875
- left: { [vars$4.textAlign]: 'left' },
2876
- center: { [vars$4.textAlign]: 'center' }
2978
+ right: { [vars$5.textAlign]: 'right' },
2979
+ left: { [vars$5.textAlign]: 'left' },
2980
+ center: { [vars$5.textAlign]: 'center' }
2877
2981
  },
2878
2982
  _fullWidth: {
2879
- [vars$4.width]: '100%',
2880
- [vars$4.display]: 'block'
2983
+ [vars$5.width]: '100%',
2984
+ [vars$5.display]: 'block'
2881
2985
  },
2882
2986
  _italic: {
2883
- [vars$4.fontStyle]: 'italic'
2987
+ [vars$5.fontStyle]: 'italic'
2884
2988
  },
2885
2989
  _uppercase: {
2886
- [vars$4.textTransform]: 'uppercase'
2990
+ [vars$5.textTransform]: 'uppercase'
2887
2991
  },
2888
2992
  _lowercase: {
2889
- [vars$4.textTransform]: 'lowercase'
2993
+ [vars$5.textTransform]: 'lowercase'
2890
2994
  }
2891
2995
  };
2892
2996
 
2893
2997
  const globalRefs$2 = getThemeRefs(globals);
2894
- const vars$3 = Link.cssVarList;
2998
+ const vars$4 = Link.cssVarList;
2895
2999
 
2896
3000
  const link = {
2897
- [vars$3.cursor]: 'pointer',
2898
- [vars$3.borderBottomWidth]: '2px',
2899
- [vars$3.borderBottomStyle]: 'solid',
2900
- [vars$3.borderBottomColor]: 'transparent',
2901
- [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,
2902
3006
 
2903
3007
  _hover: {
2904
- [vars$3.borderBottomColor]: globalRefs$2.colors.primary.main
3008
+ [vars$4.borderBottomColor]: globalRefs$2.colors.primary.main
2905
3009
  },
2906
3010
 
2907
3011
  textAlign: {
2908
- right: { [vars$3.textAlign]: 'right' },
2909
- left: { [vars$3.textAlign]: 'left' },
2910
- center: { [vars$3.textAlign]: 'center' }
3012
+ right: { [vars$4.textAlign]: 'right' },
3013
+ left: { [vars$4.textAlign]: 'left' },
3014
+ center: { [vars$4.textAlign]: 'center' }
2911
3015
  },
2912
3016
 
2913
3017
  _fullWidth: {
2914
- [vars$3.width]: '100%'
3018
+ [vars$4.width]: '100%'
2915
3019
  },
2916
3020
 
2917
3021
  mode: {
2918
3022
  primary: {
2919
- [vars$3.color]: globalRefs$2.colors.primary.main,
3023
+ [vars$4.color]: globalRefs$2.colors.primary.main,
2920
3024
  _hover: {
2921
- [vars$3.borderBottomColor]: globalRefs$2.colors.primary.main
3025
+ [vars$4.borderBottomColor]: globalRefs$2.colors.primary.main
2922
3026
  }
2923
3027
  },
2924
3028
  secondary: {
2925
- [vars$3.color]: globalRefs$2.colors.secondary.main,
3029
+ [vars$4.color]: globalRefs$2.colors.secondary.main,
2926
3030
  _hover: {
2927
- [vars$3.borderBottomColor]: globalRefs$2.colors.secondary.main
3031
+ [vars$4.borderBottomColor]: globalRefs$2.colors.secondary.main
2928
3032
  }
2929
3033
  },
2930
3034
  error: {
2931
- [vars$3.color]: globalRefs$2.colors.error.main,
3035
+ [vars$4.color]: globalRefs$2.colors.error.main,
2932
3036
  _hover: {
2933
- [vars$3.borderBottomColor]: globalRefs$2.colors.error.main
3037
+ [vars$4.borderBottomColor]: globalRefs$2.colors.error.main
2934
3038
  }
2935
3039
  },
2936
3040
  success: {
2937
- [vars$3.color]: globalRefs$2.colors.success.main,
3041
+ [vars$4.color]: globalRefs$2.colors.success.main,
2938
3042
  _hover: {
2939
- [vars$3.borderBottomColor]: globalRefs$2.colors.success.main
3043
+ [vars$4.borderBottomColor]: globalRefs$2.colors.success.main
2940
3044
  }
2941
3045
  }
2942
3046
  }
2943
3047
  };
2944
3048
 
2945
- const vars$2 = Divider.cssVarList;
3049
+ const vars$3 = Divider.cssVarList;
2946
3050
 
2947
3051
  const thickness = '2px';
2948
3052
  const textPaddingSize = '10px';
2949
- const [helperTheme, helperRefs] = createHelperVars({ thickness, textPaddingSize }, componentName$b);
3053
+ const [helperTheme, helperRefs] = createHelperVars({ thickness, textPaddingSize }, componentName$c);
2950
3054
 
2951
3055
 
2952
3056
  const divider = {
2953
3057
  ...helperTheme,
2954
- [vars$2.alignItems]: 'center',
2955
- [vars$2.dividerHeight]: helperRefs.thickness,
2956
- [vars$2.backgroundColor]: 'currentColor',
2957
- [vars$2.opacity]: '0.2',
2958
- [vars$2.textPadding]: `0 ${helperRefs.textPaddingSize}`,
2959
- [vars$2.width]: '100%',
2960
- [vars$2.flexDirection]: 'row',
2961
- [vars$2.alignSelf]: 'strech',
2962
- [vars$2.textWidth]: 'fit-content',
2963
- [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)',
2964
3068
  _vertical: {
2965
- [vars$2.padding]: `0 calc(${thickness} * 3)`,
2966
- [vars$2.width]: 'fit-content',
2967
- [vars$2.textPadding]: `${helperRefs.textPaddingSize} 0`,
2968
- [vars$2.flexDirection]: 'column',
2969
- [vars$2.minHeight]: '200px',
2970
- [vars$2.textWidth]: 'fit-content',
2971
- [vars$2.dividerWidth]: helperRefs.thickness,
2972
- [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%',
2973
3077
  }
2974
3078
  };
2975
3079
 
@@ -2979,102 +3083,227 @@ const passcode = {
2979
3083
 
2980
3084
  const globalRefs$1 = getThemeRefs(globals);
2981
3085
 
2982
- const vars$1 = LoaderLinear.cssVarList;
3086
+ const vars$2 = LoaderLinear.cssVarList;
2983
3087
 
2984
3088
  const loaderLinear = {
2985
- [vars$1.display]: 'inline-block',
2986
- [vars$1.barColor]: globalRefs$1.colors.surface.contrast,
2987
- [vars$1.barWidth]: '20%',
2988
- [vars$1.surfaceColor]: globalRefs$1.colors.surface.main,
2989
- [vars$1.borderRadius]: '4px',
2990
- [vars$1.animationDuration]: '2s',
2991
- [vars$1.animationTimingFunction]: 'linear',
2992
- [vars$1.animationIterationCount]: 'infinite',
2993
- [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%',
2994
3098
  size: {
2995
3099
  xs: {
2996
- [vars$1.height]: '6px'
3100
+ [vars$2.height]: '6px'
2997
3101
  },
2998
3102
  sm: {
2999
- [vars$1.height]: '8px'
3103
+ [vars$2.height]: '8px'
3000
3104
  },
3001
3105
  md: {
3002
- [vars$1.height]: '10px'
3106
+ [vars$2.height]: '10px'
3003
3107
  },
3004
3108
  lg: {
3005
- [vars$1.height]: '12px'
3109
+ [vars$2.height]: '12px'
3006
3110
  },
3007
3111
  xl: {
3008
- [vars$1.height]: '14px'
3112
+ [vars$2.height]: '14px'
3009
3113
  }
3010
3114
  },
3011
3115
  mode: {
3012
3116
  primary: {
3013
- [vars$1.barColor]: globalRefs$1.colors.primary.main
3117
+ [vars$2.barColor]: globalRefs$1.colors.primary.main
3014
3118
  },
3015
3119
  secondary: {
3016
- [vars$1.barColor]: globalRefs$1.colors.secondary.main
3120
+ [vars$2.barColor]: globalRefs$1.colors.secondary.main
3017
3121
  }
3018
3122
  },
3019
3123
  _hidden: {
3020
- [vars$1.display]: 'none'
3124
+ [vars$2.display]: 'none'
3021
3125
  }
3022
3126
  };
3023
3127
 
3024
3128
  const globalRefs = getThemeRefs(globals);
3025
3129
 
3026
- const vars = LoaderRadial.cssVarList;
3130
+ const vars$1 = LoaderRadial.cssVarList;
3027
3131
 
3028
3132
  const loaderRadial = {
3029
- [vars.display]: 'inline-block',
3030
- [vars.color]: globalRefs.colors.surface.contrast,
3031
- [vars.animationDuration]: '2s',
3032
- [vars.animationTimingFunction]: 'linear',
3033
- [vars.animationIterationCount]: 'infinite',
3034
- [vars.spinnerStyle]: 'solid',
3035
- [vars.spinnerWidth]: '4px',
3036
- [vars.spinnerRadius]: '50%',
3037
- [vars.spinnerTopColor]: 'currentColor',
3038
- [vars.spinnerBottomColor]: 'transparent',
3039
- [vars.spinnerRightColor]: 'currentColor',
3040
- [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',
3041
3145
  size: {
3042
3146
  xs: {
3043
- [vars.width]: '20px',
3044
- [vars.height]: '20px',
3045
- [vars.spinnerWidth]: '2px'
3147
+ [vars$1.width]: '20px',
3148
+ [vars$1.height]: '20px',
3149
+ [vars$1.spinnerWidth]: '2px'
3046
3150
  },
3047
3151
  sm: {
3048
- [vars.width]: '30px',
3049
- [vars.height]: '30px',
3050
- [vars.spinnerWidth]: '3px'
3152
+ [vars$1.width]: '30px',
3153
+ [vars$1.height]: '30px',
3154
+ [vars$1.spinnerWidth]: '3px'
3051
3155
  },
3052
3156
  md: {
3053
- [vars.width]: '40px',
3054
- [vars.height]: '40px',
3055
- [vars.spinnerWidth]: '4px'
3157
+ [vars$1.width]: '40px',
3158
+ [vars$1.height]: '40px',
3159
+ [vars$1.spinnerWidth]: '4px'
3056
3160
  },
3057
3161
  lg: {
3058
- [vars.width]: '60px',
3059
- [vars.height]: '60px',
3060
- [vars.spinnerWidth]: '5px'
3162
+ [vars$1.width]: '60px',
3163
+ [vars$1.height]: '60px',
3164
+ [vars$1.spinnerWidth]: '5px'
3061
3165
  },
3062
3166
  xl: {
3063
- [vars.width]: '80px',
3064
- [vars.height]: '80px',
3065
- [vars.spinnerWidth]: '6px'
3167
+ [vars$1.width]: '80px',
3168
+ [vars$1.height]: '80px',
3169
+ [vars$1.spinnerWidth]: '6px'
3066
3170
  }
3067
3171
  },
3068
3172
  mode: {
3069
3173
  primary: {
3070
- [vars.color]: globalRefs.colors.primary.main
3174
+ [vars$1.color]: globalRefs.colors.primary.main
3071
3175
  },
3072
3176
  secondary: {
3073
- [vars.color]: globalRefs.colors.secondary.main
3177
+ [vars$1.color]: globalRefs.colors.secondary.main
3074
3178
  }
3075
3179
  },
3076
3180
  _hidden: {
3077
- [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
+ }
3078
3307
  }
3079
3308
  };
3080
3309
 
@@ -3094,7 +3323,8 @@ var components = {
3094
3323
  divider,
3095
3324
  passcode,
3096
3325
  loaderRadial,
3097
- loaderLinear
3326
+ loaderLinear,
3327
+ comboBox
3098
3328
  };
3099
3329
 
3100
3330
  var index = { globals, components };