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 ea7766a
Browse filesBrowse the repository at this point in the historyBrowse files
feat(spec)!: the action blocks spell the destructive variant danger
The four action block rows (action:button, action:icon, action:group,
action:menu and the containers' members) took the Button primitive's
`destructive` and refused `danger`, while ActionSchema.variant, the
declaration the action runner dispatches, says `danger`. The rows now take
`danger` and refuse `destructive` with the rename in the enum's own error
map. ADR-0087 D2 conversion page-action-block-variant-destructive-to-danger
(retired from the load path, retiredAfter 18.2.0) rewrites stored rows and
sources; D3 entry ui-page-action-block-variant-destructive-refused.
Claude-Session: https://claude.ai/code/session_01WGufzeYWDZN6LkXji5ziLF
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: content/docs/references/ui/component.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ const result = ActionButtonPropsSchema.parse(data);
32
32
|**label**|`string`| optional | Button text. A literal string, placed as-is — localize through the translation bundle entry for this component id, not an inline locale map |
33
33
|**icon**|`string`| optional | Lucide icon name drawn left of the label, resolved through the shared action-icon resolver (an unknown name draws no icon) |
34
34
|**actionType**|`string`| optional | Executor the action runner dispatches to — built in: `script`, `url`, `modal`, `flow`, `api`, `form`; a handler registered under another name is dispatched too. `navigation`, the runner's alias of `url`, is refused: write `url`. Write it here, not as `type`: on a page component `type` is the component itself |
35
-
|**variant**|`Enum<'default' \| 'destructive' \| 'outline' \| 'secondary' \| 'ghost' \| 'link' \| 'primary'>`| optional | Button variant — the Button primitive's vocabulary, plus `primary`, which renders as `default` (renderer default: `default`) |
35
+
|**variant**|`Enum<'default' \| 'danger' \| 'outline' \| 'secondary' \| 'ghost' \| 'link' \| 'primary'>`| optional | Button variant — the Button primitive's vocabulary with its destructive arm spelled `danger`, the action runner's word, plus `primary`, which renders as `default` (renderer default: `default`). `danger` draws the destructive button and asks a `confirmText` question through the destructive confirm button|
36
36
|**size**|`Enum<'default' \| 'sm' \| 'lg' \| 'icon' \| 'md'>`| optional | Button size — the Button primitive's vocabulary, plus `md`, which renders as `default` (renderer default: `default`) |
37
37
|**visible**|`boolean \| string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Visibility predicate — a boolean, a CEL string, or a `{ dialect, source }` envelope, evaluated against the row the host binds; the button is not rendered when it is FALSE, and a predicate that fails to evaluate hides it. Omit for always-visible |
38
38
|**disabled**|`boolean \| string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Disabled predicate — a boolean, a CEL string, or a `{ dialect, source }` envelope; the button is shown but cannot be pressed while it is TRUE. Omit for never-disabled |
@@ -78,7 +78,7 @@ const result = ActionButtonPropsSchema.parse(data);
78
78
|**location**|`Enum<'list_toolbar' \| 'list_item' \| 'record_header' \| 'record_more' \| 'record_related' \| 'record_section'>`| optional | Render only the members whose `locations` include this location. Omit to render every member |
79
79
|**label**|`string`| optional | Dropdown trigger text (renderer default: `Actions`). Inline mode renders no group label. A literal string — localize through the translation bundle entry for this component id |
80
80
|**icon**|`string`| optional | Lucide icon name on the dropdown trigger. Inline mode renders no group icon |
81
-
|**variant**|`Enum<'default' \| 'destructive' \| 'outline' \| 'secondary' \| 'ghost' \| 'link'>`| optional | Button variant for the dropdown trigger and for every inline member that sets none — the Button primitive's vocabulary (renderer default: `outline`) |
81
+
|**variant**|`Enum<'default' \| 'danger' \| 'outline' \| 'secondary' \| 'ghost' \| 'link'>`| optional | Button variant for the dropdown trigger and for every inline member that sets none — the Button primitive's vocabulary with its destructive arm spelled `danger`, the action runner's word (renderer default: `outline`) |
82
82
|**size**|`Enum<'default' \| 'sm' \| 'lg' \| 'icon'>`| optional | Button size for the dropdown trigger and for every inline member that sets none — the Button primitive's vocabulary |
83
83
|**visible**|`boolean \| string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Visibility predicate for the whole group — a boolean, a CEL string, or a `{ dialect, source }` envelope, evaluated against the row the host binds. Omit for always-visible |
84
84
@@ -90,7 +90,7 @@ const result = ActionButtonPropsSchema.parse(data);
90
90
|**label**|`string`| optional | The item's text. A literal string, placed as-is — localize through the translation bundle entry for this component id |
91
91
|**icon**|`string`| optional | Lucide icon name drawn before the label, resolved through the shared action-icon resolver (an unknown name draws no icon) |
92
92
|**type**|`string`| optional | Executor the action runner dispatches to — built in: `script`, `url`, `modal`, `flow`, `api`, `form`; a handler registered under another name is dispatched too. `navigation`, the runner's alias of `url`, is refused: write `url`. A member is an action entry, so its executor is `type` (on an `action:button` node it is `actionType`) |
93
-
|**variant**|`Enum<'default' \| 'destructive' \| 'outline' \| 'secondary' \| 'ghost' \| 'link' \| 'primary'>`| optional | Item variant — the Button primitive's vocabulary, plus `primary` (drawn as `default`). An inline `action:group` button draws it (falling back to the group's `variant`); a dropdown or `action:menu` item draws `destructive` red and every other variant plainly |
93
+
|**variant**|`Enum<'default' \| 'danger' \| 'outline' \| 'secondary' \| 'ghost' \| 'link' \| 'primary'>`| optional | Item variant — the Button primitive's vocabulary with its destructive arm spelled `danger`, the action runner's word, plus `primary` (drawn as `default`). An inline `action:group` button draws it (falling back to the group's `variant`); a dropdown or `action:menu` item draws `danger` red and every other variant plainly. `danger` asks a `confirmText` question through the destructive confirm button|
94
94
|**visible**|`boolean \| string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Visibility predicate — a boolean, a CEL string, or a `{ dialect, source }` envelope, evaluated against the row the host binds; the item is not drawn when it is FALSE, and a predicate that fails to evaluate hides it. Omit for always-visible |
95
95
|**disabled**|`boolean \| string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Disabled predicate — a boolean, a CEL string, or a `{ dialect, source }` envelope; the item is drawn but cannot be pressed while it is TRUE, and a predicate that fails to evaluate disables it. Omit for never-disabled |
96
96
|**tags**|`Enum<'separator-before'>[]`| optional | Item tags — `separator-before` draws a divider above the item in a dropdown or menu (not above the first item); no other tag is drawn |
@@ -127,7 +127,7 @@ const result = ActionButtonPropsSchema.parse(data);
127
127
|**label**|`string`| optional | Accessible label and tooltip text (and its first letter stands in when no icon resolves). A literal string — localize through the translation bundle entry for this component id |
128
128
|**icon**|`string`| optional | Lucide icon name, resolved through the shared action-icon resolver (renderer registration default `play`) |
129
129
|**actionType**|`string`| optional | Executor the action runner dispatches to — built in: `script`, `url`, `modal`, `flow`, `api`, `form`; a handler registered under another name is dispatched too. `navigation`, the runner's alias of `url`, is refused: write `url`. Write it here, not as `type`|
130
-
|**variant**|`Enum<'default' \| 'destructive' \| 'outline' \| 'secondary' \| 'ghost' \| 'link' \| 'primary'>`| optional | Button variant — the Button primitive's vocabulary, plus `primary`, which renders as `default` (renderer default: `ghost`) |
130
+
|**variant**|`Enum<'default' \| 'danger' \| 'outline' \| 'secondary' \| 'ghost' \| 'link' \| 'primary'>`| optional | Button variant — the Button primitive's vocabulary with its destructive arm spelled `danger`, the action runner's word, plus `primary`, which renders as `default` (renderer default: `ghost`). `danger` draws the destructive button and asks a `confirmText` question through the destructive confirm button|
131
131
|**visible**|`boolean \| string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Visibility predicate — a boolean, a CEL string, or a `{ dialect, source }` envelope, evaluated against the row the host binds; the icon is not rendered when it is FALSE. Omit for always-visible |
132
132
|**disabled**|`boolean \| string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Disabled predicate — a boolean, a CEL string, or a `{ dialect, source }` envelope; the icon is shown but cannot be pressed while it is TRUE. Omit for never-disabled |
133
133
|**description**|`string`| optional | Action description — the tooltip text when there is no `label`, and forwarded to the runner for the parameter dialog |
@@ -168,7 +168,7 @@ const result = ActionButtonPropsSchema.parse(data);
168
168
|**actions**|`{ name?: string; label?: string; icon?: string; type?: string; … }[]`| optional | The menu's actions, in order — each an action object the menu draws and runs itself (`name`, `label`, `icon`, `type`, `target`, `visible`, `disabled`, `tags`, …); a member's executor is its `type`|
169
169
|**label**|`string`| optional | Trigger text and accessible label; omit for an icon-only trigger labelled "More actions". A literal string — localize through the translation bundle entry for this component id |
170
170
|**icon**|`string`| optional | Lucide icon name on the trigger (renderer default: the horizontal ellipsis) |
|**visible**|`boolean \| string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Visibility predicate for the whole menu — a boolean, a CEL string, or a `{ dialect, source }` envelope, evaluated against the row the host binds; a predicate that fails to evaluate hides it. Omit for always-visible |
174
174
@@ -180,7 +180,7 @@ const result = ActionButtonPropsSchema.parse(data);
180
180
|**label**|`string`| optional | The item's text. A literal string, placed as-is — localize through the translation bundle entry for this component id |
181
181
|**icon**|`string`| optional | Lucide icon name drawn before the label, resolved through the shared action-icon resolver (an unknown name draws no icon) |
182
182
|**type**|`string`| optional | Executor the action runner dispatches to — built in: `script`, `url`, `modal`, `flow`, `api`, `form`; a handler registered under another name is dispatched too. `navigation`, the runner's alias of `url`, is refused: write `url`. A member is an action entry, so its executor is `type` (on an `action:button` node it is `actionType`) |
183
-
|**variant**|`Enum<'default' \| 'destructive' \| 'outline' \| 'secondary' \| 'ghost' \| 'link' \| 'primary'>`| optional | Item variant — the Button primitive's vocabulary, plus `primary` (drawn as `default`). An inline `action:group` button draws it (falling back to the group's `variant`); a dropdown or `action:menu` item draws `destructive` red and every other variant plainly |
183
+
|**variant**|`Enum<'default' \| 'danger' \| 'outline' \| 'secondary' \| 'ghost' \| 'link' \| 'primary'>`| optional | Item variant — the Button primitive's vocabulary with its destructive arm spelled `danger`, the action runner's word, plus `primary` (drawn as `default`). An inline `action:group` button draws it (falling back to the group's `variant`); a dropdown or `action:menu` item draws `danger` red and every other variant plainly. `danger` asks a `confirmText` question through the destructive confirm button|
184
184
|**visible**|`boolean \| string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Visibility predicate — a boolean, a CEL string, or a `{ dialect, source }` envelope, evaluated against the row the host binds; the item is not drawn when it is FALSE, and a predicate that fails to evaluate hides it. Omit for always-visible |
185
185
|**disabled**|`boolean \| string \| { dialect: Enum<'cel' \| 'cron' \| 'template'>; source: string; ast?: any; meta?: object }`| optional | Disabled predicate — a boolean, a CEL string, or a `{ dialect, source }` envelope; the item is drawn but cannot be pressed while it is TRUE, and a predicate that fails to evaluate disables it. Omit for never-disabled |
186
186
|**tags**|`Enum<'separator-before'>[]`| optional | Item tags — `separator-before` draws a divider above the item in a dropdown or menu (not above the first item); no other tag is drawn |
0 commit comments