@entur/datepicker 11.2.1-beta.9 → 11.2.2

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/styles.css CHANGED
@@ -1,11 +1,48 @@
1
1
  /* DO NOT CHANGE!*/
2
2
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
3
+ /* DO NOT CHANGE!*/
4
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
5
+ /* DO NOT CHANGE!*/
6
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
7
+ [data-color-mode=light],
8
+ :root {
9
+ --components-datepicker-calendar-background: #ffffff;
10
+ --components-datepicker-calendar-border: #e3e6e8;
11
+ --components-datepicker-calendar-dateborder: #e3e6e8;
12
+ --components-datepicker-calendar-datefill-hover: #d9ddf2;
13
+ --components-datepicker-calendar-datefill-selected: #aeb7e2;
14
+ --components-datepicker-calendar-icon: #181c56;
15
+ --components-datepicker-calendar-stroke-today: #ff5959;
16
+ --components-datepicker-calendar-text-accent: #181c56;
17
+ --components-datepicker-calendar-text-disabled: #b6b8ba;
18
+ --components-datepicker-calendar-text-subdued: #626493;
19
+ }
20
+
21
+ [data-color-mode=dark] {
22
+ --components-datepicker-calendar-background: #393a49;
23
+ --components-datepicker-calendar-border: rgba(255, 255, 255, 0);
24
+ --components-datepicker-calendar-dateborder: #81828f;
25
+ --components-datepicker-calendar-datefill-hover: rgba(229, 229, 233, 0.3490196078);
26
+ --components-datepicker-calendar-datefill-selected: rgba(229, 229, 233, 0.1490196078);
27
+ --components-datepicker-calendar-icon: #e5e5e9;
28
+ --components-datepicker-calendar-stroke-today: #ff9494;
29
+ --components-datepicker-calendar-text-accent: #e5e5e9;
30
+ --components-datepicker-calendar-text-disabled: #6e6f73;
31
+ --components-datepicker-calendar-text-subdued: #b3b4bd;
32
+ }
33
+
34
+ :root {
35
+ --eds-datepicker: 1;
36
+ }/* DO NOT CHANGE!*/
37
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
3
38
  .eds-date-and-time-field__segment {
4
39
  margin-top: 1rem;
5
40
  padding: 0 2px;
6
- font-feature-settings: "tnum";
7
41
  font-variant-numeric: tabular-nums;
8
- text-align: right;
42
+ text-align: end;
43
+ }
44
+ .eds-date-and-time-field__segment:is(:first-child, :last-child):not([role=spinbutton]) {
45
+ padding: 0;
9
46
  }
10
47
  .eds-date-and-time-field__segment--placeholder {
11
48
  color: var(--components-datepicker-datefield-standard-text-content);
@@ -21,12 +58,27 @@
21
58
  }
22
59
  .eds-date-and-time-field__segment[aria-valuemax="9999"] {
23
60
  min-width: 4ch;
61
+ }/* DO NOT CHANGE!*/
62
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
63
+ .eds-datefield {
64
+ width: fit-content;
65
+ display: block;
24
66
  }
25
- /* DO NOT CHANGE!*/
67
+ .eds-datefield .eds-form-control-wrapper {
68
+ display: inline-flex;
69
+ padding-inline: 1rem;
70
+ width: fit-content;
71
+ }
72
+ .eds-datefield .eds-form-control-wrapper--disabled:focus-within {
73
+ border-color: transparent;
74
+ box-shadow: none;
75
+ }
76
+ .eds-datefield .eds-form-control-wrapper--disabled .eds-date-and-time-field__segment:focus {
77
+ background: none;
78
+ }/* DO NOT CHANGE!*/
26
79
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
27
80
  .eds-datepicker__calendar,
28
81
  .eds-contrast .eds-datepicker__calendar {
29
- width: -moz-fit-content;
30
82
  width: fit-content;
31
83
  padding: 1.5rem;
32
84
  padding-top: 0.75rem;
@@ -161,29 +213,7 @@
161
213
  .eds-datepicker__calendar__grid__cell--today,
162
214
  .eds-contrast .eds-datepicker__calendar__grid__cell--today {
163
215
  border-bottom: 2px solid var(--components-datepicker-calendar-stroke-today);
164
- }
165
- /* DO NOT CHANGE!*/
166
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
167
- .eds-datefield {
168
- width: -moz-fit-content;
169
- width: fit-content;
170
- display: block;
171
- }
172
- .eds-datefield .eds-form-control-wrapper {
173
- display: inline-flex;
174
- padding-left: 1rem;
175
- padding-right: 1rem;
176
- width: -moz-fit-content;
177
- width: fit-content;
178
- }
179
- .eds-datefield .eds-form-control-wrapper--disabled:focus-within {
180
- border-color: transparent;
181
- box-shadow: none;
182
- }
183
- .eds-datefield .eds-form-control-wrapper--disabled .eds-date-and-time-field__segment:focus {
184
- background: none;
185
- }
186
- /* DO NOT CHANGE!*/
216
+ }/* DO NOT CHANGE!*/
187
217
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
188
218
  .eds-datepicker.eds-datefield:not(.eds-datepicker--disabled) .eds-form-control-wrapper {
189
219
  padding-right: 0rem;
@@ -209,23 +239,18 @@
209
239
  background-color: var(--components-button-iconbutton-standard-active);
210
240
  }
211
241
  .eds-datepicker__calendar-modal.eds-modal__content {
212
- padding: 0;
213
- padding: initial;
242
+ padding: unset;
214
243
  width: inherit;
215
- background-color: transparent;
216
- background-color: initial;
217
- }
218
- /* DO NOT CHANGE!*/
244
+ background-color: unset;
245
+ }/* DO NOT CHANGE!*/
219
246
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
220
247
  .eds-timepicker {
221
- width: -moz-fit-content;
222
248
  width: fit-content;
223
249
  justify-content: center;
224
250
  display: block;
225
251
  }
226
252
  .eds-timepicker--disabled {
227
- padding-left: 1rem;
228
- padding-right: 1rem;
253
+ padding-inline: 1rem;
229
254
  }
230
255
  .eds-timepicker .eds-form-control__prepend {
231
256
  margin-right: 0.25rem;
@@ -261,49 +286,10 @@
261
286
  }
262
287
  .eds-timepicker .eds-icon-button--disabled__wrapper {
263
288
  display: none;
264
- }
265
- .eds-native-timepicker input[type=time]::-webkit-calendar-picker-indicator {
289
+ }.eds-native-timepicker input[type=time]::-webkit-calendar-picker-indicator {
266
290
  position: relative;
267
291
  top: -0.5rem;
268
- }
269
- /* DO NOT CHANGE!*/
270
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
271
- /* DO NOT CHANGE!*/
272
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
273
- /* DO NOT CHANGE!*/
274
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
275
- [data-color-mode=light],
276
- :root {
277
- --components-datepicker-calendar-background: #ffffff;
278
- --components-datepicker-calendar-border: #e3e6e8;
279
- --components-datepicker-calendar-dateborder: #e3e6e8;
280
- --components-datepicker-calendar-datefill-hover: #d9ddf2;
281
- --components-datepicker-calendar-datefill-selected: #aeb7e2;
282
- --components-datepicker-calendar-icon: #181c56;
283
- --components-datepicker-calendar-stroke-today: #ff5959;
284
- --components-datepicker-calendar-text-accent: #181c56;
285
- --components-datepicker-calendar-text-disabled: #b6b8ba;
286
- --components-datepicker-calendar-text-subdued: #626493;
287
- }
288
-
289
- [data-color-mode=dark] {
290
- --components-datepicker-calendar-background: #393a49;
291
- --components-datepicker-calendar-border: rgba(255, 255, 255, 0);
292
- --components-datepicker-calendar-dateborder: #81828f;
293
- --components-datepicker-calendar-datefill-hover: rgba(229, 229, 233, 0.3490196078);
294
- --components-datepicker-calendar-datefill-selected: rgba(229, 229, 233, 0.1490196078);
295
- --components-datepicker-calendar-icon: #e5e5e9;
296
- --components-datepicker-calendar-stroke-today: #ff9494;
297
- --components-datepicker-calendar-text-accent: #e5e5e9;
298
- --components-datepicker-calendar-text-disabled: #6e6f73;
299
- --components-datepicker-calendar-text-subdued: #b3b4bd;
300
- }
301
-
302
- :root {
303
- --eds-datepicker: 1;
304
- }
305
- .eds-simple-timepicker {
306
- width: 7rem;
292
+ }.eds-simple-timepicker {
307
293
  width: var(--input-width);
308
294
  --input-width: 7rem;
309
295
  }
@@ -327,4 +313,4 @@
327
313
  }
328
314
  .eds-simple-timepicker--show-seconds.eds-simple-timepicker--has-tooltip {
329
315
  --input-width: 10.5rem;
330
- }
316
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@entur/datepicker",
3
- "version": "11.2.1-beta.9",
3
+ "version": "11.2.2",
4
4
  "license": "EUPL-1.2",
5
- "main": "dist/index.js",
5
+ "main": "dist/datepicker.cjs.js",
6
6
  "module": "dist/datepicker.esm.js",
7
- "typings": "dist/index.d.ts",
7
+ "types": "dist/index.d.ts",
8
8
  "files": [
9
9
  "dist"
10
10
  ],
@@ -17,39 +17,49 @@
17
17
  "access": "public"
18
18
  },
19
19
  "scripts": {
20
- "start": "dts watch --noClean",
21
- "build": "dts build",
22
- "test": "dts test",
23
- "lint": "dts lint src"
20
+ "start": "vite build --watch",
21
+ "build": "vite build",
22
+ "test": "jest",
23
+ "lint": "eslint src"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": ">=16.8.0",
27
27
  "react-dom": ">=16.8.0"
28
28
  },
29
29
  "dependencies": {
30
- "@entur/a11y": "^0.2.99",
31
- "@entur/button": "^3.3.13-beta.9",
32
- "@entur/form": "^8.3.2-beta.9",
33
- "@entur/icons": "^8.0.0",
34
- "@entur/modal": "^1.7.73-beta.9",
35
- "@entur/tokens": "^3.19.1",
36
- "@entur/tooltip": "^5.2.13-beta.9",
37
- "@entur/typography": "^1.10.0-beta.9",
38
- "@entur/utils": "^0.12.3",
39
- "@floating-ui/react-dom": "^2.1.0",
40
- "@internationalized/date": "^3.4.0",
41
- "@react-aria/button": "^3.6.4",
42
- "@react-aria/calendar": "^3.6.0",
43
- "@react-aria/datepicker": "^3.6.0",
44
- "@react-aria/i18n": "^3.8.1",
45
- "@react-stately/calendar": "^3.6.0",
46
- "@react-stately/datepicker": "^3.11.0",
47
- "classnames": "^2.3.1",
48
- "react-focus-lock": "^2.9.1"
30
+ "@entur/a11y": "^0.2.101",
31
+ "@entur/button": "^3.3.14",
32
+ "@entur/form": "^8.3.3",
33
+ "@entur/icons": "^8.0.2",
34
+ "@entur/modal": "^1.7.74",
35
+ "@entur/tokens": "^3.19.3",
36
+ "@entur/tooltip": "^5.2.14",
37
+ "@entur/typography": "^1.9.14",
38
+ "@entur/utils": "^0.12.5",
39
+ "@floating-ui/react-dom": "^2.1.6",
40
+ "@internationalized/date": "^3.8.2",
41
+ "@react-aria/button": "^3.14.0",
42
+ "@react-aria/calendar": "^3.9.0",
43
+ "@react-aria/datepicker": "^3.15.0",
44
+ "@react-aria/i18n": "^3.12.11",
45
+ "@react-stately/calendar": "^3.8.3",
46
+ "@react-stately/datepicker": "^3.15.0",
47
+ "classnames": "^2.5.1",
48
+ "react-focus-lock": "^2.13.6"
49
49
  },
50
50
  "devDependencies": {
51
- "@react-types/datepicker": "^3.9.0",
52
- "dts-cli": "2.0.5"
51
+ "@react-types/datepicker": "^3.13.0",
52
+ "@testing-library/jest-dom": "^5.17.0",
53
+ "@testing-library/react": "^10.4.9",
54
+ "@testing-library/user-event": "14.6.1",
55
+ "@vitejs/plugin-react": "^5.0.1",
56
+ "eslint": "^7.32.0",
57
+ "jest": "^29.0.0",
58
+ "jest-environment-jsdom": "^29.0.0",
59
+ "ts-jest": "^29.0.0",
60
+ "typescript": "^5.9.2",
61
+ "vite": "^7.1.3",
62
+ "vite-plugin-dts": "^4.5.4"
53
63
  },
54
- "gitHead": "6f685d2e4ac13bdaf9c6480f9e7922c9d8f4619c"
64
+ "gitHead": "5dd9d318f1d79f6f522f978de27b551fda1e91cc"
55
65
  }