@sbb-esta/lyne-elements-experimental-dev 5.12.0-dev.1792790069 → 5.12.0-dev.1792802195
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/development/autocomplete-grid.js +1 -3
- package/development/autocomplete-grid.pure.js +9 -18
- package/development/core.js +24 -48
- package/development/easter-egg.js +1 -3
- package/development/easter-egg.pure.js +27 -54
- package/development/journey-summary.js +1 -3
- package/development/journey-summary.pure.js +38 -76
- package/development/pearl-chain-legacy.js +1 -3
- package/development/pearl-chain-legacy.pure.js +11 -22
- package/development/pearl-chain-time.js +1 -3
- package/development/pearl-chain-time.pure.js +38 -76
- package/development/pearl-chain-vertical-item.js +1 -3
- package/development/pearl-chain-vertical-item.pure.js +2 -4
- package/development/pearl-chain-vertical.js +1 -3
- package/development/pearl-chain-vertical.pure.js +2 -4
- package/development/seat-reservation.js +1 -3
- package/development/seat-reservation.pure.js +58 -116
- package/development/timetable-duration.js +1 -3
- package/development/timetable-duration.pure.js +2 -4
- package/development/timetable-row.js +1 -3
- package/development/timetable-row.pure.js +38 -76
- package/package.json +2 -2
|
@@ -2,8 +2,6 @@ import { SbbJourneySummaryElement } from "./journey-summary.pure.js";
|
|
|
2
2
|
|
|
3
3
|
export * from "./journey-summary.pure.js"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/elements-experimental/journey-summary.ts
|
|
6
6
|
/** @entrypoint */
|
|
7
7
|
SbbJourneySummaryElement.define();
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
@@ -7,7 +7,7 @@ import { property } from "lit/decorators.js";
|
|
|
7
7
|
import { durationToTime, removeTimezoneFromISOTimeString } from "./core.js";
|
|
8
8
|
import { SbbPearlChainTimeElement } from "./pearl-chain-time.pure.js";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// node_modules/date-fns/constants.js
|
|
11
11
|
/**
|
|
12
12
|
* @constant
|
|
13
13
|
* @name maxTime
|
|
@@ -63,8 +63,7 @@ const millisecondsInDay = 864e5;
|
|
|
63
63
|
*/
|
|
64
64
|
const constructFromSymbol = Symbol.for("constructDateFrom");
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
//#region node_modules/date-fns/constructFrom.js
|
|
66
|
+
// node_modules/date-fns/constructFrom.js
|
|
68
67
|
/**
|
|
69
68
|
* @name constructFrom
|
|
70
69
|
* @category Generic Helpers
|
|
@@ -107,8 +106,7 @@ function constructFrom(date, value) {
|
|
|
107
106
|
return new Date(value);
|
|
108
107
|
}
|
|
109
108
|
|
|
110
|
-
|
|
111
|
-
//#region node_modules/date-fns/toDate.js
|
|
109
|
+
// node_modules/date-fns/toDate.js
|
|
112
110
|
/**
|
|
113
111
|
* @name toDate
|
|
114
112
|
* @category Common Helpers
|
|
@@ -151,15 +149,13 @@ function toDate(argument, context) {
|
|
|
151
149
|
return constructFrom(context || argument, argument);
|
|
152
150
|
}
|
|
153
151
|
|
|
154
|
-
|
|
155
|
-
//#region node_modules/date-fns/_lib/defaultOptions.js
|
|
152
|
+
// node_modules/date-fns/_lib/defaultOptions.js
|
|
156
153
|
let defaultOptions = {};
|
|
157
154
|
function getDefaultOptions() {
|
|
158
155
|
return defaultOptions;
|
|
159
156
|
}
|
|
160
157
|
|
|
161
|
-
|
|
162
|
-
//#region node_modules/date-fns/startOfWeek.js
|
|
158
|
+
// node_modules/date-fns/startOfWeek.js
|
|
163
159
|
/**
|
|
164
160
|
* The {@link startOfWeek} function options.
|
|
165
161
|
*/
|
|
@@ -201,8 +197,7 @@ function startOfWeek(date, options) {
|
|
|
201
197
|
return _date;
|
|
202
198
|
}
|
|
203
199
|
|
|
204
|
-
|
|
205
|
-
//#region node_modules/date-fns/startOfISOWeek.js
|
|
200
|
+
// node_modules/date-fns/startOfISOWeek.js
|
|
206
201
|
/**
|
|
207
202
|
* The {@link startOfISOWeek} function options.
|
|
208
203
|
*/
|
|
@@ -237,8 +232,7 @@ function startOfISOWeek(date, options) {
|
|
|
237
232
|
});
|
|
238
233
|
}
|
|
239
234
|
|
|
240
|
-
|
|
241
|
-
//#region node_modules/date-fns/getISOWeekYear.js
|
|
235
|
+
// node_modules/date-fns/getISOWeekYear.js
|
|
242
236
|
/**
|
|
243
237
|
* The {@link getISOWeekYear} function options.
|
|
244
238
|
*/
|
|
@@ -278,8 +272,7 @@ function getISOWeekYear(date, options) {
|
|
|
278
272
|
else return year - 1;
|
|
279
273
|
}
|
|
280
274
|
|
|
281
|
-
|
|
282
|
-
//#region node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
275
|
+
// node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
283
276
|
/**
|
|
284
277
|
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
285
278
|
* They usually appear for dates that denote time before the timezones were introduced
|
|
@@ -298,15 +291,13 @@ function getTimezoneOffsetInMilliseconds(date) {
|
|
|
298
291
|
return +date - +utcDate;
|
|
299
292
|
}
|
|
300
293
|
|
|
301
|
-
|
|
302
|
-
//#region node_modules/date-fns/_lib/normalizeDates.js
|
|
294
|
+
// node_modules/date-fns/_lib/normalizeDates.js
|
|
303
295
|
function normalizeDates(context, ...dates) {
|
|
304
296
|
const normalize = constructFrom.bind(null, context || dates.find((date) => typeof date === "object"));
|
|
305
297
|
return dates.map(normalize);
|
|
306
298
|
}
|
|
307
299
|
|
|
308
|
-
|
|
309
|
-
//#region node_modules/date-fns/startOfDay.js
|
|
300
|
+
// node_modules/date-fns/startOfDay.js
|
|
310
301
|
/**
|
|
311
302
|
* The {@link startOfDay} function options.
|
|
312
303
|
*/
|
|
@@ -338,8 +329,7 @@ function startOfDay(date, options) {
|
|
|
338
329
|
return _date;
|
|
339
330
|
}
|
|
340
331
|
|
|
341
|
-
|
|
342
|
-
//#region node_modules/date-fns/differenceInCalendarDays.js
|
|
332
|
+
// node_modules/date-fns/differenceInCalendarDays.js
|
|
343
333
|
/**
|
|
344
334
|
* The {@link differenceInCalendarDays} function options.
|
|
345
335
|
*/
|
|
@@ -383,8 +373,7 @@ function differenceInCalendarDays(laterDate, earlierDate, options) {
|
|
|
383
373
|
return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
|
|
384
374
|
}
|
|
385
375
|
|
|
386
|
-
|
|
387
|
-
//#region node_modules/date-fns/startOfISOWeekYear.js
|
|
376
|
+
// node_modules/date-fns/startOfISOWeekYear.js
|
|
388
377
|
/**
|
|
389
378
|
* The {@link startOfISOWeekYear} function options.
|
|
390
379
|
*/
|
|
@@ -421,8 +410,7 @@ function startOfISOWeekYear(date, options) {
|
|
|
421
410
|
return startOfISOWeek(fourthOfJanuary);
|
|
422
411
|
}
|
|
423
412
|
|
|
424
|
-
|
|
425
|
-
//#region node_modules/date-fns/isDate.js
|
|
413
|
+
// node_modules/date-fns/isDate.js
|
|
426
414
|
/**
|
|
427
415
|
* @name isDate
|
|
428
416
|
* @category Common Helpers
|
|
@@ -459,8 +447,7 @@ function isDate(value) {
|
|
|
459
447
|
return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
460
448
|
}
|
|
461
449
|
|
|
462
|
-
|
|
463
|
-
//#region node_modules/date-fns/isValid.js
|
|
450
|
+
// node_modules/date-fns/isValid.js
|
|
464
451
|
/**
|
|
465
452
|
* @name isValid
|
|
466
453
|
* @category Common Helpers
|
|
@@ -496,8 +483,7 @@ function isValid(date) {
|
|
|
496
483
|
return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
|
|
497
484
|
}
|
|
498
485
|
|
|
499
|
-
|
|
500
|
-
//#region node_modules/date-fns/startOfYear.js
|
|
486
|
+
// node_modules/date-fns/startOfYear.js
|
|
501
487
|
/**
|
|
502
488
|
* The {@link startOfYear} function options.
|
|
503
489
|
*/
|
|
@@ -530,8 +516,7 @@ function startOfYear(date, options) {
|
|
|
530
516
|
return date_;
|
|
531
517
|
}
|
|
532
518
|
|
|
533
|
-
|
|
534
|
-
//#region node_modules/date-fns/locale/en-US/_lib/formatDistance.js
|
|
519
|
+
// node_modules/date-fns/locale/en-US/_lib/formatDistance.js
|
|
535
520
|
const formatDistanceLocale = {
|
|
536
521
|
lessThanXSeconds: {
|
|
537
522
|
one: "less than a second",
|
|
@@ -608,8 +593,7 @@ const formatDistance = (token, count, options) => {
|
|
|
608
593
|
return result;
|
|
609
594
|
};
|
|
610
595
|
|
|
611
|
-
|
|
612
|
-
//#region node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
596
|
+
// node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
613
597
|
function buildFormatLongFn(args) {
|
|
614
598
|
return (options = {}) => {
|
|
615
599
|
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
@@ -617,8 +601,7 @@ function buildFormatLongFn(args) {
|
|
|
617
601
|
};
|
|
618
602
|
}
|
|
619
603
|
|
|
620
|
-
|
|
621
|
-
//#region node_modules/date-fns/locale/en-US/_lib/formatLong.js
|
|
604
|
+
// node_modules/date-fns/locale/en-US/_lib/formatLong.js
|
|
622
605
|
const dateFormats = {
|
|
623
606
|
full: "EEEE, MMMM do, y",
|
|
624
607
|
long: "MMMM do, y",
|
|
@@ -652,8 +635,7 @@ const formatLong = {
|
|
|
652
635
|
})
|
|
653
636
|
};
|
|
654
637
|
|
|
655
|
-
|
|
656
|
-
//#region node_modules/date-fns/locale/en-US/_lib/formatRelative.js
|
|
638
|
+
// node_modules/date-fns/locale/en-US/_lib/formatRelative.js
|
|
657
639
|
const formatRelativeLocale = {
|
|
658
640
|
lastWeek: "'last' eeee 'at' p",
|
|
659
641
|
yesterday: "'yesterday at' p",
|
|
@@ -664,8 +646,7 @@ const formatRelativeLocale = {
|
|
|
664
646
|
};
|
|
665
647
|
const formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
|
|
666
648
|
|
|
667
|
-
|
|
668
|
-
//#region node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
649
|
+
// node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
669
650
|
/**
|
|
670
651
|
* The localize function argument callback which allows to convert raw value to
|
|
671
652
|
* the actual type.
|
|
@@ -715,8 +696,7 @@ function buildLocalizeFn(args) {
|
|
|
715
696
|
};
|
|
716
697
|
}
|
|
717
698
|
|
|
718
|
-
|
|
719
|
-
//#region node_modules/date-fns/locale/en-US/_lib/localize.js
|
|
699
|
+
// node_modules/date-fns/locale/en-US/_lib/localize.js
|
|
720
700
|
const eraValues = {
|
|
721
701
|
narrow: ["B", "A"],
|
|
722
702
|
abbreviated: ["BC", "AD"],
|
|
@@ -925,8 +905,7 @@ const localize = {
|
|
|
925
905
|
})
|
|
926
906
|
};
|
|
927
907
|
|
|
928
|
-
|
|
929
|
-
//#region node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
908
|
+
// node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
930
909
|
function buildMatchFn(args) {
|
|
931
910
|
return (string, options = {}) => {
|
|
932
911
|
const width = options.width;
|
|
@@ -953,8 +932,7 @@ function findIndex(array, predicate) {
|
|
|
953
932
|
for (let key = 0; key < array.length; key++) if (predicate(array[key])) return key;
|
|
954
933
|
}
|
|
955
934
|
|
|
956
|
-
|
|
957
|
-
//#region node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
935
|
+
// node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
958
936
|
function buildMatchPatternFn(args) {
|
|
959
937
|
return (string, options = {}) => {
|
|
960
938
|
const matchResult = string.match(args.matchPattern);
|
|
@@ -972,8 +950,7 @@ function buildMatchPatternFn(args) {
|
|
|
972
950
|
};
|
|
973
951
|
}
|
|
974
952
|
|
|
975
|
-
|
|
976
|
-
//#region node_modules/date-fns/locale/en-US/_lib/match.js
|
|
953
|
+
// node_modules/date-fns/locale/en-US/_lib/match.js
|
|
977
954
|
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
978
955
|
const parseOrdinalNumberPattern = /\d+/i;
|
|
979
956
|
const matchEraPatterns = {
|
|
@@ -1107,8 +1084,7 @@ const match = {
|
|
|
1107
1084
|
})
|
|
1108
1085
|
};
|
|
1109
1086
|
|
|
1110
|
-
|
|
1111
|
-
//#region node_modules/date-fns/locale/en-US.js
|
|
1087
|
+
// node_modules/date-fns/locale/en-US.js
|
|
1112
1088
|
/**
|
|
1113
1089
|
* @category Locales
|
|
1114
1090
|
* @summary English locale (United States).
|
|
@@ -1130,8 +1106,7 @@ const enUS = {
|
|
|
1130
1106
|
}
|
|
1131
1107
|
};
|
|
1132
1108
|
|
|
1133
|
-
|
|
1134
|
-
//#region node_modules/date-fns/getDayOfYear.js
|
|
1109
|
+
// node_modules/date-fns/getDayOfYear.js
|
|
1135
1110
|
/**
|
|
1136
1111
|
* The {@link getDayOfYear} function options.
|
|
1137
1112
|
*/
|
|
@@ -1158,8 +1133,7 @@ function getDayOfYear(date, options) {
|
|
|
1158
1133
|
return differenceInCalendarDays(_date, startOfYear(_date)) + 1;
|
|
1159
1134
|
}
|
|
1160
1135
|
|
|
1161
|
-
|
|
1162
|
-
//#region node_modules/date-fns/getISOWeek.js
|
|
1136
|
+
// node_modules/date-fns/getISOWeek.js
|
|
1163
1137
|
/**
|
|
1164
1138
|
* The {@link getISOWeek} function options.
|
|
1165
1139
|
*/
|
|
@@ -1189,8 +1163,7 @@ function getISOWeek(date, options) {
|
|
|
1189
1163
|
return Math.round(diff / millisecondsInWeek) + 1;
|
|
1190
1164
|
}
|
|
1191
1165
|
|
|
1192
|
-
|
|
1193
|
-
//#region node_modules/date-fns/getWeekYear.js
|
|
1166
|
+
// node_modules/date-fns/getWeekYear.js
|
|
1194
1167
|
/**
|
|
1195
1168
|
* The {@link getWeekYear} function options.
|
|
1196
1169
|
*/
|
|
@@ -1246,8 +1219,7 @@ function getWeekYear(date, options) {
|
|
|
1246
1219
|
else return year - 1;
|
|
1247
1220
|
}
|
|
1248
1221
|
|
|
1249
|
-
|
|
1250
|
-
//#region node_modules/date-fns/startOfWeekYear.js
|
|
1222
|
+
// node_modules/date-fns/startOfWeekYear.js
|
|
1251
1223
|
/**
|
|
1252
1224
|
* The {@link startOfWeekYear} function options.
|
|
1253
1225
|
*/
|
|
@@ -1298,8 +1270,7 @@ function startOfWeekYear(date, options) {
|
|
|
1298
1270
|
return startOfWeek(firstWeek, options);
|
|
1299
1271
|
}
|
|
1300
1272
|
|
|
1301
|
-
|
|
1302
|
-
//#region node_modules/date-fns/getWeek.js
|
|
1273
|
+
// node_modules/date-fns/getWeek.js
|
|
1303
1274
|
/**
|
|
1304
1275
|
* The {@link getWeek} function options.
|
|
1305
1276
|
*/
|
|
@@ -1343,14 +1314,12 @@ function getWeek(date, options) {
|
|
|
1343
1314
|
return Math.round(diff / millisecondsInWeek) + 1;
|
|
1344
1315
|
}
|
|
1345
1316
|
|
|
1346
|
-
|
|
1347
|
-
//#region node_modules/date-fns/_lib/addLeadingZeros.js
|
|
1317
|
+
// node_modules/date-fns/_lib/addLeadingZeros.js
|
|
1348
1318
|
function addLeadingZeros(number, targetLength) {
|
|
1349
1319
|
return (number < 0 ? "-" : "") + Math.abs(number).toString().padStart(targetLength, "0");
|
|
1350
1320
|
}
|
|
1351
1321
|
|
|
1352
|
-
|
|
1353
|
-
//#region node_modules/date-fns/_lib/format/lightFormatters.js
|
|
1322
|
+
// node_modules/date-fns/_lib/format/lightFormatters.js
|
|
1354
1323
|
const lightFormatters = {
|
|
1355
1324
|
y(date, token) {
|
|
1356
1325
|
const signedYear = date.getFullYear();
|
|
@@ -1394,8 +1363,7 @@ const lightFormatters = {
|
|
|
1394
1363
|
}
|
|
1395
1364
|
};
|
|
1396
1365
|
|
|
1397
|
-
|
|
1398
|
-
//#region node_modules/date-fns/_lib/format/formatters.js
|
|
1366
|
+
// node_modules/date-fns/_lib/format/formatters.js
|
|
1399
1367
|
const dayPeriodEnum = {
|
|
1400
1368
|
am: "am",
|
|
1401
1369
|
pm: "pm",
|
|
@@ -1811,8 +1779,7 @@ function formatTimezone(offset, delimiter = "") {
|
|
|
1811
1779
|
return sign + hours + delimiter + minutes;
|
|
1812
1780
|
}
|
|
1813
1781
|
|
|
1814
|
-
|
|
1815
|
-
//#region node_modules/date-fns/_lib/format/longFormatters.js
|
|
1782
|
+
// node_modules/date-fns/_lib/format/longFormatters.js
|
|
1816
1783
|
const dateLongFormatter = (pattern, formatLong) => {
|
|
1817
1784
|
switch (pattern) {
|
|
1818
1785
|
case "P": return formatLong.date({ width: "short" });
|
|
@@ -1854,8 +1821,7 @@ const longFormatters = {
|
|
|
1854
1821
|
P: dateTimeLongFormatter
|
|
1855
1822
|
};
|
|
1856
1823
|
|
|
1857
|
-
|
|
1858
|
-
//#region node_modules/date-fns/_lib/protectedTokens.js
|
|
1824
|
+
// node_modules/date-fns/_lib/protectedTokens.js
|
|
1859
1825
|
const dayOfYearTokenRE = /^D+$/;
|
|
1860
1826
|
const weekYearTokenRE = /^Y+$/;
|
|
1861
1827
|
const throwTokens = [
|
|
@@ -1880,8 +1846,7 @@ function message(token, format, input) {
|
|
|
1880
1846
|
return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1881
1847
|
}
|
|
1882
1848
|
|
|
1883
|
-
|
|
1884
|
-
//#region node_modules/date-fns/format.js
|
|
1849
|
+
// node_modules/date-fns/format.js
|
|
1885
1850
|
const formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
1886
1851
|
const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
1887
1852
|
const escapedStringRegExp = /^'([^]*?)'?$/;
|
|
@@ -2228,12 +2193,10 @@ function cleanEscapedString(input) {
|
|
|
2228
2193
|
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
2229
2194
|
}
|
|
2230
2195
|
|
|
2231
|
-
|
|
2232
|
-
//#region src/elements-experimental/journey-summary/journey-summary.scss?inline
|
|
2196
|
+
// src/elements-experimental/journey-summary/journey-summary.scss?inline
|
|
2233
2197
|
var journey_summary_default = ":host {\n display: block;\n}\n\n.sbb-journey-summary {\n --sbb-text-font-size: var(--sbb-text-font-size-s);\n font-family: var(--sbb-typo-font-family);\n font-weight: normal;\n line-height: var(--sbb-typo-line-height-text);\n letter-spacing: var(--sbb-letter-spacing-text);\n font-size: var(--sbb-text-font-size);\n color: var(--sbb-color-4);\n display: flex;\n flex-direction: column;\n}\n\n.sbb-journey-summary__via-block {\n display: flex;\n}\n\n.sbb-journey-summary__vias {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin-block: 0;\n padding-inline-start: var(--sbb-spacing-fixed-1x);\n}\n\n.sbb-journey-summary__date {\n margin-block-end: var(--sbb-spacing-fixed-2x);\n}\n\n.sbb-journey-summary__via {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.sbb-journey-summary__divider {\n margin-block: var(--sbb-spacing-fixed-6x);\n}\n\nul li {\n list-style: none;\n display: inline;\n}\n";
|
|
2234
2198
|
|
|
2235
|
-
|
|
2236
|
-
//#region src/elements-experimental/journey-summary/journey-summary.component.ts
|
|
2199
|
+
// src/elements-experimental/journey-summary/journey-summary.component.ts
|
|
2237
2200
|
/**
|
|
2238
2201
|
* It displays journey's information.
|
|
2239
2202
|
*
|
|
@@ -2558,5 +2521,4 @@ let SbbJourneySummaryElement = (() => {
|
|
|
2558
2521
|
};
|
|
2559
2522
|
})();
|
|
2560
2523
|
|
|
2561
|
-
//#endregion
|
|
2562
2524
|
export { SbbJourneySummaryElement };
|
|
@@ -2,8 +2,6 @@ import { SbbPearlChainLegacyElement } from "./pearl-chain-legacy.pure.js";
|
|
|
2
2
|
|
|
3
3
|
export * from "./pearl-chain-legacy.pure.js"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/elements-experimental/pearl-chain-legacy.ts
|
|
6
6
|
/** @entrypoint */
|
|
7
7
|
SbbPearlChainLegacyElement.define();
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
@@ -5,7 +5,7 @@ import { property } from "lit/decorators.js";
|
|
|
5
5
|
import { styleMap } from "lit/directives/style-map.js";
|
|
6
6
|
import { isRideLeg, removeTimezoneFromISOTimeString } from "./core.js";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// node_modules/date-fns/constants.js
|
|
9
9
|
/**
|
|
10
10
|
* @constant
|
|
11
11
|
* @name maxTime
|
|
@@ -55,8 +55,7 @@ const millisecondsInMinute = 6e4;
|
|
|
55
55
|
*/
|
|
56
56
|
const constructFromSymbol = Symbol.for("constructDateFrom");
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
//#region node_modules/date-fns/constructFrom.js
|
|
58
|
+
// node_modules/date-fns/constructFrom.js
|
|
60
59
|
/**
|
|
61
60
|
* @name constructFrom
|
|
62
61
|
* @category Generic Helpers
|
|
@@ -99,8 +98,7 @@ function constructFrom(date, value) {
|
|
|
99
98
|
return new Date(value);
|
|
100
99
|
}
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
//#region node_modules/date-fns/toDate.js
|
|
101
|
+
// node_modules/date-fns/toDate.js
|
|
104
102
|
/**
|
|
105
103
|
* @name toDate
|
|
106
104
|
* @category Common Helpers
|
|
@@ -143,8 +141,7 @@ function toDate(argument, context) {
|
|
|
143
141
|
return constructFrom(context || argument, argument);
|
|
144
142
|
}
|
|
145
143
|
|
|
146
|
-
|
|
147
|
-
//#region node_modules/date-fns/addMinutes.js
|
|
144
|
+
// node_modules/date-fns/addMinutes.js
|
|
148
145
|
/**
|
|
149
146
|
* The {@link addMinutes} function options.
|
|
150
147
|
*/
|
|
@@ -176,8 +173,7 @@ function addMinutes(date, amount, options) {
|
|
|
176
173
|
return _date;
|
|
177
174
|
}
|
|
178
175
|
|
|
179
|
-
|
|
180
|
-
//#region node_modules/date-fns/_lib/getRoundingMethod.js
|
|
176
|
+
// node_modules/date-fns/_lib/getRoundingMethod.js
|
|
181
177
|
function getRoundingMethod(method) {
|
|
182
178
|
return (number) => {
|
|
183
179
|
const result = (method ? Math[method] : Math.trunc)(number);
|
|
@@ -185,8 +181,7 @@ function getRoundingMethod(method) {
|
|
|
185
181
|
};
|
|
186
182
|
}
|
|
187
183
|
|
|
188
|
-
|
|
189
|
-
//#region node_modules/date-fns/differenceInMilliseconds.js
|
|
184
|
+
// node_modules/date-fns/differenceInMilliseconds.js
|
|
190
185
|
/**
|
|
191
186
|
* @name differenceInMilliseconds
|
|
192
187
|
* @category Millisecond Helpers
|
|
@@ -213,8 +208,7 @@ function differenceInMilliseconds(laterDate, earlierDate) {
|
|
|
213
208
|
return +toDate(laterDate) - +toDate(earlierDate);
|
|
214
209
|
}
|
|
215
210
|
|
|
216
|
-
|
|
217
|
-
//#region node_modules/date-fns/differenceInMinutes.js
|
|
211
|
+
// node_modules/date-fns/differenceInMinutes.js
|
|
218
212
|
/**
|
|
219
213
|
* The {@link differenceInMinutes} function options.
|
|
220
214
|
*/
|
|
@@ -253,8 +247,7 @@ function differenceInMinutes(dateLeft, dateRight, options) {
|
|
|
253
247
|
return getRoundingMethod(options?.roundingMethod)(diff);
|
|
254
248
|
}
|
|
255
249
|
|
|
256
|
-
|
|
257
|
-
//#region node_modules/date-fns/isAfter.js
|
|
250
|
+
// node_modules/date-fns/isAfter.js
|
|
258
251
|
/**
|
|
259
252
|
* @name isAfter
|
|
260
253
|
* @category Common Helpers
|
|
@@ -277,8 +270,7 @@ function isAfter(date, dateToCompare) {
|
|
|
277
270
|
return +toDate(date) > +toDate(dateToCompare);
|
|
278
271
|
}
|
|
279
272
|
|
|
280
|
-
|
|
281
|
-
//#region node_modules/date-fns/isBefore.js
|
|
273
|
+
// node_modules/date-fns/isBefore.js
|
|
282
274
|
/**
|
|
283
275
|
* @name isBefore
|
|
284
276
|
* @category Common Helpers
|
|
@@ -301,12 +293,10 @@ function isBefore(date, dateToCompare) {
|
|
|
301
293
|
return +toDate(date) < +toDate(dateToCompare);
|
|
302
294
|
}
|
|
303
295
|
|
|
304
|
-
|
|
305
|
-
//#region src/elements-experimental/pearl-chain-legacy/pearl-chain-legacy.scss?inline
|
|
296
|
+
// src/elements-experimental/pearl-chain-legacy/pearl-chain-legacy.scss?inline
|
|
306
297
|
var pearl_chain_legacy_default = ":host {\n --sbb-pearl-chain-height: var(--sbb-border-width-2x);\n --sbb-pearl-chain-spacing-small: 0.125rem;\n --sbb-pearl-chain-color: var(--sbb-pearl-chain-bullet-color);\n --sbb-pearl-chain-color-disruption: var(--sbb-pearl-chain-bullet-color-disruption);\n --sbb-pearl-chain-color-past: var(--sbb-pearl-chain-bullet-color-past);\n --sbb-pearl-chain-leg-width: 100%;\n display: block;\n --sbb-pearl-chain-position-color: var(--sbb-color-primary);\n --sbb-pearl-chain-bullet-size-start-end: 0.625rem;\n --sbb-pearl-chain-bullet-size-stop: 0.5rem;\n --sbb-pearl-chain-bullet-color: var(--sbb-background-color-3-inverted);\n --sbb-pearl-chain-bullet-color-past: var(--sbb-color-metal);\n --sbb-pearl-chain-bullet-color-past: light-dark(var(--sbb-color-metal), var(--sbb-color-granite));\n --sbb-pearl-chain-bullet-color-irrelevant: var(--sbb-color-metal);\n --sbb-pearl-chain-bullet-color-irrelevant: light-dark(\n var(--sbb-color-metal),\n var(--sbb-color-granite)\n );\n --sbb-pearl-chain-bullet-color-disruption: var(--sbb-color-error);\n --sbb-pearl-chain-bullet-border-width: var(--sbb-border-width-2x);\n --sbb-pearl-chain-bullet-animation-duration: 1920ms;\n --sbb-pearl-chain-bullet-animation-easing: ease-out;\n --sbb-pearl-chain-bullet-crossed-width: 0.88375rem;\n --sbb-pearl-chain-bullet-crossed-height: 0.21875rem;\n --sbb-pearl-chain-bullet-crossed-border-width: 0.09375rem;\n}\n\n.sbb-pearl-chain {\n position: relative;\n display: flex;\n justify-content: space-between;\n flex-wrap: nowrap;\n color: var(--sbb-pearl-chain-color);\n width: 100%;\n padding-block: calc((var(--sbb-pearl-chain-bullet-size-start-end) - var(--sbb-pearl-chain-height)) / 2);\n padding-inline-end: var(--sbb-pearl-chain-bullet-size-start-end);\n}\n\n.sbb-pearl-chain__bullet {\n min-height: var(--sbb-pearl-chain-bullet-size-start-end);\n min-width: var(--sbb-pearl-chain-bullet-size-start-end);\n height: var(--sbb-pearl-chain-bullet-size-start-end);\n width: var(--sbb-pearl-chain-bullet-size-start-end);\n background: var(--sbb-pearl-chain-bullet-color);\n color: var(--sbb-pearl-chain-bullet-color);\n border-color: var(--sbb-pearl-chain-bullet-color);\n border-radius: 100%;\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__bullet {\n --sbb-pearl-chain-bullet-color: CanvasText;\n }\n}\n.sbb-pearl-chain__bullet {\n content: \"\";\n position: absolute;\n background-color: currentcolor;\n inset-block-start: 0;\n z-index: 3;\n}\n\n.sbb-pearl-chain__bullet:first-of-type {\n inset-inline-start: 0;\n}\n\n.sbb-pearl-chain__bullet:last-of-type {\n inset-inline-end: 0;\n}\n\n.sbb-pearl-chain__leg {\n flex-shrink: 0;\n flex-grow: 0;\n position: relative;\n height: var(--sbb-pearl-chain-height);\n border-inline-end: var(--sbb-pearl-chain-spacing-small) solid Canvas;\n background-color: currentcolor;\n width: var(--sbb-pearl-chain-leg-width);\n display: flex;\n align-items: center;\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__leg {\n background-color: CanvasText;\n }\n .sbb-pearl-chain--past .sbb-pearl-chain__leg {\n background-color: GrayText;\n }\n}\n\n.sbb-pearl-chain__leg:last-of-type {\n border: none;\n}\n\n.sbb-pearl-chain__stop {\n position: relative;\n z-index: 2;\n background: var(--sbb-pearl-chain-bullet-color);\n color: var(--sbb-pearl-chain-bullet-color);\n border-color: var(--sbb-pearl-chain-bullet-color);\n border-radius: 100%;\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__stop {\n --sbb-pearl-chain-bullet-color: CanvasText;\n }\n}\n.sbb-pearl-chain__stop {\n min-height: var(--sbb-pearl-chain-bullet-size-stop);\n min-width: var(--sbb-pearl-chain-bullet-size-stop);\n height: var(--sbb-pearl-chain-bullet-size-stop);\n width: var(--sbb-pearl-chain-bullet-size-stop);\n border: var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;\n background: Canvas;\n}\n\n.sbb-pearl-chain__bullet--future {\n background: var(--sbb-pearl-chain-bullet-color);\n color: var(--sbb-pearl-chain-bullet-color);\n border-color: var(--sbb-pearl-chain-bullet-color);\n border-radius: 100%;\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__bullet--future {\n --sbb-pearl-chain-bullet-color: CanvasText;\n }\n}\n\n.sbb-pearl-chain__leg--past,\n.sbb-pearl-chain--past,\n.sbb-pearl-chain__leg--past::after,\n.sbb-pearl-chain__leg--progress::after,\n.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,\n.sbb-pearl-chain--progress,\n.sbb-pearl-chain__bullet--past {\n color: var(--sbb-pearl-chain-color-past);\n --sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__leg--past,\n .sbb-pearl-chain--past,\n .sbb-pearl-chain__leg--past::after,\n .sbb-pearl-chain__leg--progress::after,\n .sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,\n .sbb-pearl-chain--progress,\n .sbb-pearl-chain__bullet--past {\n --sbb-pearl-chain-bullet-color: GrayText !important;\n }\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__leg--past,\n .sbb-pearl-chain--past,\n .sbb-pearl-chain__leg--past::after,\n .sbb-pearl-chain__leg--progress::after,\n .sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,\n .sbb-pearl-chain--progress,\n .sbb-pearl-chain__bullet--past {\n background-color: GrayText !important;\n }\n}\n\n.sbb-pearl-chain__bullet--progress {\n background: var(--sbb-pearl-chain-bullet-color);\n --sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__bullet--progress {\n --sbb-pearl-chain-bullet-color: GrayText !important;\n }\n}\n\n.sbb-pearl-chain__bullet--departure-disruption,\n.sbb-pearl-chain--arrival-disruption,\n.sbb-pearl-chain--departure-disruption,\n.sbb-pearl-chain__leg--disruption {\n color: var(--sbb-pearl-chain-color-disruption);\n --sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__bullet--departure-disruption,\n .sbb-pearl-chain--arrival-disruption,\n .sbb-pearl-chain--departure-disruption,\n .sbb-pearl-chain__leg--disruption {\n --sbb-pearl-chain-bullet-color: Highlight;\n }\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__bullet--departure-disruption,\n .sbb-pearl-chain--arrival-disruption,\n .sbb-pearl-chain--departure-disruption,\n .sbb-pearl-chain__leg--disruption {\n color: Highlight;\n background: Highlight;\n }\n}\n\n.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop {\n --sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop {\n --sbb-pearl-chain-bullet-color: Highlight;\n }\n}\n\n.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop {\n --sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__leg--past .sbb-pearl-chain__stop {\n --sbb-pearl-chain-bullet-color: GrayText !important;\n }\n}\n\n.sbb-pearl-chain__leg--cancelled-expected::after {\n background-color: unset;\n background-image: linear-gradient(to right, currentcolor 0%, currentcolor 50%, Canvas 50%);\n background-repeat: repeat-x;\n background-size: calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);\n inset-inline-end: var(--sbb-pearl-chain-height);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__leg--cancelled-expected::after {\n background: unset;\n border-block-start: 0.0625rem dashed Highlight;\n transform: translateY(0.0625rem);\n }\n}\n\n.sbb-pearl-chain__leg--disruption::after {\n background-color: unset;\n background-image: linear-gradient(to right, currentcolor 0%, currentcolor 50%, Canvas 50%);\n background-repeat: repeat-x;\n background-size: calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);\n inset-inline-end: var(--sbb-pearl-chain-height);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__leg--disruption::after {\n background: unset;\n border-block-start: 0.0625rem dashed Highlight;\n transform: translateY(0.0625rem);\n }\n}\n\n.sbb-pearl-chain__leg--skipped {\n color: var(--sbb-pearl-chain-color-disruption);\n}\n.sbb-pearl-chain__leg--skipped::after {\n background-color: unset;\n background-image: linear-gradient(to right, currentcolor 0%, currentcolor 50%, Canvas 50%);\n background-repeat: repeat-x;\n background-size: calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);\n inset-inline-end: var(--sbb-pearl-chain-height);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__leg--skipped::after {\n background: unset;\n border-block-start: 0.0625rem dashed Highlight;\n transform: translateY(0.0625rem);\n }\n}\n\n.sbb-pearl-chain__stop--departure-skipped {\n min-height: var(--sbb-pearl-chain-bullet-size-stop);\n min-width: var(--sbb-pearl-chain-bullet-size-stop);\n height: var(--sbb-pearl-chain-bullet-size-stop);\n width: var(--sbb-pearl-chain-bullet-size-stop);\n border: var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;\n background: Canvas;\n border: var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;\n background: Canvas;\n}\n.sbb-pearl-chain__stop--departure-skipped::before {\n content: \"\";\n position: absolute;\n inset-block-start: 50%;\n inset-inline-start: 50%;\n transform: translate(-50%, -50%) rotate(45deg);\n border-block-start: var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;\n background: var(--sbb-pearl-chain-bullet-color-disruption);\n height: var(--sbb-pearl-chain-bullet-crossed-height);\n width: var(--sbb-pearl-chain-bullet-crossed-width);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__stop--departure-skipped::before {\n background: Highlight;\n }\n}\n\n.sbb-pearl-chain--arrival-skipped,\n.sbb-pearl-chain--departure-skipped {\n min-height: var(--sbb-pearl-chain-bullet-size-start-end);\n min-width: var(--sbb-pearl-chain-bullet-size-start-end);\n height: var(--sbb-pearl-chain-bullet-size-start-end);\n width: var(--sbb-pearl-chain-bullet-size-start-end);\n border: var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;\n background: Canvas;\n}\n.sbb-pearl-chain--arrival-skipped::before,\n.sbb-pearl-chain--departure-skipped::before {\n content: \"\";\n position: absolute;\n inset-block-start: 50%;\n inset-inline-start: 50%;\n transform: translate(-50%, -50%) rotate(45deg);\n border-block-start: var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;\n background: var(--sbb-pearl-chain-bullet-color-disruption);\n height: var(--sbb-pearl-chain-bullet-crossed-height);\n width: var(--sbb-pearl-chain-bullet-crossed-width);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain--arrival-skipped::before,\n .sbb-pearl-chain--departure-skipped::before {\n background: Highlight;\n }\n}\n\n.sbb-pearl-chain__leg::after {\n content: \"\";\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n background-color: currentcolor;\n border-radius: var(--sbb-pearl-chain-height);\n z-index: 1;\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__leg::after {\n background-color: CanvasText;\n }\n .sbb-pearl-chain--past .sbb-pearl-chain__leg::after {\n background-color: GrayText;\n }\n}\n\n.sbb-pearl-chain__leg:last-of-type::after {\n inset-inline-end: calc(-1 * var(--sbb-pearl-chain-height));\n}\n\n.sbb-pearl-chain__leg--progress::after {\n background-color: var(--sbb-pearl-chain-color-past);\n width: var(--sbb-pearl-chain-leg-status);\n}\n\n.sbb-pearl-chain__position {\n min-height: var(--sbb-pearl-chain-bullet-size-start-end);\n min-width: var(--sbb-pearl-chain-bullet-size-start-end);\n height: var(--sbb-pearl-chain-bullet-size-start-end);\n width: var(--sbb-pearl-chain-bullet-size-start-end);\n background: var(--sbb-pearl-chain-bullet-color);\n color: var(--sbb-pearl-chain-bullet-color);\n border-color: var(--sbb-pearl-chain-bullet-color);\n border-radius: 100%;\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__position {\n --sbb-pearl-chain-bullet-color: CanvasText;\n }\n}\n.sbb-pearl-chain__position {\n --sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-position-color);\n}\n@media (forced-colors: active) {\n .sbb-pearl-chain__position {\n --sbb-pearl-chain-position-color: Highlight;\n }\n}\n@keyframes pearl-chain-bullet-position-pulse {\n 0% {\n box-shadow: 0 0 0 0 var(--sbb-pearl-chain-position-color);\n }\n 25% {\n box-shadow: 0 0 0 0 var(--sbb-pearl-chain-position-color);\n }\n 50% {\n box-shadow: 0 0 0 0.1875rem color-mix(in srgb, var(--sbb-pearl-chain-position-color) 20%, transparent);\n }\n 100% {\n box-shadow: 0 0 0 0 var(--sbb-pearl-chain-position-color);\n }\n}\n.sbb-pearl-chain__position {\n animation: pearl-chain-bullet-position-pulse var(--sbb-pearl-chain-bullet-animation-duration) var(--sbb-pearl-chain-bullet-animation-easing) infinite;\n position: absolute;\n inset-block-start: -200%;\n z-index: 4;\n inset-inline-start: var(--sbb-pearl-chain-status-position);\n}\n\n.sbb-pearl-chain__position--no-animation {\n animation: unset;\n}\n";
|
|
307
298
|
|
|
308
|
-
|
|
309
|
-
//#region src/elements-experimental/pearl-chain-legacy/pearl-chain-legacy.component.ts
|
|
299
|
+
// src/elements-experimental/pearl-chain-legacy/pearl-chain-legacy.component.ts
|
|
310
300
|
/**
|
|
311
301
|
* It visually displays journey information.
|
|
312
302
|
* @deprecated Use `sbb-pearl-chain` instead.
|
|
@@ -567,5 +557,4 @@ let SbbPearlChainLegacyElement = (() => {
|
|
|
567
557
|
};
|
|
568
558
|
})();
|
|
569
559
|
|
|
570
|
-
//#endregion
|
|
571
560
|
export { SbbPearlChainLegacyElement };
|
|
@@ -2,8 +2,6 @@ import { SbbPearlChainTimeElement } from "./pearl-chain-time.pure.js";
|
|
|
2
2
|
|
|
3
3
|
export * from "./pearl-chain-time.pure.js"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/elements-experimental/pearl-chain-time.ts
|
|
6
6
|
/** @entrypoint */
|
|
7
7
|
SbbPearlChainTimeElement.define();
|
|
8
|
-
|
|
9
|
-
//#endregion
|