@aurodesignsystem-dev/auro-button 0.0.0-pr377.2 → 0.0.0-pr377.3
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/custom-elements.json +28 -0
- package/demo/api.html +3 -3
- package/demo/api.md +16 -0
- package/demo/auro-button.min.js +6 -8
- package/demo/index.html +3 -3
- package/dist/index.d.ts +16 -0
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -10,6 +10,34 @@
|
|
|
10
10
|
"kind": "class",
|
|
11
11
|
"description": "The `auro-button` element provides a styled, accessible button with support for various states and form association.\nIt is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.",
|
|
12
12
|
"name": "AuroButton",
|
|
13
|
+
"cssParts": [
|
|
14
|
+
{
|
|
15
|
+
"description": "Apply CSS to HTML5 button.",
|
|
16
|
+
"name": "button"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"description": "Apply CSS to auro-loader.",
|
|
20
|
+
"name": "loader"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"description": "Apply CSS to text slot.",
|
|
24
|
+
"name": "text"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"slots": [
|
|
28
|
+
{
|
|
29
|
+
"description": "Default slot for the text of the button.",
|
|
30
|
+
"name": ""
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"description": "Use this slot to pass an aria-label to the HTML5 button.",
|
|
34
|
+
"name": "ariaLabel"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"description": "Use this slot to pass an aria-label to the HTML5 button when in loading state.",
|
|
38
|
+
"name": "ariaLabel.loading"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
13
41
|
"members": [
|
|
14
42
|
{
|
|
15
43
|
"kind": "field",
|
package/demo/api.html
CHANGED
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
import { initExamples } from './api.min.js';
|
|
50
50
|
initExamples();
|
|
51
51
|
</script>
|
|
52
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest
|
|
53
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-alert@latest
|
|
54
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest
|
|
52
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
|
|
53
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-alert@latest/+esm" type="module"></script>
|
|
54
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
|
|
55
55
|
|
|
56
56
|
<script src="https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js"></script>
|
|
57
57
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js"></script>
|
package/demo/api.md
CHANGED
|
@@ -32,6 +32,22 @@ It is designed to be flexible, supporting loading states, icon slots, and integr
|
|
|
32
32
|
| Name | Parameters | Return | Description |
|
|
33
33
|
| -------- | -------------------------------------------------------------------- | ------ | ------------------------------------------------- |
|
|
34
34
|
| register | `name` (string) - The name of the element that you want to register. | | This will register this element with the browser. |
|
|
35
|
+
|
|
36
|
+
### Slots
|
|
37
|
+
|
|
38
|
+
| Name | Description |
|
|
39
|
+
| ----------------- | ------------------------------------------------------------------------------ |
|
|
40
|
+
| (default) | Default slot for the text of the button. |
|
|
41
|
+
| ariaLabel | Use this slot to pass an aria-label to the HTML5 button. |
|
|
42
|
+
| ariaLabel.loading | Use this slot to pass an aria-label to the HTML5 button when in loading state. |
|
|
43
|
+
|
|
44
|
+
### CSS Shadow Parts
|
|
45
|
+
|
|
46
|
+
| Name | Description |
|
|
47
|
+
| ------ | -------------------------- |
|
|
48
|
+
| button | Apply CSS to HTML5 button. |
|
|
49
|
+
| loader | Apply CSS to auro-loader. |
|
|
50
|
+
| text | Apply CSS to text slot. |
|
|
35
51
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
36
52
|
|
|
37
53
|
## Basic
|
package/demo/auro-button.min.js
CHANGED
|
@@ -735,7 +735,13 @@ var tokensCss = i$4`:host{--ds-auro-button-border-color: var(--ds-advanced-color
|
|
|
735
735
|
// See LICENSE in the project root for license information.
|
|
736
736
|
|
|
737
737
|
|
|
738
|
+
const ICON_ONLY_SHAPES = ["circle", "square"];
|
|
739
|
+
|
|
738
740
|
/**
|
|
741
|
+
* The `auro-button` element provides a styled, accessible button with support for various states and form association.
|
|
742
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
743
|
+
* @customElement auro-button
|
|
744
|
+
*
|
|
739
745
|
* @slot - Default slot for the text of the button.
|
|
740
746
|
* @slot ariaLabel - Use this slot to pass an aria-label to the HTML5 button.
|
|
741
747
|
* @slot ariaLabel.loading - Use this slot to pass an aria-label to the HTML5 button when in loading state.
|
|
@@ -743,14 +749,6 @@ var tokensCss = i$4`:host{--ds-auro-button-border-color: var(--ds-advanced-color
|
|
|
743
749
|
* @csspart loader - Apply CSS to auro-loader.
|
|
744
750
|
* @csspart text - Apply CSS to text slot.
|
|
745
751
|
*/
|
|
746
|
-
|
|
747
|
-
const ICON_ONLY_SHAPES = ["circle", "square"];
|
|
748
|
-
|
|
749
|
-
/**
|
|
750
|
-
* The `auro-button` element provides a styled, accessible button with support for various states and form association.
|
|
751
|
-
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
752
|
-
* @customElement auro-button
|
|
753
|
-
*/
|
|
754
752
|
class AuroButton extends AuroElement {
|
|
755
753
|
/**
|
|
756
754
|
* Enables form association for this element.
|
package/demo/index.html
CHANGED
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
import { initExamples } from './index.min.js';
|
|
38
38
|
initExamples();
|
|
39
39
|
</script>
|
|
40
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest
|
|
41
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-alert@latest
|
|
42
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest
|
|
40
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
|
|
41
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-alert@latest/+esm" type="module"></script>
|
|
42
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
|
|
43
43
|
|
|
44
44
|
<script src="https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js"></script>
|
|
45
45
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js"></script>
|
package/dist/index.d.ts
CHANGED
|
@@ -175,11 +175,27 @@ Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
|
|
|
175
175
|
* - `value`: Defines the value associated with the button which is submitted with the form data.
|
|
176
176
|
* - `variant`: undefined
|
|
177
177
|
*
|
|
178
|
+
* ## Slots
|
|
179
|
+
*
|
|
180
|
+
* Areas where markup can be added to the component.
|
|
181
|
+
*
|
|
182
|
+
* - `(default)`: Default slot for the text of the button.
|
|
183
|
+
* - `ariaLabel`: Use this slot to pass an aria-label to the HTML5 button.
|
|
184
|
+
* - `ariaLabel.loading`: Use this slot to pass an aria-label to the HTML5 button when in loading state.
|
|
185
|
+
*
|
|
178
186
|
* ## Methods
|
|
179
187
|
*
|
|
180
188
|
* Methods that can be called to access component functionality.
|
|
181
189
|
*
|
|
182
190
|
* - `register(name?: string = "auro-button") => void`: This will register this element with the browser.
|
|
191
|
+
*
|
|
192
|
+
* ## CSS Parts
|
|
193
|
+
*
|
|
194
|
+
* Custom selectors for styling elements within the component.
|
|
195
|
+
*
|
|
196
|
+
* - `button`: Apply CSS to HTML5 button.
|
|
197
|
+
* - `loader`: Apply CSS to auro-loader.
|
|
198
|
+
* - `text`: Apply CSS to text slot.
|
|
183
199
|
*/
|
|
184
200
|
"auro-button": Partial<AuroButtonProps & BaseProps<AuroButton> & BaseEvents>;
|
|
185
201
|
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"================================================================================"
|
|
8
8
|
],
|
|
9
9
|
"name": "@aurodesignsystem-dev/auro-button",
|
|
10
|
-
"version": "0.0.0-pr377.
|
|
10
|
+
"version": "0.0.0-pr377.3",
|
|
11
11
|
"description": "Auro custom auro-button element",
|
|
12
12
|
"author": "Product design and research",
|
|
13
13
|
"repository": {
|