@aurodesignsystem-dev/auro-formkit 0.0.0-pr1413.2 → 0.0.0-pr1419.0
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/package.json +32 -31
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +0 -66
- package/components/bibtemplate/dist/buttonVersion.d.ts +0 -2
- package/components/bibtemplate/dist/headerVersion.d.ts +0 -2
- package/components/bibtemplate/dist/iconVersion.d.ts +0 -2
- package/components/bibtemplate/dist/index.d.ts +0 -2
- package/components/bibtemplate/dist/index.js +0 -395
- package/components/bibtemplate/dist/registered.js +0 -395
- package/components/bibtemplate/dist/styles/color-css.d.ts +0 -2
- package/components/bibtemplate/dist/styles/style-css.d.ts +0 -2
- package/components/bibtemplate/dist/styles/tokens-css.d.ts +0 -2
- package/components/checkbox/demo/api.md +0 -489
- package/components/checkbox/demo/api.min.js +0 -2133
- package/components/checkbox/demo/index.md +0 -55
- package/components/checkbox/demo/index.min.js +0 -2108
- package/components/checkbox/demo/keyboardBehavior.md +0 -0
- package/components/checkbox/demo/readme.md +0 -142
- package/components/checkbox/dist/auro-checkbox-group.d.ts +0 -176
- package/components/checkbox/dist/auro-checkbox.d.ts +0 -209
- package/components/checkbox/dist/index.d.ts +0 -3
- package/components/checkbox/dist/index.js +0 -2057
- package/components/checkbox/dist/registered.js +0 -2058
- package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +0 -2
- package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +0 -2
- package/components/checkbox/dist/styles/color-css.d.ts +0 -2
- package/components/checkbox/dist/styles/colorGroup-css.d.ts +0 -2
- package/components/checkbox/dist/styles/tokens-css.d.ts +0 -2
- package/components/combobox/demo/api.md +0 -2287
- package/components/combobox/demo/api.min.js +0 -17800
- package/components/combobox/demo/index.md +0 -196
- package/components/combobox/demo/index.min.js +0 -17705
- package/components/combobox/demo/keyboardBehavior.md +0 -281
- package/components/combobox/demo/readme.md +0 -158
- package/components/combobox/dist/auro-combobox.d.ts +0 -566
- package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +0 -8
- package/components/combobox/dist/index.d.ts +0 -2
- package/components/combobox/dist/index.js +0 -15604
- package/components/combobox/dist/registered.js +0 -15606
- package/components/combobox/dist/styles/emphasized/style-css.d.ts +0 -2
- package/components/combobox/dist/styles/snowflake/style-css.d.ts +0 -2
- package/components/combobox/dist/styles/style-css.d.ts +0 -2
- package/components/counter/demo/api.md +0 -1285
- package/components/counter/demo/api.min.js +0 -8112
- package/components/counter/demo/index.md +0 -92
- package/components/counter/demo/index.min.js +0 -8093
- package/components/counter/demo/keyboardBehavior.md +0 -127
- package/components/counter/demo/readme.md +0 -161
- package/components/counter/dist/auro-counter-button.d.ts +0 -14
- package/components/counter/dist/auro-counter-group.d.ts +0 -390
- package/components/counter/dist/auro-counter-wrapper.d.ts +0 -17
- package/components/counter/dist/auro-counter.d.ts +0 -136
- package/components/counter/dist/buttonVersion.d.ts +0 -2
- package/components/counter/dist/iconVersion.d.ts +0 -2
- package/components/counter/dist/index.d.ts +0 -3
- package/components/counter/dist/index.js +0 -8015
- package/components/counter/dist/keyboardStrategy.d.ts +0 -4
- package/components/counter/dist/registered.js +0 -8016
- package/components/counter/dist/styles/color-css.d.ts +0 -2
- package/components/counter/dist/styles/counter-button-color-css.d.ts +0 -2
- package/components/counter/dist/styles/counter-button-css.d.ts +0 -2
- package/components/counter/dist/styles/counter-group-css.d.ts +0 -2
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +0 -2
- package/components/counter/dist/styles/counter-wrapper-css.d.ts +0 -2
- package/components/counter/dist/styles/shapeSize-css.d.ts +0 -2
- package/components/counter/dist/styles/style-css.d.ts +0 -2
- package/components/counter/dist/styles/tokens-css.d.ts +0 -2
- package/components/datepicker/demo/api.md +0 -1824
- package/components/datepicker/demo/api.min.js +0 -24510
- package/components/datepicker/demo/index.md +0 -158
- package/components/datepicker/demo/index.min.js +0 -24231
- package/components/datepicker/demo/keyboardBehavior.md +0 -24
- package/components/datepicker/demo/readme.md +0 -137
- package/components/datepicker/dist/auro-calendar-cell.d.ts +0 -169
- package/components/datepicker/dist/auro-calendar-month.d.ts +0 -20
- package/components/datepicker/dist/auro-calendar.d.ts +0 -173
- package/components/datepicker/dist/auro-datepicker.d.ts +0 -715
- package/components/datepicker/dist/buttonVersion.d.ts +0 -2
- package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +0 -1
- package/components/datepicker/dist/iconVersion.d.ts +0 -2
- package/components/datepicker/dist/index.d.ts +0 -2
- package/components/datepicker/dist/index.js +0 -24146
- package/components/datepicker/dist/popoverVersion.d.ts +0 -2
- package/components/datepicker/dist/registered.js +0 -24146
- package/components/datepicker/dist/styles/classic/color-css.d.ts +0 -2
- package/components/datepicker/dist/styles/classic/style-css.d.ts +0 -2
- package/components/datepicker/dist/styles/color-calendar-css.d.ts +0 -2
- package/components/datepicker/dist/styles/color-cell-css.d.ts +0 -2
- package/components/datepicker/dist/styles/color-css.d.ts +0 -2
- package/components/datepicker/dist/styles/color-month-css.d.ts +0 -2
- package/components/datepicker/dist/styles/shapeSize-css.d.ts +0 -2
- package/components/datepicker/dist/styles/snowflake/color-css.d.ts +0 -2
- package/components/datepicker/dist/styles/snowflake/style-css.d.ts +0 -2
- package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +0 -2
- package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +0 -2
- package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +0 -2
- package/components/datepicker/dist/styles/style-css.d.ts +0 -2
- package/components/datepicker/dist/styles/tokens-css.d.ts +0 -2
- package/components/datepicker/dist/utilities.d.ts +0 -78
- package/components/datepicker/dist/utilitiesCalendar.d.ts +0 -38
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +0 -50
- package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +0 -5
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -60
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +0 -1
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +0 -57
- package/components/dropdown/demo/api.md +0 -1358
- package/components/dropdown/demo/api.min.js +0 -4894
- package/components/dropdown/demo/index.md +0 -283
- package/components/dropdown/demo/index.min.js +0 -4829
- package/components/dropdown/demo/keyboardBehavior.md +0 -77
- package/components/dropdown/demo/readme.md +0 -160
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -482
- package/components/dropdown/dist/auro-dropdownBib.d.ts +0 -128
- package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +0 -7
- package/components/dropdown/dist/iconVersion.d.ts +0 -2
- package/components/dropdown/dist/index.d.ts +0 -2
- package/components/dropdown/dist/index.js +0 -4722
- package/components/dropdown/dist/registered.js +0 -4722
- package/components/dropdown/dist/styles/classic/bibColors-css.d.ts +0 -2
- package/components/dropdown/dist/styles/classic/bibStyles-css.d.ts +0 -2
- package/components/dropdown/dist/styles/classic/color-css.d.ts +0 -2
- package/components/dropdown/dist/styles/classic/style-css.d.ts +0 -2
- package/components/dropdown/dist/styles/color-css.d.ts +0 -2
- package/components/dropdown/dist/styles/emphasized/style-css.d.ts +0 -2
- package/components/dropdown/dist/styles/shapeSize-css.d.ts +0 -2
- package/components/dropdown/dist/styles/snowflake/style-css.d.ts +0 -2
- package/components/dropdown/dist/styles/style-css.d.ts +0 -2
- package/components/dropdown/dist/styles/tokens-css.d.ts +0 -2
- package/components/form/demo/api.md +0 -319
- package/components/form/demo/api.min.js +0 -70505
- package/components/form/demo/index.md +0 -128
- package/components/form/demo/index.min.js +0 -70505
- package/components/form/demo/keyboardBehavior.md +0 -0
- package/components/form/demo/readme.md +0 -145
- package/components/form/dist/auro-form.d.ts +0 -280
- package/components/form/dist/index.d.ts +0 -2
- package/components/form/dist/index.js +0 -718
- package/components/form/dist/registered.d.ts +0 -1
- package/components/form/dist/registered.js +0 -718
- package/components/form/dist/styles/style-css.d.ts +0 -2
- package/components/helptext/dist/auro-helptext.d.ts +0 -69
- package/components/helptext/dist/index.d.ts +0 -2
- package/components/helptext/dist/index.js +0 -231
- package/components/helptext/dist/registered.js +0 -231
- package/components/helptext/dist/styles/color-css.d.ts +0 -2
- package/components/helptext/dist/styles/style-css.d.ts +0 -2
- package/components/helptext/dist/styles/tokens-css.d.ts +0 -2
- package/components/input/demo/api.md +0 -1397
- package/components/input/demo/api.min.js +0 -7460
- package/components/input/demo/index.md +0 -161
- package/components/input/demo/index.min.js +0 -7380
- package/components/input/demo/keyboardBehavior.md +0 -0
- package/components/input/demo/readme.md +0 -134
- package/components/input/dist/auro-input.d.ts +0 -206
- package/components/input/dist/base-input.d.ts +0 -629
- package/components/input/dist/buttonVersion.d.ts +0 -2
- package/components/input/dist/i18n.d.ts +0 -18
- package/components/input/dist/iconVersion.d.ts +0 -2
- package/components/input/dist/index.d.ts +0 -2
- package/components/input/dist/index.js +0 -7292
- package/components/input/dist/registered.js +0 -7292
- package/components/input/dist/styles/classic/color-css.d.ts +0 -2
- package/components/input/dist/styles/classic/style-css.d.ts +0 -2
- package/components/input/dist/styles/color-css.d.ts +0 -2
- package/components/input/dist/styles/default/borders-css.d.ts +0 -2
- package/components/input/dist/styles/default/color-css.d.ts +0 -2
- package/components/input/dist/styles/default/mixins-css.d.ts +0 -2
- package/components/input/dist/styles/default/notificationIcons-css.d.ts +0 -2
- package/components/input/dist/styles/default/style-css.d.ts +0 -2
- package/components/input/dist/styles/emphasized/color-css.d.ts +0 -2
- package/components/input/dist/styles/emphasized/style-css.d.ts +0 -2
- package/components/input/dist/styles/mixins-css.d.ts +0 -2
- package/components/input/dist/styles/shapeSize-css.d.ts +0 -2
- package/components/input/dist/styles/snowflake/style-css.d.ts +0 -2
- package/components/input/dist/styles/style-css.d.ts +0 -2
- package/components/input/dist/styles/tokens-css.d.ts +0 -2
- package/components/input/dist/utilities.d.ts +0 -25
- package/components/layoutElement/dist/auroElement.d.ts +0 -40
- package/components/layoutElement/dist/index.d.ts +0 -2
- package/components/layoutElement/dist/index.js +0 -107
- package/components/layoutElement/dist/registered.js +0 -107
- package/components/menu/demo/api.md +0 -1200
- package/components/menu/demo/api.min.js +0 -2413
- package/components/menu/demo/index.md +0 -72
- package/components/menu/demo/index.min.js +0 -2306
- package/components/menu/demo/keyboardBehavior.md +0 -0
- package/components/menu/demo/readme.md +0 -145
- package/components/menu/dist/auro-menu-utils.d.ts +0 -34
- package/components/menu/dist/auro-menu.context.d.ts +0 -239
- package/components/menu/dist/auro-menu.d.ts +0 -316
- package/components/menu/dist/auro-menuoption.d.ts +0 -210
- package/components/menu/dist/iconVersion.d.ts +0 -2
- package/components/menu/dist/index.d.ts +0 -4
- package/components/menu/dist/index.js +0 -2269
- package/components/menu/dist/registered.js +0 -2217
- package/components/menu/dist/styles/default/color-menu-css.d.ts +0 -2
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +0 -2
- package/components/menu/dist/styles/default/style-menu-css.d.ts +0 -2
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +0 -2
- package/components/menu/dist/styles/default/tokens-css.d.ts +0 -2
- package/components/radio/demo/api.md +0 -675
- package/components/radio/demo/api.min.js +0 -2210
- package/components/radio/demo/index.md +0 -73
- package/components/radio/demo/index.min.js +0 -2167
- package/components/radio/demo/keyboardBehavior.md +0 -0
- package/components/radio/demo/readme.md +0 -141
- package/components/radio/dist/auro-radio-group.d.ts +0 -250
- package/components/radio/dist/auro-radio.d.ts +0 -180
- package/components/radio/dist/index.d.ts +0 -3
- package/components/radio/dist/index.js +0 -2116
- package/components/radio/dist/registered.js +0 -2117
- package/components/radio/dist/styles/auro-radio-group-css.d.ts +0 -2
- package/components/radio/dist/styles/color-css.d.ts +0 -2
- package/components/radio/dist/styles/groupColor-css.d.ts +0 -2
- package/components/radio/dist/styles/style-css.d.ts +0 -2
- package/components/radio/dist/styles/tokens-css.d.ts +0 -2
- package/components/select/demo/api.md +0 -2378
- package/components/select/demo/api.min.js +0 -10400
- package/components/select/demo/index.md +0 -355
- package/components/select/demo/index.min.js +0 -10307
- package/components/select/demo/keyboardBehavior.md +0 -246
- package/components/select/demo/readme.md +0 -148
- package/components/select/dist/auro-select.d.ts +0 -545
- package/components/select/dist/index.d.ts +0 -2
- package/components/select/dist/index.js +0 -8218
- package/components/select/dist/registered.js +0 -8218
- package/components/select/dist/selectKeyboardStrategy.d.ts +0 -11
- package/components/select/dist/styles/emphasized/color-css.d.ts +0 -2
- package/components/select/dist/styles/shapeSize-css.d.ts +0 -2
- package/components/select/dist/styles/style-css.d.ts +0 -2
- package/components/select/dist/styles/tokens-css.d.ts +0 -2
- package/custom-elements.json +0 -18768
|
File without changes
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
The README.md file is a compiled document. No edits should be made directly to this file.
|
|
3
|
-
|
|
4
|
-
README.md is created by running `npm run build:docs`.
|
|
5
|
-
|
|
6
|
-
This file is generated based on a template fetched from
|
|
7
|
-
`../../docs/templates/componentReadmeTemplate.md`
|
|
8
|
-
and copied to `./componentDocs/README.md` each time the docs are compiled.
|
|
9
|
-
|
|
10
|
-
The following sections are editable by making changes to the following files:
|
|
11
|
-
|
|
12
|
-
| SECTION | DESCRIPTION | FILE LOCATION |
|
|
13
|
-
|------------------------|---------------------------------------------------|-------------------------------------|
|
|
14
|
-
| Description | Description of the component | `./docs/partials/description.md` |
|
|
15
|
-
| Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
|
|
16
|
-
| Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
|
|
17
|
-
| Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
|
|
18
|
-
-->
|
|
19
|
-
|
|
20
|
-
# Radio
|
|
21
|
-
|
|
22
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
23
|
-
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
24
|
-
`<auro-radio>` is a [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) that is rendered as a small circle, which is filled or highlighted when selected. Only one `<auro-radio>` component in a given `<auro-radio-group>` can be selected at the same time.
|
|
25
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
26
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
27
|
-
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
28
|
-
<!-- AURO-GENERATED-CONTENT This file is to be used for any additional content that should be included in the README.md which is specific to this component. -->
|
|
29
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
30
|
-
|
|
31
|
-
## Radio Use Cases
|
|
32
|
-
|
|
33
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
34
|
-
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
35
|
-
The `<auro-radio>` element is designed to be a single component for the use of creating an input `type="radio"` with an associated `<label>` that meets all use case and accessibility standards.
|
|
36
|
-
|
|
37
|
-
The following examples illustrate fully functional `<auro-radio>` elements wrapped with the `<auro-radio-group>` element. The `<auro-radio-group>` element is REQUIRED in order to mantain the relationship between individual `<auro-radio>` elements for functional radio button actions.
|
|
38
|
-
|
|
39
|
-
**Note**: The `<auro-radio>` element is only for to for use as a set of two or more `<auro-radio>` elements within an `<auro-radio-group>` element.
|
|
40
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
41
|
-
|
|
42
|
-
## Getting Started
|
|
43
|
-
|
|
44
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
45
|
-
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
46
|
-
|
|
47
|
-
#### NPM Installation
|
|
48
|
-
|
|
49
|
-
```shell
|
|
50
|
-
$ npm i @aurodesignsystem/auro-formkit
|
|
51
|
-
```
|
|
52
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
53
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
54
|
-
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
55
|
-
|
|
56
|
-
### TypeScript Module Resolution
|
|
57
|
-
|
|
58
|
-
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"compilerOptions": {
|
|
63
|
-
"moduleResolution": "bundler"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
This configuration enables proper module resolution for the component's TypeScript files.
|
|
69
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
70
|
-
|
|
71
|
-
## Install from CDN
|
|
72
|
-
|
|
73
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
74
|
-
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
75
|
-
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
76
|
-
|
|
77
|
-
```html
|
|
78
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-radio/+esm"></script>
|
|
79
|
-
```
|
|
80
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
81
|
-
|
|
82
|
-
## Formkit Development
|
|
83
|
-
|
|
84
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
85
|
-
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
86
|
-
|
|
87
|
-
### Filtering
|
|
88
|
-
|
|
89
|
-
Running the `dev` command will open a `localhost` development server for all components in the monorepo at once.
|
|
90
|
-
|
|
91
|
-
To only develop a single component, use the `--filter` flag:
|
|
92
|
-
|
|
93
|
-
```shell
|
|
94
|
-
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
95
|
-
```
|
|
96
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
97
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
98
|
-
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
99
|
-
|
|
100
|
-
## Custom Component Registration for Version Management
|
|
101
|
-
|
|
102
|
-
There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition. The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
103
|
-
|
|
104
|
-
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
105
|
-
|
|
106
|
-
However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), you can manually register the class under a custom element name to avoid conflicts.
|
|
107
|
-
|
|
108
|
-
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
109
|
-
|
|
110
|
-
```js
|
|
111
|
-
// Import the class only
|
|
112
|
-
import { AuroRadio, AuroRadioGroup } from '@aurodesignsystem/auro-formkit/auro-radio/class';
|
|
113
|
-
|
|
114
|
-
// Register with a custom name if desired
|
|
115
|
-
AuroRadio.register('custom-radio');
|
|
116
|
-
AuroRadioGroup.register('custom-radio-group');
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
This will create a new custom element `<custom-radio>` and `<custom-radio-group>` that behaves exactly like `<auro-radio>` and `<auro-radio-group>`, allowing both to coexist on the same page without interfering with each other.
|
|
120
|
-
|
|
121
|
-
<div class="exampleWrapper exampleWrapper--flex">
|
|
122
|
-
<custom-radio-group>
|
|
123
|
-
<span slot="legend">Form label goes here</span>
|
|
124
|
-
<custom-radio id="customRadio1" label="Yes" name="radioDemo" value="yes"></custom-radio>
|
|
125
|
-
<custom-radio id="customRadio2" label="No" name="radioDemo" value="no"></custom-radio>
|
|
126
|
-
<custom-radio id="customRadio3" label="Maybe" name="radioDemo" value="maybe"></custom-radio>
|
|
127
|
-
</custom-radio-group>
|
|
128
|
-
</div>
|
|
129
|
-
<auro-accordion alignRight>
|
|
130
|
-
<span slot="trigger">See code</span>
|
|
131
|
-
|
|
132
|
-
```html
|
|
133
|
-
<custom-radio-group>
|
|
134
|
-
<span slot="legend">Form label goes here</span>
|
|
135
|
-
<custom-radio id="customRadio1" label="Yes" name="radioDemo" value="yes"></custom-radio>
|
|
136
|
-
<custom-radio id="customRadio2" label="No" name="radioDemo" value="no"></custom-radio>
|
|
137
|
-
<custom-radio id="customRadio3" label="Maybe" name="radioDemo" value="maybe"></custom-radio>
|
|
138
|
-
</custom-radio-group>
|
|
139
|
-
```
|
|
140
|
-
</auro-accordion>
|
|
141
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `auro-radio-group` element is used to group a set `auro-radio` elements.
|
|
3
|
-
* @customElement auro-radio-group
|
|
4
|
-
*
|
|
5
|
-
* @csspart radio-group - Apply css to the fieldset element in the shadow DOM
|
|
6
|
-
* @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
|
|
7
|
-
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
8
|
-
* @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
|
|
9
|
-
* @event auroFormElement-validated - Notifies that the element has been validated.
|
|
10
|
-
* @event input - Notifies every time the value prop of the element is changed.
|
|
11
|
-
*/
|
|
12
|
-
export class AuroRadioGroup extends LitElement {
|
|
13
|
-
static get styles(): import("lit").CSSResult[];
|
|
14
|
-
static get properties(): {
|
|
15
|
-
/**
|
|
16
|
-
* Defines whether the component will be on lighter or darker backgrounds.
|
|
17
|
-
* @type {'default' | 'inverse'}
|
|
18
|
-
* @default 'default'
|
|
19
|
-
*/
|
|
20
|
-
appearance: "default" | "inverse";
|
|
21
|
-
/**
|
|
22
|
-
* If true, all radio buttons will be disabled.
|
|
23
|
-
*/
|
|
24
|
-
disabled: {
|
|
25
|
-
type: BooleanConstructor;
|
|
26
|
-
reflect: boolean;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* If true, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
30
|
-
*/
|
|
31
|
-
error: {
|
|
32
|
-
type: StringConstructor;
|
|
33
|
-
reflect: boolean;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Indicates whether the legend slot is set or not.
|
|
37
|
-
* @private
|
|
38
|
-
*/
|
|
39
|
-
hasLegend: {
|
|
40
|
-
type: BooleanConstructor;
|
|
41
|
-
reflect: boolean;
|
|
42
|
-
attribute: boolean;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* If true, displays radio buttons horizontally.
|
|
46
|
-
*/
|
|
47
|
-
horizontal: {
|
|
48
|
-
type: BooleanConstructor;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* If true, disables auto-validation on blur.
|
|
52
|
-
*/
|
|
53
|
-
noValidate: {
|
|
54
|
-
type: BooleanConstructor;
|
|
55
|
-
reflect: boolean;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* DEPRECATED - use `appearance="inverse"` instead.
|
|
59
|
-
*/
|
|
60
|
-
onDark: {
|
|
61
|
-
type: BooleanConstructor;
|
|
62
|
-
reflect: boolean;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Specifies the current selected radio button.
|
|
66
|
-
*/
|
|
67
|
-
optionSelected: {
|
|
68
|
-
type: ObjectConstructor;
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
72
|
-
*/
|
|
73
|
-
required: {
|
|
74
|
-
type: BooleanConstructor;
|
|
75
|
-
reflect: boolean;
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Sets a custom help text message to display for all validityStates.
|
|
79
|
-
*/
|
|
80
|
-
setCustomValidity: {
|
|
81
|
-
type: StringConstructor;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Custom help text message to display when validity = `customError`.
|
|
85
|
-
*/
|
|
86
|
-
setCustomValidityCustomError: {
|
|
87
|
-
type: StringConstructor;
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Custom help text message to display when validity = `valueMissing`.
|
|
91
|
-
*/
|
|
92
|
-
setCustomValidityValueMissing: {
|
|
93
|
-
type: StringConstructor;
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* Indicates whether the radio group is in a dirty state (has been interacted with).
|
|
97
|
-
* @private
|
|
98
|
-
*/
|
|
99
|
-
touched: {
|
|
100
|
-
type: BooleanConstructor;
|
|
101
|
-
reflect: boolean;
|
|
102
|
-
attribute: boolean;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Specifies the `validityState` this element is in.
|
|
106
|
-
*/
|
|
107
|
-
validity: {
|
|
108
|
-
type: StringConstructor;
|
|
109
|
-
reflect: boolean;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Specifies the current value of the selected radio button.
|
|
113
|
-
*/
|
|
114
|
-
value: {
|
|
115
|
-
type: StringConstructor;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* This will register this element with the browser.
|
|
120
|
-
* @param {string} [name="auro-radio-group"] - The name of the element that you want to register.
|
|
121
|
-
*
|
|
122
|
-
* @example
|
|
123
|
-
* AuroRadioGroup.register("custom-radio-group") // This will register this element to <custom-radio-group/>
|
|
124
|
-
*
|
|
125
|
-
*/
|
|
126
|
-
static register(name?: string): void;
|
|
127
|
-
_initializeDefaults(): void;
|
|
128
|
-
appearance: string;
|
|
129
|
-
disabled: boolean;
|
|
130
|
-
horizontal: boolean;
|
|
131
|
-
required: boolean;
|
|
132
|
-
validity: any;
|
|
133
|
-
value: any;
|
|
134
|
-
optionSelected: EventTarget;
|
|
135
|
-
onDark: boolean;
|
|
136
|
-
touched: boolean;
|
|
137
|
-
hasLegend: boolean;
|
|
138
|
-
/**
|
|
139
|
-
* @private
|
|
140
|
-
*/
|
|
141
|
-
private validation;
|
|
142
|
-
/**
|
|
143
|
-
* @private
|
|
144
|
-
*/
|
|
145
|
-
private index;
|
|
146
|
-
/**
|
|
147
|
-
* @private
|
|
148
|
-
*/
|
|
149
|
-
private max;
|
|
150
|
-
/**
|
|
151
|
-
* @private
|
|
152
|
-
*/
|
|
153
|
-
private runtimeUtils;
|
|
154
|
-
/**
|
|
155
|
-
* @private
|
|
156
|
-
*/
|
|
157
|
-
private helpTextTag;
|
|
158
|
-
firstUpdated(): void;
|
|
159
|
-
/**
|
|
160
|
-
* Method for handling of selection of a radio element.
|
|
161
|
-
* @private
|
|
162
|
-
* @param {Event} event - The trigger event tied to this function.
|
|
163
|
-
* @returns {void}
|
|
164
|
-
*/
|
|
165
|
-
private handleSelection;
|
|
166
|
-
/**
|
|
167
|
-
* Method handles radio element blur.
|
|
168
|
-
* @private
|
|
169
|
-
* @returns {void}
|
|
170
|
-
*/
|
|
171
|
-
private handleRadioBlur;
|
|
172
|
-
/**
|
|
173
|
-
* LitElement lifecycle method. Called after the DOM has been updated.
|
|
174
|
-
* @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.
|
|
175
|
-
* @returns {void}
|
|
176
|
-
*/
|
|
177
|
-
updated(changedProperties: Map<string, any>): void;
|
|
178
|
-
/**
|
|
179
|
-
* Resets component to initial state.
|
|
180
|
-
* @returns {void}
|
|
181
|
-
*/
|
|
182
|
-
reset(): void;
|
|
183
|
-
/**
|
|
184
|
-
* Validates value.
|
|
185
|
-
* @param {boolean} [force=false] - Whether to force validation.
|
|
186
|
-
*/
|
|
187
|
-
validate(force?: boolean): void;
|
|
188
|
-
/**
|
|
189
|
-
* Method handles the reset event from a radio element.
|
|
190
|
-
* @private
|
|
191
|
-
* @returns {void}
|
|
192
|
-
*/
|
|
193
|
-
private resetRadio;
|
|
194
|
-
/**
|
|
195
|
-
* Method for handling the attributes of each radio input.
|
|
196
|
-
* @private
|
|
197
|
-
* @returns {void}
|
|
198
|
-
*/
|
|
199
|
-
private handleItems;
|
|
200
|
-
items: Element[];
|
|
201
|
-
/**
|
|
202
|
-
* Method for handling slot content changes.
|
|
203
|
-
* @private
|
|
204
|
-
* @returns {void}
|
|
205
|
-
*/
|
|
206
|
-
private handleSlotChange;
|
|
207
|
-
/**
|
|
208
|
-
* Method for handling legend slot changes.
|
|
209
|
-
* @private
|
|
210
|
-
* @returns {void}
|
|
211
|
-
*/
|
|
212
|
-
private handleLegendSlotChange;
|
|
213
|
-
/**
|
|
214
|
-
* Method for initializing the tab index of the checked radio input.
|
|
215
|
-
* @private
|
|
216
|
-
* @returns {void}
|
|
217
|
-
*/
|
|
218
|
-
private initializeIndex;
|
|
219
|
-
/**
|
|
220
|
-
* Method for handling a newly selected radio input.
|
|
221
|
-
* @private
|
|
222
|
-
* @param {Event} event - The trigger event tied to this function.
|
|
223
|
-
* @returns {void}
|
|
224
|
-
*/
|
|
225
|
-
private handleToggleSelected;
|
|
226
|
-
/**
|
|
227
|
-
* Method for selecting a radio input.
|
|
228
|
-
* @private
|
|
229
|
-
* @param {Number} index - The value of the element's index attribute.
|
|
230
|
-
* @returns {void}
|
|
231
|
-
*/
|
|
232
|
-
private selectItem;
|
|
233
|
-
/**
|
|
234
|
-
* Method for selecting the next radio input.
|
|
235
|
-
* @private
|
|
236
|
-
* @param {Number} index - The value of the element's index attribute.
|
|
237
|
-
* @param {String} moveDirection - Arrow key pressed by user.
|
|
238
|
-
* @returns {void}
|
|
239
|
-
*/
|
|
240
|
-
private selectNextItem;
|
|
241
|
-
/**
|
|
242
|
-
* Method for handling a keydown event.
|
|
243
|
-
* @private
|
|
244
|
-
* @param {Event} event - The trigger event tied to this function.
|
|
245
|
-
* @returns {void}
|
|
246
|
-
*/
|
|
247
|
-
private handleKeyDown;
|
|
248
|
-
render(): import("lit-html").TemplateResult;
|
|
249
|
-
}
|
|
250
|
-
import { LitElement } from "lit";
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `auro-radio` element is used to a button that allows the user to select one option from a set.
|
|
3
|
-
* @customElement auro-radio
|
|
4
|
-
*
|
|
5
|
-
* @event toggleSelected - Notifies that the component has toggled the checked/selected state.
|
|
6
|
-
* @event {CustomEvent<any>} change - (Deprecated) Notifies when checked value is changed.
|
|
7
|
-
* @event {InputEvent} input - Notifies when when checked value is changed by user's interface.
|
|
8
|
-
* @event focusSelected - Notifies that the component has gained focus.
|
|
9
|
-
* @event auroRadio-blur - Notifies that the component has lost focus.
|
|
10
|
-
* @event resetRadio - Notifies that the component has reset the checked/selected state.
|
|
11
|
-
* @event auroRadio-selected - Notifies that the component has been marked as checked/selected.
|
|
12
|
-
*
|
|
13
|
-
* @csspart radio - apply css to a specific checkbox.
|
|
14
|
-
* @csspart radio-input - apply css to a specific checkbox's input.
|
|
15
|
-
* @csspart radio-label - apply css to a specific checkbox's label.
|
|
16
|
-
*/
|
|
17
|
-
export class AuroRadio extends LitElement {
|
|
18
|
-
static get styles(): import("lit").CSSResult[];
|
|
19
|
-
static get properties(): {
|
|
20
|
-
/**
|
|
21
|
-
* Defines whether the component will be on lighter or darker backgrounds.
|
|
22
|
-
* @type {'default' | 'inverse'}
|
|
23
|
-
* @default 'default'
|
|
24
|
-
*/
|
|
25
|
-
appearance: "default" | "inverse";
|
|
26
|
-
/**
|
|
27
|
-
* If set to true, the radio button will be filled.
|
|
28
|
-
*/
|
|
29
|
-
checked: {
|
|
30
|
-
type: BooleanConstructor;
|
|
31
|
-
reflect: boolean;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* If set to true, the radio button will be non-clickable.
|
|
35
|
-
*/
|
|
36
|
-
disabled: {
|
|
37
|
-
type: BooleanConstructor;
|
|
38
|
-
reflect: boolean;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* If set to true, sets an error state on the radio button.
|
|
42
|
-
*/
|
|
43
|
-
error: {
|
|
44
|
-
type: BooleanConstructor;
|
|
45
|
-
reflect: boolean;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
49
|
-
*/
|
|
50
|
-
id: {
|
|
51
|
-
type: StringConstructor;
|
|
52
|
-
reflect: boolean;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* ID for input node.
|
|
56
|
-
* @private
|
|
57
|
-
*/
|
|
58
|
-
inputId: {
|
|
59
|
-
type: StringConstructor;
|
|
60
|
-
reflect: boolean;
|
|
61
|
-
attribute: boolean;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Label for the radio button.
|
|
65
|
-
*/
|
|
66
|
-
label: {
|
|
67
|
-
type: StringConstructor;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Name for the radio button group.
|
|
71
|
-
*/
|
|
72
|
-
name: {
|
|
73
|
-
type: StringConstructor;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* DEPRECATED - use `appearance="inverse"` instead.
|
|
77
|
-
*/
|
|
78
|
-
onDark: {
|
|
79
|
-
type: BooleanConstructor;
|
|
80
|
-
reflect: boolean;
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* Defines element as required.
|
|
84
|
-
*/
|
|
85
|
-
required: {
|
|
86
|
-
type: BooleanConstructor;
|
|
87
|
-
reflect: boolean;
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Don't add to api.md since changing of this can easily break a11y.
|
|
91
|
-
* @private
|
|
92
|
-
*/
|
|
93
|
-
role: {
|
|
94
|
-
type: StringConstructor;
|
|
95
|
-
reflect: boolean;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* Whether or not the radio button has been touched by the user.
|
|
99
|
-
* @private
|
|
100
|
-
*/
|
|
101
|
-
touched: {
|
|
102
|
-
type: BooleanConstructor;
|
|
103
|
-
reflect: boolean;
|
|
104
|
-
attribute: boolean;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* The value of the radio button.
|
|
108
|
-
*/
|
|
109
|
-
value: {
|
|
110
|
-
type: StringConstructor;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* This will register this element with the browser.
|
|
115
|
-
* @param {string} [name="auro-radio"] - The name of the element that you want to register.
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* AuroRadio.register("custom-radio") // This will resgiter this element to <custom-radio/>
|
|
119
|
-
*
|
|
120
|
-
*/
|
|
121
|
-
static register(name?: string): void;
|
|
122
|
-
_initializeDefaults(): void;
|
|
123
|
-
appearance: string;
|
|
124
|
-
checked: any;
|
|
125
|
-
disabled: boolean;
|
|
126
|
-
required: boolean;
|
|
127
|
-
error: boolean;
|
|
128
|
-
onDark: boolean;
|
|
129
|
-
touched: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* @private
|
|
132
|
-
*/
|
|
133
|
-
private runtimeUtils;
|
|
134
|
-
/**
|
|
135
|
-
* Method for handling content when change event is fired.
|
|
136
|
-
* @private
|
|
137
|
-
* @param {Event} event - The trigger event tied to this function.
|
|
138
|
-
* @returns {void}
|
|
139
|
-
*/
|
|
140
|
-
private handleChange;
|
|
141
|
-
/**
|
|
142
|
-
* Method for handling content when input event is fired.
|
|
143
|
-
* @private
|
|
144
|
-
* @param {Event} event - The trigger event tied to this function.
|
|
145
|
-
* @returns {void}
|
|
146
|
-
*/
|
|
147
|
-
private handleInput;
|
|
148
|
-
/**
|
|
149
|
-
* Method for handling focus event.
|
|
150
|
-
* @private
|
|
151
|
-
* @param {Event} event - The trigger event tied to this function.
|
|
152
|
-
* @returns {void}
|
|
153
|
-
*/
|
|
154
|
-
private handleFocus;
|
|
155
|
-
/**
|
|
156
|
-
* Method for handling blur event.
|
|
157
|
-
* @private
|
|
158
|
-
* @param {Event} event - The trigger event tied to this function.
|
|
159
|
-
* @returns {void}
|
|
160
|
-
*/
|
|
161
|
-
private handleBlur;
|
|
162
|
-
/**
|
|
163
|
-
* Resets component to initial state.
|
|
164
|
-
* @returns {void}
|
|
165
|
-
*/
|
|
166
|
-
reset(): void;
|
|
167
|
-
updated(changedProperties: any): void;
|
|
168
|
-
/**
|
|
169
|
-
* Method for handling passing the required status to aria.
|
|
170
|
-
* @private
|
|
171
|
-
* @param {Boolean} required - The element's required attribute.
|
|
172
|
-
* @returns {void}
|
|
173
|
-
*/
|
|
174
|
-
private isRequired;
|
|
175
|
-
firstUpdated(): void;
|
|
176
|
-
input: HTMLInputElement;
|
|
177
|
-
inputId: string;
|
|
178
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
179
|
-
}
|
|
180
|
-
import { LitElement } from "lit";
|