@ctrl-ui/react 0.8.4 → 0.8.6

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 (134) hide show
  1. package/dist/audio-visualizer.js +1 -1
  2. package/dist/chat-composer-editor/extensions/mention.js +4 -0
  3. package/dist/chat-layout.d.ts +5 -0
  4. package/dist/chat-layout.js +61 -20
  5. package/dist/chat-message.d.ts +5 -0
  6. package/dist/chat-message.js +19 -2
  7. package/dist/context.js +0 -2
  8. package/dist/email/email-brand.d.ts +60 -0
  9. package/dist/email/email-brand.js +101 -0
  10. package/dist/email/email-code.d.ts +18 -0
  11. package/dist/email/email-code.js +172 -0
  12. package/dist/email/email-footer.d.ts +63 -0
  13. package/dist/email/email-footer.js +98 -0
  14. package/dist/email/email.d.ts +60 -11
  15. package/dist/email/email.js +155 -24
  16. package/dist/email/templates.d.ts +54 -9
  17. package/dist/email/templates.js +314 -116
  18. package/dist/email/theme.d.ts +13 -5
  19. package/dist/email/theme.js +30 -8
  20. package/dist/hooks/use-chat-message.d.ts +1 -0
  21. package/dist/hooks/use-chat-message.js +1 -0
  22. package/dist/hooks/use-chat-thread-scroll.d.ts +8 -0
  23. package/dist/hooks/use-chat-thread-scroll.js +66 -0
  24. package/dist/hooks/use-user-ask.d.ts +6 -4
  25. package/dist/hooks/use-user-ask.js +56 -17
  26. package/dist/inline-attachment.js +1 -1
  27. package/dist/knob-contracts/action-bar-knobs.d.ts +1 -1
  28. package/dist/knob-contracts/action-bar-knobs.js +1 -1
  29. package/dist/knob-contracts/activity-knobs.d.ts +1 -1
  30. package/dist/knob-contracts/activity-knobs.js +2 -1
  31. package/dist/knob-contracts/audio-visualizer-knobs.d.ts +1 -1
  32. package/dist/knob-contracts/audio-visualizer-knobs.js +1 -0
  33. package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +1 -1
  34. package/dist/knob-contracts/chat-composer-attachment-knobs.js +2 -0
  35. package/dist/knob-contracts/chat-composer-knobs.d.ts +1 -1
  36. package/dist/knob-contracts/chat-composer-knobs.js +1 -0
  37. package/dist/knob-contracts/chat-layout-knobs.d.ts +1 -1
  38. package/dist/knob-contracts/chat-layout-knobs.js +2 -1
  39. package/dist/knob-contracts/chat-message-knobs.d.ts +1 -1
  40. package/dist/knob-contracts/chat-message-knobs.js +3 -1
  41. package/dist/knob-contracts/context-knobs.d.ts +1 -1
  42. package/dist/knob-contracts/context-knobs.js +3 -0
  43. package/dist/knob-contracts/inline-attachment-knobs.d.ts +1 -1
  44. package/dist/knob-contracts/inline-attachment-knobs.js +4 -0
  45. package/dist/knob-contracts/inline-citation-knobs.d.ts +1 -1
  46. package/dist/knob-contracts/inline-citation-knobs.js +3 -1
  47. package/dist/knob-contracts/page-layout-knobs.d.ts +4 -0
  48. package/dist/knob-contracts/page-layout-knobs.js +16 -0
  49. package/dist/knob-contracts/table-of-contents-knobs.d.ts +1 -1
  50. package/dist/knob-contracts/table-of-contents-knobs.js +3 -3
  51. package/dist/knob-contracts/task-list-knobs.d.ts +1 -1
  52. package/dist/knob-contracts/task-list-knobs.js +4 -0
  53. package/dist/knob-contracts/user-ask-knobs.d.ts +1 -1
  54. package/dist/knob-contracts/user-ask-knobs.js +4 -0
  55. package/dist/lib/phone-input-format.js +1 -1
  56. package/dist/markdown-block.js +1 -1
  57. package/dist/styles/index.css +2 -1
  58. package/dist/styles/recipes/action-bar.css +37 -5
  59. package/dist/styles/recipes/activity.css +36 -3
  60. package/dist/styles/recipes/alert.css +2 -0
  61. package/dist/styles/recipes/audio-visualizer.css +8 -1
  62. package/dist/styles/recipes/button-group.css +8 -0
  63. package/dist/styles/recipes/button.css +15 -0
  64. package/dist/styles/recipes/calendar.css +21 -0
  65. package/dist/styles/recipes/card.css +2 -0
  66. package/dist/styles/recipes/chat-composer-attachment.css +33 -2
  67. package/dist/styles/recipes/chat-composer.css +16 -2
  68. package/dist/styles/recipes/chat-layout.css +25 -1
  69. package/dist/styles/recipes/chat-message.css +69 -2
  70. package/dist/styles/recipes/choice.css +12 -0
  71. package/dist/styles/recipes/code-diff.css +1 -0
  72. package/dist/styles/recipes/code.css +25 -0
  73. package/dist/styles/recipes/context.css +30 -18
  74. package/dist/styles/recipes/dynamic-notification-input.css +6 -0
  75. package/dist/styles/recipes/dynamic-notification.css +1 -0
  76. package/dist/styles/recipes/environment-variables.css +1 -0
  77. package/dist/styles/recipes/field-parts.css +2 -0
  78. package/dist/styles/recipes/field.css +6 -0
  79. package/dist/styles/recipes/gradient-editor.css +17 -0
  80. package/dist/styles/recipes/inline-attachment.css +57 -14
  81. package/dist/styles/recipes/inline-citation.css +44 -6
  82. package/dist/styles/recipes/item.css +3 -1
  83. package/dist/styles/recipes/markdown-block.css +1 -0
  84. package/dist/styles/recipes/markdown.css +7 -0
  85. package/dist/styles/recipes/page-layout.css +219 -0
  86. package/dist/styles/recipes/pagination.css +16 -0
  87. package/dist/styles/recipes/popup-drawer.css +3 -1
  88. package/dist/styles/recipes/popup-toast.css +2 -0
  89. package/dist/styles/recipes/popup.css +8 -12
  90. package/dist/styles/recipes/range.css +24 -2
  91. package/dist/styles/recipes/rich-tooltip.css +1 -0
  92. package/dist/styles/recipes/source-badge.css +20 -0
  93. package/dist/styles/recipes/table-of-contents.css +10 -10
  94. package/dist/styles/recipes/tabs.css +16 -0
  95. package/dist/styles/recipes/task-list.css +61 -8
  96. package/dist/styles/recipes/thread-rail.css +19 -13
  97. package/dist/styles/recipes/toolbar.css +21 -0
  98. package/dist/styles/recipes/transcript-divider.css +1 -0
  99. package/dist/styles/recipes/user-ask.css +59 -16
  100. package/dist/styles/theme.css +34 -0
  101. package/dist/thread-rail.js +1 -1
  102. package/dist/ui/alert-dialog.js +2 -2
  103. package/dist/ui/autocomplete.js +1 -1
  104. package/dist/ui/color-picker.js +3 -3
  105. package/dist/ui/combobox.js +1 -1
  106. package/dist/ui/command.d.ts +5 -3
  107. package/dist/ui/command.js +27 -3
  108. package/dist/ui/context-menu.js +2 -2
  109. package/dist/ui/dialog.js +2 -2
  110. package/dist/ui/drawer.js +2 -2
  111. package/dist/ui/dropdown-menu.js +1 -1
  112. package/dist/ui/dropzone.js +4 -1
  113. package/dist/ui/gradient-editor.js +2 -2
  114. package/dist/ui/hover-card.js +1 -1
  115. package/dist/ui/infinite-canvas.js +1 -0
  116. package/dist/ui/menubar.js +2 -2
  117. package/dist/ui/navigation-menu.js +1 -1
  118. package/dist/ui/number-field.js +1 -1
  119. package/dist/ui/page-layout.d.ts +44 -0
  120. package/dist/ui/page-layout.js +108 -0
  121. package/dist/ui/phone-input.js +4 -4
  122. package/dist/ui/popover.js +1 -1
  123. package/dist/ui/resizable.js +1 -1
  124. package/dist/ui/rich-tooltip.js +1 -1
  125. package/dist/ui/select.js +1 -1
  126. package/dist/ui/sheet.js +2 -2
  127. package/dist/ui/sidebar-resize-rail.js +1 -1
  128. package/dist/ui/slider.js +1 -1
  129. package/dist/ui/toast.js +2 -2
  130. package/dist/ui/tooltip.js +1 -1
  131. package/dist/ui/trigger-menu.js +1 -1
  132. package/dist/user-ask.d.ts +5 -3
  133. package/dist/user-ask.js +38 -13
  134. package/package.json +3 -2
@@ -1,10 +1,11 @@
1
1
  @layer components {
2
2
  :where([data-control-family="activity"][data-slot="root"]) {
3
- margin-block: calc(var(--spacing) * 1);
4
3
  --cui-activity-row-foreground: var(--muted-foreground);
5
4
  --cui-activity-trigger-hover-background: oklch(from var(--muted) l c h / 0.45);
6
5
  --cui-activity-trigger-radius: var(--radius-control);
7
6
  --cui-activity-code-background: oklch(from var(--muted) l c h / 0.5);
7
+ --cui-activity-code-radius: var(--radius-control);
8
+ margin-block: calc(var(--spacing) * 1);
8
9
  font-size: var(--text-body);
9
10
  }
10
11
 
@@ -36,6 +37,11 @@
36
37
  inline-size: calc(var(--spacing) * 3.5);
37
38
  block-size: calc(var(--spacing) * 3.5);
38
39
  color: oklch(from var(--muted-foreground) l c h / 0.75);
40
+ transition: rotate var(--duration-base) var(--ease-standard);
41
+ }
42
+
43
+ :where([data-control-family="activity"][data-slot="trigger"][data-state="open"] [data-slot="chevron"]) {
44
+ rotate: 90deg;
39
45
  }
40
46
 
41
47
  :where([data-control-family="activity"][data-slot="icon"]) {
@@ -59,7 +65,7 @@
59
65
  }
60
66
 
61
67
  :where([data-control-family="activity"][data-slot="root"][data-activity-state="running"] [data-slot="icon"][data-status-icon] svg) {
62
- animation: spin var(--duration-slow) linear infinite;
68
+ animation: activity-spin calc(var(--duration-slow) * 2) linear infinite;
63
69
  }
64
70
 
65
71
  :where([data-control-family="activity"][data-slot="root"][data-activity-state="error"] [data-slot="icon"]) {
@@ -99,9 +105,30 @@
99
105
  padding-inline: calc(var(--spacing) * 2);
100
106
  padding-block: calc(var(--spacing) * 1.5);
101
107
  background: var(--cui-activity-code-background);
102
- border-radius: var(--radius-control);
108
+ border-radius: var(--cui-activity-code-radius);
103
109
  font-size: var(--text-caption);
104
110
  }
111
+
112
+ @media (pointer: coarse) {
113
+ :where([data-control-family="activity"][data-slot="trigger"]) {
114
+ position: relative;
115
+ }
116
+
117
+ :where([data-control-family="activity"][data-slot="trigger"])::after {
118
+ content: "";
119
+ position: absolute;
120
+ inset: 50% 50%;
121
+ translate: -50% -50%;
122
+ inline-size: 100%;
123
+ block-size: max(100%, 44px);
124
+ }
125
+ }
126
+ }
127
+
128
+ @keyframes activity-spin {
129
+ to {
130
+ rotate: 360deg;
131
+ }
105
132
  }
106
133
 
107
134
  @property --cui-activity-row-foreground {
@@ -127,3 +154,9 @@
127
154
  inherits: true;
128
155
  initial-value: transparent;
129
156
  }
157
+
158
+ @property --cui-activity-code-radius {
159
+ syntax: "<length>";
160
+ inherits: true;
161
+ initial-value: 0px;
162
+ }
@@ -44,6 +44,7 @@
44
44
  color: var(--cui-alert-description-foreground);
45
45
  font-size: var(--cui-alert-font-size);
46
46
  line-height: var(--text-sm--line-height);
47
+ text-wrap: pretty;
47
48
  }
48
49
 
49
50
  :where([data-control-family="alert"][data-slot="description"] p) {
@@ -53,6 +54,7 @@
53
54
  :where([data-control-family="alert"][data-slot="title"]) {
54
55
  font-weight: var(--cui-alert-title-font-weight);
55
56
  letter-spacing: var(--tracking-tight);
57
+ text-wrap: balance;
56
58
  }
57
59
 
58
60
  :where([data-control-family="alert"][data-slot="root"] > svg) {
@@ -2,6 +2,7 @@
2
2
  :where([data-control-family="audio-visualizer"][data-variant]) {
3
3
  --cui-audio-visualizer-radius: var(--radius-control);
4
4
  --cui-audio-visualizer-bar-background: oklch(from var(--primary) l c h / 0.8);
5
+ --cui-audio-visualizer-bar-radius: var(--radius-control);
5
6
  --cui-audio-visualizer-line-fill: oklch(from var(--primary) l c h / 0.18);
6
7
  --cui-audio-visualizer-line-stroke: oklch(from var(--primary) l c h / 0.8);
7
8
  }
@@ -47,7 +48,7 @@
47
48
 
48
49
  :where([data-control-family="audio-visualizer"][data-slot="bar"]) {
49
50
  background: var(--cui-audio-visualizer-bar-background);
50
- border-radius: var(--radius-control);
51
+ border-radius: var(--cui-audio-visualizer-bar-radius);
51
52
  opacity: var(--_audio-visualizer-level-opacity);
52
53
  transition:
53
54
  clip-path var(--duration-base) var(--ease-standard),
@@ -71,6 +72,12 @@
71
72
  initial-value: 0px;
72
73
  }
73
74
 
75
+ @property --cui-audio-visualizer-bar-radius {
76
+ syntax: "<length-percentage>";
77
+ inherits: true;
78
+ initial-value: 0px;
79
+ }
80
+
74
81
  @property --cui-audio-visualizer-bar-background {
75
82
  syntax: "<color>";
76
83
  inherits: true;
@@ -83,6 +83,14 @@
83
83
  :where([data-control-family="button-group"][data-slot="root"] > [data-active="true"]:focus-within) {
84
84
  z-index: 3;
85
85
  }
86
+
87
+ @media (pointer: coarse) {
88
+ :where(
89
+ [data-control-family="button-group"][data-slot="root"][data-orientation="vertical"] [data-control-family="button"][data-size="xs"]
90
+ )::after {
91
+ block-size: 100%;
92
+ }
93
+ }
86
94
  }
87
95
 
88
96
  @property --cui-button-group-text-radius {
@@ -1,4 +1,19 @@
1
1
  @layer components {
2
+ @media (pointer: coarse) {
3
+ :where([data-control-family="button"][data-size="xs"]) {
4
+ position: relative;
5
+ }
6
+
7
+ :where([data-control-family="button"][data-size="xs"])::after {
8
+ content: "";
9
+ position: absolute;
10
+ inset: 50% 50%;
11
+ translate: -50% -50%;
12
+ inline-size: 100%;
13
+ block-size: max(100%, 44px);
14
+ }
15
+ }
16
+
2
17
  :where(
3
18
  [data-control-family="popup"][data-popup-kind="dialog"][data-slot="content"]
4
19
  > [data-control-family="button"][data-popup-part="close"][data-icon-only="true"]
@@ -63,6 +63,7 @@
63
63
  font-size: var(--text-sm);
64
64
  font-weight: var(--font-weight-normal);
65
65
  line-height: 1;
66
+ font-variant-numeric: tabular-nums;
66
67
  }
67
68
 
68
69
  @media (hover: hover) {
@@ -113,6 +114,26 @@
113
114
  margin-block-start: calc(var(--spacing) * 1);
114
115
  border-collapse: collapse;
115
116
  }
117
+
118
+ @media (pointer: coarse) {
119
+ :where([data-control-family="calendar"][data-slot="day"]) {
120
+ min-inline-size: 44px;
121
+ min-block-size: 44px;
122
+ }
123
+
124
+ :where([data-control-family="calendar"][data-slot="nav-button"]) {
125
+ position: relative;
126
+ }
127
+
128
+ :where([data-control-family="calendar"][data-slot="nav-button"])::after {
129
+ content: "";
130
+ position: absolute;
131
+ inset: 50% 50%;
132
+ translate: -50% -50%;
133
+ inline-size: 100%;
134
+ block-size: max(100%, 44px);
135
+ }
136
+ }
116
137
  }
117
138
 
118
139
  @property --cui-calendar-day-radius {
@@ -48,11 +48,13 @@
48
48
  :where([data-control-family="card"][data-slot="title"]) {
49
49
  font-weight: var(--font-weight-semibold);
50
50
  line-height: 1;
51
+ text-wrap: balance;
51
52
  }
52
53
 
53
54
  :where([data-control-family="card"][data-slot="description"]) {
54
55
  color: var(--muted-foreground);
55
56
  font-size: var(--text-body);
57
+ text-wrap: pretty;
56
58
  }
57
59
  }
58
60
 
@@ -1,7 +1,12 @@
1
1
  @layer components {
2
+ :where([data-control-family="chat-composer-attachment"][data-slot="root"]:not([data-variant])) {
3
+ --cui-chat-composer-attachment-list-padding: calc(var(--spacing) * 3);
4
+ }
5
+
2
6
  :where([data-control-family="chat-composer-attachment"][data-slot="root"][data-variant]) {
3
7
  --cui-chat-composer-attachment-background: var(--popover);
4
8
  --cui-chat-composer-attachment-border-color: var(--control-rim);
9
+ --cui-chat-composer-attachment-height: calc(var(--spacing) * 14);
5
10
  --cui-chat-composer-attachment-radius: var(--radius-popover);
6
11
  --cui-chat-composer-attachment-image-outline-color: oklch(from var(--foreground) l c h / 0.1);
7
12
  --cui-chat-composer-attachment-shadow:
@@ -9,7 +14,7 @@
9
14
  --cui-chat-composer-attachment-backdrop-filter: blur(var(--backdrop-blur-popover));
10
15
  --cui-chat-composer-attachment-progress-background: transparent;
11
16
  --cui-chat-composer-attachment-progress-foreground: oklch(from var(--background) l c h / var(--overlay-opacity));
12
- block-size: calc(var(--spacing) * 14);
17
+ block-size: var(--cui-chat-composer-attachment-height);
13
18
  text-align: left;
14
19
  border-radius: var(--cui-chat-composer-attachment-radius);
15
20
  background: var(--cui-chat-composer-attachment-background);
@@ -22,7 +27,20 @@
22
27
 
23
28
  :where([data-control-family="chat-composer-attachment"][data-slot="list"]) {
24
29
  gap: calc(var(--spacing) * 2);
25
- padding: calc(var(--spacing) * 3);
30
+ padding: var(--cui-chat-composer-attachment-list-padding);
31
+ }
32
+
33
+ :where(
34
+ [data-control-family="chat-composer"][data-slot="shell"]
35
+ [data-control-family="chat-composer-attachment"][data-slot="root"][data-variant]
36
+ ) {
37
+ --cui-chat-composer-attachment-radius: max(
38
+ var(--radius-sm),
39
+ min(
40
+ calc(var(--cui-chat-composer-attachment-height) / 2),
41
+ calc(var(--cui-chat-composer-shell-radius) - var(--cui-chat-composer-attachment-list-padding))
42
+ )
43
+ );
26
44
  }
27
45
 
28
46
  :where([data-control-family="chat-composer-attachment"][data-slot="root"][data-variant="preview"]) {
@@ -93,6 +111,7 @@
93
111
  :where([data-control-family="chat-composer-attachment"][data-slot="description"]) {
94
112
  color: var(--muted-foreground);
95
113
  font-size: var(--text-caption);
114
+ font-variant-numeric: tabular-nums;
96
115
  }
97
116
 
98
117
  :where([data-control-family="chat-composer-attachment"][data-slot="description"][data-state="error"]) {
@@ -134,6 +153,18 @@
134
153
  initial-value: 0px;
135
154
  }
136
155
 
156
+ @property --cui-chat-composer-attachment-height {
157
+ syntax: "<length>";
158
+ inherits: true;
159
+ initial-value: 0px;
160
+ }
161
+
162
+ @property --cui-chat-composer-attachment-list-padding {
163
+ syntax: "<length>";
164
+ inherits: true;
165
+ initial-value: 0px;
166
+ }
167
+
137
168
  @property --cui-chat-composer-attachment-background {
138
169
  syntax: "<color>";
139
170
  inherits: true;
@@ -5,12 +5,13 @@
5
5
  --cui-chat-composer-shell-background-image: none;
6
6
  --cui-chat-composer-shell-backdrop-filter: none;
7
7
  --cui-chat-composer-shell-border-color: var(--border);
8
- --cui-chat-composer-shell-border-width: 1px;
8
+ --cui-chat-composer-shell-border-width: var(--control-rim-width);
9
9
  --cui-chat-composer-shell-radius: var(--radius-field);
10
10
  --cui-chat-composer-shell-shadow: var(--shadow-md);
11
11
  --cui-chat-composer-input-foreground: var(--card-foreground);
12
12
  --cui-chat-composer-input-placeholder-foreground: var(--muted-foreground);
13
13
  --cui-chat-composer-mention-radius: var(--radius-popup-item);
14
+ --cui-chat-composer-mention-icon-radius: min(var(--radius-sm), calc(var(--spacing) * 1));
14
15
  --cui-chat-composer-mention-border-color: transparent;
15
16
  --cui-chat-composer-mention-border-width: 0px;
16
17
  --cui-chat-composer-mention-background: oklch(from var(--primary) l c h / 0.1);
@@ -109,13 +110,20 @@
109
110
  :where([data-control-family="chat-composer"][data-slot="mention-icon"]) {
110
111
  inline-size: calc(var(--spacing) * 4);
111
112
  block-size: calc(var(--spacing) * 4);
112
- border-radius: 3px;
113
+ border-radius: var(--cui-chat-composer-mention-icon-radius);
113
114
  }
114
115
 
115
116
  :where([data-control-family="chat-composer"][data-slot="mention-description"]) {
116
117
  font-size: var(--text-micro);
117
118
  color: var(--muted-foreground);
118
119
  }
120
+
121
+ @media (pointer: coarse) {
122
+ :where([data-control-family="chat-composer"]:is([data-slot="textarea"], [data-slot="fallback"], [data-slot="placeholder"])),
123
+ :where([data-control-family="chat-composer"][data-slot="editor"] .ProseMirror) {
124
+ font-size: max(16px, var(--text-sm));
125
+ }
126
+ }
119
127
  }
120
128
 
121
129
  @property --cui-chat-composer-root-background {
@@ -187,6 +195,12 @@
187
195
  initial-value: 0px;
188
196
  }
189
197
 
198
+ @property --cui-chat-composer-mention-icon-radius {
199
+ syntax: "<length>";
200
+ inherits: true;
201
+ initial-value: 0px;
202
+ }
203
+
190
204
  @property --cui-chat-composer-mention-border-color {
191
205
  syntax: "<color>";
192
206
  inherits: true;
@@ -3,8 +3,9 @@
3
3
  --cui-chat-layout-radius: var(--radius-scene);
4
4
  --cui-chat-layout-background: var(--background);
5
5
  --cui-chat-layout-border-color: var(--border);
6
- --cui-chat-layout-border-width: 1px;
6
+ --cui-chat-layout-border-width: var(--control-rim-width);
7
7
  --cui-chat-layout-shadow: var(--shadow-md);
8
+ --cui-chat-layout-scroll-button-gap: calc(var(--spacing) * 3);
8
9
  background: var(--cui-chat-layout-background);
9
10
  }
10
11
 
@@ -35,6 +36,23 @@
35
36
  background: var(--cui-chat-layout-background);
36
37
  mask-image: linear-gradient(to bottom, transparent, oklch(0 0 0 / 0.7) calc(var(--scroll-fade-size) * 3));
37
38
  }
39
+
40
+ :where([data-control-family="chat-layout"][data-slot="scroll-anchor"]) {
41
+ position: absolute;
42
+ inset-block-end: calc(100% + var(--cui-chat-layout-scroll-button-gap));
43
+ inset-inline: 0;
44
+ margin-inline: auto;
45
+ inline-size: fit-content;
46
+ transition-property: opacity, scale, visibility;
47
+ transition-duration: var(--duration-base);
48
+ transition-timing-function: var(--ease-emphasized);
49
+ }
50
+
51
+ :where([data-control-family="chat-layout"][data-slot="scroll-anchor"][data-hidden]) {
52
+ opacity: 0;
53
+ scale: 0.9;
54
+ visibility: hidden;
55
+ }
38
56
  }
39
57
 
40
58
  @property --cui-chat-layout-radius {
@@ -65,3 +83,9 @@
65
83
  syntax: "*";
66
84
  inherits: true;
67
85
  }
86
+
87
+ @property --cui-chat-layout-scroll-button-gap {
88
+ syntax: "<length>";
89
+ inherits: true;
90
+ initial-value: 0px;
91
+ }
@@ -3,7 +3,7 @@
3
3
  --cui-chat-message-avatar-radius: 9999px;
4
4
  --cui-chat-message-avatar-background: var(--card);
5
5
  --cui-chat-message-avatar-border-color: var(--border);
6
- --cui-chat-message-avatar-border-width: 1px;
6
+ --cui-chat-message-avatar-border-width: var(--control-rim-width);
7
7
  --cui-chat-message-radius: 0px;
8
8
  --cui-chat-message-corner-radius: 0px;
9
9
  --cui-chat-message-background: transparent;
@@ -12,7 +12,58 @@
12
12
  --cui-chat-message-border-color: transparent;
13
13
  --cui-chat-message-border-width: 0px;
14
14
  --cui-chat-message-shadow: none;
15
+ --cui-chat-message-pending-dot-color: var(--muted-foreground);
16
+ --cui-chat-message-pending-dot-size: calc(var(--spacing) * 1.5);
15
17
  }
18
+
19
+ :where([data-control-family="chat-message"][data-slot="pending"]) {
20
+ gap: var(--cui-chat-message-pending-dot-size);
21
+ padding-block: calc(var(--spacing) * 2);
22
+ }
23
+
24
+ :where([data-control-family="chat-message"][data-slot="pending"] > span) {
25
+ inline-size: var(--cui-chat-message-pending-dot-size);
26
+ block-size: var(--cui-chat-message-pending-dot-size);
27
+ border-radius: 9999px;
28
+ background: var(--cui-chat-message-pending-dot-color);
29
+ animation: chat-message-pending calc(var(--duration-slow) * 3) var(--ease-standard) infinite;
30
+ }
31
+
32
+ :where([data-control-family="chat-message"][data-slot="pending"] > span:nth-child(2)) {
33
+ animation-delay: calc(var(--duration-slow) / 2);
34
+ }
35
+
36
+ :where([data-control-family="chat-message"][data-slot="pending"] > span:nth-child(3)) {
37
+ animation-delay: var(--duration-slow);
38
+ }
39
+
40
+ @media (prefers-reduced-motion: reduce) {
41
+ :where([data-control-family="chat-message"][data-slot="pending"] > span) {
42
+ animation: none;
43
+ opacity: 1;
44
+ scale: 1;
45
+ }
46
+ }
47
+
48
+ :where([data-motion="reduced"] [data-control-family="chat-message"][data-slot="pending"] > span) {
49
+ animation: none;
50
+ opacity: 1;
51
+ scale: 1;
52
+ }
53
+
54
+ @keyframes chat-message-pending {
55
+ 0%,
56
+ 60%,
57
+ 100% {
58
+ opacity: 0.3;
59
+ scale: 0.75;
60
+ }
61
+ 30% {
62
+ opacity: 1;
63
+ scale: 1;
64
+ }
65
+ }
66
+
16
67
  :where([data-control-family="chat-message"][data-slot="row"]) {
17
68
  gap: calc(var(--spacing) * 2);
18
69
  padding-block: calc(var(--spacing) * 2);
@@ -70,9 +121,12 @@
70
121
  margin-block-start: calc(var(--spacing) * 1);
71
122
  gap: calc(var(--spacing) * 1);
72
123
  opacity: 1;
124
+ transition-property: opacity;
125
+ transition-duration: var(--duration-fast);
126
+ transition-timing-function: var(--ease-standard);
73
127
  }
74
128
 
75
- @media (hover: hover) {
129
+ @media (hover: hover) and (pointer: fine) {
76
130
  :where([data-control-family="chat-message"][data-slot="actions"]) {
77
131
  opacity: 0;
78
132
  }
@@ -92,6 +146,7 @@
92
146
  padding-inline: calc(var(--spacing) * 1);
93
147
  font-size: var(--text-caption);
94
148
  color: var(--muted-foreground);
149
+ font-variant-numeric: tabular-nums;
95
150
  }
96
151
  }
97
152
 
@@ -164,3 +219,15 @@
164
219
  syntax: "*";
165
220
  inherits: true;
166
221
  }
222
+
223
+ @property --cui-chat-message-pending-dot-color {
224
+ syntax: "<color>";
225
+ inherits: true;
226
+ initial-value: transparent;
227
+ }
228
+
229
+ @property --cui-chat-message-pending-dot-size {
230
+ syntax: "<length>";
231
+ inherits: true;
232
+ initial-value: 0px;
233
+ }
@@ -82,6 +82,18 @@
82
82
  :where([data-control-family="choice"][data-choice-kind="checkbox"][data-slot="root"]) {
83
83
  outline-style: none;
84
84
  }
85
+
86
+ @media (pointer: coarse) {
87
+ :where([data-control-family="choice"][data-choice-kind="checkbox"][data-slot="root"])::after,
88
+ :where([data-control-family="choice"][data-choice-kind="radio-group"][data-slot="item"])::after {
89
+ content: "";
90
+ position: absolute;
91
+ inset: 50% 50%;
92
+ translate: -50% -50%;
93
+ inline-size: max(100%, 44px);
94
+ block-size: max(100%, 44px);
95
+ }
96
+ }
85
97
  }
86
98
 
87
99
  @property --cui-choice-radius {
@@ -167,6 +167,7 @@
167
167
 
168
168
  :where([data-control-family="code-diff"][data-slot="title"]) {
169
169
  font-family: var(--font-mono);
170
+ font-variant-numeric: tabular-nums;
170
171
  }
171
172
 
172
173
  :where([data-control-family="code-diff"][data-slot="file-title"]) {
@@ -108,6 +108,31 @@
108
108
  text-align: right;
109
109
  font-variant-numeric: tabular-nums;
110
110
  }
111
+
112
+ @media (pointer: coarse) {
113
+ :where([data-control-family="code"][data-slot="editor"]) {
114
+ font-size: max(16px, var(--text-label));
115
+ }
116
+
117
+ :where([data-control-family="code"][data-slot="header"]) {
118
+ min-block-size: 44px;
119
+ }
120
+
121
+ :where([data-control-family="code"][data-slot="actions"] [data-control-family="button"]),
122
+ :where([data-control-family="button"][data-code-copy="true"]) {
123
+ position: relative;
124
+ }
125
+
126
+ :where([data-control-family="code"][data-slot="actions"] [data-control-family="button"])::after,
127
+ :where([data-control-family="button"][data-code-copy="true"])::after {
128
+ content: "";
129
+ position: absolute;
130
+ inset: 50% 50%;
131
+ translate: -50% -50%;
132
+ inline-size: 100%;
133
+ block-size: max(100%, 44px);
134
+ }
135
+ }
111
136
  }
112
137
 
113
138
  @property --cui-code-radius {
@@ -2,12 +2,15 @@
2
2
  :where([data-control-family="context"][data-slot="root"]),
3
3
  :where([data-control-family="context"][data-slot="content"]) {
4
4
  --cui-context-graph-radius: 9999px;
5
+ --cui-context-legend-indicator-radius: 9999px;
5
6
  --cui-context-limit-marker-color: var(--destructive-text);
6
7
  --cui-context-overage-fill: oklch(from var(--destructive-text) l c h / 0.22);
7
8
  --cui-context-track-fill: var(--muted);
9
+ --cui-context-segment-cache-fill: oklch(from var(--muted-foreground) l c h / 0.55);
8
10
  --cui-context-segment-message-fill: oklch(from var(--primary) l c h / 0.65);
9
11
  --cui-context-segment-reasoning-fill: oklch(from var(--foreground) l c h / 0.5);
10
12
  --cui-context-segment-source-fill: oklch(from var(--accent-foreground) l c h / 0.65);
13
+ --cui-context-segment-system-fill: oklch(from var(--foreground) l c h / 0.75);
11
14
  --cui-context-segment-tool-fill: var(--primary);
12
15
  }
13
16
 
@@ -34,19 +37,7 @@
34
37
  }
35
38
 
36
39
  :where([data-control-family="context"][data-slot="trigger-label"]) {
37
- max-inline-size: 0;
38
- opacity: 0;
39
- transition-property: max-width, opacity;
40
- transition-duration: var(--duration-fast);
41
- transition-timing-function: var(--ease-standard);
42
- }
43
-
44
- :where(
45
- [data-context-trigger-button="true"]:is(:hover, :focus-visible, [data-popup-open])
46
- [data-control-family="context"][data-slot="trigger-label"]
47
- ) {
48
- max-inline-size: calc(var(--spacing) * 32);
49
- opacity: 1;
40
+ font-variant-numeric: tabular-nums;
50
41
  }
51
42
 
52
43
  :where([data-control-family="context"][data-slot="content-grid"]) {
@@ -72,16 +63,19 @@
72
63
  :where([data-control-family="context"][data-slot="title"]) {
73
64
  font-size: var(--text-sm);
74
65
  font-weight: var(--font-weight-medium);
66
+ text-wrap: balance;
75
67
  }
76
68
 
77
69
  :where([data-control-family="context"][data-slot="description"]) {
78
70
  color: var(--muted-foreground);
79
71
  font-size: var(--text-caption);
72
+ text-wrap: pretty;
80
73
  }
81
74
 
82
75
  :where([data-control-family="context"][data-slot="summary"]) {
83
76
  gap: calc(var(--spacing) * 3);
84
77
  font-size: var(--text-sm);
78
+ font-variant-numeric: tabular-nums;
85
79
  }
86
80
 
87
81
  :where([data-control-family="context"][data-slot="summary-value"]) {
@@ -103,7 +97,7 @@
103
97
  }
104
98
 
105
99
  :where([data-control-family="context"][data-slot="segment"][data-kind="system"]) {
106
- fill: oklch(from var(--foreground) l c h / 0.75);
100
+ fill: var(--cui-context-segment-system-fill);
107
101
  }
108
102
 
109
103
  :where([data-control-family="context"][data-slot="segment"][data-kind="tool"]) {
@@ -123,7 +117,7 @@
123
117
  }
124
118
 
125
119
  :where([data-control-family="context"][data-slot="segment"][data-kind="cache"]) {
126
- fill: oklch(from var(--muted-foreground) l c h / 0.55);
120
+ fill: var(--cui-context-segment-cache-fill);
127
121
  }
128
122
 
129
123
  :where([data-control-family="context"][data-slot="overage"]) {
@@ -138,12 +132,12 @@
138
132
  margin-block-start: calc(var(--spacing) * 1);
139
133
  inline-size: calc(var(--spacing) * 2.5);
140
134
  block-size: calc(var(--spacing) * 2.5);
141
- border-radius: 9999px;
135
+ border-radius: var(--cui-context-legend-indicator-radius);
142
136
  background: var(--border);
143
137
  }
144
138
 
145
139
  :where([data-control-family="context"][data-slot="legend-indicator"][data-kind="system"]) {
146
- background: oklch(from var(--foreground) l c h / 0.75);
140
+ background: var(--cui-context-segment-system-fill);
147
141
  }
148
142
 
149
143
  :where([data-control-family="context"][data-slot="legend-indicator"][data-kind="tool"]) {
@@ -163,7 +157,7 @@
163
157
  }
164
158
 
165
159
  :where([data-control-family="context"][data-slot="legend-indicator"][data-kind="cache"]) {
166
- background: oklch(from var(--muted-foreground) l c h / 0.55);
160
+ background: var(--cui-context-segment-cache-fill);
167
161
  }
168
162
 
169
163
  :where([data-control-family="context"][data-slot="legend-item"][data-tone="available"] [data-slot="legend-indicator"]) {
@@ -194,6 +188,24 @@
194
188
  initial-value: 0px;
195
189
  }
196
190
 
191
+ @property --cui-context-legend-indicator-radius {
192
+ syntax: "<length>";
193
+ inherits: true;
194
+ initial-value: 0px;
195
+ }
196
+
197
+ @property --cui-context-segment-system-fill {
198
+ syntax: "<color>";
199
+ inherits: true;
200
+ initial-value: transparent;
201
+ }
202
+
203
+ @property --cui-context-segment-cache-fill {
204
+ syntax: "<color>";
205
+ inherits: true;
206
+ initial-value: transparent;
207
+ }
208
+
197
209
  @property --cui-context-track-fill {
198
210
  syntax: "<color>";
199
211
  inherits: true;
@@ -26,4 +26,10 @@
26
26
  :where([data-control-family="button"][data-dynamic-notification-close="true"]:hover) {
27
27
  color: inherit;
28
28
  }
29
+
30
+ @media (pointer: coarse) {
31
+ :where([data-control-family="dynamic-notification"][data-slot="reply-input"]) {
32
+ font-size: max(16px, var(--text-body));
33
+ }
34
+ }
29
35
  }
@@ -144,6 +144,7 @@
144
144
  opacity: 0.55;
145
145
  font-weight: var(--font-weight-medium);
146
146
  letter-spacing: var(--tracking-wide);
147
+ text-wrap: balance;
147
148
  }
148
149
 
149
150
  :where([data-control-family="dynamic-notification"][data-slot="message"]) {