@aurodesignsystem-dev/auro-formkit 0.0.0-pr1483.1 → 0.0.0-pr1483.11
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 +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.min.js +5 -5
- package/components/combobox/demo/getting-started.min.js +5 -5
- package/components/combobox/demo/index.min.js +5 -5
- package/components/combobox/demo/keyboard-behavior.md +68 -8
- package/components/combobox/dist/index.js +5 -5
- package/components/combobox/dist/registered.js +5 -5
- package/components/counter/demo/customize.min.js +2 -2
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/dist/index.js +1 -1
- package/components/counter/dist/registered.js +1 -1
- package/components/datepicker/demo/api.md +52 -51
- package/components/datepicker/demo/customize.md +61 -15
- package/components/datepicker/demo/index.md +23 -0
- package/components/datepicker/demo/index.min.js +5096 -1044
- package/components/datepicker/dist/index.js +4590 -538
- package/components/datepicker/dist/registered.js +4590 -538
- package/components/datepicker/dist/src/auro-calendar-cell.d.ts +3 -1
- package/components/datepicker/dist/src/auro-calendar-month.d.ts +23 -0
- package/components/datepicker/dist/src/auro-calendar.d.ts +15 -0
- package/components/datepicker/dist/src/auro-datepicker.d.ts +63 -21
- package/components/datepicker/dist/src/utilities.d.ts +0 -20
- package/components/datepicker/dist/src/utilitiesCalendar.d.ts +0 -1
- package/components/dropdown/demo/customize.min.js +1 -1
- package/components/dropdown/demo/getting-started.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/customize.min.js +5187 -1133
- package/components/form/demo/getting-started.min.js +5187 -1133
- package/components/form/demo/index.min.js +5187 -1133
- package/components/form/demo/registerDemoDeps.min.js +5187 -1133
- package/components/input/demo/customize.md +1 -0
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.md +10 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.min.js +20 -18
- package/components/select/demo/getting-started.min.js +20 -18
- package/components/select/demo/index.min.js +20 -18
- package/components/select/demo/keyboard-behavior.md +54 -8
- package/components/select/dist/index.js +20 -18
- package/components/select/dist/registered.js +20 -18
- package/custom-elements.json +145 -117
- package/package.json +3 -3
|
@@ -38,7 +38,7 @@ export class AuroCalendarCell extends LitElement {
|
|
|
38
38
|
type: BooleanConstructor;
|
|
39
39
|
};
|
|
40
40
|
locale: {
|
|
41
|
-
type:
|
|
41
|
+
type: StringConstructor;
|
|
42
42
|
};
|
|
43
43
|
dateStr: {
|
|
44
44
|
type: StringConstructor;
|
|
@@ -148,6 +148,8 @@ export class AuroCalendarCell extends LitElement {
|
|
|
148
148
|
* @returns {String} The title of the auro-calendar-cell in the user's locale.
|
|
149
149
|
*/
|
|
150
150
|
private getTitle;
|
|
151
|
+
_titleFormatter: Intl.DateTimeFormat | undefined;
|
|
152
|
+
_titleFormatterLocale: any;
|
|
151
153
|
/**
|
|
152
154
|
* Gets the name of the date slot.
|
|
153
155
|
* @private
|
|
@@ -8,6 +8,19 @@ export class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8
8
|
type: BooleanConstructor;
|
|
9
9
|
reflect: boolean;
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* BCP 47 locale tag (such as `en-US`) for calendar localization.
|
|
13
|
+
* as wc-range-datepicker expects a `locale` prop, we use `localeCode` to avoid conflicts.
|
|
14
|
+
*/
|
|
15
|
+
localeCode: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Names of all 12 months. When omitted, names are derived from `localeCode`.
|
|
20
|
+
*/
|
|
21
|
+
monthNames: {
|
|
22
|
+
type: ArrayConstructor;
|
|
23
|
+
};
|
|
11
24
|
};
|
|
12
25
|
/**
|
|
13
26
|
* Returns month name to be rendered in the calendar header.
|
|
@@ -16,5 +29,15 @@ export class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
16
29
|
* @returns {String} The name of the month.
|
|
17
30
|
*/
|
|
18
31
|
private computeCurrentMonthName;
|
|
32
|
+
_cachedMonthNames: string[] | undefined;
|
|
33
|
+
_cachedMonthNamesLocale: any;
|
|
34
|
+
/**
|
|
35
|
+
* Determines the current month name based on locale.
|
|
36
|
+
* This is a rewrite of the function used in the class RangeDatepickerCalendar and should not be removed from here.
|
|
37
|
+
* @private
|
|
38
|
+
* @param {Object} changedProperties - The properties that have changed since the last update.
|
|
39
|
+
* @returns {void}
|
|
40
|
+
*/
|
|
41
|
+
private updated;
|
|
19
42
|
}
|
|
20
43
|
import { RangeDatepickerCalendar } from './vendor/wc-range-datepicker/range-datepicker-calendar.js';
|
|
@@ -83,6 +83,8 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
83
83
|
reflect: boolean;
|
|
84
84
|
};
|
|
85
85
|
/**
|
|
86
|
+
* If true, the month will be displayed before the year in the calendar header.
|
|
87
|
+
* Passed to AuroCalendarMonth via utilitesCalendarRender.
|
|
86
88
|
* @private
|
|
87
89
|
*/
|
|
88
90
|
monthFirst: {
|
|
@@ -102,6 +104,19 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
102
104
|
type: BooleanConstructor;
|
|
103
105
|
reflect: boolean;
|
|
104
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* BCP 47 locale tag (such as `en-US`) for calendar localization.
|
|
109
|
+
* as wc-range-datepicker expects a `locale` prop, we use `localeCode` to avoid conflicts and pass the locale down to calendar-month elements.
|
|
110
|
+
*/
|
|
111
|
+
localeCode: {
|
|
112
|
+
type: StringConstructor;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Names of all 12 months. When omitted, names are derived from `localeCode`.
|
|
116
|
+
*/
|
|
117
|
+
monthNames: {
|
|
118
|
+
type: ArrayConstructor;
|
|
119
|
+
};
|
|
105
120
|
};
|
|
106
121
|
/**
|
|
107
122
|
* @private
|
|
@@ -126,6 +126,13 @@ export class AuroDatePicker extends AuroElement {
|
|
|
126
126
|
type: StringConstructor;
|
|
127
127
|
reflect: boolean;
|
|
128
128
|
};
|
|
129
|
+
/**
|
|
130
|
+
* Defines the locale of the element. Used to derive the date format when `format` is not explicitly set.
|
|
131
|
+
*/
|
|
132
|
+
locale: {
|
|
133
|
+
type: StringConstructor;
|
|
134
|
+
reflect: boolean;
|
|
135
|
+
};
|
|
129
136
|
/**
|
|
130
137
|
* Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
131
138
|
*
|
|
@@ -170,17 +177,12 @@ export class AuroDatePicker extends AuroElement {
|
|
|
170
177
|
reflect: boolean;
|
|
171
178
|
};
|
|
172
179
|
/**
|
|
173
|
-
* Names of all 12 months to render in the calendar
|
|
180
|
+
* Names of all 12 months to render in the calendar.
|
|
181
|
+
* When omitted, month names will be automatically populated from the active `locale` (falling back to `en-US`).
|
|
174
182
|
*/
|
|
175
183
|
monthNames: {
|
|
176
184
|
type: ArrayConstructor;
|
|
177
185
|
};
|
|
178
|
-
/**
|
|
179
|
-
* @private
|
|
180
|
-
*/
|
|
181
|
-
monthFirst: {
|
|
182
|
-
type: BooleanConstructor;
|
|
183
|
-
};
|
|
184
186
|
/**
|
|
185
187
|
* If declared, the bib will NOT flip to an alternate position
|
|
186
188
|
* when there isn't enough space in the specified `placement`.
|
|
@@ -346,6 +348,10 @@ export class AuroDatePicker extends AuroElement {
|
|
|
346
348
|
* @private
|
|
347
349
|
*/
|
|
348
350
|
private calendarRenderUtil;
|
|
351
|
+
/**
|
|
352
|
+
* @private
|
|
353
|
+
*/
|
|
354
|
+
private domHandler;
|
|
349
355
|
appearance: string;
|
|
350
356
|
touched: boolean;
|
|
351
357
|
disabled: boolean;
|
|
@@ -361,9 +367,8 @@ export class AuroDatePicker extends AuroElement {
|
|
|
361
367
|
calendarStartDate: any;
|
|
362
368
|
calendarEndDate: any;
|
|
363
369
|
calendarFocusDate: any;
|
|
364
|
-
format: string;
|
|
365
370
|
fullscreenBreakpoint: string;
|
|
366
|
-
|
|
371
|
+
_validLocale: string;
|
|
367
372
|
placement: string;
|
|
368
373
|
offset: number;
|
|
369
374
|
noFlip: boolean;
|
|
@@ -432,7 +437,7 @@ export class AuroDatePicker extends AuroElement {
|
|
|
432
437
|
/**
|
|
433
438
|
* Handles click on the clear button.
|
|
434
439
|
* @private
|
|
435
|
-
* @param {MouseEvent} event
|
|
440
|
+
* @param {MouseEvent} event - The click event object.
|
|
436
441
|
* @returns {void}
|
|
437
442
|
*/
|
|
438
443
|
private handleClearClick;
|
|
@@ -463,8 +468,9 @@ export class AuroDatePicker extends AuroElement {
|
|
|
463
468
|
*/
|
|
464
469
|
private get displayValueFontClass();
|
|
465
470
|
/**
|
|
466
|
-
* @private
|
|
467
471
|
* Common display value wrapper classes.
|
|
472
|
+
* @private
|
|
473
|
+
* @return {Object} - An object containing the common classes for the display value wrapper.
|
|
468
474
|
*/
|
|
469
475
|
private get commonDisplayValueWrapperClasses();
|
|
470
476
|
/**
|
|
@@ -504,21 +510,45 @@ export class AuroDatePicker extends AuroElement {
|
|
|
504
510
|
* @param {String} time - Unix timestamp to be converted to a date object.
|
|
505
511
|
* @returns {Date} Date formatted as a string.
|
|
506
512
|
*/
|
|
507
|
-
/**
|
|
513
|
+
/**
|
|
514
|
+
* Read-only `Date` object derived from `value`. Returns `undefined` when `value` is empty or not a valid date.
|
|
515
|
+
* @returns {Date|undefined}
|
|
516
|
+
*/
|
|
508
517
|
get valueObject(): Date | undefined;
|
|
509
|
-
/**
|
|
518
|
+
/**
|
|
519
|
+
* Read-only `Date` object derived from `valueEnd`. Returns `undefined` when `valueEnd` is empty or not a valid date.
|
|
520
|
+
* @returns {Date|undefined}
|
|
521
|
+
*/
|
|
510
522
|
get valueEndObject(): Date | undefined;
|
|
511
|
-
/**
|
|
523
|
+
/**
|
|
524
|
+
* Read-only `Date` object derived from `minDate`. Returns `undefined` when `minDate` is empty or not a valid date.
|
|
525
|
+
* @returns {Date|undefined}
|
|
526
|
+
*/
|
|
512
527
|
get minDateObject(): Date | undefined;
|
|
513
|
-
/**
|
|
528
|
+
/**
|
|
529
|
+
* Read-only `Date` object derived from `maxDate`. Returns `undefined` when `maxDate` is empty or not a valid date.
|
|
530
|
+
* @returns {Date|undefined}
|
|
531
|
+
*/
|
|
514
532
|
get maxDateObject(): Date | undefined;
|
|
515
|
-
/**
|
|
533
|
+
/**
|
|
534
|
+
* Read-only `Date` object derived from `calendarStartDate`. Returns `undefined` when `calendarStartDate` is empty or not a valid date.
|
|
535
|
+
* @returns {Date|undefined}
|
|
536
|
+
*/
|
|
516
537
|
get calendarStartDateObject(): Date | undefined;
|
|
517
|
-
/**
|
|
538
|
+
/**
|
|
539
|
+
* Read-only `Date` object derived from `calendarEndDate`. Returns `undefined` when `calendarEndDate` is empty or not a valid date.
|
|
540
|
+
* @returns {Date|undefined}
|
|
541
|
+
*/
|
|
518
542
|
get calendarEndDateObject(): Date | undefined;
|
|
519
|
-
/**
|
|
543
|
+
/**
|
|
544
|
+
* Read-only `Date` object derived from `centralDate`. Returns `undefined` when `centralDate` is empty or not a valid date.
|
|
545
|
+
* @returns {Date|undefined}
|
|
546
|
+
*/
|
|
520
547
|
get centralDateObject(): Date | undefined;
|
|
521
|
-
/**
|
|
548
|
+
/**
|
|
549
|
+
* Read-only `Date` object derived from `calendarFocusDate`. Returns `undefined` when `calendarFocusDate` is empty or not a valid date.
|
|
550
|
+
* @returns {Date|undefined}
|
|
551
|
+
*/
|
|
522
552
|
get calendarFocusDateObject(): Date | undefined;
|
|
523
553
|
/**
|
|
524
554
|
* Converts a Unix timestamp (seconds) from the vendor calendar to an ISO date string.
|
|
@@ -636,9 +666,20 @@ export class AuroDatePicker extends AuroElement {
|
|
|
636
666
|
* @private
|
|
637
667
|
*/
|
|
638
668
|
private setHasValue;
|
|
669
|
+
/**
|
|
670
|
+
* Returns `true` when the datepicker has an active validation error.
|
|
671
|
+
* @returns {boolean}
|
|
672
|
+
*/
|
|
639
673
|
get hasError(): boolean;
|
|
640
|
-
|
|
641
|
-
|
|
674
|
+
/**
|
|
675
|
+
* lifecycle method to check if the locale is valid.
|
|
676
|
+
* @ignore
|
|
677
|
+
* @param {Map} changedProperties - The map of properties that have changed since the last update.
|
|
678
|
+
* @returns {void}
|
|
679
|
+
*/
|
|
680
|
+
willUpdate(changedProperties: Map<any, any>): void;
|
|
681
|
+
format: string | undefined;
|
|
682
|
+
updated(changedProperties: any): void;
|
|
642
683
|
previousTabIndex: string | null | undefined;
|
|
643
684
|
/**
|
|
644
685
|
* Handles the transfer of content between slots in the component.
|
|
@@ -656,6 +697,7 @@ export class AuroDatePicker extends AuroElement {
|
|
|
656
697
|
*/
|
|
657
698
|
private configureClickHandler;
|
|
658
699
|
firstUpdated(): void;
|
|
700
|
+
locale: any;
|
|
659
701
|
/**
|
|
660
702
|
* Renders the snowflake layout for the datepicker.
|
|
661
703
|
* @private
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
export class AuroDatepickerUtilities {
|
|
2
|
-
/**
|
|
3
|
-
* Converts an ISO date string (yyyy-mm-dd) to any display format.
|
|
4
|
-
* @param {string} isoStr - ISO date string.
|
|
5
|
-
* @param {string} format - Target display format (e.g. "mm/dd/yyyy", "dd/mm/yyyy").
|
|
6
|
-
* @returns {string|undefined}
|
|
7
|
-
*/
|
|
8
|
-
toCustomFormat(isoStr: string, format: string): string | undefined;
|
|
9
2
|
/**
|
|
10
3
|
* Converts any date object to a date object representing the first day of the month.
|
|
11
4
|
* @param {Object} date - Date to convert to the first day of the month.
|
|
@@ -19,19 +12,6 @@ export class AuroDatepickerUtilities {
|
|
|
19
12
|
* @returns {Number}
|
|
20
13
|
*/
|
|
21
14
|
monthDiff(date1: Object, date2: Object): number;
|
|
22
|
-
/**
|
|
23
|
-
* Convert a date object or timestamp to an ISO string (yyyy-mm-dd).
|
|
24
|
-
* @param {Date|number} date - Date object or timestamp.
|
|
25
|
-
* @returns {string|undefined}
|
|
26
|
-
*/
|
|
27
|
-
getDateAsString(date: Date | number): string | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Function to format a number to two digits.
|
|
30
|
-
* @private
|
|
31
|
-
* @param {Number} num - Number to format.
|
|
32
|
-
* @returns {String}
|
|
33
|
-
*/
|
|
34
|
-
private formatTwoDigits;
|
|
35
15
|
/**
|
|
36
16
|
* Function to generate checkmark svg.
|
|
37
17
|
* @private
|
|
@@ -4,7 +4,6 @@ export class CalendarUtilities {
|
|
|
4
4
|
* Scroll the calendar month list to a given valid date if in mobile view.
|
|
5
5
|
* @param {Object} elem - The calendar element.
|
|
6
6
|
* @param {String} date - The date to scroll into view.
|
|
7
|
-
* @param {String} format - The format of the date.
|
|
8
7
|
* @returns {void}
|
|
9
8
|
*/
|
|
10
9
|
scrollMonthIntoView(elem: Object, date: string): void;
|