@ryanhelsing/ry-ui 1.0.14 → 1.0.15

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.
@@ -2,14 +2,14 @@
2
2
 
3
3
  ## `<ry-dropdown>`
4
4
 
5
- Use `slot="trigger"` on the trigger element. Menu items go inside `<ry-menu>`.
5
+ The first child element is the trigger. Menu items go inside `<ry-menu>`.
6
6
 
7
7
  Events: `ry:select` — `e.detail.value`
8
8
  API: `.open()`, `.close()`
9
9
 
10
10
  ```html
11
11
  <ry-dropdown>
12
- <ry-button slot="trigger">Options</ry-button>
12
+ <ry-button>Options</ry-button>
13
13
  <ry-menu>
14
14
  <ry-menu-item>Edit</ry-menu-item>
15
15
  <ry-menu-item>Duplicate</ry-menu-item>
@@ -17,10 +17,10 @@ API: `.open()`, `.close()`, `.state`
17
17
 
18
18
  <ry-modal id="demo" title="Confirm">
19
19
  <p>Are you sure?</p>
20
- <ry-actions slot="footer">
20
+ <footer>
21
21
  <ry-button variant="ghost" close>Cancel</ry-button>
22
22
  <ry-button>OK</ry-button>
23
- </ry-actions>
23
+ </footer>
24
24
  </ry-modal>
25
25
  ```
26
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryanhelsing/ry-ui",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Framework-agnostic, Light DOM web components. CSS is the source of truth.",
5
5
  "type": "module",
6
6
  "main": "./dist/ry-ui.js",
@@ -1,36 +0,0 @@
1
- # Button Group
2
-
3
- ## `<ry-button-group>`
4
-
5
- Segmented control with radio-group behavior. Only one child button can be selected at a time.
6
-
7
- | Attribute | Values | Description |
8
- |-----------|--------|-------------|
9
- | `name` | string | Optional group name |
10
- | `value` | string | Currently selected button value |
11
-
12
- Events: `ry:change` — `e.detail.value`
13
-
14
- Child buttons must have a `value` attribute to participate. Clicking a button sets `pressed` + `aria-pressed="true"` on it and clears the others.
15
-
16
- ```html
17
- <ry-button-group name="billing" value="monthly">
18
- <ry-button value="monthly">Monthly</ry-button>
19
- <ry-button value="annually">Annually</ry-button>
20
- </ry-button-group>
21
-
22
- <ry-button-group name="mode" value="terminal">
23
- <ry-button value="direct">Direct</ry-button>
24
- <ry-button value="terminal">Terminal</ry-button>
25
- <ry-button value="release">Release</ry-button>
26
- </ry-button-group>
27
- ```
28
-
29
- JS:
30
- ```js
31
- const group = document.querySelector('ry-button-group');
32
- group.addEventListener('ry:change', (e) => {
33
- console.log(e.detail.value); // "monthly" | "annually"
34
- });
35
- group.value = 'annually'; // programmatic selection
36
- ```