@tbox.cn/app-agent-ui-kit 1.0.0-alpha.15 → 1.0.0-alpha.17
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.
- package/package.json +3 -3
- package/src/ChatPage.tsx +204 -27
- package/src/card/confirm-fields.test.tsx +106 -0
- package/src/card/primitives.tsx +270 -59
- package/src/card/use-card-actions.ts +5 -1
- package/src/card/view-card.tsx +113 -22
- package/src/chat-config.ts +2 -0
- package/src/components/ActionBar/DebugButton.tsx +12 -4
- package/src/components/ActionBar/index.tsx +61 -27
- package/src/components/BottomSheet/index.tsx +26 -2
- package/src/components/QuickCommands/index.tsx +60 -14
- package/src/components/ToolCallBlock/detail.test.ts +2 -0
- package/src/components/ToolCallBlock/detail.ts +9 -2
- package/src/contract.test.tsx +176 -0
- package/src/hooks/use-stick-to-bottom.test.tsx +101 -0
- package/src/hooks/use-stick-to-bottom.ts +35 -7
- package/src/index.ts +2 -0
- package/src/overlay/Overlay.tsx +21 -2
- package/src/overlay/overlay.test.tsx +15 -0
- package/src/preview-provider.tsx +8 -0
- package/src/shell.contract.json +1 -1
- package/src/shell.test.ts +105 -2
- package/src/theme/base.css +42 -2
package/src/theme/base.css
CHANGED
|
@@ -146,14 +146,54 @@
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
|
|
149
|
+
/* 欢迎区表面变体(welcome.surface):只组合既有平台变量,不新增变量键
|
|
150
|
+
(contract.json 是封闭清单,加键即 doctor/主题包门禁报错)。 */
|
|
151
|
+
.chat-page__welcome--brand {
|
|
152
|
+
border-radius: var(--tbox-radius-lg);
|
|
153
|
+
/* 三停渐变全用现有平台变量(不引 color-mix:兼容门禁要求 color-mix 必须带静态回退)。
|
|
154
|
+
上层叠 18% 黑罩:任何品牌色下 14px 副标题对比度都能到 5:1 以上——
|
|
155
|
+
渐变本身在 primary 停点上只有 4.17:1,不足以承载小字正文。 */
|
|
156
|
+
background-color: var(--tbox-primary-dark);
|
|
157
|
+
background-image:
|
|
158
|
+
linear-gradient(0deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
|
|
159
|
+
linear-gradient(142deg, var(--tbox-primary-dark) 0%, var(--tbox-primary) 62%, var(--tbox-accent) 100%);
|
|
160
|
+
box-shadow: var(--tbox-shadow-md);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.chat-page__welcome--subtle {
|
|
164
|
+
border-radius: var(--tbox-radius-lg);
|
|
165
|
+
}
|
|
166
|
+
|
|
149
167
|
/* 表单控件继承排版:模板不引 preflight,原生 button/input 否则落到浏览器默认 13.33px(越档字号)。
|
|
150
|
-
|
|
151
|
-
:where(.tbox-app, .chat-page, .tbox-card) :where(button, input, textarea, select) {
|
|
168
|
+
作用域限定在壳、卡片与弹层内,工具类仍可覆写。 */
|
|
169
|
+
:where(.tbox-app, .chat-page, .tbox-card, [data-tbox-overlay]) :where(button, input, textarea, select) {
|
|
152
170
|
font: inherit;
|
|
153
171
|
color: inherit;
|
|
154
172
|
letter-spacing: inherit;
|
|
155
173
|
}
|
|
156
174
|
|
|
175
|
+
/* 按钮基座重置(无全局 preflight 的作用域替代):裸 <button> 否则会带出浏览器默认的
|
|
176
|
+
2px outset 边框与 buttonface 灰底——卡片里手写的按钮因此看起来像系统控件。
|
|
177
|
+
:where() 零权重 + base 层 → 任何工具类(bg-primary / border / px-3 …)无条件胜出。 */
|
|
178
|
+
:where(.tbox-card, .chat-page, [data-tbox-overlay]) button {
|
|
179
|
+
background: transparent;
|
|
180
|
+
border: 0 solid transparent;
|
|
181
|
+
padding: 0;
|
|
182
|
+
appearance: none;
|
|
183
|
+
-webkit-appearance: none;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* 抽屉内嵌卡片融合:BottomSheet 已经提供外壳、圆角与内边距,
|
|
187
|
+
卡框的圆角/描边/阴影/底距与入场动画会让它变成「卡里套卡」。 */
|
|
188
|
+
.tbox-bottom-sheet__body .tbox-card {
|
|
189
|
+
margin-bottom: 0;
|
|
190
|
+
border: 0;
|
|
191
|
+
border-radius: 0;
|
|
192
|
+
box-shadow: none;
|
|
193
|
+
background: transparent;
|
|
194
|
+
animation: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
157
197
|
/* 基元/模块迁移后不再各自写 margin reset:标题、段落、列表统一归零(在 base 层,工具类可覆写)。 */
|
|
158
198
|
h1, h2, h3, h4, h5, h6, p, dl, dd, dt, ul, ol {
|
|
159
199
|
margin: 0;
|