@aurodesignsystem-dev/auro-formkit 0.0.0-pr1379.0 → 0.0.0-pr1379.10
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 +2 -2
- package/README.md +87 -113
- package/components/combobox/demo/keyboardBehavior.html +81 -0
- package/components/counter/demo/keyboardBehavior.html +81 -0
- package/components/datepicker/demo/keyboard-behavior.html +81 -0
- package/components/dropdown/demo/keyboardBehavior.html +81 -0
- package/components/select/demo/keyboardBehavior.html +81 -0
- package/package.json +64 -53
- 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/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 -17549
- package/components/combobox/demo/index.md +0 -196
- package/components/combobox/demo/index.min.js +0 -17454
- package/components/combobox/demo/readme.md +0 -158
- package/components/combobox/dist/auro-combobox.d.ts +0 -552
- package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +0 -6
- package/components/combobox/dist/index.d.ts +0 -2
- package/components/combobox/dist/index.js +0 -15474
- package/components/combobox/dist/registered.js +0 -15476
- 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 -7993
- package/components/counter/demo/index.md +0 -92
- package/components/counter/demo/index.min.js +0 -7974
- 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 -126
- 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 -7896
- package/components/counter/dist/registered.js +0 -7897
- 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 -24530
- package/components/datepicker/demo/index.md +0 -158
- package/components/datepicker/demo/index.min.js +0 -24251
- 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 -722
- package/components/datepicker/dist/buttonVersion.d.ts +0 -2
- 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 -24166
- package/components/datepicker/dist/popoverVersion.d.ts +0 -2
- package/components/datepicker/dist/registered.js +0 -24166
- 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 -4853
- package/components/dropdown/demo/index.md +0 -283
- package/components/dropdown/demo/index.min.js +0 -4788
- 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 -155
- 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 -4685
- package/components/dropdown/dist/keyboardUtils.d.ts +0 -18
- package/components/dropdown/dist/registered.js +0 -4685
- 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 -69996
- package/components/form/demo/index.md +0 -128
- package/components/form/demo/index.min.js +0 -69996
- 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 -7435
- package/components/input/demo/index.md +0 -161
- package/components/input/demo/index.min.js +0 -7355
- package/components/input/demo/readme.md +0 -134
- package/components/input/dist/auro-input.d.ts +0 -195
- package/components/input/dist/base-input.d.ts +0 -628
- 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 -7278
- package/components/input/dist/registered.js +0 -7278
- 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 -2292
- package/components/menu/demo/index.md +0 -72
- package/components/menu/demo/index.min.js +0 -2185
- 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 -227
- package/components/menu/dist/auro-menu.d.ts +0 -324
- 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 -2148
- package/components/menu/dist/registered.js +0 -2096
- 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/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 -10133
- package/components/select/demo/index.md +0 -355
- package/components/select/demo/index.min.js +0 -10040
- 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 -8072
- package/components/select/dist/registered.js +0 -8072
- package/components/select/dist/selectKeyboardStrategy.d.ts +0 -8
- 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 -18656
|
@@ -1,160 +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
|
-
# Dropdown
|
|
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
|
-
The `auro-dropdown` component is a trigger and dropdown element combination intended to be used with dropdown content that is interactive. `auro-dropdown` is content agnostic and any valid HTML can be placed in either the trigger or the dropdown.
|
|
25
|
-
|
|
26
|
-
_Note: if the dropdown content in your implementation is not interactive (e.g. a tooltip) [auro-popover](http://auro.alaskaair.com/components/auro/popover) may better serve your needs._
|
|
27
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
28
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
29
|
-
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
30
|
-
<!-- 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. -->
|
|
31
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
32
|
-
|
|
33
|
-
## Dropdown Use Cases
|
|
34
|
-
|
|
35
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
36
|
-
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
37
|
-
The `auro-dropdown` element should be used in situations where users may:
|
|
38
|
-
|
|
39
|
-
* interact with an element to get clarification on content offering
|
|
40
|
-
* provide definition to iconic imagery
|
|
41
|
-
* when interactive help is required
|
|
42
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
43
|
-
|
|
44
|
-
## Getting Started
|
|
45
|
-
|
|
46
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
47
|
-
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
48
|
-
|
|
49
|
-
#### NPM Installation
|
|
50
|
-
|
|
51
|
-
```shell
|
|
52
|
-
$ npm i @aurodesignsystem/auro-formkit
|
|
53
|
-
```
|
|
54
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
55
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
56
|
-
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
57
|
-
|
|
58
|
-
### TypeScript Module Resolution
|
|
59
|
-
|
|
60
|
-
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
"moduleResolution": "bundler"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
This configuration enables proper module resolution for the component's TypeScript files.
|
|
71
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
72
|
-
|
|
73
|
-
## Install from CDN
|
|
74
|
-
|
|
75
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
76
|
-
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
77
|
-
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.
|
|
78
|
-
|
|
79
|
-
```html
|
|
80
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-dropdown/+esm"></script>
|
|
81
|
-
```
|
|
82
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
83
|
-
|
|
84
|
-
## Formkit Development
|
|
85
|
-
|
|
86
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
87
|
-
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
88
|
-
|
|
89
|
-
### Filtering
|
|
90
|
-
|
|
91
|
-
Running the `dev` command will open a `localhost` development server for all components in the monorepo at once.
|
|
92
|
-
|
|
93
|
-
To only develop a single component, use the `--filter` flag:
|
|
94
|
-
|
|
95
|
-
```shell
|
|
96
|
-
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
97
|
-
```
|
|
98
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
99
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
100
|
-
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
101
|
-
|
|
102
|
-
## Custom Component Registration for Version Management
|
|
103
|
-
|
|
104
|
-
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.
|
|
105
|
-
|
|
106
|
-
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
107
|
-
|
|
108
|
-
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.
|
|
109
|
-
|
|
110
|
-
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
111
|
-
|
|
112
|
-
```js
|
|
113
|
-
// Import the class only
|
|
114
|
-
import { AuroDropdown } from '@aurodesignsystem/auro-formkit/auro-dropdown/class';
|
|
115
|
-
|
|
116
|
-
// Register with a custom name if desired
|
|
117
|
-
AuroDropdown.register('custom-dropdown');
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
This will create a new custom element `<custom-dropdown>` that behaves exactly like `<auro-dropdown>`, allowing both to coexist on the same page without interfering with each other.
|
|
121
|
-
|
|
122
|
-
<div class="exampleWrapper exampleWrapper--flex">
|
|
123
|
-
<custom-dropdown id="customCommon" layout="classic" shape="classic" size="lg" aria-label="Label content for screen reader">
|
|
124
|
-
<div style="padding: var(--ds-size-150);">
|
|
125
|
-
Lorem ipsum solar
|
|
126
|
-
<br />
|
|
127
|
-
<auro-button id="customCommonButton">
|
|
128
|
-
Dismiss Dropdown
|
|
129
|
-
</auro-button>
|
|
130
|
-
</div>
|
|
131
|
-
<span slot="helpText">
|
|
132
|
-
Help text
|
|
133
|
-
</span>
|
|
134
|
-
<div slot="trigger">
|
|
135
|
-
Trigger
|
|
136
|
-
</div>
|
|
137
|
-
</custom-dropdown>
|
|
138
|
-
</div>
|
|
139
|
-
<auro-accordion alignRight>
|
|
140
|
-
<span slot="trigger">See code</span>
|
|
141
|
-
|
|
142
|
-
```html
|
|
143
|
-
<custom-dropdown id="customCommon" layout="classic" shape="classic" size="lg" aria-label="Label content for screen reader">
|
|
144
|
-
<div style="padding: var(--ds-size-150);">
|
|
145
|
-
Lorem ipsum solar
|
|
146
|
-
<br />
|
|
147
|
-
<auro-button id="customCommonButton">
|
|
148
|
-
Dismiss Dropdown
|
|
149
|
-
</auro-button>
|
|
150
|
-
</div>
|
|
151
|
-
<span slot="helpText">
|
|
152
|
-
Help text
|
|
153
|
-
</span>
|
|
154
|
-
<div slot="trigger">
|
|
155
|
-
Trigger
|
|
156
|
-
</div>
|
|
157
|
-
</custom-dropdown>
|
|
158
|
-
```
|
|
159
|
-
</auro-accordion>
|
|
160
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -1,482 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `auro-dropdown` element provides a way to place content in a bib that can be toggled.
|
|
3
|
-
* @customElement auro-dropdown
|
|
4
|
-
*
|
|
5
|
-
* @slot - Default slot for the dropdown bib content.
|
|
6
|
-
* @slot helpText - Defines the content of the helpText.
|
|
7
|
-
* @slot trigger - Defines the content of the trigger.
|
|
8
|
-
* @csspart trigger - The trigger content container.
|
|
9
|
-
* @csspart chevron - The collapsed/expanded state icon container.
|
|
10
|
-
* @csspart size - The size of the dropdown bib. (height, width, maxHeight, maxWidth only)
|
|
11
|
-
* @csspart helpText - The helpText content container.
|
|
12
|
-
* @event auroDropdown-triggerClick - Notifies that the trigger has been clicked.
|
|
13
|
-
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
14
|
-
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
15
|
-
*/
|
|
16
|
-
export class AuroDropdown extends AuroElement {
|
|
17
|
-
static get shadowRootOptions(): {
|
|
18
|
-
delegatesFocus: boolean;
|
|
19
|
-
clonable?: boolean;
|
|
20
|
-
customElementRegistry?: CustomElementRegistry;
|
|
21
|
-
mode: ShadowRootMode;
|
|
22
|
-
serializable?: boolean;
|
|
23
|
-
slotAssignment?: SlotAssignmentMode;
|
|
24
|
-
};
|
|
25
|
-
static get properties(): {
|
|
26
|
-
/**
|
|
27
|
-
* The value for the role attribute of the trigger element.
|
|
28
|
-
*/
|
|
29
|
-
a11yRole: {
|
|
30
|
-
type: StringConstructor;
|
|
31
|
-
attribute: boolean;
|
|
32
|
-
reflect: boolean;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Defines whether the component will be on lighter or darker backgrounds.
|
|
36
|
-
* @type {'default' | 'inverse'}
|
|
37
|
-
* @default 'default'
|
|
38
|
-
*/
|
|
39
|
-
appearance: "default" | "inverse";
|
|
40
|
-
/**
|
|
41
|
-
* If declared, bib's position will be automatically calculated where to appear.
|
|
42
|
-
*/
|
|
43
|
-
autoPlacement: {
|
|
44
|
-
type: BooleanConstructor;
|
|
45
|
-
reflect: boolean;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
49
|
-
*/
|
|
50
|
-
disableEventShow: {
|
|
51
|
-
type: BooleanConstructor;
|
|
52
|
-
reflect: boolean;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* If declared, applies a border around the trigger slot.
|
|
56
|
-
*/
|
|
57
|
-
simple: {
|
|
58
|
-
type: BooleanConstructor;
|
|
59
|
-
reflect: boolean;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* If declared, the dropdown displays a chevron on the right.
|
|
63
|
-
*/
|
|
64
|
-
chevron: {
|
|
65
|
-
type: BooleanConstructor;
|
|
66
|
-
reflect: boolean;
|
|
67
|
-
attribute: string;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* If declared, the dropdown is not interactive.
|
|
71
|
-
*/
|
|
72
|
-
disabled: {
|
|
73
|
-
type: BooleanConstructor;
|
|
74
|
-
reflect: boolean;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* If declared, the focus trap inside of bib will be turned off.
|
|
78
|
-
*/
|
|
79
|
-
disableFocusTrap: {
|
|
80
|
-
type: BooleanConstructor;
|
|
81
|
-
reflect: boolean;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* @private
|
|
85
|
-
*/
|
|
86
|
-
dropdownWidth: {
|
|
87
|
-
type: NumberConstructor;
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* The unique ID for the dropdown bib element.
|
|
91
|
-
* @private
|
|
92
|
-
*/
|
|
93
|
-
dropdownId: {
|
|
94
|
-
type: StringConstructor;
|
|
95
|
-
reflect: boolean;
|
|
96
|
-
attribute: boolean;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* If declared, will apply error UI to the dropdown.
|
|
100
|
-
*/
|
|
101
|
-
error: {
|
|
102
|
-
type: BooleanConstructor;
|
|
103
|
-
reflect: boolean;
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Contains the help text message for the current validity error.
|
|
107
|
-
*/
|
|
108
|
-
errorMessage: {
|
|
109
|
-
type: StringConstructor;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* If declared, the bib will display when focus is applied to the trigger.
|
|
113
|
-
*/
|
|
114
|
-
focusShow: {
|
|
115
|
-
type: BooleanConstructor;
|
|
116
|
-
reflect: boolean;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* If true, the dropdown bib is displayed.
|
|
120
|
-
*/
|
|
121
|
-
isPopoverVisible: {
|
|
122
|
-
type: BooleanConstructor;
|
|
123
|
-
reflect: boolean;
|
|
124
|
-
attribute: string;
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* If true, the dropdown bib is taking the fullscreen when it's open.
|
|
128
|
-
*/
|
|
129
|
-
isBibFullscreen: {
|
|
130
|
-
type: BooleanConstructor;
|
|
131
|
-
reflect: boolean;
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* If declared, the trigger will toggle the dropdown on mouseover/mouseout.
|
|
135
|
-
*/
|
|
136
|
-
hoverToggle: {
|
|
137
|
-
type: BooleanConstructor;
|
|
138
|
-
reflect: boolean;
|
|
139
|
-
};
|
|
140
|
-
/**
|
|
141
|
-
* @private
|
|
142
|
-
*/
|
|
143
|
-
hasTriggerContent: {
|
|
144
|
-
type: BooleanConstructor;
|
|
145
|
-
};
|
|
146
|
-
/**
|
|
147
|
-
* Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
148
|
-
*
|
|
149
|
-
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
150
|
-
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
151
|
-
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
152
|
-
* @default 'sm'
|
|
153
|
-
*/
|
|
154
|
-
fullscreenBreakpoint: "xs" | "sm" | "md" | "lg" | "xl" | "disabled";
|
|
155
|
-
/**
|
|
156
|
-
* Sets the layout of the dropdown.
|
|
157
|
-
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
158
|
-
* @default 'classic'
|
|
159
|
-
*/
|
|
160
|
-
layout: "classic" | "emphasized" | "snowflake";
|
|
161
|
-
/**
|
|
162
|
-
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
163
|
-
* @private
|
|
164
|
-
*/
|
|
165
|
-
parentBorder: {
|
|
166
|
-
type: BooleanConstructor;
|
|
167
|
-
reflect: boolean;
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* If declared, the popover and trigger will be set to the same width.
|
|
171
|
-
*/
|
|
172
|
-
matchWidth: {
|
|
173
|
-
type: BooleanConstructor;
|
|
174
|
-
reflect: boolean;
|
|
175
|
-
};
|
|
176
|
-
/**
|
|
177
|
-
* If declared, the bib will NOT flip to an alternate position
|
|
178
|
-
* when there isn't enough space in the specified `placement`.
|
|
179
|
-
*/
|
|
180
|
-
noFlip: {
|
|
181
|
-
type: BooleanConstructor;
|
|
182
|
-
reflect: boolean;
|
|
183
|
-
};
|
|
184
|
-
/**
|
|
185
|
-
* If declared, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
186
|
-
*/
|
|
187
|
-
shift: {
|
|
188
|
-
type: BooleanConstructor;
|
|
189
|
-
reflect: boolean;
|
|
190
|
-
};
|
|
191
|
-
/**
|
|
192
|
-
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
193
|
-
*/
|
|
194
|
-
noHideOnThisFocusLoss: {
|
|
195
|
-
type: BooleanConstructor;
|
|
196
|
-
reflect: boolean;
|
|
197
|
-
};
|
|
198
|
-
/**
|
|
199
|
-
* If declared, the trigger will only show the dropdown bib.
|
|
200
|
-
*/
|
|
201
|
-
noToggle: {
|
|
202
|
-
type: BooleanConstructor;
|
|
203
|
-
reflect: boolean;
|
|
204
|
-
};
|
|
205
|
-
/**
|
|
206
|
-
* Gap between the trigger element and bib.
|
|
207
|
-
* @default 0
|
|
208
|
-
*/
|
|
209
|
-
offset: {
|
|
210
|
-
type: NumberConstructor;
|
|
211
|
-
reflect: boolean;
|
|
212
|
-
};
|
|
213
|
-
/**
|
|
214
|
-
* DEPRECATED - use `appearance="inverse"` instead.
|
|
215
|
-
*/
|
|
216
|
-
onDark: {
|
|
217
|
-
type: BooleanConstructor;
|
|
218
|
-
reflect: boolean;
|
|
219
|
-
};
|
|
220
|
-
/**
|
|
221
|
-
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
222
|
-
*/
|
|
223
|
-
onSlotChange: {
|
|
224
|
-
type: FunctionConstructor;
|
|
225
|
-
reflect: boolean;
|
|
226
|
-
};
|
|
227
|
-
/**
|
|
228
|
-
* Position where the bib should appear relative to the trigger.
|
|
229
|
-
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
230
|
-
* @default 'bottom-start'
|
|
231
|
-
*/
|
|
232
|
-
placement: "top" | "right" | "bottom" | "left" | "bottom-start" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-end" | "left-start" | "left-end";
|
|
233
|
-
/**
|
|
234
|
-
* @private
|
|
235
|
-
*/
|
|
236
|
-
tabIndex: {
|
|
237
|
-
type: NumberConstructor;
|
|
238
|
-
};
|
|
239
|
-
/**
|
|
240
|
-
* Accessible label for the dropdown bib dialog element.
|
|
241
|
-
* @private
|
|
242
|
-
*/
|
|
243
|
-
bibDialogLabel: {
|
|
244
|
-
type: StringConstructor;
|
|
245
|
-
attribute: boolean;
|
|
246
|
-
reflect: boolean;
|
|
247
|
-
};
|
|
248
|
-
};
|
|
249
|
-
static get styles(): import("lit").CSSResult[];
|
|
250
|
-
/**
|
|
251
|
-
* This will register this element with the browser.
|
|
252
|
-
* @param {string} [name="auro-dropdown"] - The name of the element that you want to register.
|
|
253
|
-
*
|
|
254
|
-
* @example
|
|
255
|
-
* AuroDropdown.register("custom-dropdown") // this will register this element to <custom-dropdown/>
|
|
256
|
-
*
|
|
257
|
-
*/
|
|
258
|
-
static register(name?: string): void;
|
|
259
|
-
isPopoverVisible: boolean;
|
|
260
|
-
isBibFullscreen: boolean;
|
|
261
|
-
matchWidth: boolean;
|
|
262
|
-
noHideOnThisFocusLoss: boolean;
|
|
263
|
-
errorMessage: any;
|
|
264
|
-
layout: any;
|
|
265
|
-
shape: any;
|
|
266
|
-
size: any;
|
|
267
|
-
parentBorder: boolean;
|
|
268
|
-
/**
|
|
269
|
-
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
270
|
-
* @private
|
|
271
|
-
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
272
|
-
*/
|
|
273
|
-
private handleDropdownToggle;
|
|
274
|
-
/** @private */
|
|
275
|
-
private bibElement;
|
|
276
|
-
/**
|
|
277
|
-
* @private
|
|
278
|
-
* @returns {object} Class definition for the wrapper element.
|
|
279
|
-
*/
|
|
280
|
-
private get commonWrapperClasses();
|
|
281
|
-
/**
|
|
282
|
-
* @private
|
|
283
|
-
* @returns {void} Internal defaults.
|
|
284
|
-
*/
|
|
285
|
-
private _intializeDefaults;
|
|
286
|
-
appearance: string;
|
|
287
|
-
chevron: boolean;
|
|
288
|
-
disabled: boolean;
|
|
289
|
-
disableFocusTrap: boolean;
|
|
290
|
-
error: boolean;
|
|
291
|
-
noToggle: boolean;
|
|
292
|
-
a11yRole: string;
|
|
293
|
-
onDark: boolean;
|
|
294
|
-
showTriggerBorders: boolean;
|
|
295
|
-
triggerContentFocusable: any;
|
|
296
|
-
simple: boolean;
|
|
297
|
-
placement: string;
|
|
298
|
-
offset: number;
|
|
299
|
-
noFlip: boolean;
|
|
300
|
-
shift: boolean;
|
|
301
|
-
autoPlacement: boolean;
|
|
302
|
-
/**
|
|
303
|
-
* @private
|
|
304
|
-
*/
|
|
305
|
-
private hasTriggerContent;
|
|
306
|
-
/**
|
|
307
|
-
* @private
|
|
308
|
-
*/
|
|
309
|
-
private triggerContentSlot;
|
|
310
|
-
/**
|
|
311
|
-
* @private
|
|
312
|
-
*/
|
|
313
|
-
private runtimeUtils;
|
|
314
|
-
/**
|
|
315
|
-
* @private
|
|
316
|
-
*/
|
|
317
|
-
private floater;
|
|
318
|
-
/**
|
|
319
|
-
* @private
|
|
320
|
-
*/
|
|
321
|
-
private iconTag;
|
|
322
|
-
/**
|
|
323
|
-
* @private
|
|
324
|
-
*/
|
|
325
|
-
private dropdownBibTag;
|
|
326
|
-
/**
|
|
327
|
-
* @private
|
|
328
|
-
*/
|
|
329
|
-
private helpTextTag;
|
|
330
|
-
/**
|
|
331
|
-
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
332
|
-
* @private
|
|
333
|
-
* @param {Event} event - The original focus event.
|
|
334
|
-
*/
|
|
335
|
-
private bindFocusEventToTrigger;
|
|
336
|
-
/**
|
|
337
|
-
* @ignore
|
|
338
|
-
*/
|
|
339
|
-
get floaterConfig(): {
|
|
340
|
-
placement: string;
|
|
341
|
-
flip: boolean;
|
|
342
|
-
shift: boolean;
|
|
343
|
-
autoPlacement: boolean;
|
|
344
|
-
offset: number;
|
|
345
|
-
};
|
|
346
|
-
/**
|
|
347
|
-
* Public method to hide the dropdown.
|
|
348
|
-
* @returns {void}
|
|
349
|
-
*/
|
|
350
|
-
hide(): void;
|
|
351
|
-
/**
|
|
352
|
-
* Public method to show the dropdown.
|
|
353
|
-
* @returns {void}
|
|
354
|
-
*/
|
|
355
|
-
show(): void;
|
|
356
|
-
/**
|
|
357
|
-
* When bib is open, focus on the first element inside of bib.
|
|
358
|
-
* If not, trigger element will get focus.
|
|
359
|
-
*/
|
|
360
|
-
focus(): void;
|
|
361
|
-
/**
|
|
362
|
-
* Sets the active descendant element for accessibility.
|
|
363
|
-
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
364
|
-
* This function is used in components that contain `auro-dropdown` to set the active descendant.
|
|
365
|
-
* @private
|
|
366
|
-
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
367
|
-
* @returns {void}
|
|
368
|
-
*/
|
|
369
|
-
private setActiveDescendant;
|
|
370
|
-
/**
|
|
371
|
-
* Accessor for reusing the focusable entity query string.
|
|
372
|
-
* @private
|
|
373
|
-
* @returns {string}
|
|
374
|
-
*/
|
|
375
|
-
private get focusableEntityQuery();
|
|
376
|
-
updated(changedProperties: any): void;
|
|
377
|
-
firstUpdated(): void;
|
|
378
|
-
dropdownId: any;
|
|
379
|
-
bibContent: any;
|
|
380
|
-
/**
|
|
381
|
-
* Exposes CSS parts for styling from parent components.
|
|
382
|
-
* @returns {void}
|
|
383
|
-
*/
|
|
384
|
-
exposeCssParts(): void;
|
|
385
|
-
/**
|
|
386
|
-
* Determines if content is within a custom slot.
|
|
387
|
-
* @private
|
|
388
|
-
* @param {HTMLElement} element - The element to check.
|
|
389
|
-
* @returns {Boolean}
|
|
390
|
-
*/
|
|
391
|
-
private isCustomSlotContent;
|
|
392
|
-
/**
|
|
393
|
-
* Function to support @focusin event.
|
|
394
|
-
* @private
|
|
395
|
-
* @return {void}
|
|
396
|
-
*/
|
|
397
|
-
private handleFocusin;
|
|
398
|
-
hasFocus: boolean;
|
|
399
|
-
/**
|
|
400
|
-
* @private
|
|
401
|
-
*/
|
|
402
|
-
private updateFocusTrap;
|
|
403
|
-
focusTrap: any;
|
|
404
|
-
/**
|
|
405
|
-
* Function to support @focusout event.
|
|
406
|
-
* @private
|
|
407
|
-
* @return {void}
|
|
408
|
-
*/
|
|
409
|
-
private handleFocusout;
|
|
410
|
-
/**
|
|
411
|
-
* Sets up event listeners to deliver focus and blur events from nested Auro components within the trigger slot to trigger.
|
|
412
|
-
* This ensures that focus/blur events originating from within these components are propagated to the trigger element itself.
|
|
413
|
-
* @private
|
|
414
|
-
*/
|
|
415
|
-
private setupTriggerFocusEventBinding;
|
|
416
|
-
/**
|
|
417
|
-
* Clears focus and blur event listeners from nested Auro components within the trigger slot.
|
|
418
|
-
* @private
|
|
419
|
-
* @returns {void}
|
|
420
|
-
*/
|
|
421
|
-
private clearTriggerFocusEventBinding;
|
|
422
|
-
clearTriggerA11yAttributes(triggerElement: any): void;
|
|
423
|
-
/**
|
|
424
|
-
* Handles changes to the trigger content slot and updates related properties.
|
|
425
|
-
*
|
|
426
|
-
* It first updates the floater settings
|
|
427
|
-
* Then, it retrieves the assigned nodes from the event target and checks if any of
|
|
428
|
-
* the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
|
|
429
|
-
*
|
|
430
|
-
* @private
|
|
431
|
-
* @method handleTriggerContentSlotChange
|
|
432
|
-
* @param {Event} event - Native slotchange event.
|
|
433
|
-
* @returns {void}
|
|
434
|
-
*/
|
|
435
|
-
private handleTriggerContentSlotChange;
|
|
436
|
-
triggerNode: EventTarget;
|
|
437
|
-
/**
|
|
438
|
-
* Handles the default slot change event and updates the content.
|
|
439
|
-
*
|
|
440
|
-
* This method retrieves all nodes assigned to the default slot of the event target and appends them
|
|
441
|
-
* to the `bibContent` element. If a callback function `onSlotChange` is defined, it is invoked to
|
|
442
|
-
* notify about the slot change.
|
|
443
|
-
*
|
|
444
|
-
* @private
|
|
445
|
-
* @method handleDefaultSlot
|
|
446
|
-
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
447
|
-
*/
|
|
448
|
-
private handleDefaultSlot;
|
|
449
|
-
/**
|
|
450
|
-
* Returns HTML for the common portion of the layouts.
|
|
451
|
-
* @private
|
|
452
|
-
* @param {Object} helpTextClasses - Classes to apply to the help text container.
|
|
453
|
-
* @returns {html} - Returns HTML.
|
|
454
|
-
*/
|
|
455
|
-
private renderBasicHtml;
|
|
456
|
-
/**
|
|
457
|
-
* Returns HTML for the classic layout. Does not support type="*".
|
|
458
|
-
* @private
|
|
459
|
-
* @returns {html} - Returns HTML for the classic layout.
|
|
460
|
-
*/
|
|
461
|
-
private renderLayoutClassic;
|
|
462
|
-
/**
|
|
463
|
-
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
464
|
-
* @private
|
|
465
|
-
* @returns {html} - Returns HTML for the snowflake layout.
|
|
466
|
-
*/
|
|
467
|
-
private renderLayoutSnowflake;
|
|
468
|
-
/**
|
|
469
|
-
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
470
|
-
* @private
|
|
471
|
-
* @returns {html} - Returns HTML for the emphasized layout.
|
|
472
|
-
*/
|
|
473
|
-
private renderLayoutEmphasized;
|
|
474
|
-
/**
|
|
475
|
-
* Logic to determine the layout of the component.
|
|
476
|
-
* @private
|
|
477
|
-
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
478
|
-
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
479
|
-
*/
|
|
480
|
-
private renderLayout;
|
|
481
|
-
}
|
|
482
|
-
import { AuroElement } from '../../layoutElement/src/auroElement.js';
|