@aurodesignsystem/auro-formkit 2.0.0-beta.52 → 2.0.0-beta.54
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/CHANGELOG.md +14 -0
- package/README.md +27 -6
- package/components/bibtemplate/dist/headerVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +4 -3
- package/components/bibtemplate/dist/registered.js +4 -3
- package/components/checkbox/README.md +56 -93
- package/components/checkbox/demo/index.md +0 -45
- package/components/checkbox/demo/readme.html +49 -0
- package/components/checkbox/demo/readme.md +142 -0
- package/components/combobox/README.md +57 -102
- package/components/combobox/demo/api.min.js +9 -7
- package/components/combobox/demo/index.md +0 -53
- package/components/combobox/demo/index.min.js +9 -7
- package/components/combobox/demo/readme.html +49 -0
- package/components/combobox/demo/readme.md +152 -0
- package/components/combobox/dist/index.js +9 -7
- package/components/combobox/dist/registered.js +9 -7
- package/components/counter/README.md +58 -100
- package/components/counter/demo/api.js +3 -0
- package/components/counter/demo/api.md +254 -12
- package/components/counter/demo/api.min.js +26 -11
- package/components/counter/demo/index.html +0 -1
- package/components/counter/demo/index.js +1 -2
- package/components/counter/demo/index.md +71 -221
- package/components/counter/demo/index.min.js +15 -11
- package/components/counter/demo/readme.html +49 -0
- package/components/counter/demo/readme.md +146 -0
- package/components/counter/dist/auro-counter-group.d.ts +6 -6
- package/components/counter/dist/auro-counter.d.ts +1 -1
- package/components/counter/dist/index.js +15 -11
- package/components/counter/dist/registered.js +15 -11
- package/components/datepicker/README.md +57 -95
- package/components/datepicker/demo/api.min.js +9 -7
- package/components/datepicker/demo/index.md +0 -39
- package/components/datepicker/demo/index.min.js +9 -7
- package/components/datepicker/demo/readme.html +49 -0
- package/components/datepicker/demo/readme.md +140 -0
- package/components/datepicker/dist/index.js +9 -7
- package/components/datepicker/dist/registered.js +9 -7
- package/components/dropdown/README.md +56 -92
- package/components/dropdown/demo/index.md +1 -60
- package/components/dropdown/demo/readme.html +49 -0
- package/components/dropdown/demo/readme.md +144 -0
- package/components/form/README.md +64 -98
- package/components/form/demo/index.md +94 -25
- package/components/form/demo/readme.html +49 -0
- package/components/form/demo/readme.md +146 -0
- package/components/input/README.md +56 -87
- package/components/input/demo/api.min.js +5 -4
- package/components/input/demo/index.md +0 -31
- package/components/input/demo/index.min.js +5 -4
- package/components/input/demo/readme.html +49 -0
- package/components/input/demo/readme.md +135 -0
- package/components/input/dist/index.js +5 -4
- package/components/input/dist/registered.js +5 -4
- package/components/menu/README.md +56 -93
- package/components/menu/demo/index.md +1 -44
- package/components/menu/demo/readme.html +49 -0
- package/components/menu/demo/readme.md +145 -0
- package/components/radio/README.md +56 -87
- package/components/radio/demo/index.md +0 -45
- package/components/radio/demo/readme.html +49 -0
- package/components/radio/demo/readme.md +137 -0
- package/components/select/README.md +57 -100
- package/components/select/demo/api.min.js +4 -3
- package/components/select/demo/index.md +0 -53
- package/components/select/demo/index.min.js +4 -3
- package/components/select/demo/readme.html +49 -0
- package/components/select/demo/readme.md +143 -0
- package/components/select/dist/index.js +4 -3
- package/components/select/dist/registered.js +4 -3
- package/package.json +3 -2
|
@@ -103,7 +103,8 @@ const stringsES = {
|
|
|
103
103
|
'dateYYMM': 'Ingrese una fecha completa en el formato AA/MM',
|
|
104
104
|
'dateYY': 'Ingrese una fecha completa en el formato AA',
|
|
105
105
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
106
|
-
'dateDD': 'Ingrese una fecha completa en el formato DD'
|
|
106
|
+
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
107
|
+
'clearInput': 'Borrar campo de entrada',
|
|
107
108
|
};
|
|
108
109
|
|
|
109
110
|
const stringsEN = {
|
|
@@ -126,7 +127,8 @@ const stringsEN = {
|
|
|
126
127
|
'dateYYMM': 'Please enter a complete date in the format YY/MM',
|
|
127
128
|
'dateYY': 'Please enter a complete date in the format YY',
|
|
128
129
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
129
|
-
'dateDD': 'Please enter a complete date in the format DD'
|
|
130
|
+
'dateDD': 'Please enter a complete date in the format DD',
|
|
131
|
+
'clearInput': 'Clear input field',
|
|
130
132
|
};
|
|
131
133
|
|
|
132
134
|
/**
|
|
@@ -6552,8 +6554,7 @@ class AuroInput extends BaseInput {
|
|
|
6552
6554
|
<${this.buttonTag}
|
|
6553
6555
|
variant="flat"
|
|
6554
6556
|
class="notificationBtn clearBtn"
|
|
6555
|
-
aria-
|
|
6556
|
-
tabindex="-1"
|
|
6557
|
+
aria-label="${i18n(this.lang, 'clearInput')}"
|
|
6557
6558
|
@click="${this.handleClickClear}">
|
|
6558
6559
|
<${this.iconTag}
|
|
6559
6560
|
customColor
|
|
@@ -18,7 +18,6 @@ The following sections are editable by making changes to the following files:
|
|
|
18
18
|
-->
|
|
19
19
|
|
|
20
20
|
# Menu
|
|
21
|
-
|
|
22
21
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
23
22
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
24
23
|
The `<auro-menu>` element provides a list of options for a user to select from.
|
|
@@ -32,42 +31,55 @@ The `<auro-menu>` element is designed for contextual menus, e.g. a dropdown menu
|
|
|
32
31
|
<!-- 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. -->
|
|
33
32
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
34
33
|
|
|
35
|
-
##
|
|
36
|
-
|
|
37
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
|
|
38
|
-
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
39
|
-
|
|
40
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
41
|
-
|
|
42
|
-
## Install
|
|
43
|
-
|
|
34
|
+
## Getting Started
|
|
44
35
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
45
36
|
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
46
37
|
|
|
38
|
+
#### NPM Installation
|
|
39
|
+
|
|
47
40
|
```shell
|
|
48
41
|
$ npm i @aurodesignsystem/auro-formkit
|
|
49
42
|
```
|
|
50
43
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
44
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
45
|
+
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
51
46
|
|
|
52
|
-
###
|
|
47
|
+
### Import Options
|
|
48
|
+
|
|
49
|
+
#### Automatic Registration
|
|
53
50
|
|
|
54
|
-
|
|
55
|
-
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
51
|
+
For automatic registration, simply import the component:
|
|
56
52
|
|
|
57
|
-
|
|
53
|
+
```javascript
|
|
54
|
+
// Registers <auro-menu> automatically
|
|
55
|
+
import '@aurodesignsystem/auro-formkit/auro-menu';
|
|
56
|
+
```
|
|
58
57
|
|
|
59
|
-
|
|
58
|
+
#### Custom Registration
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
Defining the component dependency within each component that is using the `<auro-menu>` component.
|
|
60
|
+
To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our static `AuroMenu.register('custom-menu')` method on the component class and pass in a unique name.
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
```javascript
|
|
63
|
+
// Import the class only
|
|
64
|
+
import { AuroMenu } from '@aurodesignsystem/auro-formkit/auro-menu/class';
|
|
65
|
+
|
|
66
|
+
// Register with a custom name if desired
|
|
67
|
+
AuroMenu.register('custom-menu');
|
|
68
|
+
```
|
|
67
69
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
#### TypeScript Module Resolution
|
|
71
|
+
|
|
72
|
+
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"compilerOptions": {
|
|
77
|
+
"moduleResolution": "bundler"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
70
80
|
```
|
|
81
|
+
|
|
82
|
+
This configuration enables proper module resolution for the component's TypeScript files.
|
|
71
83
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
72
84
|
**Reference component in HTML**
|
|
73
85
|
|
|
@@ -85,26 +97,30 @@ import "@aurodesignsystem/auro-formkit/auro-menu";
|
|
|
85
97
|
```
|
|
86
98
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
87
99
|
|
|
88
|
-
|
|
100
|
+
### Design Token CSS Custom Property dependency
|
|
89
101
|
|
|
90
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/
|
|
91
|
-
|
|
102
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
|
|
103
|
+
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
92
104
|
|
|
93
|
-
|
|
105
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
106
|
+
|
|
107
|
+
## Install from CDN
|
|
108
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
109
|
+
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
110
|
+
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.
|
|
94
111
|
|
|
112
|
+
```html
|
|
113
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.0.0-beta.53/auro-menu/+esm"></script>
|
|
114
|
+
```
|
|
95
115
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
96
116
|
|
|
97
|
-
|
|
117
|
+
## UI development browser support
|
|
118
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
|
|
119
|
+
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
98
120
|
|
|
99
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentBundleUseModBrowsers.md) -->
|
|
100
|
-
<!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
|
|
101
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.13.0/dist/tokens/CSSCustomProperties.css" />
|
|
102
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
|
|
103
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.51/dist/auro-menu__bundled.js" type="module"></script>
|
|
104
121
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
105
122
|
|
|
106
123
|
## auro-menu use cases
|
|
107
|
-
|
|
108
124
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
109
125
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
110
126
|
The `<auro-menu>` element should be used in situations where users may:
|
|
@@ -112,71 +128,18 @@ The `<auro-menu>` element should be used in situations where users may:
|
|
|
112
128
|
* A user needs to select one option from a list of options.
|
|
113
129
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
114
130
|
|
|
115
|
-
##
|
|
116
|
-
|
|
117
|
-
### Default auro-menu
|
|
118
|
-
|
|
119
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
120
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
121
|
-
|
|
122
|
-
```html
|
|
123
|
-
<auro-menu>
|
|
124
|
-
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
125
|
-
<auro-menuoption value="price">Price</auro-menuoption>
|
|
126
|
-
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
127
|
-
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
128
|
-
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
129
|
-
</auro-menu>
|
|
130
|
-
```
|
|
131
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
132
|
-
|
|
133
|
-
## Development
|
|
131
|
+
## Formkit development
|
|
134
132
|
|
|
135
|
-
<!-- AURO-GENERATED-CONTENT:START (
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
Please be sure to review the [contribution guidelines](https://auro.alaskaair.com/contributing) for this project. Please make sure to **pay special attention** to the **conventional commits** section of the document.
|
|
139
|
-
|
|
140
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
133
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
134
|
+
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
141
135
|
|
|
142
|
-
###
|
|
136
|
+
### Filtering
|
|
143
137
|
|
|
144
|
-
|
|
145
|
-
Once the project has been cloned to your local resource and you have installed all the dependencies you will need to open a shell session to run the **dev server**.
|
|
138
|
+
Running the `dev` command will open a `localhost` development server for all components in the monorepo at once.
|
|
146
139
|
|
|
147
|
-
|
|
148
|
-
$ npm run dev
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Open [localhost:8000](http://localhost:8000/)
|
|
152
|
-
|
|
153
|
-
If running separate sessions is preferred, please run the following commands in individual terminal shells.
|
|
140
|
+
To only develop a single component, use the `--filter` flag:
|
|
154
141
|
|
|
155
142
|
```shell
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
$ npm run serve
|
|
143
|
+
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
159
144
|
```
|
|
160
|
-
|
|
161
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
162
|
-
|
|
163
|
-
### API generation
|
|
164
|
-
|
|
165
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/api.md) -->
|
|
166
|
-
The custom element API file is generated in the build and committed back to the repo with a version change. If the API doc has changed without a version change, author's are to run `npm run build:api` to generate the doc and commit to version control.
|
|
167
|
-
|
|
168
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
169
|
-
|
|
170
|
-
### Testing
|
|
171
|
-
|
|
172
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/testing.md) -->
|
|
173
|
-
Automated tests are required for every Auro component. See `.\test\auro-menu.test.js` for the tests for this component. Run `npm test` to run the tests and check code coverage. Tests must pass and meet a certain coverage threshold to commit. See [the testing documentation](https://auro.alaskaair.com/support/tests) for more details.
|
|
174
|
-
|
|
175
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
176
|
-
|
|
177
|
-
### Bundled assets
|
|
178
|
-
|
|
179
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/bundles.md) -->
|
|
180
|
-
Bundled assets are only generated in the remote and not merged back to this repo. To review and/or test a bundled asset locally, run `$ npm run bundler` to generate assets.
|
|
181
|
-
|
|
182
145
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -58,47 +58,4 @@ A basic `auro-menu` element with nested `auro-menuoption` elements to generate a
|
|
|
58
58
|
```
|
|
59
59
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
60
60
|
</auro-accordion>
|
|
61
|
-
Having a closing statement about your example helps to really complete the thought with your reader.
|
|
62
|
-
|
|
63
|
-
## Recommended Use and Version Control
|
|
64
|
-
|
|
65
|
-
There are two important parts of every Auro component. The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element. The class is exported and then used as part of defining the Web Component. When importing this component as described in the <a href="#install">install</a> section, the class is imported and the `auro-menu` custom element is defined automatically.
|
|
66
|
-
|
|
67
|
-
To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our `AuroMenu.register(name)` method and pass in a unique name.
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
import { AuroMenu } from '../src/auro-menu.js';
|
|
71
|
-
import { AuroMenuOption } from '../src/auro-menuoption.js';
|
|
72
|
-
|
|
73
|
-
AuroMenu.register('custom-menu');
|
|
74
|
-
AuroMenuOption.register('custom-menuoption');
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
<div class="exampleWrapper">
|
|
78
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/custom.html) -->
|
|
79
|
-
<!-- The below content is automatically added from ./../apiExamples/custom.html -->
|
|
80
|
-
<custom-menu>
|
|
81
|
-
<custom-menuoption value="stops">Stops</custom-menuoption>
|
|
82
|
-
<custom-menuoption value="price">Price</custom-menuoption>
|
|
83
|
-
<custom-menuoption value="duration">Duration</custom-menuoption>
|
|
84
|
-
<custom-menuoption value="departure">Departure</custom-menuoption>
|
|
85
|
-
<custom-menuoption value="arrival">Arrival</custom-menuoption>
|
|
86
|
-
</custom-menu>
|
|
87
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
88
|
-
</div>
|
|
89
|
-
<auro-accordion alignRight>
|
|
90
|
-
<span slot="trigger">See code</span>
|
|
91
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/custom.html) -->
|
|
92
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/custom.html -->
|
|
93
|
-
|
|
94
|
-
```html
|
|
95
|
-
<custom-menu>
|
|
96
|
-
<custom-menuoption value="stops">Stops</custom-menuoption>
|
|
97
|
-
<custom-menuoption value="price">Price</custom-menuoption>
|
|
98
|
-
<custom-menuoption value="duration">Duration</custom-menuoption>
|
|
99
|
-
<custom-menuoption value="departure">Departure</custom-menuoption>
|
|
100
|
-
<custom-menuoption value="arrival">Arrival</custom-menuoption>
|
|
101
|
-
</custom-menu>
|
|
102
|
-
```
|
|
103
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
104
|
-
</auro-accordion>
|
|
61
|
+
Having a closing statement about your example helps to really complete the thought with your reader.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3
|
+
See LICENSE in the project root for license information.
|
|
4
|
+
|
|
5
|
+
HTML in this document is standardized and NOT to be edited.
|
|
6
|
+
All demo code should be added/edited in ./demo/index.md
|
|
7
|
+
|
|
8
|
+
With the exception of adding custom elements if needed for the demo.
|
|
9
|
+
|
|
10
|
+
----------------------- DO NOT EDIT -----------------------------
|
|
11
|
+
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
<!DOCTYPE html>
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<head>
|
|
17
|
+
<meta charset="UTF-8" />
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
+
<title>Auro Web Component Generator | auro-menu custom element</title>
|
|
20
|
+
<link
|
|
21
|
+
rel="stylesheet"
|
|
22
|
+
type="text/css"
|
|
23
|
+
href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"
|
|
24
|
+
/>
|
|
25
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/tokens/CSSCustomProperties.css">
|
|
26
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
27
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
28
|
+
</head>
|
|
29
|
+
<body class="auro-markdown">
|
|
30
|
+
<main></main>
|
|
31
|
+
|
|
32
|
+
<script type="module">
|
|
33
|
+
import 'https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js';
|
|
34
|
+
import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
|
|
35
|
+
fetch('./readme.md')
|
|
36
|
+
.then((response) => response.text())
|
|
37
|
+
.then((text) => {
|
|
38
|
+
const rawHtml = marked.parse(text);
|
|
39
|
+
document.querySelector('main').innerHTML = rawHtml;
|
|
40
|
+
Prism.highlightAll();
|
|
41
|
+
})
|
|
42
|
+
</script>
|
|
43
|
+
<script type="module">
|
|
44
|
+
import { initExamples } from "./index.min.js";
|
|
45
|
+
|
|
46
|
+
initExamples();
|
|
47
|
+
</script>
|
|
48
|
+
</body>
|
|
49
|
+
</html>
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
# Menu
|
|
21
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
22
|
+
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
23
|
+
The `<auro-menu>` element provides a list of options for a user to select from.
|
|
24
|
+
|
|
25
|
+
A list of options is created within the `<slot>` of the `<auro-menu>` element by using the `<auro-menuoption>` element to define options. Use a standard `<hr>` element to create dividers within the list of options.
|
|
26
|
+
|
|
27
|
+
The `<auro-menu>` element is designed for contextual menus, e.g. a dropdown menus. They are not intended to be used for navigation menus which have a different semantic meaning. The `<auro-menu>` element does not support hide/show functionality within its scope. This functionality will be managed by a wrapping element such as a drop-down menu composite element.
|
|
28
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
29
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
30
|
+
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
31
|
+
<!-- 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. -->
|
|
32
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
33
|
+
|
|
34
|
+
## Getting Started
|
|
35
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
36
|
+
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
37
|
+
|
|
38
|
+
#### NPM Installation
|
|
39
|
+
|
|
40
|
+
```shell
|
|
41
|
+
$ npm i @aurodesignsystem/auro-formkit
|
|
42
|
+
```
|
|
43
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
44
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
45
|
+
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
46
|
+
|
|
47
|
+
### Import Options
|
|
48
|
+
|
|
49
|
+
#### Automatic Registration
|
|
50
|
+
|
|
51
|
+
For automatic registration, simply import the component:
|
|
52
|
+
|
|
53
|
+
```javascript
|
|
54
|
+
// Registers <auro-menu> automatically
|
|
55
|
+
import '@aurodesignsystem/auro-formkit/auro-menu';
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### Custom Registration
|
|
59
|
+
|
|
60
|
+
To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our static `AuroMenu.register('custom-menu')` method on the component class and pass in a unique name.
|
|
61
|
+
|
|
62
|
+
```javascript
|
|
63
|
+
// Import the class only
|
|
64
|
+
import { AuroMenu } from '@aurodesignsystem/auro-formkit/auro-menu/class';
|
|
65
|
+
|
|
66
|
+
// Register with a custom name if desired
|
|
67
|
+
AuroMenu.register('custom-menu');
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
#### TypeScript Module Resolution
|
|
71
|
+
|
|
72
|
+
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"compilerOptions": {
|
|
77
|
+
"moduleResolution": "bundler"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
This configuration enables proper module resolution for the component's TypeScript files.
|
|
83
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
84
|
+
**Reference component in HTML**
|
|
85
|
+
|
|
86
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
87
|
+
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<auro-menu>
|
|
91
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
92
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
93
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
94
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
95
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
96
|
+
</auro-menu>
|
|
97
|
+
```
|
|
98
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
99
|
+
|
|
100
|
+
### Design Token CSS Custom Property dependency
|
|
101
|
+
|
|
102
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
|
|
103
|
+
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
104
|
+
|
|
105
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
106
|
+
|
|
107
|
+
## Install from CDN
|
|
108
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
109
|
+
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
110
|
+
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.
|
|
111
|
+
|
|
112
|
+
```html
|
|
113
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.0.0-beta.53/auro-menu/+esm"></script>
|
|
114
|
+
```
|
|
115
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
|
+
|
|
117
|
+
## UI development browser support
|
|
118
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
|
|
119
|
+
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
120
|
+
|
|
121
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
122
|
+
|
|
123
|
+
## auro-menu use cases
|
|
124
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
125
|
+
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
126
|
+
The `<auro-menu>` element should be used in situations where users may:
|
|
127
|
+
|
|
128
|
+
* A user needs to select one option from a list of options.
|
|
129
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
130
|
+
|
|
131
|
+
## Formkit development
|
|
132
|
+
|
|
133
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
134
|
+
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
135
|
+
|
|
136
|
+
### Filtering
|
|
137
|
+
|
|
138
|
+
Running the `dev` command will open a `localhost` development server for all components in the monorepo at once.
|
|
139
|
+
|
|
140
|
+
To only develop a single component, use the `--filter` flag:
|
|
141
|
+
|
|
142
|
+
```shell
|
|
143
|
+
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
144
|
+
```
|
|
145
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|