rift-ds 1.31.0 → 1.32.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.
Files changed (91) hide show
  1. package/README.md +1 -1
  2. package/behaviors/chat-card.css +4 -1
  3. package/behaviors/deferComponent.d.ts +43 -0
  4. package/behaviors/deferComponent.js +35 -0
  5. package/bin/templates/blocks/components/blocks/AppShell.module.css +10 -1
  6. package/chat/ChatLauncher.d.ts +9 -1
  7. package/chat/ChatLauncher.js +51 -33
  8. package/chat/ChatWidget.css +13 -4
  9. package/chat/ChatWidget.js +15 -15
  10. package/chat/deferredChatWidget.d.ts +10 -0
  11. package/chat/deferredChatWidget.js +10 -0
  12. package/chat/index.d.ts +1 -0
  13. package/chat/index.js +2 -0
  14. package/chat/registry.json.d.ts +2 -1
  15. package/chat/registry.json.js +1 -1
  16. package/components/Accordion/Accordion.css +8 -0
  17. package/components/AgentPlan/AgentPlan.css +8 -0
  18. package/components/AgentRail/AgentRail.css +3 -3
  19. package/components/AiButton/AiButton.css +19 -0
  20. package/components/AiButton/AiButton.d.ts +10 -1
  21. package/components/AiButton/AiButton.js +6 -1
  22. package/components/ArtifactPanel/ArtifactPanel.js +5 -5
  23. package/components/Attachment/AttachmentViewer.js +7 -7
  24. package/components/BentoTile/BentoTile.css +1 -1
  25. package/components/BentoTile/BentoTile.js +5 -5
  26. package/components/Button/Button.css +28 -1
  27. package/components/Button/Button.d.ts +7 -2
  28. package/components/Button/Button.js +7 -3
  29. package/components/ChatHeader/ChatHeader.d.ts +1 -1
  30. package/components/ChatThread/ChatThread.css +1 -1
  31. package/components/Chip/Chip.css +26 -0
  32. package/components/CircularButton/CircularButton.d.ts +16 -96
  33. package/components/CircularButton/CircularButton.js +11 -94
  34. package/components/Combobox/Combobox.css +12 -0
  35. package/components/CommandPalette/CommandPalette.css +1 -1
  36. package/components/CommandPalette/CommandPalette.js +3 -3
  37. package/components/CommandPaletteTrigger/CommandPaletteTrigger.css +9 -0
  38. package/components/CommandPaletteTrigger/CommandPaletteTrigger.d.ts +10 -2
  39. package/components/CommandPaletteTrigger/CommandPaletteTrigger.js +7 -2
  40. package/components/Composer/Composer.css +3 -3
  41. package/components/Composer/Composer.js +9 -9
  42. package/components/ContextMenu/ContextMenu.css +24 -0
  43. package/components/DataTable/DataTable.css +2 -2
  44. package/components/DataTable/DataTable.js +15 -15
  45. package/components/DateInput/DateInput.css +20 -0
  46. package/components/DescriptionList/DescriptionListCopy.d.ts +1 -1
  47. package/components/DescriptionList/DescriptionListCopy.js +3 -3
  48. package/components/Dialog/Dialog.css +1 -1
  49. package/components/Dialog/Dialog.js +3 -3
  50. package/components/DocumentChip/DocumentChip.css +12 -0
  51. package/components/DocumentViewer/DocumentViewer.js +10 -10
  52. package/components/Drawer/Drawer.css +1 -1
  53. package/components/Drawer/Drawer.js +3 -3
  54. package/components/Dropdown/Dropdown.css +30 -0
  55. package/components/DropdownMenu/DropdownMenu.css +24 -0
  56. package/components/FileInput/FileInput.css +9 -0
  57. package/components/FilterBar/FilterBar.css +12 -0
  58. package/components/{CircularButton/CircularButton.css → IconButton/IconButton.css} +91 -81
  59. package/components/IconButton/IconButton.d.ts +108 -0
  60. package/components/IconButton/IconButton.js +101 -0
  61. package/components/Input/Input.css +53 -0
  62. package/components/Input/Input.js +3 -3
  63. package/components/MaskedInput/MaskedInput.js +3 -3
  64. package/components/ModelPicker/ModelPicker.css +12 -1
  65. package/components/NavList/NavList.css +1 -1
  66. package/components/Pagination/Pagination.css +1 -1
  67. package/components/QuestionCard/QuestionCard.js +3 -3
  68. package/components/RadioButton/RadioButton.css +14 -12
  69. package/components/RichDropdown/RichDropdown.css +7 -0
  70. package/components/SegmentedControl/SegmentedControl.css +16 -5
  71. package/components/SegmentedControl/SegmentedControl.js +7 -4
  72. package/components/SiteHeader/SiteHeader.css +12 -5
  73. package/components/SiteHeader/SiteHeader.js +3 -3
  74. package/components/SourceTrail/SourceTrail.css +8 -0
  75. package/components/SplitButton/SplitButton.css +14 -14
  76. package/components/SplitButton/SplitButton.js +3 -3
  77. package/components/TableToolbar/TableToolbar.css +2 -2
  78. package/components/TableToolbar/TableToolbar.js +36 -37
  79. package/components/ThreadPanel/ThreadPanel.css +8 -0
  80. package/components/ThreadTabs/ThreadTabs.css +7 -0
  81. package/components/TimePicker/TimePicker.css +12 -0
  82. package/components/ToolCall/ToolCall.css +8 -0
  83. package/components/Tooltip/Tooltip.js +3 -2
  84. package/components/WorldMap/WorldMap.js +5 -5
  85. package/components/registry.d.ts +3 -1
  86. package/components/registry.json +19 -10
  87. package/components/registry.json.d.ts +19 -10
  88. package/components/registry.json.js +1 -1
  89. package/index.d.ts +1 -0
  90. package/index.js +2 -0
  91. package/package.json +6 -2
@@ -1,21 +1,21 @@
1
1
  /* ============================================
2
- CIRCULAR BUTTON (ICON BUTTON)
3
- Round button with a single icon
2
+ ICON BUTTON
3
+ A button holding a single icon, shaped by the theme's button radius
4
4
  ============================================ */
5
5
 
6
- .ds-circular-button {
6
+ .ds-icon-button {
7
7
  /* Layout */
8
8
  display: inline-flex;
9
9
  align-items: center;
10
10
  justify-content: center;
11
11
 
12
- /* Size — default: the row height (--control-height-*), as a circle */
12
+ /* Size — default: the row height (--control-height-*), as an even box */
13
13
  box-sizing: border-box;
14
14
  width: var(--control-height-default);
15
15
  height: var(--control-height-default);
16
16
 
17
17
  /* Shape */
18
- border-radius: var(--radius-pill); /* 999px — perfect circle */
18
+ border-radius: var(--radius-pill); /* the button radius: a circle in a round theme, a square in a square one */
19
19
 
20
20
  /* Transitions */
21
21
  transition: background-color var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), opacity var(--motion-duration-base) var(--motion-ease-standard);
@@ -32,7 +32,7 @@
32
32
  SIZE — DEFAULT
33
33
  ============================================ */
34
34
 
35
- .ds-circular-button--default {
35
+ .ds-icon-button--default {
36
36
  width: var(--control-height-default);
37
37
  height: var(--control-height-default);
38
38
  }
@@ -41,12 +41,12 @@
41
41
  SIZE — COMPACT
42
42
  ============================================ */
43
43
 
44
- .ds-circular-button--compact {
44
+ .ds-icon-button--compact {
45
45
  width: var(--control-height-compact);
46
46
  height: var(--control-height-compact);
47
47
  }
48
48
 
49
- .ds-circular-button--compact .ds-circular-button__icon {
49
+ .ds-icon-button--compact .ds-icon-button__icon {
50
50
  --icon-size: var(--icon-size-500);
51
51
  }
52
52
 
@@ -54,60 +54,70 @@
54
54
  ICON
55
55
  ============================================ */
56
56
 
57
- .ds-circular-button__icon {
57
+ .ds-icon-button__icon {
58
58
  flex-shrink: 0;
59
59
  --icon-size: var(--icon-size-600);
60
60
  line-height: 1;
61
61
  }
62
62
 
63
+ /* A node icon (an avatar, a spinner, an SVG) is laid out as a flex item:
64
+ inline in a block slot it would sit on the text baseline, and the room
65
+ left under it for descenders made the slot taller than the node and
66
+ lifted the node off the button's centre. */
67
+ .ds-icon-button__icon:not(.material-symbols-rounded) {
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ }
72
+
63
73
  /* ============================================
64
74
  PRIMARY VARIANT (SOLID)
65
75
  ============================================ */
66
76
 
67
- .ds-circular-button--primary {
77
+ .ds-icon-button--primary {
68
78
  background-color: var(--color-action-primary-bg);
69
79
  border: none;
70
80
  }
71
81
 
72
- .ds-circular-button--primary .ds-circular-button__icon {
82
+ .ds-icon-button--primary .ds-icon-button__icon {
73
83
  color: var(--color-action-primary-text);
74
84
  }
75
85
 
76
- .ds-circular-button--primary.ds-circular-button--hover {
86
+ .ds-icon-button--primary.ds-icon-button--hover {
77
87
  background-color: var(--color-action-primary-bg-hover);
78
88
  }
79
89
 
80
- .ds-circular-button--primary.ds-circular-button--hover .ds-circular-button__icon {
90
+ .ds-icon-button--primary.ds-icon-button--hover .ds-icon-button__icon {
81
91
  color: var(--color-action-primary-text-active);
82
92
  }
83
93
 
84
- .ds-circular-button--primary.ds-circular-button--active {
94
+ .ds-icon-button--primary.ds-icon-button--active {
85
95
  background-color: var(--color-action-primary-bg-active);
86
96
  }
87
97
 
88
- .ds-circular-button--primary.ds-circular-button--active .ds-circular-button__icon {
98
+ .ds-icon-button--primary.ds-icon-button--active .ds-icon-button__icon {
89
99
  color: var(--color-action-primary-text-active);
90
100
  }
91
101
 
92
- .ds-circular-button--primary.ds-circular-button--disabled {
102
+ .ds-icon-button--primary.ds-icon-button--disabled {
93
103
  opacity: 0.4;
94
104
  cursor: not-allowed;
95
105
  }
96
106
 
97
107
  /* Interactive hover/active */
98
- .ds-circular-button--primary:not(.ds-circular-button--disabled):hover {
108
+ .ds-icon-button--primary:not(.ds-icon-button--disabled):hover {
99
109
  background-color: var(--color-action-primary-bg-hover);
100
110
  }
101
111
 
102
- .ds-circular-button--primary:not(.ds-circular-button--disabled):hover .ds-circular-button__icon {
112
+ .ds-icon-button--primary:not(.ds-icon-button--disabled):hover .ds-icon-button__icon {
103
113
  color: var(--color-action-primary-text-active);
104
114
  }
105
115
 
106
- .ds-circular-button--primary:not(.ds-circular-button--disabled):active {
116
+ .ds-icon-button--primary:not(.ds-icon-button--disabled):active {
107
117
  background-color: var(--color-action-primary-bg-active);
108
118
  }
109
119
 
110
- .ds-circular-button--primary:not(.ds-circular-button--disabled):active .ds-circular-button__icon {
120
+ .ds-icon-button--primary:not(.ds-icon-button--disabled):active .ds-icon-button__icon {
111
121
  color: var(--color-action-primary-text-active);
112
122
  }
113
123
 
@@ -115,50 +125,50 @@
115
125
  SECONDARY VARIANT (OUTLINED)
116
126
  ============================================ */
117
127
 
118
- .ds-circular-button--secondary {
128
+ .ds-icon-button--secondary {
119
129
  border: var(--border-025) solid var(--color-action-primary-border);
120
130
  background-color: transparent;
121
131
  }
122
132
 
123
- .ds-circular-button--secondary .ds-circular-button__icon {
133
+ .ds-icon-button--secondary .ds-icon-button__icon {
124
134
  color: var(--color-action-icon-default);
125
135
  }
126
136
 
127
- .ds-circular-button--secondary.ds-circular-button--hover {
137
+ .ds-icon-button--secondary.ds-icon-button--hover {
128
138
  background-color: var(--color-action-primary-bg-hover);
129
139
  }
130
140
 
131
- .ds-circular-button--secondary.ds-circular-button--hover .ds-circular-button__icon {
141
+ .ds-icon-button--secondary.ds-icon-button--hover .ds-icon-button__icon {
132
142
  color: var(--color-action-icon-active);
133
143
  }
134
144
 
135
- .ds-circular-button--secondary.ds-circular-button--active {
145
+ .ds-icon-button--secondary.ds-icon-button--active {
136
146
  background-color: var(--color-action-primary-bg-active);
137
147
  }
138
148
 
139
- .ds-circular-button--secondary.ds-circular-button--active .ds-circular-button__icon {
149
+ .ds-icon-button--secondary.ds-icon-button--active .ds-icon-button__icon {
140
150
  color: var(--color-action-icon-active);
141
151
  }
142
152
 
143
- .ds-circular-button--secondary.ds-circular-button--disabled {
153
+ .ds-icon-button--secondary.ds-icon-button--disabled {
144
154
  opacity: 0.4;
145
155
  cursor: not-allowed;
146
156
  }
147
157
 
148
158
  /* Interactive hover/active */
149
- .ds-circular-button--secondary:not(.ds-circular-button--disabled):hover {
159
+ .ds-icon-button--secondary:not(.ds-icon-button--disabled):hover {
150
160
  background-color: var(--color-action-primary-bg-hover);
151
161
  }
152
162
 
153
- .ds-circular-button--secondary:not(.ds-circular-button--disabled):hover .ds-circular-button__icon {
163
+ .ds-icon-button--secondary:not(.ds-icon-button--disabled):hover .ds-icon-button__icon {
154
164
  color: var(--color-action-icon-active);
155
165
  }
156
166
 
157
- .ds-circular-button--secondary:not(.ds-circular-button--disabled):active {
167
+ .ds-icon-button--secondary:not(.ds-icon-button--disabled):active {
158
168
  background-color: var(--color-action-primary-bg-active);
159
169
  }
160
170
 
161
- .ds-circular-button--secondary:not(.ds-circular-button--disabled):active .ds-circular-button__icon {
171
+ .ds-icon-button--secondary:not(.ds-icon-button--disabled):active .ds-icon-button__icon {
162
172
  color: var(--color-action-icon-active);
163
173
  }
164
174
 
@@ -166,34 +176,34 @@
166
176
  TERTIARY VARIANT (PASSIVE / GHOST)
167
177
  ============================================ */
168
178
 
169
- .ds-circular-button--tertiary {
179
+ .ds-icon-button--tertiary {
170
180
  background-color: var(--color-action-passive-bg);
171
181
  border: none;
172
182
  }
173
183
 
174
- .ds-circular-button--tertiary .ds-circular-button__icon {
184
+ .ds-icon-button--tertiary .ds-icon-button__icon {
175
185
  color: var(--color-icon-primary);
176
186
  }
177
187
 
178
- .ds-circular-button--tertiary.ds-circular-button--hover {
188
+ .ds-icon-button--tertiary.ds-icon-button--hover {
179
189
  background-color: var(--color-action-passive-bg-hover);
180
190
  }
181
191
 
182
- .ds-circular-button--tertiary.ds-circular-button--active {
192
+ .ds-icon-button--tertiary.ds-icon-button--active {
183
193
  background-color: var(--color-action-passive-bg-active);
184
194
  }
185
195
 
186
- .ds-circular-button--tertiary.ds-circular-button--disabled {
196
+ .ds-icon-button--tertiary.ds-icon-button--disabled {
187
197
  opacity: 0.4;
188
198
  cursor: not-allowed;
189
199
  }
190
200
 
191
201
  /* Interactive hover/active */
192
- .ds-circular-button--tertiary:not(.ds-circular-button--disabled):hover {
202
+ .ds-icon-button--tertiary:not(.ds-icon-button--disabled):hover {
193
203
  background-color: var(--color-action-passive-bg-hover);
194
204
  }
195
205
 
196
- .ds-circular-button--tertiary:not(.ds-circular-button--disabled):active {
206
+ .ds-icon-button--tertiary:not(.ds-icon-button--disabled):active {
197
207
  background-color: var(--color-action-passive-bg-active);
198
208
  }
199
209
 
@@ -204,34 +214,34 @@
204
214
  unlike tertiary, the background is always shown.
205
215
  ============================================ */
206
216
 
207
- .ds-circular-button--neutral {
217
+ .ds-icon-button--neutral {
208
218
  background-color: var(--color-action-neutral-bg);
209
219
  border: none;
210
220
  }
211
221
 
212
- .ds-circular-button--neutral .ds-circular-button__icon {
222
+ .ds-icon-button--neutral .ds-icon-button__icon {
213
223
  color: var(--color-action-neutral-text);
214
224
  }
215
225
 
216
- .ds-circular-button--neutral.ds-circular-button--hover {
226
+ .ds-icon-button--neutral.ds-icon-button--hover {
217
227
  background-color: var(--color-action-neutral-bg-hover);
218
228
  }
219
229
 
220
- .ds-circular-button--neutral.ds-circular-button--active {
230
+ .ds-icon-button--neutral.ds-icon-button--active {
221
231
  background-color: var(--color-action-neutral-bg-active);
222
232
  }
223
233
 
224
- .ds-circular-button--neutral.ds-circular-button--disabled {
234
+ .ds-icon-button--neutral.ds-icon-button--disabled {
225
235
  opacity: 0.4;
226
236
  cursor: not-allowed;
227
237
  }
228
238
 
229
239
  /* Interactive hover/active */
230
- .ds-circular-button--neutral:not(.ds-circular-button--disabled):hover {
240
+ .ds-icon-button--neutral:not(.ds-icon-button--disabled):hover {
231
241
  background-color: var(--color-action-neutral-bg-hover);
232
242
  }
233
243
 
234
- .ds-circular-button--neutral:not(.ds-circular-button--disabled):active {
244
+ .ds-icon-button--neutral:not(.ds-icon-button--disabled):active {
235
245
  background-color: var(--color-action-neutral-bg-active);
236
246
  }
237
247
 
@@ -241,44 +251,44 @@
241
251
  press fill with the solid neutral fills.
242
252
  ============================================ */
243
253
 
244
- .ds-circular-button--secondary-neutral {
254
+ .ds-icon-button--secondary-neutral {
245
255
  border: var(--border-025) solid var(--color-action-neutral-border);
246
256
  background-color: transparent;
247
257
  }
248
258
 
249
- .ds-circular-button--secondary-neutral .ds-circular-button__icon {
259
+ .ds-icon-button--secondary-neutral .ds-icon-button__icon {
250
260
  color: var(--color-action-icon-default);
251
261
  }
252
262
 
253
- .ds-circular-button--secondary-neutral.ds-circular-button--hover {
263
+ .ds-icon-button--secondary-neutral.ds-icon-button--hover {
254
264
  background-color: var(--color-action-neutral-bg-hover);
255
265
  }
256
266
 
257
- .ds-circular-button--secondary-neutral.ds-circular-button--active {
267
+ .ds-icon-button--secondary-neutral.ds-icon-button--active {
258
268
  background-color: var(--color-action-neutral-bg-active);
259
269
  }
260
270
 
261
- .ds-circular-button--secondary-neutral.ds-circular-button--hover .ds-circular-button__icon,
262
- .ds-circular-button--secondary-neutral.ds-circular-button--active .ds-circular-button__icon {
271
+ .ds-icon-button--secondary-neutral.ds-icon-button--hover .ds-icon-button__icon,
272
+ .ds-icon-button--secondary-neutral.ds-icon-button--active .ds-icon-button__icon {
263
273
  color: var(--color-action-neutral-text);
264
274
  }
265
275
 
266
- .ds-circular-button--secondary-neutral.ds-circular-button--disabled {
276
+ .ds-icon-button--secondary-neutral.ds-icon-button--disabled {
267
277
  opacity: 0.4;
268
278
  cursor: not-allowed;
269
279
  }
270
280
 
271
281
  /* Interactive hover/active */
272
- .ds-circular-button--secondary-neutral:not(.ds-circular-button--disabled):hover {
282
+ .ds-icon-button--secondary-neutral:not(.ds-icon-button--disabled):hover {
273
283
  background-color: var(--color-action-neutral-bg-hover);
274
284
  }
275
285
 
276
- .ds-circular-button--secondary-neutral:not(.ds-circular-button--disabled):active {
286
+ .ds-icon-button--secondary-neutral:not(.ds-icon-button--disabled):active {
277
287
  background-color: var(--color-action-neutral-bg-active);
278
288
  }
279
289
 
280
- .ds-circular-button--secondary-neutral:not(.ds-circular-button--disabled):hover .ds-circular-button__icon,
281
- .ds-circular-button--secondary-neutral:not(.ds-circular-button--disabled):active .ds-circular-button__icon {
290
+ .ds-icon-button--secondary-neutral:not(.ds-icon-button--disabled):hover .ds-icon-button__icon,
291
+ .ds-icon-button--secondary-neutral:not(.ds-icon-button--disabled):active .ds-icon-button__icon {
282
292
  color: var(--color-action-neutral-text);
283
293
  }
284
294
 
@@ -287,33 +297,33 @@
287
297
  variant="primary" tone="destructive".
288
298
  ============================================ */
289
299
 
290
- .ds-circular-button--primary-destructive {
300
+ .ds-icon-button--primary-destructive {
291
301
  background-color: var(--color-action-destructive-bg);
292
302
  border: none;
293
303
  }
294
304
 
295
- .ds-circular-button--primary-destructive .ds-circular-button__icon {
305
+ .ds-icon-button--primary-destructive .ds-icon-button__icon {
296
306
  color: var(--color-action-destructive-text);
297
307
  }
298
308
 
299
- .ds-circular-button--primary-destructive.ds-circular-button--hover {
309
+ .ds-icon-button--primary-destructive.ds-icon-button--hover {
300
310
  background-color: var(--color-action-destructive-bg-hover);
301
311
  }
302
312
 
303
- .ds-circular-button--primary-destructive.ds-circular-button--active {
313
+ .ds-icon-button--primary-destructive.ds-icon-button--active {
304
314
  background-color: var(--color-action-destructive-bg-active);
305
315
  }
306
316
 
307
- .ds-circular-button--primary-destructive.ds-circular-button--disabled {
317
+ .ds-icon-button--primary-destructive.ds-icon-button--disabled {
308
318
  opacity: 0.4;
309
319
  cursor: not-allowed;
310
320
  }
311
321
 
312
- .ds-circular-button--primary-destructive:not(.ds-circular-button--disabled):hover {
322
+ .ds-icon-button--primary-destructive:not(.ds-icon-button--disabled):hover {
313
323
  background-color: var(--color-action-destructive-bg-hover);
314
324
  }
315
325
 
316
- .ds-circular-button--primary-destructive:not(.ds-circular-button--disabled):active {
326
+ .ds-icon-button--primary-destructive:not(.ds-icon-button--disabled):active {
317
327
  background-color: var(--color-action-destructive-bg-active);
318
328
  }
319
329
 
@@ -321,42 +331,42 @@
321
331
  DESTRUCTIVE TONE (OUTLINED DANGER)
322
332
  tone="destructive" at secondary or tertiary
323
333
  emphasis: Button's outlined danger look on the
324
- circle, filling with the danger colour on hover
334
+ button, filling with the danger colour on hover
325
335
  and press.
326
336
  ============================================ */
327
337
 
328
- .ds-circular-button--destructive {
338
+ .ds-icon-button--destructive {
329
339
  border: var(--border-025) solid var(--color-action-destructive-border);
330
340
  background-color: transparent;
331
341
  }
332
342
 
333
- .ds-circular-button--destructive .ds-circular-button__icon {
343
+ .ds-icon-button--destructive .ds-icon-button__icon {
334
344
  color: var(--color-action-destructive-text-secondary);
335
345
  }
336
346
 
337
- .ds-circular-button--destructive.ds-circular-button--hover,
338
- .ds-circular-button--destructive.ds-circular-button--active {
347
+ .ds-icon-button--destructive.ds-icon-button--hover,
348
+ .ds-icon-button--destructive.ds-icon-button--active {
339
349
  background-color: var(--color-action-destructive-bg);
340
350
  }
341
351
 
342
- .ds-circular-button--destructive.ds-circular-button--hover .ds-circular-button__icon,
343
- .ds-circular-button--destructive.ds-circular-button--active .ds-circular-button__icon {
352
+ .ds-icon-button--destructive.ds-icon-button--hover .ds-icon-button__icon,
353
+ .ds-icon-button--destructive.ds-icon-button--active .ds-icon-button__icon {
344
354
  color: var(--color-action-destructive-text);
345
355
  }
346
356
 
347
- .ds-circular-button--destructive.ds-circular-button--disabled {
357
+ .ds-icon-button--destructive.ds-icon-button--disabled {
348
358
  opacity: 0.4;
349
359
  cursor: not-allowed;
350
360
  }
351
361
 
352
362
  /* Interactive hover/active */
353
- .ds-circular-button--destructive:not(.ds-circular-button--disabled):hover,
354
- .ds-circular-button--destructive:not(.ds-circular-button--disabled):active {
363
+ .ds-icon-button--destructive:not(.ds-icon-button--disabled):hover,
364
+ .ds-icon-button--destructive:not(.ds-icon-button--disabled):active {
355
365
  background-color: var(--color-action-destructive-bg);
356
366
  }
357
367
 
358
- .ds-circular-button--destructive:not(.ds-circular-button--disabled):hover .ds-circular-button__icon,
359
- .ds-circular-button--destructive:not(.ds-circular-button--disabled):active .ds-circular-button__icon {
368
+ .ds-icon-button--destructive:not(.ds-icon-button--disabled):hover .ds-icon-button__icon,
369
+ .ds-icon-button--destructive:not(.ds-icon-button--disabled):active .ds-icon-button__icon {
360
370
  color: var(--color-action-destructive-text);
361
371
  }
362
372
 
@@ -366,7 +376,7 @@
366
376
  the spinner replaces the icon and inherits its colour.
367
377
  ============================================ */
368
378
 
369
- .ds-circular-button--loading {
379
+ .ds-icon-button--loading {
370
380
  cursor: progress;
371
381
  pointer-events: none;
372
382
  }
@@ -374,7 +384,7 @@
374
384
  /* The spinner is a box, not a glyph: left inline, it sits on the text
375
385
  baseline and the strut's descender pushes it ~1px above the button's
376
386
  centre. Flex centres it geometrically. */
377
- .ds-circular-button--loading .ds-circular-button__icon {
387
+ .ds-icon-button--loading .ds-icon-button__icon {
378
388
  display: inline-flex;
379
389
  align-items: center;
380
390
  justify-content: center;
@@ -384,7 +394,7 @@
384
394
  FOCUS
385
395
  ============================================ */
386
396
 
387
- .ds-circular-button:focus-visible {
397
+ .ds-icon-button:focus-visible {
388
398
  outline: 2px solid var(--color-action-primary-bg);
389
399
  outline-offset: 2px;
390
400
  }
@@ -395,11 +405,11 @@
395
405
  BottomNav's count-badge treatment.
396
406
  ============================================ */
397
407
 
398
- .ds-circular-button--badged {
408
+ .ds-icon-button--badged {
399
409
  position: relative;
400
410
  }
401
411
 
402
- .ds-circular-button__badge {
412
+ .ds-icon-button__badge {
403
413
  position: absolute;
404
414
  inset-block-start: calc(var(--padding-100) * -1);
405
415
  inset-inline-end: calc(var(--padding-100) * -1);
@@ -419,7 +429,7 @@
419
429
  pointer-events: none;
420
430
  }
421
431
 
422
- .ds-circular-button__badge--dot {
432
+ .ds-icon-button__badge--dot {
423
433
  inset-block-start: var(--padding-050);
424
434
  inset-inline-end: var(--padding-050);
425
435
  min-width: 0;
@@ -0,0 +1,108 @@
1
+ import { default as React } from 'react';
2
+ import { LinkComponent } from '../../behaviors/LinkProvider';
3
+ /** Props owned by IconButton itself — everything else falls through to the DOM node. */
4
+ type IconButtonOwnProps = {
5
+ /** The icon — Material Symbol name (string) or custom element (ReactNode) */
6
+ icon: string | React.ReactNode;
7
+ /**
8
+ * Emphasis: `primary` (filled), `secondary` (outlined) or `tertiary`
9
+ * (ghost). The colour is `tone`'s job. `neutral` is the legacy value from
10
+ * before the split and renders as `variant="primary" tone="neutral"`.
11
+ */
12
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'neutral';
13
+ /**
14
+ * Colour, independent of emphasis: `default` carries the action colour,
15
+ * `neutral` the greys, `destructive` the danger colour. Tertiary is
16
+ * already grey, so `neutral` leaves it unchanged; a tertiary
17
+ * `destructive` takes the outlined look, since a danger action needs a
18
+ * visible edge.
19
+ */
20
+ tone?: 'default' | 'neutral' | 'destructive';
21
+ /**
22
+ * Legacy alias for `variant`.
23
+ *
24
+ * @deprecated Use `variant` instead.
25
+ */
26
+ priority?: 'primary' | 'secondary' | 'tertiary';
27
+ /** Whether the button is disabled */
28
+ disabled?: boolean;
29
+ /**
30
+ * Documentation-only interaction state.
31
+ *
32
+ * @deprecated Use `disabled` for the disabled state.
33
+ *
34
+ * Documentation-only affordance for rendering a *static* interaction state in
35
+ * Storybook and the showcase site. Real hover/active styling comes from CSS
36
+ * pseudo-classes and needs no prop — for docs, prefer
37
+ * `className="ds-icon-button--hover"`.
38
+ */
39
+ state?: 'default' | 'hover' | 'active' | 'disabled';
40
+ /** Button size */
41
+ size?: 'default' | 'compact';
42
+ /**
43
+ * Shows a spinner in place of the icon and blocks interaction while an
44
+ * async action runs. Keeps the variant's full-colour appearance (unlike
45
+ * the disabled state) and sets `aria-busy` on the rendered element.
46
+ */
47
+ loading?: boolean;
48
+ /**
49
+ * The button's name: what a screen reader announces and, by default, what
50
+ * the tooltip shows. Required, because the button has no visible text.
51
+ * Named as Button's and AiButton's text is, so the family spells it one way.
52
+ */
53
+ label: string;
54
+ /**
55
+ * The hover/focus tooltip. An icon-only control names itself: by default
56
+ * the button wears a Tooltip carrying `label`. Pass a string to show
57
+ * different wording, or `false` to opt out — for a host that labels the
58
+ * control another way, or one that owns the button's box directly
59
+ * (SplitButton's trigger stretches to its sibling segment, which the
60
+ * tooltip wrapper would block).
61
+ */
62
+ tooltip?: string | false;
63
+ /** Which side the tooltip opens on. `start` and `end` follow the reading direction. */
64
+ tooltipPosition?: 'top' | 'bottom' | 'left' | 'right' | 'start' | 'end';
65
+ /** Optional href — renders as <a> instead of <button> */
66
+ href?: string;
67
+ /** Optional target attribute for links */
68
+ target?: string;
69
+ /** Optional rel attribute for links */
70
+ rel?: string;
71
+ /** A mark on the button's top-end corner, as BottomNav draws one: a count (a notification bell's unread), or `true` for a dot with no number. */
72
+ badge?: number | string | true;
73
+ /** The highest count the badge spells out; a larger one reads "99+". Defaults to 99. */
74
+ badgeMax?: number;
75
+ /**
76
+ * Text read after `label` while the button carries a badge, given the
77
+ * badge. Defaults to ", new" for a dot and ", 3 new" for a count; the
78
+ * leading comma and space are part of the text. The tooltip keeps
79
+ * `label` alone.
80
+ */
81
+ badgeLabel?: (badge: number | string | true) => string;
82
+ /** The BCP 47 locale a numeric badge is written in, such as `ar-EG`. Defaults to `en-US`. This component can render from a Server Component, so it takes the prop alone and reads no LocaleProvider. */
83
+ locale?: string;
84
+ /** Additional CSS classes */
85
+ className?: string;
86
+ /**
87
+ * The component the link renders with, such as Next.js's `Link`, so it
88
+ * navigates through the app's router; a plain `<a>` when unset. This
89
+ * component can render on the server, so it never reads a LinkProvider:
90
+ * pass the prop even under one.
91
+ */
92
+ linkComponent?: LinkComponent;
93
+ };
94
+ export interface IconButtonProps extends IconButtonOwnProps, Omit<React.ComponentPropsWithoutRef<'button'>, keyof IconButtonOwnProps | 'type'> {
95
+ }
96
+ /**
97
+ * Icon button component.
98
+ * A button holding a single icon and no visible text, round or square as
99
+ * the theme's button radius makes it. `variant` sets the emphasis
100
+ * (primary, secondary, tertiary) and `tone` the colour (default, neutral,
101
+ * destructive),
102
+ * in default and compact sizes.
103
+ *
104
+ * Renders a `<button>`, or an `<a>` when `href` is supplied. Forwards a ref to
105
+ * whichever element it renders, and spreads unrecognised props onto it.
106
+ */
107
+ export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
108
+ export {};