@rcarls/rc-list 0.6.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/CHANGELOG.md ADDED
@@ -0,0 +1,55 @@
1
+ # @rcarls/rc-list
2
+
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b639e04: Add coordinated list and list-item layout tokens so container queries can
8
+ stack unchanged content regions while preserving shared subgrid alignment.
9
+
10
+ Breaking for the pre-1.0 carousel API: remove the redundant
11
+ `variant="hero|multi-browse"` attribute and property. The variant only
12
+ changed slide geometry, which is already controlled by
13
+ `--rc-carousel-slide-size`. Remove `variant="hero"` without replacement;
14
+ replace `variant="multi-browse"` with
15
+ `--rc-carousel-slide-size: min(75%, 300px)`.
16
+
17
+ - a108336: Add shared-column `rc-list` and `rc-list-item` elements with standard and
18
+ segmented appearances, default content truncation, and native-backed single or
19
+ multiple selection coordination. Restore author-owned item state when native
20
+ selection coordination ends.
21
+ - 6683eb9: Add shared, lifecycle-safe click delegation and let interactive list items
22
+ forward plain surface clicks to same-root native action targets while
23
+ preserving nested and modified clicks.
24
+
25
+ ### Patch Changes
26
+
27
+ - a108336: Warn in development when `rc-card`/`rc-list-item` has `interactive` set but
28
+ no way to resolve a click target: no `action-target`, and for
29
+ `rc-list-item`, no native child checkbox/radio either. Surface clicks
30
+ silently go nowhere in that state; the warning now says so at the point
31
+ the row or card is set up wrong, instead of leaving it to be discovered
32
+ by a user tapping a dead row or card.
33
+ - 7382c71: Add a priority-aware action toolbar that moves original controls into an
34
+ overflow menu. Which actions are promoted is a purely declarative computation
35
+ from `max-shown` and each action's `data-priority`/authored `slot`, with no
36
+ runtime measurement of the toolbar's or its children's rendered size: a
37
+ consumer whose promoted count needs to react to available space owns that
38
+ decision and writes the resulting `max-shown` value down. Include controlled
39
+ and uncontrolled open state, keyboard navigation, light dismissal, and a
40
+ non-Popover fallback.
41
+
42
+ Fix `--rc-adaptive-menu-touch-target-overlap-inline-start`/`-end`: the host's
43
+ own `max-inline-size: 100%` self-referenced a shrink-to-fit ancestor's
44
+ already-margin-reduced auto size (an app bar's own trailing group, for
45
+ example), quietly clamping the host back down and canceling the overlap out
46
+ from under it. The cap now grows by the overlap amount so it only ever bounds
47
+ the host's real content.
48
+
49
+ - 57370e4: Align component metadata, aggregate framework typings, development-time native-child
50
+ validation, controlled menu state, package declarations, and public documentation before the
51
+ next release.
52
+ - Updated dependencies [6683eb9]
53
+ - Updated dependencies [ee7ba6c]
54
+ - Updated dependencies [30eb232]
55
+ - @rcarls/rc-common@0.6.0
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # @rcarls/rc-list
2
+
3
+ Shared-column list rows with optional native-backed single or multiple
4
+ selection.
5
+
6
+ ```html
7
+ <rc-list selection="single" aria-label="Delivery speed">
8
+ <rc-list-item>
9
+ <input slot="leading" type="radio" name="speed" value="standard" checked />
10
+ <span>Standard</span>
11
+ <span slot="trailing">Free</span>
12
+ </rc-list-item>
13
+ <rc-list-item>
14
+ <input slot="leading" type="radio" name="speed" value="express" />
15
+ <span>Express</span>
16
+ <span slot="trailing">$12</span>
17
+ </rc-list-item>
18
+ </rc-list>
19
+ ```
20
+
21
+ `rc-list` owns the shared leading, content, and trailing columns. Each direct
22
+ `rc-list-item` participates through CSS subgrid, so optional content aligns
23
+ across rows and unused columns collapse for the whole list.
24
+
25
+ The default `standard` variant is suited to continuous lists. Use
26
+ `variant="segmented"` for discrete settings-style rows. Theme packages own
27
+ their appearance.
28
+
29
+ `selection` accepts `none` (the default), `single`, or `multiple`. Selecting
30
+ lists require one direct native radio or checkbox in each row. The native input
31
+ remains the source of truth for checked and disabled state; the list mirrors
32
+ that state to its item and makes a non-interactive row surface activate the
33
+ input. Links, buttons, inputs, and other interactive descendants retain their
34
+ own behavior. Radios in a single-selection list should share a `name`, just as
35
+ they would in an unenhanced native radio group.
36
+
37
+ ## Action targets
38
+
39
+ For a row whose primary action is not its selection input, set `interactive`
40
+ and point `action-target` at a same-root native anchor or button. Plain primary
41
+ clicks on the row surface activate that target; clicks on nested interactive
42
+ content and modifier-qualified or non-primary clicks keep their native
43
+ behavior.
44
+
45
+ ```html
46
+ <rc-list aria-label="Theme settings">
47
+ <rc-list-item interactive action-target="open-theme">
48
+ Theme
49
+ <button id="open-theme" type="button" slot="trailing">Choose</button>
50
+ </rc-list-item>
51
+ </rc-list>
52
+ ```
53
+
54
+ The target remains its own keyboard tab stop. `action-target` extends pointer
55
+ reach only and does not turn the row itself into a second button or link.
56
+
57
+ Content truncates with an ellipsis by default. Set
58
+ `--rc-list-item-content-white-space: normal` where multi-line content is
59
+ intended.
60
+
61
+ The shared column sizes and each item's region placement are CSS custom
62
+ properties. Consumers can coordinate them from a container query without
63
+ changing the row's source order, interaction, or semantics. For example,
64
+ collapse the shared trailing track and place trailing metadata below content:
65
+
66
+ ```css
67
+ .list-region {
68
+ container-type: inline-size;
69
+ }
70
+
71
+ @container (max-width: 24rem) {
72
+ .list-region rc-list {
73
+ --rc-list-trailing-size: 0;
74
+ --rc-list-trailing-gap: 0;
75
+ --rc-list-item-grid-template-rows: auto auto;
76
+ --rc-list-item-leading-grid-row: 1 / -1;
77
+ --rc-list-item-content-grid-row: 1;
78
+ --rc-list-item-trailing-grid-column: content-start / content-end;
79
+ --rc-list-item-trailing-grid-row: 2;
80
+ --rc-list-item-trailing-justify-self: start;
81
+ }
82
+ }
83
+ ```
84
+
85
+ Import `@rcarls/rc-list` to use the classes without registering them, or import
86
+ `@rcarls/rc-list/define` to register `<rc-list>` and `<rc-list-item>`.