@descope/web-components-ui 1.0.114 → 1.0.116

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 (78) hide show
  1. package/dist/cjs/index.cjs.js +1299 -1305
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +2 -1
  4. package/dist/index.esm.js +1384 -1390
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/umd/201.js +1 -0
  7. package/dist/umd/241.js +1 -1
  8. package/dist/umd/447.js +1 -1
  9. package/dist/umd/65.js +1 -1
  10. package/dist/umd/803.js +1 -1
  11. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  12. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  13. package/dist/umd/descope-button-index-js.js +1 -1
  14. package/dist/umd/descope-combo-box-index-js.js +1 -1
  15. package/dist/umd/descope-container-index-js.js +1 -1
  16. package/dist/umd/descope-divider-index-js.js +1 -1
  17. package/dist/umd/descope-email-field-index-js.js +1 -1
  18. package/dist/umd/descope-link-index-js.js +1 -1
  19. package/dist/umd/descope-loader-linear-index-js.js +1 -1
  20. package/dist/umd/descope-loader-radial-index-js.js +1 -1
  21. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  22. package/dist/umd/descope-number-field-index-js.js +1 -1
  23. package/dist/umd/descope-passcode-index-js.js +1 -1
  24. package/dist/umd/descope-phone-field-index-js.js +1 -1
  25. package/dist/umd/descope-text-area-index-js.js +1 -1
  26. package/dist/umd/descope-text-field-index-js.js +1 -1
  27. package/dist/umd/descope-text-index-js.js +1 -1
  28. package/dist/umd/index.js +1 -1
  29. package/package.json +1 -1
  30. package/src/components/boolean-fields/commonStyles.js +13 -5
  31. package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +40 -37
  32. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +43 -37
  33. package/src/components/descope-button/ButtonClass.js +22 -6
  34. package/src/components/descope-combo-box/ComboBoxClass.js +49 -36
  35. package/src/components/descope-container/ContainerClass.js +4 -4
  36. package/src/components/descope-divider/DividerClass.js +74 -55
  37. package/src/components/descope-email-field/EmailFieldClass.js +11 -47
  38. package/src/components/descope-link/LinkClass.js +8 -5
  39. package/src/components/descope-loader-linear/LoaderLinearClass.js +16 -12
  40. package/src/components/descope-loader-radial/LoaderRadialClass.js +12 -11
  41. package/src/components/descope-new-password/NewPasswordClass.js +65 -51
  42. package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +1 -1
  43. package/src/components/descope-number-field/NumberFieldClass.js +11 -43
  44. package/src/components/descope-passcode/PasscodeClass.js +36 -29
  45. package/src/components/descope-password-field/PasswordFieldClass.js +52 -41
  46. package/src/components/descope-phone-field/PhoneFieldClass.js +61 -41
  47. package/src/components/descope-text/TextClass.js +8 -8
  48. package/src/components/descope-text-area/TextAreaClass.js +50 -48
  49. package/src/components/descope-text-field/TextFieldClass.js +11 -53
  50. package/src/components/descope-text-field/textFieldMappings.js +66 -38
  51. package/src/helpers/themeHelpers/index.js +10 -8
  52. package/src/helpers/themeHelpers/resetHelpers.js +76 -0
  53. package/src/index.d.ts +2 -1
  54. package/src/mixins/createStyleMixin/index.js +38 -27
  55. package/src/mixins/inputValidationMixin.js +4 -1
  56. package/src/mixins/proxyInputMixin.js +11 -3
  57. package/src/theme/components/button.js +31 -16
  58. package/src/theme/components/checkbox.js +18 -47
  59. package/src/theme/components/comboBox.js +24 -36
  60. package/src/theme/components/container.js +34 -47
  61. package/src/theme/components/divider.js +31 -20
  62. package/src/theme/components/emailField.js +21 -3
  63. package/src/theme/components/image.js +1 -1
  64. package/src/theme/components/index.js +4 -3
  65. package/src/theme/components/inputWrapper.js +72 -0
  66. package/src/theme/components/link.js +15 -22
  67. package/src/theme/components/loader/loaderLinear.js +19 -24
  68. package/src/theme/components/loader/loaderRadial.js +32 -47
  69. package/src/theme/components/logo.js +1 -1
  70. package/src/theme/components/newPassword.js +11 -26
  71. package/src/theme/components/numberField.js +21 -3
  72. package/src/theme/components/passcode.js +17 -28
  73. package/src/theme/components/passwordField.js +19 -65
  74. package/src/theme/components/phoneField.js +18 -57
  75. package/src/theme/components/switchToggle.js +20 -34
  76. package/src/theme/components/text.js +14 -9
  77. package/src/theme/components/textArea.js +20 -37
  78. package/src/theme/components/textField.js +21 -68
@@ -213,14 +213,16 @@ const getThemeVars = (theme, prefix) =>
213
213
  set({}, path, getVarName(prefix ? [prefix, ...path] : path))
214
214
  );
215
215
 
216
- const globalsThemeToStyle = (theme, themeName = '') => `
217
- *[data-theme="${themeName}"] {
218
- ${Object.entries(themeToCSSVarsObj(theme)).reduce(
219
- (acc, entry) => (acc += `${entry.join(':')};\n`),
220
- ''
221
- )}
222
- }
223
- `;
216
+ const globalsThemeToStyle = (theme, themeName = '') => {
217
+ const style = Object.entries(themeToCSSVarsObj(theme)).reduce(
218
+ (acc, entry) => (acc += `${entry.join(':')};\n`),
219
+ ''
220
+ );
221
+
222
+ if(!themeName) return style
223
+
224
+ return `*[data-theme="${themeName}"] {${style}}`
225
+ };
224
226
 
225
227
  const componentsThemeToStyleObj = (componentsTheme) =>
226
228
  transformTheme(componentsTheme, [], (path, val) => {
@@ -506,7 +508,7 @@ const globals = {
506
508
  shadow,
507
509
  fonts
508
510
  };
509
- const vars$l = getThemeVars(globals);
511
+ const vars$m = getThemeVars(globals);
510
512
 
511
513
  const createCssVarFallback = (first, ...rest) =>
512
514
  `var(${first}${rest.length ? ` , ${createCssVarFallback(...rest)}` : ''})`;
@@ -597,14 +599,15 @@ const createClassSelectorSpecifier = (className, numOfRepeats) => Array(numOfRep
597
599
 
598
600
  const STYLE_OVERRIDE_ATTR_PREFIX = 'st';
599
601
 
600
-
601
602
  const createStyleMixin =
602
- ({ mappings = {} }) => (superclass) =>
603
- class CustomStyleMixinClass extends superclass {
603
+ ({ mappings = {}, componentNameOverride = '' }) => (superclass) => {
604
+ const componentName = componentNameOverride || superclass.componentName;
605
+
606
+ return class CustomStyleMixinClass extends superclass {
604
607
  static get cssVarList() {
605
608
  return {
606
609
  ...superclass.cssVarList,
607
- ...createCssVarsList(superclass.componentName, {
610
+ ...createCssVarsList(componentName, {
608
611
  ...mappings,
609
612
  })
610
613
  };
@@ -643,30 +646,32 @@ const createStyleMixin =
643
646
  this.#createOverridesStyle();
644
647
  }
645
648
 
646
- get componentTheme() {
647
- return componentsThemeManager.currentTheme?.[superclass.componentName] || ''
649
+ get #componentTheme() {
650
+ return componentsThemeManager.currentTheme?.[componentName] || ''
648
651
  }
649
652
 
650
653
  #onComponentThemeChange() {
651
- this.#themeStyleEle.innerHTML = this.componentTheme[this.#themeSection];
654
+ this.#themeStyleEle.innerHTML = this.#componentTheme[this.#themeSection];
652
655
  }
653
656
 
654
657
  #createComponentTheme() {
655
658
  this.#themeStyleEle = document.createElement('style');
656
- this.#themeStyleEle.id = 'style-mixin-theme';
659
+ this.#themeStyleEle.id = `style-mixin-theme__${componentName}`;
657
660
  this.#rootElement.prepend(this.#themeStyleEle);
658
661
  this.#disconnectThemeManager = componentsThemeManager.onCurrentThemeChange(this.#onComponentThemeChange.bind(this));
659
662
  this.#onComponentThemeChange();
660
663
  }
661
664
 
662
665
  #createOverridesStyle() {
663
- this.#overrideStyleEle = document.createElement('style');
664
- this.#overrideStyleEle.id = 'style-mixin-overrides';
666
+ if (this.#styleAttributes.length) {
667
+ this.#overrideStyleEle = document.createElement('style');
668
+ this.#overrideStyleEle.id = `style-mixin-overrides__${componentName}`;
665
669
 
666
- const classSpecifier = createClassSelectorSpecifier(superclass.componentName, CSS_SELECTOR_SPECIFIER_MULTIPLY);
670
+ const classSpecifier = createClassSelectorSpecifier(componentName, CSS_SELECTOR_SPECIFIER_MULTIPLY);
667
671
 
668
- this.#overrideStyleEle.innerText = `:host(${classSpecifier}) {}`;
669
- this.#rootElement.append(this.#overrideStyleEle);
672
+ this.#overrideStyleEle.innerText = `:host(${classSpecifier}) {}`;
673
+ this.#rootElement.append(this.#overrideStyleEle);
674
+ }
670
675
  }
671
676
 
672
677
  #setAttrOverride(attrName, value) {
@@ -674,37 +679,44 @@ const createStyleMixin =
674
679
  if (!style) return;
675
680
 
676
681
  const varName = getCssVarName(
677
- superclass.componentName,
682
+ componentName,
678
683
  attrName.replace(new RegExp(`^${STYLE_OVERRIDE_ATTR_PREFIX}-`), '')
679
684
  );
680
685
 
681
686
  if (value) style?.setProperty(varName, value);
682
- else {
687
+ else {
683
688
  style?.removeProperty(varName);
684
689
  this.removeAttribute(attrName);
685
690
  }
686
691
  }
687
692
 
688
693
  #updateOverridesStyle(attrs = []) {
694
+ let shouldUpdate = false;
695
+
689
696
  for (const attr of attrs) {
690
697
  if (this.#styleAttributes.includes(attr)) {
691
698
  this.#setAttrOverride(attr, this.getAttribute(attr));
699
+ shouldUpdate = true;
692
700
  }
693
701
  }
694
702
 
695
- // we are rewriting the style back to the style tag
696
- this.#overrideStyleEle.innerHTML = this.#overrideStyleEle?.sheet?.cssRules[0].cssText;
703
+ if (shouldUpdate) {
704
+ // we are rewriting the style back to the style tag
705
+ this.#overrideStyleEle.innerHTML = this.#overrideStyleEle?.sheet?.cssRules[0].cssText;
706
+ }
697
707
  }
698
708
 
699
709
  #createMappingStyle() {
700
- const themeStyle = document.createElement('style');
701
- themeStyle.id = 'style-mixin-mappings';
702
- themeStyle.innerHTML = createStyle(
703
- kebabCaseJoin(superclass.componentName, this.#componentNameSuffix),
704
- this.#baseSelector,
705
- mappings
706
- );
707
- this.#rootElement.prepend(themeStyle);
710
+ if (Object.keys(mappings).length) {
711
+ const themeStyle = document.createElement('style');
712
+ themeStyle.id = `style-mixin-mappings__${componentName}`;
713
+ themeStyle.innerHTML = createStyle(
714
+ kebabCaseJoin(componentName, this.#componentNameSuffix),
715
+ this.#baseSelector,
716
+ mappings
717
+ );
718
+ this.#rootElement.prepend(themeStyle);
719
+ }
708
720
  }
709
721
 
710
722
  #addClassName(className) {
@@ -714,7 +726,7 @@ const createStyleMixin =
714
726
  init() {
715
727
  super.init?.();
716
728
  if (this.shadowRoot.isConnected) {
717
- this.#addClassName(superclass.componentName);
729
+ this.#addClassName(componentName);
718
730
 
719
731
  // this is instead attributeChangedCallback because we cannot use static methods in this case
720
732
  observeAttributes(this, this.#updateOverridesStyle.bind(this), {});
@@ -726,7 +738,8 @@ const createStyleMixin =
726
738
 
727
739
  this.#disconnectThemeManager?.();
728
740
  }
729
- };
741
+ }
742
+ };
730
743
 
731
744
  const draggableMixin = (superclass) =>
732
745
  class DraggableMixinClass extends superclass {
@@ -1043,13 +1056,16 @@ const inputValidationMixin = (superclass) => class InputValidationMixinClass ext
1043
1056
  stepMismatch,
1044
1057
  tooShort,
1045
1058
  tooLong,
1059
+ rangeOverflow,
1060
+ rangeUnderflow,
1061
+ badInput,
1046
1062
  customError
1047
1063
  } = flags;
1048
1064
  switch (true) {
1049
1065
  case valueMissing:
1050
1066
  return this.getAttribute(errorAttributes.valueMissing) ||
1051
1067
  this.defaultErrorMsgValueMissing
1052
- case patternMismatch || typeMismatch || stepMismatch:
1068
+ case patternMismatch || typeMismatch || stepMismatch || rangeOverflow || rangeUnderflow || badInput:
1053
1069
  return this.getAttribute(errorAttributes.patternMismatch) ||
1054
1070
  this.defaultErrorMsgPatternMismatch
1055
1071
  case tooShort:
@@ -1269,10 +1285,14 @@ const proxyInputMixin = (superclass) =>
1269
1285
  propertyObserver(this, this.inputElement, 'selectionStart');
1270
1286
  this.setSelectionRange = this.inputElement.setSelectionRange?.bind(this.inputElement);
1271
1287
 
1272
- forwardAttrs(this, this.inputElement, {includeAttrs: ['inputmode']});
1288
+ forwardAttrs(this, this.inputElement, { includeAttrs: ['inputmode'] });
1273
1289
  }
1274
1290
  };
1275
1291
 
1292
+ const composedProxyInputMixin = compose(
1293
+ proxyInputMixin,
1294
+ createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }));
1295
+
1276
1296
  // this is needed because we might generate the same css vars names
1277
1297
  // e.g. "overlayColor" attribute in style mixin's mapping,
1278
1298
  // will generate the same var as "color" attribute in portals's mapping
@@ -1429,17 +1449,19 @@ const inputEventsDispatchingMixin = (superclass) => class InputEventsDispatching
1429
1449
  }
1430
1450
  };
1431
1451
 
1432
- const componentName$n = getComponentName('button');
1452
+ const componentName$o = getComponentName('button');
1433
1453
 
1434
1454
  const resetStyles = `
1435
1455
  :host {
1436
1456
  display: inline-block;
1457
+ box-sizing: border-box;
1437
1458
  }
1438
1459
  vaadin-button {
1439
1460
  margin: 0;
1440
1461
  min-width: 0;
1441
1462
  width: 100%;
1442
1463
  height: auto;
1464
+ box-shadow: none;
1443
1465
  }
1444
1466
  vaadin-button::part(label) {
1445
1467
  padding: 0;
@@ -1461,7 +1483,7 @@ const iconStyles = `
1461
1483
 
1462
1484
  const editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;
1463
1485
 
1464
- const { host: host$a, label: label$7 } = {
1486
+ const { host: host$c, label: label$9 } = {
1465
1487
  host: { selector: () => ':host' },
1466
1488
  label: { selector: '::part(label)' },
1467
1489
  };
@@ -1469,17 +1491,23 @@ const { host: host$a, label: label$7 } = {
1469
1491
  const ButtonClass = compose(
1470
1492
  createStyleMixin({
1471
1493
  mappings: {
1472
- color: {},
1473
- textDecoration: label$7,
1474
- fontSize: {},
1494
+ hostWidth: { ...host$c, property: 'width' },
1495
+ fontSize: { property: 'font-size' },
1496
+ fontFamily: { property: 'font-family' },
1497
+
1475
1498
  cursor: {},
1476
1499
  backgroundColor: {},
1500
+
1501
+ outlineOffset: {},
1502
+ outlineColor: {},
1503
+ outlineStyle: {},
1504
+ outlineWidth: {},
1505
+
1477
1506
  borderRadius: {},
1478
1507
  borderColor: {},
1479
1508
  borderStyle: {},
1480
1509
  borderWidth: {},
1481
- width: host$a,
1482
- gap: label$7,
1510
+
1483
1511
  verticalPadding: [
1484
1512
  { property: 'padding-top' },
1485
1513
  { property: 'padding-bottom' },
@@ -1487,7 +1515,12 @@ const ButtonClass = compose(
1487
1515
  horizontalPadding: [
1488
1516
  { property: 'padding-left' },
1489
1517
  { property: 'padding-right' },
1490
- ]
1518
+ ],
1519
+
1520
+ labelTextColor: { property: 'color' },
1521
+ labelTextDecoration: { ...label$9, property: 'text-decoration' },
1522
+ labelSpacing: { ...label$9, property: 'gap' },
1523
+
1491
1524
  }
1492
1525
  }),
1493
1526
  draggableMixin,
@@ -1501,9 +1534,12 @@ const ButtonClass = compose(
1501
1534
  ${iconStyles}
1502
1535
  ${loadingIndicatorStyles}
1503
1536
  ${editorOverrides}
1537
+ :host {
1538
+ padding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}))
1539
+ }
1504
1540
  `,
1505
1541
  excludeAttrsSync: ['tabindex'],
1506
- componentName: componentName$n
1542
+ componentName: componentName$o
1507
1543
  })
1508
1544
  );
1509
1545
 
@@ -1536,47 +1572,54 @@ const loadingIndicatorStyles = `
1536
1572
  }
1537
1573
  `;
1538
1574
 
1539
- const globalRefs$e = getThemeRefs(globals);
1575
+ const globalRefs$c = getThemeRefs(globals);
1540
1576
  const compVars$2 = ButtonClass.cssVarList;
1541
1577
 
1542
1578
  const mode = {
1543
- primary: globalRefs$e.colors.primary,
1544
- secondary: globalRefs$e.colors.secondary,
1545
- success: globalRefs$e.colors.success,
1546
- error: globalRefs$e.colors.error,
1547
- surface: globalRefs$e.colors.surface
1579
+ primary: globalRefs$c.colors.primary,
1580
+ secondary: globalRefs$c.colors.secondary,
1581
+ success: globalRefs$c.colors.success,
1582
+ error: globalRefs$c.colors.error,
1583
+ surface: globalRefs$c.colors.surface
1548
1584
  };
1549
1585
 
1550
- const [helperTheme$2, helperRefs$2, helperVars$2] = createHelperVars({ mode }, componentName$n);
1586
+ const [helperTheme$3, helperRefs$3, helperVars$2] = createHelperVars({ mode }, componentName$o);
1551
1587
 
1552
1588
  const verticalPaddingRatio = 3;
1553
1589
  const horizontalPaddingRatio = 2;
1554
1590
 
1555
1591
  const button = {
1556
- ...helperTheme$2,
1592
+ ...helperTheme$3,
1593
+
1594
+ [compVars$2.fontFamily]: globalRefs$c.fonts.font1.family,
1557
1595
 
1558
1596
  [compVars$2.cursor]: 'pointer',
1559
1597
 
1560
- [compVars$2.borderRadius]: globalRefs$e.radius.sm,
1598
+ [compVars$2.borderRadius]: globalRefs$c.radius.sm,
1561
1599
  [compVars$2.borderWidth]: '2px',
1562
1600
  [compVars$2.borderStyle]: 'solid',
1563
1601
  [compVars$2.borderColor]: 'transparent',
1564
1602
 
1565
- [compVars$2.gap]: '0.25em',
1603
+ [compVars$2.labelSpacing]: '0.25em',
1566
1604
 
1567
1605
  [compVars$2.verticalPadding]: `calc(var(${compVars$2.fontSize}) / ${verticalPaddingRatio})`,
1568
1606
  [compVars$2.horizontalPadding]: `calc(var(${compVars$2.fontSize}) / ${horizontalPaddingRatio})`,
1569
1607
 
1608
+ [compVars$2.outlineWidth]: globals.border.sm,
1609
+ [compVars$2.outlineOffset]: '1px',
1610
+ [compVars$2.outlineStyle]: 'solid',
1611
+ [compVars$2.outlineColor]: 'transparent',
1612
+
1570
1613
  size: {
1571
- xs: { [compVars$2.fontSize]: '12px' },
1572
- sm: { [compVars$2.fontSize]: '14px' },
1573
- md: { [compVars$2.fontSize]: '18px' },
1574
- lg: { [compVars$2.fontSize]: '22px' },
1575
- xl: { [compVars$2.fontSize]: '26px' }
1614
+ xs: { [compVars$2.fontSize]: '8px' },
1615
+ sm: { [compVars$2.fontSize]: '10px' },
1616
+ md: { [compVars$2.fontSize]: '14px' },
1617
+ lg: { [compVars$2.fontSize]: '20px' },
1618
+ xl: { [compVars$2.fontSize]: '25px' }
1576
1619
  },
1577
1620
 
1578
1621
  _fullWidth: {
1579
- [compVars$2.width]: '100%'
1622
+ [compVars$2.hostWidth]: '100%'
1580
1623
  },
1581
1624
 
1582
1625
  _loading: {
@@ -1585,98 +1628,209 @@ const button = {
1585
1628
 
1586
1629
  variant: {
1587
1630
  contained: {
1588
- [compVars$2.color]: helperRefs$2.contrast,
1589
- [compVars$2.backgroundColor]: helperRefs$2.main,
1631
+ [compVars$2.labelTextColor]: helperRefs$3.contrast,
1632
+ [compVars$2.backgroundColor]: helperRefs$3.main,
1590
1633
  _hover: {
1591
- [compVars$2.backgroundColor]: helperRefs$2.dark
1634
+ [compVars$2.backgroundColor]: helperRefs$3.dark
1592
1635
  },
1593
1636
  _active: {
1594
- [compVars$2.backgroundColor]: helperRefs$2.dark
1637
+ [compVars$2.backgroundColor]: helperRefs$3.dark
1595
1638
  }
1596
1639
  },
1597
1640
 
1598
1641
  outline: {
1599
- [compVars$2.color]: helperRefs$2.main,
1642
+ [compVars$2.labelTextColor]: helperRefs$3.main,
1600
1643
  [compVars$2.borderColor]: 'currentColor',
1601
1644
  _hover: {
1602
- [compVars$2.color]: helperRefs$2.dark,
1645
+ [compVars$2.labelTextColor]: helperRefs$3.dark,
1603
1646
  },
1604
1647
  _active: {
1605
- [compVars$2.color]: helperRefs$2.light,
1648
+ [compVars$2.labelTextColor]: helperRefs$3.light,
1606
1649
  }
1607
1650
  },
1608
1651
 
1609
1652
  link: {
1610
- [compVars$2.color]: helperRefs$2.main,
1653
+ [compVars$2.labelTextColor]: helperRefs$3.main,
1611
1654
  _hover: {
1612
- [compVars$2.color]: helperRefs$2.main,
1613
- [compVars$2.textDecoration]: 'underline'
1655
+ [compVars$2.labelTextColor]: helperRefs$3.main,
1656
+ [compVars$2.labelTextDecoration]: 'underline'
1614
1657
  },
1615
1658
  _active: {
1616
- [compVars$2.color]: helperRefs$2.dark
1659
+ [compVars$2.labelTextColor]: helperRefs$3.dark
1617
1660
  }
1618
1661
  }
1662
+ },
1663
+
1664
+ _focused: {
1665
+ [compVars$2.outlineColor]: globals.colors.surface.main,
1619
1666
  }
1620
1667
  };
1621
- const vars$k = { ...compVars$2, ...helperVars$2 };
1668
+
1669
+ const vars$l = {
1670
+ ...compVars$2,
1671
+ ...helperVars$2
1672
+ };
1622
1673
 
1623
1674
  var button$1 = /*#__PURE__*/Object.freeze({
1624
1675
  __proto__: null,
1625
1676
  default: button,
1626
- vars: vars$k
1677
+ vars: vars$l
1627
1678
  });
1628
1679
 
1629
- const selectors$3 = {
1630
- label: '::part(label)',
1631
- inputWrapper: '::part(input-field)',
1632
- readOnlyInput: '[readonly]::part(input-field)::after',
1633
- placeholder: '> input:placeholder-shown',
1634
- host: () => ':host',
1635
- input: 'input'
1680
+ const {
1681
+ host: host$b,
1682
+ label: label$8,
1683
+ placeholder: placeholder$2,
1684
+ requiredIndicator: requiredIndicator$7,
1685
+ inputField: inputField$4,
1686
+ input,
1687
+ readOnlyInput,
1688
+ helperText: helperText$7,
1689
+ errorMessage: errorMessage$7
1690
+ } = {
1691
+ host: { selector: () => ':host' },
1692
+ label: { selector: '::part(label)' },
1693
+ requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
1694
+ placeholder: { selector: '> input:placeholder-shown' },
1695
+ inputField: { selector: '::part(input-field)' },
1696
+ input: { selector: 'input' },
1697
+ readOnlyInput: { selector: '[readonly]::part(input-field)::after' },
1698
+ helperText: { selector: '::part(helper-text)' },
1699
+ errorMessage: { selector: '::part(error-message)' }
1636
1700
  };
1637
1701
 
1638
1702
  var textFieldMappings = {
1639
- backgroundColor: { selector: selectors$3.inputWrapper },
1640
- labelTextColor: { selector: selectors$3.label, property: 'color' },
1641
- color: { selector: selectors$3.inputWrapper },
1642
- width: { selector: selectors$3.host },
1643
- borderColor: [
1644
- { selector: selectors$3.inputWrapper },
1645
- { selector: selectors$3.readOnlyInput }
1703
+ // we apply font-size also on the host so we can set its width with em
1704
+ fontSize: [
1705
+ { property: 'font-size' },
1706
+ { ...host$b, property: 'font-size' }
1646
1707
  ],
1647
- borderWidth: [
1648
- { selector: selectors$3.inputWrapper },
1649
- { selector: selectors$3.readOnlyInput }
1708
+ fontFamily: [
1709
+ { ...label$8, property: 'font-family' },
1710
+ { ...inputField$4, property: 'font-family' },
1711
+ { ...helperText$7, property: 'font-family' },
1712
+ { ...errorMessage$7, property: 'font-family' }
1650
1713
  ],
1651
- borderStyle: [
1652
- { selector: selectors$3.inputWrapper },
1653
- { selector: selectors$3.readOnlyInput }
1714
+
1715
+ hostWidth: { ...host$b, property: 'width' },
1716
+
1717
+ inputBackgroundColor: { ...inputField$4, property: 'background-color' },
1718
+
1719
+ labelTextColor: [
1720
+ { ...label$8, property: 'color' },
1721
+ { ...requiredIndicator$7, property: 'color' }
1654
1722
  ],
1655
- borderRadius: { selector: selectors$3.inputWrapper },
1656
- boxShadow: { selector: selectors$3.inputWrapper },
1657
1723
 
1658
- // we apply font-size also on the host so we can set its width with em
1659
- fontSize: [{}, { selector: selectors$3.host }],
1660
-
1661
- height: { selector: selectors$3.inputWrapper },
1662
- padding: { selector: selectors$3.inputWrapper },
1663
- margin: { selector: selectors$3.inputWrapper },
1664
- caretColor: { selector: selectors$3.input },
1665
- outlineColor: { selector: selectors$3.inputWrapper },
1666
- outlineStyle: { selector: selectors$3.inputWrapper },
1667
- outlineWidth: [
1668
- { selector: selectors$3.inputWrapper },
1669
- // we need to make sure there is enough space for the outline
1670
- { property: 'padding' }
1724
+ inputValueTextColor: { ...inputField$4, property: 'color' },
1725
+ inputCaretTextColor: { ...input, property: 'color' },
1726
+
1727
+ labelRequiredIndicator: { ...requiredIndicator$7, property: 'content' },
1728
+
1729
+ inputBorderColor: [
1730
+ { ...inputField$4, property: 'border-color' },
1731
+ { ...readOnlyInput, property: 'border-color' }
1732
+ ],
1733
+ inputBorderWidth: [
1734
+ { ...inputField$4, property: 'border-width' },
1735
+ { ...readOnlyInput, property: 'border-width' }
1671
1736
  ],
1672
- outlineOffset: { selector: selectors$3.inputWrapper },
1673
- textAlign: { selector: selectors$3.input },
1674
- placeholderColor: { selector: selectors$3.placeholder, property: 'color' }
1737
+ inputBorderStyle: [
1738
+ { ...inputField$4, property: 'border-style' },
1739
+ { ...readOnlyInput, property: 'border-style' }
1740
+ ],
1741
+ inputBorderRadius: { ...inputField$4, property: 'border-radius' },
1742
+
1743
+ inputHeight: { ...inputField$4, property: 'height' },
1744
+ inputPadding: { ...inputField$4, property: 'padding' },
1745
+
1746
+ inputOutlineColor: { ...inputField$4, property: 'outline-color' },
1747
+ inputOutlineStyle: { ...inputField$4, property: 'outline-style' },
1748
+ inputOutlineWidth: { ...inputField$4, property: 'outline-width' },
1749
+ inputOutlineOffset: { ...inputField$4, property: 'outline-offset' },
1750
+
1751
+ inputTextAlign: { ...input, property: 'text-align' },
1752
+
1753
+ inputPlaceholderColor: { ...placeholder$2, property: 'color' }
1675
1754
  };
1676
1755
 
1677
- const componentName$m = getComponentName('text-field');
1756
+ const resetInputOverrides = (name, cssVarList) => `
1757
+ ${resetInputContainer(name)}
1758
+ ${resetInputCursor(name)}
1759
+ ${resetInputPlaceholder(name)}
1760
+ ${resetInputField(name)}
1761
+ ${resetInputAutoFill(name, cssVarList)}
1762
+
1763
+ ${name}::before {
1764
+ height: unset;
1765
+ }
1766
+
1767
+ ${name} > input {
1768
+ -webkit-mask-image: none;
1769
+ min-height: 0;
1770
+ }
1771
+
1772
+ ${name}::part(input-field)::after {
1773
+ opacity: 0 !important;
1774
+ }
1775
+ `;
1776
+
1777
+ const resetInputContainer = (name) => `
1778
+ ${name} {
1779
+ margin: 0;
1780
+ padding: 0;
1781
+ width: 100%;
1782
+ height: 100%;
1783
+ box-sizing: border-box;
1784
+ }
1785
+ `;
1786
+
1787
+ const resetInputField = (name) => `
1788
+ ${name}::part(input-field) {
1789
+ overflow: hidden;
1790
+ padding: 0;
1791
+ box-shadow: none;
1792
+ }
1793
+ `;
1678
1794
 
1679
- let overrides$4 = ``;
1795
+ const resetInputCursor = (name) => `
1796
+ ${name} > label,
1797
+ ${name}::part(label),
1798
+ ${name}::part(required-indicator) {
1799
+ cursor: pointer;
1800
+ }
1801
+ `;
1802
+
1803
+ const resetInputPlaceholder = (name, ele = 'input') => `
1804
+ ${name}[disabled] > ${ele}:placeholder-shown,
1805
+ ${name}[readonly] > ${ele}:placeholder-shown {
1806
+ opacity: 1;
1807
+ }
1808
+ `;
1809
+
1810
+ const resetInputAutoFill = (name, cssVarList) => `
1811
+ ${name} input:-webkit-autofill,
1812
+ ${name} input:-webkit-autofill::first-line,
1813
+ ${name} input:-webkit-autofill:hover,
1814
+ ${name} input:-webkit-autofill:active,
1815
+ ${name} input:-webkit-autofill:focus {
1816
+ -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});
1817
+ box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;
1818
+ }
1819
+ `;
1820
+
1821
+ const resetInputFieldDefaultWidth = () => `
1822
+ :host {
1823
+ --vaadin-field-default-width: auto;
1824
+ }
1825
+ `;
1826
+
1827
+ const resetInputReadonlyStyle = (name) => `
1828
+ ${name}::part(input-field)::after {
1829
+ opacity: 0;
1830
+ }
1831
+ `;
1832
+
1833
+ const componentName$n = getComponentName('text-field');
1680
1834
 
1681
1835
  const observedAttrs = ['type'];
1682
1836
 
@@ -1705,142 +1859,125 @@ const TextFieldClass = compose(
1705
1859
  mappings: textFieldMappings
1706
1860
  }),
1707
1861
  draggableMixin,
1708
- proxyInputMixin,
1862
+ composedProxyInputMixin,
1709
1863
  componentNameValidationMixin,
1710
1864
  customMixin$3
1711
1865
  )(
1712
1866
  createProxy({
1713
1867
  slots: ['prefix', 'suffix'],
1714
1868
  wrappedEleName: 'vaadin-text-field',
1715
- style: () => overrides$4,
1869
+ style: () => `
1870
+ :host {
1871
+ display: inline-block;
1872
+ max-width: 100%;
1873
+ min-width: 10em;
1874
+ padding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${TextFieldClass.cssVarList.inputOutlineOffset}));
1875
+ }
1876
+ ${resetInputFieldDefaultWidth()}
1877
+ ${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}
1878
+ `,
1716
1879
  excludeAttrsSync: ['tabindex'],
1717
- componentName: componentName$m
1880
+ componentName: componentName$n
1718
1881
  })
1719
1882
  );
1720
1883
 
1721
- overrides$4 = `
1722
- :host {
1723
- display: inline-block;
1724
- --vaadin-field-default-width: auto;
1725
- max-width: 100%;
1726
- min-width: 10em;
1727
-
1728
- }
1729
- vaadin-text-field {
1730
- margin: 0;
1731
- width: 100%;
1732
- height: 100%;
1733
- box-sizing: border-box;
1734
- }
1735
-
1736
- vaadin-text-field::part(input-field) {
1737
- overflow: hidden;
1738
- padding: 0;
1739
- }
1740
- vaadin-text-field[disabled] > input:placeholder-shown,
1741
- vaadin-text-field[readonly] > input:placeholder-shown {
1742
- opacity: 1;
1743
- }
1744
- vaadin-text-field input:-webkit-autofill,
1745
- vaadin-text-field input:-webkit-autofill::first-line,
1746
- vaadin-text-field input:-webkit-autofill:hover,
1747
- vaadin-text-field input:-webkit-autofill:active,
1748
- vaadin-text-field input:-webkit-autofill:focus {
1749
- -webkit-text-fill-color: var(${TextFieldClass.cssVarList.color});
1750
- box-shadow: 0 0 0 var(${TextFieldClass.cssVarList.height}) var(${TextFieldClass.cssVarList.backgroundColor}) inset;
1751
- }
1752
-
1753
- vaadin-text-field > input {
1754
- -webkit-mask-image: none;
1755
- min-height: 0;
1756
- }
1757
-
1758
- vaadin-text-field[required]::part(required-indicator)::after {
1759
- content: "*";
1760
- color: var(${TextFieldClass.cssVarList.color});
1761
- }
1762
- vaadin-text-field::part(input-field)::after {
1763
- opacity: 0 !important;
1764
- }
1884
+ const componentName$m = getComponentName('input-wrapper');
1885
+ const globalRefs$b = getThemeRefs(globals);
1765
1886
 
1766
- vaadin-text-field::before {
1767
- height: unset;
1768
- }
1769
- `;
1887
+ const [theme$1, refs, vars$k] = createHelperVars({
1888
+ labelTextColor: globalRefs$b.colors.surface.contrast,
1889
+ valueTextColor: globalRefs$b.colors.surface.contrast,
1890
+ placeholderTextColor: globalRefs$b.colors.surface.main,
1891
+ requiredIndicator: "'*'",
1770
1892
 
1771
- const globalRefs$d = getThemeRefs(globals);
1893
+ borderWidth: globalRefs$b.border.xs,
1894
+ borderRadius: globalRefs$b.radius.xs,
1895
+ borderColor: 'transparent',
1772
1896
 
1773
- const vars$j = TextFieldClass.cssVarList;
1897
+ outlineWidth: globalRefs$b.border.sm,
1898
+ outlineStyle: 'solid',
1899
+ outlineColor: 'transparent',
1900
+ outlineOffset: '0px', // we need to keep the px unit even for 0 value, as this var is used for calc in different component classes
1774
1901
 
1775
- const textField = (vars) => ({
1776
- [vars.padding]: '0 1em',
1902
+ inputHeight: '2em',
1777
1903
 
1778
- [vars.outlineWidth]: '2px',
1779
- [vars.outlineStyle]: 'solid',
1780
- [vars.outlineColor]: 'transparent',
1904
+ backgroundColor: globalRefs$b.colors.surface.light,
1781
1905
 
1782
- [vars.height]: '2em',
1906
+ fontFamily: globalRefs$b.fonts.font1.family,
1783
1907
 
1784
- size: {
1785
- xs: {
1786
- [vars.fontSize]: '8px',
1787
- },
1788
- sm: {
1789
- [vars.fontSize]: '10px',
1790
- },
1791
- md: {
1792
- [vars.fontSize]: '14px',
1793
- },
1794
- lg: {
1795
- [vars.fontSize]: '20px',
1796
- },
1797
- xl: {
1798
- [vars.fontSize]: '25px',
1799
- }
1800
- },
1908
+ size: {
1909
+ xs: { fontSize: '8px' },
1910
+ sm: { fontSize: '10px' },
1911
+ md: { fontSize: '14px' },
1912
+ lg: { fontSize: '20px' },
1913
+ xl: { fontSize: '25px' }
1914
+ },
1801
1915
 
1802
- [vars.color]: globalRefs$d.colors.surface.contrast,
1803
- [vars.labelTextColor]: globalRefs$d.colors.surface.contrast,
1804
- [vars.placeholderColor]: globalRefs$d.colors.surface.main,
1916
+ _fullWidth: {
1917
+ width: '100%',
1918
+ },
1805
1919
 
1806
- [vars.backgroundColor]: globalRefs$d.colors.surface.light,
1920
+ _focused: {
1921
+ outlineColor: globalRefs$b.colors.surface.main,
1922
+ _invalid: {
1923
+ outlineColor: globalRefs$b.colors.error.light,
1924
+ }
1925
+ },
1807
1926
 
1808
- [vars.borderWidth]: '1px',
1809
- [vars.borderStyle]: 'solid',
1810
- [vars.borderColor]: 'transparent',
1811
- [vars.borderRadius]: globalRefs$d.radius.xs,
1927
+ _bordered: {
1928
+ borderColor: globalRefs$b.colors.surface.main,
1929
+ borderStyle: 'solid',
1930
+ _invalid: {
1931
+ borderColor: globalRefs$b.colors.error.main,
1932
+ }
1933
+ },
1812
1934
 
1813
- _disabled: {
1814
- [vars.color]: globalRefs$d.colors.surface.dark,
1815
- [vars.placeholderColor]: globalRefs$d.colors.surface.light,
1816
- [vars.backgroundColor]: globalRefs$d.colors.surface.main
1817
- },
1935
+ _disabled: {
1936
+ labelTextColor: globalRefs$b.colors.surface.main,
1937
+ valueTextColor: globalRefs$b.colors.surface.dark,
1938
+ placeholderTextColor: globalRefs$b.colors.surface.dark,
1939
+ backgroundColor: globalRefs$b.colors.surface.main
1940
+ },
1818
1941
 
1819
- _fullWidth: {
1820
- [vars.width]: '100%'
1821
- },
1942
+ _invalid: {
1943
+ labelTextColor: globalRefs$b.colors.error.main,
1944
+ valueTextColor: globalRefs$b.colors.error.main,
1945
+ placeholderTextColor: globalRefs$b.colors.error.light,
1946
+ }
1947
+ }, componentName$m);
1822
1948
 
1823
- _focused: {
1824
- [vars.outlineColor]: globalRefs$d.colors.surface.main
1825
- },
1949
+ var inputWrapper = /*#__PURE__*/Object.freeze({
1950
+ __proto__: null,
1951
+ default: theme$1,
1952
+ refs: refs,
1953
+ vars: vars$k
1954
+ });
1826
1955
 
1827
- _bordered: {
1828
- [vars.borderColor]: globalRefs$d.colors.surface.main
1829
- },
1956
+ const vars$j = TextFieldClass.cssVarList;
1830
1957
 
1831
- _invalid: {
1832
- [vars.borderColor]: globalRefs$d.colors.error.main,
1833
- [vars.color]: globalRefs$d.colors.error.main,
1834
- [vars.outlineColor]: globalRefs$d.colors.error.light,
1835
- [vars.placeholderColor]: globalRefs$d.colors.error.light
1836
- }
1958
+ const textField = ({
1959
+ [vars$j.hostWidth]: refs.width,
1960
+ [vars$j.fontSize]: refs.fontSize,
1961
+ [vars$j.fontFamily]: refs.fontFamily,
1962
+ [vars$j.labelTextColor]: refs.labelTextColor,
1963
+ [vars$j.labelRequiredIndicator]: refs.requiredIndicator,
1964
+ [vars$j.inputValueTextColor]: refs.valueTextColor,
1965
+ [vars$j.inputPlaceholderColor]: refs.placeholderTextColor,
1966
+ [vars$j.inputBorderWidth]: refs.borderWidth,
1967
+ [vars$j.inputBorderStyle]: refs.borderStyle,
1968
+ [vars$j.inputBorderColor]: refs.borderColor,
1969
+ [vars$j.inputBorderRadius]: refs.borderRadius,
1970
+ [vars$j.inputOutlineWidth]: refs.outlineWidth,
1971
+ [vars$j.inputOutlineStyle]: refs.outlineStyle,
1972
+ [vars$j.inputOutlineColor]: refs.outlineColor,
1973
+ [vars$j.inputOutlineOffset]: refs.outlineOffset,
1974
+ [vars$j.inputBackgroundColor]: refs.backgroundColor,
1975
+ [vars$j.inputHeight]: refs.inputHeight,
1837
1976
  });
1838
1977
 
1839
- var textField$1 = textField(vars$j);
1840
-
1841
- var textField$2 = /*#__PURE__*/Object.freeze({
1978
+ var textField$1 = /*#__PURE__*/Object.freeze({
1842
1979
  __proto__: null,
1843
- default: textField$1,
1980
+ default: textField,
1844
1981
  textField: textField,
1845
1982
  vars: vars$j
1846
1983
  });
@@ -1881,91 +2018,94 @@ const passwordDraggableMixin = (superclass) => class PasswordDraggableMixinClass
1881
2018
  const componentName$l = getComponentName('password-field');
1882
2019
 
1883
2020
  const {
1884
- host: host$9,
1885
- inputWrapper: inputWrapper$1,
2021
+ host: host$a,
2022
+ inputField: inputField$3,
1886
2023
  inputElement,
1887
2024
  inputElementPlaceholder,
1888
- revealButton,
1889
2025
  revealButtonIcon,
1890
- revealButtonIconOutline,
1891
- label: label$6,
1892
- requiredIndicator: requiredIndicator$5
2026
+ label: label$7,
2027
+ requiredIndicator: requiredIndicator$6,
2028
+ errorMessage: errorMessage$6,
2029
+ helperText: helperText$6
1893
2030
  } = {
1894
2031
  host: { selector: () => ':host' },
1895
- inputWrapper: { selector: '::part(input-field)' },
2032
+ inputField: { selector: '::part(input-field)' },
1896
2033
  inputElement: { selector: '> input' },
1897
2034
  inputElementPlaceholder: { selector: '> input:placeholder-shown' },
1898
- revealButton: { selector: 'vaadin-password-field-button' },
1899
2035
  revealButtonIcon: { selector: () => '::part(reveal-button)::before' },
1900
- revealButtonIconOutline: { selector: () => 'vaadin-password-field-button[focus-ring]' },
1901
2036
  label: { selector: '::part(label)' },
1902
- requiredIndicator: { selector: '::part(required-indicator)::after' },
2037
+ requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
2038
+ helperText: { selector: '::part(helper-text)' },
2039
+ errorMessage: { selector: '::part(error-message)' }
1903
2040
  };
1904
2041
 
1905
2042
  const PasswordFieldClass = compose(
1906
2043
  createStyleMixin({
1907
2044
  mappings: {
1908
- width: host$9,
1909
- wrapperBorderStyle: { ...inputWrapper$1, property: 'border-style' },
1910
- wrapperBorderWidth: { ...inputWrapper$1, property: 'border-width' },
1911
- wrapperBorderColor: { ...inputWrapper$1, property: 'border-color' },
1912
- wrapperBorderRadius: { ...inputWrapper$1, property: 'border-radius' },
1913
-
1914
- revealButtonOutlineBoxShadow: [
1915
- {
1916
- ...revealButtonIconOutline,
1917
- property: 'box-shadow'
1918
- }
2045
+ hostWidth: { ...host$a, property: 'width' },
2046
+ fontSize: [
2047
+ { property: 'font-size' },
2048
+ { ...host$a, property: 'font-size' }
2049
+ ],
2050
+ fontFamily: [
2051
+ label$7,
2052
+ inputField$3,
2053
+ errorMessage$6,
2054
+ helperText$6
1919
2055
  ],
2056
+ inputHeight: { ...inputField$3, property: 'height' },
2057
+ inputBackgroundColor: { ...inputField$3, property: 'background-color' },
2058
+
2059
+ inputBorderStyle: { ...inputField$3, property: 'border-style' },
2060
+ inputBorderWidth: { ...inputField$3, property: 'border-width' },
2061
+ inputBorderColor: { ...inputField$3, property: 'border-color' },
2062
+ inputBorderRadius: { ...inputField$3, property: 'border-radius' },
2063
+
2064
+ inputOutlineColor: { ...inputField$3, property: 'outline-color' },
2065
+ inputOutlineStyle: { ...inputField$3, property: 'outline-style' },
2066
+ inputOutlineOffset: { ...inputField$3, property: 'outline-offset' },
2067
+ inputOutlineWidth: { ...inputField$3, property: 'outline-width' },
1920
2068
 
1921
2069
  labelTextColor: [
1922
- { ...label$6, property: 'color' },
1923
- { ...requiredIndicator$5, property: 'color' }
2070
+ { ...label$7, property: 'color' },
2071
+ { ...requiredIndicator$6, property: 'color' }
1924
2072
  ],
1925
- inputTextColor: [
2073
+ labelRequiredIndicator: { ...requiredIndicator$6, property: 'content' },
2074
+
2075
+ inputValueTextColor: [
1926
2076
  { ...inputElement, property: 'color' },
1927
2077
  { ...revealButtonIcon, property: 'color' }
1928
2078
  ],
1929
- placeholderTextColor: { ...inputElementPlaceholder, property: 'color' },
1930
- fontSize: [{}, host$9],
1931
- height: inputWrapper$1,
1932
- padding: inputWrapper$1,
1933
- pointerCursor: [
1934
- { ...revealButton, property: 'cursor' },
1935
- { ...label$6, property: 'cursor' },
1936
- { ...requiredIndicator$5, property: 'cursor' }
1937
- ],
1938
- outlineColor: inputWrapper$1,
1939
- outlineStyle: inputWrapper$1,
1940
- outlineWidth: [
1941
- inputWrapper$1,
1942
- // we need to make sure there is enough space for the outline
1943
- { property: 'padding' }
1944
- ],
1945
- backgroundColor: inputWrapper$1
2079
+ inputPlaceholderTextColor: { ...inputElementPlaceholder, property: 'color' },
1946
2080
  }
1947
2081
  }),
1948
2082
  draggableMixin,
1949
- proxyInputMixin,
2083
+ composedProxyInputMixin,
1950
2084
  componentNameValidationMixin,
1951
2085
  passwordDraggableMixin
1952
2086
  )(
1953
2087
  createProxy({
1954
2088
  slots: ['suffix'],
1955
2089
  wrappedEleName: 'vaadin-password-field',
1956
- style: `
2090
+ style: () => `
1957
2091
  :host {
1958
2092
  display: inline-block;
1959
2093
  min-width: 10em;
1960
2094
  max-width: 100%;
2095
+ box-sizing: border-box;
2096
+ padding: calc(var(${PasswordFieldClass.cssVarList.inputOutlineWidth}) + var(${PasswordFieldClass.cssVarList.inputOutlineOffset}));
1961
2097
  }
1962
2098
  vaadin-password-field {
1963
2099
  width: 100%;
1964
2100
  box-sizing: border-box;
2101
+ padding: 0;
1965
2102
  }
1966
2103
  vaadin-password-field::part(input-field) {
1967
2104
  padding: 0;
1968
2105
  }
2106
+ vaadin-password-field[focus-ring]::part(input-field) {
2107
+ box-shadow: none;
2108
+ }
1969
2109
  vaadin-password-field > input {
1970
2110
  min-height: 0;
1971
2111
  -webkit-mask-image: none;
@@ -1978,84 +2118,46 @@ const PasswordFieldClass = compose(
1978
2118
  }
1979
2119
  vaadin-password-field::part(input-field)::after {
1980
2120
  opacity: 0;
1981
- }
1982
- vaadin-password-field[required]::part(required-indicator)::after {
1983
- content: "*";
1984
2121
  }
2122
+ vaadin-password-field-button {
2123
+ cursor: pointer;
2124
+ }
2125
+
2126
+ ${resetInputCursor('vaadin-password-field')}
2127
+
1985
2128
  [readonly] vaadin-password-field-button {
1986
2129
  pointer-events: none;
1987
2130
  }
2131
+
2132
+ vaadin-password-field-button[focus-ring] {
2133
+ box-shadow: 0 0 0 2px var(${PasswordFieldClass.cssVarList.inputOutlineColor});
2134
+ }
1988
2135
  `,
1989
2136
  excludeAttrsSync: ['tabindex'],
1990
2137
  componentName: componentName$l
1991
2138
  })
1992
2139
  );
1993
2140
 
1994
- const globalRefs$c = getThemeRefs(globals);
1995
-
1996
2141
  const vars$i = PasswordFieldClass.cssVarList;
1997
2142
 
1998
2143
  const passwordField = {
1999
- [vars$i.wrapperBorderStyle]: 'solid',
2000
- [vars$i.wrapperBorderWidth]: '1px',
2001
- [vars$i.wrapperBorderColor]: 'transparent',
2002
- [vars$i.wrapperBorderRadius]: globalRefs$c.radius.xs,
2003
- [vars$i.backgroundColor]: globalRefs$c.colors.surface.light,
2004
-
2005
- [vars$i.outlineWidth]: '2px',
2006
- [vars$i.outlineStyle]: 'solid',
2007
- [vars$i.outlineColor]: 'transparent',
2008
-
2009
- [vars$i.revealButtonOutlineBoxShadow]: `0 0 0 2px ${globalRefs$c.colors.surface.main}`,
2010
-
2011
-
2012
- [vars$i.labelTextColor]: globalRefs$c.colors.surface.contrast,
2013
- [vars$i.inputTextColor]: globalRefs$c.colors.surface.contrast,
2014
- [vars$i.placeholderTextColor]: globalRefs$c.colors.surface.main,
2015
-
2016
- [vars$i.pointerCursor]: 'pointer',
2017
-
2018
- [vars$i.padding]: '0',
2019
- [vars$i.height]: '2em',
2020
-
2021
- size: {
2022
- xs: {
2023
- [vars$i.fontSize]: '8px',
2024
- },
2025
- sm: {
2026
- [vars$i.fontSize]: '10px',
2027
- },
2028
- md: {
2029
- [vars$i.fontSize]: '14px',
2030
- },
2031
- lg: {
2032
- [vars$i.fontSize]: '20px',
2033
- },
2034
- xl: {
2035
- [vars$i.fontSize]: '25px',
2036
- }
2037
- },
2038
-
2039
- _bordered: {
2040
- [vars$i.padding]: '0 0.5em',
2041
- [vars$i.wrapperBorderColor]: globalRefs$c.colors.surface.main
2042
- },
2043
-
2044
- _fullWidth: {
2045
- [vars$i.width]: '100%'
2046
- },
2047
-
2048
- _focused: {
2049
- [vars$i.outlineColor]: globalRefs$c.colors.surface.main
2050
- },
2051
-
2052
- _invalid: {
2053
- [vars$i.labelTextColor]: globalRefs$c.colors.error.main,
2054
- [vars$i.inputTextColor]: globalRefs$c.colors.error.main,
2055
- [vars$i.placeholderTextColor]: globalRefs$c.colors.error.light,
2056
- [vars$i.wrapperBorderColor]: globalRefs$c.colors.error.main,
2057
- [vars$i.outlineColor]: globalRefs$c.colors.error.light,
2058
- },
2144
+ [vars$i.hostWidth]: refs.width,
2145
+ [vars$i.fontSize]: refs.fontSize,
2146
+ [vars$i.fontFamily]: refs.fontFamily,
2147
+ [vars$i.labelTextColor]: refs.labelTextColor,
2148
+ [vars$i.inputHeight]: refs.inputHeight,
2149
+ [vars$i.inputBackgroundColor]: refs.backgroundColor,
2150
+ [vars$i.labelRequiredIndicator]: refs.requiredIndicator,
2151
+ [vars$i.inputValueTextColor]: refs.valueTextColor,
2152
+ [vars$i.inputPlaceholderTextColor]: refs.placeholderTextColor,
2153
+ [vars$i.inputBorderWidth]: refs.borderWidth,
2154
+ [vars$i.inputBorderStyle]: refs.borderStyle,
2155
+ [vars$i.inputBorderColor]: refs.borderColor,
2156
+ [vars$i.inputBorderRadius]: refs.borderRadius,
2157
+ [vars$i.inputOutlineWidth]: refs.outlineWidth,
2158
+ [vars$i.inputOutlineStyle]: refs.outlineStyle,
2159
+ [vars$i.inputOutlineColor]: refs.outlineColor,
2160
+ [vars$i.inputOutlineOffset]: refs.outlineOffset,
2059
2161
  };
2060
2162
 
2061
2163
  var passwordField$1 = /*#__PURE__*/Object.freeze({
@@ -2066,68 +2168,52 @@ var passwordField$1 = /*#__PURE__*/Object.freeze({
2066
2168
 
2067
2169
  const componentName$k = getComponentName('number-field');
2068
2170
 
2069
- let overrides$3 = ``;
2070
-
2071
2171
  const NumberFieldClass = compose(
2072
2172
  createStyleMixin({
2073
- mappings: {
2074
- ...textFieldMappings
2075
- }
2173
+ mappings: textFieldMappings
2076
2174
  }),
2077
2175
  draggableMixin,
2078
- proxyInputMixin,
2176
+ composedProxyInputMixin,
2079
2177
  componentNameValidationMixin
2080
2178
  )(
2081
2179
  createProxy({
2082
2180
  slots: ['prefix', 'suffix'],
2083
2181
  wrappedEleName: 'vaadin-number-field',
2084
- style: () => overrides$3,
2182
+ style: () => `
2183
+ :host {
2184
+ display: inline-block;
2185
+ max-width: 100%;
2186
+ min-width: 10em;
2187
+ padding: calc(var(${NumberFieldClass.cssVarList.inputOutlineWidth}) + var(${NumberFieldClass.cssVarList.inputOutlineOffset}));
2188
+ }
2189
+ ${resetInputOverrides('vaadin-number-field', NumberFieldClass.cssVarList)}
2190
+ `,
2085
2191
  excludeAttrsSync: ['tabindex'],
2086
2192
  componentName: componentName$k
2087
2193
  })
2088
2194
  );
2089
2195
 
2090
- overrides$3 = `
2091
- :host {
2092
- display: inline-block;
2093
- min-width: 10em;
2094
- max-width: 100%;
2095
- }
2096
- vaadin-number-field {
2097
- margin: 0;
2098
- padding: 0;
2099
- width: 100%;
2100
- }
2101
- vaadin-number-field > input {
2102
- -webkit-mask-image: none;
2103
- }
2104
- vaadin-number-field::part(input-field) {
2105
- padding: 0;
2106
- }
2107
- vaadin-number-field[readonly] > input:placeholder-shown {
2108
- opacity: 1;
2109
- }
2110
- vaadin-number-field input:-webkit-autofill,
2111
- vaadin-number-field input:-webkit-autofill::first-line,
2112
- vaadin-number-field input:-webkit-autofill:hover,
2113
- vaadin-number-field input:-webkit-autofill:active,
2114
- vaadin-number-field input:-webkit-autofill:focus {
2115
- -webkit-text-fill-color: var(${NumberFieldClass.cssVarList.color});
2116
- box-shadow: 0 0 0 var(${NumberFieldClass.cssVarList.height}) var(${NumberFieldClass.cssVarList.backgroundColor}) inset;
2117
- }
2118
- vaadin-number-field[required]::part(required-indicator)::after {
2119
- content: "*";
2120
- color: var(${NumberFieldClass.cssVarList.color});
2121
- }
2122
- vaadin-number-field[readonly]::part(input-field)::after {
2123
- border: 0 solid;
2124
- }
2125
- `;
2196
+ const vars$h = NumberFieldClass.cssVarList;
2126
2197
 
2127
2198
  const numberField = {
2128
- ...textField(NumberFieldClass.cssVarList)
2199
+ [vars$h.hostWidth]: refs.width,
2200
+ [vars$h.fontSize]: refs.fontSize,
2201
+ [vars$h.fontFamily]: refs.fontFamily,
2202
+ [vars$h.labelTextColor]: refs.labelTextColor,
2203
+ [vars$h.inputValueTextColor]: refs.valueTextColor,
2204
+ [vars$h.inputPlaceholderColor]: refs.placeholderTextColor,
2205
+ [vars$h.inputBorderWidth]: refs.borderWidth,
2206
+ [vars$h.inputBorderStyle]: refs.borderStyle,
2207
+ [vars$h.inputBorderColor]: refs.borderColor,
2208
+ [vars$h.inputBorderRadius]: refs.borderRadius,
2209
+ [vars$h.inputOutlineWidth]: refs.outlineWidth,
2210
+ [vars$h.inputOutlineStyle]: refs.outlineStyle,
2211
+ [vars$h.inputOutlineColor]: refs.outlineColor,
2212
+ [vars$h.inputOutlineOffset]: refs.outlineOffset,
2213
+ [vars$h.inputBackgroundColor]: refs.backgroundColor,
2214
+ [vars$h.labelRequiredIndicator]: refs.requiredIndicator,
2215
+ [vars$h.inputHeight]: refs.inputHeight,
2129
2216
  };
2130
- const vars$h = NumberFieldClass.cssVarList;
2131
2217
 
2132
2218
  var numberField$1 = /*#__PURE__*/Object.freeze({
2133
2219
  __proto__: null,
@@ -2137,72 +2223,52 @@ var numberField$1 = /*#__PURE__*/Object.freeze({
2137
2223
 
2138
2224
  const componentName$j = getComponentName('email-field');
2139
2225
 
2140
- let overrides$2 = ``;
2141
-
2142
2226
  const EmailFieldClass = compose(
2143
2227
  createStyleMixin({
2144
- mappings: {
2145
- ...textFieldMappings
2146
- }
2228
+ mappings: textFieldMappings
2147
2229
  }),
2148
2230
  draggableMixin,
2149
- proxyInputMixin,
2231
+ composedProxyInputMixin,
2150
2232
  componentNameValidationMixin
2151
2233
  )(
2152
2234
  createProxy({
2153
2235
  slots: ['suffix'],
2154
2236
  wrappedEleName: 'vaadin-email-field',
2155
- style: () => overrides$2,
2156
- excludeAttrsSync: ['tabindex'],
2157
- componentName: componentName$j
2158
- })
2159
- );
2160
-
2161
- overrides$2 = `
2162
- :host {
2163
- display: inline-block;
2164
- min-width: 10em;
2165
- max-width: 100%;
2166
- }
2167
- vaadin-email-field {
2168
- margin: 0;
2169
- width: 100%;
2170
- box-sizing: border-box;
2171
- }
2172
- vaadin-email-field::before {
2173
- height: 0;
2174
- }
2175
- vaadin-email-field > input {
2176
- -webkit-mask-image: none;
2177
- }
2178
- vaadin-email-field::part(input-field) {
2179
- overflow: hidden;
2180
- padding: 0;
2181
- }
2182
- vaadin-email-field[readonly] > input:placeholder-shown {
2183
- opacity: 1;
2184
- }
2185
- vaadin-email-field input:-webkit-autofill,
2186
- vaadin-email-field input:-webkit-autofill::first-line,
2187
- vaadin-email-field input:-webkit-autofill:hover,
2188
- vaadin-email-field input:-webkit-autofill:active,
2189
- vaadin-email-field input:-webkit-autofill:focus {
2190
- -webkit-text-fill-color: var(${EmailFieldClass.cssVarList.color});
2191
- box-shadow: 0 0 0 var(${EmailFieldClass.cssVarList.height}) var(${EmailFieldClass.cssVarList.backgroundColor}) inset;
2192
- }
2193
- vaadin-email-field[required]::part(required-indicator)::after {
2194
- content: "*";
2195
- color: var(${EmailFieldClass.cssVarList.color});
2196
- }
2197
- vaadin-email-field[readonly]::part(input-field)::after {
2198
- border: 0 solid;
2199
- }
2200
- `;
2237
+ style: () => `
2238
+ :host {
2239
+ display: inline-block;
2240
+ max-width: 100%;
2241
+ min-width: 10em;
2242
+ padding: calc(var(${EmailFieldClass.cssVarList.inputOutlineWidth}) + var(${EmailFieldClass.cssVarList.inputOutlineOffset}))
2243
+ }
2244
+ ${resetInputOverrides('vaadin-email-field', EmailFieldClass.cssVarList)}
2245
+ `,
2246
+ excludeAttrsSync: ['tabindex'],
2247
+ componentName: componentName$j
2248
+ })
2249
+ );
2250
+
2251
+ const vars$g = EmailFieldClass.cssVarList;
2201
2252
 
2202
2253
  const emailField = {
2203
- ...textField(EmailFieldClass.cssVarList)
2254
+ [vars$g.hostWidth]: refs.width,
2255
+ [vars$g.fontSize]: refs.fontSize,
2256
+ [vars$g.fontFamily]: refs.fontFamily,
2257
+ [vars$g.labelTextColor]: refs.labelTextColor,
2258
+ [vars$g.inputValueTextColor]: refs.valueTextColor,
2259
+ [vars$g.labelRequiredIndicator]: refs.requiredIndicator,
2260
+ [vars$g.inputPlaceholderColor]: refs.placeholderTextColor,
2261
+ [vars$g.inputBorderWidth]: refs.borderWidth,
2262
+ [vars$g.inputBorderStyle]: refs.borderStyle,
2263
+ [vars$g.inputBorderColor]: refs.borderColor,
2264
+ [vars$g.inputBorderRadius]: refs.borderRadius,
2265
+ [vars$g.inputOutlineWidth]: refs.outlineWidth,
2266
+ [vars$g.inputOutlineStyle]: refs.outlineStyle,
2267
+ [vars$g.inputOutlineColor]: refs.outlineColor,
2268
+ [vars$g.inputOutlineOffset]: refs.outlineOffset,
2269
+ [vars$g.inputBackgroundColor]: refs.backgroundColor,
2270
+ [vars$g.inputHeight]: refs.inputHeight
2204
2271
  };
2205
- const vars$g = EmailFieldClass.cssVarList;
2206
2272
 
2207
2273
  var emailField$1 = /*#__PURE__*/Object.freeze({
2208
2274
  __proto__: null,
@@ -2213,130 +2279,111 @@ var emailField$1 = /*#__PURE__*/Object.freeze({
2213
2279
  const componentName$i = getComponentName('text-area');
2214
2280
 
2215
2281
  const {
2216
- host: host$8,
2282
+ host: host$9,
2283
+ label: label$6,
2217
2284
  placeholder: placeholder$1,
2218
- input: input$1,
2285
+ inputField: inputField$2,
2219
2286
  textArea: textArea$2,
2220
- label: label$5,
2221
- requiredIndicator: requiredIndicator$4
2287
+ requiredIndicator: requiredIndicator$5,
2288
+ helperText: helperText$5,
2289
+ errorMessage: errorMessage$5
2222
2290
  } = {
2223
2291
  host: { selector: () => ':host' },
2224
- textArea: { selector: '> textarea' },
2225
2292
  label: { selector: '::part(label)' },
2226
- input: { selector: '::part(input-field)' },
2227
2293
  placeholder: { selector: 'textarea:placeholder-shown' },
2228
- requiredIndicator: { selector: '::part(required-indicator)::after' },
2294
+ inputField: { selector: '::part(input-field)' },
2295
+ textArea: { selector: '> textarea' },
2296
+ requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
2297
+ helperText: { selector: '::part(helper-text)' },
2298
+ errorMessage: { selector: '::part(error-message)' }
2229
2299
  };
2230
2300
 
2231
- let overrides$1 = ``;
2232
-
2233
2301
  const TextAreaClass = compose(
2234
2302
  createStyleMixin({
2235
2303
  mappings: {
2236
- fontSize: [host$8, textArea$2],
2237
- resize: textArea$2,
2238
- color: textArea$2,
2239
- cursor: {},
2240
- labelColor: [
2241
- { ...label$5, property: 'color' },
2242
- { ...requiredIndicator$4, property: 'color' }
2304
+ hostWidth: { ...host$9, property: 'width' },
2305
+ fontSize: [
2306
+ { ...host$9, property: 'font-size' },
2307
+ { ...textArea$2, property: 'font-size' }
2308
+ ],
2309
+ fontFamily: [
2310
+ { ...label$6, property: 'font-family' },
2311
+ { ...inputField$2, property: 'font-family' },
2312
+ { ...helperText$5, property: 'font-family' },
2313
+ { ...errorMessage$5, property: 'font-family' }
2314
+ ],
2315
+ labelTextColor: [
2316
+ { ...label$6, property: 'color' },
2317
+ { ...requiredIndicator$5, property: 'color' }
2243
2318
  ],
2244
- placeholderColor: { ...placeholder$1, property: 'color' },
2245
- width: host$8,
2246
- backgroundColor: input$1,
2247
- borderWidth: input$1,
2248
- borderStyle: input$1,
2249
- borderColor: input$1,
2250
- borderRadius: input$1,
2251
- outlineWidth: [input$1, { property: 'padding' }],
2252
- outlineStyle: input$1,
2253
- outlineColor: input$1,
2254
- outlineOffset: input$1,
2319
+ labelRequiredIndicator: { ...requiredIndicator$5, property: 'content' },
2320
+ inputBackgroundColor: { ...inputField$2, property: 'background-color' },
2321
+ inputValueTextColor: { ...textArea$2, property: 'color' },
2322
+ inputPlaceholderTextColor: { ...placeholder$1, property: 'color' },
2323
+ inputBorderWidth: { ...inputField$2, property: 'border-width' },
2324
+ inputBorderStyle: { ...inputField$2, property: 'border-style' },
2325
+ inputBorderColor: { ...inputField$2, property: 'border-color' },
2326
+ inputBorderRadius: { ...inputField$2, property: 'border-radius' },
2327
+ inputOutlineStyle: { ...inputField$2, property: 'outline-Style' },
2328
+ inputOutlineColor: { ...inputField$2, property: 'outline-color' },
2329
+ inputOutlineOffset: { ...inputField$2, property: 'outline-offset' },
2330
+ inputOutlineWidth: { ...inputField$2, property: 'outline-width' },
2331
+ inputResizeType: { ...textArea$2, property: 'resize' },
2255
2332
  }
2256
2333
  }),
2257
2334
  draggableMixin,
2258
- proxyInputMixin,
2335
+ composedProxyInputMixin,
2259
2336
  componentNameValidationMixin
2260
2337
  )(
2261
2338
  createProxy({
2262
2339
  slots: [],
2263
2340
  wrappedEleName: 'vaadin-text-area',
2264
- style: () => overrides$1,
2341
+ style: () => `
2342
+ :host {
2343
+ display: inline-block;
2344
+ min-width: 10em;
2345
+ max-width: 100%;
2346
+ padding: calc(var(${TextAreaClass.cssVarList.inputOutlineWidth}) + var(${TextAreaClass.cssVarList.inputOutlineOffset}));
2347
+ }
2348
+
2349
+ ${resetInputContainer('vaadin-text-area')}
2350
+ ${resetInputField('vaadin-text-area')}
2351
+ ${resetInputPlaceholder('vaadin-text-area', 'textarea')}
2352
+ ${resetInputCursor('vaadin-text-area')}
2353
+ `,
2265
2354
  excludeAttrsSync: ['tabindex'],
2266
2355
  componentName: componentName$i
2267
2356
  })
2268
2357
  );
2269
2358
 
2270
- overrides$1 = `
2271
- :host {
2272
- display: inline-block;
2273
- min-width: 10em;
2274
- max-width: 100%;
2275
- }
2276
- vaadin-text-area {
2277
- margin: 0;
2278
- width: 100%;
2279
- box-sizing: border-box;
2280
- }
2281
- vaadin-text-area > label,
2282
- vaadin-text-area::part(input-field) {
2283
- padding: 0;
2284
- }
2285
- vaadin-text-area[required]::part(required-indicator)::after {
2286
- content: "*";
2287
- }
2288
- vaadin-text-area[disabled] > textarea:placeholder-shown,
2289
- vaadin-text-area[readonly] > textarea:placeholder-shown {
2290
- opacity: 1;
2291
- }
2292
- `;
2293
-
2294
- const globalRefs$b = getThemeRefs(globals);
2359
+ const globalRefs$a = getThemeRefs(globals);
2295
2360
  const vars$f = TextAreaClass.cssVarList;
2296
2361
 
2297
2362
  const textArea = {
2298
- [vars$f.labelColor]: globalRefs$b.colors.surface.contrast,
2299
- [vars$f.placeholderColor]: globalRefs$b.colors.surface.main,
2300
- [vars$f.color]: globalRefs$b.colors.surface.contrast,
2363
+ [vars$f.hostWidth]: refs.width,
2301
2364
  [vars$f.fontSize]: '14px',
2302
-
2303
- [vars$f.backgroundColor]: globalRefs$b.colors.surface.light,
2304
- [vars$f.resize]: 'vertical',
2305
-
2306
- [vars$f.borderRadius]: globalRefs$b.radius.sm,
2307
- [vars$f.borderWidth]: '1px',
2308
- [vars$f.borderStyle]: 'solid',
2309
- [vars$f.borderColor]: 'transparent',
2310
- [vars$f.outlineWidth]: '2px',
2311
- [vars$f.outlineStyle]: 'solid',
2312
- [vars$f.outlineColor]: 'transparent',
2313
- [vars$f.outlineOffset]: '0',
2314
-
2315
- _fullWidth: {
2316
- [vars$f.width]: '100%'
2317
- },
2318
-
2319
- _focused: {
2320
- [vars$f.outlineColor]: globalRefs$b.colors.surface.main
2321
- },
2365
+ [vars$f.fontFamily]: refs.fontFamily,
2366
+ [vars$f.labelTextColor]: refs.labelTextColor,
2367
+ [vars$f.labelRequiredIndicator]: refs.requiredIndicator,
2368
+ [vars$f.inputBackgroundColor]: refs.backgroundColor,
2369
+ [vars$f.inputValueTextColor]: refs.valueTextColor,
2370
+ [vars$f.inputPlaceholderTextColor]: refs.placeholderTextColor,
2371
+ [vars$f.inputBorderRadius]: refs.borderRadius,
2372
+ [vars$f.inputBorderWidth]: refs.borderWidth,
2373
+ [vars$f.inputBorderStyle]: refs.borderStyle,
2374
+ [vars$f.inputBorderColor]: refs.borderColor,
2375
+ [vars$f.inputOutlineWidth]: refs.outlineWidth,
2376
+ [vars$f.inputOutlineStyle]: refs.outlineStyle,
2377
+ [vars$f.inputOutlineColor]: refs.outlineColor,
2378
+ [vars$f.inputOutlineOffset]: refs.outlineOffset,
2379
+ [vars$f.inputResizeType]: 'vertical',
2322
2380
 
2323
2381
  _disabled: {
2324
- [vars$f.cursor]: 'not-allowed'
2325
- },
2326
-
2327
- _bordered: {
2328
- [vars$f.borderColor]: globalRefs$b.colors.surface.main,
2329
- },
2330
-
2331
- _invalid: {
2332
- [vars$f.labelColor]: globalRefs$b.colors.error.main,
2333
- [vars$f.borderColor]: globalRefs$b.colors.error.main,
2334
- [vars$f.outlineColor]: globalRefs$b.colors.error.light,
2335
- [vars$f.placeholderColor]: globalRefs$b.colors.error.light,
2382
+ [vars$f.inputBackgroundColor]: globalRefs$a.colors.surface.light,
2336
2383
  },
2337
2384
 
2338
2385
  _readonly: {
2339
- [vars$f.resize]: 'none',
2386
+ [vars$f.inputResizeType]: 'none',
2340
2387
  }
2341
2388
  };
2342
2389
 
@@ -2395,9 +2442,11 @@ const booleanFieldMixin = (superclass) =>
2395
2442
 
2396
2443
  var commonStyles = `
2397
2444
  :host {
2398
- --vaadin-field-default-width: auto;
2399
2445
  display: inline-flex;
2400
2446
  }
2447
+
2448
+ ${resetInputFieldDefaultWidth()}
2449
+
2401
2450
  .wrapper {
2402
2451
  display: flex;
2403
2452
  }
@@ -2427,9 +2476,6 @@ vaadin-text-field::part(input-field)::after {
2427
2476
  vaadin-text-field[focus-ring]::part(input-field) {
2428
2477
  box-shadow: none;
2429
2478
  }
2430
- vaadin-text-field[required]::part(required-indicator)::after {
2431
- content: "*";
2432
- }
2433
2479
 
2434
2480
  vaadin-checkbox [slot="label"] {
2435
2481
  align-self: flex-start;
@@ -2451,91 +2497,101 @@ descope-boolean-field-internal {
2451
2497
  min-height: 0;
2452
2498
  padding: 0;
2453
2499
  }
2500
+
2501
+ [slot="label"],
2502
+ vaadin-checkbox,
2503
+ vaadin-checkbox::part(checkbox) {
2504
+ height: 100%;
2505
+ cursor: pointer;
2506
+ }
2454
2507
  `;
2455
2508
 
2456
2509
  const componentName$g = getComponentName('checkbox');
2457
2510
 
2458
2511
  const {
2459
- host: host$7,
2512
+ host: host$8,
2460
2513
  component: component$1,
2461
2514
  checkboxElement,
2462
2515
  checkboxSurface,
2463
2516
  checkboxHiddenLabel: checkboxHiddenLabel$1,
2464
- label: label$4,
2465
- requiredIndicator: requiredIndicator$3
2517
+ label: label$5,
2518
+ requiredIndicator: requiredIndicator$4,
2519
+ helperText: helperText$4,
2520
+ errorMessage: errorMessage$4
2466
2521
  } = {
2467
2522
  host: { selector: () => ':host' },
2468
2523
  label: { selector: '::part(label)' },
2469
- requiredIndicator: { selector: '::part(required-indicator)::after' },
2524
+ requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
2470
2525
  component: { selector: 'vaadin-checkbox' },
2471
2526
  checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },
2472
2527
  checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },
2473
2528
  checkboxHiddenLabel: { selector: 'vaadin-checkbox [slot="label"]' },
2529
+ helperText: { selector: '::part(helper-text)' },
2530
+ errorMessage: { selector: '::part(error-message)' },
2474
2531
  };
2475
2532
 
2476
2533
  const CheckboxClass = compose(
2477
2534
  createStyleMixin({
2478
2535
  mappings: {
2479
- width: host$7,
2480
- cursor: component$1,
2481
-
2482
- // Checkbox
2483
- checkboxBackgroundColor: { ...checkboxElement, property: 'background-color' },
2484
- checkboxRadius: { ...checkboxElement, property: 'border-radius' },
2485
-
2486
- checkboxSize: [
2487
- { ...checkboxElement, property: 'width' },
2488
- { ...label$4, property: 'margin-left' },
2489
- { ...checkboxElement, property: 'height' },
2490
- { ...checkboxSurface, property: 'font-size' },
2491
- { ...component$1, property: 'font-size' },
2492
- { ...label$4, property: 'line-height' },
2493
- { ...checkboxHiddenLabel$1, property: 'line-height' }
2494
- ],
2536
+ hostWidth: { ...host$8, property: 'width' },
2495
2537
 
2496
- checkboxOutlineWidth: { ...checkboxElement, property: 'outline-width' },
2497
- checkboxOutlineOffset: { ...checkboxElement, property: 'outline-offset' },
2498
- checkboxOutlineColor: { ...checkboxElement, property: 'outline-color' },
2499
- checkboxOutlineStyle: { ...checkboxElement, property: 'outline-style' },
2500
-
2501
- // Checkmark
2502
- checkmarkTextColor: { ...checkboxSurface, property: 'color' },
2503
-
2504
- // Label
2505
- labelFontSize: [
2506
- { ...host$7, property: 'font-size' },
2538
+ fontSize: [
2539
+ { ...host$8, property: 'font-size' },
2507
2540
  { ...checkboxElement, property: 'font-size' },
2508
- { ...label$4, property: 'font-size' },
2541
+ { ...label$5, property: 'font-size' },
2509
2542
  { ...checkboxHiddenLabel$1, property: 'font-size' }
2510
2543
  ],
2544
+ fontFamily: [
2545
+ { ...label$5, property: 'font-family' },
2546
+ { ...checkboxHiddenLabel$1, property: 'font-family' },
2547
+ { ...helperText$4, property: 'font-family' },
2548
+ { ...errorMessage$4, property: 'font-family' }
2549
+ ],
2550
+
2551
+ labelTextColor: [
2552
+ { ...label$5, property: 'color' },
2553
+ { ...requiredIndicator$4, property: 'color' },
2554
+ ],
2555
+ labelRequiredIndicator: { ...requiredIndicator$4, property: 'content' },
2556
+
2511
2557
  labelFontWeight: [
2512
- { ...label$4, property: 'font-weight' },
2558
+ { ...label$5, property: 'font-weight' },
2513
2559
  { ...checkboxHiddenLabel$1, property: 'font-weight' }
2514
2560
  ],
2515
- labelMargin: [
2516
- { ...label$4, property: 'left' },
2561
+ labelSpacing: [
2562
+ { ...label$5, property: 'left' },
2517
2563
  { ...checkboxHiddenLabel$1, property: 'padding-left' }
2518
2564
  ],
2519
- labelTextColor: [
2520
- { ...label$4, property: 'color' },
2521
- { ...requiredIndicator$3, property: 'color' },
2565
+ inputValueTextColor: { ...checkboxSurface, property: 'color' },
2566
+ inputBackgroundColor: { ...checkboxElement, property: 'background-color' },
2567
+ inputBorderRadius: { ...checkboxElement, property: 'border-radius' },
2568
+ inputOutlineWidth: { ...checkboxElement, property: 'outline-width' },
2569
+ inputOutlineOffset: { ...checkboxElement, property: 'outline-offset' },
2570
+ inputOutlineColor: { ...checkboxElement, property: 'outline-color' },
2571
+ inputOutlineStyle: { ...checkboxElement, property: 'outline-style' },
2572
+ inputSize: [
2573
+ { ...checkboxElement, property: 'width' },
2574
+ { ...label$5, property: 'margin-left' },
2575
+ { ...checkboxElement, property: 'height' },
2576
+ { ...checkboxSurface, property: 'font-size' },
2577
+ { ...component$1, property: 'font-size' },
2578
+ { ...label$5, property: 'line-height' },
2579
+ { ...checkboxHiddenLabel$1, property: 'line-height' }
2522
2580
  ],
2523
2581
  },
2524
2582
  }),
2525
2583
  draggableMixin,
2526
- proxyInputMixin,
2584
+ composedProxyInputMixin,
2527
2585
  componentNameValidationMixin,
2528
2586
  booleanFieldMixin
2529
2587
  )(
2530
2588
  createProxy({
2531
2589
  slots: [],
2532
2590
  wrappedEleName: 'vaadin-text-field',
2533
- style: `
2591
+ style: () => `
2534
2592
  ${commonStyles}
2535
-
2536
- vaadin-checkbox [slot="label"] {
2537
- height: 100%;
2538
- cursor: pointer;
2593
+ vaadin-text-field {
2594
+ padding: calc(var(${CheckboxClass.cssVarList.inputOutlineWidth}) + var(${CheckboxClass.cssVarList.inputOutlineOffset}));
2539
2595
  }
2540
2596
  `,
2541
2597
  excludeAttrsSync: ['tabindex'],
@@ -2543,63 +2599,33 @@ const CheckboxClass = compose(
2543
2599
  })
2544
2600
  );
2545
2601
 
2546
- const globalRefs$a = getThemeRefs(globals);
2602
+ const globalRefs$9 = getThemeRefs(globals);
2547
2603
  const vars$e = CheckboxClass.cssVarList;
2548
2604
 
2549
2605
  const checkbox = {
2550
- [vars$e.checkboxBackgroundColor]: globalRefs$a.colors.surface.main,
2551
- [vars$e.cursor]: 'pointer',
2552
-
2553
- [vars$e.checkboxRadius]: globalRefs$a.radius.xs,
2554
- [vars$e.checkboxSize]: '2em',
2555
-
2556
- [vars$e.labelTextColor]: globalRefs$a.colors.surface.contrast,
2557
- [vars$e.labelMargin]: '0.5em',
2606
+ [vars$e.hostWidth]: refs.width,
2607
+ [vars$e.fontSize]: refs.fontSize,
2608
+ [vars$e.fontFamily]: refs.fontFamily,
2609
+ [vars$e.labelTextColor]: refs.labelTextColor,
2610
+ [vars$e.labelRequiredIndicator]: refs.requiredIndicator,
2558
2611
  [vars$e.labelFontWeight]: '400',
2559
-
2560
- size: {
2561
- xs: {
2562
- [vars$e.labelFontSize]: '8px',
2563
- },
2564
- sm: {
2565
- [vars$e.labelFontSize]: '10px',
2566
- },
2567
- md: {
2568
- [vars$e.labelFontSize]: '14px',
2569
- },
2570
- lg: {
2571
- [vars$e.labelFontSize]: '20px',
2572
- },
2573
- xl: {
2574
- [vars$e.labelFontSize]: '25px',
2575
- }
2576
- },
2577
-
2578
- _fullWidth: {
2579
- [vars$e.width]: '100%',
2580
- },
2612
+ [vars$e.labelSpacing]: '0.5em',
2613
+ [vars$e.inputOutlineWidth]: refs.outlineWidth,
2614
+ [vars$e.inputOutlineOffset]: refs.outlineOffset,
2615
+ [vars$e.inputOutlineColor]: refs.outlineColor,
2616
+ [vars$e.inputOutlineStyle]: refs.outlineStyle,
2617
+ [vars$e.inputBorderRadius]: refs.borderRadius,
2618
+ [vars$e.inputBackgroundColor]: globalRefs$9.colors.surface.main,
2619
+ [vars$e.inputSize]: '2em',
2581
2620
 
2582
2621
  _checked: {
2583
- [vars$e.checkboxBackgroundColor]: globalRefs$a.colors.primary.main,
2584
- [vars$e.checkmarkTextColor]: globalRefs$a.colors.primary.contrast,
2622
+ [vars$e.inputBackgroundColor]: globalRefs$9.colors.primary.main,
2623
+ [vars$e.inputValueTextColor]: globalRefs$9.colors.primary.contrast,
2585
2624
  },
2586
2625
 
2587
2626
  _disabled: {
2588
- [vars$e.checkboxBackgroundColor]: globalRefs$a.colors.surface.main,
2589
- },
2590
-
2591
- _focused: {
2592
- [vars$e.checkboxOutlineWidth]: '2px',
2593
- [vars$e.checkboxOutlineOffset]: '1px',
2594
- [vars$e.checkboxOutlineColor]: globalRefs$a.colors.primary.main,
2595
- [vars$e.checkboxOutlineStyle]: 'solid'
2627
+ [vars$e.inputBackgroundColor]: globalRefs$9.colors.surface.main,
2596
2628
  },
2597
-
2598
- _invalid: {
2599
- [vars$e.checkboxOutlineColor]: globalRefs$a.colors.error.main,
2600
- [vars$e.labelTextColor]: globalRefs$a.colors.error.main
2601
- },
2602
-
2603
2629
  };
2604
2630
 
2605
2631
  var checkbox$1 = /*#__PURE__*/Object.freeze({
@@ -2611,39 +2637,46 @@ var checkbox$1 = /*#__PURE__*/Object.freeze({
2611
2637
  const componentName$f = getComponentName('switch-toggle');
2612
2638
 
2613
2639
  const {
2614
- host: host$6,
2640
+ host: host$7,
2615
2641
  component,
2616
2642
  checkboxElement: track,
2617
2643
  checkboxSurface: knob,
2618
2644
  checkboxHiddenLabel,
2619
- label: label$3,
2620
- requiredIndicator: requiredIndicator$2,
2645
+ label: label$4,
2646
+ requiredIndicator: requiredIndicator$3,
2647
+ helperText: helperText$3,
2648
+ errorMessage: errorMessage$3
2621
2649
  } = {
2622
2650
  host: { selector: () => ':host' },
2623
2651
  label: { selector: '::part(label)' },
2624
- requiredIndicator: { selector: '::part(required-indicator)::after' },
2652
+ requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
2625
2653
  component: { selector: 'vaadin-checkbox' },
2626
2654
  checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },
2627
2655
  checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },
2628
2656
  checkboxHiddenLabel: { selector: 'vaadin-checkbox [slot="label"]' },
2657
+ helperText: { selector: '::part(helper-text)' },
2658
+ errorMessage: { selector: '::part(error-message)' },
2629
2659
  };
2630
2660
 
2631
2661
  const SwitchToggleClass = compose(
2632
2662
  createStyleMixin({
2633
2663
  mappings: {
2634
- width: host$6,
2635
- cursor: [component, checkboxHiddenLabel, track],
2636
- fontSize: [component, label$3, checkboxHiddenLabel],
2637
-
2638
- // Track
2664
+ hostWidth: { ...host$7, property: 'width' },
2665
+ fontSize: [
2666
+ { ...component, property: 'font-size' },
2667
+ { ...label$4, property: 'font-size' },
2668
+ { ...checkboxHiddenLabel, property: 'font-size' },
2669
+ ],
2670
+ fontFamily: [
2671
+ { ...label$4, property: 'font-family' },
2672
+ { ...helperText$3, property: 'font-family' },
2673
+ { ...errorMessage$3, property: 'font-family' }
2674
+ ],
2639
2675
  trackBorderWidth: { ...track, property: 'border-width' },
2640
2676
  trackBorderStyle: { ...track, property: 'border-style' },
2641
2677
  trackBorderColor: { ...track, property: 'border-color' },
2642
-
2643
- // Checkbox
2644
2678
  trackBackgroundColor: { ...track, property: 'background-color' },
2645
- trackRadius: { ...track, property: 'border-radius' },
2646
-
2679
+ trackBorderRadius: { ...track, property: 'border-radius' },
2647
2680
  trackWidth: [
2648
2681
  { ...track, property: 'width' },
2649
2682
  ],
@@ -2651,44 +2684,43 @@ const SwitchToggleClass = compose(
2651
2684
  { ...knob, property: 'font-size' },
2652
2685
  { ...track, property: 'height' }
2653
2686
  ],
2654
- switchOutlineWidth: { ...track, property: 'outline-width' },
2655
- switchOutlineOffset: { ...track, property: 'outline-offset' },
2656
- switchOutlineColor: { ...track, property: 'outline-color' },
2657
- switchOutlineStyle: { ...track, property: 'outline-style' },
2658
2687
 
2659
- // Knob
2660
2688
  knobSize: [
2661
2689
  { ...knob, property: 'width' },
2662
2690
  { ...knob, property: 'height' },
2663
2691
  ],
2664
2692
  knobTextColor: { ...knob, property: 'color' },
2665
2693
  knobRadius: { ...knob, property: 'border-radius' },
2666
- knobTransition: { ...knob, property: 'transition' },
2694
+ knobTransitionDuration: { ...knob, property: 'transition' },
2667
2695
  knobColor: { ...knob, property: 'background-color' },
2668
2696
  knobTopOffset: { ...knob, property: 'top' },
2669
- knobPosition: { ...knob, property: 'left' },
2697
+ knobLeftOffset: { ...knob, property: 'left' },
2670
2698
 
2671
- // Label
2672
- labelMargin: [
2673
- { ...label$3, property: 'padding-left' },
2699
+ labelSpacing: [
2700
+ { ...label$4, property: 'padding-left' },
2674
2701
  { ...checkboxHiddenLabel, property: 'padding-left' }
2675
2702
  ],
2676
2703
  labelLineHeight: [
2677
- { ...label$3, property: 'line-height' },
2704
+ { ...label$4, property: 'line-height' },
2678
2705
  { ...checkboxHiddenLabel, property: 'line-height' }
2679
2706
  ],
2680
2707
  labelFontWeight: [
2681
- { ...label$3, property: 'font-weight' },
2708
+ { ...label$4, property: 'font-weight' },
2682
2709
  { ...checkboxHiddenLabel, property: 'font-weight' }
2683
2710
  ],
2684
2711
  labelTextColor: [
2685
- { ...label$3, property: 'color' },
2686
- { ...requiredIndicator$2, property: 'color' },
2712
+ { ...label$4, property: 'color' },
2713
+ { ...requiredIndicator$3, property: 'color' },
2687
2714
  ],
2715
+ labelRequiredIndicator: { ...requiredIndicator$3, property: 'content' },
2716
+ inputOutlineWidth: { ...track, property: 'outline-width' },
2717
+ inputOutlineOffset: { ...track, property: 'outline-offset' },
2718
+ inputOutlineColor: { ...track, property: 'outline-color' },
2719
+ inputOutlineStyle: { ...track, property: 'outline-style' },
2688
2720
  },
2689
2721
  }),
2690
2722
  draggableMixin,
2691
- proxyInputMixin,
2723
+ composedProxyInputMixin,
2692
2724
  componentNameValidationMixin,
2693
2725
  booleanFieldMixin
2694
2726
  )(
@@ -2696,23 +2728,24 @@ const SwitchToggleClass = compose(
2696
2728
  slots: [],
2697
2729
  wrappedEleName: 'vaadin-text-field',
2698
2730
  style: () => `
2699
- ${commonStyles}
2700
-
2701
- vaadin-text-field::part(label) {
2702
- left: calc(var(${SwitchToggleClass.cssVarList.trackWidth}) + var(${SwitchToggleClass.cssVarList.trackBorderWidth}) * 2);
2703
- }
2704
-
2705
- vaadin-checkbox[active]::part(checkbox) {
2706
- transform: none;
2707
- }
2708
- vaadin-checkbox[checked]::part(checkbox) {
2709
- background: none;
2710
- }
2711
- vaadin-checkbox::part(checkbox)::after {
2712
- position: absolute;
2713
- opacity: 1;
2714
- content: '';
2715
- }
2731
+ ${commonStyles}
2732
+ :host {
2733
+ padding: calc(var(${SwitchToggleClass.cssVarList.inputOutlineWidth}) + var(${SwitchToggleClass.cssVarList.inputOutlineOffset}));
2734
+ }
2735
+ vaadin-text-field::part(label) {
2736
+ left: calc(var(${SwitchToggleClass.cssVarList.trackWidth}) + var(${SwitchToggleClass.cssVarList.trackBorderWidth}) * 2);
2737
+ }
2738
+ vaadin-checkbox[active]::part(checkbox) {
2739
+ transform: none;
2740
+ }
2741
+ vaadin-checkbox[checked]::part(checkbox) {
2742
+ background: none;
2743
+ }
2744
+ vaadin-checkbox::part(checkbox)::after {
2745
+ position: absolute;
2746
+ opacity: 1;
2747
+ content: '';
2748
+ }
2716
2749
  `,
2717
2750
  excludeAttrsSync: ['tabindex'],
2718
2751
  componentName: componentName$f
@@ -2721,73 +2754,58 @@ const SwitchToggleClass = compose(
2721
2754
 
2722
2755
  const knobMargin = '2px';
2723
2756
  const checkboxHeight = '1.25em';
2724
- const trackBorderWidth = '2px';
2725
2757
 
2726
- const globalRefs$9 = getThemeRefs(globals);
2758
+ const globalRefs$8 = getThemeRefs(globals);
2727
2759
  const vars$d = SwitchToggleClass.cssVarList;
2728
2760
 
2729
2761
  const switchToggle = {
2730
- size: {
2731
- xs: { [vars$d.fontSize]: '8px' },
2732
- sm: { [vars$d.fontSize]: '12px' },
2733
- md: { [vars$d.fontSize]: '16px' },
2734
- lg: { [vars$d.fontSize]: '20px' },
2735
- xl: { [vars$d.fontSize]: '24px' }
2736
- },
2762
+ [vars$d.fontSize]: refs.fontSize,
2763
+ [vars$d.fontFamily]: refs.fontFamily,
2737
2764
 
2738
- [vars$d.cursor]: 'pointer',
2739
-
2740
- [vars$d.trackBorderStyle]: 'solid',
2741
- [vars$d.trackBorderWidth]: trackBorderWidth,
2742
- [vars$d.trackBorderColor]: globalRefs$9.colors.surface.contrast,
2765
+ [vars$d.inputOutlineWidth]: refs.outlineWidth,
2766
+ [vars$d.inputOutlineOffset]: refs.outlineOffset,
2767
+ [vars$d.inputOutlineColor]: refs.outlineColor,
2768
+ [vars$d.inputOutlineStyle]: refs.outlineStyle,
2743
2769
 
2770
+ [vars$d.trackBorderStyle]: refs.borderStyle,
2771
+ [vars$d.trackBorderWidth]: refs.borderWidth, // var `trackBorderWidth` used outside the theme for `left` margin calculation
2772
+ [vars$d.trackBorderColor]: globalRefs$8.colors.surface.contrast,
2744
2773
  [vars$d.trackBackgroundColor]: 'none',
2745
- [vars$d.trackRadius]: globalRefs$9.radius.md,
2746
- [vars$d.trackWidth]: '2.5em',
2774
+ [vars$d.trackBorderRadius]: globalRefs$8.radius.md,
2775
+ [vars$d.trackWidth]: '2.5em', // var `trackWidth` used outside the theme for `left` margin calculation
2747
2776
  [vars$d.trackHeight]: checkboxHeight,
2748
2777
 
2749
2778
  [vars$d.knobSize]: `calc(1em - ${knobMargin})`,
2750
2779
  [vars$d.knobRadius]: '50%',
2751
2780
  [vars$d.knobTopOffset]: '1px',
2752
- [vars$d.knobColor]: globalRefs$9.colors.surface.contrast,
2753
- [vars$d.knobPosition]: knobMargin,
2754
- [vars$d.knobTransition]: '0.3s',
2781
+ [vars$d.knobLeftOffset]: knobMargin,
2782
+ [vars$d.knobColor]: refs.valueTextColor,
2783
+ [vars$d.knobTransitionDuration]: '0.3s',
2755
2784
 
2756
- [vars$d.labelTextColor]: globalRefs$9.colors.surface.contrast,
2785
+ [vars$d.labelTextColor]: refs.labelTextColor,
2757
2786
  [vars$d.labelFontWeight]: '400',
2758
2787
  [vars$d.labelLineHeight]: `calc(${checkboxHeight} + 0.25em)`,
2759
- [vars$d.labelMargin]: '0.25em',
2788
+ [vars$d.labelSpacing]: '0.25em',
2789
+ [vars$d.labelRequiredIndicator]: refs.requiredIndicator,
2760
2790
 
2761
- _fullWidth: {
2762
- [vars$d.width]: '100%',
2763
- },
2791
+ [vars$d.hostWidth]: refs.width,
2764
2792
 
2765
2793
  _checked: {
2766
- [vars$d.trackBorderColor]: globalRefs$9.colors.primary.main,
2767
- [vars$d.knobPosition]: `calc(100% - var(${vars$d.knobSize}) - ${knobMargin})`,
2768
- [vars$d.knobColor]: globalRefs$9.colors.primary.main,
2769
- [vars$d.knobTextColor]: globalRefs$9.colors.primary.contrast,
2794
+ [vars$d.trackBorderColor]: globalRefs$8.colors.primary.main,
2795
+ [vars$d.knobLeftOffset]: `calc(100% - var(${vars$d.knobSize}) - ${knobMargin})`,
2796
+ [vars$d.knobColor]: globalRefs$8.colors.primary.main,
2797
+ [vars$d.knobTextColor]: refs.valueTextColor,
2770
2798
  },
2771
2799
 
2772
2800
  _disabled: {
2773
- [vars$d.cursor]: 'not-allowed', // todo: fix cursor
2774
- [vars$d.knobColor]: globalRefs$9.colors.surface.main,
2775
- [vars$d.trackBorderColor]: globalRefs$9.colors.surface.main,
2776
- [vars$d.trackBackgroundColor]: globalRefs$9.colors.surface.light,
2777
- },
2778
-
2779
- _focused: {
2780
- [vars$d.switchOutlineWidth]: '2px',
2781
- [vars$d.switchOutlineOffset]: '1px',
2782
- [vars$d.switchOutlineColor]: globalRefs$9.colors.primary.main,
2783
- [vars$d.switchOutlineStyle]: 'solid'
2801
+ [vars$d.knobColor]: globalRefs$8.colors.surface.main,
2802
+ [vars$d.trackBorderColor]: globalRefs$8.colors.surface.main,
2803
+ [vars$d.trackBackgroundColor]: globalRefs$8.colors.surface.light,
2784
2804
  },
2785
2805
 
2786
2806
  _invalid: {
2787
- [vars$d.switchOutlineColor]: globalRefs$9.colors.error.main,
2788
- [vars$d.trackBorderColor]: globalRefs$9.colors.error.main,
2789
- [vars$d.knobColor]: globalRefs$9.colors.error.main,
2790
- [vars$d.labelTextColor]: globalRefs$9.colors.error.main
2807
+ [vars$d.trackBorderColor]: globalRefs$8.colors.error.main,
2808
+ [vars$d.knobColor]: globalRefs$8.colors.error.main,
2791
2809
  },
2792
2810
  };
2793
2811
 
@@ -2810,11 +2828,11 @@ class RawContainer extends createBaseClass({ componentName: componentName$e, bas
2810
2828
  width: 100%;
2811
2829
  height: 100%;
2812
2830
  display: flex;
2813
- overflow: hidden;
2831
+ overflow: auto;
2814
2832
  }
2815
2833
  :host {
2816
2834
  display: inline-block;
2817
- overflow: auto;
2835
+ overflow: hidden;
2818
2836
  }
2819
2837
  </style>
2820
2838
  <slot></slot>
@@ -2825,8 +2843,8 @@ class RawContainer extends createBaseClass({ componentName: componentName$e, bas
2825
2843
  const ContainerClass = compose(
2826
2844
  createStyleMixin({
2827
2845
  mappings: {
2828
- height: { selector: () => ':host' },
2829
- width: { selector: () => ':host' },
2846
+ hostHeight: { selector: () => ':host', property: 'height' },
2847
+ hostWidth: { selector: () => ':host', property: 'width' },
2830
2848
 
2831
2849
  verticalPadding: [
2832
2850
  { property: 'padding-top' },
@@ -2858,119 +2876,106 @@ const ContainerClass = compose(
2858
2876
  componentNameValidationMixin
2859
2877
  )(RawContainer);
2860
2878
 
2861
- const globalRefs$8 = getThemeRefs(globals);
2879
+ const globalRefs$7 = getThemeRefs(globals);
2862
2880
 
2863
2881
  const compVars$1 = ContainerClass.cssVarList;
2864
2882
 
2865
2883
  const verticalAlignment = {
2866
2884
  start: { verticalAlignment: 'start' },
2867
- center: { verticalAlignment: 'center' },
2885
+ center: { verticalAlignment: 'safe center' },
2868
2886
  end: { verticalAlignment: 'end' },
2869
2887
  };
2870
2888
 
2871
2889
  const horizontalAlignment = {
2872
2890
  start: { horizontalAlignment: 'start' },
2873
- center: { horizontalAlignment: 'center' },
2891
+ center: { horizontalAlignment: 'safe center' },
2874
2892
  end: { horizontalAlignment: 'end' },
2875
2893
  };
2876
2894
 
2877
- const [helperTheme$1, helperRefs$1, helperVars$1] =
2895
+ const [helperTheme$2, helperRefs$2, helperVars$1] =
2878
2896
  createHelperVars({
2879
2897
  verticalAlignment,
2880
2898
  horizontalAlignment,
2881
2899
  shadowColor: '#00000020' //if we want to support transparency vars, we should use different color format
2882
2900
  }, componentName$e);
2883
2901
 
2902
+ const { shadowColor } = helperRefs$2;
2903
+
2884
2904
  const container = {
2885
- ...helperTheme$1,
2886
- [compVars$1.width]: '100%',
2905
+ ...helperTheme$2,
2906
+
2907
+ [compVars$1.hostWidth]: '100%',
2887
2908
  [compVars$1.boxShadow]: 'none',
2888
- [compVars$1.backgroundColor]: globalRefs$8.colors.surface.light,
2889
- [compVars$1.color]: globalRefs$8.colors.surface.contrast,
2909
+ [compVars$1.backgroundColor]: globalRefs$7.colors.surface.light,
2910
+ [compVars$1.color]: globalRefs$7.colors.surface.contrast,
2911
+
2890
2912
  verticalPadding: {
2891
2913
  sm: { [compVars$1.verticalPadding]: '5px' },
2892
2914
  md: { [compVars$1.verticalPadding]: '10px' },
2893
2915
  lg: { [compVars$1.verticalPadding]: '20px' },
2894
2916
  },
2917
+
2895
2918
  horizontalPadding: {
2896
2919
  sm: { [compVars$1.horizontalPadding]: '5px' },
2897
2920
  md: { [compVars$1.horizontalPadding]: '10px' },
2898
2921
  lg: { [compVars$1.horizontalPadding]: '20px' },
2899
2922
  },
2923
+
2900
2924
  direction: {
2901
2925
  row: {
2902
2926
  [compVars$1.flexDirection]: 'row',
2903
- [compVars$1.alignItems]: helperRefs$1.verticalAlignment,
2904
- [compVars$1.justifyContent]: helperRefs$1.horizontalAlignment,
2927
+ [compVars$1.alignItems]: helperRefs$2.verticalAlignment,
2928
+ [compVars$1.justifyContent]: helperRefs$2.horizontalAlignment,
2905
2929
  [compVars$1.flexWrap]: 'wrap',
2906
2930
  horizontalAlignment: {
2907
- spaceBetween: { [helperVars$1.horizontalAlignment]: 'space-between' },
2931
+ spaceBetween: {
2932
+ [helperVars$1.horizontalAlignment]: 'space-between'
2933
+ },
2908
2934
  }
2909
2935
  },
2910
-
2911
2936
  column: {
2912
2937
  [compVars$1.flexDirection]: 'column',
2913
- [compVars$1.alignItems]: helperRefs$1.horizontalAlignment,
2914
- [compVars$1.justifyContent]: helperRefs$1.verticalAlignment,
2938
+ [compVars$1.alignItems]: helperRefs$2.horizontalAlignment,
2939
+ [compVars$1.justifyContent]: helperRefs$2.verticalAlignment,
2915
2940
  verticalAlignment: {
2916
- spaceBetween: { [helperVars$1.verticalAlignment]: 'space-between' }
2941
+ spaceBetween: {
2942
+ [helperVars$1.verticalAlignment]: 'space-between'
2943
+ }
2917
2944
  }
2918
2945
  },
2919
2946
  },
2920
2947
 
2921
2948
  spaceBetween: {
2922
- sm: {
2923
- [compVars$1.gap]: '10px'
2924
- },
2925
- md: {
2926
- [compVars$1.gap]: '20px'
2927
- },
2928
- lg: {
2929
- [compVars$1.gap]: '30px'
2930
- }
2949
+ sm: { [compVars$1.gap]: '10px' },
2950
+ md: { [compVars$1.gap]: '20px' },
2951
+ lg: { [compVars$1.gap]: '30px' }
2931
2952
  },
2932
2953
 
2933
2954
  shadow: {
2934
- sm: {
2935
- [compVars$1.boxShadow]: `${globalRefs$8.shadow.wide.sm} ${helperRefs$1.shadowColor}, ${globalRefs$8.shadow.narrow.sm} ${helperRefs$1.shadowColor}`
2936
- },
2937
- md: {
2938
- [compVars$1.boxShadow]: `${globalRefs$8.shadow.wide.md} ${helperRefs$1.shadowColor}, ${globalRefs$8.shadow.narrow.md} ${helperRefs$1.shadowColor}`
2939
- },
2940
- lg: {
2941
- [compVars$1.boxShadow]: `${globalRefs$8.shadow.wide.lg} ${helperRefs$1.shadowColor}, ${globalRefs$8.shadow.narrow.lg} ${helperRefs$1.shadowColor}`
2942
- },
2943
- xl: {
2944
- [compVars$1.boxShadow]: `${globalRefs$8.shadow.wide.xl} ${helperRefs$1.shadowColor}, ${globalRefs$8.shadow.narrow.xl} ${helperRefs$1.shadowColor}`
2945
- },
2955
+ sm: { [compVars$1.boxShadow]: `${globalRefs$7.shadow.wide.sm} ${shadowColor}, ${globalRefs$7.shadow.narrow.sm} ${shadowColor}` },
2956
+ md: { [compVars$1.boxShadow]: `${globalRefs$7.shadow.wide.md} ${shadowColor}, ${globalRefs$7.shadow.narrow.md} ${shadowColor}` },
2957
+ lg: { [compVars$1.boxShadow]: `${globalRefs$7.shadow.wide.lg} ${shadowColor}, ${globalRefs$7.shadow.narrow.lg} ${shadowColor}` },
2958
+ xl: { [compVars$1.boxShadow]: `${globalRefs$7.shadow.wide.xl} ${shadowColor}, ${globalRefs$7.shadow.narrow.xl} ${shadowColor}` },
2946
2959
  '2xl': {
2947
2960
  [helperVars$1.shadowColor]: '#00000050', // mimic daisyUI shadow settings
2948
- [compVars$1.boxShadow]: `${globalRefs$8.shadow.wide['2xl']} ${helperRefs$1.shadowColor}`
2961
+ [compVars$1.boxShadow]: `${globalRefs$7.shadow.wide['2xl']} ${shadowColor}`
2949
2962
  },
2950
2963
  },
2951
2964
 
2952
2965
  borderRadius: {
2953
- sm: {
2954
- [compVars$1.borderRadius]: globalRefs$8.radius.sm
2955
- },
2956
- md: {
2957
- [compVars$1.borderRadius]: globalRefs$8.radius.md
2958
- },
2959
- lg: {
2960
- [compVars$1.borderRadius]: globalRefs$8.radius.lg
2961
- },
2962
- xl: {
2963
- [compVars$1.borderRadius]: globalRefs$8.radius.xl
2964
- },
2965
- '2xl': {
2966
- [compVars$1.borderRadius]: globalRefs$8.radius['2xl']
2967
- },
2968
- '3xl': {
2969
- [compVars$1.borderRadius]: globalRefs$8.radius['3xl']
2970
- },
2966
+ sm: { [compVars$1.borderRadius]: globalRefs$7.radius.sm },
2967
+ md: { [compVars$1.borderRadius]: globalRefs$7.radius.md },
2968
+ lg: { [compVars$1.borderRadius]: globalRefs$7.radius.lg },
2969
+ xl: { [compVars$1.borderRadius]: globalRefs$7.radius.xl },
2970
+ '2xl': { [compVars$1.borderRadius]: globalRefs$7.radius['2xl'] },
2971
+ '3xl': { [compVars$1.borderRadius]: globalRefs$7.radius['3xl'] },
2971
2972
  }
2972
2973
  };
2973
- const vars$c = { ...compVars$1, ...helperVars$1 };
2974
+
2975
+ const vars$c = {
2976
+ ...compVars$1,
2977
+ ...helperVars$1
2978
+ };
2974
2979
 
2975
2980
  var container$1 = /*#__PURE__*/Object.freeze({
2976
2981
  __proto__: null,
@@ -3061,99 +3066,104 @@ class RawText extends createBaseClass({ componentName: componentName$c, baseSele
3061
3066
  const TextClass = compose(
3062
3067
  createStyleMixin({
3063
3068
  mappings: {
3069
+ hostWidth: { selector: () => ':host', property: 'width' },
3070
+ fontSize: { property: 'font-size' },
3071
+ textColor: { property: 'color' },
3072
+ textLineHeight: { property: 'line-height' },
3073
+ textLetterSpacing: { property: 'letter-spacing' },
3074
+ textShadow: {},
3075
+ textAlign: {},
3076
+ textTransform: {},
3064
3077
  fontFamily: {},
3065
- lineHeight: {},
3066
3078
  fontStyle: {},
3067
- fontSize: {},
3068
3079
  fontWeight: {},
3069
- width: { selector: () => ':host' },
3070
- color: {},
3071
- letterSpacing: {},
3072
- textShadow: {},
3073
3080
  borderWidth: {},
3074
3081
  borderStyle: {},
3075
3082
  borderColor: {},
3076
- textTransform: {},
3077
- textAlign: {},
3078
3083
  },
3079
3084
  }),
3080
3085
  draggableMixin,
3081
3086
  componentNameValidationMixin
3082
3087
  )(RawText);
3083
3088
 
3084
- const globalRefs$7 = getThemeRefs(globals);
3085
-
3089
+ const globalRefs$6 = getThemeRefs(globals);
3086
3090
  const vars$a = TextClass.cssVarList;
3087
3091
 
3088
3092
  const text$2 = {
3089
- [vars$a.lineHeight]: '1em',
3093
+ [vars$a.textLineHeight]: '1em',
3090
3094
  [vars$a.textAlign]: 'left',
3091
- [vars$a.color]: globalRefs$7.colors.surface.dark,
3095
+ [vars$a.textColor]: globalRefs$6.colors.surface.dark,
3092
3096
  variant: {
3093
3097
  h1: {
3094
- [vars$a.fontSize]: globalRefs$7.typography.h1.size,
3095
- [vars$a.fontWeight]: globalRefs$7.typography.h1.weight,
3096
- [vars$a.fontFamily]: globalRefs$7.typography.h1.font
3098
+ [vars$a.fontSize]: globalRefs$6.typography.h1.size,
3099
+ [vars$a.fontWeight]: globalRefs$6.typography.h1.weight,
3100
+ [vars$a.fontFamily]: globalRefs$6.typography.h1.font
3097
3101
  },
3098
3102
  h2: {
3099
- [vars$a.fontSize]: globalRefs$7.typography.h2.size,
3100
- [vars$a.fontWeight]: globalRefs$7.typography.h2.weight,
3101
- [vars$a.fontFamily]: globalRefs$7.typography.h2.font
3103
+ [vars$a.fontSize]: globalRefs$6.typography.h2.size,
3104
+ [vars$a.fontWeight]: globalRefs$6.typography.h2.weight,
3105
+ [vars$a.fontFamily]: globalRefs$6.typography.h2.font
3102
3106
  },
3103
3107
  h3: {
3104
- [vars$a.fontSize]: globalRefs$7.typography.h3.size,
3105
- [vars$a.fontWeight]: globalRefs$7.typography.h3.weight,
3106
- [vars$a.fontFamily]: globalRefs$7.typography.h3.font
3108
+ [vars$a.fontSize]: globalRefs$6.typography.h3.size,
3109
+ [vars$a.fontWeight]: globalRefs$6.typography.h3.weight,
3110
+ [vars$a.fontFamily]: globalRefs$6.typography.h3.font
3107
3111
  },
3108
3112
  subtitle1: {
3109
- [vars$a.fontSize]: globalRefs$7.typography.subtitle1.size,
3110
- [vars$a.fontWeight]: globalRefs$7.typography.subtitle1.weight,
3111
- [vars$a.fontFamily]: globalRefs$7.typography.subtitle1.font
3113
+ [vars$a.fontSize]: globalRefs$6.typography.subtitle1.size,
3114
+ [vars$a.fontWeight]: globalRefs$6.typography.subtitle1.weight,
3115
+ [vars$a.fontFamily]: globalRefs$6.typography.subtitle1.font
3112
3116
  },
3113
3117
  subtitle2: {
3114
- [vars$a.fontSize]: globalRefs$7.typography.subtitle2.size,
3115
- [vars$a.fontWeight]: globalRefs$7.typography.subtitle2.weight,
3116
- [vars$a.fontFamily]: globalRefs$7.typography.subtitle2.font
3118
+ [vars$a.fontSize]: globalRefs$6.typography.subtitle2.size,
3119
+ [vars$a.fontWeight]: globalRefs$6.typography.subtitle2.weight,
3120
+ [vars$a.fontFamily]: globalRefs$6.typography.subtitle2.font
3117
3121
  },
3118
3122
  body1: {
3119
- [vars$a.fontSize]: globalRefs$7.typography.body1.size,
3120
- [vars$a.fontWeight]: globalRefs$7.typography.body1.weight,
3121
- [vars$a.fontFamily]: globalRefs$7.typography.body1.font
3123
+ [vars$a.fontSize]: globalRefs$6.typography.body1.size,
3124
+ [vars$a.fontWeight]: globalRefs$6.typography.body1.weight,
3125
+ [vars$a.fontFamily]: globalRefs$6.typography.body1.font
3122
3126
  },
3123
3127
  body2: {
3124
- [vars$a.fontSize]: globalRefs$7.typography.body2.size,
3125
- [vars$a.fontWeight]: globalRefs$7.typography.body2.weight,
3126
- [vars$a.fontFamily]: globalRefs$7.typography.body2.font
3128
+ [vars$a.fontSize]: globalRefs$6.typography.body2.size,
3129
+ [vars$a.fontWeight]: globalRefs$6.typography.body2.weight,
3130
+ [vars$a.fontFamily]: globalRefs$6.typography.body2.font
3127
3131
  }
3128
3132
  },
3133
+
3129
3134
  mode: {
3130
3135
  primary: {
3131
- [vars$a.color]: globalRefs$7.colors.primary.main
3136
+ [vars$a.textColor]: globalRefs$6.colors.primary.main
3132
3137
  },
3133
3138
  secondary: {
3134
- [vars$a.color]: globalRefs$7.colors.secondary.main
3139
+ [vars$a.textColor]: globalRefs$6.colors.secondary.main
3135
3140
  },
3136
3141
  error: {
3137
- [vars$a.color]: globalRefs$7.colors.error.main
3142
+ [vars$a.textColor]: globalRefs$6.colors.error.main
3138
3143
  },
3139
3144
  success: {
3140
- [vars$a.color]: globalRefs$7.colors.success.main
3145
+ [vars$a.textColor]: globalRefs$6.colors.success.main
3141
3146
  }
3142
3147
  },
3148
+
3143
3149
  textAlign: {
3144
3150
  right: { [vars$a.textAlign]: 'right' },
3145
3151
  left: { [vars$a.textAlign]: 'left' },
3146
3152
  center: { [vars$a.textAlign]: 'center' }
3147
3153
  },
3154
+
3148
3155
  _fullWidth: {
3149
- [vars$a.width]: '100%',
3156
+ [vars$a.hostWidth]: '100%',
3150
3157
  },
3158
+
3151
3159
  _italic: {
3152
3160
  [vars$a.fontStyle]: 'italic'
3153
3161
  },
3162
+
3154
3163
  _uppercase: {
3155
3164
  [vars$a.textTransform]: 'uppercase'
3156
3165
  },
3166
+
3157
3167
  _lowercase: {
3158
3168
  [vars$a.textTransform]: 'lowercase'
3159
3169
  }
@@ -3202,43 +3212,47 @@ class RawLink extends createBaseClass({ componentName: componentName$b, baseSele
3202
3212
  }
3203
3213
  }
3204
3214
 
3205
- const selectors$2 = {
3215
+ const selectors$1 = {
3206
3216
  host: { selector: () => ':host' },
3207
3217
  anchor: {},
3208
3218
  wrapper: { selector: () => ':host > div' },
3209
3219
  text: { selector: () => TextClass.componentName }
3210
3220
  };
3211
3221
 
3212
- const { anchor, text: text$1, host: host$5, wrapper } = selectors$2;
3222
+ const { anchor, text: text$1, host: host$6, wrapper } = selectors$1;
3213
3223
 
3214
3224
  const LinkClass = compose(
3215
3225
  createStyleMixin({
3216
3226
  mappings: {
3217
- width: host$5,
3227
+ hostWidth: { ...host$6, property: 'width' },
3218
3228
  textAlign: wrapper,
3219
- color: [anchor, { ...text$1, property: TextClass.cssVarList.color }],
3229
+ textColor: [
3230
+ { ...anchor, property: 'color' },
3231
+ { ...text$1, property: TextClass.cssVarList.textColor }
3232
+ ],
3220
3233
  cursor: anchor,
3221
- borderBottomWidth: anchor,
3222
- borderBottomStyle: anchor,
3223
- borderBottomColor: anchor
3234
+ textUnderlineWidth: { ...anchor, property: 'border-bottom-width' },
3235
+ textUnderlineStyle: { ...anchor, property: 'border-bottom-style' },
3236
+ textUnderlineColor: { ...anchor, property: 'border-bottom-color' }
3224
3237
  },
3225
3238
  }),
3226
3239
  draggableMixin,
3227
3240
  componentNameValidationMixin
3228
3241
  )(RawLink);
3229
3242
 
3230
- const globalRefs$6 = getThemeRefs(globals);
3243
+ const globalRefs$5 = getThemeRefs(globals);
3231
3244
  const vars$9 = LinkClass.cssVarList;
3232
3245
 
3233
3246
  const link = {
3234
3247
  [vars$9.cursor]: 'pointer',
3235
- [vars$9.borderBottomWidth]: '2px',
3236
- [vars$9.borderBottomStyle]: 'solid',
3237
- [vars$9.borderBottomColor]: 'transparent',
3238
- [vars$9.color]: globalRefs$6.colors.primary.main,
3248
+
3249
+ [vars$9.textUnderlineWidth]: '2px',
3250
+ [vars$9.textUnderlineStyle]: 'solid',
3251
+ [vars$9.textUnderlineColor]: 'transparent',
3252
+ [vars$9.textColor]: globalRefs$5.colors.primary.main,
3239
3253
 
3240
3254
  _hover: {
3241
- [vars$9.borderBottomColor]: globalRefs$6.colors.primary.main
3255
+ [vars$9.textUnderlineColor]: globalRefs$5.colors.primary.main
3242
3256
  },
3243
3257
 
3244
3258
  textAlign: {
@@ -3248,33 +3262,25 @@ const link = {
3248
3262
  },
3249
3263
 
3250
3264
  _fullWidth: {
3251
- [vars$9.width]: '100%'
3265
+ [vars$9.hostWidth]: '100%'
3266
+ },
3267
+
3268
+ _hover: {
3269
+ [vars$9.textUnderlineColor]: 'currentColor'
3252
3270
  },
3253
3271
 
3254
3272
  mode: {
3255
3273
  primary: {
3256
- [vars$9.color]: globalRefs$6.colors.primary.main,
3257
- _hover: {
3258
- [vars$9.borderBottomColor]: globalRefs$6.colors.primary.main
3259
- }
3274
+ [vars$9.textColor]: globalRefs$5.colors.primary.main,
3260
3275
  },
3261
3276
  secondary: {
3262
- [vars$9.color]: globalRefs$6.colors.secondary.main,
3263
- _hover: {
3264
- [vars$9.borderBottomColor]: globalRefs$6.colors.secondary.main
3265
- }
3277
+ [vars$9.textColor]: globalRefs$5.colors.secondary.main,
3266
3278
  },
3267
3279
  error: {
3268
- [vars$9.color]: globalRefs$6.colors.error.main,
3269
- _hover: {
3270
- [vars$9.borderBottomColor]: globalRefs$6.colors.error.main
3271
- }
3280
+ [vars$9.textColor]: globalRefs$5.colors.error.main,
3272
3281
  },
3273
3282
  success: {
3274
- [vars$9.color]: globalRefs$6.colors.success.main,
3275
- _hover: {
3276
- [vars$9.borderBottomColor]: globalRefs$6.colors.success.main
3277
- }
3283
+ [vars$9.textColor]: globalRefs$5.colors.success.main,
3278
3284
  }
3279
3285
  }
3280
3286
  };
@@ -3291,42 +3297,37 @@ class RawDivider extends createBaseClass({ componentName: componentName$a, baseS
3291
3297
  super();
3292
3298
 
3293
3299
  this.attachShadow({ mode: 'open' }).innerHTML = `
3294
- <style>
3295
- :host {
3296
- display: inline-block;
3297
- }
3298
- :host > div {
3299
- display: flex;
3300
- height: 100%;
3301
- width: 100%;
3302
- }
3303
- :host > div::before,
3304
- :host > div::after {
3305
- content: '';
3306
- flex-grow: 1;
3307
- }
3308
-
3309
- descope-text {
3310
- flex-grow: 0;
3311
- flex-shrink: 0;
3312
- min-width: fit-content;
3313
- }
3314
-
3315
- :host(:empty) descope-text {
3316
- display: none;
3317
- }
3318
-
3319
- :host([vertical="true"]) div {
3320
- width: fit-content;
3321
- }
3322
-
3323
- </style>
3324
- <div>
3325
- <descope-text>
3326
- <slot></slot>
3327
- </descope-text>
3328
- </div>
3329
- `;
3300
+ <style>
3301
+ :host {
3302
+ display: inline-block;
3303
+ }
3304
+ :host > div {
3305
+ display: flex;
3306
+ height: 100%;
3307
+ width: 100%;
3308
+ }
3309
+ :host > div::before,
3310
+ :host > div::after {
3311
+ content: '';
3312
+ flex-grow: 1;
3313
+ }
3314
+ descope-text {
3315
+ flex-grow: 0;
3316
+ flex-shrink: 0;
3317
+ }
3318
+ :host(:empty) descope-text {
3319
+ display: none;
3320
+ }
3321
+ :host([vertical="true"]) div {
3322
+ width: fit-content;
3323
+ }
3324
+ </style>
3325
+ <div>
3326
+ <descope-text>
3327
+ <slot></slot>
3328
+ </descope-text>
3329
+ </div>
3330
+ `;
3330
3331
 
3331
3332
  this.textComponent = this.shadowRoot.querySelector('descope-text');
3332
3333
 
@@ -3336,69 +3337,104 @@ class RawDivider extends createBaseClass({ componentName: componentName$a, baseS
3336
3337
  }
3337
3338
  }
3338
3339
 
3339
- const selectors$1 = {
3340
- root: { selector: '' },
3340
+ const {
3341
+ host: host$5,
3342
+ before,
3343
+ after: after$1,
3344
+ text,
3345
+ } = {
3346
+ host: { selector: () => ':host' },
3341
3347
  before: { selector: '::before' },
3342
3348
  after: { selector: '::after' },
3343
3349
  text: { selector: 'descope-text' },
3344
- host: { selector: () => ':host' },
3345
3350
  };
3346
3351
 
3347
- const { root: root$1, before, after: after$1, text, host: host$4 } = selectors$1;
3348
-
3349
3352
  const DividerClass = compose(
3350
3353
  createStyleMixin({
3351
3354
  mappings: {
3352
- maxTextWidth: { ...text, property: 'max-width' },
3353
- minHeight: root$1,
3354
- alignItems: root$1,
3355
- alignSelf: root$1,
3356
- flexDirection: root$1,
3357
- textPadding: { ...text, property: 'padding' },
3358
- width: host$4,
3359
- padding: host$4,
3360
- backgroundColor: [before, after$1],
3361
- opacity: [before, after$1],
3362
- textWidth: { ...text, property: 'width' },
3363
- dividerHeight: [{ ...before, property: 'height' }, { ...after$1, property: 'height' }],
3364
- dividerWidth: [{ ...before, property: 'width' }, { ...after$1, property: 'width' }]
3355
+ hostWidth: { ...host$5, property: 'width' },
3356
+ hostPadding: { ...host$5, property: 'padding' },
3357
+
3358
+ minHeight: {},
3359
+ alignItems: {},
3360
+ alignSelf: {},
3361
+ flexDirection: {},
3362
+
3363
+ labelTextWidth: { ...text, property: 'width' },
3364
+ labelTextMaxWidth: { ...text, property: 'max-width' },
3365
+ labelTextVerticalSpacing: [
3366
+ { ...text, property: 'padding-top' },
3367
+ { ...text, property: 'padding-bottom' }
3368
+ ],
3369
+ labelTextHorizontalSpacing: [
3370
+ { ...text, property: 'padding-right' },
3371
+ { ...text, property: 'padding-left' }
3372
+ ],
3373
+
3374
+ stripeColor: [
3375
+ { ...before, property: 'background-color' },
3376
+ { ...after$1, property: 'background-color' }
3377
+ ],
3378
+ stripeHorizontalThickness: [
3379
+ { ...before, property: 'height' },
3380
+ { ...after$1, property: 'height' }
3381
+ ],
3382
+ stripeVerticalThickness: [
3383
+ { ...before, property: 'width' },
3384
+ { ...after$1, property: 'width' }
3385
+ ],
3386
+ stripeColorOpacity: [
3387
+ { ...before, property: 'opacity' },
3388
+ { ...after$1, property: 'opacity' }
3389
+ ],
3365
3390
  },
3366
3391
  }),
3367
3392
  draggableMixin,
3368
3393
  componentNameValidationMixin
3369
3394
  )(RawDivider);
3370
3395
 
3371
- const globalRefs$5 = getThemeRefs(globals);
3372
-
3396
+ const globalRefs$4 = getThemeRefs(globals);
3373
3397
  const compVars = DividerClass.cssVarList;
3374
3398
 
3375
- const thickness = '2px';
3376
- const textPaddingSize = '10px';
3377
- const [helperTheme, helperRefs, helperVars] = createHelperVars({ thickness, textPaddingSize }, componentName$a);
3399
+ const [
3400
+ helperTheme$1,
3401
+ helperRefs$1,
3402
+ helperVars
3403
+ ] = createHelperVars({
3404
+ thickness: '2px',
3405
+ spacing: '10px'
3406
+ }, componentName$a);
3378
3407
 
3379
3408
  const divider = {
3380
- ...helperTheme,
3409
+ ...helperTheme$1,
3410
+
3381
3411
  [compVars.alignItems]: 'center',
3382
- [compVars.dividerHeight]: helperRefs.thickness,
3383
- [compVars.backgroundColor]: globalRefs$5.colors.surface.main,
3384
- [compVars.textPadding]: `0 ${helperRefs.textPaddingSize}`,
3385
- [compVars.width]: '100%',
3386
3412
  [compVars.flexDirection]: 'row',
3387
- [compVars.alignSelf]: 'strech',
3388
- [compVars.textWidth]: 'fit-content',
3389
- [compVars.maxTextWidth]: 'calc(100% - 100px)',
3413
+ [compVars.alignSelf]: 'stretch',
3414
+ [compVars.hostWidth]: '100%',
3415
+ [compVars.stripeColor]: globalRefs$4.colors.surface.main,
3416
+ [compVars.stripeColorOpacity]: '0.5',
3417
+ [compVars.stripeHorizontalThickness]: helperRefs$1.thickness,
3418
+ [compVars.labelTextWidth]: 'fit-content',
3419
+ [compVars.labelTextMaxWidth]: 'calc(100% - 100px)',
3420
+ [compVars.labelTextHorizontalSpacing]: helperRefs$1.spacing,
3421
+
3390
3422
  _vertical: {
3391
- [compVars.padding]: `0 calc(${thickness} * 3)`,
3392
- [compVars.width]: 'fit-content',
3393
- [compVars.textPadding]: `${helperRefs.textPaddingSize} 0`,
3394
- [compVars.flexDirection]: 'column',
3395
3423
  [compVars.minHeight]: '200px',
3396
- [compVars.textWidth]: 'fit-content',
3397
- [compVars.dividerWidth]: helperRefs.thickness,
3398
- [compVars.maxTextWidth]: '100%',
3424
+ [compVars.flexDirection]: 'column',
3425
+ [compVars.hostWidth]: 'fit-content',
3426
+ [compVars.hostPadding]: `0 calc(${helperRefs$1.thickness} * 3)`,
3427
+ [compVars.stripeVerticalThickness]: helperRefs$1.thickness,
3428
+ [compVars.labelTextWidth]: 'fit-content',
3429
+ [compVars.labelTextMaxWidth]: '100%',
3430
+ [compVars.labelTextVerticalSpacing]: helperRefs$1.spacing,
3399
3431
  }
3400
3432
  };
3401
- const vars$8 = { ...compVars, ...helperVars };
3433
+
3434
+ const vars$8 = {
3435
+ ...compVars,
3436
+ ...helperVars
3437
+ };
3402
3438
 
3403
3439
  var divider$1 = /*#__PURE__*/Object.freeze({
3404
3440
  __proto__: null,
@@ -3459,10 +3495,15 @@ const customMixin$2 = (superclass) =>
3459
3495
  }
3460
3496
  };
3461
3497
 
3462
- const { borderStyle, borderWidth, ...restTextFieldMappings } =
3463
- textFieldMappings;
3464
-
3465
- const { digitField, label: label$2, requiredIndicator: requiredIndicator$1, internalWrapper, focusedDigitField } = {
3498
+ const {
3499
+ host: host$4,
3500
+ digitField,
3501
+ label: label$3,
3502
+ requiredIndicator: requiredIndicator$2,
3503
+ internalWrapper,
3504
+ focusedDigitField
3505
+ } = {
3506
+ host: () => ':host',
3466
3507
  focusedDigitField: { selector: () => `${TextFieldClass.componentName}[focused="true"]` },
3467
3508
  digitField: { selector: () => TextFieldClass.componentName },
3468
3509
  label: { selector: '::part(label)' },
@@ -3475,26 +3516,29 @@ const textVars$1 = TextFieldClass.cssVarList;
3475
3516
  const PasscodeClass = compose(
3476
3517
  createStyleMixin({
3477
3518
  mappings: {
3478
- ...restTextFieldMappings,
3479
- borderColor: { ...digitField, property: textVars$1.borderColor },
3480
- outlineColor: { ...digitField, property: textVars$1.outlineColor },
3481
- outlineWidth: [
3482
- { ...digitField, property: textVars$1.outlineWidth },
3483
- // we want to leave enough space to the digits outline,
3484
- // ideally, this would be part of the text field
3485
- { ...internalWrapper, property: 'padding' }
3519
+ hostWidth: { property: 'width' },
3520
+ fontFamily: host$4,
3521
+ labelTextColor: [
3522
+ { ...label$3, property: 'color' },
3523
+ { ...requiredIndicator$2, property: 'color' },
3486
3524
  ],
3487
- color: [restTextFieldMappings.color, label$2, requiredIndicator$1],
3488
- padding: { ...digitField, property: textVars$1.padding },
3489
- margin: { ...digitField, property: textVars$1.margin },
3490
- textAlign: { ...digitField, property: textVars$1.textAlign },
3491
- caretColor: { ...digitField, property: textVars$1.caretColor },
3492
- digitsGap: { ...internalWrapper, property: 'gap' },
3493
- focusedDigitFieldOutlineColor: { ...focusedDigitField, property: textVars$1.outlineColor }
3525
+ labelRequiredIndicator: { ...requiredIndicator$2, property: 'content' },
3526
+ digitValueTextColor: {
3527
+ selector: TextFieldClass.componentName,
3528
+ property: textVars$1.inputValueTextColor
3529
+ },
3530
+ digitPadding: { ...digitField, property: textVars$1.inputPadding },
3531
+ digitTextAlign: { ...digitField, property: textVars$1.inputTextAlign },
3532
+ digitCaretTextColor: { ...digitField, property: textVars$1.inputCaretTextColor },
3533
+ digitSpacing: { ...internalWrapper, property: 'gap' },
3534
+ digitOutlineColor: { ...digitField, property: textVars$1.inputOutlineColor },
3535
+ digitOutlineWidth: { ...digitField, property: textVars$1.inputOutlineWidth },
3536
+
3537
+ focusedDigitFieldOutlineColor: { ...focusedDigitField, property: textVars$1.inputOutlineColor }
3494
3538
  },
3495
3539
  }),
3496
3540
  draggableMixin,
3497
- proxyInputMixin,
3541
+ composedProxyInputMixin,
3498
3542
  componentNameValidationMixin,
3499
3543
  customMixin$2
3500
3544
  )(
@@ -3503,11 +3547,11 @@ const PasscodeClass = compose(
3503
3547
  wrappedEleName: 'vaadin-text-field',
3504
3548
  style: () => `
3505
3549
  :host {
3506
- --vaadin-field-default-width: auto;
3507
3550
  display: inline-block;
3508
3551
  max-width: 100%;
3509
3552
  min-width: calc(var(--passcode-digits-count) * 2em);
3510
3553
  }
3554
+ ${resetInputFieldDefaultWidth()}
3511
3555
  :host::after {
3512
3556
  background-color: transparent;
3513
3557
  }
@@ -3532,7 +3576,7 @@ const PasscodeClass = compose(
3532
3576
 
3533
3577
  descope-passcode-internal descope-text-field {
3534
3578
  min-width: 2em;
3535
- max-width: var(${textVars$1.height});
3579
+ max-width: var(${textVars$1.inputHeight});
3536
3580
  }
3537
3581
 
3538
3582
  vaadin-text-field::part(input-field) {
@@ -3556,57 +3600,44 @@ const PasscodeClass = compose(
3556
3600
  opacity: 1;
3557
3601
  }
3558
3602
 
3559
- vaadin-text-field::part(input-field):focus {
3560
- cursor: text;
3561
- }
3562
-
3563
- vaadin-text-field[required]::part(required-indicator)::after {
3564
- content: "*";
3565
- }
3566
3603
  vaadin-text-field[readonly]::part(input-field)::after {
3567
3604
  border: 0 solid;
3568
3605
  }
3606
+
3607
+ vaadin-text-field::part(input-field) {
3608
+ box-shadow: none;
3609
+ }
3610
+
3611
+ ${resetInputCursor('vaadin-text-field')}
3569
3612
  `,
3570
3613
  excludeAttrsSync: ['tabindex'],
3571
3614
  componentName: componentName$8
3572
3615
  })
3573
3616
  );
3574
3617
 
3618
+ const globalRefs$3 = getThemeRefs(globals);
3575
3619
  const vars$7 = PasscodeClass.cssVarList;
3576
- const globalRefs$4 = getThemeRefs(globals);
3577
3620
 
3578
3621
  const passcode = {
3579
- [vars$7.backgroundColor]: globalRefs$4.colors.surface.light,
3580
- [vars$7.outlineWidth]: '2px',
3581
- [vars$7.outlineColor]: 'transparent',
3582
- [vars$7.padding]: '0',
3583
- [vars$7.textAlign]: 'center',
3584
- [vars$7.borderColor]: 'transparent',
3585
- [vars$7.digitsGap]: '0',
3586
- [vars$7.focusedDigitFieldOutlineColor]: globalRefs$4.colors.surface.main,
3587
- [vars$7.color]: globalRefs$4.colors.surface.contrast,
3622
+ [vars$7.fontFamily]: refs.fontFamily,
3623
+ [vars$7.labelTextColor]: refs.labelTextColor,
3624
+ [vars$7.labelRequiredIndicator]: refs.requiredIndicator,
3625
+ [vars$7.digitValueTextColor]: refs.valueTextColor,
3626
+ [vars$7.digitPadding]: '0',
3627
+ [vars$7.digitTextAlign]: 'center',
3628
+ [vars$7.digitSpacing]: '0',
3629
+ [vars$7.hostWidth]: refs.width,
3630
+ [vars$7.digitOutlineColor]: 'transparent',
3631
+ [vars$7.digitOutlineWidth]: '2px',
3632
+ [vars$7.focusedDigitFieldOutlineColor]: globalRefs$3.colors.surface.main,
3588
3633
 
3589
3634
  _hideCursor: {
3590
- [vars$7.caretColor]: 'transparent',
3591
- },
3592
-
3593
- _disabled: {
3594
- [vars$7.backgroundColor]: globalRefs$4.colors.surface.main
3595
- },
3596
-
3597
- _fullWidth: {
3598
- [vars$7.width]: '100%'
3599
- },
3600
-
3601
- _bordered: {
3602
- [vars$7.borderColor]: globalRefs$4.colors.surface.main
3635
+ [vars$7.digitCaretTextColor]: 'transparent',
3603
3636
  },
3604
3637
 
3605
3638
  _invalid: {
3606
- [vars$7.borderColor]: globalRefs$4.colors.error.main,
3607
- [vars$7.color]: globalRefs$4.colors.error.main,
3608
- [vars$7.focusedDigitFieldOutlineColor]: globalRefs$4.colors.error.light,
3609
- },
3639
+ [vars$7.focusedDigitFieldOutlineColor]: globalRefs$3.colors.error.light,
3640
+ }
3610
3641
  };
3611
3642
 
3612
3643
  var passcode$1 = /*#__PURE__*/Object.freeze({
@@ -3640,7 +3671,6 @@ class RawLoaderLinear extends createBaseClass({ componentName: componentName$7,
3640
3671
  position: absolute;
3641
3672
  left: 0;
3642
3673
  }
3643
-
3644
3674
  :host > div {
3645
3675
  width: 100%;
3646
3676
  }
@@ -3651,73 +3681,73 @@ class RawLoaderLinear extends createBaseClass({ componentName: componentName$7,
3651
3681
  }
3652
3682
 
3653
3683
  const selectors = {
3654
- root: {},
3655
3684
  after: { selector: '::after' },
3656
3685
  host: { selector: () => ':host' }
3657
3686
  };
3658
3687
 
3659
- const { root, after, host: host$3 } = selectors;
3688
+ const { after, host: host$3 } = selectors;
3660
3689
 
3661
3690
  const LoaderLinearClass = compose(
3662
3691
  createStyleMixin({
3663
3692
  mappings: {
3664
- display: root,
3665
- width: host$3,
3666
- height: [root, after],
3667
- borderRadius: [root, after],
3668
- surfaceColor: [{ property: 'background-color' }],
3669
- barColor: [{ ...after, property: 'background-color' }],
3693
+ hostDisplay: {},
3694
+ hostWidth: { ...host$3, property: 'width' },
3695
+ barHeight: [
3696
+ { property: 'height' },
3697
+ { ...after, property: 'height' }
3698
+ ],
3699
+ barBorderRadius: [
3700
+ { property: 'border-radius' },
3701
+ { ...after, property: 'border-radius' }
3702
+ ],
3703
+ barBackgroundColor: { property: 'background-color' },
3704
+ barColor: { ...after, property: 'background-color' },
3670
3705
  barWidth: { ...after, property: 'width' },
3671
- animationDuration: [root, after],
3672
- animationTimingFunction: [root, after],
3673
- animationIterationCount: [root, after]
3706
+ animationDuration: [{}, after],
3707
+ animationTimingFunction: [{}, after],
3708
+ animationIterationCount: [{}, after]
3674
3709
  }
3675
3710
  }),
3676
3711
  draggableMixin,
3677
3712
  componentNameValidationMixin
3678
3713
  )(RawLoaderLinear);
3679
3714
 
3680
- const globalRefs$3 = getThemeRefs(globals);
3681
-
3715
+ const globalRefs$2 = getThemeRefs(globals);
3682
3716
  const vars$6 = LoaderLinearClass.cssVarList;
3683
3717
 
3684
3718
  const loaderLinear = {
3685
- [vars$6.display]: 'inline-block',
3686
- [vars$6.barColor]: globalRefs$3.colors.surface.contrast,
3719
+ [vars$6.hostDisplay]: 'inline-block',
3720
+ [vars$6.hostWidth]: '100%',
3721
+
3722
+ [vars$6.barColor]: globalRefs$2.colors.surface.contrast,
3687
3723
  [vars$6.barWidth]: '20%',
3688
- [vars$6.surfaceColor]: globalRefs$3.colors.surface.main,
3689
- [vars$6.borderRadius]: '4px',
3724
+
3725
+ [vars$6.barBackgroundColor]: globalRefs$2.colors.surface.main,
3726
+ [vars$6.barBorderRadius]: '4px',
3727
+
3690
3728
  [vars$6.animationDuration]: '2s',
3691
3729
  [vars$6.animationTimingFunction]: 'linear',
3692
3730
  [vars$6.animationIterationCount]: 'infinite',
3693
- [vars$6.width]: '100%',
3731
+
3694
3732
  size: {
3695
- xs: {
3696
- [vars$6.height]: '6px'
3697
- },
3698
- sm: {
3699
- [vars$6.height]: '8px'
3700
- },
3701
- md: {
3702
- [vars$6.height]: '10px'
3703
- },
3704
- lg: {
3705
- [vars$6.height]: '12px'
3706
- },
3707
- xl: {
3708
- [vars$6.height]: '14px'
3709
- }
3733
+ xs: { [vars$6.barHeight]: '8px' },
3734
+ sm: { [vars$6.barHeight]: '10px' },
3735
+ md: { [vars$6.barHeight]: '14px' },
3736
+ lg: { [vars$6.barHeight]: '20px' },
3737
+ xl: { [vars$6.barHeight]: '25px' }
3710
3738
  },
3739
+
3711
3740
  mode: {
3712
3741
  primary: {
3713
- [vars$6.barColor]: globalRefs$3.colors.primary.main
3742
+ [vars$6.barColor]: globalRefs$2.colors.primary.main
3714
3743
  },
3715
3744
  secondary: {
3716
- [vars$6.barColor]: globalRefs$3.colors.secondary.main
3745
+ [vars$6.barColor]: globalRefs$2.colors.secondary.main
3717
3746
  }
3718
3747
  },
3748
+
3719
3749
  _hidden: {
3720
- [vars$6.display]: 'none'
3750
+ [vars$6.hostDisplay]: 'none'
3721
3751
  }
3722
3752
  };
3723
3753
 
@@ -3755,17 +3785,18 @@ class RawLoaderRadial extends createBaseClass({ componentName: componentName$6,
3755
3785
  const LoaderRadialClass = compose(
3756
3786
  createStyleMixin({
3757
3787
  mappings: {
3758
- display: {},
3759
- width: {},
3760
- height: {},
3761
- spinnerWidth: { property: 'border-width' },
3762
- spinnerStyle: { property: 'border-style' },
3763
- spinnerRadius: { property: 'border-radius' },
3764
- spinnerTopColor: { property: 'border-top-color' },
3765
- spinnerBottomColor: { property: 'border-bottom-color' },
3766
- spinnerRightColor: { property: 'border-right-color' },
3767
- spinnerLeftColor: { property: 'border-left-color' },
3768
- color: {},
3788
+ hostDisplay: { property: 'display' },
3789
+ spinnerSize: [
3790
+ { property: 'width' },
3791
+ { property: 'height' }
3792
+ ],
3793
+ spinnerBorderWidth: { property: 'border-width' },
3794
+ spinnerBorderStyle: { property: 'border-style' },
3795
+ spinnerBorderRadius: { property: 'border-radius' },
3796
+ spinnerQuadrant1Color: { property: 'border-top-color' },
3797
+ spinnerQuadrant2Color: { property: 'border-bottom-color' },
3798
+ spinnerQuadrant3Color: { property: 'border-right-color' },
3799
+ spinnerQuadrant4Color: { property: 'border-left-color' },
3769
3800
  animationDuration: {},
3770
3801
  animationTimingFunction: {},
3771
3802
  animationIterationCount: {}
@@ -3775,60 +3806,45 @@ const LoaderRadialClass = compose(
3775
3806
  componentNameValidationMixin
3776
3807
  )(RawLoaderRadial);
3777
3808
 
3778
- const globalRefs$2 = getThemeRefs(globals);
3779
-
3809
+ const globalRefs$1 = getThemeRefs(globals);
3780
3810
  const vars$5 = LoaderRadialClass.cssVarList;
3781
3811
 
3782
- const loaderRadial = {
3783
- [vars$5.display]: 'inline-block',
3784
- [vars$5.color]: globalRefs$2.colors.surface.contrast,
3785
- [vars$5.animationDuration]: '2s',
3786
- [vars$5.animationTimingFunction]: 'linear',
3787
- [vars$5.animationIterationCount]: 'infinite',
3788
- [vars$5.spinnerStyle]: 'solid',
3789
- [vars$5.spinnerWidth]: '4px',
3790
- [vars$5.spinnerRadius]: '50%',
3791
- [vars$5.spinnerTopColor]: 'currentColor',
3792
- [vars$5.spinnerBottomColor]: 'transparent',
3793
- [vars$5.spinnerRightColor]: 'currentColor',
3794
- [vars$5.spinnerLeftColor]: 'transparent',
3795
- size: {
3796
- xs: {
3797
- [vars$5.width]: '20px',
3798
- [vars$5.height]: '20px',
3799
- [vars$5.spinnerWidth]: '2px'
3800
- },
3801
- sm: {
3802
- [vars$5.width]: '30px',
3803
- [vars$5.height]: '30px',
3804
- [vars$5.spinnerWidth]: '3px'
3805
- },
3806
- md: {
3807
- [vars$5.width]: '40px',
3808
- [vars$5.height]: '40px',
3809
- [vars$5.spinnerWidth]: '4px'
3810
- },
3811
- lg: {
3812
- [vars$5.width]: '60px',
3813
- [vars$5.height]: '60px',
3814
- [vars$5.spinnerWidth]: '5px'
3815
- },
3816
- xl: {
3817
- [vars$5.width]: '80px',
3818
- [vars$5.height]: '80px',
3819
- [vars$5.spinnerWidth]: '6px'
3820
- }
3821
- },
3812
+ const [helperTheme, helperRefs] = createHelperVars({
3813
+ spinnerColor: globalRefs$1.colors.surface.contrast,
3822
3814
  mode: {
3823
3815
  primary: {
3824
- [vars$5.color]: globalRefs$2.colors.primary.main
3816
+ spinnerColor: globalRefs$1.colors.primary.main
3825
3817
  },
3826
3818
  secondary: {
3827
- [vars$5.color]: globalRefs$2.colors.secondary.main
3819
+ spinnerColor: globalRefs$1.colors.secondary.main
3828
3820
  }
3821
+ }
3822
+ }, componentName$6);
3823
+
3824
+ const loaderRadial = {
3825
+ ...helperTheme,
3826
+
3827
+ [vars$5.animationDuration]: '2s',
3828
+ [vars$5.animationTimingFunction]: 'linear',
3829
+ [vars$5.animationIterationCount]: 'infinite',
3830
+ [vars$5.spinnerBorderStyle]: 'solid',
3831
+ [vars$5.spinnerBorderWidth]: '0.2em',
3832
+ [vars$5.spinnerBorderRadius]: '50%',
3833
+ [vars$5.spinnerQuadrant1Color]: helperRefs.spinnerColor,
3834
+ [vars$5.spinnerQuadrant2Color]: 'transparent',
3835
+ [vars$5.spinnerQuadrant3Color]: helperRefs.spinnerColor,
3836
+ [vars$5.spinnerQuadrant4Color]: 'transparent',
3837
+
3838
+ size: {
3839
+ xs: { [vars$5.spinnerSize]: '20px' },
3840
+ sm: { [vars$5.spinnerSize]: '30px' },
3841
+ md: { [vars$5.spinnerSize]: '40px' },
3842
+ lg: { [vars$5.spinnerSize]: '60px' },
3843
+ xl: { [vars$5.spinnerSize]: '80px' }
3829
3844
  },
3845
+
3830
3846
  _hidden: {
3831
- [vars$5.display]: 'none'
3847
+ [vars$5.hostDisplay]: 'none'
3832
3848
  }
3833
3849
  };
3834
3850
 
@@ -3840,7 +3856,6 @@ var loaderRadial$1 = /*#__PURE__*/Object.freeze({
3840
3856
 
3841
3857
  const componentName$5 = getComponentName('combo-box');
3842
3858
 
3843
-
3844
3859
  const ComboBoxMixin = (superclass) => class ComboBoxMixinClass extends superclass {
3845
3860
  constructor() {
3846
3861
  super();
@@ -3893,16 +3908,22 @@ const ComboBoxMixin = (superclass) => class ComboBoxMixinClass extends superclas
3893
3908
 
3894
3909
  const {
3895
3910
  host: host$2,
3896
- input,
3911
+ inputField: inputField$1,
3897
3912
  placeholder,
3898
3913
  toggle,
3899
- label: label$1
3914
+ label: label$2,
3915
+ requiredIndicator: requiredIndicator$1,
3916
+ helperText: helperText$2,
3917
+ errorMessage: errorMessage$2
3900
3918
  } = {
3901
3919
  host: { selector: () => ':host' },
3902
- input: { selector: '::part(input-field)' },
3920
+ inputField: { selector: '::part(input-field)' },
3903
3921
  placeholder: { selector: '> input:placeholder-shown' },
3904
3922
  toggle: { selector: '::part(toggle-button)' },
3905
- label: { selector: '::part(label)' }
3923
+ label: { selector: '::part(label)' },
3924
+ requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
3925
+ helperText: { selector: '::part(helper-text)' },
3926
+ errorMessage: { selector: '::part(error-message)' }
3906
3927
  };
3907
3928
 
3908
3929
  // const { slotted, selected } = {
@@ -3913,27 +3934,38 @@ const {
3913
3934
  const ComboBoxClass = compose(
3914
3935
  createStyleMixin({
3915
3936
  mappings: {
3916
- width: host$2,
3917
- height: input,
3918
- padding: input,
3919
-
3920
- inputBackgroundColor: { ...input, property: 'background-color' },
3921
- boxShadow: input,
3922
-
3923
- borderColor: input,
3924
- borderWidth: input,
3925
- borderStyle: input,
3926
- borderRadius: input,
3927
-
3928
- color: [label$1, input],
3929
-
3937
+ hostWidth: { ...host$2, property: 'width' },
3930
3938
  // we apply font-size also on the host so we can set its width with em
3931
- fontSize: [{}, host$2],
3932
-
3933
- placeholderColor: { ...placeholder, property: 'color' },
3934
-
3935
- toggleCursor: { ...toggle, property: 'cursor' },
3936
- toggleColor: { ...toggle, property: 'color' },
3939
+ fontSize: [
3940
+ { property: 'font-size' },
3941
+ { ...host$2, property: 'font-size' }
3942
+ ],
3943
+ fontFamily: [
3944
+ label$2,
3945
+ placeholder,
3946
+ inputField$1,
3947
+ helperText$2,
3948
+ errorMessage$2
3949
+ ],
3950
+ labelTextColor: [
3951
+ { ...label$2, property: 'color' },
3952
+ { ...requiredIndicator$1, property: 'color' }
3953
+ ],
3954
+ inputHeight: { ...inputField$1, property: 'height' },
3955
+ inputBackgroundColor: { ...inputField$1, property: 'background-color' },
3956
+ inputBorderColor: { ...inputField$1, property: 'border-color' },
3957
+ inputBorderWidth: { ...inputField$1, property: 'border-width' },
3958
+ inputBorderStyle: { ...inputField$1, property: 'border-style' },
3959
+ inputBorderRadius: { ...inputField$1, property: 'border-radius' },
3960
+ labelRequiredIndicator: { ...requiredIndicator$1, property: 'content' },
3961
+ inputValueTextColor: { ...inputField$1, property: 'color' },
3962
+ inputPlaceholderTextColor: { ...placeholder, property: 'color' },
3963
+ inputDropdownButtonCursor: { ...toggle, property: 'cursor' },
3964
+ inputDropdownButtonColor: { ...toggle, property: 'color' },
3965
+ inputOutlineColor: { ...inputField$1, property: 'outline-color' },
3966
+ inputOutlineWidth: { ...inputField$1, property: 'outline-width' },
3967
+ inputOutlineStyle: { ...inputField$1, property: 'outline-style' },
3968
+ inputOutlineOffset: { ...inputField$1, property: 'outline-offset' },
3937
3969
 
3938
3970
  // we need to use the variables from the portal mixin
3939
3971
  // so we need to use an arrow function on the selector
@@ -3957,7 +3989,7 @@ const ComboBoxClass = compose(
3957
3989
  attributes: ['size']
3958
3990
  },
3959
3991
  }),
3960
- proxyInputMixin,
3992
+ composedProxyInputMixin,
3961
3993
  componentNameValidationMixin,
3962
3994
  ComboBoxMixin
3963
3995
  )(
@@ -3969,28 +4001,24 @@ const ComboBoxClass = compose(
3969
4001
  display: inline-flex;
3970
4002
  box-sizing: border-box;
3971
4003
  -webkit-mask-image: none;
4004
+ padding: calc(var(${ComboBoxClass.cssVarList.inputOutlineWidth}) + var(${ComboBoxClass.cssVarList.inputOutlineOffset}))
3972
4005
  }
3973
4006
  vaadin-combo-box {
3974
4007
  padding: 0;
4008
+ width: 100%;
3975
4009
  }
3976
4010
  vaadin-combo-box [slot="input"] {
3977
4011
  -webkit-mask-image: none;
3978
4012
  min-height: 0;
3979
4013
  }
4014
+
3980
4015
  vaadin-combo-box::part(input-field) {
3981
- -webkit-mask-image: none;
3982
- border-radius: 0;
3983
4016
  padding: 0;
3984
4017
  }
3985
- vaadin-combo-box::part(input-field)::after {
3986
- opacity: 0;
3987
- }
3988
- vaadin-combo-box[readonly]::part(input-field)::after {
3989
- border: none;
3990
- }
3991
- vaadin-combo-box[readonly] > input:placeholder-shown {
3992
- opacity: 1;
3993
- }
4018
+
4019
+ ${resetInputReadonlyStyle('vaadin-combo-box')}
4020
+ ${resetInputPlaceholder('vaadin-combo-box')}
4021
+ ${resetInputCursor('vaadin-combo-box')}
3994
4022
  `,
3995
4023
  // Note: we exclude `size` to avoid overriding Vaadin's ComboBox property
3996
4024
  // with the same name. Including it will cause Vaadin to calculate NaN size,
@@ -4002,51 +4030,38 @@ const ComboBoxClass = compose(
4002
4030
  })
4003
4031
  );
4004
4032
 
4005
- const globalRefs$1 = getThemeRefs(globals);
4006
-
4033
+ const globalRefs = getThemeRefs(globals);
4007
4034
  const vars$4 = ComboBoxClass.cssVarList;
4008
4035
 
4009
4036
  const comboBox = {
4010
- [vars$4.borderColor]: globalRefs$1.colors.surface.main,
4011
- [vars$4.borderWidth]: '1px',
4012
- [vars$4.borderStyle]: 'solid',
4013
- [vars$4.cursor]: 'pointer',
4014
- [vars$4.padding]: '0',
4015
- [vars$4.placeholderColor]: globalRefs$1.colors.surface.main,
4016
- [vars$4.toggleColor]: globalRefs$1.colors.surface.contrast,
4017
- [vars$4.toggleCursor]: 'pointer',
4018
- [vars$4.inputBackgroundColor]: globalRefs$1.colors.surface.light,
4019
- [vars$4.padding]: `0 ${globalRefs$1.spacing.xs}`,
4020
-
4021
- [vars$4.height]: '2em',
4022
-
4023
- size: {
4024
- xs: {
4025
- [vars$4.fontSize]: '8px',
4026
- },
4027
- sm: {
4028
- [vars$4.fontSize]: '10px',
4029
- },
4030
- md: {
4031
- [vars$4.fontSize]: '14px',
4032
- },
4033
- lg: {
4034
- [vars$4.fontSize]: '20px',
4035
- },
4036
- xl: {
4037
- [vars$4.fontSize]: '25px',
4038
- }
4039
- },
4037
+ [vars$4.hostWidth]: refs.width,
4038
+ [vars$4.fontSize]: refs.fontSize,
4039
+ [vars$4.fontFamily]: refs.fontFamily,
4040
+ [vars$4.labelTextColor]: refs.labelTextColor,
4041
+ [vars$4.inputBorderColor]: refs.borderColor,
4042
+ [vars$4.inputBorderWidth]: refs.borderWidth,
4043
+ [vars$4.inputBorderStyle]: refs.borderStyle,
4044
+ [vars$4.inputBorderRadius]: refs.borderRadius,
4045
+ [vars$4.inputOutlineColor]: refs.outlineColor,
4046
+ [vars$4.inputOutlineOffset]: refs.outlineOffset,
4047
+ [vars$4.inputOutlineWidth]: refs.outlineWidth,
4048
+ [vars$4.inputOutlineStyle]: refs.outlineStyle,
4049
+ [vars$4.labelRequiredIndicator]: refs.requiredIndicator,
4050
+ [vars$4.inputValueTextColor]: refs.valueTextColor,
4051
+ [vars$4.inputPlaceholderTextColor]: refs.placeholderTextColor,
4052
+ [vars$4.inputBackgroundColor]: refs.backgroundColor,
4053
+ [vars$4.inputHeight]: refs.inputHeight,
4054
+ [vars$4.inputDropdownButtonColor]: globalRefs.colors.surface.contrast,
4055
+ [vars$4.inputDropdownButtonCursor]: 'pointer',
4040
4056
 
4041
4057
  _readonly: {
4042
- [vars$4.toggleCursor]: 'default',
4058
+ [vars$4.inputDropdownButtonCursor]: 'default'
4043
4059
  },
4044
4060
 
4045
4061
  _invalid: {
4046
- [vars$4.borderColor]: globalRefs$1.colors.error.main,
4047
- [vars$4.placeholderColor]: globalRefs$1.colors.error.light,
4048
- [vars$4.toggleColor]: globalRefs$1.colors.error.main,
4062
+ [vars$4.inputDropdownButtonColor]: globalRefs.colors.error.main
4049
4063
  },
4064
+
4050
4065
  // [vars.overlayCursor]: 'pointer',
4051
4066
  // [vars.overlayBackground]: globalRefs.colors.surface.light,
4052
4067
  // [vars.overlayBorder]: `2px solid red`,
@@ -5378,27 +5393,32 @@ const customMixin$1 = (superclass) =>
5378
5393
 
5379
5394
  const {
5380
5395
  host: host$1,
5381
- inputWrapper,
5396
+ label: label$1,
5397
+ requiredIndicator,
5398
+ inputField,
5382
5399
  countryCodeInput,
5383
5400
  phoneInput,
5384
- label,
5385
- requiredIndicator,
5386
- separator
5401
+ separator,
5402
+ errorMessage: errorMessage$1,
5403
+ helperText: helperText$1
5387
5404
  } = {
5388
5405
  host: { selector: () => ':host' },
5389
- inputWrapper: { selector: '::part(input-field)' },
5390
- phoneInput: { selector: () => 'descope-text-field' },
5391
- countryCodeInput: { selector: () => 'descope-combo-box' },
5392
5406
  label: { selector: '::part(label)' },
5393
5407
  requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
5394
- separator: { selector: 'descope-phone-field-internal .separator' }
5408
+ inputField: { selector: '::part(input-field)' },
5409
+ phoneInput: { selector: () => 'descope-text-field' },
5410
+ countryCodeInput: { selector: () => 'descope-combo-box' },
5411
+ separator: { selector: 'descope-phone-field-internal .separator' },
5412
+ helperText: { selector: '::part(helper-text)' },
5413
+ errorMessage: { selector: '::part(error-message)' }
5395
5414
  };
5396
5415
 
5397
5416
  const PhoneFieldClass = compose(
5398
5417
  createStyleMixin({
5399
5418
  mappings: {
5400
5419
  fontSize: [
5401
- host$1, inputWrapper,
5420
+ { ...host$1, property: 'font-size' },
5421
+ { ...inputField, property: 'font-size' },
5402
5422
  {
5403
5423
  selector: TextFieldClass.componentName,
5404
5424
  property: TextFieldClass.cssVarList.fontSize
@@ -5408,57 +5428,66 @@ const PhoneFieldClass = compose(
5408
5428
  property: ComboBoxClass.cssVarList.fontSize
5409
5429
  }
5410
5430
  ],
5431
+ fontFamily: [
5432
+ label$1,
5433
+ errorMessage$1,
5434
+ helperText$1
5435
+ ],
5436
+ hostWidth: [
5437
+ { ...host$1, property: 'width' },
5438
+ { ...phoneInput, property: 'width' },
5439
+ { ...countryCodeInput, property: '--vaadin-combo-box-overlay-width' }
5440
+ ],
5411
5441
 
5412
- componentWidth: { ...host$1, property: 'width' },
5413
-
5414
- wrapperBorderStyle: [
5415
- { ...inputWrapper, property: 'border-style' },
5442
+ inputBorderStyle: [
5443
+ { ...inputField, property: 'border-style' },
5416
5444
  { ...separator, property: 'border-left-style' }
5417
5445
  ],
5418
- wrapperBorderWidth: [
5419
- { ...inputWrapper, property: 'border-width' },
5446
+ inputBorderWidth: [
5447
+ { ...inputField, property: 'border-width' },
5420
5448
  { ...separator, property: 'border-left-width' }
5421
5449
  ],
5422
- wrapperBorderColor: [
5423
- { ...inputWrapper, property: 'border-color' },
5450
+ inputBorderColor: [
5451
+ { ...inputField, property: 'border-color' },
5424
5452
  { ...separator, property: 'border-left-color' }
5425
5453
  ],
5426
- wrapperBorderRadius: { ...inputWrapper, property: 'border-radius' },
5454
+ inputBorderRadius: { ...inputField, property: 'border-radius' },
5427
5455
 
5428
- inputHeight: { ...inputWrapper, property: 'height' },
5456
+ inputHeight: { ...inputField, property: 'height' },
5429
5457
 
5430
- countryCodeInputWidth: { ...countryCodeInput, property: comboVars.width },
5458
+ countryCodeInputWidth: { ...countryCodeInput, property: comboVars.hostWidth },
5431
5459
  countryCodeDropdownWidth: {
5432
5460
  ...countryCodeInput,
5433
5461
  property: '--vaadin-combo-box-overlay-width'
5434
5462
  },
5435
-
5436
5463
  phoneInputWidth: { ...phoneInput, property: 'width' },
5437
5464
 
5438
- color: [
5439
- label,
5440
- requiredIndicator,
5441
- { ...phoneInput, property: textVars.color },
5442
- { ...countryCodeInput, property: comboVars.color }
5465
+ labelTextColor: [
5466
+ { ...label$1, property: 'color' },
5467
+ { ...requiredIndicator, property: 'color' },
5443
5468
  ],
5469
+ labelRequiredIndicator: { ...requiredIndicator, property: 'content' },
5444
5470
 
5445
- placeholderColor: {
5446
- ...phoneInput,
5447
- property: textVars.placeholderColor
5448
- },
5471
+ inputValueTextColor: [
5472
+ { ...phoneInput, property: textVars.inputValueTextColor },
5473
+ { ...countryCodeInput, property: comboVars.inputValueTextColor }
5474
+ ],
5475
+
5476
+ inputPlaceholderTextColor: { ...phoneInput, property: textVars.inputPlaceholderColor },
5449
5477
 
5450
5478
  overlayItemBackgroundColor: {
5451
5479
  selector: 'descope-combo-box',
5452
5480
  property: comboVars.overlayItemBackgroundColor
5453
5481
  },
5454
5482
 
5455
- outlineStyle: inputWrapper,
5456
- outlineWidth: [inputWrapper, { property: 'padding' }],
5457
- outlineColor: inputWrapper,
5483
+ inputOutlineStyle: { ...inputField, property: 'outline-style' },
5484
+ inputOutlineColor: { ...inputField, property: 'outline-color' },
5485
+ inputOutlineWidth: { ...inputField, property: 'outline-width' },
5486
+ inputOutlineOffset: { ...inputField, property: 'outline-offset' },
5458
5487
  },
5459
5488
  }),
5460
5489
  draggableMixin,
5461
- proxyInputMixin,
5490
+ composedProxyInputMixin,
5462
5491
  customMixin$1,
5463
5492
  )(
5464
5493
  createProxy({
@@ -5466,10 +5495,11 @@ const PhoneFieldClass = compose(
5466
5495
  wrappedEleName: 'vaadin-text-field',
5467
5496
  style: () => `
5468
5497
  :host {
5469
- --vaadin-field-default-width: auto;
5470
5498
  display: inline-block;
5471
5499
  max-width: 100%;
5472
5500
  min-width: 15em;
5501
+ box-sizing: border-box;
5502
+ padding: calc(var(${PhoneFieldClass.cssVarList.inputOutlineWidth}) + var(${PhoneFieldClass.cssVarList.inputOutlineOffset}))
5473
5503
  }
5474
5504
  div {
5475
5505
  display: inline-flex;
@@ -5478,6 +5508,7 @@ const PhoneFieldClass = compose(
5478
5508
  width: 100%;
5479
5509
  height: 100%;
5480
5510
  box-sizing: border-box;
5511
+ padding: 0;
5481
5512
  }
5482
5513
  vaadin-text-field[focus-ring]::part(input-field) {
5483
5514
  box-shadow: none;
@@ -5509,18 +5540,18 @@ const PhoneFieldClass = compose(
5509
5540
  descope-combo-box {
5510
5541
  flex-shrink: 0;
5511
5542
  height: 100%;
5512
- ${comboVars.borderWidth}: 0;
5543
+ ${comboVars.inputOutlineWidth}: 0;
5544
+ ${comboVars.inputOutlineOffset}: 0;
5545
+ ${comboVars.inputBorderWidth}: 0;
5546
+ ${comboVars.inputBorderRadius}: 0;
5513
5547
  }
5514
5548
  descope-text-field {
5515
5549
  flex-grow: 1;
5516
5550
  min-height: 0;
5517
5551
  height: 100%;
5518
- ${textVars.outlineWidth}: 0;
5519
- ${textVars.borderWidth}: 0;
5520
- ${textVars.borderRadius}: 0;
5521
- }
5522
- vaadin-text-field[required]::part(required-indicator)::after {
5523
- content: "*";
5552
+ ${textVars.inputOutlineWidth}: 0;
5553
+ ${textVars.inputBorderWidth}: 0;
5554
+ ${textVars.inputBorderRadius}: 0;
5524
5555
  }
5525
5556
  vaadin-text-field[readonly] > input:placeholder-shown {
5526
5557
  opacity: 1;
@@ -5528,71 +5559,37 @@ const PhoneFieldClass = compose(
5528
5559
  vaadin-text-field::part(input-field)::after {
5529
5560
  border: none;
5530
5561
  }
5562
+
5563
+ ${resetInputFieldDefaultWidth()}
5564
+ ${resetInputCursor('vaadin-text-field')}
5531
5565
  `,
5532
5566
  excludeAttrsSync: ['tabindex'],
5533
5567
  componentName: componentName$2
5534
5568
  })
5535
5569
  );
5536
5570
 
5537
- const globalRefs = getThemeRefs(globals);
5538
5571
  const vars$2 = PhoneFieldClass.cssVarList;
5539
5572
 
5540
5573
  const phoneField = {
5541
- [vars$2.wrapperBorderStyle]: 'solid',
5542
- [vars$2.wrapperBorderWidth]: '1px',
5543
- [vars$2.wrapperBorderColor]: 'transparent',
5544
- [vars$2.wrapperBorderRadius]: globalRefs.radius.xs,
5545
- [vars$2.placeholderColor]: globalRefs.colors.surface.main,
5546
- [vars$2.color]: globalRefs.colors.surface.contrast,
5547
-
5574
+ [vars$2.hostWidth]: refs.width,
5575
+ [vars$2.fontSize]: refs.fontSize,
5576
+ [vars$2.fontFamily]: refs.fontFamily,
5577
+ [vars$2.labelTextColor]: refs.labelTextColor,
5578
+ [vars$2.labelRequiredIndicator]: refs.requiredIndicator,
5579
+ [vars$2.inputValueTextColor]: refs.valueTextColor,
5580
+ [vars$2.inputPlaceholderTextColor]: refs.placeholderTextColor,
5581
+ [vars$2.inputBorderStyle]: refs.borderStyle,
5582
+ [vars$2.inputBorderWidth]: refs.borderWidth,
5583
+ [vars$2.inputBorderColor]: refs.borderColor,
5584
+ [vars$2.inputBorderRadius]: refs.borderRadius,
5585
+ [vars$2.inputOutlineStyle]: refs.outlineStyle,
5586
+ [vars$2.inputOutlineWidth]: refs.outlineWidth,
5587
+ [vars$2.inputOutlineColor]: refs.outlineColor,
5588
+ [vars$2.inputOutlineOffset]: refs.outlineOffset,
5589
+ [vars$2.inputHeight]: refs.inputHeight,
5548
5590
  [vars$2.phoneInputWidth]: '10em',
5549
5591
  [vars$2.countryCodeInputWidth]: '5em',
5550
-
5551
- [vars$2.inputHeight]: '2em',
5552
- [vars$2.countryCodeDropdownWidth]: '12em',
5553
-
5554
- size: {
5555
- xs: {
5556
- [vars$2.fontSize]: '8px',
5557
- },
5558
- sm: {
5559
- [vars$2.fontSize]: '20px',
5560
- },
5561
- md: {
5562
- [vars$2.fontSize]: '14px',
5563
- },
5564
- lg: {
5565
- [vars$2.fontSize]: '20px',
5566
- },
5567
- xl: {
5568
- [vars$2.fontSize]: '25px',
5569
- }
5570
- },
5571
-
5572
- _fullWidth: {
5573
- [vars$2.componentWidth]: '100%',
5574
- [vars$2.phoneInputWidth]: '100%',
5575
- [vars$2.countryCodeDropdownWidth]: '100%',
5576
- },
5577
-
5578
- _bordered: {
5579
- [vars$2.wrapperBorderColor]: globalRefs.colors.surface.main
5580
- },
5581
-
5582
- [vars$2.outlineStyle]: 'solid',
5583
- [vars$2.outlineWidth]: '0.1em',
5584
- [vars$2.outlineColor]: 'transparent',
5585
-
5586
- _focused: {
5587
- [vars$2.outlineColor]: globalRefs.colors.surface.main
5588
- },
5589
-
5590
- _invalid: {
5591
- [vars$2.outlineColor]: globalRefs.colors.error.light,
5592
- [vars$2.color]: globalRefs.colors.error.main,
5593
- [vars$2.placeholderColor]: globalRefs.colors.error.light,
5594
- [vars$2.wrapperBorderColor]: globalRefs.colors.error.main
5595
- },
5592
+ [vars$2.countryCodeDropdownWidth]: '20em',
5596
5593
 
5597
5594
  // '@overlay': {
5598
5595
  // overlayItemBackgroundColor: 'red'
@@ -5651,9 +5648,18 @@ const customMixin = (superclass) =>
5651
5648
  }
5652
5649
  };
5653
5650
 
5654
- const { host, internalInputsWrapper } = {
5651
+ const {
5652
+ host,
5653
+ label,
5654
+ internalInputsWrapper,
5655
+ errorMessage,
5656
+ helperText
5657
+ } = {
5655
5658
  host: { selector: () => ':host' },
5656
- internalInputsWrapper: { selector: 'descope-new-password-internal .wrapper' }
5659
+ label: { selector: '::part(label)' },
5660
+ internalInputsWrapper: { selector: 'descope-new-password-internal .wrapper' },
5661
+ helperText: { selector: '::part(helper-text)' },
5662
+ errorMessage: { selector: '::part(error-message)' }
5657
5663
  };
5658
5664
 
5659
5665
  const NewPasswordClass = compose(
@@ -5666,99 +5672,87 @@ const NewPasswordClass = compose(
5666
5672
  property: PasswordFieldClass.cssVarList.fontSize
5667
5673
  }
5668
5674
  ],
5669
- componentWidth: { ...host, property: 'width' },
5670
- requiredContent: { ...host, property: 'content' },
5671
- inputsGap: { ...internalInputsWrapper, property: 'gap' },
5675
+ fontFamily: [
5676
+ label,
5677
+ errorMessage,
5678
+ helperText
5679
+ ],
5680
+ hostWidth: { ...host, property: 'width' },
5681
+ inputsRequiredIndicator: { ...host, property: 'content' },
5682
+ spaceBetweenInputs: { ...internalInputsWrapper, property: 'gap' },
5672
5683
  }
5673
5684
  }),
5674
5685
  draggableMixin,
5675
- proxyInputMixin,
5686
+ composedProxyInputMixin,
5676
5687
  customMixin,
5677
5688
  )(
5678
5689
  createProxy({
5679
5690
  slots: [],
5680
5691
  wrappedEleName: 'vaadin-text-field',
5681
- style: () => overrides,
5692
+ style: () => `
5693
+ :host {
5694
+ display: inline-block;
5695
+ max-width: 100%;
5696
+ min-width: 10em;
5697
+ box-sizing: border-box;
5698
+ }
5699
+ ${resetInputFieldDefaultWidth()}
5700
+ vaadin-text-field {
5701
+ padding: 0;
5702
+ width: 100%;
5703
+ height: 100%;
5704
+ }
5705
+ vaadin-text-field::part(input-field) {
5706
+ min-height: 0;
5707
+ background: transparent;
5708
+ overflow: hidden;
5709
+ box-shadow: none;
5710
+ padding: 0;
5711
+ }
5712
+ vaadin-text-field::part(input-field)::after {
5713
+ background: transparent;
5714
+ opacity: 0;
5715
+ }
5716
+ descope-new-password-internal {
5717
+ -webkit-mask-image: none;
5718
+ min-height: 0;
5719
+ width: 100%;
5720
+ height: 100%;
5721
+ padding: 0;
5722
+ }
5723
+ descope-new-password-internal > .wrapper {
5724
+ width: 100%;
5725
+ height: 100%;
5726
+ display: flex;
5727
+ flex-direction: column;
5728
+ }
5729
+ descope-password-field {
5730
+ display: block;
5731
+ width: 100%;
5732
+ }
5733
+ descope-new-password-internal vaadin-password-field::before {
5734
+ height: initial;
5735
+ },
5736
+ `,
5682
5737
  excludeAttrsSync: ['tabindex'],
5683
5738
  componentName
5684
5739
  })
5685
5740
  );
5686
5741
 
5687
- const overrides = `
5688
- :host {
5689
- --vaadin-field-default-width: auto;
5690
- display: inline-block;
5691
- min-width: 10em;
5692
- max-width: 100%;
5693
- }
5694
- vaadin-text-field {
5695
- padding: 0;
5696
- width: 100%;
5697
- height: 100%;
5698
- }
5699
- vaadin-text-field::part(input-field) {
5700
- min-height: 0;
5701
- background: transparent;
5702
- overflow: hidden;
5703
- box-shadow: none;
5704
- padding: 0;
5705
- }
5706
- vaadin-text-field::part(input-field)::after {
5707
- background: transparent;
5708
- opacity: 0;
5709
- }
5710
- descope-new-password-internal {
5711
- -webkit-mask-image: none;
5712
- min-height: 0;
5713
- width: 100%;
5714
- height: 100%;
5715
- padding: 0;
5716
- }
5717
- descope-new-password-internal > .wrapper {
5718
- width: 100%;
5719
- height: 100%;
5720
- display: flex;
5721
- flex-direction: column;
5722
- }
5723
- descope-password-field {
5724
- display: block;
5725
- width: 100%;
5726
- }
5727
- descope-new-password-internal vaadin-password-field::before {
5728
- height: initial;
5729
- }
5730
- `;
5731
-
5732
5742
  const vars$1 = NewPasswordClass.cssVarList;
5733
5743
 
5734
5744
  const newPassword = {
5735
- [vars$1.inputsGap]: '1em',
5745
+ [vars$1.hostWidth]: refs.width,
5746
+ [vars$1.fontSize]: refs.fontSize,
5747
+ [vars$1.fontFamily]: refs.fontFamily,
5748
+ [vars$1.spaceBetweenInputs]: '1em',
5736
5749
 
5737
5750
  _required: {
5738
- [vars$1.requiredContent]: "'*'",
5739
- },
5740
-
5741
- _fullWidth: {
5742
- [vars$1.componentWidth]: '100%'
5743
- },
5744
-
5745
- size: {
5746
- xs: {
5747
- [vars$1.fontSize]: '8px',
5748
- },
5749
- sm: {
5750
- [vars$1.fontSize]: '10px',
5751
- },
5752
- md: {
5753
- [vars$1.fontSize]: '14px',
5754
- },
5755
- lg: {
5756
- [vars$1.fontSize]: '20px',
5757
- },
5758
- xl: {
5759
- [vars$1.fontSize]: '25px',
5760
- }
5761
- },
5751
+ // NewPassword doesn't pass `required` attribute to its PasswordFields.
5752
+ // That's why we fake the required indicator on each input.
5753
+ // We do that by injecting `::after` element, and populating it with requiredIndicator content.
5754
+ [vars$1.inputsRequiredIndicator]: refs.requiredIndicator, // used to populate required content for NewPassword input fields outside the theme
5755
+ }
5762
5756
  };
5763
5757
 
5764
5758
  var newPassword$1 = /*#__PURE__*/Object.freeze({
@@ -5769,7 +5763,7 @@ var newPassword$1 = /*#__PURE__*/Object.freeze({
5769
5763
 
5770
5764
  const components = {
5771
5765
  button: button$1,
5772
- textField: textField$2,
5766
+ textField: textField$1,
5773
5767
  passwordField: passwordField$1,
5774
5768
  numberField: numberField$1,
5775
5769
  emailField: emailField$1,
@@ -5788,14 +5782,14 @@ const components = {
5788
5782
  image: image$1,
5789
5783
  phoneField: phoneField$1,
5790
5784
  newPassword: newPassword$1,
5785
+ inputWrapper,
5791
5786
  };
5792
5787
 
5793
-
5794
5788
  const theme = Object.keys(components).reduce((acc, comp) => ({ ...acc, [comp]: components[comp].default }), {});
5795
5789
  const vars = Object.keys(components).reduce((acc, comp) => ({ ...acc, [comp]: components[comp].vars }), {});
5796
5790
 
5797
5791
  const defaultTheme = { globals, components: theme };
5798
- const themeVars = { globals: vars$l, components: vars };
5792
+ const themeVars = { globals: vars$m, components: vars };
5799
5793
 
5800
5794
  exports.ButtonClass = ButtonClass;
5801
5795
  exports.CheckboxClass = CheckboxClass;