@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -50,10 +50,10 @@
50
50
  "webpack": "^5.79.0",
51
51
  "webpack-cli": "^6.0.0",
52
52
  "webpack-dev-server": "^5.0.0",
53
- "rollup-replace-plugin": "2.2.2",
54
- "test-drivers": "2.2.2",
55
- "webpack-extract-font-loader": "2.2.2",
56
- "webpack-replace-plugin": "2.2.2"
53
+ "rollup-replace-plugin": "2.2.4",
54
+ "test-drivers": "2.2.4",
55
+ "webpack-extract-font-loader": "2.2.4",
56
+ "webpack-replace-plugin": "2.2.4"
57
57
  },
58
58
  "dependencies": {
59
59
  "@vaadin/checkbox": "24.3.4",
@@ -77,29 +77,29 @@
77
77
  "libphonenumber-js": "^1.11.12",
78
78
  "lodash.debounce": "4.0.8",
79
79
  "lodash.merge": "4.6.2",
80
- "@descope-ui/common": "2.2.2",
81
- "@descope-ui/descope-address-field": "2.2.2",
82
- "@descope-ui/descope-apps-list": "2.2.2",
83
- "@descope-ui/descope-autocomplete-field": "2.2.2",
84
- "@descope-ui/descope-avatar": "2.2.2",
85
- "@descope-ui/descope-badge": "2.2.2",
86
- "@descope-ui/descope-button": "2.2.2",
87
- "@descope-ui/descope-collapsible-container": "2.2.2",
88
- "@descope-ui/descope-combo-box": "2.2.2",
89
- "@descope-ui/descope-enriched-text": "2.2.2",
90
- "@descope-ui/descope-icon": "2.2.2",
91
- "@descope-ui/descope-image": "2.2.2",
92
- "@descope-ui/descope-link": "2.2.2",
93
- "@descope-ui/descope-list": "2.2.2",
94
- "@descope-ui/descope-list-item": "2.2.2",
95
- "@descope-ui/descope-outbound-app-button": "2.2.2",
96
- "@descope-ui/descope-outbound-apps": "2.2.2",
97
- "@descope-ui/descope-password-strength": "2.2.2",
98
- "@descope-ui/descope-recovery-codes": "2.2.2",
99
- "@descope-ui/descope-text": "2.2.2",
100
- "@descope-ui/descope-timer": "2.2.2",
101
- "@descope-ui/descope-timer-button": "2.2.2",
102
- "@descope-ui/descope-trusted-devices": "2.2.2"
80
+ "@descope-ui/common": "2.2.4",
81
+ "@descope-ui/descope-address-field": "2.2.4",
82
+ "@descope-ui/descope-apps-list": "2.2.4",
83
+ "@descope-ui/descope-autocomplete-field": "2.2.4",
84
+ "@descope-ui/descope-avatar": "2.2.4",
85
+ "@descope-ui/descope-badge": "2.2.4",
86
+ "@descope-ui/descope-button": "2.2.4",
87
+ "@descope-ui/descope-collapsible-container": "2.2.4",
88
+ "@descope-ui/descope-combo-box": "2.2.4",
89
+ "@descope-ui/descope-enriched-text": "2.2.4",
90
+ "@descope-ui/descope-icon": "2.2.4",
91
+ "@descope-ui/descope-image": "2.2.4",
92
+ "@descope-ui/descope-link": "2.2.4",
93
+ "@descope-ui/descope-list": "2.2.4",
94
+ "@descope-ui/descope-list-item": "2.2.4",
95
+ "@descope-ui/descope-outbound-app-button": "2.2.4",
96
+ "@descope-ui/descope-outbound-apps": "2.2.4",
97
+ "@descope-ui/descope-password-strength": "2.2.4",
98
+ "@descope-ui/descope-recovery-codes": "2.2.4",
99
+ "@descope-ui/descope-text": "2.2.4",
100
+ "@descope-ui/descope-timer": "2.2.4",
101
+ "@descope-ui/descope-timer-button": "2.2.4",
102
+ "@descope-ui/descope-trusted-devices": "2.2.4"
103
103
  },
104
104
  "overrides": {
105
105
  "@vaadin/avatar": "24.3.4",
@@ -62,7 +62,7 @@ class RawDateFieldClass extends BaseInputClass {
62
62
 
63
63
  updateValue() {
64
64
  if (this.isCountersOutOfRange) {
65
- this.updateEpoch('');
65
+ this.resetEpoch();
66
66
  } else {
67
67
  const date = formats[this.format].getDate(this.inputElement.value);
68
68
  this.updateEpoch(dateToEpoch(date, this.isUtcTime));
@@ -76,12 +76,8 @@ class RawDateFieldClass extends BaseInputClass {
76
76
  this.#dispatchInput();
77
77
  };
78
78
 
79
- updateEpoch(epochOrDate) {
80
- if (Number.isNaN(epochOrDate) || !epochOrDate.toString()?.length) {
81
- this.epoch = '';
82
- } else {
83
- this.epoch = dateToEpoch(newDate(epochOrDate, this.isUtcTime), this.isUtcTime);
84
- }
79
+ updateEpoch(epoch) {
80
+ this.epoch = dateToEpoch(epoch, this.isUtcTime);
85
81
  }
86
82
 
87
83
  dateCounters = [
@@ -212,14 +208,18 @@ class RawDateFieldClass extends BaseInputClass {
212
208
  let value = parseInt(val, 10);
213
209
  if (!Number.isNaN(value)) {
214
210
  this.updateEpoch(value);
215
- this.updateDateCounters(newDate(value));
211
+ this.updateDateCounters(new Date(value));
216
212
  } else {
217
- this.updateEpoch('');
213
+ this.resetEpoch();
218
214
  this.resetDateCounters();
219
215
  this.clearInputEle();
220
216
  }
221
217
  }
222
218
 
219
+ resetEpoch() {
220
+ this.epoch = '';
221
+ }
222
+
223
223
  get isCountersEmpty() {
224
224
  return this.dateCounters.every((dc) => dc.isEmpty);
225
225
  }
@@ -795,7 +795,7 @@ class RawDateFieldClass extends BaseInputClass {
795
795
  }
796
796
 
797
797
  try {
798
- const date = this.isUtcTime ? new Date(this.epoch) : newDate(this.epoch);
798
+ const date = new Date(this.epoch);
799
799
 
800
800
  if (this.isUtcTime) {
801
801
  ret.month = date.getUTCMonth() + 1;
@@ -47,8 +47,15 @@ export const parseDateString = (val, format) => {
47
47
  };
48
48
 
49
49
  export const dateToEpoch = (date, isUtc) => {
50
+ // If it's already a number (epoch), return it directly - no conversion needed
51
+ if (typeof date === 'number') {
52
+ return date;
53
+ }
54
+
50
55
  if (isUtc) {
51
- return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())).getTime();
56
+ return Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());
52
57
  }
58
+
59
+ // Default: return epoch in local timezone
53
60
  return date.getTime();
54
61
  };
@@ -94,9 +94,13 @@ const customMixin = (superclass) =>
94
94
  export const ModalClass = compose(
95
95
  createStyleMixin({
96
96
  mappings: {
97
+ overlayBackdropColor: { property: () => ModalClass.cssVarList.overlay.backdropColor },
97
98
  overlayBackgroundColor: { property: () => ModalClass.cssVarList.overlay.backgroundColor },
98
99
  overlayShadow: { property: () => ModalClass.cssVarList.overlay.shadow },
99
100
  overlayWidth: { property: () => ModalClass.cssVarList.overlay.width },
101
+ overlayBorderWidth: { property: () => ModalClass.cssVarList.overlay.borderWidth },
102
+ overlayBorderStyle: { property: () => ModalClass.cssVarList.overlay.borderStyle },
103
+ overlayBorderColor: { property: () => ModalClass.cssVarList.overlay.borderColor },
100
104
  },
101
105
  }),
102
106
  portalMixin({
@@ -112,6 +116,22 @@ export const ModalClass = compose(
112
116
  { selector: () => '::part(content)', property: 'background-color' },
113
117
  { selector: () => '::part(overlay)', property: 'background-color' },
114
118
  ],
119
+ backdropColor: {
120
+ selector: () => '::part(backdrop)',
121
+ property: 'background-color',
122
+ },
123
+ borderStyle: {
124
+ selector: () => '::part(content)',
125
+ property: 'border-style',
126
+ },
127
+ borderWidth: {
128
+ selector: () => '::part(content)',
129
+ property: 'border-width',
130
+ },
131
+ borderColor: {
132
+ selector: () => '::part(content)',
133
+ property: 'border-color',
134
+ },
115
135
  width: { selector: () => '::part(overlay)', property: 'width' },
116
136
  shadow: { selector: () => '::part(overlay)', property: 'box-shadow' },
117
137
  },
@@ -10,6 +10,7 @@ const modal = {
10
10
  [compVars.overlayBackgroundColor]: globalRefs.colors.surface.main,
11
11
  [compVars.overlayShadow]: globalRefs.shadow.wide['2xl'],
12
12
  [compVars.overlayWidth]: '540px',
13
+ [compVars.overlayBackdropColor]: 'hsla(214, 53%, 23%, 0.16)',
13
14
  };
14
15
 
15
16
  export default modal;