You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bde51be
Browse filesBrowse the repository at this point in the historyBrowse files
| Public contract |`SelectorOption` is exported beside Selector and takes `label` (required), `icon`, `description`, `layout` (`stacked` by default, or `inline`), `endContent`, `xstyle`, `className`, and `style`. |
30
-
| Behavior | Renders one Item row of an optional small secondary icon, the label, an optional description, and optional end content, with the row's own padding and corner radius removed so its host row lays it out. |
31
-
| End-user impact | People see custom Selector options and the selected value in the same row shape as built-in options, and a long label ellipsizes instead of overflowing a narrow popover. |
32
-
| Builder impact | Builders return it from `renderOption` or `renderValue` to keep the `selector-option` target and the shared row layout while choosing the content. |
33
-
| Compatibility/readiness | Records shipped behavior; no API, default, or DOM change. |
34
-
| Review checks | Reject a dropped icon, description, or end content, a layout that ignores the caller outside an InputGroup or stays stacked inside one, or a lost `selector-option` target. |
35
-
| Governing rules |`architecture:component-theming-surface`; `architecture:public-component-api`; `component:Item` for the row it composes. |
| Public contract |`SelectorOption` is exported beside Selector and takes `label` (required), `icon`, `description`, `layout` (`stacked` by default, or `inline`), `endContent`, `xstyle`, `className`, and `style`. |
30
+
| Behavior | Renders one Item row of an optional icon, the label, an optional description, and optional end content, with the row's own padding and corner radius removed so its host row lays it out.|
31
+
| End-user impact | People see custom Selector options and the selected value in the same row shape as built-in options, and a long label ellipsizes instead of overflowing a narrow popover. |
32
+
| Builder impact | Builders return it from `renderOption` or `renderValue` to keep the `selector-option` target and the shared row layout while choosing the content. |
33
+
| Compatibility/readiness | Records shipped behavior; no API, default, or DOM change. |
34
+
| Review checks | Reject a dropped icon, description, or end content, a layout that ignores the caller outside an InputGroup or stays stacked inside one, or a lost `selector-option` target. |
35
+
| Governing rules |`architecture:component-theming-surface`; `architecture:public-component-api`; `component:Item` for the row it composes. |
36
36
37
37
This table is a review projection; the body below is authoritative.
38
38
@@ -72,19 +72,19 @@ Consumer migration instructions belong in consumer docs and release notes.
72
72
73
73
## Public concepts
74
74
75
-
| Concept | Closed values or states | Meaning | Availability by variant/orientation |
| layout |`stacked`, `inline`|`stacked` puts the description on its own line; `inline` keeps label and description on one line. | Caller's choice, except inside an InputGroup (`inline`). |
78
-
| icon | absent, present |A small secondary icon before the label. | Every layout. |
79
-
| end content | absent, present | Caller content after the label and description. | Every layout. |
75
+
| Concept | Closed values or states | Meaning | Availability by variant/orientation |
| layout |`stacked`, `inline`|`stacked` puts the description on its own line; `inline` keeps label and description on one line. | Caller's choice, except inside an InputGroup (`inline`). |
78
+
| icon | absent, present |An `IconType`icon renders as a small secondary Icon before the label; a ReactNode renders as given.| Every layout. |
79
+
| end content | absent, present | Caller content after the label and description. | Every layout. |
| FR1 | SelectorOption renders one `component:Item` row: `icon` as a small secondary icon in the start slot when present, `label`, `description` when present, and `endContent` when present. Selector's default option renderer draws each option through SelectorOption too.| Current source and tests |
86
-
| FR2 | The row uses the caller's `layout` (`stacked` by default). When its host pins the row height (a Selector trigger inside an InputGroup), the row is `inline` whatever the caller passed. | Current source and tests |
87
-
| FR3 | The row carries the `selector-option` target. Its own block and inline padding and corner radius are zero and its minimum width is zero, so a long label ellipsizes inside a narrow host. Caller `xstyle` merges after these base styles; `className` and `style` reach the row. |`architecture:component-theming-surface`; current source |
| FR1 | SelectorOption renders one `component:Item` row: `icon`in the start slot when present (an `IconType` icon as a small secondary Icon, a ReactNode as given), `label`, `description` when present, and `endContent` when present. Selector's default option renderer draws each option through SelectorOption too. | Current source and tests |
86
+
| FR2 | The row uses the caller's `layout` (`stacked` by default). When its host pins the row height (a Selector trigger inside an InputGroup), the row is `inline` whatever the caller passed. | Current source and tests |
87
+
| FR3 | The row carries the `selector-option` target. Its own block and inline padding and corner radius are zero and its minimum width is zero, so a long label ellipsizes inside a narrow host. Caller `xstyle` merges after these base styles; `className` and `style` reach the row. |`architecture:component-theming-surface`; current source |
88
88
89
89
### Allowed variation
90
90
@@ -115,17 +115,18 @@ Consumer migration instructions belong in consumer docs and release notes.
115
115
## Accessibility contract
116
116
117
117
-**AR1 — Content only.** SelectorOption adds no role, name, or state; the
118
-
Selector option row it sits in owns them. The icon is decorative.
118
+
Selector option row it sits in owns them. An `IconType` icon is decorative; a
119
+
ReactNode icon keeps the semantics its caller gives it.
119
120
120
121
## Design relationships
121
122
122
123
| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
| FR1 |`Selector.test.tsx` "renders custom option endContent" and "renders the selected option through renderValue" | Option with end content; value with icon and description | A dropped end content, label, description, or icon fails. |`audit:SelectorOption/anatomy`|
147
+
| FR1 |`Selector.test.tsx` "renders custom option endContent" and "renders the selected option through renderValue" | Option with end content; value with icon and description | A dropped end content, label, description, or icon fails. Evidence gap: no test asserts the small secondary presentation of an `IconType` icon.|`audit:SelectorOption/anatomy`|
147
148
| FR2 |`Selector.test.tsx` "follows the caller's SelectorOption layout, but folds inline in a group" | Standalone trigger; trigger in an InputGroup | A stacked row in an InputGroup, or an inline row standalone by default, fails. Evidence gap: no test passes `layout="inline"` outside an InputGroup. |`audit:SelectorOption/layout`|
148
149
| FR3 |`Selector.test.tsx` "lets a narrow list shrink an option so its label can ellipsize" | Default option in a narrow list | A missing `selector-option` row or a nonzero minimum width fails. Evidence gap: no test asserts the padding and radius reset, or `xstyle`, `className`, and `style` on the row. |`audit:SelectorOption/theming`|
149
150
| ORD1, ORD2, PR1, AR1 | ORD1 is covered by the FR2 row. Evidence gap: no test asserts ORD2, PR1, or the decorative icon | — | — |`audit:SelectorOption/behavior`|
0 commit comments