@rcarls/rc-button 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/custom-elements.json +756 -0
- package/dist/rc-button-Ct5C14lN.js +413 -0
- package/dist/rc-button-Ct5C14lN.js.map +1 -0
- package/dist/rc-button-define.js +6 -0
- package/dist/rc-button-define.js.map +1 -0
- package/dist/rc-button.js +5 -0
- package/dist/rc-button.js.map +1 -0
- package/dist/types/packages/rc-button/src/define.d.ts +1 -0
- package/dist/types/packages/rc-button/src/index.d.ts +1 -0
- package/dist/types/packages/rc-button/src/rc-button.d.ts +143 -0
- package/dist/types/packages/rc-button/src/rc-button.styles.d.ts +2 -0
- package/dist/types/packages/rc-button/src/rc-button.test.d.ts +0 -0
- package/package.json +62 -0
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# @rcarls/rc-button
|
|
2
|
+
|
|
3
|
+
Progressive-enhancement button wrapper with structural state affordances.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<rc-button toggle default-selected>
|
|
7
|
+
<button type="button">
|
|
8
|
+
<span data-rc-button-icon aria-hidden="true">♡</span>
|
|
9
|
+
<span data-rc-button-selected-icon aria-hidden="true">♥</span>
|
|
10
|
+
<span data-rc-button-label>Save</span>
|
|
11
|
+
</button>
|
|
12
|
+
</rc-button>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The native `<button>` remains in light DOM as the semantic and form-associated
|
|
16
|
+
control. `rc-button` adds reflected state attributes, icon/label classification,
|
|
17
|
+
and overlay parts for state-layer and progress effects. `pending` and `progress`
|
|
18
|
+
disable the native control while busy; add `progress-value="50"` for determinate
|
|
19
|
+
progress. Add `toggle` for managed `aria-pressed` semantics and use
|
|
20
|
+
`default-selected` or controlled `selected` state. User activation dispatches
|
|
21
|
+
`rc-button-toggle` with the requested next `selected` state.
|