@descope/web-components-ui 1.102.0 → 1.104.0

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.
@@ -926,6 +926,13 @@ const colors$2 = genColors({
926
926
  highlight: '#fef1f1',
927
927
  contrast: '#ffffff',
928
928
  },
929
+ warning: {
930
+ main: '#c45512',
931
+ dark: '#a24309',
932
+ light: '#ff985a',
933
+ highlight: '#fdf0e5',
934
+ contrast: '#ffffff',
935
+ },
929
936
  });
930
937
 
931
938
  const fonts$1 = {
@@ -1103,6 +1110,13 @@ const colors$1 = genColors$1({
1103
1110
  highlight: '#fef1f1',
1104
1111
  contrast: '#ffffff',
1105
1112
  },
1113
+ warning: {
1114
+ main: '#c45512',
1115
+ dark: '#a24309',
1116
+ light: '#ff985a',
1117
+ highlight: '#fdf0e5',
1118
+ contrast: '#ffffff',
1119
+ },
1106
1120
  });
1107
1121
 
1108
1122
  const fonts = {
@@ -2632,7 +2646,6 @@ const createDynamicDataMixin$1 =
2632
2646
  slotName,
2633
2647
  rerenderAttrsList = [],
2634
2648
  targetSelector,
2635
- sortFn
2636
2649
  }) =>
2637
2650
  (superclass) =>
2638
2651
  class DynamicDataMixinClass extends superclass {
@@ -2672,7 +2685,7 @@ const createDynamicDataMixin$1 =
2672
2685
 
2673
2686
  set data(value) {
2674
2687
  if (this.#validateSchema(value)) {
2675
- this.#data = sortFn ? value.sort(sortFn) : value;
2688
+ this.#data = value;
2676
2689
  this.#renderItems();
2677
2690
  }
2678
2691
  }
@@ -6742,9 +6755,21 @@ const text$3 = {
6742
6755
  error: {
6743
6756
  [vars$O.textColor]: globalRefs$A.colors.error.main,
6744
6757
  },
6758
+ 'error-dark': {
6759
+ [vars$O.textColor]: globalRefs$A.colors.error.dark,
6760
+ },
6745
6761
  success: {
6746
6762
  [vars$O.textColor]: globalRefs$A.colors.success.main,
6747
6763
  },
6764
+ 'success-dark': {
6765
+ [vars$O.textColor]: globalRefs$A.colors.success.dark,
6766
+ },
6767
+ warning: {
6768
+ [vars$O.textColor]: globalRefs$A.colors.warning.main,
6769
+ },
6770
+ 'warning-dark': {
6771
+ [vars$O.textColor]: globalRefs$A.colors.warning.dark,
6772
+ },
6748
6773
  },
6749
6774
 
6750
6775
  textAlign: {
@@ -21325,8 +21350,6 @@ var collapsibleContainer$1 = /*#__PURE__*/Object.freeze({
21325
21350
  vars: vars$2
21326
21351
  });
21327
21352
 
21328
- const sortData = (a, b) => a.value.localeCompare(b.value);
21329
-
21330
21353
  const componentName$2 = getComponentName('recovery-codes');
21331
21354
 
21332
21355
  const itemRenderer = ({ value }, _, ref) => {
@@ -21341,6 +21364,10 @@ class RawRecoveryCodes extends createBaseClass$1({
21341
21364
  componentName: componentName$2,
21342
21365
  baseSelector: ':host > div',
21343
21366
  }) {
21367
+ static get observedAttributes() {
21368
+ return ['readonly'];
21369
+ }
21370
+
21344
21371
  constructor() {
21345
21372
  super();
21346
21373
 
@@ -21353,6 +21380,10 @@ class RawRecoveryCodes extends createBaseClass$1({
21353
21380
  </div>
21354
21381
  `;
21355
21382
 
21383
+ this.list = this.shadowRoot.querySelector('.list');
21384
+ this.icon = this.shadowRoot.querySelector('.icon');
21385
+ this.iconWrapper = this.shadowRoot.querySelector('.icon-wrapper');
21386
+
21356
21387
  injectStyle(
21357
21388
  `
21358
21389
  :host {
@@ -21377,14 +21408,17 @@ class RawRecoveryCodes extends createBaseClass$1({
21377
21408
  content: '\\02022';
21378
21409
  transform: translateY(-0.06em);
21379
21410
  }
21380
- vaadin-icon {
21411
+ .icon-wrapper {
21412
+ align-self: flex-start;
21413
+ }
21414
+ .icon {
21381
21415
  cursor: pointer;
21382
21416
  }
21383
- .copied {
21417
+ .icon.copied {
21384
21418
  cursor: initial;
21385
21419
  }
21386
- .icon-wrapper {
21387
- align-self: flex-start;
21420
+ .icon.readonly {
21421
+ pointer-events: none;
21388
21422
  }
21389
21423
  `,
21390
21424
  this,
@@ -21402,9 +21436,6 @@ class RawRecoveryCodes extends createBaseClass$1({
21402
21436
  init() {
21403
21437
  super.init();
21404
21438
 
21405
- this.list = this.shadowRoot.querySelector('.list');
21406
- this.icon = this.shadowRoot.querySelector('.icon');
21407
- this.iconWrapper = this.shadowRoot.querySelector('.icon-wrapper');
21408
21439
 
21409
21440
  this.icon.addEventListener('click', this.onCopy.bind(this));
21410
21441
 
@@ -21426,6 +21457,20 @@ class RawRecoveryCodes extends createBaseClass$1({
21426
21457
  this.icon.classList.remove('copied');
21427
21458
  }, 5000);
21428
21459
  }
21460
+
21461
+ onReadOnly(isReadOnly) {
21462
+ this.icon.classList.toggle('readonly', isReadOnly);
21463
+ }
21464
+
21465
+ attributeChangedCallback(attrName, oldValue, newValue) {
21466
+ super.attributeChangedCallback?.(attrName, oldValue, newValue);
21467
+
21468
+ if (newValue !== oldValue) {
21469
+ if (attrName === 'readonly') {
21470
+ this.onReadOnly(newValue === 'true');
21471
+ }
21472
+ }
21473
+ }
21429
21474
  }
21430
21475
 
21431
21476
  const RecoveryCodesClass = compose(
@@ -21450,8 +21495,7 @@ const RecoveryCodesClass = compose(
21450
21495
  createDynamicDataMixin$1({
21451
21496
  itemRenderer,
21452
21497
  rerenderAttrsList: ['variant', 'mode'],
21453
- targetSelector: '.list',
21454
- sortFn: sortData
21498
+ targetSelector: '.list'
21455
21499
  }),
21456
21500
  draggableMixin$1,
21457
21501
  componentNameValidationMixin$1,
@@ -21599,6 +21643,13 @@ const colors = {
21599
21643
  highlight: '#4a0603',
21600
21644
  contrast: '#000000',
21601
21645
  },
21646
+ warning: {
21647
+ main: '#EF7A33',
21648
+ dark: '#FF985A',
21649
+ light: '#FF6304',
21650
+ highlight: '#C45512',
21651
+ contrast: '#000000',
21652
+ },
21602
21653
  };
21603
21654
 
21604
21655
  const darkTheme = merge({}, defaultTheme, {