@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
@@ -53,6 +53,7 @@
53
53
  color: var(--cui-environment-variables-title-foreground);
54
54
  font-size: var(--text-label);
55
55
  font-weight: var(--font-weight-semibold);
56
+ text-wrap: balance;
56
57
  }
57
58
 
58
59
  :where(
@@ -100,6 +100,7 @@
100
100
  color: var(--foreground);
101
101
  font-size: var(--text-label);
102
102
  font-weight: var(--font-weight-medium);
103
+ text-wrap: balance;
103
104
  }
104
105
 
105
106
  :where([data-control-family="field"][data-field-kind="field"][data-slot="label"]) {
@@ -115,6 +116,7 @@
115
116
  :where([data-control-family="field"][data-field-kind="field"][data-slot="description"]) {
116
117
  color: var(--muted-foreground);
117
118
  font-size: var(--text-caption);
119
+ text-wrap: pretty;
118
120
  }
119
121
 
120
122
  :where([data-control-family="field"][data-field-kind="field"][data-slot="error"]) {
@@ -172,6 +172,12 @@
172
172
  :where([data-control-family="field"][data-field-kind="phone-input"][data-slot="input"]) {
173
173
  padding-inline: calc(var(--spacing) * 3);
174
174
  }
175
+
176
+ @media (pointer: coarse) {
177
+ :where([data-control-family="field"]:is(input, textarea)) {
178
+ font-size: max(16px, var(--cui-field-font-size));
179
+ }
180
+ }
175
181
  }
176
182
 
177
183
  @property --cui-field-radius {
@@ -24,6 +24,7 @@
24
24
 
25
25
  :where([data-control-family="gradient-editor"][data-slot="track"]) {
26
26
  block-size: calc(var(--spacing) * 6);
27
+ touch-action: pan-y;
27
28
  border: 0;
28
29
  border-radius: var(--cui-gradient-editor-track-radius);
29
30
  box-shadow: inset 0 0 0 1px oklch(from var(--border) l c h / 0.6);
@@ -32,6 +33,7 @@
32
33
  :where([data-control-family="gradient-editor"][data-slot="stop"]) {
33
34
  inline-size: calc(var(--spacing) * 5);
34
35
  block-size: calc(var(--spacing) * 5);
36
+ touch-action: pan-y;
35
37
  border: var(--cui-gradient-editor-stop-border-width) solid var(--cui-gradient-editor-stop-border-color);
36
38
  border-radius: var(--cui-gradient-editor-stop-radius);
37
39
  box-shadow: var(--cui-gradient-editor-stop-shadow);
@@ -58,6 +60,21 @@
58
60
  :where([data-control-family="gradient-editor"][data-slot="stop"][data-selected="true"]) {
59
61
  scale: 115% 115%;
60
62
  }
63
+
64
+ @media (pointer: coarse) {
65
+ :where([data-control-family="gradient-editor"][data-slot="stop-add"]) {
66
+ position: relative;
67
+ }
68
+
69
+ :where([data-control-family="gradient-editor"][data-slot="stop-add"])::after {
70
+ content: "";
71
+ position: absolute;
72
+ inset: 50% 50%;
73
+ translate: -50% -50%;
74
+ inline-size: max(100%, 44px);
75
+ block-size: max(100%, 44px);
76
+ }
77
+ }
61
78
  }
62
79
 
63
80
  @property --cui-gradient-editor-preview-radius {
@@ -1,33 +1,49 @@
1
1
  @layer components {
2
2
  :where([data-control-family="inline-attachment"][data-slot="root"]) {
3
- --cui-inline-attachment-background: var(--muted);
3
+ --cui-inline-attachment-background: var(--card);
4
4
  --cui-inline-attachment-hover-shadow: var(--shadow-md);
5
- --cui-inline-attachment-radius: var(--radius-scene);
5
+ --cui-inline-attachment-padding: calc(var(--spacing) * 3);
6
+ --cui-inline-attachment-radius: var(--radius-field);
6
7
  --cui-inline-attachment-ring-color: var(--border);
7
8
  --cui-inline-attachment-image-outline-color: oklch(from var(--foreground) l c h / 0.1);
8
9
  --cui-inline-attachment-shadow: var(--shadow-sm);
9
10
  --cui-inline-attachment-content-background: oklch(from var(--background) l c h / 0.85);
10
11
  --cui-inline-attachment-content-foreground: var(--foreground);
11
- --cui-inline-attachment-content-radius: var(--radius-control);
12
+ --cui-inline-attachment-content-radius: max(
13
+ var(--radius-sm),
14
+ calc(var(--cui-inline-attachment-radius) - var(--cui-inline-attachment-padding))
15
+ );
12
16
  --cui-inline-attachment-content-shadow: var(--shadow-sm);
17
+ --cui-inline-attachment-document-padding: calc(var(--spacing) * 5);
18
+ --cui-inline-attachment-document-background: var(--muted);
19
+ --cui-inline-attachment-document-background-image: none;
13
20
  border-radius: var(--cui-inline-attachment-radius);
14
21
  background: var(--cui-inline-attachment-background);
15
22
  box-shadow:
16
- inset 0 0 0 1px var(--cui-inline-attachment-ring-color),
23
+ inset 0 0 0 var(--control-rim-width) var(--cui-inline-attachment-ring-color),
17
24
  var(--cui-inline-attachment-shadow);
18
25
  text-align: left;
26
+ transition-property: box-shadow;
27
+ transition-duration: var(--duration-fast);
28
+ transition-timing-function: var(--ease-standard);
29
+ }
30
+
31
+ :where([data-control-family="inline-attachment"][data-slot="root"]:focus-visible) {
32
+ box-shadow:
33
+ inset 0 0 0 var(--control-rim-width) var(--cui-inline-attachment-ring-color),
34
+ var(--cui-inline-attachment-hover-shadow);
19
35
  }
20
36
 
21
37
  @media (hover: hover) {
22
38
  :where([data-control-family="inline-attachment"][data-slot="root"]:hover) {
23
39
  box-shadow:
24
- inset 0 0 0 1px var(--cui-inline-attachment-ring-color),
40
+ inset 0 0 0 var(--control-rim-width) var(--cui-inline-attachment-ring-color),
25
41
  var(--cui-inline-attachment-hover-shadow);
26
42
  }
27
43
 
28
44
  :where([data-control-family="inline-attachment"][data-slot="root"]:disabled:hover) {
29
45
  box-shadow:
30
- inset 0 0 0 1px var(--cui-inline-attachment-ring-color),
46
+ inset 0 0 0 var(--control-rim-width) var(--cui-inline-attachment-ring-color),
31
47
  var(--cui-inline-attachment-shadow);
32
48
  }
33
49
  }
@@ -38,21 +54,22 @@
38
54
 
39
55
  :where([data-control-family="inline-attachment"][data-slot="media-image"]) {
40
56
  border-radius: inherit;
41
- outline: 1px solid var(--cui-inline-attachment-image-outline-color);
42
- outline-offset: -1px;
57
+ outline: var(--control-rim-width) solid var(--cui-inline-attachment-image-outline-color);
58
+ outline-offset: calc(var(--control-rim-width) * -1);
43
59
  }
44
60
 
45
61
  :where([data-control-family="inline-attachment"][data-slot="document"]) {
46
- padding: calc(var(--spacing) * 5);
47
- background: linear-gradient(135deg in srgb, var(--color-slate-50) 0%, var(--color-zinc-100) 46%, var(--color-stone-200) 100%);
62
+ padding: var(--cui-inline-attachment-document-padding);
63
+ background: var(--cui-inline-attachment-document-background);
64
+ background-image: var(--cui-inline-attachment-document-background-image);
48
65
  }
49
66
 
50
67
  :where([data-control-family="inline-attachment"][data-slot="document-sheet"]) {
51
68
  padding: calc(var(--spacing) * 4);
52
- border-radius: 1rem;
69
+ border-radius: max(0px, calc(var(--cui-inline-attachment-radius) - var(--cui-inline-attachment-document-padding)));
53
70
  background: oklch(from var(--card) l c h / 0.78);
54
71
  box-shadow:
55
- inset 0 0 0 1px oklch(from var(--foreground) l c h / 0.1),
72
+ inset 0 0 0 var(--control-rim-width) oklch(from var(--foreground) l c h / 0.1),
56
73
  var(--shadow-sm);
57
74
  }
58
75
 
@@ -94,11 +111,13 @@
94
111
  margin-block-start: calc(var(--spacing) * 5);
95
112
  block-size: calc(var(--spacing) * 9);
96
113
  inline-size: calc(var(--spacing) * 24);
97
- border: 1px dashed oklch(from var(--foreground) l c h / 0.18);
98
- border-radius: 0.75rem;
114
+ border: var(--control-rim-width) dashed oklch(from var(--foreground) l c h / 0.18);
115
+ border-radius: var(--radius-control);
99
116
  }
100
117
 
101
118
  :where([data-control-family="inline-attachment"][data-slot="content"]) {
119
+ inset-inline: var(--cui-inline-attachment-padding);
120
+ inset-block-end: var(--cui-inline-attachment-padding);
102
121
  padding-inline: calc(var(--spacing) * 3);
103
122
  padding-block: calc(var(--spacing) * 1);
104
123
  border-radius: var(--cui-inline-attachment-content-radius);
@@ -112,6 +131,7 @@
112
131
 
113
132
  :where([data-control-family="inline-attachment"][data-slot="description"]) {
114
133
  font-size: var(--text-micro);
134
+ font-variant-numeric: tabular-nums;
115
135
  opacity: 0.65;
116
136
  }
117
137
 
@@ -147,6 +167,29 @@
147
167
  initial-value: transparent;
148
168
  }
149
169
 
170
+ @property --cui-inline-attachment-padding {
171
+ syntax: "<length>";
172
+ inherits: true;
173
+ initial-value: 0px;
174
+ }
175
+
176
+ @property --cui-inline-attachment-document-padding {
177
+ syntax: "<length>";
178
+ inherits: true;
179
+ initial-value: 0px;
180
+ }
181
+
182
+ @property --cui-inline-attachment-document-background {
183
+ syntax: "<color>";
184
+ inherits: true;
185
+ initial-value: transparent;
186
+ }
187
+
188
+ @property --cui-inline-attachment-document-background-image {
189
+ syntax: "*";
190
+ inherits: true;
191
+ }
192
+
150
193
  @property --cui-inline-attachment-shadow {
151
194
  syntax: "*";
152
195
  inherits: true;
@@ -1,6 +1,8 @@
1
1
  @layer components {
2
2
  :where([data-control-family="inline-citation"][data-slot="root"]),
3
3
  :where([data-control-ui="inline-citation"][data-slot="content"]) {
4
+ --cui-inline-citation-favicon-background: var(--muted);
5
+ --cui-inline-citation-favicon-radius: 9999px;
4
6
  --cui-inline-citation-navigation-background: oklch(from var(--muted) l c h / 0.45);
5
7
  --cui-inline-citation-quote-background: oklch(from var(--muted) l c h / 0.55);
6
8
  --cui-inline-citation-quote-radius: var(--radius-control);
@@ -34,19 +36,39 @@
34
36
  }
35
37
  }
36
38
 
39
+ :where([data-control-family="inline-citation"][data-slot="trigger"]:focus-visible) {
40
+ background: var(--cui-inline-citation-trigger-hover-background);
41
+ color: var(--cui-inline-citation-trigger-hover-foreground);
42
+ }
43
+
44
+ @media (pointer: coarse) {
45
+ :where([data-control-family="inline-citation"][data-slot="trigger"]) {
46
+ position: relative;
47
+ }
48
+
49
+ :where([data-control-family="inline-citation"][data-slot="trigger"])::after {
50
+ content: "";
51
+ position: absolute;
52
+ inset: 50% 50%;
53
+ translate: -50% -50%;
54
+ inline-size: 100%;
55
+ block-size: max(100%, 44px);
56
+ }
57
+ }
58
+
37
59
  :where([data-control-ui="inline-citation"][data-slot="favicon"]) {
38
60
  inline-size: calc(var(--spacing) * 3.5);
39
61
  block-size: calc(var(--spacing) * 3.5);
40
- border: 1px solid var(--background);
41
- border-radius: 9999px;
42
- background: var(--muted);
62
+ border: var(--control-rim-width) solid var(--background);
63
+ border-radius: var(--cui-inline-citation-favicon-radius);
64
+ background: var(--cui-inline-citation-favicon-background);
43
65
  }
44
66
 
45
67
  :where([data-control-family="inline-citation"][data-slot="navigation"]) {
46
68
  min-block-size: calc(var(--spacing) * 10);
47
69
  gap: calc(var(--spacing) * 1);
48
70
  padding-inline: calc(var(--spacing) * 2);
49
- border-bottom: 1px solid var(--border);
71
+ border-bottom: var(--control-rim-width) solid var(--border);
50
72
  background: var(--cui-inline-citation-navigation-background);
51
73
  }
52
74
 
@@ -74,8 +96,8 @@
74
96
  :where([data-control-ui="inline-citation"][data-slot="source-favicon"]) {
75
97
  inline-size: calc(var(--spacing) * 5);
76
98
  block-size: calc(var(--spacing) * 5);
77
- border-radius: 9999px;
78
- background: var(--muted);
99
+ border-radius: var(--cui-inline-citation-favicon-radius);
100
+ background: var(--cui-inline-citation-favicon-background);
79
101
  }
80
102
 
81
103
  :where([data-control-family="inline-citation"][data-slot="source-title"]) {
@@ -115,6 +137,10 @@
115
137
  padding-inline: calc(var(--spacing) * 1);
116
138
  font-variant-numeric: tabular-nums;
117
139
  }
140
+
141
+ :where([data-control-family="inline-citation"][data-slot="label"]) {
142
+ font-variant-numeric: tabular-nums;
143
+ }
118
144
  }
119
145
 
120
146
  @property --cui-inline-citation-trigger-radius {
@@ -176,3 +202,15 @@
176
202
  inherits: true;
177
203
  initial-value: 0px;
178
204
  }
205
+
206
+ @property --cui-inline-citation-favicon-background {
207
+ syntax: "<color>";
208
+ inherits: true;
209
+ initial-value: transparent;
210
+ }
211
+
212
+ @property --cui-inline-citation-favicon-radius {
213
+ syntax: "<length-percentage>";
214
+ inherits: true;
215
+ initial-value: 0px;
216
+ }
@@ -4,7 +4,7 @@
4
4
  --cui-item-hover-background: transparent;
5
5
  --cui-item-hover-border-color: var(--_item-border-color);
6
6
  --cui-item-border-width: 0px;
7
- --cui-item-active-scale: 1;
7
+ --cui-item-active-scale: 0.99;
8
8
  --_item-background: transparent;
9
9
  --_item-border-color: transparent;
10
10
  outline: var(--cui-item-border-width) solid var(--_item-border-color);
@@ -61,6 +61,7 @@
61
61
  font-size: var(--text-sm);
62
62
  line-height: var(--leading-relaxed);
63
63
  color: var(--muted-foreground);
64
+ text-wrap: pretty;
64
65
  }
65
66
 
66
67
  :where([data-control-family="item"][data-slot="title"]) {
@@ -69,6 +70,7 @@
69
70
  font-weight: var(--font-weight-medium);
70
71
  line-height: 1;
71
72
  color: var(--foreground);
73
+ text-wrap: balance;
72
74
  }
73
75
 
74
76
  :where([data-control-family="item"][data-slot="media"]) {
@@ -26,6 +26,7 @@
26
26
  gap: calc(var(--spacing) * 2);
27
27
  font-size: var(--text-sm);
28
28
  font-weight: var(--font-weight-medium);
29
+ text-wrap: balance;
29
30
  }
30
31
 
31
32
  :where([data-control-family="markdown-block"][data-slot="content"]) {
@@ -89,6 +89,7 @@
89
89
  :where([data-control-family="markdown"][data-slot="paragraph"]) {
90
90
  margin-block: calc(var(--spacing) * 3);
91
91
  line-height: calc(var(--spacing) * 7);
92
+ text-wrap: pretty;
92
93
  }
93
94
 
94
95
  :where([data-control-family="markdown"][data-slot="h3"]) {
@@ -97,6 +98,8 @@
97
98
  font-size: var(--text-base);
98
99
  line-height: var(--text-base--line-height);
99
100
  color: var(--foreground);
101
+ text-wrap: balance;
102
+ scroll-margin-block-start: calc(var(--spacing) * 6);
100
103
  }
101
104
 
102
105
  :where([data-control-family="markdown"][data-slot="h2"]) {
@@ -104,6 +107,8 @@
104
107
  font-size: var(--text-lg);
105
108
  line-height: var(--text-lg--line-height);
106
109
  color: var(--foreground);
110
+ text-wrap: balance;
111
+ scroll-margin-block-start: calc(var(--spacing) * 6);
107
112
  }
108
113
 
109
114
  :where([data-control-family="markdown"][data-slot="h1"]) {
@@ -111,6 +116,8 @@
111
116
  font-size: var(--text-xl);
112
117
  line-height: var(--text-xl--line-height);
113
118
  color: var(--foreground);
119
+ text-wrap: balance;
120
+ scroll-margin-block-start: calc(var(--spacing) * 6);
114
121
  }
115
122
 
116
123
  :where([data-control-family="markdown"][data-slot="h1"]),
@@ -0,0 +1,219 @@
1
+ @layer components {
2
+ :where([data-control-family="page-layout"][data-slot="root"]) {
3
+ --cui-page-layout-article-size: 40rem;
4
+ --cui-page-layout-aside-size: 11.25rem;
5
+ --cui-page-layout-padding-inline: calc(var(--spacing) * 5);
6
+ --cui-page-layout-padding-block: calc(var(--spacing) * 10) calc(var(--spacing) * 24);
7
+ --cui-page-layout-column-gap: calc(var(--spacing) * 5);
8
+ --cui-page-layout-header-start-gap: calc(var(--spacing) * 10);
9
+ --cui-page-layout-header-gap: calc(var(--spacing) * 8);
10
+ --cui-page-layout-header-column-gap: calc(var(--spacing) * 4);
11
+ --cui-page-layout-header-row-gap: calc(var(--spacing) * 2);
12
+ --cui-page-layout-sticky-gap: 0px;
13
+
14
+ /* Header and body both read this, so they stop at the same right edge. */
15
+ --cui-page-layout-size: calc(var(--cui-page-layout-article-size) + var(--cui-page-layout-padding-inline) * 2);
16
+ }
17
+
18
+ :where([data-control-family="page-layout"][data-slot="root"][data-width="content"]) {
19
+ --cui-page-layout-article-size: 48rem;
20
+ }
21
+
22
+ :where([data-control-family="page-layout"][data-slot="root"][data-width="wide"]) {
23
+ --cui-page-layout-article-size: 80rem;
24
+ }
25
+
26
+ :where([data-control-family="page-layout"][data-slot="root"][data-width="full"]) {
27
+ --cui-page-layout-size: none;
28
+ --cui-page-layout-padding-inline: calc(var(--spacing) * 6);
29
+ }
30
+
31
+ :where([data-control-family="page-layout"][data-slot="header"]) {
32
+ display: grid;
33
+ grid-template-columns: minmax(0, 1fr);
34
+ grid-template-areas: "title" "description" "actions";
35
+ align-items: center;
36
+ width: 100%;
37
+ max-width: var(--cui-page-layout-size);
38
+ margin-inline: auto;
39
+ column-gap: var(--cui-page-layout-header-column-gap);
40
+ row-gap: var(--cui-page-layout-header-row-gap);
41
+ padding-inline: var(--cui-page-layout-padding-inline);
42
+ padding-block: var(--cui-page-layout-header-start-gap) var(--cui-page-layout-header-gap);
43
+ }
44
+
45
+ :where([data-control-family="page-layout"][data-slot="body"]) {
46
+ display: grid;
47
+ grid-template-columns: minmax(0, 1fr);
48
+ width: 100%;
49
+ max-width: var(--cui-page-layout-size);
50
+ margin-inline: auto;
51
+ gap: var(--cui-page-layout-column-gap);
52
+ padding-inline: var(--cui-page-layout-padding-inline);
53
+ padding-block: var(--cui-page-layout-padding-block);
54
+ }
55
+
56
+ /* A flow or sticky header owns the leading space, so header-gap stays the only gap above the body.
57
+ A floating header is zero-height and overlays the body, so the body keeps its own lead. */
58
+ :where(
59
+ [data-control-family="page-layout"][data-slot="header"]:not([data-variant="floating"])
60
+ + [data-control-family="page-layout"][data-slot="body"]
61
+ ) {
62
+ padding-block-start: 0;
63
+ }
64
+
65
+ :where([data-control-family="page-layout"][data-slot="title"]) {
66
+ grid-area: title;
67
+ font-size: var(--text-heading-1);
68
+ line-height: var(--text-heading-1--line-height);
69
+ font-weight: var(--text-heading-1--font-weight);
70
+ letter-spacing: var(--text-heading-1--letter-spacing);
71
+ color: var(--foreground);
72
+ }
73
+
74
+ :where([data-control-family="page-layout"][data-slot="description"]) {
75
+ grid-area: description;
76
+ font-size: var(--text-body);
77
+ color: var(--muted-foreground);
78
+ }
79
+
80
+ :where([data-control-family="page-layout"][data-slot="actions"]) {
81
+ grid-area: actions;
82
+ justify-self: start;
83
+ }
84
+
85
+ @media (width >= 40rem) {
86
+ :where([data-control-family="page-layout"][data-slot="header"]) {
87
+ grid-template-columns: minmax(0, 1fr) auto;
88
+ grid-template-areas: "title actions" "description actions";
89
+ }
90
+
91
+ :where([data-control-family="page-layout"][data-slot="actions"]) {
92
+ justify-self: end;
93
+ }
94
+ }
95
+
96
+ :where([data-control-family="page-layout"][data-slot="header"][data-variant="sticky"]) {
97
+ position: sticky;
98
+ top: var(--cui-page-layout-sticky-gap);
99
+ z-index: 20;
100
+ }
101
+
102
+ /* Zero height: the band hangs over the body instead of displacing it. */
103
+ :where([data-control-family="page-layout"][data-slot="header"][data-variant="floating"]) {
104
+ position: sticky;
105
+ top: var(--cui-page-layout-sticky-gap);
106
+ z-index: 20;
107
+ align-items: start;
108
+ height: 0;
109
+ padding-block: 0;
110
+ pointer-events: none;
111
+ }
112
+
113
+ :where([data-control-family="page-layout"][data-slot="header"][data-variant="floating"] > *) {
114
+ pointer-events: auto;
115
+ }
116
+
117
+ :where(
118
+ [data-control-family="page-layout"][data-slot="header"][data-variant="floating"]
119
+ [data-control-family="page-layout"][data-slot="actions"]
120
+ ) {
121
+ justify-self: end;
122
+ }
123
+
124
+ :where([data-control-family="page-layout"][data-slot="root"][data-width="full"] [data-control-family="page-layout"][data-slot="body"]) {
125
+ padding-block: 0;
126
+ padding-inline: 0;
127
+ }
128
+
129
+ :where([data-control-family="page-layout"][data-slot="aside"]) {
130
+ display: none;
131
+ }
132
+
133
+ @media (width >= 80rem) {
134
+ :where([data-control-family="page-layout"][data-slot="body"][data-aside]),
135
+ :where(
136
+ [data-control-family="page-layout"][data-slot="header"]:has(+ [data-control-family="page-layout"][data-slot="body"][data-aside])
137
+ ) {
138
+ --cui-page-layout-size: calc(
139
+ var(--cui-page-layout-article-size) +
140
+ var(--cui-page-layout-column-gap) +
141
+ var(--cui-page-layout-aside-size) +
142
+ var(--cui-page-layout-padding-inline) *
143
+ 2
144
+ );
145
+ }
146
+
147
+ :where([data-control-family="page-layout"][data-slot="body"][data-aside]) {
148
+ grid-template-columns: minmax(0, var(--cui-page-layout-article-size)) var(--cui-page-layout-aside-size);
149
+ }
150
+
151
+ :where([data-control-family="page-layout"][data-slot="aside"]) {
152
+ display: block;
153
+ }
154
+ }
155
+ }
156
+
157
+ @property --cui-page-layout-article-size {
158
+ syntax: "<length>";
159
+ inherits: true;
160
+ initial-value: 0px;
161
+ }
162
+
163
+ @property --cui-page-layout-aside-size {
164
+ syntax: "<length>";
165
+ inherits: true;
166
+ initial-value: 0px;
167
+ }
168
+
169
+ @property --cui-page-layout-padding-inline {
170
+ syntax: "<length>";
171
+ inherits: true;
172
+ initial-value: 0px;
173
+ }
174
+
175
+ @property --cui-page-layout-padding-block {
176
+ syntax: "*";
177
+ inherits: true;
178
+ }
179
+
180
+ @property --cui-page-layout-column-gap {
181
+ syntax: "<length>";
182
+ inherits: true;
183
+ initial-value: 0px;
184
+ }
185
+
186
+ @property --cui-page-layout-header-start-gap {
187
+ syntax: "<length>";
188
+ inherits: true;
189
+ initial-value: 0px;
190
+ }
191
+
192
+ @property --cui-page-layout-header-gap {
193
+ syntax: "<length>";
194
+ inherits: true;
195
+ initial-value: 0px;
196
+ }
197
+
198
+ @property --cui-page-layout-header-column-gap {
199
+ syntax: "<length>";
200
+ inherits: true;
201
+ initial-value: 0px;
202
+ }
203
+
204
+ @property --cui-page-layout-header-row-gap {
205
+ syntax: "<length>";
206
+ inherits: true;
207
+ initial-value: 0px;
208
+ }
209
+
210
+ @property --cui-page-layout-size {
211
+ syntax: "*";
212
+ inherits: true;
213
+ }
214
+
215
+ @property --cui-page-layout-sticky-gap {
216
+ syntax: "<length>";
217
+ inherits: true;
218
+ initial-value: 0px;
219
+ }
@@ -20,6 +20,7 @@
20
20
  inset 0 0 0 1px var(--_pagination-link-border-color),
21
21
  var(--cui-pagination-link-shadow);
22
22
  color: var(--cui-pagination-link-foreground);
23
+ font-variant-numeric: tabular-nums;
23
24
  outline: none;
24
25
  }
25
26
 
@@ -50,6 +51,21 @@
50
51
  :where([data-control-family="pagination"][data-slot="ellipsis"]) {
51
52
  color: var(--muted-foreground);
52
53
  }
54
+
55
+ @media (pointer: coarse) {
56
+ :where([data-control-family="pagination"][data-slot="link"]) {
57
+ position: relative;
58
+ }
59
+
60
+ :where([data-control-family="pagination"][data-slot="link"])::after {
61
+ content: "";
62
+ position: absolute;
63
+ inset: 50% 50%;
64
+ translate: -50% -50%;
65
+ inline-size: 100%;
66
+ block-size: max(100%, 44px);
67
+ }
68
+ }
53
69
  }
54
70
 
55
71
  @property --cui-pagination-link-radius {
@@ -85,11 +85,13 @@
85
85
  :where([data-control-family="popup"][data-popup-kind="drawer"][data-slot="title"]) {
86
86
  color: var(--foreground);
87
87
  font-weight: var(--font-weight-semibold);
88
+ text-wrap: balance;
88
89
  }
89
90
 
90
91
  :where([data-control-family="popup"][data-popup-kind="drawer"][data-slot="description"]) {
91
92
  color: var(--muted-foreground);
92
93
  font-size: var(--text-sm);
94
+ text-wrap: pretty;
93
95
  }
94
96
 
95
97
  :where([data-control-family="popup"][data-popup-kind="drawer"][data-slot="content"][data-padding="default"][data-side="bottom"]) {
@@ -150,7 +152,7 @@
150
152
 
151
153
  :where([data-control-family="popup"][data-popup-kind="drawer"][data-slot="backdrop"]) {
152
154
  transition-property: opacity;
153
- transition-timing-function: var(--ease-standard);
155
+ transition-timing-function: var(--ease-emphasized);
154
156
  --_drawer-backdrop-transition-duration: var(--duration-base);
155
157
  transition-duration: var(--_drawer-backdrop-transition-duration);
156
158
  }
@@ -80,11 +80,13 @@
80
80
  font-weight: var(--font-weight-semibold);
81
81
  line-height: 1;
82
82
  letter-spacing: -0.025em;
83
+ text-wrap: balance;
83
84
  }
84
85
 
85
86
  :where([data-control-family="popup"][data-popup-kind="toast"][data-slot="description"]) {
86
87
  color: var(--muted-foreground);
87
88
  font-size: var(--text-body);
89
+ text-wrap: pretty;
88
90
  }
89
91
 
90
92
  :where([data-control-family="button"][data-popup-kind="toast"][data-popup-part="close"]) {