@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,161 +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
|
-
# Counter
|
|
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-counter` component is a ui element that enables a way to increment or decrement a single digit value. Common use case is inside the `auro-counter-group` to facilitate a collection of counters to add passenger types to a flight.
|
|
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
|
-
## Counter 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-counter` element should be used in situations where users may:
|
|
36
|
-
|
|
37
|
-
* Need to input a numeric value within a defined range
|
|
38
|
-
* Need a user-friendly interface for quantity selection
|
|
39
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
|
-
|
|
41
|
-
## Getting Started
|
|
42
|
-
|
|
43
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
44
|
-
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
45
|
-
|
|
46
|
-
#### NPM Installation
|
|
47
|
-
|
|
48
|
-
```shell
|
|
49
|
-
$ npm i @aurodesignsystem/auro-formkit
|
|
50
|
-
```
|
|
51
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
52
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
53
|
-
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
54
|
-
|
|
55
|
-
### TypeScript Module Resolution
|
|
56
|
-
|
|
57
|
-
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
{
|
|
61
|
-
"compilerOptions": {
|
|
62
|
-
"moduleResolution": "bundler"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
This configuration enables proper module resolution for the component's TypeScript files.
|
|
68
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
69
|
-
|
|
70
|
-
## Install from CDN
|
|
71
|
-
|
|
72
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
73
|
-
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
74
|
-
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.
|
|
75
|
-
|
|
76
|
-
```html
|
|
77
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-counter/+esm"></script>
|
|
78
|
-
```
|
|
79
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
80
|
-
|
|
81
|
-
## Formkit Development
|
|
82
|
-
|
|
83
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
84
|
-
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
85
|
-
|
|
86
|
-
### Filtering
|
|
87
|
-
|
|
88
|
-
Running the `dev` command will open a `localhost` development server for all components in the monorepo at once.
|
|
89
|
-
|
|
90
|
-
To only develop a single component, use the `--filter` flag:
|
|
91
|
-
|
|
92
|
-
```shell
|
|
93
|
-
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
94
|
-
```
|
|
95
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
96
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
97
|
-
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
98
|
-
|
|
99
|
-
## Custom Component Registration for Version Management
|
|
100
|
-
|
|
101
|
-
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.
|
|
102
|
-
|
|
103
|
-
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
104
|
-
|
|
105
|
-
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.
|
|
106
|
-
|
|
107
|
-
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
108
|
-
|
|
109
|
-
```js
|
|
110
|
-
// Import the class only
|
|
111
|
-
import { AuroCounter, AuroCounterGroup } from '@aurodesignsystem/auro-formkit/auro-counter/class';
|
|
112
|
-
|
|
113
|
-
// Register with a custom name if desired
|
|
114
|
-
AuroCounter.register('custom-counter');
|
|
115
|
-
AuroCounterGroup.register('custom-counter-group');
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
This will create a new custom element `<custom-counter>` and `<custom-counter-group>` that behaves exactly like `<auro-counter>` and `<auro-counter-group>`, allowing both to coexist on the same page without interfering with each other.
|
|
119
|
-
|
|
120
|
-
<div class="exampleWrapper exampleWrapper--flex">
|
|
121
|
-
<custom-counter-group>
|
|
122
|
-
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
123
|
-
<div slot="label">Passengers</div>
|
|
124
|
-
<custom-counter>
|
|
125
|
-
Adults
|
|
126
|
-
<span slot="description">18 years or older</span>
|
|
127
|
-
</custom-counter>
|
|
128
|
-
<custom-counter>
|
|
129
|
-
Children
|
|
130
|
-
<span slot="description">2-17 years</span>
|
|
131
|
-
</custom-counter>
|
|
132
|
-
</custom-counter-group>
|
|
133
|
-
</div>
|
|
134
|
-
<auro-accordion alignRight>
|
|
135
|
-
<span slot="trigger">See code</span>
|
|
136
|
-
|
|
137
|
-
```html
|
|
138
|
-
<custom-counter-group>
|
|
139
|
-
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
140
|
-
<div slot="label">Passengers</div>
|
|
141
|
-
<custom-counter>
|
|
142
|
-
Adults
|
|
143
|
-
<span slot="description">18 years or older</span>
|
|
144
|
-
</custom-counter>
|
|
145
|
-
<custom-counter>
|
|
146
|
-
Children
|
|
147
|
-
<span slot="description">2-17 years</span>
|
|
148
|
-
</custom-counter>
|
|
149
|
-
</custom-counter-group>
|
|
150
|
-
|
|
151
|
-
```html
|
|
152
|
-
<custom-checkbox-group>
|
|
153
|
-
<span slot="legend">Form label goes here</span>
|
|
154
|
-
<custom-checkbox value="value1" name="custom" id="checkbox-custom1">Custom checkbox option</custom-checkbox>
|
|
155
|
-
<custom-checkbox value="value2" name="custom" id="checkbox-custom2" checked>Custom checkbox option</custom-checkbox>
|
|
156
|
-
<custom-checkbox value="value3" name="custom" id="checkbox-custom3">Custom checkbox option</custom-checkbox>
|
|
157
|
-
<custom-checkbox value="value4" name="custom" id="checkbox-custom4">Custom checkbox option</custom-checkbox>
|
|
158
|
-
</custom-checkbox-group>
|
|
159
|
-
```
|
|
160
|
-
</auro-accordion>
|
|
161
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export class AuroCounterButton {
|
|
2
|
-
static get styles(): import("lit").CSSResult[];
|
|
3
|
-
/**
|
|
4
|
-
* This will register this element with the browser.
|
|
5
|
-
* @param {string} [name="auro-counter-button"] - The name of element that you want to register to.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* AuroCounterButton.register("custom-counter-button") // this will register this element to <custom-counter-button/>
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
static register(name?: string): void;
|
|
12
|
-
size: string;
|
|
13
|
-
shape: string;
|
|
14
|
-
}
|
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `auro-counter-group` element provides a flexible interface for grouping multiple counters, supporting validation, custom validity messages, and disabled states based on the group's value.
|
|
3
|
-
* @customElement auro-counter-group
|
|
4
|
-
*
|
|
5
|
-
* @slot default - Slot for counter elements.
|
|
6
|
-
* @slot ariaLabel.bib.close - Sets aria-label on close button in fullscreen bib
|
|
7
|
-
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options. Only used when `isDropdown` is true. Required.
|
|
8
|
-
* @slot bib.fullscreen.footer - Defines the footer to display at the bottom of fullscreen bib. Only used when `isDropdown` is true.
|
|
9
|
-
* @slot label - Dropdown label content. Only used when `isDropdown` is true.
|
|
10
|
-
* @slot valueText - Dropdown value text display. Only used when `isDropdown` is true.
|
|
11
|
-
* @slot helpText - Dropdown help text content. Only used when `isDropdown` is true.
|
|
12
|
-
*/
|
|
13
|
-
export class AuroCounterGroup extends AuroElement {
|
|
14
|
-
static get styles(): import("lit").CSSResult[];
|
|
15
|
-
static get properties(): {
|
|
16
|
-
/**
|
|
17
|
-
* Defines whether the component will be on lighter or darker backgrounds.
|
|
18
|
-
* @type {'default' | 'inverse'}
|
|
19
|
-
* @default 'default'
|
|
20
|
-
*/
|
|
21
|
-
appearance: "default" | "inverse";
|
|
22
|
-
/**
|
|
23
|
-
* If declared, bib's position will be automatically calculated where to appear.
|
|
24
|
-
* @default false
|
|
25
|
-
*/
|
|
26
|
-
autoPlacement: {
|
|
27
|
-
type: BooleanConstructor;
|
|
28
|
-
reflect: boolean;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* The current error message to display when the component is invalid.
|
|
32
|
-
*/
|
|
33
|
-
error: {
|
|
34
|
-
type: StringConstructor;
|
|
35
|
-
reflect: boolean;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* The current error message to display when the component is invalid.
|
|
39
|
-
* This is set by validation and is not available to consumers.
|
|
40
|
-
* @private
|
|
41
|
-
*/
|
|
42
|
-
errorMessage: {
|
|
43
|
-
type: StringConstructor;
|
|
44
|
-
reflect: boolean;
|
|
45
|
-
attribute: boolean;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
49
|
-
*
|
|
50
|
-
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
51
|
-
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
52
|
-
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
53
|
-
* @default 'sm'
|
|
54
|
-
*/
|
|
55
|
-
fullscreenBreakpoint: "xs" | "sm" | "md" | "lg" | "xl" | "disabled";
|
|
56
|
-
/**
|
|
57
|
-
* If true, the counter group is displayed as a dropdown.
|
|
58
|
-
*/
|
|
59
|
-
isDropdown: {
|
|
60
|
-
type: BooleanConstructor;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Determines the layout style of the counter group when it is a dropdown.
|
|
64
|
-
* @type {'classic' | 'snowflake'}
|
|
65
|
-
* @default 'classic'
|
|
66
|
-
*/
|
|
67
|
-
layout: "classic" | "snowflake";
|
|
68
|
-
/**
|
|
69
|
-
* If declared, the dropdown will expand to the width of its parent container.
|
|
70
|
-
* Otherwise, the dropdown width will be determined by its content.
|
|
71
|
-
*/
|
|
72
|
-
matchWidth: {
|
|
73
|
-
type: BooleanConstructor;
|
|
74
|
-
reflect: boolean;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* The maximum value allowed for the whole group of counters.
|
|
78
|
-
*/
|
|
79
|
-
max: {
|
|
80
|
-
type: NumberConstructor;
|
|
81
|
-
reflect: boolean;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* The minimum value allowed for the whole group of counters.
|
|
85
|
-
*/
|
|
86
|
-
min: {
|
|
87
|
-
type: NumberConstructor;
|
|
88
|
-
reflect: boolean;
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* If declared, make bib.fullscreen.headline in HeadingDisplay.
|
|
92
|
-
* Otherwise, Heading 600.
|
|
93
|
-
*/
|
|
94
|
-
largeFullscreenHeadline: {
|
|
95
|
-
type: BooleanConstructor;
|
|
96
|
-
reflect: boolean;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* If declared, the bib will NOT flip to an alternate position
|
|
100
|
-
* when there isn't enough space in the specified `placement`.
|
|
101
|
-
*/
|
|
102
|
-
noFlip: {
|
|
103
|
-
type: BooleanConstructor;
|
|
104
|
-
reflect: boolean;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* If declared, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
108
|
-
*/
|
|
109
|
-
shift: {
|
|
110
|
-
type: BooleanConstructor;
|
|
111
|
-
reflect: boolean;
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* Gap between the trigger element and bib.
|
|
115
|
-
* @default 0
|
|
116
|
-
*/
|
|
117
|
-
offset: {
|
|
118
|
-
type: NumberConstructor;
|
|
119
|
-
reflect: boolean;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* DEPRECATED - use `appearance` instead.
|
|
123
|
-
*/
|
|
124
|
-
onDark: {
|
|
125
|
-
type: BooleanConstructor;
|
|
126
|
-
reflect: boolean;
|
|
127
|
-
};
|
|
128
|
-
/**
|
|
129
|
-
* Position where the bib should appear relative to the trigger.
|
|
130
|
-
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
131
|
-
* @default 'bottom-start'
|
|
132
|
-
*/
|
|
133
|
-
placement: "top" | "right" | "bottom" | "left" | "bottom-start" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-end" | "left-start" | "left-end";
|
|
134
|
-
/**
|
|
135
|
-
* The total value of the counters.
|
|
136
|
-
*/
|
|
137
|
-
total: {
|
|
138
|
-
type: NumberConstructor;
|
|
139
|
-
};
|
|
140
|
-
/**
|
|
141
|
-
* Reflects the validity state.
|
|
142
|
-
*/
|
|
143
|
-
validity: {
|
|
144
|
-
type: StringConstructor;
|
|
145
|
-
reflect: boolean;
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* The current individual values of the nested counters.
|
|
149
|
-
*/
|
|
150
|
-
value: {
|
|
151
|
-
type: ObjectConstructor;
|
|
152
|
-
};
|
|
153
|
-
/**
|
|
154
|
-
* The current text in the valueText slot.
|
|
155
|
-
* @private
|
|
156
|
-
*/
|
|
157
|
-
valueText: {
|
|
158
|
-
type: StringConstructor;
|
|
159
|
-
reflect: boolean;
|
|
160
|
-
attribute: boolean;
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* Registers the custom element with the browser.
|
|
165
|
-
* @param {string} [name="auro-counter-group"] - The name of the element that you want to register.
|
|
166
|
-
* @example
|
|
167
|
-
* AuroCounterGroup.register("custom-counter-group") // registers <custom-counter-group/>
|
|
168
|
-
*/
|
|
169
|
-
static register(name?: string): void;
|
|
170
|
-
appearance: string;
|
|
171
|
-
max: any;
|
|
172
|
-
min: any;
|
|
173
|
-
onDark: boolean;
|
|
174
|
-
total: number;
|
|
175
|
-
validity: any;
|
|
176
|
-
value: {};
|
|
177
|
-
matchWidth: boolean;
|
|
178
|
-
isDropdown: boolean;
|
|
179
|
-
fullscreenBreakpoint: string;
|
|
180
|
-
largeFullscreenHeadline: boolean;
|
|
181
|
-
autoPlacement: boolean;
|
|
182
|
-
noFlip: boolean;
|
|
183
|
-
shift: boolean;
|
|
184
|
-
placement: string;
|
|
185
|
-
/**
|
|
186
|
-
* @private
|
|
187
|
-
*/
|
|
188
|
-
private counters;
|
|
189
|
-
/**
|
|
190
|
-
* @private
|
|
191
|
-
*/
|
|
192
|
-
private dropdown;
|
|
193
|
-
/**
|
|
194
|
-
* @private
|
|
195
|
-
*/
|
|
196
|
-
private bibtemplate;
|
|
197
|
-
/**
|
|
198
|
-
* @private
|
|
199
|
-
*/
|
|
200
|
-
private validation;
|
|
201
|
-
/**
|
|
202
|
-
* Updates the aggregate value based on the values of contained auro-counter components.
|
|
203
|
-
* This method queries for all `auro-counter` elements, sums their values, and updates the component's `value` property.
|
|
204
|
-
* Additionally, it iterates through each counter and calls `manageDisabled()` on it.
|
|
205
|
-
* @private
|
|
206
|
-
*/
|
|
207
|
-
private updateValue;
|
|
208
|
-
/**
|
|
209
|
-
* Updates the validity of the counter group based on the validity of its counters.
|
|
210
|
-
* This method checks all counters within the group, determines if any are invalid, and updates the group's validity state and error message accordingly.
|
|
211
|
-
* If any counter is invalid, it generates a combined error message from all invalid counters.
|
|
212
|
-
* @returns {void}
|
|
213
|
-
* @private
|
|
214
|
-
*/
|
|
215
|
-
private updateValidity;
|
|
216
|
-
/**
|
|
217
|
-
* Dynamically generated dropdown tag.
|
|
218
|
-
* @private
|
|
219
|
-
* @type {string}
|
|
220
|
-
*/
|
|
221
|
-
private dropdownTag;
|
|
222
|
-
/**
|
|
223
|
-
* Dynamically generated bibtempalate tag.
|
|
224
|
-
* @private
|
|
225
|
-
* @type {string}
|
|
226
|
-
*/
|
|
227
|
-
private bibtemplateTag;
|
|
228
|
-
/**
|
|
229
|
-
* Dynamically generated helpText tag.
|
|
230
|
-
* @private
|
|
231
|
-
* @type {string}
|
|
232
|
-
*/
|
|
233
|
-
private helpTextTag;
|
|
234
|
-
/**
|
|
235
|
-
* @private
|
|
236
|
-
*/
|
|
237
|
-
private iconTag;
|
|
238
|
-
/**
|
|
239
|
-
* Dynamically disables increment/decrement buttons on a counter based on group value.
|
|
240
|
-
* This method checks the total aggregated value against the group's min and max properties.
|
|
241
|
-
* If the total value is at or below the minimum, the counter's decrement button is disabled; if at or above the maximum, the increment button is disabled.
|
|
242
|
-
*
|
|
243
|
-
* @param {HTMLElement} counter - The counter element to potentially disable.
|
|
244
|
-
* @private
|
|
245
|
-
*/
|
|
246
|
-
private manageDisabled;
|
|
247
|
-
/**
|
|
248
|
-
* Attaches input event listeners to all auro-counter elements within the component.
|
|
249
|
-
* This method selects all `auro-counter` and `[auro-counter]` elements and adds an `input` event listener to each.
|
|
250
|
-
* The listener calls `this.updateValue()` whenever the value of a counter changes.
|
|
251
|
-
* @private
|
|
252
|
-
*/
|
|
253
|
-
private configureCounters;
|
|
254
|
-
/**
|
|
255
|
-
* Renders help text error messages.
|
|
256
|
-
* @param {Array<string>} messages - The error messages to render.
|
|
257
|
-
* @returns {TemplateResult[]} - The rendered error messages rendered in a TemplateResult.
|
|
258
|
-
* @private
|
|
259
|
-
*/
|
|
260
|
-
private renderHelpTextErrors;
|
|
261
|
-
/**
|
|
262
|
-
* Gets and returns an array of counters in an invalid state.
|
|
263
|
-
* @returns {Array<HTMLElement>} - Returns an array of invalid counters.
|
|
264
|
-
* @param {NodeList} counters - The NodeList of counter elements to check.
|
|
265
|
-
* @private
|
|
266
|
-
*/
|
|
267
|
-
private getInvalidCounters;
|
|
268
|
-
/**
|
|
269
|
-
* Gets all valid error messages from errored counters.
|
|
270
|
-
* @param {NodeList} invalidCounters - The NodeList of counter elements to check.
|
|
271
|
-
* @returns {Array<string>} - Returns an array of error messages from invalid counters.
|
|
272
|
-
* @private
|
|
273
|
-
*/
|
|
274
|
-
private getErrorMessages;
|
|
275
|
-
errorMessage: any;
|
|
276
|
-
/**
|
|
277
|
-
* Hides the dropdown bib if its open.
|
|
278
|
-
* @returns {void}
|
|
279
|
-
*/
|
|
280
|
-
hideBib(): void;
|
|
281
|
-
/**
|
|
282
|
-
* Shows the dropdown bib if there are options to show.
|
|
283
|
-
* @returns {void}
|
|
284
|
-
*/
|
|
285
|
-
showBib(): void;
|
|
286
|
-
/**
|
|
287
|
-
* Configures the dropdown counters by selecting all `auro-counter` elements,
|
|
288
|
-
* appending them to the `auro-counter-wrapper` element within the shadow DOM,
|
|
289
|
-
* and setting up keyboard navigation and input event listeners.
|
|
290
|
-
* @private
|
|
291
|
-
*/
|
|
292
|
-
private configureDropdownCounters;
|
|
293
|
-
/**
|
|
294
|
-
* This sets up a close event listener and moves any slotted `bib.fullscreen.headline` and `bib.fullscreen.footer` content into the bibtemplate.
|
|
295
|
-
* @private
|
|
296
|
-
*/
|
|
297
|
-
private configureBibtemplate;
|
|
298
|
-
/**
|
|
299
|
-
* Watch for slot changes and recalculate the menuoptions.
|
|
300
|
-
* @private
|
|
301
|
-
* @param {Event} event - `slotchange` event.
|
|
302
|
-
* @returns {void}
|
|
303
|
-
*/
|
|
304
|
-
private handleSlotChange;
|
|
305
|
-
/**
|
|
306
|
-
* Safely converts a value to a number, returning 0 if invalid.
|
|
307
|
-
* @private
|
|
308
|
-
* @param {*} value - The value to convert.
|
|
309
|
-
* @returns {number} The converted number or 0 if invalid.
|
|
310
|
-
*/
|
|
311
|
-
private safeNumberConversion;
|
|
312
|
-
/**
|
|
313
|
-
* Updates the value text in the dropdown trigger based on the counters in the counter group.
|
|
314
|
-
* @private
|
|
315
|
-
*/
|
|
316
|
-
private updateValueText;
|
|
317
|
-
valueText: any;
|
|
318
|
-
/**
|
|
319
|
-
* Validates value.
|
|
320
|
-
* @param {boolean} [force=false] - Whether to force validation.
|
|
321
|
-
*/
|
|
322
|
-
validate(force?: boolean): void;
|
|
323
|
-
updated(changedProperties: any): void;
|
|
324
|
-
firstUpdated(): void;
|
|
325
|
-
/**
|
|
326
|
-
* Returns HTML for the help text and error message.
|
|
327
|
-
* @private
|
|
328
|
-
* @returns {html} - Returns HTML for the help text and error message.
|
|
329
|
-
*/
|
|
330
|
-
private renderHelpText;
|
|
331
|
-
/**
|
|
332
|
-
* Returns HTML for the validation error icon.
|
|
333
|
-
* @private
|
|
334
|
-
* @returns {html} - Returns HTML for the validation error icon.
|
|
335
|
-
*/
|
|
336
|
-
private renderValidationErrorIcon;
|
|
337
|
-
/**
|
|
338
|
-
* Render the dropdown structure for the counter group.
|
|
339
|
-
* @returns {TemplateResult} The dropdown template.
|
|
340
|
-
* @private
|
|
341
|
-
*/
|
|
342
|
-
private renderCounterDropdown;
|
|
343
|
-
/**
|
|
344
|
-
* Render the dropdown trigger for the dropdown.
|
|
345
|
-
* @returns {TemplateResult} The dropdown trigger template.
|
|
346
|
-
* @private
|
|
347
|
-
*/
|
|
348
|
-
private renderDropdownTrigger;
|
|
349
|
-
/**
|
|
350
|
-
* Render the dropdown bib template for the dropdown.
|
|
351
|
-
* @returns {TemplateResult} The bib template.
|
|
352
|
-
* @private
|
|
353
|
-
*/
|
|
354
|
-
private renderBibTemplate;
|
|
355
|
-
/**
|
|
356
|
-
* Render the fullscreen bib slots for the dropdown.
|
|
357
|
-
* @returns {TemplateResult} The fullscreen slots template.
|
|
358
|
-
* @private
|
|
359
|
-
*/
|
|
360
|
-
private renderFullscreenSlots;
|
|
361
|
-
/**
|
|
362
|
-
* Render the counter group container.
|
|
363
|
-
* @param {boolean} isInDropdown - Whether the counter group is inside a dropdown.
|
|
364
|
-
* @returns {TemplateResult} The counter group template.
|
|
365
|
-
* @private
|
|
366
|
-
*/
|
|
367
|
-
private renderCounterGroup;
|
|
368
|
-
/**
|
|
369
|
-
* Render the classic layout.
|
|
370
|
-
* @returns {TemplateResult} The classic layout template.
|
|
371
|
-
* @private
|
|
372
|
-
*/
|
|
373
|
-
private renderLayoutClassic;
|
|
374
|
-
shape: any;
|
|
375
|
-
size: any;
|
|
376
|
-
/**
|
|
377
|
-
* Render the snowflake layout.
|
|
378
|
-
* @returns {TemplateResult} The snowflake layout template.
|
|
379
|
-
* @private
|
|
380
|
-
*/
|
|
381
|
-
private renderLayoutSnowflake;
|
|
382
|
-
/**
|
|
383
|
-
* Renders the component by layout type.
|
|
384
|
-
* @param {string} [ForcedLayout] - Optionally force a specific layout for rendering.
|
|
385
|
-
* @returns {TemplateResult} The layout template.
|
|
386
|
-
* @private
|
|
387
|
-
*/
|
|
388
|
-
private renderLayout;
|
|
389
|
-
}
|
|
390
|
-
import { AuroElement } from "../../layoutElement/src/auroElement.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wrapper element for auro-counter elements in an application to provide layout structure for multiple counters.
|
|
3
|
-
*
|
|
4
|
-
* @slot Default - Slot for counter elements.
|
|
5
|
-
*/
|
|
6
|
-
export class AuroCounterWrapper extends LitElement {
|
|
7
|
-
static get styles(): import("lit").CSSResult[];
|
|
8
|
-
/**
|
|
9
|
-
* Registers the custom element with the browser.
|
|
10
|
-
* @param {string} [name="auro-counter-wrapper"] - Custom element name to register.
|
|
11
|
-
* @example
|
|
12
|
-
* AuroCounterWrapper.register("custom-counter-wrapper") // registers <custom-counter-wrapper/>
|
|
13
|
-
*/
|
|
14
|
-
static register(name?: string): void;
|
|
15
|
-
render(): import("lit-html").TemplateResult;
|
|
16
|
-
}
|
|
17
|
-
import { LitElement } from "lit";
|