@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.
package/dist/index.esm.js CHANGED
@@ -4462,7 +4462,6 @@ const createDynamicDataMixin$1 =
4462
4462
  slotName,
4463
4463
  rerenderAttrsList = [],
4464
4464
  targetSelector,
4465
- sortFn
4466
4465
  }) =>
4467
4466
  (superclass) =>
4468
4467
  class DynamicDataMixinClass extends superclass {
@@ -4502,7 +4501,7 @@ const createDynamicDataMixin$1 =
4502
4501
 
4503
4502
  set data(value) {
4504
4503
  if (this.#validateSchema(value)) {
4505
- this.#data = sortFn ? value.sort(sortFn) : value;
4504
+ this.#data = value;
4506
4505
  this.#renderItems();
4507
4506
  }
4508
4507
  }
@@ -19027,6 +19026,13 @@ const colors$2 = genColors({
19027
19026
  highlight: '#fef1f1',
19028
19027
  contrast: '#ffffff',
19029
19028
  },
19029
+ warning: {
19030
+ main: '#c45512',
19031
+ dark: '#a24309',
19032
+ light: '#ff985a',
19033
+ highlight: '#fdf0e5',
19034
+ contrast: '#ffffff',
19035
+ },
19030
19036
  });
19031
19037
 
19032
19038
  const fonts$1 = {
@@ -19204,6 +19210,13 @@ const colors$1 = genColors$1({
19204
19210
  highlight: '#fef1f1',
19205
19211
  contrast: '#ffffff',
19206
19212
  },
19213
+ warning: {
19214
+ main: '#c45512',
19215
+ dark: '#a24309',
19216
+ light: '#ff985a',
19217
+ highlight: '#fdf0e5',
19218
+ contrast: '#ffffff',
19219
+ },
19207
19220
  });
19208
19221
 
19209
19222
  const fonts = {
@@ -20221,9 +20234,21 @@ const text$1 = {
20221
20234
  error: {
20222
20235
  [vars$O.textColor]: globalRefs$A.colors.error.main,
20223
20236
  },
20237
+ 'error-dark': {
20238
+ [vars$O.textColor]: globalRefs$A.colors.error.dark,
20239
+ },
20224
20240
  success: {
20225
20241
  [vars$O.textColor]: globalRefs$A.colors.success.main,
20226
20242
  },
20243
+ 'success-dark': {
20244
+ [vars$O.textColor]: globalRefs$A.colors.success.dark,
20245
+ },
20246
+ warning: {
20247
+ [vars$O.textColor]: globalRefs$A.colors.warning.main,
20248
+ },
20249
+ 'warning-dark': {
20250
+ [vars$O.textColor]: globalRefs$A.colors.warning.dark,
20251
+ },
20227
20252
  },
20228
20253
 
20229
20254
  textAlign: {
@@ -24040,8 +24065,6 @@ var collapsibleContainer$1 = /*#__PURE__*/Object.freeze({
24040
24065
  vars: vars$2
24041
24066
  });
24042
24067
 
24043
- const sortData = (a, b) => a.value.localeCompare(b.value);
24044
-
24045
24068
  const componentName = getComponentName('recovery-codes');
24046
24069
 
24047
24070
  const itemRenderer = ({ value }, _, ref) => {
@@ -24056,6 +24079,10 @@ class RawRecoveryCodes extends createBaseClass({
24056
24079
  componentName,
24057
24080
  baseSelector: ':host > div',
24058
24081
  }) {
24082
+ static get observedAttributes() {
24083
+ return ['readonly'];
24084
+ }
24085
+
24059
24086
  constructor() {
24060
24087
  super();
24061
24088
 
@@ -24068,6 +24095,10 @@ class RawRecoveryCodes extends createBaseClass({
24068
24095
  </div>
24069
24096
  `;
24070
24097
 
24098
+ this.list = this.shadowRoot.querySelector('.list');
24099
+ this.icon = this.shadowRoot.querySelector('.icon');
24100
+ this.iconWrapper = this.shadowRoot.querySelector('.icon-wrapper');
24101
+
24071
24102
  injectStyle(
24072
24103
  `
24073
24104
  :host {
@@ -24092,14 +24123,17 @@ class RawRecoveryCodes extends createBaseClass({
24092
24123
  content: '\\02022';
24093
24124
  transform: translateY(-0.06em);
24094
24125
  }
24095
- vaadin-icon {
24126
+ .icon-wrapper {
24127
+ align-self: flex-start;
24128
+ }
24129
+ .icon {
24096
24130
  cursor: pointer;
24097
24131
  }
24098
- .copied {
24132
+ .icon.copied {
24099
24133
  cursor: initial;
24100
24134
  }
24101
- .icon-wrapper {
24102
- align-self: flex-start;
24135
+ .icon.readonly {
24136
+ pointer-events: none;
24103
24137
  }
24104
24138
  `,
24105
24139
  this,
@@ -24117,9 +24151,6 @@ class RawRecoveryCodes extends createBaseClass({
24117
24151
  init() {
24118
24152
  super.init();
24119
24153
 
24120
- this.list = this.shadowRoot.querySelector('.list');
24121
- this.icon = this.shadowRoot.querySelector('.icon');
24122
- this.iconWrapper = this.shadowRoot.querySelector('.icon-wrapper');
24123
24154
 
24124
24155
  this.icon.addEventListener('click', this.onCopy.bind(this));
24125
24156
 
@@ -24141,6 +24172,20 @@ class RawRecoveryCodes extends createBaseClass({
24141
24172
  this.icon.classList.remove('copied');
24142
24173
  }, 5000);
24143
24174
  }
24175
+
24176
+ onReadOnly(isReadOnly) {
24177
+ this.icon.classList.toggle('readonly', isReadOnly);
24178
+ }
24179
+
24180
+ attributeChangedCallback(attrName, oldValue, newValue) {
24181
+ super.attributeChangedCallback?.(attrName, oldValue, newValue);
24182
+
24183
+ if (newValue !== oldValue) {
24184
+ if (attrName === 'readonly') {
24185
+ this.onReadOnly(newValue === 'true');
24186
+ }
24187
+ }
24188
+ }
24144
24189
  }
24145
24190
 
24146
24191
  const RecoveryCodesClass = compose(
@@ -24165,8 +24210,7 @@ const RecoveryCodesClass = compose(
24165
24210
  createDynamicDataMixin$1({
24166
24211
  itemRenderer,
24167
24212
  rerenderAttrsList: ['variant', 'mode'],
24168
- targetSelector: '.list',
24169
- sortFn: sortData
24213
+ targetSelector: '.list'
24170
24214
  }),
24171
24215
  draggableMixin,
24172
24216
  componentNameValidationMixin,
@@ -24314,6 +24358,13 @@ const colors = {
24314
24358
  highlight: '#4a0603',
24315
24359
  contrast: '#000000',
24316
24360
  },
24361
+ warning: {
24362
+ main: '#EF7A33',
24363
+ dark: '#FF985A',
24364
+ light: '#FF6304',
24365
+ highlight: '#C45512',
24366
+ contrast: '#000000',
24367
+ },
24317
24368
  };
24318
24369
 
24319
24370
  const darkTheme = merge({}, defaultTheme, {