@aurodesignsystem-dev/auro-formkit 0.0.0-pr1483.0 → 0.0.0-pr1483.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.
Files changed (52) hide show
  1. package/components/checkbox/demo/customize.min.js +2 -233
  2. package/components/checkbox/demo/getting-started.min.js +2 -233
  3. package/components/checkbox/demo/index.min.js +2 -233
  4. package/components/checkbox/dist/index.js +2 -233
  5. package/components/checkbox/dist/registered.js +2 -233
  6. package/components/combobox/demo/customize.min.js +7 -238
  7. package/components/combobox/demo/getting-started.min.js +7 -238
  8. package/components/combobox/demo/index.min.js +7 -238
  9. package/components/combobox/demo/keyboard-behavior.md +68 -8
  10. package/components/combobox/dist/index.js +7 -238
  11. package/components/combobox/dist/registered.js +7 -238
  12. package/components/counter/demo/customize.min.js +3 -234
  13. package/components/counter/demo/index.min.js +3 -234
  14. package/components/counter/dist/index.js +2 -233
  15. package/components/counter/dist/registered.js +2 -233
  16. package/components/datepicker/demo/api.md +52 -51
  17. package/components/datepicker/demo/customize.md +52 -15
  18. package/components/datepicker/demo/index.md +23 -0
  19. package/components/datepicker/demo/index.min.js +5069 -1044
  20. package/components/datepicker/dist/index.js +4587 -562
  21. package/components/datepicker/dist/registered.js +4587 -562
  22. package/components/datepicker/dist/src/auro-calendar-cell.d.ts +3 -1
  23. package/components/datepicker/dist/src/auro-calendar-month.d.ts +23 -0
  24. package/components/datepicker/dist/src/auro-calendar.d.ts +15 -0
  25. package/components/datepicker/dist/src/auro-datepicker.d.ts +27 -13
  26. package/components/datepicker/dist/src/utilities.d.ts +0 -20
  27. package/components/datepicker/dist/src/utilitiesCalendar.d.ts +0 -1
  28. package/components/dropdown/demo/customize.min.js +1 -1
  29. package/components/dropdown/demo/getting-started.min.js +1 -1
  30. package/components/dropdown/demo/index.min.js +1 -1
  31. package/components/dropdown/dist/index.js +1 -1
  32. package/components/dropdown/dist/registered.js +1 -1
  33. package/components/form/demo/customize.min.js +5294 -2422
  34. package/components/form/demo/getting-started.min.js +5294 -2422
  35. package/components/form/demo/index.min.js +5294 -2422
  36. package/components/form/demo/registerDemoDeps.min.js +5294 -2422
  37. package/components/input/demo/customize.min.js +2 -2
  38. package/components/input/demo/getting-started.min.js +2 -2
  39. package/components/input/demo/index.min.js +2 -2
  40. package/components/input/dist/index.js +2 -2
  41. package/components/input/dist/registered.js +2 -2
  42. package/components/radio/demo/index.min.js +2 -233
  43. package/components/radio/dist/index.js +2 -233
  44. package/components/radio/dist/registered.js +2 -233
  45. package/components/select/demo/customize.min.js +21 -250
  46. package/components/select/demo/getting-started.min.js +21 -250
  47. package/components/select/demo/index.min.js +21 -250
  48. package/components/select/demo/keyboard-behavior.md +54 -8
  49. package/components/select/dist/index.js +21 -250
  50. package/components/select/dist/registered.js +21 -250
  51. package/custom-elements.json +1597 -1582
  52. package/package.json +3 -3
@@ -258,237 +258,6 @@ let p$2 = class p{registerComponent(t,a){customElements.get(t)||customElements.d
258
258
 
259
259
  var iconVersion$1 = '9.1.2';
260
260
 
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
- }
286
-
287
- if (dateStr.length !== format.length) {
288
- throw new Error(
289
- "AuroDatepickerUtilities | parseDate: Date string and format length do not match",
290
- );
291
- }
292
-
293
- valueParts = [dateStr];
294
- formatParts = [format];
295
- }
296
-
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
- }
302
-
303
- const result = formatParts.reduce((acc, part, index) => {
304
- const value = valueParts[index];
305
-
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
- }
313
-
314
- return acc;
315
- }, {});
316
-
317
- if (!result.month && !result.day && !result.year) {
318
- throw new Error(
319
- "AuroDatepickerUtilities | parseDate: Unable to parse date string",
320
- );
321
- }
322
-
323
- return result;
324
- }
325
-
326
- function isCalendarDate(year, month, day) {
327
- let yearNumber = Number(year);
328
- const monthNumber = Number(month);
329
- const dayNumber = Number(day);
330
-
331
- if (
332
- !Number.isInteger(yearNumber) ||
333
- !Number.isInteger(monthNumber) ||
334
- !Number.isInteger(dayNumber)
335
- ) {
336
- return false;
337
- }
338
-
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
- }
345
-
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, "/"));
348
-
349
- return (
350
- !Number.isNaN(date.getTime()) && toISOFormatString(date) === stringified
351
- );
352
- }
353
-
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);
370
-
371
- if (!result) {
372
- return undefined;
373
- }
374
-
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";
379
-
380
- if (isCalendarDate(year, month, day)) {
381
- return result;
382
- }
383
-
384
- throw new Error(
385
- `AuroDatepickerUtilities | parseDate: Date string is not a valid date ${JSON.stringify(result)} with format ${format}`,
386
- );
387
- }
388
-
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
- }
402
-
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(dateStr, format) {
410
- if (format === "mm/dd/yyyy") {
411
- return dateStr;
412
- }
413
-
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;
476
- }
477
-
478
- const { month, day, year } = parseDate(dateStr, format);
479
- return new Date(`${year}/${month}/${day}`);
480
- }
481
-
482
- const dateFormatter = {
483
- parseDate,
484
- getDateParts,
485
- getDateAsString,
486
- toNorthAmericanFormat,
487
- isValidDate,
488
- toISOFormatString,
489
- stringToDateInstance,
490
- };
491
-
492
261
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
493
262
  // See LICENSE in the project root for license information.
494
263
 
@@ -710,7 +479,7 @@ class AuroFormValidation {
710
479
  }
711
480
 
712
481
  // Validate that the date passed was the correct format and is a valid date
713
- if (elem.value && !dateFormatter.isValidDate(elem.inputElement.value, elem.format)) {
482
+ if (elem.value && !elem.valueObject) {
714
483
  elem.validity = 'patternMismatch';
715
484
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
716
485
  return;
@@ -1280,7 +1049,7 @@ class AuroHelpText extends LitElement {
1280
1049
  }
1281
1050
  }
1282
1051
 
1283
- var formkitVersion = '202605271728';
1052
+ var formkitVersion = '202606051610';
1284
1053
 
1285
1054
  // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
1286
1055
  // See LICENSE in the project root for license information.
@@ -7,57 +7,58 @@ The `auro-datepicker` component provides users with a way to select a date or da
7
7
 
8
8
  ## Properties
9
9
 
10
- | Property | Attribute | Modifiers | Type | Default | Description |
11
- |-----------------------------------|-----------------------------------|-----------|--------------------------------------------------|--------------------------------------------------|--------------------------------------------------|
12
- | `appearance` | `appearance` | | `string` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
13
- | `autoPlacement` | `autoPlacement` | | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
14
- | `calendarEndDate` | `calendarEndDate` | | `string` | "undefined" | The last date that may be displayed in the calendar. |
15
- | `calendarEndDateObject` | | readonly | `Date \| undefined` | | |
16
- | `calendarFocusDate` | `calendarFocusDate` | | `string` | "value" | The date that will first be visually rendered to the user in the calendar. |
17
- | `calendarFocusDateObject` | | readonly | `Date \| undefined` | | |
18
- | `calendarStartDate` | `calendarStartDate` | | `string` | "undefined" | The first date that may be displayed in the calendar. |
19
- | `calendarStartDateObject` | | readonly | `Date \| undefined` | | |
20
- | `centralDate` | `centralDate` | | `string` | | The date that determines the currently visible month. |
21
- | `centralDateObject` | | readonly | `Date \| undefined` | | |
22
- | `disabled` | `disabled` | | `boolean` | false | If set, disables the datepicker. |
23
- | `dvInputOnly` | `dvInputOnly` | | `boolean` | false | If defined, the display value slot content will only mask the HTML5 input element. The input's label will not be masked. |
24
- | `error` | `error` | | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
25
- | `format` | `format` | | `string` | "mm/dd/yyyy" | Specifies the date format. The default is `mm/dd/yyyy`. |
26
- | `fullscreenBreakpoint` | `fullscreenBreakpoint` | | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'disabled'` | "'sm'" | Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
27
- | `hasError` | | readonly | `boolean` | | |
28
- | `inputmode` | `inputmode` | | `string` | | Exposes inputmode attribute for input. |
29
- | `largeFullscreenHeadline` | `largeFullscreenHeadline` | | `boolean` | false | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
30
- | `layout` | `layout` | | `'classic' \| 'snowflake'` | "'classic'" | Sets the layout of the datepicker. |
31
- | `maxDate` | `maxDate` | | `string` | | Maximum date. All dates after will be disabled. |
32
- | `maxDateObject` | | readonly | `Date \| undefined` | | |
33
- | `minDate` | `minDate` | | `string` | | Minimum date. All dates before will be disabled. |
34
- | `minDateObject` | | readonly | `Date \| undefined` | | |
35
- | `monthNames` | `monthNames` | | `array` | ["January","February","March","April","May","June","July","August","September","October","November","December"] | Names of all 12 months to render in the calendar, used for localization of date string in mobile layout. |
36
- | `noFlip` | `noFlip` | | `boolean` | false | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
37
- | `noValidate` | `noValidate` | | `boolean` | false | If set, disables auto-validation on blur. |
38
- | `offset` | `offset` | | `number` | "0" | Gap between the trigger element and bib. |
39
- | `onDark` | `onDark` | | `boolean` | false | DEPRECATED - use `appearance="inverse"` instead. |
40
- | `placeholder` | `placeholder` | | `string` | | Placeholder text to display in the input(s) when no value is set. |
41
- | `placeholderEndDate` | `placeholderEndDate` | | `string` | | Optional placeholder text to display in the second input when using date range.<br />By default, datepicker will use `placeholder` for both inputs if placeholder is<br />specified, but placeholderEndDate is not. |
42
- | `placement` | `placement` | | `'top' \| 'right' \| 'bottom' \| 'left' \| 'bottom-start' \| 'top-start' \| 'top-end' \| 'right-start' \| 'right-end' \| 'bottom-end' \| 'left-start' \| 'left-end'` | "'bottom-start'" | Position where the bib should appear relative to the trigger. |
43
- | `range` | `range` | | `boolean` | false | If set, turns on date range functionality in auro-calendar. |
44
- | `referenceDates` | `referenceDates` | | `array` | | Dates that the user should have for reference as part of their decision making when selecting a date.<br />This should be a JSON string array of ISO date strings (`YYYY-MM-DD`). |
45
- | `required` | `required` | | `boolean` | false | Populates the `required` attribute on the input. Used for client-side validation. |
46
- | `setCustomValidity` | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
47
- | `setCustomValidityCustomError` | `setCustomValidityCustomError` | | `string` | | Custom help text message to display when validity = `customError`. |
48
- | `setCustomValidityRangeOverflow` | `setCustomValidityRangeOverflow` | | `string` | | Custom help text message to display when validity = `rangeOverflow`. |
49
- | `setCustomValidityRangeUnderflow` | `setCustomValidityRangeUnderflow` | | `string` | | Custom help text message to display when validity = `rangeUnderflow`. |
50
- | `setCustomValidityValueMissing` | `setCustomValidityValueMissing` | | `string` | | Custom help text message to display when validity = `valueMissing`. |
51
- | `shape` | | | `string` | "classic" | |
52
- | `shift` | `shift` | | `boolean` | false | If declared, the dropdown will shift its position to avoid being cut off by the viewport. |
53
- | `size` | | | `string` | "lg" | |
54
- | `stacked` | `stacked` | | `boolean` | false | Set true to make datepicker stacked style. |
55
- | `validity` | `validity` | | `string` | "undefined" | Specifies the `validityState` this element is in. |
56
- | `value` | `value` | | `string` | "undefined" | Value selected for the datepicker. |
57
- | `valueEnd` | `valueEnd` | | `string` | "undefined" | Value selected for the second datepicker when using date range. |
58
- | `valueEndObject` | | readonly | `Date \| undefined` | | |
59
- | `valueObject` | | readonly | `Date \| undefined` | | |
60
- | `values` | | readonly | `string[]` | | A convenience wrapper for `value` and `valueEnd`, uses the new Auro "array value pattern". |
10
+ | Property | Attribute | Modifiers | Type | Default | Description |
11
+ |-----------------------------------|-----------------------------------|-----------|--------------------------------------------------|------------------|--------------------------------------------------|
12
+ | `appearance` | `appearance` | | `string` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
13
+ | `autoPlacement` | `autoPlacement` | | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
14
+ | `calendarEndDate` | `calendarEndDate` | | `string` | "undefined" | The last date that may be displayed in the calendar. |
15
+ | `calendarEndDateObject` | | readonly | `Date \| undefined` | | |
16
+ | `calendarFocusDate` | `calendarFocusDate` | | `string` | "value" | The date that will first be visually rendered to the user in the calendar. |
17
+ | `calendarFocusDateObject` | | readonly | `Date \| undefined` | | |
18
+ | `calendarStartDate` | `calendarStartDate` | | `string` | "undefined" | The first date that may be displayed in the calendar. |
19
+ | `calendarStartDateObject` | | readonly | `Date \| undefined` | | |
20
+ | `centralDate` | `centralDate` | | `string` | | The date that determines the currently visible month. |
21
+ | `centralDateObject` | | readonly | `Date \| undefined` | | |
22
+ | `disabled` | `disabled` | | `boolean` | false | If set, disables the datepicker. |
23
+ | `dvInputOnly` | `dvInputOnly` | | `boolean` | false | If defined, the display value slot content will only mask the HTML5 input element. The input's label will not be masked. |
24
+ | `error` | `error` | | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
25
+ | `format` | `format` | | `string` | | Specifies the date format. The default is `mm/dd/yyyy`. |
26
+ | `fullscreenBreakpoint` | `fullscreenBreakpoint` | | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'disabled'` | "'sm'" | Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
27
+ | `hasError` | | readonly | `boolean` | | |
28
+ | `inputmode` | `inputmode` | | `string` | | Exposes inputmode attribute for input. |
29
+ | `largeFullscreenHeadline` | `largeFullscreenHeadline` | | `boolean` | false | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
30
+ | `layout` | `layout` | | `'classic' \| 'snowflake'` | "'classic'" | Sets the layout of the datepicker. |
31
+ | `locale` | `locale` | | `string` | | Defines the locale of the element. Used to derive the date format when `format` is not explicitly set. |
32
+ | `maxDate` | `maxDate` | | `string` | | Maximum date. All dates after will be disabled. |
33
+ | `maxDateObject` | | readonly | `Date \| undefined` | | |
34
+ | `minDate` | `minDate` | | `string` | | Minimum date. All dates before will be disabled. |
35
+ | `minDateObject` | | readonly | `Date \| undefined` | | |
36
+ | `monthNames` | `monthNames` | | `array` | | Names of all 12 months to render in the calendar.<br />When omitted, month names will be automatically populated from the active `locale` (falling back to `en-US`). |
37
+ | `noFlip` | `noFlip` | | `boolean` | false | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
38
+ | `noValidate` | `noValidate` | | `boolean` | false | If set, disables auto-validation on blur. |
39
+ | `offset` | `offset` | | `number` | "0" | Gap between the trigger element and bib. |
40
+ | `onDark` | `onDark` | | `boolean` | false | DEPRECATED - use `appearance="inverse"` instead. |
41
+ | `placeholder` | `placeholder` | | `string` | | Placeholder text to display in the input(s) when no value is set. |
42
+ | `placeholderEndDate` | `placeholderEndDate` | | `string` | | Optional placeholder text to display in the second input when using date range.<br />By default, datepicker will use `placeholder` for both inputs if placeholder is<br />specified, but placeholderEndDate is not. |
43
+ | `placement` | `placement` | | `'top' \| 'right' \| 'bottom' \| 'left' \| 'bottom-start' \| 'top-start' \| 'top-end' \| 'right-start' \| 'right-end' \| 'bottom-end' \| 'left-start' \| 'left-end'` | "'bottom-start'" | Position where the bib should appear relative to the trigger. |
44
+ | `range` | `range` | | `boolean` | false | If set, turns on date range functionality in auro-calendar. |
45
+ | `referenceDates` | `referenceDates` | | `array` | | Dates that the user should have for reference as part of their decision making when selecting a date.<br />This should be a JSON string array of ISO date strings (`YYYY-MM-DD`). |
46
+ | `required` | `required` | | `boolean` | false | Populates the `required` attribute on the input. Used for client-side validation. |
47
+ | `setCustomValidity` | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
48
+ | `setCustomValidityCustomError` | `setCustomValidityCustomError` | | `string` | | Custom help text message to display when validity = `customError`. |
49
+ | `setCustomValidityRangeOverflow` | `setCustomValidityRangeOverflow` | | `string` | | Custom help text message to display when validity = `rangeOverflow`. |
50
+ | `setCustomValidityRangeUnderflow` | `setCustomValidityRangeUnderflow` | | `string` | | Custom help text message to display when validity = `rangeUnderflow`. |
51
+ | `setCustomValidityValueMissing` | `setCustomValidityValueMissing` | | `string` | | Custom help text message to display when validity = `valueMissing`. |
52
+ | `shape` | | | `string` | "classic" | |
53
+ | `shift` | `shift` | | `boolean` | false | If declared, the dropdown will shift its position to avoid being cut off by the viewport. |
54
+ | `size` | | | `string` | "lg" | |
55
+ | `stacked` | `stacked` | | `boolean` | false | Set true to make datepicker stacked style. |
56
+ | `validity` | `validity` | | `string` | "undefined" | Specifies the `validityState` this element is in. |
57
+ | `value` | `value` | | `string` | "undefined" | Value selected for the datepicker. |
58
+ | `valueEnd` | `valueEnd` | | `string` | "undefined" | Value selected for the second datepicker when using date range. |
59
+ | `valueEndObject` | | readonly | `Date \| undefined` | | |
60
+ | `valueObject` | | readonly | `Date \| undefined` | | |
61
+ | `values` | | readonly | `string[]` | | A convenience wrapper for `value` and `valueEnd`, uses the new Auro "array value pattern". |
61
62
 
62
63
  ## Methods
63
64
 
@@ -19,7 +19,7 @@
19
19
  <auro-anchorlink fluid href="#customValidation" class="level2 body-xs">Custom Validation</auro-anchorlink>
20
20
  <auro-anchorlink fluid href="#noValidate" class="level2 body-xs">No Validation</auro-anchorlink>
21
21
  <auro-anchorlink fluid href="#minMaxDate" class="level2 body-xs">Min/Max Date</auro-anchorlink>
22
- <auro-anchorlink fluid href="#localization" class="level2 body-xs">Localization</auro-anchorlink>
22
+ <auro-anchorlink fluid href="#regionalDate" class="level2 body-xs">Regional Date</auro-anchorlink>
23
23
  </auro-nav>
24
24
  </nav>
25
25
  <div class="mainContent">
@@ -694,27 +694,64 @@
694
694
  <!-- AURO-GENERATED-CONTENT:END -->
695
695
  </auro-accordion>
696
696
  <auro-header level="3" id="localization">Localization</auro-header>
697
- <p>Use the <code>centralDate</code>, locale, and related attributes to configure the datepicker for different regions and languages.</p>
697
+ <auro-header level="4" id="regionalDate">Regional Date</auro-header>
698
+ <p>When the <code>locale</code> attribute is set, the component automatically derives the correct date format for that region — no need to set <code>format</code> manually. For example, <code>locale="en-US"</code> produces <code>mm/dd/yyyy</code>, <code>locale="de-DE"</code> produces <code>dd.mm.yyyy</code>, and <code>locale="ja-JP"</code> produces <code>yyyy/mm/dd</code>.</p>
699
+ <p>If <code>format</code> is explicitly set alongside <code>locale</code>, <code>format</code> always wins. Use this when a specific format is required regardless of region.</p>
700
+ <p>If no <code>locale</code> attribute is set on the element, the component walks up the DOM looking for the nearest ancestor with a <code>data-locale</code> attribute and uses that value. If none is found, it defaults to <code>en-US</code>.</p>
698
701
  <div class="exampleWrapper">
699
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/localization.html) -->
700
- <!-- The below content is automatically added from ./../apiExamples/localization.html -->
701
- <auro-datepicker format="yyyy/mm/dd" id="localizationExample">
702
- <span slot="bib.fullscreen.headline">Localization Headline</span>
703
- <span slot="fromLabel">Choose a date</span>
704
- <span slot="bib.fullscreen.fromLabel">Choose a date</span>
702
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/locale.html) -->
703
+ <!-- The below content is automatically added from ./../apiExamples/locale.html -->
704
+ <div data-locale="de-DE">
705
+ <auro-datepicker locale="en-US">
706
+ <span slot="fromLabel">en-US Date</span>
707
+ <span slot="helpText">Help Text</span>
708
+ </auro-datepicker>
709
+ <auro-datepicker locale="de-DE">
710
+ <span slot="fromLabel">de-DE Date</span>
711
+ <span slot="helpText">Help Text</span>
712
+ </auro-datepicker>
713
+ <auro-datepicker locale="zh-CN">
714
+ <span slot="fromLabel">zh-CN Date</span>
715
+ <span slot="helpText">Help Text</span>
716
+ </auro-datepicker>
717
+ <auro-datepicker>
718
+ <span slot="fromLabel">Nearest `data-locale` attribute format (`de-DE` in this case)</span>
719
+ <span slot="helpText">Help Text</span>
720
+ </auro-datepicker>
721
+ <auro-datepicker locale="ja-JP" format="mm/dd/yyyy">
722
+ <span slot="fromLabel">ja-JP locale with explicit mm/dd/yyyy format</span>
723
+ <span slot="helpText">Help Text</span>
705
724
  </auro-datepicker>
725
+ </div>
706
726
  <!-- AURO-GENERATED-CONTENT:END -->
707
727
  </div>
708
728
  <auro-accordion alignRight>
709
729
  <span slot="trigger">See code</span>
710
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/localization.html) -->
711
- <!-- The below code snippet is automatically added from ./../apiExamples/localization.html -->
730
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/locale.html) -->
731
+ <!-- The below code snippet is automatically added from ./../apiExamples/locale.html -->
712
732
 
713
- <pre class="language-html"><code class="language-html">&lt;auro-datepicker format="yyyy/mm/dd" id="localizationExample"&gt;
714
- &lt;span slot="bib.fullscreen.headline"&gt;Localization Headline&lt;/span&gt;
715
- &lt;span slot="fromLabel"&gt;Choose a date&lt;/span&gt;
716
- &lt;span slot="bib.fullscreen.fromLabel"&gt;Choose a date&lt;/span&gt;
717
- &lt;/auro-datepicker&gt;</code></pre>
733
+ <pre class="language-html"><code class="language-html">&lt;div data-locale="de-DE"&gt;
734
+ &lt;auro-datepicker locale="en-US"&gt;
735
+ &lt;span slot="fromLabel"&gt;en-US Date&lt;/span&gt;
736
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
737
+ &lt;/auro-datepicker&gt;
738
+ &lt;auro-datepicker locale="de-DE"&gt;
739
+ &lt;span slot="fromLabel"&gt;de-DE Date&lt;/span&gt;
740
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
741
+ &lt;/auro-datepicker&gt;
742
+ &lt;auro-datepicker locale="zh-CN"&gt;
743
+ &lt;span slot="fromLabel"&gt;zh-CN Date&lt;/span&gt;
744
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
745
+ &lt;/auro-datepicker&gt;
746
+ &lt;auro-datepicker&gt;
747
+ &lt;span slot="fromLabel"&gt;Nearest `data-locale` attribute format (`de-DE` in this case)&lt;/span&gt;
748
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
749
+ &lt;/auro-datepicker&gt;
750
+ &lt;auro-datepicker locale="ja-JP" format="mm/dd/yyyy"&gt;
751
+ &lt;span slot="fromLabel"&gt;ja-JP locale with explicit mm/dd/yyyy format&lt;/span&gt;
752
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
753
+ &lt;/auro-datepicker&gt;
754
+ &lt;/div&gt;</code></pre>
718
755
  <!-- AURO-GENERATED-CONTENT:END -->
719
756
  </auro-accordion>
720
757
  </section>
@@ -10,6 +10,7 @@
10
10
  <auro-anchorlink fluid href="#selectRange" class="level2 body-xs">Select a Range</auro-anchorlink>
11
11
  <auro-anchorlink fluid href="#presetValue" class="level2 body-xs">Preset Value</auro-anchorlink>
12
12
  <auro-anchorlink fluid href="#skipSelection" class="level2 body-xs">Skip Selection</auro-anchorlink>
13
+ <auro-anchorlink fluid href="#regionalDateFormat" class="level2 body-xs">Regional Date</auro-anchorlink>
13
14
  <auro-anchorlink fluid href="#viewportSize" class="level2 body-xs">Viewport Size</auro-anchorlink>
14
15
  </auro-nav>
15
16
  </nav>
@@ -167,6 +168,28 @@
167
168
  <auro-header level="3" id="skipSelection">Skip selection</auro-header>
168
169
  <p>The datepicker does not force the user to select a date. If no selection is made and the field is not <code>required</code>, the user can move past the datepicker without entering a value.</p>
169
170
  <p>If the field is <code>required</code>, moving focus away without selecting a date triggers validation and renders the <code>valueMissing</code> error state.</p>
171
+ <auro-header level="3" id="regionalDateFormat">Regional date format support</auro-header>
172
+ <p>People around the world write dates differently. A traveler in the United States expects to see <strong>12/25/2025</strong>, while someone in Germany expects <strong>25.12.2025</strong>, and someone in Japan expects <strong>2025/12/25</strong>. Showing the wrong format causes confusion and mistakes.</p>
173
+ <p>When the datepicker knows the user's region via the <code>locale</code> attribute, it automatically displays dates in the format that looks natural to them — no extra setup required.</p>
174
+ <div class="exampleWrapper">
175
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/locale-single.html) -->
176
+ <!-- The below content is automatically added from ./../apiExamples/locale-single.html -->
177
+ <auro-datepicker locale="zh-CN">
178
+ <span slot="fromLabel">zh-CN Date</span>
179
+ <span slot="helpText">Help Text</span>
180
+ </auro-datepicker>
181
+ <!-- AURO-GENERATED-CONTENT:END -->
182
+ </div>
183
+ <auro-accordion alignRight>
184
+ <span slot="trigger">See code</span>
185
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/locale-single.html) -->
186
+ <!-- The below code snippet is automatically added from ./../apiExamples/locale-single.html -->
187
+ <pre class="language-html"><code class="language-html">&lt;auro-datepicker locale="zh-CN"&gt;
188
+ &lt;span slot="fromLabel"&gt;zh-CN Date&lt;/span&gt;
189
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
190
+ &lt;/auro-datepicker&gt;</code></pre>
191
+ <!-- AURO-GENERATED-CONTENT:END -->
192
+ </auro-accordion>
170
193
  <auro-header level="3" id="viewportSize">Viewport size</auro-header>
171
194
  <p>The datepicker automatically adapts its presentation based on viewport size. On larger screens, the calendar opens in a floating popover anchored to the trigger. On smaller screens, the calendar opens in a fullscreen dialog.</p>
172
195
  <p>The breakpoint at which the fullscreen behavior activates is controlled by the <code>fullscreenBreakpoint</code> attribute. The default value is <code>sm</code>. Supported values are <code>xs</code>, <code>sm</code>, <code>md</code>, <code>lg</code>, <code>xl</code>, and <code>disabled</code>.</p>