@ctrl-ui/react 0.9.5 → 0.9.8

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 (165) hide show
  1. package/README.md +38 -2
  2. package/dist/action-bar.js +16 -8
  3. package/dist/activity.d.ts +4 -2
  4. package/dist/activity.js +5 -2
  5. package/dist/audio-visualizer.js +1 -1
  6. package/dist/blocks/agent-run-clock.d.ts +5 -0
  7. package/dist/blocks/agent-run-clock.js +52 -0
  8. package/dist/blocks/agent-run-sidebar.d.ts +13 -0
  9. package/dist/blocks/agent-run-sidebar.js +101 -0
  10. package/dist/blocks/agent-run-status.d.ts +32 -0
  11. package/dist/blocks/agent-run-status.js +27 -0
  12. package/dist/blocks/agent-run.d.ts +82 -0
  13. package/dist/blocks/agent-run.js +262 -0
  14. package/dist/blocks/coding-agent.d.ts +1 -1
  15. package/dist/blocks/coding-agent.js +50 -69
  16. package/dist/blocks/design-canvas-data.d.ts +1 -1
  17. package/dist/blocks/design-canvas-inspector.js +1 -1
  18. package/dist/blocks/design-canvas.d.ts +2 -1
  19. package/dist/blocks/design-canvas.js +56 -42
  20. package/dist/blocks/discussion.js +1 -1
  21. package/dist/blocks/file-explorer.js +66 -47
  22. package/dist/blocks/settings.js +37 -41
  23. package/dist/blocks/team-chat.js +2 -1
  24. package/dist/blocks/theme-toggle.d.ts +2 -1
  25. package/dist/blocks/theme-toggle.js +13 -4
  26. package/dist/chat-message.js +33 -39
  27. package/dist/hooks/use-mobile.d.ts +1 -1
  28. package/dist/hooks/use-mobile.js +1 -1
  29. package/dist/knob-contracts/badge-knobs.d.ts +1 -1
  30. package/dist/knob-contracts/badge-knobs.js +3 -1
  31. package/dist/knob-contracts/button-knobs.d.ts +1 -1
  32. package/dist/knob-contracts/button-knobs.js +1 -0
  33. package/dist/knob-contracts/calendar-knobs.d.ts +1 -1
  34. package/dist/knob-contracts/calendar-knobs.js +9 -1
  35. package/dist/knob-contracts/card-knobs.d.ts +1 -1
  36. package/dist/knob-contracts/card-knobs.js +5 -1
  37. package/dist/knob-contracts/choice-knobs.d.ts +1 -1
  38. package/dist/knob-contracts/choice-knobs.js +1 -0
  39. package/dist/knob-contracts/collapsible-knobs.d.ts +1 -1
  40. package/dist/knob-contracts/collapsible-knobs.js +5 -1
  41. package/dist/knob-contracts/emoji-picker-knobs.d.ts +1 -1
  42. package/dist/knob-contracts/emoji-picker-knobs.js +3 -1
  43. package/dist/knob-contracts/field-knobs.d.ts +1 -1
  44. package/dist/knob-contracts/field-knobs.js +17 -1
  45. package/dist/knob-contracts/infinite-canvas-knobs.d.ts +1 -1
  46. package/dist/knob-contracts/infinite-canvas-knobs.js +1 -7
  47. package/dist/knob-contracts/item-knobs.d.ts +1 -1
  48. package/dist/knob-contracts/item-knobs.js +5 -1
  49. package/dist/knob-contracts/kbd-knobs.d.ts +1 -1
  50. package/dist/knob-contracts/kbd-knobs.js +4 -1
  51. package/dist/knob-contracts/page-layout-knobs.d.ts +1 -1
  52. package/dist/knob-contracts/page-layout-knobs.js +1 -0
  53. package/dist/knob-contracts/pagination-knobs.d.ts +1 -1
  54. package/dist/knob-contracts/pagination-knobs.js +2 -1
  55. package/dist/knob-contracts/popup-knobs.d.ts +1 -1
  56. package/dist/knob-contracts/popup-knobs.js +9 -0
  57. package/dist/knob-contracts/range-knobs.d.ts +1 -1
  58. package/dist/knob-contracts/range-knobs.js +2 -0
  59. package/dist/knob-contracts/sidebar-knobs.d.ts +1 -1
  60. package/dist/knob-contracts/sidebar-knobs.js +2 -0
  61. package/dist/knob-contracts/swap-knobs.d.ts +4 -0
  62. package/dist/knob-contracts/swap-knobs.js +9 -0
  63. package/dist/knob-contracts/tabs-knobs.d.ts +1 -1
  64. package/dist/knob-contracts/tabs-knobs.js +3 -0
  65. package/dist/knob-contracts/timeline-knobs.d.ts +1 -1
  66. package/dist/knob-contracts/timeline-knobs.js +5 -1
  67. package/dist/knob-contracts/tool-approval-knobs.d.ts +4 -0
  68. package/dist/knob-contracts/tool-approval-knobs.js +32 -0
  69. package/dist/knob-contracts/tree-knobs.d.ts +1 -1
  70. package/dist/knob-contracts/tree-knobs.js +3 -1
  71. package/dist/lib/infinite-canvas-camera-store.d.ts +65 -0
  72. package/dist/lib/infinite-canvas-camera-store.js +233 -0
  73. package/dist/lib/infinite-canvas-camera.d.ts +33 -0
  74. package/dist/lib/infinite-canvas-camera.js +98 -0
  75. package/dist/lib/infinite-canvas-navigation.d.ts +19 -0
  76. package/dist/lib/infinite-canvas-navigation.js +395 -0
  77. package/dist/markdown-editor/bubble-menu.d.ts +6 -0
  78. package/dist/markdown-editor/bubble-menu.js +45 -0
  79. package/dist/markdown-editor/toolbar.d.ts +17 -1
  80. package/dist/markdown-editor/toolbar.js +103 -81
  81. package/dist/skin.d.ts +2 -0
  82. package/dist/styles/index.css +11 -10
  83. package/dist/styles/recipes/activity.css +12 -0
  84. package/dist/styles/recipes/avatar.css +1 -1
  85. package/dist/styles/recipes/badge.css +17 -0
  86. package/dist/styles/recipes/button-group.css +12 -6
  87. package/dist/styles/recipes/button.css +20 -3
  88. package/dist/styles/recipes/calendar.css +82 -6
  89. package/dist/styles/recipes/card.css +40 -5
  90. package/dist/styles/recipes/chat-message-edit.css +6 -21
  91. package/dist/styles/recipes/choice.css +9 -2
  92. package/dist/styles/recipes/collapsible.css +8 -1
  93. package/dist/styles/recipes/color-picker-values.css +4 -0
  94. package/dist/styles/recipes/emoji-picker.css +29 -8
  95. package/dist/styles/recipes/field-parts.css +80 -5
  96. package/dist/styles/recipes/field.css +113 -40
  97. package/dist/styles/recipes/infinite-canvas.css +17 -57
  98. package/dist/styles/recipes/item.css +33 -5
  99. package/dist/styles/recipes/kbd.css +26 -6
  100. package/dist/styles/recipes/markdown-editor.css +12 -0
  101. package/dist/styles/recipes/morphing-panel.css +1 -1
  102. package/dist/styles/recipes/page-layout.css +18 -2
  103. package/dist/styles/recipes/pagination.css +8 -0
  104. package/dist/styles/recipes/popup-controls.css +9 -0
  105. package/dist/styles/recipes/popup-drawer.css +1 -0
  106. package/dist/styles/recipes/popup-lists.css +55 -6
  107. package/dist/styles/recipes/popup-motion.css +7 -1
  108. package/dist/styles/recipes/popup.css +10 -0
  109. package/dist/styles/recipes/range.css +16 -2
  110. package/dist/styles/recipes/sidebar-mobile.css +1 -1
  111. package/dist/styles/recipes/sidebar-parts.css +17 -1
  112. package/dist/styles/recipes/sidebar.css +11 -0
  113. package/dist/styles/recipes/swap.css +143 -0
  114. package/dist/styles/recipes/tabs.css +41 -8
  115. package/dist/styles/recipes/timeline.css +36 -2
  116. package/dist/styles/recipes/tool-approval.css +267 -0
  117. package/dist/styles/recipes/track-highlight.css +19 -6
  118. package/dist/styles/recipes/tree.css +33 -0
  119. package/dist/styles/theme.css +17 -6
  120. package/dist/tool-approval.d.ts +49 -0
  121. package/dist/tool-approval.js +260 -0
  122. package/dist/ui/alert-dialog.js +1 -1
  123. package/dist/ui/badge.js +1 -1
  124. package/dist/ui/calendar.js +9 -4
  125. package/dist/ui/card.d.ts +3 -1
  126. package/dist/ui/card.js +2 -1
  127. package/dist/ui/code.js +13 -3
  128. package/dist/ui/command.js +1 -0
  129. package/dist/ui/dialog.js +1 -1
  130. package/dist/ui/dropdown-menu.d.ts +1 -1
  131. package/dist/ui/dropdown-menu.js +23 -6
  132. package/dist/ui/dropzone.js +10 -11
  133. package/dist/ui/field.d.ts +6 -2
  134. package/dist/ui/field.js +4 -2
  135. package/dist/ui/infinite-canvas.d.ts +19 -22
  136. package/dist/ui/infinite-canvas.js +264 -325
  137. package/dist/ui/morphing-panel.d.ts +5 -1
  138. package/dist/ui/morphing-panel.js +4 -2
  139. package/dist/ui/rich-tooltip.d.ts +2 -1
  140. package/dist/ui/rich-tooltip.js +32 -29
  141. package/dist/ui/select.js +2 -2
  142. package/dist/ui/sidebar-mobile.js +1 -1
  143. package/dist/ui/sidebar-provider.d.ts +3 -1
  144. package/dist/ui/sidebar-provider.js +3 -2
  145. package/dist/ui/sidebar-resize-rail.js +1 -1
  146. package/dist/ui/sidebar.d.ts +6 -5
  147. package/dist/ui/sidebar.js +10 -9
  148. package/dist/ui/swap.d.ts +14 -0
  149. package/dist/ui/swap.js +69 -0
  150. package/dist/ui/tabs.d.ts +1 -1
  151. package/dist/ui/tabs.js +2 -13
  152. package/dist/ui/timeline.d.ts +1 -1
  153. package/dist/ui/timeline.js +2 -2
  154. package/dist/ui/typography.d.ts +11 -5
  155. package/dist/ui/typography.js +18 -6
  156. package/dist/user-ask.js +1 -1
  157. package/lint/biome-preset.json +3 -0
  158. package/lint/class-policy.mjs +17 -0
  159. package/lint/eslint-plugin.mjs +87 -0
  160. package/lint/grit-rules.mjs +40 -0
  161. package/lint/no-component-style-classes.grit +16 -0
  162. package/lint/no-raw-type-classes.grit +3 -4
  163. package/lint/write-grit-rules.mjs +19 -0
  164. package/package.json +12 -3
  165. package/dist/styles/type-scale.css +0 -72
@@ -0,0 +1,267 @@
1
+ @layer components {
2
+ :where([data-control-family="tool-approval"][data-slot="root"]) {
3
+ --cui-tool-approval-background: var(--card);
4
+ --cui-tool-approval-foreground: var(--card-foreground);
5
+ --cui-tool-approval-border-color: var(--border);
6
+ --cui-tool-approval-border-width: var(--control-rim-width);
7
+ --cui-tool-approval-radius: var(--radius-lg);
8
+ --cui-tool-approval-shadow: var(--shadow-sm);
9
+ --cui-tool-approval-padding: 0px;
10
+ --cui-tool-approval-body-background: transparent;
11
+ --cui-tool-approval-body-border-color: transparent;
12
+ --cui-tool-approval-body-border-width: 0px;
13
+ --cui-tool-approval-body-radius: var(--radius-lg);
14
+ --cui-tool-approval-body-shadow: 0 0 transparent;
15
+ --cui-tool-approval-body-padding: calc(var(--spacing) * 3);
16
+ --cui-tool-approval-body-gap: calc(var(--spacing) * 3);
17
+ --cui-tool-approval-footer-border-color: var(--border);
18
+ --cui-tool-approval-footer-border-width: var(--control-rim-width);
19
+ --cui-tool-approval-footer-padding: calc(var(--spacing) * 2.5);
20
+ --cui-tool-approval-footer-gap: calc(var(--spacing) * 2);
21
+ --cui-tool-approval-preview-background: transparent;
22
+ --cui-tool-approval-preview-border-color: transparent;
23
+ --cui-tool-approval-preview-border-width: 0px;
24
+ --cui-tool-approval-preview-radius: var(--radius-md);
25
+ --cui-tool-approval-preview-padding: 0px;
26
+ --cui-tool-approval-preview-gap: calc(var(--spacing) * 1.5);
27
+ --cui-tool-approval-label-foreground: var(--muted-foreground);
28
+ --cui-tool-approval-description-foreground: var(--muted-foreground);
29
+ --cui-tool-approval-status-foreground: var(--muted-foreground);
30
+ display: grid;
31
+ padding: var(--cui-tool-approval-padding);
32
+ border-radius: var(--cui-tool-approval-radius);
33
+ background: var(--cui-tool-approval-background);
34
+ color: var(--cui-tool-approval-foreground);
35
+ box-shadow:
36
+ inset 0 0 0 var(--cui-tool-approval-border-width) var(--cui-tool-approval-border-color),
37
+ var(--cui-tool-approval-shadow);
38
+ font-size: var(--text-body);
39
+ }
40
+
41
+ :where([data-control-family="tool-approval"][data-slot="body"]) {
42
+ display: grid;
43
+ gap: var(--cui-tool-approval-body-gap);
44
+ padding: var(--cui-tool-approval-body-padding);
45
+ border-radius: var(--cui-tool-approval-body-radius);
46
+ background: var(--cui-tool-approval-body-background);
47
+ box-shadow:
48
+ inset 0 0 0 var(--cui-tool-approval-body-border-width) var(--cui-tool-approval-body-border-color),
49
+ var(--cui-tool-approval-body-shadow);
50
+ }
51
+
52
+ :where([data-control-family="tool-approval"][data-slot="footer"]) {
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: flex-end;
56
+ gap: var(--cui-tool-approval-footer-gap);
57
+ padding: var(--cui-tool-approval-footer-padding);
58
+ border-block-start: var(--cui-tool-approval-footer-border-width) solid var(--cui-tool-approval-footer-border-color);
59
+ }
60
+
61
+ :where([data-control-family="tool-approval"][data-slot="preview"]) {
62
+ display: grid;
63
+ grid-template-columns: auto minmax(0, 1fr);
64
+ column-gap: calc(var(--spacing) * 4);
65
+ row-gap: var(--cui-tool-approval-preview-gap);
66
+ padding: var(--cui-tool-approval-preview-padding);
67
+ border-radius: var(--cui-tool-approval-preview-radius);
68
+ background: var(--cui-tool-approval-preview-background);
69
+ box-shadow: inset 0 0 0 var(--cui-tool-approval-preview-border-width) var(--cui-tool-approval-preview-border-color);
70
+ }
71
+
72
+ :where([data-control-family="tool-approval"][data-slot="field"]) {
73
+ display: contents;
74
+ }
75
+
76
+ :where([data-control-family="tool-approval"][data-slot="field-label"]) {
77
+ color: var(--cui-tool-approval-label-foreground);
78
+ }
79
+
80
+ :where([data-control-family="tool-approval"][data-slot="description"]) {
81
+ color: var(--cui-tool-approval-description-foreground);
82
+ }
83
+
84
+ :where([data-control-family="tool-approval"][data-slot="status"]) {
85
+ display: inline-flex;
86
+ align-items: center;
87
+ gap: var(--spacing);
88
+ color: var(--cui-tool-approval-status-foreground);
89
+ transition-property: opacity;
90
+ transition-duration: var(--duration-base);
91
+ transition-timing-function: var(--ease-emphasized);
92
+ }
93
+
94
+ @starting-style {
95
+ :where([data-control-family="tool-approval"][data-slot="status"]) {
96
+ opacity: 0;
97
+ }
98
+ }
99
+
100
+ :where([data-control-family="tool-approval"][data-slot="root"][data-state="approved"] [data-slot="status-icon"]) {
101
+ color: var(--success-text);
102
+ }
103
+
104
+ :where([data-control-family="tool-approval"][data-slot="root"][data-state="denied"] [data-slot="status-icon"]) {
105
+ color: var(--destructive-text);
106
+ }
107
+ }
108
+
109
+ @property --cui-tool-approval-background {
110
+ syntax: "<color>";
111
+ inherits: true;
112
+ initial-value: transparent;
113
+ }
114
+
115
+ @property --cui-tool-approval-foreground {
116
+ syntax: "<color>";
117
+ inherits: true;
118
+ initial-value: transparent;
119
+ }
120
+
121
+ @property --cui-tool-approval-border-color {
122
+ syntax: "<color>";
123
+ inherits: true;
124
+ initial-value: transparent;
125
+ }
126
+
127
+ @property --cui-tool-approval-border-width {
128
+ syntax: "<length>";
129
+ inherits: true;
130
+ initial-value: 0px;
131
+ }
132
+
133
+ @property --cui-tool-approval-radius {
134
+ syntax: "<length-percentage>";
135
+ inherits: true;
136
+ initial-value: 0px;
137
+ }
138
+
139
+ @property --cui-tool-approval-shadow {
140
+ syntax: "*";
141
+ inherits: true;
142
+ }
143
+
144
+ @property --cui-tool-approval-padding {
145
+ syntax: "<length-percentage>";
146
+ inherits: true;
147
+ initial-value: 0px;
148
+ }
149
+
150
+ @property --cui-tool-approval-body-background {
151
+ syntax: "<color>";
152
+ inherits: true;
153
+ initial-value: transparent;
154
+ }
155
+
156
+ @property --cui-tool-approval-body-border-color {
157
+ syntax: "<color>";
158
+ inherits: true;
159
+ initial-value: transparent;
160
+ }
161
+
162
+ @property --cui-tool-approval-body-border-width {
163
+ syntax: "<length>";
164
+ inherits: true;
165
+ initial-value: 0px;
166
+ }
167
+
168
+ @property --cui-tool-approval-body-radius {
169
+ syntax: "<length-percentage>";
170
+ inherits: true;
171
+ initial-value: 0px;
172
+ }
173
+
174
+ @property --cui-tool-approval-body-shadow {
175
+ syntax: "*";
176
+ inherits: true;
177
+ }
178
+
179
+ @property --cui-tool-approval-body-padding {
180
+ syntax: "<length-percentage>";
181
+ inherits: true;
182
+ initial-value: 0px;
183
+ }
184
+
185
+ @property --cui-tool-approval-body-gap {
186
+ syntax: "<length-percentage>";
187
+ inherits: true;
188
+ initial-value: 0px;
189
+ }
190
+
191
+ @property --cui-tool-approval-footer-border-color {
192
+ syntax: "<color>";
193
+ inherits: true;
194
+ initial-value: transparent;
195
+ }
196
+
197
+ @property --cui-tool-approval-footer-border-width {
198
+ syntax: "<length>";
199
+ inherits: true;
200
+ initial-value: 0px;
201
+ }
202
+
203
+ @property --cui-tool-approval-footer-padding {
204
+ syntax: "<length-percentage>";
205
+ inherits: true;
206
+ initial-value: 0px;
207
+ }
208
+
209
+ @property --cui-tool-approval-footer-gap {
210
+ syntax: "<length-percentage>";
211
+ inherits: true;
212
+ initial-value: 0px;
213
+ }
214
+
215
+ @property --cui-tool-approval-preview-background {
216
+ syntax: "<color>";
217
+ inherits: true;
218
+ initial-value: transparent;
219
+ }
220
+
221
+ @property --cui-tool-approval-preview-border-color {
222
+ syntax: "<color>";
223
+ inherits: true;
224
+ initial-value: transparent;
225
+ }
226
+
227
+ @property --cui-tool-approval-preview-border-width {
228
+ syntax: "<length>";
229
+ inherits: true;
230
+ initial-value: 0px;
231
+ }
232
+
233
+ @property --cui-tool-approval-preview-radius {
234
+ syntax: "<length-percentage>";
235
+ inherits: true;
236
+ initial-value: 0px;
237
+ }
238
+
239
+ @property --cui-tool-approval-preview-padding {
240
+ syntax: "<length-percentage>";
241
+ inherits: true;
242
+ initial-value: 0px;
243
+ }
244
+
245
+ @property --cui-tool-approval-preview-gap {
246
+ syntax: "<length-percentage>";
247
+ inherits: true;
248
+ initial-value: 0px;
249
+ }
250
+
251
+ @property --cui-tool-approval-label-foreground {
252
+ syntax: "<color>";
253
+ inherits: true;
254
+ initial-value: transparent;
255
+ }
256
+
257
+ @property --cui-tool-approval-description-foreground {
258
+ syntax: "<color>";
259
+ inherits: true;
260
+ initial-value: transparent;
261
+ }
262
+
263
+ @property --cui-tool-approval-status-foreground {
264
+ syntax: "<color>";
265
+ inherits: true;
266
+ initial-value: transparent;
267
+ }
@@ -62,8 +62,7 @@
62
62
  [data-control-family="checkbox-group"]
63
63
  )
64
64
  > [data-control-family="track-highlight"]
65
- ),
66
- :where([data-track]:has(> [data-control-family="button"][data-track-item]) > [data-control-family="track-highlight"]) {
65
+ ) {
67
66
  --cui-track-highlight-radius: var(--radius-control);
68
67
  }
69
68
 
@@ -73,13 +72,17 @@
73
72
  }
74
73
 
75
74
  @media (hover: hover) {
76
- :where([data-control-family="button-group"][data-track="hover"]:has(> :first-child:hover)) {
75
+ :where(
76
+ [data-control-family="button-group"][data-track="hover"]:has(
77
+ > :nth-child(1 of :not([data-control-family="track-highlight"], [data-base-ui-focus-guard], span[aria-owns])):hover
78
+ )
79
+ ) {
77
80
  --_button-group-leading-cap: 1;
78
81
  }
79
82
 
80
83
  :where(
81
84
  [data-control-family="button-group"][data-track="hover"]:has(
82
- > :nth-last-child(1 of :not([data-control-family="track-highlight"])):hover
85
+ > :nth-last-child(1 of :not([data-control-family="track-highlight"], [data-base-ui-focus-guard], span[aria-owns])):hover
83
86
  )
84
87
  ) {
85
88
  --_button-group-trailing-cap: 1;
@@ -91,13 +94,23 @@
91
94
  --_button-group-trailing-cap: 0;
92
95
  }
93
96
 
94
- :where([data-control-family="button-group"][data-track="hover"]:has(> :first-child:is(:focus-visible, :has(:focus-visible)))) {
97
+ :where(
98
+ [data-control-family="button-group"][data-track="hover"]:has(
99
+ > :nth-child(1 of :not([data-control-family="track-highlight"], [data-base-ui-focus-guard], span[aria-owns])):is(
100
+ :focus-visible,
101
+ :has(:focus-visible)
102
+ )
103
+ )
104
+ ) {
95
105
  --_button-group-leading-cap: 1;
96
106
  }
97
107
 
98
108
  :where(
99
109
  [data-control-family="button-group"][data-track="hover"]:has(
100
- > :nth-last-child(1 of :not([data-control-family="track-highlight"])):is(:focus-visible, :has(:focus-visible))
110
+ > :nth-last-child(1 of :not([data-control-family="track-highlight"], [data-base-ui-focus-guard], span[aria-owns])):is(
111
+ :focus-visible,
112
+ :has(:focus-visible)
113
+ )
101
114
  )
102
115
  ) {
103
116
  --_button-group-trailing-cap: 1;
@@ -10,6 +10,8 @@
10
10
  --cui-tree-item-trigger-font-size: var(--text-body);
11
11
  --cui-tree-item-trigger-selected-font-weight: var(--font-weight-normal);
12
12
  --cui-tree-indent-inset: 1.25rem;
13
+ --cui-tree-guide-background: transparent;
14
+ --cui-tree-guide-inline-size: 1px;
13
15
  }
14
16
 
15
17
  :where([data-control-family="tree"][data-slot="list"]) {
@@ -119,10 +121,29 @@
119
121
  }
120
122
 
121
123
  :where([data-control-family="tree"][data-slot="item-group"]) {
124
+ position: relative;
122
125
  translate: 0 0;
123
126
  transition: translate var(--duration-base) var(--ease-emphasized);
124
127
  }
125
128
 
129
+ :where([data-control-family="tree"][data-slot="item-group"])::before {
130
+ content: "";
131
+ position: absolute;
132
+ inset-block: 0;
133
+ inset-inline-start: calc(
134
+ var(--_tree-level, 1) *
135
+ var(--cui-tree-indent-inset) +
136
+ var(--spacing) *
137
+ 2 -
138
+ var(--cui-tree-guide-inline-size) /
139
+ 2
140
+ );
141
+ inline-size: var(--cui-tree-guide-inline-size);
142
+ border-radius: var(--cui-tree-guide-inline-size);
143
+ background-color: var(--cui-tree-guide-background);
144
+ pointer-events: none;
145
+ }
146
+
126
147
  :where([data-control-family="tree"][data-slot="item-content"]:is([data-starting-style], [data-ending-style]) > [data-slot="item-group"]) {
127
148
  translate: 0 calc(var(--spacing) * -1);
128
149
  }
@@ -187,3 +208,15 @@
187
208
  inherits: true;
188
209
  initial-value: transparent;
189
210
  }
211
+
212
+ @property --cui-tree-guide-background {
213
+ syntax: "<color>";
214
+ inherits: true;
215
+ initial-value: transparent;
216
+ }
217
+
218
+ @property --cui-tree-guide-inline-size {
219
+ syntax: "<length-percentage>";
220
+ inherits: true;
221
+ initial-value: 0px;
222
+ }
@@ -242,10 +242,15 @@
242
242
  --font-body: var(--font-sans);
243
243
  --font-display: var(--font-sans);
244
244
  --text-micro: 0.625rem;
245
+ --text-micro--line-height: 1.5;
245
246
  --text-caption: 0.6875rem;
247
+ --text-caption--line-height: 1.5;
246
248
  --text-label: 0.75rem;
249
+ --text-label--line-height: 1.5;
247
250
  --text-body: 0.875rem;
251
+ --text-body--line-height: 1.5;
248
252
  --text-body-lg: 1rem;
253
+ --text-body-lg--line-height: 1.5;
249
254
  --text-heading-4: 0.9375rem;
250
255
  --text-heading-4--line-height: 1.4;
251
256
  --text-heading-4--font-weight: 600;
@@ -421,7 +426,7 @@
421
426
  /* biome-ignore-end lint/complexity/noImportantStyles: Reduced motion must override skin and inline motion. */
422
427
 
423
428
  @theme static {
424
- --breakpoint-lg: 64rem;
429
+ --breakpoint-sidebar: 64rem;
425
430
  }
426
431
 
427
432
  @theme inline {
@@ -485,10 +490,15 @@
485
490
  --spacing-control-lg: var(--control-h-lg);
486
491
 
487
492
  --text-micro: var(--text-micro);
493
+ --text-micro--line-height: var(--text-micro--line-height);
488
494
  --text-caption: var(--text-caption);
495
+ --text-caption--line-height: var(--text-caption--line-height);
489
496
  --text-label: var(--text-label);
497
+ --text-label--line-height: var(--text-label--line-height);
490
498
  --text-body: var(--text-body);
499
+ --text-body--line-height: var(--text-body--line-height);
491
500
  --text-body-lg: var(--text-body-lg);
501
+ --text-body-lg--line-height: var(--text-body-lg--line-height);
492
502
  --text-heading-4: var(--text-heading-4);
493
503
  --text-heading-4--line-height: var(--text-heading-4--line-height);
494
504
  --text-heading-4--font-weight: var(--text-heading-4--font-weight);
@@ -685,8 +695,8 @@
685
695
  }
686
696
 
687
697
  @layer components {
688
- :where([data-control-family]):focus-visible,
689
- :where([data-control-family][data-control="true"]):has(:focus-visible),
698
+ :where([data-control-family]:not([data-focus-ring="none"])):focus-visible,
699
+ :where([data-control-family][data-control="true"]:not([data-focus-ring="none"])):has(:focus-visible),
690
700
  :where([data-control-family][data-focus-ring="within"]):has(:focus-visible) {
691
701
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring);
692
702
  outline-offset: var(--focus-ring-offset);
@@ -694,7 +704,8 @@
694
704
 
695
705
  :where(
696
706
  [data-control-family][data-control="true"] [data-control-family],
697
- [data-control-family][data-focus-ring="within"] [data-control-family]
707
+ [data-control-family][data-focus-ring="within"] [data-control-family],
708
+ [data-control-family][data-focus-ring="none"] [data-control-family]
698
709
  ):focus-visible {
699
710
  outline-width: 0;
700
711
  }
@@ -704,8 +715,8 @@
704
715
  }
705
716
 
706
717
  @media (forced-colors: active) {
707
- :where([data-control-family]):focus-visible,
708
- :where([data-control-family][data-control="true"]):has(:focus-visible),
718
+ :where([data-control-family]:not([data-focus-ring="none"])):focus-visible,
719
+ :where([data-control-family][data-control="true"]:not([data-focus-ring="none"])):has(:focus-visible),
709
720
  :where([data-control-family][data-focus-ring="within"]):has(:focus-visible) {
710
721
  outline-color: Highlight;
711
722
  }
@@ -0,0 +1,49 @@
1
+ import { RenderProp } from "./control-props.js";
2
+ import { Button } from "./ui/button.js";
3
+ import { ToolApprovalKnobStyle } from "./knob-contracts/tool-approval-knobs.js";
4
+ import { Badge } from "./ui/badge.js";
5
+ import { CSSProperties, ComponentProps, ReactNode } from "react";
6
+ //#region src/tool-approval.d.ts
7
+ export type ToolApprovalState = "pending" | "approved" | "denied";
8
+ export type ToolApprovalRiskLevel = "low" | "medium" | "high";
9
+ type ToolApprovalStyleProps<Props> = Omit<Props, "style"> & {
10
+ style?: CSSProperties & ToolApprovalKnobStyle;
11
+ };
12
+ export type ToolApprovalProps = ToolApprovalStyleProps<ComponentProps<"section">> & {
13
+ state?: ToolApprovalState;
14
+ risk?: ToolApprovalRiskLevel;
15
+ onApprove?: () => void;
16
+ onDeny?: () => void;
17
+ autoFocus?: boolean;
18
+ };
19
+ export declare function ToolApproval({ state, risk, onApprove, onDeny, autoFocus, className, children, onKeyDown, ...props }: ToolApprovalProps): import("react").JSX.Element;
20
+ export type ToolApprovalBodyProps = ToolApprovalStyleProps<ComponentProps<"div">>;
21
+ export declare function ToolApprovalBody({ className, ...props }: ToolApprovalBodyProps): import("react").JSX.Element;
22
+ export type ToolApprovalHeaderProps = ToolApprovalStyleProps<ComponentProps<"div">>;
23
+ export declare function ToolApprovalHeader({ className, ...props }: ToolApprovalHeaderProps): import("react").JSX.Element;
24
+ export type ToolApprovalIconProps = ToolApprovalStyleProps<ComponentProps<"span">>;
25
+ export declare function ToolApprovalIcon({ className, children, ...props }: ToolApprovalIconProps): import("react").JSX.Element;
26
+ export type ToolApprovalTitleProps = ToolApprovalStyleProps<ComponentProps<"div">> & {
27
+ render?: RenderProp<ComponentProps<"div">>;
28
+ };
29
+ export declare function ToolApprovalTitle({ render, className, ...props }: ToolApprovalTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
30
+ export type ToolApprovalRiskProps = Omit<ComponentProps<typeof Badge>, "color">;
31
+ export declare function ToolApprovalRisk({ children, ...props }: ToolApprovalRiskProps): import("react").JSX.Element | null;
32
+ export type ToolApprovalStatusProps = ToolApprovalStyleProps<ComponentProps<"div">>;
33
+ export declare function ToolApprovalStatus({ className, children, ...props }: ToolApprovalStatusProps): import("react").JSX.Element | null;
34
+ export type ToolApprovalDescriptionProps = ToolApprovalStyleProps<ComponentProps<"p">>;
35
+ export declare function ToolApprovalDescription({ className, ...props }: ToolApprovalDescriptionProps): import("react").JSX.Element | null;
36
+ export type ToolApprovalPreviewProps = ToolApprovalStyleProps<ComponentProps<"dl">>;
37
+ export declare function ToolApprovalPreview({ className, ...props }: ToolApprovalPreviewProps): import("react").JSX.Element | null;
38
+ export type ToolApprovalFieldProps = Omit<ToolApprovalStyleProps<ComponentProps<"div">>, "children"> & {
39
+ label: ReactNode;
40
+ children: ReactNode;
41
+ };
42
+ export declare function ToolApprovalField({ label, children, className, ...props }: ToolApprovalFieldProps): import("react").JSX.Element;
43
+ export type ToolApprovalFooterProps = ToolApprovalStyleProps<ComponentProps<"div">>;
44
+ export declare function ToolApprovalFooter({ className, ...props }: ToolApprovalFooterProps): import("react").JSX.Element | null;
45
+ export type ToolApprovalDenyProps = ComponentProps<typeof Button>;
46
+ export declare function ToolApprovalDeny({ children, onClick, ...props }: ToolApprovalDenyProps): import("react").JSX.Element;
47
+ export type ToolApprovalApproveProps = ComponentProps<typeof Button>;
48
+ export declare function ToolApprovalApprove({ children, onClick, ...props }: ToolApprovalApproveProps): import("react").JSX.Element;
49
+ //#endregion