@aurodesignsystem-dev/auro-formkit 0.0.0-pr647.2 → 0.0.0-pr647.4
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/bibtemplate/dist/auro-bibtemplate.d.ts +1 -0
- package/components/bibtemplate/dist/index.js +12 -0
- package/components/bibtemplate/dist/registered.js +12 -0
- package/components/checkbox/demo/api.min.js +4 -3
- package/components/checkbox/demo/index.min.js +4 -3
- package/components/checkbox/dist/index.js +4 -3
- package/components/checkbox/dist/registered.js +4 -3
- package/components/combobox/demo/api.md +27 -27
- package/components/combobox/demo/api.min.js +160 -327
- package/components/combobox/demo/index.html +1 -0
- package/components/combobox/demo/index.min.js +158 -325
- package/components/combobox/dist/auro-combobox.d.ts +5 -18
- package/components/combobox/dist/index.js +119 -201
- package/components/combobox/dist/registered.js +119 -201
- package/components/counter/demo/api.min.js +88 -7
- package/components/counter/demo/index.min.js +88 -7
- package/components/counter/dist/index.js +88 -7
- package/components/counter/dist/registered.js +88 -7
- package/components/datepicker/demo/api.min.js +92 -10
- package/components/datepicker/demo/index.min.js +92 -10
- package/components/datepicker/dist/index.js +92 -10
- package/components/datepicker/dist/registered.js +92 -10
- package/components/dropdown/demo/api.min.js +72 -4
- package/components/dropdown/demo/index.min.js +72 -4
- package/components/dropdown/dist/auro-dropdownBib.d.ts +8 -0
- package/components/dropdown/dist/index.js +72 -4
- package/components/dropdown/dist/registered.js +72 -4
- package/components/input/demo/api.min.js +4 -3
- package/components/input/demo/index.min.js +4 -3
- package/components/input/dist/index.js +4 -3
- package/components/input/dist/registered.js +4 -3
- package/components/menu/demo/api.md +11 -11
- package/components/menu/demo/api.min.js +39 -124
- package/components/menu/demo/index.min.js +39 -124
- package/components/menu/dist/auro-menu-utils.d.ts +0 -8
- package/components/menu/dist/auro-menu.d.ts +3 -8
- package/components/menu/dist/index.d.ts +1 -1
- package/components/menu/dist/index.js +40 -84
- package/components/menu/dist/registered.js +39 -124
- package/components/radio/demo/api.min.js +4 -3
- package/components/radio/demo/index.min.js +4 -3
- package/components/radio/dist/index.js +4 -3
- package/components/radio/dist/registered.js +4 -3
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +96 -38
- package/components/select/demo/api.min.js +215 -217
- package/components/select/demo/index.min.js +201 -215
- package/components/select/dist/auro-select.d.ts +14 -14
- package/components/select/dist/index.js +161 -90
- package/components/select/dist/registered.js +161 -90
- package/package.json +3 -3
|
@@ -816,6 +816,18 @@ class AuroBibtemplate extends LitElement {
|
|
|
816
816
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
+
firstUpdated(changedProperties) {
|
|
820
|
+
super.firstUpdated(changedProperties);
|
|
821
|
+
|
|
822
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
823
|
+
bubbles: true,
|
|
824
|
+
composed: true,
|
|
825
|
+
detail: {
|
|
826
|
+
element: this
|
|
827
|
+
}
|
|
828
|
+
}));
|
|
829
|
+
}
|
|
830
|
+
|
|
819
831
|
// function that renders the HTML and CSS into the scope of the component
|
|
820
832
|
render() {
|
|
821
833
|
return html$1`
|
|
@@ -816,6 +816,18 @@ class AuroBibtemplate extends LitElement {
|
|
|
816
816
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
+
firstUpdated(changedProperties) {
|
|
820
|
+
super.firstUpdated(changedProperties);
|
|
821
|
+
|
|
822
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
823
|
+
bubbles: true,
|
|
824
|
+
composed: true,
|
|
825
|
+
detail: {
|
|
826
|
+
element: this
|
|
827
|
+
}
|
|
828
|
+
}));
|
|
829
|
+
}
|
|
830
|
+
|
|
819
831
|
// function that renders the HTML and CSS into the scope of the component
|
|
820
832
|
render() {
|
|
821
833
|
return html$1`
|
|
@@ -449,9 +449,10 @@ class DateFormatter {
|
|
|
449
449
|
/**
|
|
450
450
|
* Convert a date object to string format.
|
|
451
451
|
* @param {Object} date - Date to convert to string.
|
|
452
|
-
* @
|
|
452
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
453
|
+
* @returns {String} Returns the date as a string.
|
|
453
454
|
*/
|
|
454
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
455
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
455
456
|
year: "numeric",
|
|
456
457
|
month: "2-digit",
|
|
457
458
|
day: "2-digit",
|
|
@@ -643,7 +644,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
643
644
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
644
645
|
|
|
645
646
|
// Get the date string of the date object we created from the string date
|
|
646
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
647
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
647
648
|
|
|
648
649
|
// Guard Clause: Generated date matches date string input
|
|
649
650
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -441,9 +441,10 @@ class DateFormatter {
|
|
|
441
441
|
/**
|
|
442
442
|
* Convert a date object to string format.
|
|
443
443
|
* @param {Object} date - Date to convert to string.
|
|
444
|
-
* @
|
|
444
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
445
|
+
* @returns {String} Returns the date as a string.
|
|
445
446
|
*/
|
|
446
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
447
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
447
448
|
year: "numeric",
|
|
448
449
|
month: "2-digit",
|
|
449
450
|
day: "2-digit",
|
|
@@ -635,7 +636,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
635
636
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
636
637
|
|
|
637
638
|
// Get the date string of the date object we created from the string date
|
|
638
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
639
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
639
640
|
|
|
640
641
|
// Guard Clause: Generated date matches date string input
|
|
641
642
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -394,9 +394,10 @@ class DateFormatter {
|
|
|
394
394
|
/**
|
|
395
395
|
* Convert a date object to string format.
|
|
396
396
|
* @param {Object} date - Date to convert to string.
|
|
397
|
-
* @
|
|
397
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
398
|
+
* @returns {String} Returns the date as a string.
|
|
398
399
|
*/
|
|
399
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
400
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
400
401
|
year: "numeric",
|
|
401
402
|
month: "2-digit",
|
|
402
403
|
day: "2-digit",
|
|
@@ -588,7 +589,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
588
589
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
589
590
|
|
|
590
591
|
// Get the date string of the date object we created from the string date
|
|
591
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
592
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
592
593
|
|
|
593
594
|
// Guard Clause: Generated date matches date string input
|
|
594
595
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -394,9 +394,10 @@ class DateFormatter {
|
|
|
394
394
|
/**
|
|
395
395
|
* Convert a date object to string format.
|
|
396
396
|
* @param {Object} date - Date to convert to string.
|
|
397
|
-
* @
|
|
397
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
398
|
+
* @returns {String} Returns the date as a string.
|
|
398
399
|
*/
|
|
399
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
400
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
400
401
|
year: "numeric",
|
|
401
402
|
month: "2-digit",
|
|
402
403
|
day: "2-digit",
|
|
@@ -588,7 +589,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
588
589
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
589
590
|
|
|
590
591
|
// Get the date string of the date object we created from the string date
|
|
591
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
592
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
592
593
|
|
|
593
594
|
// Guard Clause: Generated date matches date string input
|
|
594
595
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -5,31 +5,31 @@
|
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
|
-
| Property | Attribute | Type
|
|
9
|
-
|
|
10
|
-
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean`
|
|
11
|
-
| [autocomplete](#autocomplete) | `autocomplete` | `string`
|
|
12
|
-
| [checkmark](#checkmark) | `checkmark` | `boolean`
|
|
13
|
-
| [disabled](#disabled) | `disabled` | `boolean`
|
|
14
|
-
| [error](#error) | `error` | `string`
|
|
15
|
-
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string`
|
|
16
|
-
| [inputmode](#inputmode) | `inputmode` | `string`
|
|
17
|
-
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean`
|
|
18
|
-
| [noFilter](#noFilter) | `noFilter` | `boolean`
|
|
19
|
-
| [noFlip](#noFlip) | `noFlip` | `boolean`
|
|
20
|
-
| [noValidate](#noValidate) | `noValidate` | `boolean`
|
|
21
|
-
| [offset](#offset) | `offset` | `number`
|
|
22
|
-
| [onDark](#onDark) | `onDark` | `boolean`
|
|
23
|
-
| [optionSelected](#optionSelected) | `optionSelected` | `
|
|
24
|
-
| [placement](#placement) | `placement` | `string`
|
|
25
|
-
| [required](#required) | `required` | `boolean`
|
|
26
|
-
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string`
|
|
27
|
-
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string`
|
|
28
|
-
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string`
|
|
29
|
-
| [triggerIcon](#triggerIcon) | `triggerIcon` | `boolean`
|
|
30
|
-
| [type](#type) | `type` | `string`
|
|
31
|
-
| [validity](#validity) | `validity` | `string`
|
|
32
|
-
| [value](#value) | `value` | `
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|---------------------------------|---------------------------------|---------------|----------------|--------------------------------------------------|
|
|
10
|
+
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | | If declared, bib's position will be automatically calculated where to appear. |
|
|
11
|
+
| [autocomplete](#autocomplete) | `autocomplete` | `string` | "false" | An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported. |
|
|
12
|
+
| [checkmark](#checkmark) | `checkmark` | `boolean` | | When attribute is present auro-menu will apply checkmarks to selected options. |
|
|
13
|
+
| [disabled](#disabled) | `disabled` | `boolean` | | If set, disables the combobox. |
|
|
14
|
+
| [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
15
|
+
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string` | "sm" | Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)<br />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. |
|
|
16
|
+
| [inputmode](#inputmode) | `inputmode` | `string` | | Exposes inputmode attribute for input. |
|
|
17
|
+
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600 |
|
|
18
|
+
| [noFilter](#noFilter) | `noFilter` | `boolean` | | If set, combobox will not filter menuoptions based in input. |
|
|
19
|
+
| [noFlip](#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`. |
|
|
20
|
+
| [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
|
|
21
|
+
| [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
|
|
22
|
+
| [onDark](#onDark) | `onDark` | `boolean` | | If declared, onDark styles will be applied to the trigger. |
|
|
23
|
+
| [optionSelected](#optionSelected) | `optionSelected` | `HTMLElement` | | Specifies the current selected option. |
|
|
24
|
+
| [placement](#placement) | `placement` | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end" |
|
|
25
|
+
| [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the input. Used for client-side validation. |
|
|
26
|
+
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
27
|
+
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
|
|
28
|
+
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
29
|
+
| [triggerIcon](#triggerIcon) | `triggerIcon` | `boolean` | | If set, the `icon` attribute will be applied to the trigger `auro-input` element. |
|
|
30
|
+
| [type](#type) | `type` | `string` | | Applies the defined value as the type attribute on auro-input. |
|
|
31
|
+
| [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
|
|
32
|
+
| [value](#value) | `value` | `string` | | Value selected for the dropdown menu. |
|
|
33
33
|
|
|
34
34
|
## Methods
|
|
35
35
|
|
|
@@ -684,11 +684,11 @@ export function valueExample() {
|
|
|
684
684
|
const valueExample = document.querySelector('#valueExample');
|
|
685
685
|
|
|
686
686
|
document.querySelector('#valueValidExampleBtn').addEventListener('click', () => {
|
|
687
|
-
valueExample.value =
|
|
687
|
+
valueExample.value = 'Oranges';
|
|
688
688
|
});
|
|
689
689
|
|
|
690
690
|
document.querySelector('#valueInvalidExampleBtn').addEventListener('click', () => {
|
|
691
|
-
valueExample.value =
|
|
691
|
+
valueExample.value = 'Dragon Fruit';
|
|
692
692
|
});
|
|
693
693
|
|
|
694
694
|
document.querySelector('#valueUndefinedExampleBtn').addEventListener('click', () => {
|