@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 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.