@descope/web-components-ui 1.0.114 → 1.0.115

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