@descope/web-components-ui 1.0.100 → 1.0.101

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import '@vaadin/button';
2
2
  import '@vaadin/checkbox';
3
3
  import '@vaadin/text-field';
4
- import '@vaadin/date-picker';
5
4
  import '@vaadin/email-field';
6
5
  import '@vaadin/number-field';
7
6
  import '@vaadin/password-field';
@@ -1062,7 +1061,7 @@ const inputEventsDispatchingMixin = (superclass) => class InputEventsDispatching
1062
1061
  }
1063
1062
  };
1064
1063
 
1065
- const componentName$o = getComponentName('button');
1064
+ const componentName$n = getComponentName('button');
1066
1065
 
1067
1066
  const resetStyles = `
1068
1067
  :host {
@@ -1136,7 +1135,7 @@ const Button = compose(
1136
1135
  ${editorOverrides}
1137
1136
  `,
1138
1137
  excludeAttrsSync: ['tabindex'],
1139
- componentName: componentName$o
1138
+ componentName: componentName$n
1140
1139
  })
1141
1140
  );
1142
1141
 
@@ -1169,7 +1168,7 @@ const loadingIndicatorStyles = `
1169
1168
  }
1170
1169
  `;
1171
1170
 
1172
- customElements.define(componentName$o, Button);
1171
+ customElements.define(componentName$n, Button);
1173
1172
 
1174
1173
  const createBaseInputClass = (...args) => compose(
1175
1174
  inputValidationMixin,
@@ -1178,7 +1177,7 @@ const createBaseInputClass = (...args) => compose(
1178
1177
  inputEventsDispatchingMixin
1179
1178
  )(createBaseClass(...args));
1180
1179
 
1181
- const componentName$n = getComponentName('boolean-field-internal');
1180
+ const componentName$m = getComponentName('boolean-field-internal');
1182
1181
 
1183
1182
  const forwardAttributes$1 = [
1184
1183
  'disabled',
@@ -1187,7 +1186,7 @@ const forwardAttributes$1 = [
1187
1186
  'readonly'
1188
1187
  ];
1189
1188
 
1190
- const BaseInputClass$3 = createBaseInputClass({ componentName: componentName$n, baseSelector: 'div' });
1189
+ const BaseInputClass$3 = createBaseInputClass({ componentName: componentName$m, baseSelector: 'div' });
1191
1190
 
1192
1191
  class BooleanInputInternal extends BaseInputClass$3 {
1193
1192
  constructor() {
@@ -1251,14 +1250,14 @@ const booleanFieldMixin = (superclass) =>
1251
1250
 
1252
1251
  const template = document.createElement('template');
1253
1252
  template.innerHTML = `
1254
- <${componentName$n}
1253
+ <${componentName$m}
1255
1254
  tabindex="-1"
1256
1255
  slot="input"
1257
- ></${componentName$n}>
1256
+ ></${componentName$m}>
1258
1257
  `;
1259
1258
 
1260
1259
  this.baseElement.appendChild(template.content.cloneNode(true));
1261
- this.inputElement = this.shadowRoot.querySelector(componentName$n);
1260
+ this.inputElement = this.shadowRoot.querySelector(componentName$m);
1262
1261
  this.checkbox = this.inputElement.querySelector('vaadin-checkbox');
1263
1262
 
1264
1263
  forwardAttrs(this, this.inputElement, {
@@ -1336,7 +1335,7 @@ descope-boolean-field-internal {
1336
1335
  }
1337
1336
  `;
1338
1337
 
1339
- const componentName$m = getComponentName('checkbox');
1338
+ const componentName$l = getComponentName('checkbox');
1340
1339
 
1341
1340
  const {
1342
1341
  host: host$9,
@@ -1420,15 +1419,15 @@ const Checkbox = compose(
1420
1419
  }
1421
1420
  `,
1422
1421
  excludeAttrsSync: ['tabindex'],
1423
- componentName: componentName$m
1422
+ componentName: componentName$l
1424
1423
  })
1425
1424
  );
1426
1425
 
1427
- customElements.define(componentName$n, BooleanInputInternal);
1426
+ customElements.define(componentName$m, BooleanInputInternal);
1428
1427
 
1429
- customElements.define(componentName$m, Checkbox);
1428
+ customElements.define(componentName$l, Checkbox);
1430
1429
 
1431
- const componentName$l = getComponentName('switch-toggle');
1430
+ const componentName$k = getComponentName('switch-toggle');
1432
1431
 
1433
1432
  const {
1434
1433
  host: host$8,
@@ -1535,17 +1534,17 @@ const SwitchToggle = compose(
1535
1534
  }
1536
1535
  `,
1537
1536
  excludeAttrsSync: ['tabindex'],
1538
- componentName: componentName$l
1537
+ componentName: componentName$k
1539
1538
  })
1540
1539
  );
1541
1540
 
1542
- customElements.define(componentName$l, SwitchToggle);
1541
+ customElements.define(componentName$k, SwitchToggle);
1543
1542
 
1544
- const componentName$k = getComponentName('loader-linear');
1543
+ const componentName$j = getComponentName('loader-linear');
1545
1544
 
1546
- class RawLoaderLinear extends createBaseClass({ componentName: componentName$k, baseSelector: ':host > div' }) {
1545
+ class RawLoaderLinear extends createBaseClass({ componentName: componentName$j, baseSelector: ':host > div' }) {
1547
1546
  static get componentName() {
1548
- return componentName$k;
1547
+ return componentName$j;
1549
1548
  }
1550
1549
  constructor() {
1551
1550
  super();
@@ -1603,11 +1602,11 @@ const LoaderLinear = compose(
1603
1602
  componentNameValidationMixin
1604
1603
  )(RawLoaderLinear);
1605
1604
 
1606
- customElements.define(componentName$k, LoaderLinear);
1605
+ customElements.define(componentName$j, LoaderLinear);
1607
1606
 
1608
- const componentName$j = getComponentName('loader-radial');
1607
+ const componentName$i = getComponentName('loader-radial');
1609
1608
 
1610
- class RawLoaderRadial extends createBaseClass({ componentName: componentName$j, baseSelector: ':host > div' }) {
1609
+ class RawLoaderRadial extends createBaseClass({ componentName: componentName$i, baseSelector: ':host > div' }) {
1611
1610
  constructor() {
1612
1611
  super();
1613
1612
 
@@ -1653,11 +1652,11 @@ const LoaderRadial = compose(
1653
1652
  componentNameValidationMixin
1654
1653
  )(RawLoaderRadial);
1655
1654
 
1656
- customElements.define(componentName$j, LoaderRadial);
1655
+ customElements.define(componentName$i, LoaderRadial);
1657
1656
 
1658
- const componentName$i = getComponentName('container');
1657
+ const componentName$h = getComponentName('container');
1659
1658
 
1660
- class RawContainer extends createBaseClass({ componentName: componentName$i, baseSelector: ':host > slot' }) {
1659
+ class RawContainer extends createBaseClass({ componentName: componentName$h, baseSelector: ':host > slot' }) {
1661
1660
  constructor() {
1662
1661
  super();
1663
1662
 
@@ -1715,23 +1714,7 @@ const Container = compose(
1715
1714
  componentNameValidationMixin
1716
1715
  )(RawContainer);
1717
1716
 
1718
- customElements.define(componentName$i, Container);
1719
-
1720
- const componentName$h = getComponentName('date-picker');
1721
-
1722
- const DatePicker = compose(
1723
- draggableMixin,
1724
- componentNameValidationMixin
1725
- )(
1726
- createProxy({
1727
- componentName: componentName$h,
1728
- slots: ['prefix', 'suffix'],
1729
- wrappedEleName: 'vaadin-date-picker',
1730
- style: ``
1731
- })
1732
- );
1733
-
1734
- customElements.define(componentName$h, DatePicker);
1717
+ customElements.define(componentName$h, Container);
1735
1718
 
1736
1719
  const componentName$g = getComponentName('divider');
1737
1720
  class RawDivider extends createBaseClass({ componentName: componentName$g, baseSelector: ':host > div' }) {
@@ -2429,6 +2412,7 @@ overrides$2 = `
2429
2412
 
2430
2413
  vaadin-text-field input {
2431
2414
  -webkit-mask-image: none;
2415
+ min-height: 0;
2432
2416
  }
2433
2417
 
2434
2418
  vaadin-text-field > label,
@@ -2439,7 +2423,6 @@ overrides$2 = `
2439
2423
  cursor: text;
2440
2424
  }
2441
2425
  vaadin-text-field[required]::part(required-indicator)::after {
2442
- font-size: "12px";
2443
2426
  content: "*";
2444
2427
  color: var(${TextField.cssVarList.color});
2445
2428
  }
@@ -2709,6 +2692,9 @@ const PasswordField = compose(
2709
2692
  vaadin-password-field {
2710
2693
  width: 100%;
2711
2694
  }
2695
+ vaadin-password-field::part(input-field) {
2696
+ padding: 0;
2697
+ }
2712
2698
  vaadin-password-field > input {
2713
2699
  min-height: 0;
2714
2700
  }
@@ -2918,7 +2904,13 @@ const ComboBoxMixin = (superclass) => class ComboBoxMixinClass extends superclas
2918
2904
  }
2919
2905
  };
2920
2906
 
2921
- const { host: host$2, input, placeholder, toggle, label: label$1 } = {
2907
+ const {
2908
+ host: host$2,
2909
+ input,
2910
+ placeholder,
2911
+ toggle,
2912
+ label: label$1
2913
+ } = {
2922
2914
  host: { selector: () => ':host' },
2923
2915
  input: { selector: '::part(input-field)' },
2924
2916
  placeholder: { selector: '> input:placeholder-shown' },
@@ -2938,7 +2930,7 @@ const ComboBox = compose(
2938
2930
  height: input,
2939
2931
  padding: input,
2940
2932
 
2941
- backgroundColor: input,
2933
+ inputBackgroundColor: { ...input, property: 'background-color' },
2942
2934
  boxShadow: input,
2943
2935
 
2944
2936
  borderColor: input,
@@ -3003,6 +2995,15 @@ const ComboBox = compose(
3003
2995
  border-radius: 0;
3004
2996
  padding: 0;
3005
2997
  }
2998
+ vaadin-combo-box::part(input-field)::after {
2999
+ opacity: 0;
3000
+ }
3001
+ vaadin-combo-box[readonly]::part(input-field)::after {
3002
+ border: none;
3003
+ }
3004
+ vaadin-combo-box[readonly] > input:placeholder-shown {
3005
+ opacity: 1;
3006
+ }
3006
3007
  `,
3007
3008
  // Note: we exclude `size` to avoid overriding Vaadin's ComboBox property
3008
3009
  // with the same name. Including it will cause Vaadin to calculate NaN size,
@@ -4260,6 +4261,7 @@ const commonAttrs$1 = [
4260
4261
  'size',
4261
4262
  'bordered',
4262
4263
  'invalid',
4264
+ 'readonly',
4263
4265
  ];
4264
4266
  const countryAttrs = ['country-input-placeholder', 'default-code'];
4265
4267
  const phoneAttrs = ['phone-input-placeholder', 'maxlength'];
@@ -4448,6 +4450,10 @@ const componentName$2 = getComponentName('phone-field');
4448
4450
 
4449
4451
  const customMixin$1 = (superclass) =>
4450
4452
  class PhoneFieldClass extends superclass {
4453
+ static get CountryCodes() {
4454
+ return CountryCodes;
4455
+ }
4456
+
4451
4457
  constructor() {
4452
4458
  super();
4453
4459
  }
@@ -4546,6 +4552,10 @@ const PhoneField = compose(
4546
4552
  selector: 'descope-combo-box',
4547
4553
  property: comboVars.overlayItemBackgroundColor
4548
4554
  },
4555
+
4556
+ outlineStyle: inputWrapper,
4557
+ outlineWidth: [inputWrapper, { property: 'padding' }],
4558
+ outlineColor: inputWrapper,
4549
4559
  },
4550
4560
  }),
4551
4561
  draggableMixin,
@@ -4564,9 +4574,15 @@ const PhoneField = compose(
4564
4574
  display: inline-flex;
4565
4575
  }
4566
4576
  vaadin-text-field {
4567
- padding: 0;
4568
4577
  width: 100%;
4569
4578
  height: 100%;
4579
+ box-sizing: border-box;
4580
+ }
4581
+ vaadin-text-field[focus-ring]::part(input-field) {
4582
+ box-shadow: none;
4583
+ }
4584
+ vaadin-text-field::before {
4585
+ height: 0;
4570
4586
  }
4571
4587
  vaadin-text-field::part(input-field) {
4572
4588
  padding: 0;
@@ -4598,6 +4614,7 @@ const PhoneField = compose(
4598
4614
  flex-grow: 1;
4599
4615
  min-height: 0;
4600
4616
  height: 100%;
4617
+ ${textVars.outlineWidth}: 0;
4601
4618
  ${textVars.borderWidth}: 0;
4602
4619
  ${textVars.borderRadius}: 0;
4603
4620
  }
@@ -4607,6 +4624,9 @@ const PhoneField = compose(
4607
4624
  vaadin-text-field[readonly] > input:placeholder-shown {
4608
4625
  opacity: 1;
4609
4626
  }
4627
+ vaadin-text-field::part(input-field)::after {
4628
+ border: none;
4629
+ }
4610
4630
  `,
4611
4631
  excludeAttrsSync: ['tabindex'],
4612
4632
  componentName: componentName$2
@@ -4676,7 +4696,7 @@ const NewPassword = compose(
4676
4696
  selector: PasswordField.componentName,
4677
4697
  property: PasswordField.cssVarList.inputTextColor
4678
4698
  },
4679
- inputsGap: {...internalInputsWrapper, property: 'gap'}
4699
+ inputsGap: { ...internalInputsWrapper, property: 'gap' }
4680
4700
  }
4681
4701
  }),
4682
4702
  draggableMixin,
@@ -4707,6 +4727,7 @@ const overrides = `
4707
4727
  background: transparent;
4708
4728
  overflow: hidden;
4709
4729
  box-shadow: none;
4730
+ padding: 0;
4710
4731
  }
4711
4732
  vaadin-text-field::part(input-field)::after {
4712
4733
  background: transparent;
@@ -5262,7 +5283,7 @@ const mode = {
5262
5283
  surface: globalRefs$f.colors.surface
5263
5284
  };
5264
5285
 
5265
- const [helperTheme$2, helperRefs$2] = createHelperVars({ mode }, componentName$o);
5286
+ const [helperTheme$2, helperRefs$2] = createHelperVars({ mode }, componentName$n);
5266
5287
 
5267
5288
  const verticalPaddingRatio = 3;
5268
5289
  const horizontalPaddingRatio = 2;
@@ -5414,7 +5435,7 @@ const passwordField = {
5414
5435
  [vars$e.wrapperBorderStyle]: 'solid',
5415
5436
  [vars$e.wrapperBorderWidth]: '1px',
5416
5437
  [vars$e.wrapperBorderColor]: 'transparent',
5417
- [vars$e.wrapperBorderRadius]: globalRefs$d.radius.sm,
5438
+ [vars$e.wrapperBorderRadius]: globalRefs$d.radius.xs,
5418
5439
  [vars$e.backgroundColor]: globalRefs$d.colors.surface.light,
5419
5440
 
5420
5441
  [vars$e.outlineWidth]: '2px',
@@ -5496,7 +5517,7 @@ const textArea = {
5496
5517
  [vars$d.borderRadius]: globalRefs$c.radius.sm,
5497
5518
  [vars$d.borderWidth]: '1px',
5498
5519
  [vars$d.borderStyle]: 'solid',
5499
- [vars$d.borderColor]: globalRefs$c.colors.surface.main,
5520
+ [vars$d.borderColor]: 'transparent',
5500
5521
  [vars$d.outlineWidth]: '2px',
5501
5522
  [vars$d.outlineStyle]: 'solid',
5502
5523
  [vars$d.outlineColor]: 'transparent',
@@ -5514,6 +5535,10 @@ const textArea = {
5514
5535
  [vars$d.cursor]: 'not-allowed'
5515
5536
  },
5516
5537
 
5538
+ _bordered: {
5539
+ [vars$d.borderColor]: globalRefs$c.colors.surface.main,
5540
+ },
5541
+
5517
5542
  _invalid: {
5518
5543
  [vars$d.labelColor]: globalRefs$c.colors.error.main,
5519
5544
  [vars$d.outlineColor]: globalRefs$c.colors.error.main
@@ -6097,6 +6122,7 @@ const comboBox = {
6097
6122
  [vars$2.placeholderColor]: globalRefs$2.colors.surface.main,
6098
6123
  [vars$2.toggleColor]: globalRefs$2.colors.surface.contrast,
6099
6124
  [vars$2.toggleCursor]: 'pointer',
6125
+ [vars$2.inputBackgroundColor]: globalRefs$2.colors.surface.light,
6100
6126
  size: {
6101
6127
  xs: {
6102
6128
  [vars$2.height]: '14px',
@@ -6124,6 +6150,11 @@ const comboBox = {
6124
6150
  [vars$2.padding]: `0 ${globalRefs$2.spacing.xl}`
6125
6151
  }
6126
6152
  },
6153
+
6154
+ _readonly: {
6155
+ [vars$2.toggleCursor]: 'default',
6156
+ },
6157
+
6127
6158
  _invalid: {
6128
6159
  [vars$2.borderColor]: globalRefs$2.colors.error.main,
6129
6160
  [vars$2.placeholderColor]: globalRefs$2.colors.error.light,
@@ -6157,31 +6188,26 @@ const phoneField = {
6157
6188
  xs: {
6158
6189
  [vars$1.inputHeight]: '14px',
6159
6190
  [vars$1.fontSize]: '8px',
6160
- [vars$1.padding]: `0 ${globalRefs$1.spacing.xs}`,
6161
6191
  [vars$1.countryCodeDropdownWidth]: '200px',
6162
6192
  },
6163
6193
  sm: {
6164
6194
  [vars$1.inputHeight]: '20px',
6165
6195
  [vars$1.fontSize]: '10px',
6166
- [vars$1.padding]: `0 ${globalRefs$1.spacing.sm}`,
6167
6196
  [vars$1.countryCodeDropdownWidth]: '240px',
6168
6197
  },
6169
6198
  md: {
6170
6199
  [vars$1.inputHeight]: '30px',
6171
6200
  [vars$1.fontSize]: '14px',
6172
- [vars$1.padding]: `0 ${globalRefs$1.spacing.md}`,
6173
6201
  [vars$1.countryCodeDropdownWidth]: '250px',
6174
6202
  },
6175
6203
  lg: {
6176
6204
  [vars$1.inputHeight]: '40px',
6177
6205
  [vars$1.fontSize]: '46px',
6178
- [vars$1.padding]: `0 ${globalRefs$1.spacing.lg}`,
6179
6206
  [vars$1.countryCodeDropdownWidth]: '250px',
6180
6207
  },
6181
6208
  xl: {
6182
6209
  [vars$1.inputHeight]: '50px',
6183
6210
  [vars$1.fontSize]: '25px',
6184
- [vars$1.padding]: `0 ${globalRefs$1.spacing.xl}`,
6185
6211
  [vars$1.countryCodeDropdownWidth]: '400px',
6186
6212
  }
6187
6213
  },
@@ -6196,7 +6222,16 @@ const phoneField = {
6196
6222
  [vars$1.wrapperBorderColor]: globalRefs$1.colors.surface.main
6197
6223
  },
6198
6224
 
6225
+ [vars$1.outlineStyle]: 'solid',
6226
+ [vars$1.outlineWidth]: '0.1em',
6227
+ [vars$1.outlineColor]: 'transparent',
6228
+
6229
+ _focused: {
6230
+ [vars$1.outlineColor]: globalRefs$1.colors.surface.main
6231
+ },
6232
+
6199
6233
  _invalid: {
6234
+ [vars$1.outlineColor]: globalRefs$1.colors.error.light,
6200
6235
  [vars$1.color]: globalRefs$1.colors.error.main,
6201
6236
  [vars$1.placeholderColor]: globalRefs$1.colors.error.light,
6202
6237
  [vars$1.wrapperBorderColor]: globalRefs$1.colors.error.main
@@ -6275,5 +6310,5 @@ var components = {
6275
6310
 
6276
6311
  var index = { globals, components };
6277
6312
 
6278
- export { componentsThemeManager, createComponentsTheme, index as defaultTheme, genColor, globalsThemeToStyle, themeToStyle };
6313
+ export { Button, Checkbox, Container, Divider, EmailField, Image, Link, LoaderLinear, LoaderRadial, Logo, NewPassword, NumberField, Passcode, PasswordField, PhoneField, SwitchToggle, Text, TextArea, TextField, componentsThemeManager, createComponentsTheme, index as defaultTheme, genColor, globalsThemeToStyle, themeToStyle };
6279
6314
  //# sourceMappingURL=index.esm.js.map