@aurodesignsystem-dev/auro-formkit 0.0.0-pr1489.1 → 0.0.0-pr1489.10
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/components/checkbox/demo/customize.min.js +249 -125
- package/components/checkbox/demo/getting-started.min.js +249 -125
- package/components/checkbox/demo/index.min.js +249 -125
- package/components/checkbox/demo/styles.min.css +1 -1
- package/components/checkbox/dist/index.js +249 -125
- package/components/checkbox/dist/registered.js +249 -125
- package/components/combobox/demo/customize.min.js +523 -259
- package/components/combobox/demo/getting-started.min.js +523 -259
- package/components/combobox/demo/index.min.js +523 -259
- package/components/combobox/demo/styles.min.css +1 -1
- package/components/combobox/dist/index.js +523 -259
- package/components/combobox/dist/registered.js +523 -259
- package/components/counter/demo/customize.min.js +271 -131
- package/components/counter/demo/index.min.js +271 -131
- package/components/counter/demo/styles.min.css +1 -1
- package/components/counter/dist/index.js +488 -137
- package/components/counter/dist/registered.js +249 -125
- package/components/datepicker/demo/accessibility.md +12 -9
- package/components/datepicker/demo/api.md +1 -1
- package/components/datepicker/demo/customize.md +4 -0
- package/components/datepicker/demo/customize.min.js +1638 -654
- package/components/datepicker/demo/index.md +35 -5
- package/components/datepicker/demo/index.min.js +1654 -659
- package/components/datepicker/demo/keyboard-behavior.md +16 -16
- package/components/datepicker/demo/styles.min.css +1 -1
- package/components/datepicker/demo/voiceover.md +5 -3
- package/components/datepicker/demo/why-datepicker.md +2 -2
- package/components/datepicker/dist/index.js +1642 -658
- package/components/datepicker/dist/registered.js +1642 -658
- package/components/datepicker/dist/src/auro-calendar-cell.d.ts +52 -17
- package/components/datepicker/dist/src/auro-calendar-month.d.ts +12 -4
- package/components/datepicker/dist/src/auro-calendar.d.ts +161 -8
- package/components/datepicker/dist/src/auro-datepicker.d.ts +77 -79
- package/components/dropdown/demo/customize.min.js +22 -6
- package/components/dropdown/demo/getting-started.min.js +22 -6
- package/components/dropdown/demo/index.min.js +22 -6
- package/components/dropdown/demo/styles.min.css +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +3 -2
- package/components/dropdown/dist/index.js +22 -6
- package/components/dropdown/dist/registered.js +22 -6
- package/components/form/demo/customize.min.js +3731 -1831
- package/components/form/demo/getting-started.min.js +3731 -1831
- package/components/form/demo/index.min.js +3731 -1831
- package/components/form/demo/registerDemoDeps.min.js +3727 -1827
- package/components/form/demo/styles.min.css +1 -1
- package/components/input/demo/customize.min.js +249 -125
- package/components/input/demo/getting-started.min.js +249 -125
- package/components/input/demo/index.min.js +249 -125
- package/components/input/demo/styles.min.css +1 -1
- package/components/input/dist/index.js +249 -125
- package/components/input/dist/registered.js +249 -125
- package/components/menu/demo/styles.min.css +1 -1
- package/components/radio/demo/customize.min.js +249 -125
- package/components/radio/demo/getting-started.min.js +249 -125
- package/components/radio/demo/index.min.js +249 -125
- package/components/radio/demo/styles.min.css +1 -1
- package/components/radio/dist/index.js +249 -125
- package/components/radio/dist/registered.js +249 -125
- package/components/select/demo/customize.min.js +271 -131
- package/components/select/demo/getting-started.min.js +271 -131
- package/components/select/demo/index.min.js +271 -131
- package/components/select/demo/styles.min.css +1 -1
- package/components/select/dist/index.js +271 -131
- package/components/select/dist/registered.js +271 -131
- package/custom-elements.json +500 -178
- package/package.json +8 -8
|
@@ -4,7 +4,6 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import 'lit-html';
|
|
6
6
|
import 'lit-html/directives/unsafe-html.js';
|
|
7
|
-
import { AuroHelpText } from '@aurodesignsystem/auro-helptext';
|
|
8
7
|
import { AuroDropdown } from '@aurodesignsystem/auro-dropdown';
|
|
9
8
|
|
|
10
9
|
var tokens = css`:host(:not([ondark])),:host(:not([appearance=inverse])){--ds-auro-counter-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-counter-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-counter-outline-color: transparent;--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15))}:host([ondark]),:host([appearance=inverse]){--ds-auro-counter-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-counter-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-counter-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-counter-outline-color: transparent;--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-divider-color: var(--ds-basic-color-border-divider-inverse, rgba(255, 255, 255, 0.4))}`;
|
|
@@ -77,7 +76,7 @@ let l$1 = class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[
|
|
|
77
76
|
|
|
78
77
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
79
78
|
|
|
80
|
-
let AuroLibraryRuntimeUtils$
|
|
79
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
81
80
|
|
|
82
81
|
/* eslint-disable jsdoc/require-param */
|
|
83
82
|
|
|
@@ -183,7 +182,7 @@ class AuroCounterButton extends T$1 {
|
|
|
183
182
|
*
|
|
184
183
|
*/
|
|
185
184
|
static register(name = "auro-counter-button") {
|
|
186
|
-
AuroLibraryRuntimeUtils$
|
|
185
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroCounterButton);
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
188
|
|
|
@@ -259,109 +258,236 @@ let p$2 = class p{registerComponent(t,a){customElements.get(t)||customElements.d
|
|
|
259
258
|
|
|
260
259
|
var iconVersion$1 = '9.1.2';
|
|
261
260
|
|
|
262
|
-
|
|
261
|
+
/**
|
|
262
|
+
* @description Splits a date string into its parts according to the provided format. Does NOT validate that the result is a real calendar date — use `parseDate` when validation is required.
|
|
263
|
+
* @param {string} dateStr - Date string to parse.
|
|
264
|
+
* @param {string} format - Date format to parse.
|
|
265
|
+
* @returns {{ month?: string, day?: string, year?: string }|undefined}
|
|
266
|
+
*/
|
|
267
|
+
function getDateParts(dateStr, format) {
|
|
268
|
+
if (!dateStr) {
|
|
269
|
+
return undefined;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const formatSeparatorMatch = format.match(/[/.-]/);
|
|
273
|
+
let valueParts;
|
|
274
|
+
let formatParts;
|
|
275
|
+
|
|
276
|
+
if (formatSeparatorMatch) {
|
|
277
|
+
const separator = formatSeparatorMatch[0];
|
|
278
|
+
valueParts = dateStr.split(separator);
|
|
279
|
+
formatParts = format.split(separator);
|
|
280
|
+
} else {
|
|
281
|
+
if (dateStr.match(/[/.-]/)) {
|
|
282
|
+
throw new Error(
|
|
283
|
+
"AuroDatepickerUtilities | parseDate: Date string has no separators",
|
|
284
|
+
);
|
|
285
|
+
}
|
|
263
286
|
|
|
264
|
-
|
|
287
|
+
if (dateStr.length !== format.length) {
|
|
288
|
+
throw new Error(
|
|
289
|
+
"AuroDatepickerUtilities | parseDate: Date string and format length do not match",
|
|
290
|
+
);
|
|
291
|
+
}
|
|
265
292
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
* @param {string} format - Date format to parse.
|
|
270
|
-
* @returns {Object<key["month" | "day" | "year"]: number>|undefined}
|
|
271
|
-
*/
|
|
272
|
-
this.parseDate = (dateStr, format = 'mm/dd/yyyy') => {
|
|
293
|
+
valueParts = [dateStr];
|
|
294
|
+
formatParts = [format];
|
|
295
|
+
}
|
|
273
296
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
297
|
+
if (valueParts.length !== formatParts.length) {
|
|
298
|
+
throw new Error(
|
|
299
|
+
`AuroDatepickerUtilities | parseDate: Date string and format do not match : ${dateStr} vs ${format}`,
|
|
300
|
+
);
|
|
301
|
+
}
|
|
278
302
|
|
|
279
|
-
|
|
280
|
-
|
|
303
|
+
const result = formatParts.reduce((acc, part, index) => {
|
|
304
|
+
const value = valueParts[index];
|
|
281
305
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
306
|
+
if (/m/iu.test(part) && part.length === value.length) {
|
|
307
|
+
acc.month = value;
|
|
308
|
+
} else if (/d/iu.test(part) && part.length === value.length) {
|
|
309
|
+
acc.day = value;
|
|
310
|
+
} else if (/y/iu.test(part) && part.length === value.length) {
|
|
311
|
+
acc.year = value;
|
|
312
|
+
}
|
|
285
313
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
throw new Error('AuroDatepickerUtilities | parseDate: Date string and format length do not match');
|
|
289
|
-
}
|
|
314
|
+
return acc;
|
|
315
|
+
}, {});
|
|
290
316
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
317
|
+
if (!result.month && !result.day && !result.year) {
|
|
318
|
+
throw new Error(
|
|
319
|
+
"AuroDatepickerUtilities | parseDate: Unable to parse date string",
|
|
320
|
+
);
|
|
321
|
+
}
|
|
294
322
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
} else if ((/d/iu).test(part)) {
|
|
298
|
-
acc.day = value;
|
|
299
|
-
} else if ((/y/iu).test(part)) {
|
|
300
|
-
acc.year = value;
|
|
301
|
-
}
|
|
323
|
+
return result;
|
|
324
|
+
}
|
|
302
325
|
|
|
303
|
-
|
|
304
|
-
|
|
326
|
+
function isCalendarDate(year, month, day) {
|
|
327
|
+
let yearNumber = Number(year);
|
|
328
|
+
const monthNumber = Number(month);
|
|
329
|
+
const dayNumber = Number(day);
|
|
305
330
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
331
|
+
if (
|
|
332
|
+
!Number.isInteger(yearNumber) ||
|
|
333
|
+
!Number.isInteger(monthNumber) ||
|
|
334
|
+
!Number.isInteger(dayNumber)
|
|
335
|
+
) {
|
|
336
|
+
return false;
|
|
337
|
+
}
|
|
310
338
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
339
|
+
// Handle 2-digit years by converting them to 4-digit years based on a cutoff. This allows for parsing of 2-digit year formats while still validating the resulting date.
|
|
340
|
+
if (yearNumber < 100 && yearNumber >= 50) {
|
|
341
|
+
yearNumber += 1900;
|
|
342
|
+
} else if (yearNumber < 50) {
|
|
343
|
+
yearNumber += 2000;
|
|
344
|
+
}
|
|
314
345
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
* @param {Object} date - Date to convert to string.
|
|
318
|
-
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
319
|
-
* @returns {String} Returns the date as a string.
|
|
320
|
-
*/
|
|
321
|
-
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
322
|
-
year: "numeric",
|
|
323
|
-
month: "2-digit",
|
|
324
|
-
day: "2-digit",
|
|
325
|
-
});
|
|
346
|
+
const stringified = `${String(yearNumber).padStart(4, "0")}-${String(monthNumber).padStart(2, "0")}-${String(dayNumber).padStart(2, "0")}`;
|
|
347
|
+
const date = new Date(stringified.replace(/[.-]/g, "/"));
|
|
326
348
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
* @returns {Boolean}
|
|
332
|
-
*/
|
|
333
|
-
this.toNorthAmericanFormat = (dateStr, format) => {
|
|
349
|
+
return (
|
|
350
|
+
!Number.isNaN(date.getTime()) && toISOFormatString(date) === stringified
|
|
351
|
+
);
|
|
352
|
+
}
|
|
334
353
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
354
|
+
/**
|
|
355
|
+
* @description Parses a date string into its components and validates that the result is a real calendar date. Use `getDateParts` instead when raw splitting without validation is needed (e.g. for in-progress input).
|
|
356
|
+
*
|
|
357
|
+
* Partial formats are supported: components absent from `format` default to `year → "0"`,
|
|
358
|
+
* `month → "01"`, `day → "01"` for calendar validation only. The returned object contains
|
|
359
|
+
* only the fields actually present in the format string — missing fields are never injected.
|
|
360
|
+
* @param {string} dateStr - Date string to parse.
|
|
361
|
+
* @param {string} format - Date format to parse.
|
|
362
|
+
* @returns {{ month?: string, day?: string, year?: string }|undefined}
|
|
363
|
+
* @throws {Error} Throws when the parsed result does not represent a valid calendar date.
|
|
364
|
+
*/
|
|
365
|
+
function parseDate(dateStr, format = "mm/dd/yyyy") {
|
|
366
|
+
if (!dateStr || !format) {
|
|
367
|
+
return undefined;
|
|
368
|
+
}
|
|
369
|
+
const result = getDateParts(dateStr.trim(), format);
|
|
338
370
|
|
|
339
|
-
|
|
371
|
+
if (!result) {
|
|
372
|
+
return undefined;
|
|
373
|
+
}
|
|
340
374
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
375
|
+
const lowerFormat = format.toLowerCase();
|
|
376
|
+
const year = lowerFormat.includes("yy") ? result.year : "0";
|
|
377
|
+
const month = lowerFormat.includes("mm") ? result.month : "01";
|
|
378
|
+
const day = lowerFormat.includes("dd") ? result.day : "01";
|
|
344
379
|
|
|
345
|
-
|
|
380
|
+
if (isCalendarDate(year, month, day)) {
|
|
381
|
+
return result;
|
|
382
|
+
}
|
|
346
383
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
384
|
+
throw new Error(
|
|
385
|
+
`AuroDatepickerUtilities | parseDate: Date string is not a valid date ${JSON.stringify(result)} with format ${format}`,
|
|
386
|
+
);
|
|
387
|
+
}
|
|
351
388
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
389
|
+
/**
|
|
390
|
+
* Convert a date object to string format.
|
|
391
|
+
* @param {Object} date - Date to convert to string.
|
|
392
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
393
|
+
* @returns {String} Returns the date as a string.
|
|
394
|
+
*/
|
|
395
|
+
function getDateAsString(date, locale = undefined) {
|
|
396
|
+
return date.toLocaleDateString(locale, {
|
|
397
|
+
year: "numeric",
|
|
398
|
+
month: "2-digit",
|
|
399
|
+
day: "2-digit",
|
|
400
|
+
});
|
|
401
|
+
}
|
|
355
402
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
403
|
+
/**
|
|
404
|
+
* Converts a date string to a North American date format.
|
|
405
|
+
* @param {String} dateStr - Date to validate.
|
|
406
|
+
* @param {String} format - Date format to validate against.
|
|
407
|
+
* @returns {String}
|
|
408
|
+
*/
|
|
409
|
+
function toNorthAmericanFormat$1(dateStr, format) {
|
|
410
|
+
if (format === "mm/dd/yyyy") {
|
|
411
|
+
return dateStr;
|
|
412
|
+
}
|
|
359
413
|
|
|
360
|
-
|
|
361
|
-
|
|
414
|
+
const parsedDate = parseDate(dateStr, format);
|
|
415
|
+
|
|
416
|
+
if (!parsedDate) {
|
|
417
|
+
throw new Error(
|
|
418
|
+
"AuroDatepickerUtilities | toNorthAmericanFormat: Unable to parse date string",
|
|
419
|
+
);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
const { month, day, year } = parsedDate;
|
|
423
|
+
|
|
424
|
+
return [month, day, year].filter(Boolean).join("/");
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Validates that a date string matches the provided format and represents a real calendar date.
|
|
429
|
+
*
|
|
430
|
+
* @param {string} dateStr - Date string to validate.
|
|
431
|
+
* @param {string} [format="yyyy-mm-dd"] - Format of the date string.
|
|
432
|
+
* @returns {boolean} True when the date string is valid for the provided format, otherwise false.
|
|
433
|
+
*/
|
|
434
|
+
function isValidDate(dateStr, format = "yyyy-mm-dd") {
|
|
435
|
+
try {
|
|
436
|
+
if (typeof dateStr !== "string" || !dateStr || format?.length < 8) {
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
if (parseDate(dateStr, format)) {
|
|
441
|
+
return true;
|
|
442
|
+
}
|
|
443
|
+
} catch (error) {
|
|
444
|
+
return false;
|
|
445
|
+
}
|
|
446
|
+
return false;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Converts a JavaScript Date instance to a simple ISO-like date string. This returns only the calendar date portion without any time or timezone information.
|
|
451
|
+
*
|
|
452
|
+
* @param {Date} date - Date instance to convert to an ISO-like string.
|
|
453
|
+
* @returns {string} A string in the format "yyyy-mm-dd" representing the provided date.
|
|
454
|
+
* @throws {Error} Throws an error when the input is not a valid Date instance.
|
|
455
|
+
*/
|
|
456
|
+
function toISOFormatString(date) {
|
|
457
|
+
if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
|
|
458
|
+
throw new Error(
|
|
459
|
+
"AuroDatepickerUtilities | toISOFormatString: Input must be a valid Date instance",
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
return `${String(date.getFullYear()).padStart(4, "0")}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Converts a date string into a JavaScript Date instance. This method supports ISO formatted strings and other formats that can be parsed by the formatter.
|
|
467
|
+
*
|
|
468
|
+
* @param {String} dateStr - Date string to convert into a Date object.
|
|
469
|
+
* @param {String} format - Date format used to parse the string when it is not in ISO format.
|
|
470
|
+
* @returns {Date|null} Returns a Date instance for valid input or null for non-string input.
|
|
471
|
+
* @throws {Error} Throws when parsing fails for non-ISO string input.
|
|
472
|
+
*/
|
|
473
|
+
function stringToDateInstance(dateStr, format = "yyyy-mm-dd") {
|
|
474
|
+
if (typeof dateStr !== "string") {
|
|
475
|
+
return null;
|
|
362
476
|
}
|
|
477
|
+
|
|
478
|
+
const { month, day, year } = parseDate(dateStr, format);
|
|
479
|
+
return new Date(`${year}/${month}/${day}`);
|
|
363
480
|
}
|
|
364
|
-
|
|
481
|
+
|
|
482
|
+
const dateFormatter = {
|
|
483
|
+
parseDate,
|
|
484
|
+
getDateParts,
|
|
485
|
+
getDateAsString,
|
|
486
|
+
toNorthAmericanFormat: toNorthAmericanFormat$1,
|
|
487
|
+
isValidDate,
|
|
488
|
+
toISOFormatString,
|
|
489
|
+
stringToDateInstance,
|
|
490
|
+
};
|
|
365
491
|
|
|
366
492
|
// filepath: dateConstraints.mjs
|
|
367
493
|
const DATE_UTIL_CONSTRAINTS = {
|
|
@@ -433,12 +559,11 @@ class AuroDateUtilitiesBase {
|
|
|
433
559
|
/* eslint-disable no-magic-numbers */
|
|
434
560
|
|
|
435
561
|
class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
436
|
-
|
|
437
562
|
/**
|
|
438
563
|
* Returns the current century.
|
|
439
564
|
* @returns {String} The current century.
|
|
440
565
|
*/
|
|
441
|
-
getCentury
|
|
566
|
+
getCentury() {
|
|
442
567
|
return String(new Date().getFullYear()).slice(0, 2);
|
|
443
568
|
}
|
|
444
569
|
|
|
@@ -447,14 +572,12 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
447
572
|
* @param {String} year - The year to convert to four digits.
|
|
448
573
|
* @returns {String} The four digit year.
|
|
449
574
|
*/
|
|
450
|
-
getFourDigitYear
|
|
451
|
-
|
|
575
|
+
getFourDigitYear(year) {
|
|
452
576
|
const strYear = String(year).trim();
|
|
453
577
|
return strYear.length <= 2 ? this.getCentury() + strYear : strYear;
|
|
454
578
|
}
|
|
455
579
|
|
|
456
580
|
constructor() {
|
|
457
|
-
|
|
458
581
|
super();
|
|
459
582
|
|
|
460
583
|
/**
|
|
@@ -463,7 +586,8 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
463
586
|
* @param {Object} date2 - Second date to compare.
|
|
464
587
|
* @returns {Boolean} Returns true if the dates match.
|
|
465
588
|
*/
|
|
466
|
-
this.datesMatch = (date1, date2) =>
|
|
589
|
+
this.datesMatch = (date1, date2) =>
|
|
590
|
+
new Date(date1).getTime() === new Date(date2).getTime();
|
|
467
591
|
|
|
468
592
|
/**
|
|
469
593
|
* Returns true if value passed in is a valid date.
|
|
@@ -472,53 +596,41 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
472
596
|
* @returns {Boolean}
|
|
473
597
|
*/
|
|
474
598
|
this.validDateStr = (date, format) => {
|
|
475
|
-
|
|
476
599
|
// The length we expect the date string to be
|
|
477
|
-
const dateStrLength = format
|
|
600
|
+
const dateStrLength = format?.length || 0;
|
|
478
601
|
|
|
479
602
|
// Guard Clause: Date and format are defined
|
|
480
603
|
if (typeof date === "undefined" || typeof format === "undefined") {
|
|
481
|
-
throw new Error(
|
|
604
|
+
throw new Error(
|
|
605
|
+
"AuroDatepickerUtilities | validateDateStr: Date and format are required",
|
|
606
|
+
);
|
|
482
607
|
}
|
|
483
608
|
|
|
484
609
|
// Guard Clause: Date should be of type string
|
|
485
610
|
if (typeof date !== "string") {
|
|
486
|
-
throw new Error(
|
|
611
|
+
throw new Error(
|
|
612
|
+
"AuroDatepickerUtilities | validateDateStr: Date must be a string",
|
|
613
|
+
);
|
|
487
614
|
}
|
|
488
615
|
|
|
489
616
|
// Guard Clause: Format should be of type string
|
|
490
617
|
if (typeof format !== "string") {
|
|
491
|
-
throw new Error(
|
|
618
|
+
throw new Error(
|
|
619
|
+
"AuroDatepickerUtilities | validateDateStr: Format must be a string",
|
|
620
|
+
);
|
|
492
621
|
}
|
|
493
622
|
|
|
494
623
|
// Guard Clause: Length is what we expect it to be
|
|
495
624
|
if (date.length !== dateStrLength) {
|
|
496
625
|
return false;
|
|
497
626
|
}
|
|
498
|
-
// Get a formatted date string and parse it
|
|
499
|
-
const dateParts = dateFormatter.parseDate(date, format);
|
|
500
|
-
|
|
501
|
-
// Guard Clause: Date parse succeeded
|
|
502
|
-
if (!dateParts) {
|
|
503
|
-
return false;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
// Create the expected date string based on the date parts
|
|
507
|
-
const expectedDateStr = `${dateParts.month}/${dateParts.day || "01"}/${this.getFourDigitYear(dateParts.year)}`;
|
|
508
|
-
|
|
509
|
-
// Generate a date object that we will extract a string date from to compare to the passed in date string
|
|
510
|
-
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
511
|
-
|
|
512
|
-
// Get the date string of the date object we created from the string date
|
|
513
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
514
627
|
|
|
515
|
-
//
|
|
516
|
-
|
|
628
|
+
// Get a formatted date string and parse and validate it
|
|
629
|
+
try {
|
|
630
|
+
return Boolean(dateFormatter.parseDate(date, format));
|
|
631
|
+
} catch (error) {
|
|
517
632
|
return false;
|
|
518
633
|
}
|
|
519
|
-
|
|
520
|
-
// If we passed all other checks, we can assume the date is valid
|
|
521
|
-
return true;
|
|
522
634
|
};
|
|
523
635
|
|
|
524
636
|
/**
|
|
@@ -528,10 +640,11 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
528
640
|
* @returns {boolean}
|
|
529
641
|
*/
|
|
530
642
|
this.dateAndFormatMatch = (value, format) => {
|
|
531
|
-
|
|
532
643
|
// Ensure we have both values we need to do the comparison
|
|
533
644
|
if (!value || !format) {
|
|
534
|
-
throw new Error(
|
|
645
|
+
throw new Error(
|
|
646
|
+
"AuroFormValidation | dateFormatMatch: value and format are required",
|
|
647
|
+
);
|
|
535
648
|
}
|
|
536
649
|
|
|
537
650
|
// If the lengths are different, they cannot match
|
|
@@ -540,11 +653,10 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
540
653
|
}
|
|
541
654
|
|
|
542
655
|
// Get the parts of the date
|
|
543
|
-
const dateParts = dateFormatter.
|
|
656
|
+
const dateParts = dateFormatter.getDateParts(value, format);
|
|
544
657
|
|
|
545
658
|
// Validator for day
|
|
546
659
|
const dayValueIsValid = (day) => {
|
|
547
|
-
|
|
548
660
|
// Guard clause: if there is no day in the dateParts, we can ignore this check.
|
|
549
661
|
if (!dateParts.day) {
|
|
550
662
|
return true;
|
|
@@ -560,7 +672,9 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
560
672
|
|
|
561
673
|
// Guard clause: ensure day is a valid integer
|
|
562
674
|
if (Number.isNaN(numDay)) {
|
|
563
|
-
throw new Error(
|
|
675
|
+
throw new Error(
|
|
676
|
+
"AuroDatepickerUtilities | dayValueIsValid: Unable to parse day value integer",
|
|
677
|
+
);
|
|
564
678
|
}
|
|
565
679
|
|
|
566
680
|
// Guard clause: ensure day is within the valid range
|
|
@@ -574,6 +688,10 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
574
688
|
|
|
575
689
|
// Validator for month
|
|
576
690
|
const monthValueIsValid = (month) => {
|
|
691
|
+
// Guard clause: if there is no month in the dateParts, we can ignore this check.
|
|
692
|
+
if (!dateParts.month) {
|
|
693
|
+
return true;
|
|
694
|
+
}
|
|
577
695
|
|
|
578
696
|
// Guard clause: ensure month exists.
|
|
579
697
|
if (!month) {
|
|
@@ -585,7 +703,9 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
585
703
|
|
|
586
704
|
// Guard clause: ensure month is a valid integer
|
|
587
705
|
if (Number.isNaN(numMonth)) {
|
|
588
|
-
throw new Error(
|
|
706
|
+
throw new Error(
|
|
707
|
+
"AuroDatepickerUtilities | monthValueIsValid: Unable to parse month value integer",
|
|
708
|
+
);
|
|
589
709
|
}
|
|
590
710
|
|
|
591
711
|
// Guard clause: ensure month is within the valid range
|
|
@@ -599,6 +719,10 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
599
719
|
|
|
600
720
|
// Validator for year
|
|
601
721
|
const yearIsValid = (_year) => {
|
|
722
|
+
// Guard clause: if there is no year in the dateParts, we can ignore this check.
|
|
723
|
+
if (!dateParts.year) {
|
|
724
|
+
return true;
|
|
725
|
+
}
|
|
602
726
|
|
|
603
727
|
// Guard clause: ensure year exists.
|
|
604
728
|
if (!_year) {
|
|
@@ -613,7 +737,9 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
613
737
|
|
|
614
738
|
// Guard clause: ensure year is a valid integer
|
|
615
739
|
if (Number.isNaN(numYear)) {
|
|
616
|
-
throw new Error(
|
|
740
|
+
throw new Error(
|
|
741
|
+
"AuroDatepickerUtilities | yearValueIsValid: Unable to parse year value integer",
|
|
742
|
+
);
|
|
617
743
|
}
|
|
618
744
|
|
|
619
745
|
// Guard clause: ensure year is within the valid range
|
|
@@ -629,7 +755,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
629
755
|
const checks = [
|
|
630
756
|
monthValueIsValid(dateParts.month),
|
|
631
757
|
dayValueIsValid(dateParts.day),
|
|
632
|
-
yearIsValid(dateParts.year)
|
|
758
|
+
yearIsValid(dateParts.year),
|
|
633
759
|
];
|
|
634
760
|
|
|
635
761
|
// If any of the checks failed, the date format does not match and the result is invalid
|
|
@@ -663,10 +789,7 @@ const {
|
|
|
663
789
|
} = dateUtilities;
|
|
664
790
|
|
|
665
791
|
const {
|
|
666
|
-
toNorthAmericanFormat
|
|
667
|
-
parseDate,
|
|
668
|
-
getDateAsString
|
|
669
|
-
} = dateFormatter;
|
|
792
|
+
toNorthAmericanFormat} = dateFormatter;
|
|
670
793
|
|
|
671
794
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
672
795
|
// See LICENSE in the project root for license information.
|
|
@@ -675,7 +798,7 @@ const {
|
|
|
675
798
|
class AuroFormValidation {
|
|
676
799
|
|
|
677
800
|
constructor() {
|
|
678
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
801
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
679
802
|
}
|
|
680
803
|
|
|
681
804
|
/**
|
|
@@ -1240,11 +1363,239 @@ var plusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width"
|
|
|
1240
1363
|
|
|
1241
1364
|
var minusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"minus-lg","category":"interface","deprecated":true,"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><path d=\"M5.75 12.75h12.5a.75.75 0 1 0 0-1.5H5.75a.75.75 0 1 0 0 1.5\"/></svg>"};
|
|
1242
1365
|
|
|
1243
|
-
var colorCss$
|
|
1366
|
+
var colorCss$3 = css`.label{color:var(--ds-auro-counter-label-text-color)}[name=description]::slotted(*){color:var(--ds-auro-counter-description-text-color)}.controlIcon{color:var(--ds-auro-counter-icon-color)}.quantityWrapper{background-color:var(--ds-auro-counter-control-background-color);color:var(--ds-auro-counter-quantity-text-color)}:host::part(counterControl):focus-visible{outline-color:var(--ds-auro-counter-control-border-color)}[disabled],:host([disabled]){--ds-auro-counter-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}[onDark],:host([onDark]),[appearance=inverse],:host([appearance=inverse]){--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}[onDark][disabled],:host([onDark][disabled]),[appearance=inverse][disabled],:host([appearance=inverse][disabled]){--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-counter-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
1367
|
+
|
|
1368
|
+
var styleCss$3 = css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}.counter{display:flex;align-items:center;justify-content:space-between;column-gap:var(--ds-size-150, 0.75rem)}.content{display:flex;flex-flow:column}[name=description]::slotted(*){display:block}.quantityWrapper{width:var(--ds-size-400, 2rem);height:calc(var(--ds-size-25, 0.125rem) + var(--ds-size-400, 2rem));align-content:center;cursor:default;text-align:center}:host{position:relative;text-align:left}:host::part(counterControl){display:flex;border-radius:var(--ds-size-500, 2.5rem);touch-action:manipulation}:host::part(counterControl):focus-visible{outline-offset:0;outline-style:solid;outline-width:var(--ds-size-25, 0.125rem)}:host::part(controlMinus){--ds-auro-counter-control-border-radius: var(--ds-size-500, 2.5rem) 0 0 var(--ds-size-500, 2.5rem);--ds-auro-counter-control-padding: var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem)}:host::part(controlPlus){--ds-auro-counter-control-border-radius: 0 var(--ds-size-500, 2.5rem) var(--ds-size-500, 2.5rem) 0;--ds-auro-counter-control-padding: var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem) var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem)}auro-counter-button{display:flex}`;
|
|
1369
|
+
|
|
1370
|
+
var colorCss$2 = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]),:host([appearance=inverse]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]),:host([appearance=inverse][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
1371
|
+
|
|
1372
|
+
var styleCss$2 = css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{position:relative;display:block}.helptext-wrapper{display:none}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
1373
|
+
|
|
1374
|
+
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
1375
|
+
|
|
1376
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1377
|
+
// See LICENSE in the project root for license information.
|
|
1378
|
+
|
|
1379
|
+
// ---------------------------------------------------------------------
|
|
1380
|
+
|
|
1381
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1382
|
+
|
|
1383
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
1384
|
+
|
|
1385
|
+
/* eslint-disable jsdoc/require-param */
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* This will register a new custom element with the browser.
|
|
1389
|
+
* @param {String} name - The name of the custom element.
|
|
1390
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
1391
|
+
* @returns {void}
|
|
1392
|
+
*/
|
|
1393
|
+
registerComponent(name, componentClass) {
|
|
1394
|
+
if (!customElements.get(name)) {
|
|
1395
|
+
customElements.define(name, class extends componentClass {});
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
/**
|
|
1400
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
1401
|
+
* @returns {void}
|
|
1402
|
+
*/
|
|
1403
|
+
closestElement(
|
|
1404
|
+
selector, // selector like in .closest()
|
|
1405
|
+
base = this, // extra functionality to skip a parent
|
|
1406
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
1407
|
+
!el || el === document || el === window
|
|
1408
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
1409
|
+
: found
|
|
1410
|
+
? found // found a selector INside this element
|
|
1411
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
1412
|
+
) {
|
|
1413
|
+
return __Closest(base);
|
|
1414
|
+
}
|
|
1415
|
+
/* eslint-enable jsdoc/require-param */
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
1419
|
+
* @param {Object} elem - The element to check.
|
|
1420
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
1421
|
+
* @returns {void}
|
|
1422
|
+
*/
|
|
1423
|
+
handleComponentTagRename(elem, tagName) {
|
|
1424
|
+
const tag = tagName.toLowerCase();
|
|
1425
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1426
|
+
|
|
1427
|
+
if (elemTag !== tag) {
|
|
1428
|
+
elem.setAttribute(tag, true);
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
/**
|
|
1433
|
+
* Validates if an element is a specific Auro component.
|
|
1434
|
+
* @param {Object} elem - The element to validate.
|
|
1435
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
1436
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1437
|
+
*/
|
|
1438
|
+
elementMatch(elem, tagName) {
|
|
1439
|
+
const tag = tagName.toLowerCase();
|
|
1440
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1441
|
+
|
|
1442
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
/**
|
|
1446
|
+
* Gets the text content of a named slot.
|
|
1447
|
+
* @returns {String}
|
|
1448
|
+
* @private
|
|
1449
|
+
*/
|
|
1450
|
+
getSlotText(elem, name) {
|
|
1451
|
+
const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
|
|
1452
|
+
const nodes = slot?.assignedNodes({ flatten: true }) || [];
|
|
1453
|
+
const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
|
|
1454
|
+
|
|
1455
|
+
return text || null;
|
|
1456
|
+
}
|
|
1457
|
+
};
|
|
1458
|
+
|
|
1459
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1460
|
+
// See LICENSE in the project root for license information.
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* Displays help text or error messages within form elements - Internal Use Only.
|
|
1465
|
+
*/
|
|
1466
|
+
class AuroHelpText extends LitElement {
|
|
1467
|
+
|
|
1468
|
+
constructor() {
|
|
1469
|
+
super();
|
|
1470
|
+
|
|
1471
|
+
this.error = false;
|
|
1472
|
+
this.appearance = "default";
|
|
1473
|
+
this.onDark = false;
|
|
1474
|
+
this.hasTextContent = false;
|
|
1475
|
+
|
|
1476
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
static get styles() {
|
|
1480
|
+
return [
|
|
1481
|
+
colorCss$2,
|
|
1482
|
+
styleCss$2,
|
|
1483
|
+
tokensCss
|
|
1484
|
+
];
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
// function to define props used within the scope of this component
|
|
1488
|
+
static get properties() {
|
|
1489
|
+
return {
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* Defines whether the component will be on lighter or darker backgrounds.
|
|
1493
|
+
* @property {'default', 'inverse'} - The appearance of the help text, either default (for light backgrounds) or inverse (for dark backgrounds).
|
|
1494
|
+
* @default 'default'
|
|
1495
|
+
*/
|
|
1496
|
+
appearance: {
|
|
1497
|
+
type: String,
|
|
1498
|
+
reflect: true
|
|
1499
|
+
},
|
|
1500
|
+
|
|
1501
|
+
/**
|
|
1502
|
+
* @private
|
|
1503
|
+
*/
|
|
1504
|
+
slotNodes: {
|
|
1505
|
+
type: Boolean,
|
|
1506
|
+
},
|
|
1244
1507
|
|
|
1245
|
-
var styleCss$2 = css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}.counter{display:flex;align-items:center;justify-content:space-between;column-gap:var(--ds-size-150, 0.75rem)}.content{display:flex;flex-flow:column}[name=description]::slotted(*){display:block}.quantityWrapper{width:var(--ds-size-400, 2rem);height:calc(var(--ds-size-25, 0.125rem) + var(--ds-size-400, 2rem));align-content:center;cursor:default;text-align:center}:host{position:relative;text-align:left}:host::part(counterControl){display:flex;border-radius:var(--ds-size-500, 2.5rem);touch-action:manipulation}:host::part(counterControl):focus-visible{outline-offset:0;outline-style:solid;outline-width:var(--ds-size-25, 0.125rem)}:host::part(controlMinus){--ds-auro-counter-control-border-radius: var(--ds-size-500, 2.5rem) 0 0 var(--ds-size-500, 2.5rem);--ds-auro-counter-control-padding: var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem)}:host::part(controlPlus){--ds-auro-counter-control-border-radius: 0 var(--ds-size-500, 2.5rem) var(--ds-size-500, 2.5rem) 0;--ds-auro-counter-control-padding: var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem) var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem)}auro-counter-button{display:flex}`;
|
|
1508
|
+
/**
|
|
1509
|
+
* @private
|
|
1510
|
+
*/
|
|
1511
|
+
hasTextContent: {
|
|
1512
|
+
type: Boolean,
|
|
1513
|
+
},
|
|
1514
|
+
|
|
1515
|
+
/**
|
|
1516
|
+
* If declared, make font color red.
|
|
1517
|
+
*/
|
|
1518
|
+
error: {
|
|
1519
|
+
type: Boolean,
|
|
1520
|
+
reflect: true,
|
|
1521
|
+
},
|
|
1246
1522
|
|
|
1247
|
-
|
|
1523
|
+
/**
|
|
1524
|
+
* DEPRECATED - use `appearance` instead.
|
|
1525
|
+
*/
|
|
1526
|
+
onDark: {
|
|
1527
|
+
type: Boolean,
|
|
1528
|
+
reflect: true
|
|
1529
|
+
}
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
* This will register this element with the browser.
|
|
1535
|
+
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
1536
|
+
*
|
|
1537
|
+
* @example
|
|
1538
|
+
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
1539
|
+
*
|
|
1540
|
+
*/
|
|
1541
|
+
static register(name = "auro-helptext") {
|
|
1542
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHelpText);
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
updated() {
|
|
1546
|
+
this.handleSlotChange();
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
handleSlotChange(event) {
|
|
1550
|
+
if (event) {
|
|
1551
|
+
this.slotNodes = event.target.assignedNodes();
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
1559
|
+
*
|
|
1560
|
+
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
1561
|
+
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
1562
|
+
* @private
|
|
1563
|
+
*/
|
|
1564
|
+
checkSlotsForContent(nodes) {
|
|
1565
|
+
if (!nodes) {
|
|
1566
|
+
return false;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
return nodes.some((node) => {
|
|
1570
|
+
if (node.textContent.trim()) {
|
|
1571
|
+
return true;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
if (!node.querySelector) {
|
|
1575
|
+
return false;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
1579
|
+
if (!nestedSlot) {
|
|
1580
|
+
return false;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
1584
|
+
return this.checkSlotsForContent(nestedSlotNodes);
|
|
1585
|
+
});
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
1589
|
+
render() {
|
|
1590
|
+
return html$1`
|
|
1591
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
1592
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
1593
|
+
</div>
|
|
1594
|
+
`;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
var formkitVersion = '202606030033';
|
|
1248
1599
|
|
|
1249
1600
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1250
1601
|
// See LICENSE in the project root for license information.
|
|
@@ -1335,7 +1686,7 @@ class AuroCounter extends LitElement {
|
|
|
1335
1686
|
/**
|
|
1336
1687
|
* @private
|
|
1337
1688
|
*/
|
|
1338
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1689
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
1339
1690
|
|
|
1340
1691
|
}
|
|
1341
1692
|
|
|
@@ -1477,14 +1828,14 @@ class AuroCounter extends LitElement {
|
|
|
1477
1828
|
* AuroCounter.register("custom-counter") // registers <custom-counter/>
|
|
1478
1829
|
*/
|
|
1479
1830
|
static register(name = "auro-counter") {
|
|
1480
|
-
AuroLibraryRuntimeUtils$
|
|
1831
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroCounter);
|
|
1481
1832
|
}
|
|
1482
1833
|
|
|
1483
1834
|
static get styles() {
|
|
1484
1835
|
return [
|
|
1485
1836
|
tokens,
|
|
1486
|
-
colorCss$
|
|
1487
|
-
styleCss$
|
|
1837
|
+
colorCss$3,
|
|
1838
|
+
styleCss$3
|
|
1488
1839
|
];
|
|
1489
1840
|
}
|
|
1490
1841
|
|
|
@@ -2131,7 +2482,7 @@ class AuroCounterWrapper extends LitElement {
|
|
|
2131
2482
|
* AuroCounterWrapper.register("custom-counter-wrapper") // registers <custom-counter-wrapper/>
|
|
2132
2483
|
*/
|
|
2133
2484
|
static register(name = "auro-counter-wrapper") {
|
|
2134
|
-
AuroLibraryRuntimeUtils$
|
|
2485
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroCounterWrapper);
|
|
2135
2486
|
}
|
|
2136
2487
|
|
|
2137
2488
|
// function that renders the HTML and CSS into the scope of the component
|
|
@@ -2883,7 +3234,7 @@ class AuroCounterGroup extends AuroElement {
|
|
|
2883
3234
|
* AuroCounterGroup.register("custom-counter-group") // registers <custom-counter-group/>
|
|
2884
3235
|
*/
|
|
2885
3236
|
static register(name = "auro-counter-group") {
|
|
2886
|
-
AuroLibraryRuntimeUtils$
|
|
3237
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroCounterGroup);
|
|
2887
3238
|
}
|
|
2888
3239
|
|
|
2889
3240
|
/**
|