@descope/web-components-ui 2.2.1 → 2.2.3

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.
@@ -6530,8 +6530,10 @@ const CheckboxClass = compose$1(
6530
6530
  inputOutlineOffset: { ...checkboxElement, property: 'outline-offset' },
6531
6531
  inputOutlineColor: { ...checkboxElement, property: 'outline-color' },
6532
6532
  inputOutlineStyle: { ...checkboxElement, property: 'outline-style' },
6533
+ inputAlign: { ...checkboxElement, property: 'align-self' },
6533
6534
 
6534
6535
  inputContainerPadding: { ...component$1, property: 'padding' },
6536
+ inputContainerBackgroundColor: { ...component$1, property: 'background-color' },
6535
6537
  inputContainerBorderRadius: { ...component$1, property: 'border-radius' },
6536
6538
  inputContainerBorderWidth: { ...component$1, property: 'border-width' },
6537
6539
  inputContainerBorderColor: { ...component$1, property: 'border-color' },
@@ -6581,6 +6583,10 @@ const CheckboxClass = compose$1(
6581
6583
  height: 100%;
6582
6584
  }
6583
6585
 
6586
+ :host([full-width]) vaadin-checkbox {
6587
+ flex-grow: 1;
6588
+ }
6589
+
6584
6590
  vaadin-checkbox::part(checkbox) {
6585
6591
  margin: 0;
6586
6592
  }
@@ -16058,19 +16064,6 @@ const newDate = (date, isUtcTime) => {
16058
16064
  }
16059
16065
  if (typeof date === 'string') {
16060
16066
  const d = new Date(date.replace(/-/g, '/'));
16061
- if (isUtcTime) {
16062
- return new Date(
16063
- Date.UTC(
16064
- d.getFullYear(),
16065
- d.getMonth(),
16066
- d.getDate(),
16067
- d.getHours(),
16068
- d.getMinutes(),
16069
- d.getSeconds(),
16070
- d.getMilliseconds()
16071
- )
16072
- );
16073
- }
16074
16067
  return new Date(d);
16075
16068
  }
16076
16069
  return new Date();
@@ -16168,9 +16161,16 @@ const parseDateString = (val, format) => {
16168
16161
  };
16169
16162
 
16170
16163
  const dateToEpoch = (date, isUtc) => {
16164
+ // If it's already a number (epoch), return it directly - no conversion needed
16165
+ if (typeof date === 'number') {
16166
+ return date;
16167
+ }
16168
+
16171
16169
  if (isUtc) {
16172
- return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())).getTime();
16170
+ return Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());
16173
16171
  }
16172
+
16173
+ // Default: return epoch in local timezone
16174
16174
  return date.getTime();
16175
16175
  };
16176
16176
 
@@ -17239,7 +17239,7 @@ class RawDateFieldClass extends BaseInputClass$2 {
17239
17239
 
17240
17240
  updateValue() {
17241
17241
  if (this.isCountersOutOfRange) {
17242
- this.updateEpoch('');
17242
+ this.resetEpoch();
17243
17243
  } else {
17244
17244
  const date = formats[this.format].getDate(this.inputElement.value);
17245
17245
  this.updateEpoch(dateToEpoch(date, this.isUtcTime));
@@ -17253,12 +17253,8 @@ class RawDateFieldClass extends BaseInputClass$2 {
17253
17253
  this.#dispatchInput();
17254
17254
  };
17255
17255
 
17256
- updateEpoch(epochOrDate) {
17257
- if (Number.isNaN(epochOrDate) || !epochOrDate.toString()?.length) {
17258
- this.epoch = '';
17259
- } else {
17260
- this.epoch = dateToEpoch(newDate(epochOrDate, this.isUtcTime), this.isUtcTime);
17261
- }
17256
+ updateEpoch(epoch) {
17257
+ this.epoch = dateToEpoch(epoch, this.isUtcTime);
17262
17258
  }
17263
17259
 
17264
17260
  dateCounters = [
@@ -17389,14 +17385,18 @@ class RawDateFieldClass extends BaseInputClass$2 {
17389
17385
  let value = parseInt(val, 10);
17390
17386
  if (!Number.isNaN(value)) {
17391
17387
  this.updateEpoch(value);
17392
- this.updateDateCounters(newDate(value));
17388
+ this.updateDateCounters(new Date(value));
17393
17389
  } else {
17394
- this.updateEpoch('');
17390
+ this.resetEpoch();
17395
17391
  this.resetDateCounters();
17396
17392
  this.clearInputEle();
17397
17393
  }
17398
17394
  }
17399
17395
 
17396
+ resetEpoch() {
17397
+ this.epoch = '';
17398
+ }
17399
+
17400
17400
  get isCountersEmpty() {
17401
17401
  return this.dateCounters.every((dc) => dc.isEmpty);
17402
17402
  }
@@ -17970,7 +17970,7 @@ class RawDateFieldClass extends BaseInputClass$2 {
17970
17970
  }
17971
17971
 
17972
17972
  try {
17973
- const date = this.isUtcTime ? new Date(this.epoch) : newDate(this.epoch);
17973
+ const date = new Date(this.epoch);
17974
17974
 
17975
17975
  if (this.isUtcTime) {
17976
17976
  ret.month = date.getUTCMonth() + 1;