@aurodesignsystem-dev/auro-formkit 0.0.0-pr1503.3 → 0.0.0-pr1503.5
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/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/demo/accessibility.md +1 -1
- package/components/checkbox/demo/customize.html +1 -2
- package/components/checkbox/demo/customize.min.js +23 -8
- package/components/checkbox/demo/getting-started.min.js +23 -8
- package/components/checkbox/demo/index.min.js +23 -8
- package/components/checkbox/dist/index.js +23 -8
- package/components/checkbox/dist/registered.js +23 -8
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/accessibility.md +1 -1
- package/components/combobox/demo/api.md +2 -2
- package/components/combobox/demo/customize.html +1 -2
- package/components/combobox/demo/customize.md +166 -142
- package/components/combobox/demo/customize.min.js +2515 -2316
- package/components/combobox/demo/getting-started.min.js +2515 -2312
- package/components/combobox/demo/index.md +2 -1
- package/components/combobox/demo/index.min.js +2515 -2312
- package/components/combobox/demo/keyboard-behavior.md +3 -146
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/demo/why-combobox.md +2 -2
- package/components/combobox/dist/auro-combobox.d.ts +49 -15
- package/components/combobox/dist/index.js +1462 -753
- package/components/combobox/dist/registered.js +1462 -753
- package/components/counter/demo/customize.min.js +188 -244
- package/components/counter/demo/index.min.js +188 -244
- package/components/counter/dist/auro-counter.d.ts +0 -8
- package/components/counter/dist/index.js +188 -244
- package/components/counter/dist/registered.js +188 -244
- package/components/datepicker/demo/accessibility.md +20 -10
- package/components/datepicker/demo/api.md +65 -62
- package/components/datepicker/demo/customize.md +180 -40
- package/components/datepicker/demo/customize.min.js +1690 -777
- package/components/datepicker/demo/getting-started.md +118 -2
- package/components/datepicker/demo/index.min.js +1690 -759
- package/components/datepicker/demo/keyboard-behavior.md +3 -3
- package/components/datepicker/demo/voiceover.md +4 -4
- package/components/datepicker/demo/why-datepicker.md +2 -2
- package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +48 -3
- package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +188 -10
- package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +89 -6
- package/components/datepicker/dist/blackoutUtils.d.ts +43 -0
- package/components/datepicker/dist/index.js +1690 -759
- package/components/datepicker/dist/registered.js +1690 -759
- package/components/dropdown/demo/customize.html +3 -0
- package/components/dropdown/demo/customize.min.js +142 -208
- package/components/dropdown/demo/getting-started.min.js +131 -207
- package/components/dropdown/demo/index.min.js +131 -207
- package/components/dropdown/dist/auro-dropdown.d.ts +17 -1
- package/components/dropdown/dist/index.js +131 -207
- package/components/dropdown/dist/registered.js +131 -207
- package/components/form/demo/api.md +3 -3
- package/components/form/demo/customize.html +6 -6
- package/components/form/demo/customize.md +535 -135
- package/components/form/demo/customize.min.js +6307 -4378
- package/components/form/demo/getting-started.md +344 -96
- package/components/form/demo/getting-started.min.js +6255 -4378
- package/components/form/demo/index.min.js +6206 -4378
- package/components/form/demo/registerDemoDeps.min.js +5827 -4333
- package/components/form/dist/auro-form.d.ts +128 -10
- package/components/form/dist/index.js +377 -43
- package/components/form/dist/registered.js +377 -43
- package/components/input/demo/accessibility.md +1 -1
- package/components/input/demo/api.md +58 -57
- package/components/input/demo/customize.html +1 -2
- package/components/input/demo/customize.md +62 -61
- package/components/input/demo/customize.min.js +396 -275
- package/components/input/demo/getting-started.min.js +396 -275
- package/components/input/demo/index.min.js +396 -275
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +60 -81
- package/components/input/dist/index.js +409 -276
- package/components/input/dist/registered.js +396 -275
- package/components/input/dist/utilities.d.ts +10 -1
- package/components/menu/demo/accessibility.md +9 -4
- package/components/menu/demo/api.md +48 -45
- package/components/menu/demo/css-only.md +26 -19
- package/components/menu/demo/customize.md +307 -75
- package/components/menu/demo/design.md +1 -1
- package/components/menu/demo/getting-started.md +144 -7
- package/components/menu/demo/index.min.js +961 -1341
- package/components/menu/demo/keyboard-behavior.md +83 -4
- package/components/menu/demo/voiceover.md +21 -14
- package/components/menu/demo/why-menu.md +8 -9
- package/components/menu/dist/auro-menu-utils.d.ts +19 -0
- package/components/menu/dist/auro-menu.d.ts +97 -116
- package/components/menu/dist/auro-menuoption.d.ts +39 -133
- package/components/menu/dist/index.js +823 -1309
- package/components/menu/dist/registered.js +835 -1309
- package/components/radio/demo/accessibility.md +1 -1
- package/components/radio/demo/customize.min.js +23 -8
- package/components/radio/demo/getting-started.min.js +23 -8
- package/components/radio/demo/index.min.js +23 -8
- package/components/radio/dist/index.js +23 -8
- package/components/radio/dist/registered.js +23 -8
- package/components/select/demo/accessibility.md +6 -1
- package/components/select/demo/api.md +3 -2
- package/components/select/demo/customize.html +1 -2
- package/components/select/demo/customize.md +210 -5
- package/components/select/demo/customize.min.js +1613 -1854
- package/components/select/demo/design.md +10 -10
- package/components/select/demo/getting-started.md +1 -1
- package/components/select/demo/getting-started.min.js +1617 -1903
- package/components/select/demo/index.md +2 -2
- package/components/select/demo/index.min.js +1613 -1854
- package/components/select/demo/keyboard-behavior.md +81 -54
- package/components/select/demo/voiceover.md +28 -15
- package/components/select/dist/auro-select.d.ts +70 -12
- package/components/select/dist/index.js +580 -315
- package/components/select/dist/registered.js +580 -315
- package/components/select/dist/selectUtils.d.ts +24 -0
- package/custom-elements.json +8071 -7919
- package/package.json +7 -3
- package/components/checkbox/demo/customize.js +0 -22
- package/components/checkbox/demo/demo-support.js +0 -1
- package/components/checkbox/demo/getting-started.js +0 -22
- package/components/checkbox/demo/index.js +0 -8
- package/components/checkbox/demo/styles.scss +0 -1
- package/components/combobox/demo/customize.js +0 -24
- package/components/combobox/demo/demo-support.js +0 -1
- package/components/combobox/demo/getting-started.js +0 -21
- package/components/combobox/demo/index.js +0 -23
- package/components/combobox/demo/styles.scss +0 -1
- package/components/counter/demo/customize.js +0 -21
- package/components/counter/demo/demo-support.js +0 -1
- package/components/counter/demo/index.js +0 -21
- package/components/counter/demo/styles.scss +0 -1
- package/components/datepicker/demo/customize.js +0 -19
- package/components/datepicker/demo/demo-support.js +0 -1
- package/components/datepicker/demo/index.js +0 -23
- package/components/datepicker/demo/styles.scss +0 -1
- package/components/dropdown/demo/customize.js +0 -9
- package/components/dropdown/demo/demo-support.js +0 -1
- package/components/dropdown/demo/getting-started.js +0 -9
- package/components/dropdown/demo/index.js +0 -16
- package/components/dropdown/demo/styles.scss +0 -1
- package/components/form/demo/customize.js +0 -9
- package/components/form/demo/demo-support.js +0 -1
- package/components/form/demo/getting-started.js +0 -9
- package/components/form/demo/index.js +0 -5
- package/components/form/demo/registerDemoDeps.js +0 -23
- package/components/form/demo/styles.scss +0 -1
- package/components/input/demo/customize.js +0 -25
- package/components/input/demo/demo-support.js +0 -1
- package/components/input/demo/getting-started.js +0 -8
- package/components/input/demo/index.js +0 -8
- package/components/input/demo/styles.css +0 -974
- package/components/input/demo/styles.scss +0 -1
- package/components/menu/demo/demo-support.js +0 -1
- package/components/menu/demo/index.js +0 -25
- package/components/menu/demo/styles.scss +0 -1
- package/components/menu/dist/auro-menu.context.d.ts +0 -238
- package/components/radio/demo/customize.js +0 -22
- package/components/radio/demo/demo-support.js +0 -1
- package/components/radio/demo/getting-started.js +0 -24
- package/components/radio/demo/index.js +0 -8
- package/components/radio/demo/styles.scss +0 -1
- package/components/select/demo/customize.js +0 -11
- package/components/select/demo/demo-support.js +0 -1
- package/components/select/demo/getting-started.js +0 -26
- package/components/select/demo/index.js +0 -11
- package/components/select/demo/styles.scss +0 -1
- /package/components/counter/dist/styles/{counter-wrapper-color-css.d.ts → counter-group-color-css.d.ts} +0 -0
- /package/components/datepicker/dist/{src/auro-calendar-month.d.ts → auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{src/buttonVersion.d.ts → buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/datepickerKeyboardStrategy.d.ts → datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{src/iconVersion.d.ts → iconVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/components/datepicker/dist/{src/popoverVersion.d.ts → popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/utilities.d.ts → utilities.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendar.d.ts → utilitiesCalendar.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendarRender.d.ts → utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker.d.ts +0 -0
|
@@ -7,63 +7,64 @@ The `auro-input` element provides users a way to enter data into a text field.
|
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
9
|
|
|
10
|
-
| Property
|
|
11
|
-
|
|
12
|
-
| `a11yActivedescendant`
|
|
13
|
-
| `a11yControls`
|
|
14
|
-
| `a11yExpanded`
|
|
15
|
-
| `a11yRole`
|
|
16
|
-
| `activeLabel`
|
|
17
|
-
| `appearance`
|
|
18
|
-
| `autocapitalize`
|
|
19
|
-
| `autocomplete`
|
|
20
|
-
| `autocorrect`
|
|
21
|
-
| `customValidityTypeEmail`
|
|
22
|
-
| `disabled`
|
|
23
|
-
| `dvInputOnly`
|
|
24
|
-
| `error`
|
|
25
|
-
| `errorMessage`
|
|
26
|
-
| `format`
|
|
27
|
-
| `hasFocus`
|
|
28
|
-
| `hasValue`
|
|
29
|
-
| `icon`
|
|
30
|
-
| `id`
|
|
31
|
-
| `inputmode`
|
|
32
|
-
| `lang`
|
|
33
|
-
| `layout`
|
|
34
|
-
| `locale`
|
|
35
|
-
| `max`
|
|
36
|
-
| `maxLength`
|
|
37
|
-
| `maxObject`
|
|
38
|
-
| `min`
|
|
39
|
-
| `minLength`
|
|
40
|
-
| `minObject`
|
|
41
|
-
| `name`
|
|
42
|
-
| `nested`
|
|
43
|
-
| `noValidate`
|
|
44
|
-
| `onDark`
|
|
45
|
-
| `pattern`
|
|
46
|
-
| `placeholder`
|
|
47
|
-
| `readonly`
|
|
48
|
-
| `required`
|
|
49
|
-
| `setCustomValidity`
|
|
50
|
-
| `setCustomValidityBadInput`
|
|
51
|
-
| `setCustomValidityCustomError`
|
|
52
|
-
| `setCustomValidityForType`
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
10
|
+
| Property | Attribute | Modifiers | Type | Default | Description |
|
|
11
|
+
|------------------------------------|------------------------------------|-----------|--------------------------------------------------|-------------|--------------------------------------------------|
|
|
12
|
+
| `a11yActivedescendant` | `a11yActivedescendant` | | `string` | | The value for the aria-activedescendant attribute.<br />Points to the ID of the currently active/highlighted option in a listbox. |
|
|
13
|
+
| `a11yControls` | `a11yControls` | | `string` | | The value for the aria-controls attribute. |
|
|
14
|
+
| `a11yExpanded` | `a11yExpanded` | | `boolean` | | The value for the aria-expanded attribute. |
|
|
15
|
+
| `a11yRole` | `a11yRole` | | `string` | | The value for the role attribute. |
|
|
16
|
+
| `activeLabel` | `activeLabel` | | `boolean` | false | If set, the label will remain fixed in the active position. |
|
|
17
|
+
| `appearance` | `appearance` | | `'default' \| 'inverse'` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
|
|
18
|
+
| `autocapitalize` | `autocapitalize` | | `string` | | An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. [off/none, on/sentences, words, characters]. |
|
|
19
|
+
| `autocomplete` | `autocomplete` | | `string` | | An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported. |
|
|
20
|
+
| `autocorrect` | `autocorrect` | | `string` | | When set to `off`, stops iOS from auto-correcting words when typed into a text box. |
|
|
21
|
+
| `customValidityTypeEmail` | `customValidityTypeEmail` | | `string` | | Custom help text message for email type validity. |
|
|
22
|
+
| `disabled` | `disabled` | | `boolean` | false | If set, disables the input. |
|
|
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 `setCustomValidity` = attribute value. |
|
|
25
|
+
| `errorMessage` | `errorMessage` | | `string` | | Contains the help text message for the current validity error. |
|
|
26
|
+
| `format` | `format` | | `string` | | Specifies the input mask format. |
|
|
27
|
+
| `hasFocus` | | | `boolean` | | Flag to indicate if the input currently has focus. |
|
|
28
|
+
| `hasValue` | | | `boolean` | false | Flag to indicate if the input currently has value. |
|
|
29
|
+
| `icon` | `icon` | | `boolean` | false | If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format. |
|
|
30
|
+
| `id` | `id` | | `string` | | The id global attribute defines an identifier (ID) which must be unique in the whole document. |
|
|
31
|
+
| `inputmode` | `inputmode` | | `string` | | Exposes inputmode attribute for input. |
|
|
32
|
+
| `lang` | `lang` | | `string` | | Defines the language of an element. |
|
|
33
|
+
| `layout` | | | `string` | "classic" | |
|
|
34
|
+
| `locale` | `locale` | | `string` | "en-US" | Defines the locale of an element.<br />Used for locale-specific formatting, such as date formats. |
|
|
35
|
+
| `max` | `max` | | `string` | "undefined" | The maximum value allowed. This only applies for inputs with a type of `number` and ISO format. |
|
|
36
|
+
| `maxLength` | `maxLength` | | `number` | "undefined" | The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.<br />**Note**: This attribute is not intended to be used with a `type` or `format` that already has a defined length, such as credit-cards, dates or phone numbers. |
|
|
37
|
+
| `maxObject` | | readonly | `Date \| undefined` | | Read-only Date object representation of `max` for full date formats. |
|
|
38
|
+
| `min` | `min` | | `string` | "undefined" | The minimum value allowed. This only applies for inputs with a type of `number` and ISO date format. |
|
|
39
|
+
| `minLength` | `minLength` | | `number` | "undefined" | The minimum number of characters the user can enter into the text input. This must be a non-negative integer value smaller than or equal to the value specified by `maxlength`. |
|
|
40
|
+
| `minObject` | | readonly | `Date \| undefined` | | Read-only Date object representation of `min` for full date formats. |
|
|
41
|
+
| `name` | `name` | | `string` | | Populates the `name` attribute on the input. |
|
|
42
|
+
| `nested` | `nested` | | `boolean` | | Sets styles for nested operation - removes borders, hides help + error text, and<br />hides accents. |
|
|
43
|
+
| `noValidate` | `noValidate` | | `boolean` | false | If set, disables auto-validation on blur. |
|
|
44
|
+
| `onDark` | `onDark` | | `boolean` | false | DEPRECATED - use `appearance="inverse"` instead. |
|
|
45
|
+
| `pattern` | `pattern` | | `string` | | Specifies a regular expression the form control's value should match. |
|
|
46
|
+
| `placeholder` | `placeholder` | | `string` | | Define custom placeholder text. |
|
|
47
|
+
| `readonly` | `readonly` | | `boolean` | | Makes the input read-only, but can be set programmatically. |
|
|
48
|
+
| `required` | `required` | | `boolean` | false | Populates the `required` attribute on the input. Used for client-side validation. |
|
|
49
|
+
| `setCustomValidity` | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
50
|
+
| `setCustomValidityBadInput` | `setCustomValidityBadInput` | | `string` | | Custom help text message to display when validity = `badInput`. |
|
|
51
|
+
| `setCustomValidityCustomError` | `setCustomValidityCustomError` | | `string` | | Custom help text message to display when validity = `customError`. |
|
|
52
|
+
| `setCustomValidityForType` | `setCustomValidityForType` | | `string` | "undefined" | Custom help text message to display for the declared element `type` and type validity fails. |
|
|
53
|
+
| `setCustomValidityPatternMismatch` | `setCustomValidityPatternMismatch` | | `string` | | Custom help text message to display when validity = `patternMismatch`. |
|
|
54
|
+
| `setCustomValidityRangeOverflow` | `setCustomValidityRangeOverflow` | | `string` | | Custom help text message to display when validity = `rangeOverflow`. |
|
|
55
|
+
| `setCustomValidityRangeUnderflow` | `setCustomValidityRangeUnderflow` | | `string` | | Custom help text message to display when validity = `rangeUnderflow`. |
|
|
56
|
+
| `setCustomValidityTooLong` | `setCustomValidityTooLong` | | `string` | | Custom help text message to display when validity = `tooLong`. |
|
|
57
|
+
| `setCustomValidityTooShort` | `setCustomValidityTooShort` | | `string` | | Custom help text message to display when validity = `tooShort`. |
|
|
58
|
+
| `setCustomValidityValueMissing` | `setCustomValidityValueMissing` | | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
59
|
+
| `shape` | | | `string` | "classic" | |
|
|
60
|
+
| `simple` | `simple` | | `boolean` | | Simple makes the input render without a border. |
|
|
61
|
+
| `size` | | | `string` | "lg" | |
|
|
62
|
+
| `spellcheck` | `spellcheck` | | `string` | | An enumerated attribute defines whether the element may be checked for spelling errors. [true, false]. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`. |
|
|
63
|
+
| `type` | `type` | | `'text' \| 'password' \| 'email' \| 'credit-card' \| 'tel' \| 'number' \| 'date'` | "'text'" | Populates the `type` attribute on the input. |
|
|
64
|
+
| `validateOnInput` | `validateOnInput` | | `boolean` | | Sets validation mode to re-eval with each input. |
|
|
65
|
+
| `validity` | `validity` | | `string` | | Specifies the `validityState` this element is in. |
|
|
66
|
+
| `value` | `value` | | `string` | "undefined" | Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.<br />For `date` type inputs using a full date format (year/month/day), the `value` should be ISO (YYYY-MM-DD). Partial date formats use the display format. |
|
|
67
|
+
| `valueObject` | | readonly | `Date \| undefined` | | Read-only Date object representation of `value` for full date formats. |
|
|
67
68
|
|
|
68
69
|
## Methods
|
|
69
70
|
|
|
@@ -42,12 +42,11 @@
|
|
|
42
42
|
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
|
|
43
43
|
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/+esm" type="module"></script>
|
|
44
44
|
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-radio/+esm" type="module"></script>
|
|
45
|
-
<script type="module">
|
|
45
|
+
<script type="module" data-demo-script="true">
|
|
46
46
|
import { renderPage } from './demo-support.min.js';
|
|
47
47
|
await renderPage('./customize.md');
|
|
48
48
|
import { initExamples } from "./customize.min.js";
|
|
49
49
|
initExamples();
|
|
50
50
|
</script>
|
|
51
|
-
<script src="./customize.min.js" data-demo-script="true" type="module"></script>
|
|
52
51
|
</body>
|
|
53
52
|
</html>
|
|
@@ -232,21 +232,19 @@
|
|
|
232
232
|
<auro-header level="3" id="localization">Localization</auro-header>
|
|
233
233
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/customize/localization.md) -->
|
|
234
234
|
<!-- The below content is automatically added from ./../docs/partials/customize/localization.md -->
|
|
235
|
-
<p>The component supports complete localization, including visible strings, screen reader announcements and locale
|
|
236
|
-
<auro-header level="4" id="localizationVisibleStrings">Visible
|
|
235
|
+
<p>The component supports complete localization, including visible strings, screen reader announcements, and locale-based date formatting.</p>
|
|
236
|
+
<auro-header level="4" id="localizationVisibleStrings">Visible Strings</auro-header>
|
|
237
237
|
<p>The visible strings rendered in the input are not derived from <code>locale</code> — they are projected through named slots so each language can supply its own translation. Pass a <code><span></code> with the matching <code>slot</code> attribute for every string you need to localize.</p>
|
|
238
238
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/localization-visible-strings.html) -->
|
|
239
|
-
<!-- The below content is automatically added from ./../apiExamples/localization-visible-strings.html -->
|
|
240
|
-
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
<span slot="ariaLabel.password.hide">パスワードを非表示</span>
|
|
247
|
-
</auro-input>
|
|
239
|
+
<!-- The below content is automatically added from ./../apiExamples/localization-visible-strings.html -->
|
|
240
|
+
|
|
241
|
+
<pre class="language-diff"><code class="language-diff"> <auro-input>
|
|
242
|
+
+ <span slot="label">出発日</span>
|
|
243
|
+
+ <span slot="helpText">日付を選択してください</span>
|
|
244
|
+
+ <span slot="optionalLabel">(任意)</span>
|
|
245
|
+
</auro-input></code></pre>
|
|
248
246
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
249
|
-
<auro-header level="4" id="localizationA11yStrings">Screen
|
|
247
|
+
<auro-header level="4" id="localizationA11yStrings">Screen Reader Strings</auro-header>
|
|
250
248
|
<p>Assistive-technology announcements that are not visible in the UI are also exposed as named slots so they can be translated independently. These strings are not derived from <code>locale</code>; supply translated values for every language you support.</p>
|
|
251
249
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/localization-screenreader-strings.html) -->
|
|
252
250
|
<!-- The below content is automatically added from ./../apiExamples/localization-screenreader-strings.html -->
|
|
@@ -261,7 +259,7 @@
|
|
|
261
259
|
</auro-input></code></pre>
|
|
262
260
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
263
261
|
<p class="note"><strong>Note:</strong> Custom validation messages set via <code>setCustomValidity*</code> attributes are also not localized — supply translated strings yourself when using those properties.</p>
|
|
264
|
-
<auro-header level="4" id="localizationDateFormatting">Date
|
|
262
|
+
<auro-header level="4" id="localizationDateFormatting">Date Formatting</auro-header>
|
|
265
263
|
<p>When <code>type="date"</code> is set, the <code>locale</code> attribute drives the date format used by the input mask. Setting <code>locale</code> automatically selects the regional format (for example <code>en-US</code> → <code>mm/dd/yyyy</code>, <code>de-DE</code> → <code>dd.mm.yyyy</code>, <code>ja-JP</code> → <code>yyyy/mm/dd</code>), derived from the browser's <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl" target="_blank">Intl</auro-hyperlink> API, so <code>format</code> does not need to be set manually.</p>
|
|
266
264
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/localization-locale.html) -->
|
|
267
265
|
<!-- The below content is automatically added from ./../apiExamples/localization-locale.html -->
|
|
@@ -298,41 +296,43 @@
|
|
|
298
296
|
<span slot="optionalLabel">(freiwillig)</span>
|
|
299
297
|
</auro-input></code></pre>
|
|
300
298
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
299
|
+
<p>The following live example shows several locale configurations in action:</p>
|
|
301
300
|
<div class="exampleWrapper">
|
|
302
301
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/locale.html) -->
|
|
303
302
|
<!-- The below content is automatically added from ./../apiExamples/locale.html -->
|
|
304
|
-
<
|
|
305
|
-
<auro-header level="4">en-GB Example</auro-header>
|
|
303
|
+
<p class="body-sm"><strong>en-GB</strong></p>
|
|
306
304
|
<auro-input type="date" locale="en-GB">
|
|
307
305
|
<span slot="ariaLabel.clear">Clear All</span>
|
|
308
306
|
<span slot="label">en-GB Date</span>
|
|
309
307
|
<span slot="helpText">Help Text</span>
|
|
310
308
|
</auro-input>
|
|
311
|
-
<
|
|
309
|
+
<p class="body-sm"><strong>en-US</strong></p>
|
|
312
310
|
<auro-input type="date" locale="en-US">
|
|
313
311
|
<span slot="ariaLabel.clear">Clear All</span>
|
|
314
312
|
<span slot="label">en-US Date</span>
|
|
315
313
|
<span slot="helpText">Help Text</span>
|
|
316
314
|
</auro-input>
|
|
317
|
-
<
|
|
315
|
+
<p class="body-sm"><strong>zh-CN</strong></p>
|
|
318
316
|
<auro-input type="date" locale="zh-CN">
|
|
319
317
|
<span slot="ariaLabel.clear">全部清除</span>
|
|
320
318
|
<span slot="label">中文日期</span>
|
|
321
319
|
<span slot="helpText">帮助文本</span>
|
|
322
320
|
<span slot="optionalLabel">(可选)</span>
|
|
323
321
|
</auro-input>
|
|
324
|
-
<
|
|
325
|
-
<auro-input type="date">
|
|
326
|
-
<span slot="ariaLabel.clear">Alles löschen</span>
|
|
327
|
-
<span slot="label">Nächstes `data-locale`-Attributformat (`de-DE` in diesem Fall)</span>
|
|
328
|
-
<span slot="helpText">Hilfetext</span>
|
|
329
|
-
<span slot="optionalLabel">(freiwillig)</span>
|
|
330
|
-
</auro-input>
|
|
331
|
-
<auro-header level="4">en-US with `yyyy.mm.dd` format Example</auro-header>
|
|
322
|
+
<p class="body-sm"><strong>en-US with explicit <code>format="yyyy.mm.dd"</code></strong></p>
|
|
332
323
|
<auro-input type="date" locale="en-US" format="yyyy.mm.dd">
|
|
333
324
|
<span slot="ariaLabel.clear">Clear All</span>
|
|
334
325
|
<span slot="label">en-US with yyyy.mm.dd format</span>
|
|
335
326
|
<span slot="helpText">Help Text</span>
|
|
327
|
+
</auro-input>
|
|
328
|
+
<p class="body-sm"><strong>Inherited de-DE (via <code>data-locale</code>)</strong></p>
|
|
329
|
+
<div data-locale="de-DE">
|
|
330
|
+
<auro-input type="date">
|
|
331
|
+
<span slot="ariaLabel.clear">Alles löschen</span>
|
|
332
|
+
<span slot="label">Abreisedatum (geerbt aus `data-locale="de-DE"`)</span>
|
|
333
|
+
<span slot="helpText">Hilfetext</span>
|
|
334
|
+
<span slot="optionalLabel">(freiwillig)</span>
|
|
335
|
+
</auro-input>
|
|
336
336
|
</div>
|
|
337
337
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
338
338
|
</div>
|
|
@@ -340,42 +340,43 @@
|
|
|
340
340
|
<span slot="trigger">See code</span>
|
|
341
341
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/locale.html) -->
|
|
342
342
|
<!-- The below code snippet is automatically added from ./../apiExamples/locale.html -->
|
|
343
|
-
<pre class="language-html"><code class="language-html"><
|
|
344
|
-
|
|
345
|
-
<
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
</auro-input>
|
|
343
|
+
<pre class="language-html"><code class="language-html"><p class="body-sm"><strong>en-GB</strong></p>
|
|
344
|
+
<auro-input type="date" locale="en-GB">
|
|
345
|
+
<span slot="ariaLabel.clear">Clear All</span>
|
|
346
|
+
<span slot="label">en-GB Date</span>
|
|
347
|
+
<span slot="helpText">Help Text</span>
|
|
348
|
+
</auro-input>
|
|
350
349
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
350
|
+
<p class="body-sm"><strong>en-US</strong></p>
|
|
351
|
+
<auro-input type="date" locale="en-US">
|
|
352
|
+
<span slot="ariaLabel.clear">Clear All</span>
|
|
353
|
+
<span slot="label">en-US Date</span>
|
|
354
|
+
<span slot="helpText">Help Text</span>
|
|
355
|
+
</auro-input>
|
|
357
356
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
357
|
+
<p class="body-sm"><strong>zh-CN</strong></p>
|
|
358
|
+
<auro-input type="date" locale="zh-CN">
|
|
359
|
+
<span slot="ariaLabel.clear">全部清除</span>
|
|
360
|
+
<span slot="label">中文日期</span>
|
|
361
|
+
<span slot="helpText">帮助文本</span>
|
|
362
|
+
<span slot="optionalLabel">(可选)</span>
|
|
363
|
+
</auro-input>
|
|
365
364
|
|
|
366
|
-
|
|
365
|
+
<p class="body-sm"><strong>en-US with explicit <code>format="yyyy.mm.dd"</code></strong></p>
|
|
366
|
+
<auro-input type="date" locale="en-US" format="yyyy.mm.dd">
|
|
367
|
+
<span slot="ariaLabel.clear">Clear All</span>
|
|
368
|
+
<span slot="label">en-US with yyyy.mm.dd format</span>
|
|
369
|
+
<span slot="helpText">Help Text</span>
|
|
370
|
+
</auro-input>
|
|
371
|
+
|
|
372
|
+
<p class="body-sm"><strong>Inherited de-DE (via <code>data-locale</code>)</strong></p>
|
|
373
|
+
<div data-locale="de-DE">
|
|
367
374
|
<auro-input type="date">
|
|
368
375
|
<span slot="ariaLabel.clear">Alles löschen</span>
|
|
369
|
-
<span slot="label">
|
|
376
|
+
<span slot="label">Abreisedatum (geerbt aus `data-locale="de-DE"`)</span>
|
|
370
377
|
<span slot="helpText">Hilfetext</span>
|
|
371
378
|
<span slot="optionalLabel">(freiwillig)</span>
|
|
372
379
|
</auro-input>
|
|
373
|
-
|
|
374
|
-
<auro-header level="4">en-US with `yyyy.mm.dd` format Example</auro-header>
|
|
375
|
-
<auro-input type="date" locale="en-US" format="yyyy.mm.dd">
|
|
376
|
-
<span slot="ariaLabel.clear">Clear All</span>
|
|
377
|
-
<span slot="label">en-US with yyyy.mm.dd format</span>
|
|
378
|
-
<span slot="helpText">Help Text</span>
|
|
379
380
|
</div></code></pre>
|
|
380
381
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
381
382
|
</auro-accordion>
|
|
@@ -645,7 +646,7 @@
|
|
|
645
646
|
<div class="exampleWrapper">
|
|
646
647
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/set-custom-validity-range-overflow.html) -->
|
|
647
648
|
<!-- The below content is automatically added from ../apiExamples/set-custom-validity-range-overflow.html -->
|
|
648
|
-
<auro-input type="date" max="12
|
|
649
|
+
<auro-input type="date" max="2025-12-31" setCustomValidityRangeOverflow="Date must be on or before 12/31/2025.">
|
|
649
650
|
<span slot="label">Event Date</span>
|
|
650
651
|
<span slot="helpText">Enter a date no later than 12/31/2025.</span>
|
|
651
652
|
</auro-input>
|
|
@@ -655,7 +656,7 @@
|
|
|
655
656
|
<span slot="trigger">See code</span>
|
|
656
657
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/set-custom-validity-range-overflow.html) -->
|
|
657
658
|
<!-- The below code snippet is automatically added from ../apiExamples/set-custom-validity-range-overflow.html -->
|
|
658
|
-
<pre class="language-html"><code class="language-html"><auro-input type="date" max="12
|
|
659
|
+
<pre class="language-html"><code class="language-html"><auro-input type="date" max="2025-12-31" setCustomValidityRangeOverflow="Date must be on or before 12/31/2025.">
|
|
659
660
|
<span slot="label">Event Date</span>
|
|
660
661
|
<span slot="helpText">Enter a date no later than 12/31/2025.</span>
|
|
661
662
|
</auro-input></code></pre>
|
|
@@ -666,7 +667,7 @@
|
|
|
666
667
|
<div class="exampleWrapper">
|
|
667
668
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/set-custom-validity-range-underflow.html) -->
|
|
668
669
|
<!-- The below content is automatically added from ../apiExamples/set-custom-validity-range-underflow.html -->
|
|
669
|
-
<auro-input type="date" min="01
|
|
670
|
+
<auro-input type="date" min="2024-01-01" setCustomValidityRangeUnderflow="Date must be on or after 01/01/2024.">
|
|
670
671
|
<span slot="label">Start Date</span>
|
|
671
672
|
<span slot="helpText">Enter a date no earlier than 01/01/2024.</span>
|
|
672
673
|
</auro-input>
|
|
@@ -676,7 +677,7 @@
|
|
|
676
677
|
<span slot="trigger">See code</span>
|
|
677
678
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/set-custom-validity-range-underflow.html) -->
|
|
678
679
|
<!-- The below code snippet is automatically added from ../apiExamples/set-custom-validity-range-underflow.html -->
|
|
679
|
-
<pre class="language-html"><code class="language-html"><auro-input type="date" min="01
|
|
680
|
+
<pre class="language-html"><code class="language-html"><auro-input type="date" min="2024-01-01" setCustomValidityRangeUnderflow="Date must be on or after 01/01/2024.">
|
|
680
681
|
<span slot="label">Start Date</span>
|
|
681
682
|
<span slot="helpText">Enter a date no earlier than 01/01/2024.</span>
|
|
682
683
|
</auro-input></code></pre>
|
|
@@ -887,7 +888,7 @@
|
|
|
887
888
|
<div class="exampleWrapper">
|
|
888
889
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/max-date.html) -->
|
|
889
890
|
<!-- The below content is automatically added from ../apiExamples/max-date.html -->
|
|
890
|
-
<auro-input type="date" max="03
|
|
891
|
+
<auro-input type="date" max="2023-03-25" setCustomValidityRangeOverflow="The selected date is past the defined maximum date.">
|
|
891
892
|
<span slot="label">Choose a date</span>
|
|
892
893
|
<span slot="helpText">Help Text</span>
|
|
893
894
|
</auro-input>
|
|
@@ -897,7 +898,7 @@
|
|
|
897
898
|
<span slot="trigger">See code</span>
|
|
898
899
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/max-date.html) -->
|
|
899
900
|
<!-- The below code snippet is automatically added from ../apiExamples/max-date.html -->
|
|
900
|
-
<pre class="language-html"><code class="language-html"><auro-input type="date" max="03
|
|
901
|
+
<pre class="language-html"><code class="language-html"><auro-input type="date" max="2023-03-25" setCustomValidityRangeOverflow="The selected date is past the defined maximum date.">
|
|
901
902
|
<span slot="label">Choose a date</span>
|
|
902
903
|
<span slot="helpText">Help Text</span>
|
|
903
904
|
</auro-input></code></pre>
|
|
@@ -953,7 +954,7 @@
|
|
|
953
954
|
<div class="exampleWrapper">
|
|
954
955
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/min-date.html) -->
|
|
955
956
|
<!-- The below content is automatically added from ../apiExamples/min-date.html -->
|
|
956
|
-
<auro-input type="date" min="03
|
|
957
|
+
<auro-input type="date" min="2023-03-25" setCustomValidityRangeUnderflow="The selected date is before the defined minimum date.">
|
|
957
958
|
<span slot="label">Choose a date</span>
|
|
958
959
|
<span slot="helpText">Help Text</span>
|
|
959
960
|
</auro-input>
|
|
@@ -963,7 +964,7 @@
|
|
|
963
964
|
<span slot="trigger">See code</span>
|
|
964
965
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/min-date.html) -->
|
|
965
966
|
<!-- The below code snippet is automatically added from ../apiExamples/min-date.html -->
|
|
966
|
-
<pre class="language-html"><code class="language-html"><auro-input type="date" min="03
|
|
967
|
+
<pre class="language-html"><code class="language-html"><auro-input type="date" min="2023-03-25" setCustomValidityRangeUnderflow="The selected date is before the defined minimum date.">
|
|
967
968
|
<span slot="label">Choose a date</span>
|
|
968
969
|
<span slot="helpText">Help Text</span>
|
|
969
970
|
</auro-input></code></pre>
|