@descope/web-components-ui 2.2.2 → 2.2.4

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.
@@ -12584,9 +12584,13 @@ const customMixin$7 = (superclass) =>
12584
12584
  const ModalClass = compose$1(
12585
12585
  createStyleMixin({
12586
12586
  mappings: {
12587
+ overlayBackdropColor: { property: () => ModalClass.cssVarList.overlay.backdropColor },
12587
12588
  overlayBackgroundColor: { property: () => ModalClass.cssVarList.overlay.backgroundColor },
12588
12589
  overlayShadow: { property: () => ModalClass.cssVarList.overlay.shadow },
12589
12590
  overlayWidth: { property: () => ModalClass.cssVarList.overlay.width },
12591
+ overlayBorderWidth: { property: () => ModalClass.cssVarList.overlay.borderWidth },
12592
+ overlayBorderStyle: { property: () => ModalClass.cssVarList.overlay.borderStyle },
12593
+ overlayBorderColor: { property: () => ModalClass.cssVarList.overlay.borderColor },
12590
12594
  },
12591
12595
  }),
12592
12596
  portalMixin({
@@ -12602,6 +12606,22 @@ const ModalClass = compose$1(
12602
12606
  { selector: () => '::part(content)', property: 'background-color' },
12603
12607
  { selector: () => '::part(overlay)', property: 'background-color' },
12604
12608
  ],
12609
+ backdropColor: {
12610
+ selector: () => '::part(backdrop)',
12611
+ property: 'background-color',
12612
+ },
12613
+ borderStyle: {
12614
+ selector: () => '::part(content)',
12615
+ property: 'border-style',
12616
+ },
12617
+ borderWidth: {
12618
+ selector: () => '::part(content)',
12619
+ property: 'border-width',
12620
+ },
12621
+ borderColor: {
12622
+ selector: () => '::part(content)',
12623
+ property: 'border-color',
12624
+ },
12605
12625
  width: { selector: () => '::part(overlay)', property: 'width' },
12606
12626
  shadow: { selector: () => '::part(overlay)', property: 'box-shadow' },
12607
12627
  },
@@ -12635,6 +12655,7 @@ const modal = {
12635
12655
  [compVars$5.overlayBackgroundColor]: globalRefs$p.colors.surface.main,
12636
12656
  [compVars$5.overlayShadow]: globalRefs$p.shadow.wide['2xl'],
12637
12657
  [compVars$5.overlayWidth]: '540px',
12658
+ [compVars$5.overlayBackdropColor]: 'hsla(214, 53%, 23%, 0.16)',
12638
12659
  };
12639
12660
 
12640
12661
  const vars$C = {
@@ -16064,19 +16085,6 @@ const newDate = (date, isUtcTime) => {
16064
16085
  }
16065
16086
  if (typeof date === 'string') {
16066
16087
  const d = new Date(date.replace(/-/g, '/'));
16067
- if (isUtcTime) {
16068
- return new Date(
16069
- Date.UTC(
16070
- d.getFullYear(),
16071
- d.getMonth(),
16072
- d.getDate(),
16073
- d.getHours(),
16074
- d.getMinutes(),
16075
- d.getSeconds(),
16076
- d.getMilliseconds()
16077
- )
16078
- );
16079
- }
16080
16088
  return new Date(d);
16081
16089
  }
16082
16090
  return new Date();
@@ -16174,9 +16182,16 @@ const parseDateString = (val, format) => {
16174
16182
  };
16175
16183
 
16176
16184
  const dateToEpoch = (date, isUtc) => {
16185
+ // If it's already a number (epoch), return it directly - no conversion needed
16186
+ if (typeof date === 'number') {
16187
+ return date;
16188
+ }
16189
+
16177
16190
  if (isUtc) {
16178
- return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())).getTime();
16191
+ return Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());
16179
16192
  }
16193
+
16194
+ // Default: return epoch in local timezone
16180
16195
  return date.getTime();
16181
16196
  };
16182
16197
 
@@ -17245,7 +17260,7 @@ class RawDateFieldClass extends BaseInputClass$2 {
17245
17260
 
17246
17261
  updateValue() {
17247
17262
  if (this.isCountersOutOfRange) {
17248
- this.updateEpoch('');
17263
+ this.resetEpoch();
17249
17264
  } else {
17250
17265
  const date = formats[this.format].getDate(this.inputElement.value);
17251
17266
  this.updateEpoch(dateToEpoch(date, this.isUtcTime));
@@ -17259,12 +17274,8 @@ class RawDateFieldClass extends BaseInputClass$2 {
17259
17274
  this.#dispatchInput();
17260
17275
  };
17261
17276
 
17262
- updateEpoch(epochOrDate) {
17263
- if (Number.isNaN(epochOrDate) || !epochOrDate.toString()?.length) {
17264
- this.epoch = '';
17265
- } else {
17266
- this.epoch = dateToEpoch(newDate(epochOrDate, this.isUtcTime), this.isUtcTime);
17267
- }
17277
+ updateEpoch(epoch) {
17278
+ this.epoch = dateToEpoch(epoch, this.isUtcTime);
17268
17279
  }
17269
17280
 
17270
17281
  dateCounters = [
@@ -17395,14 +17406,18 @@ class RawDateFieldClass extends BaseInputClass$2 {
17395
17406
  let value = parseInt(val, 10);
17396
17407
  if (!Number.isNaN(value)) {
17397
17408
  this.updateEpoch(value);
17398
- this.updateDateCounters(newDate(value));
17409
+ this.updateDateCounters(new Date(value));
17399
17410
  } else {
17400
- this.updateEpoch('');
17411
+ this.resetEpoch();
17401
17412
  this.resetDateCounters();
17402
17413
  this.clearInputEle();
17403
17414
  }
17404
17415
  }
17405
17416
 
17417
+ resetEpoch() {
17418
+ this.epoch = '';
17419
+ }
17420
+
17406
17421
  get isCountersEmpty() {
17407
17422
  return this.dateCounters.every((dc) => dc.isEmpty);
17408
17423
  }
@@ -17976,7 +17991,7 @@ class RawDateFieldClass extends BaseInputClass$2 {
17976
17991
  }
17977
17992
 
17978
17993
  try {
17979
- const date = this.isUtcTime ? new Date(this.epoch) : newDate(this.epoch);
17994
+ const date = new Date(this.epoch);
17980
17995
 
17981
17996
  if (this.isUtcTime) {
17982
17997
  ret.month = date.getUTCMonth() + 1;