@askrjs/themes 0.2.1 → 0.2.2
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/dist/components/catalog.d.ts +3 -2
- package/dist/components/catalog.js +51 -60
- package/dist/components/catalog.js.map +1 -1
- package/dist/themes/default/index.css +42 -45
- package/package.json +2 -1
- package/src/components/catalog.tsx +83 -26
- package/src/themes/default/styles/base/reset.css +4 -0
- package/src/themes/default/styles/display/table.css +32 -31
- package/src/themes/default/styles/display/virtual-table.css +21 -9
- package/templates/theme/styles/base/reset.css +4 -0
- package/templates/theme/styles/display/table.css +32 -31
- package/templates/theme/styles/display/virtual-table.css +21 -9
|
@@ -404,6 +404,10 @@
|
|
|
404
404
|
display: block;
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
:where([data-askr-native-control="true"]) {
|
|
408
|
+
font: inherit;
|
|
409
|
+
}
|
|
410
|
+
|
|
407
411
|
::selection {
|
|
408
412
|
background: color-mix(in srgb, var(--ak-color-primary-soft) 84%, transparent);
|
|
409
413
|
color: var(--ak-color-text);
|
|
@@ -4079,7 +4083,7 @@
|
|
|
4079
4083
|
:where([data-slot="table"]) {
|
|
4080
4084
|
border-collapse: collapse;
|
|
4081
4085
|
border-spacing: 0;
|
|
4082
|
-
table-layout:
|
|
4086
|
+
table-layout: auto;
|
|
4083
4087
|
inline-size: 100%;
|
|
4084
4088
|
min-inline-size: 0;
|
|
4085
4089
|
color: var(--ak-color-text);
|
|
@@ -4087,7 +4091,6 @@
|
|
|
4087
4091
|
background: none;
|
|
4088
4092
|
border: 0;
|
|
4089
4093
|
border-radius: 0;
|
|
4090
|
-
overflow: hidden;
|
|
4091
4094
|
}
|
|
4092
4095
|
|
|
4093
4096
|
:where([data-slot="data-table"]) {
|
|
@@ -4097,71 +4100,63 @@
|
|
|
4097
4100
|
}
|
|
4098
4101
|
|
|
4099
4102
|
:where([data-slot="table-caption"]) {
|
|
4100
|
-
padding: 0 0 var(--ak-space-sm);
|
|
4101
4103
|
color: var(--ak-color-text-muted);
|
|
4102
4104
|
font-size: var(--ak-font-size-sm);
|
|
4103
4105
|
line-height: var(--ak-line-height-normal);
|
|
4104
4106
|
text-align: start;
|
|
4105
|
-
caption-side:
|
|
4107
|
+
caption-side: bottom;
|
|
4108
|
+
padding-block-start: var(--ak-space-md);
|
|
4106
4109
|
}
|
|
4107
4110
|
|
|
4108
|
-
:where([data-slot="table-head"]) {
|
|
4109
|
-
background:
|
|
4111
|
+
:where([data-slot="table-head"]), :where([data-slot="table-body"]) {
|
|
4112
|
+
background: none;
|
|
4110
4113
|
}
|
|
4111
4114
|
|
|
4112
|
-
:where([data-slot="table-
|
|
4113
|
-
|
|
4115
|
+
:where([data-slot="table-foot"]) {
|
|
4116
|
+
border-block-start: 1px solid var(--ak-color-border);
|
|
4117
|
+
background: color-mix(in srgb, var(--ak-color-surface-muted) 50%, transparent);
|
|
4118
|
+
font-weight: var(--ak-font-weight-medium);
|
|
4114
4119
|
}
|
|
4115
4120
|
|
|
4116
4121
|
:where([data-slot="table-row"]) {
|
|
4117
4122
|
background: inherit;
|
|
4123
|
+
border-block-end: 1px solid var(--ak-color-border);
|
|
4118
4124
|
transition: background var(--ak-duration-fast) var(--ak-ease-standard);
|
|
4119
4125
|
}
|
|
4120
4126
|
|
|
4121
|
-
:where([data-slot="table-row"]:hover) {
|
|
4122
|
-
background: var(--ak-color-
|
|
4127
|
+
:where([data-slot="table-row"]:hover, [data-slot="table-row"][aria-expanded="true"], [data-slot="table-row"][data-state="selected"]) {
|
|
4128
|
+
background: color-mix(in srgb, var(--ak-color-surface-muted) 50%, transparent);
|
|
4123
4129
|
}
|
|
4124
4130
|
|
|
4125
4131
|
:where([data-slot="table-header-cell"]), :where([data-slot="table-cell"]) {
|
|
4126
|
-
padding: var(--ak-space-sm);
|
|
4127
|
-
border-block-end: 1px solid var(--ak-color-border);
|
|
4132
|
+
padding: var(--ak-space-sm) var(--ak-space-xs);
|
|
4128
4133
|
color: var(--ak-color-text);
|
|
4129
4134
|
font-size: var(--ak-font-size-sm);
|
|
4130
4135
|
line-height: var(--ak-line-height-normal);
|
|
4131
4136
|
text-align: start;
|
|
4132
|
-
vertical-align:
|
|
4133
|
-
|
|
4137
|
+
vertical-align: middle;
|
|
4138
|
+
white-space: normal;
|
|
4134
4139
|
}
|
|
4135
4140
|
|
|
4136
|
-
:where([data-slot="table-body"] [data-slot="table-row"]:last-child [data-slot="table-
|
|
4141
|
+
:where([data-slot="table-body"] [data-slot="table-row"]:last-child), :where([data-slot="table-foot"] [data-slot="table-row"]:last-child) {
|
|
4137
4142
|
border-block-end: 0;
|
|
4138
4143
|
}
|
|
4139
4144
|
|
|
4140
4145
|
:where([data-slot="table-header-cell"]) {
|
|
4141
|
-
|
|
4142
|
-
font-weight: var(--ak-font-weight-
|
|
4143
|
-
letter-spacing: 0;
|
|
4144
|
-
overflow-wrap: normal;
|
|
4145
|
-
text-transform: none;
|
|
4146
|
-
word-break: normal;
|
|
4147
|
-
white-space: normal;
|
|
4146
|
+
block-size: 2.5rem;
|
|
4147
|
+
font-weight: var(--ak-font-weight-medium);
|
|
4148
4148
|
}
|
|
4149
4149
|
|
|
4150
4150
|
:where([data-slot="table-cell"]) {
|
|
4151
4151
|
font-weight: var(--ak-font-weight-regular);
|
|
4152
4152
|
}
|
|
4153
4153
|
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
font-size: var(--ak-font-size-xs);
|
|
4158
|
-
line-height: var(--ak-line-height-tight);
|
|
4159
|
-
}
|
|
4154
|
+
:where([data-slot="table-header-cell"]:has([role="checkbox"]), [data-slot="table-cell"]:has([role="checkbox"])) {
|
|
4155
|
+
padding-inline-end: 0;
|
|
4156
|
+
}
|
|
4160
4157
|
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
overflow-wrap: anywhere;
|
|
4164
|
-
}
|
|
4158
|
+
:where([data-slot="table-header-cell"] > [role="checkbox"], [data-slot="table-cell"] > [role="checkbox"]) {
|
|
4159
|
+
transform: translateY(2px);
|
|
4165
4160
|
}
|
|
4166
4161
|
|
|
4167
4162
|
:where([data-slot="virtual-table"]) {
|
|
@@ -4194,12 +4189,8 @@
|
|
|
4194
4189
|
min-inline-size: var(--ak-virtual-table-compact-min-inline-size, 40rem);
|
|
4195
4190
|
}
|
|
4196
4191
|
|
|
4197
|
-
:where([data-slot="virtual-table-head"]) {
|
|
4198
|
-
background: var(--ak-color-surface
|
|
4199
|
-
}
|
|
4200
|
-
|
|
4201
|
-
:where([data-slot="virtual-table-header-row"]) {
|
|
4202
|
-
background: inherit;
|
|
4192
|
+
:where([data-slot="virtual-table-head"]), :where([data-slot="virtual-table-header-row"]) {
|
|
4193
|
+
background: var(--ak-color-surface);
|
|
4203
4194
|
}
|
|
4204
4195
|
|
|
4205
4196
|
:where([data-slot="virtual-table-body"]) {
|
|
@@ -4207,7 +4198,7 @@
|
|
|
4207
4198
|
}
|
|
4208
4199
|
|
|
4209
4200
|
:where([data-slot="virtual-table-header-cell"], [data-slot="virtual-table-cell"]) {
|
|
4210
|
-
padding: var(--ak-space-sm);
|
|
4201
|
+
padding: var(--ak-space-sm) var(--ak-space-xs);
|
|
4211
4202
|
border-block-end: 1px solid var(--ak-color-border);
|
|
4212
4203
|
color: var(--ak-color-text);
|
|
4213
4204
|
font-size: var(--ak-font-size-sm);
|
|
@@ -4220,10 +4211,8 @@
|
|
|
4220
4211
|
}
|
|
4221
4212
|
|
|
4222
4213
|
:where([data-slot="virtual-table-header-cell"]) {
|
|
4223
|
-
|
|
4224
|
-
font-weight: var(--ak-font-weight-
|
|
4225
|
-
letter-spacing: 0;
|
|
4226
|
-
text-transform: none;
|
|
4214
|
+
block-size: 2.5rem;
|
|
4215
|
+
font-weight: var(--ak-font-weight-medium);
|
|
4227
4216
|
}
|
|
4228
4217
|
|
|
4229
4218
|
:where([data-slot="virtual-table-row"]) {
|
|
@@ -4233,11 +4222,11 @@
|
|
|
4233
4222
|
}
|
|
4234
4223
|
|
|
4235
4224
|
:where([data-slot="virtual-table-row"]:hover) {
|
|
4236
|
-
background: var(--ak-color-
|
|
4225
|
+
background: color-mix(in srgb, var(--ak-color-surface-muted) 50%, transparent);
|
|
4237
4226
|
}
|
|
4238
4227
|
|
|
4239
4228
|
:where([data-slot="virtual-table-row"][data-selected="true"]) {
|
|
4240
|
-
background: var(--ak-color-
|
|
4229
|
+
background: color-mix(in srgb, var(--ak-color-surface-muted) 50%, transparent);
|
|
4241
4230
|
color: var(--ak-color-text);
|
|
4242
4231
|
}
|
|
4243
4232
|
|
|
@@ -4251,6 +4240,14 @@
|
|
|
4251
4240
|
display: flex;
|
|
4252
4241
|
}
|
|
4253
4242
|
|
|
4243
|
+
:where([data-slot="virtual-table-header-cell"]:has([role="checkbox"]), [data-slot="virtual-table-cell"]:has([role="checkbox"])) {
|
|
4244
|
+
padding-inline-end: 0;
|
|
4245
|
+
}
|
|
4246
|
+
|
|
4247
|
+
:where([data-slot="virtual-table-header-cell"] > [role="checkbox"], [data-slot="virtual-table-cell"] > [role="checkbox"]) {
|
|
4248
|
+
transform: translateY(2px);
|
|
4249
|
+
}
|
|
4250
|
+
|
|
4254
4251
|
@media (width <= 30rem) {
|
|
4255
4252
|
:where([data-slot="virtual-table-header-cell"], [data-slot="virtual-table-cell"]) {
|
|
4256
4253
|
padding: var(--ak-space-sm) var(--ak-space-xs);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askrjs/themes",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Default theme tokens, styles, and component presets for Askr apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"askr",
|
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
"@types/node": "^26.2.0",
|
|
128
128
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
129
129
|
"@vitest/browser-playwright": "4.1.10",
|
|
130
|
+
"axe-core": "^4.13.0",
|
|
130
131
|
"cross-env": "^10.1.0",
|
|
131
132
|
"jsdom": "^30.0.1",
|
|
132
133
|
"playwright": "^1.62.1",
|
|
@@ -73,12 +73,13 @@ function buttonPart(props: CatalogComponentProps, slot: string, className?: stri
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
type LegacySpace = BlockSpace | "none" | "1" | "2" | "3" | "4" | "5" | "6" | "8";
|
|
76
|
+
type LegacyWrap = boolean | "wrap" | "nowrap";
|
|
76
77
|
|
|
77
78
|
type LegacyLayoutConveniences = {
|
|
78
79
|
gap?: BlockResponsiveValue<LegacySpace>;
|
|
79
80
|
p?: BlockResponsiveValue<LegacySpace>;
|
|
80
81
|
padding?: BlockResponsiveValue<LegacySpace>;
|
|
81
|
-
wrap?: BlockResponsiveValue<
|
|
82
|
+
wrap?: BlockResponsiveValue<LegacyWrap>;
|
|
82
83
|
};
|
|
83
84
|
|
|
84
85
|
type LegacyStructuralProps = Partial<
|
|
@@ -162,8 +163,49 @@ function normalizeLegacyResponsiveSpace(
|
|
|
162
163
|
return normalizeLegacySpace(value);
|
|
163
164
|
}
|
|
164
165
|
|
|
165
|
-
function
|
|
166
|
-
|
|
166
|
+
function normalizeLegacyWrap(value: LegacyWrap): boolean {
|
|
167
|
+
if (value === "wrap") return true;
|
|
168
|
+
if (value === "nowrap") return false;
|
|
169
|
+
return value;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function normalizeLegacyResponsiveWrap(
|
|
173
|
+
value: BlockResponsiveValue<LegacyWrap> | undefined,
|
|
174
|
+
): BlockResponsiveValue<boolean> | undefined {
|
|
175
|
+
if (value === undefined) return undefined;
|
|
176
|
+
if (typeof value === "object") {
|
|
177
|
+
return Object.fromEntries(
|
|
178
|
+
Object.entries(value).map(([breakpoint, wrap]) => [
|
|
179
|
+
breakpoint,
|
|
180
|
+
normalizeLegacyWrap(wrap as LegacyWrap),
|
|
181
|
+
]),
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
return normalizeLegacyWrap(value);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const warnedLegacyLayouts = new Set<string>();
|
|
188
|
+
|
|
189
|
+
function warnDeprecatedLayout(component: string, replacement: string) {
|
|
190
|
+
const metaEnvironment = (import.meta as ImportMeta & { env?: { DEV?: boolean } }).env;
|
|
191
|
+
const nodeEnvironment = (
|
|
192
|
+
globalThis as typeof globalThis & { process?: { env?: { NODE_ENV?: string } } }
|
|
193
|
+
).process?.env?.NODE_ENV;
|
|
194
|
+
|
|
195
|
+
if (metaEnvironment?.DEV !== true && nodeEnvironment !== "development") return;
|
|
196
|
+
if (warnedLegacyLayouts.has(component)) return;
|
|
197
|
+
warnedLegacyLayouts.add(component);
|
|
198
|
+
console.warn(`[askr-themes] ${component} is deprecated. ${replacement}`);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function layoutAlias(
|
|
202
|
+
component: string,
|
|
203
|
+
replacement: string,
|
|
204
|
+
props: LegacyLayoutProps,
|
|
205
|
+
defaults: Record<string, unknown>,
|
|
206
|
+
): JSX.Element {
|
|
207
|
+
warnDeprecatedLayout(component, replacement);
|
|
208
|
+
const { gap, p, padding, wrap, ...rest } = props as LegacyLayoutProps & Record<string, unknown>;
|
|
167
209
|
const BlockComponent = Block as (blockProps: Record<string, unknown>) => JSX.Element;
|
|
168
210
|
|
|
169
211
|
return (
|
|
@@ -172,6 +214,7 @@ function layoutAlias(props: LegacyLayoutProps, defaults: Record<string, unknown>
|
|
|
172
214
|
{...rest}
|
|
173
215
|
gap={normalizeLegacyResponsiveSpace(gap)}
|
|
174
216
|
padding={normalizeLegacyResponsiveSpace(padding ?? p)}
|
|
217
|
+
wrap={normalizeLegacyResponsiveWrap(wrap)}
|
|
175
218
|
/>
|
|
176
219
|
);
|
|
177
220
|
}
|
|
@@ -179,19 +222,19 @@ function layoutAlias(props: LegacyLayoutProps, defaults: Record<string, unknown>
|
|
|
179
222
|
/** @deprecated Use {@link Block} directly. */
|
|
180
223
|
export function Box(props: LegacyLayoutProps): JSX.Element;
|
|
181
224
|
export function Box(props: LegacyLayoutProps): JSX.Element {
|
|
182
|
-
return layoutAlias(props, {});
|
|
225
|
+
return layoutAlias("Box", "Use Block directly.", props, {});
|
|
183
226
|
}
|
|
184
227
|
|
|
185
228
|
/** @deprecated Use `<Block direction="column">`. */
|
|
186
229
|
export function Stack(props: LegacyLayoutProps): JSX.Element;
|
|
187
230
|
export function Stack(props: LegacyLayoutProps): JSX.Element {
|
|
188
|
-
return layoutAlias(props, { direction: "column" });
|
|
231
|
+
return layoutAlias("Stack", 'Use <Block direction="column">.', props, { direction: "column" });
|
|
189
232
|
}
|
|
190
233
|
|
|
191
234
|
/** @deprecated Use `<Block direction="row">`. */
|
|
192
235
|
export function Inline(props: LegacyLayoutProps): JSX.Element;
|
|
193
236
|
export function Inline(props: LegacyLayoutProps): JSX.Element {
|
|
194
|
-
return layoutAlias(props, { direction: "row" });
|
|
237
|
+
return layoutAlias("Inline", 'Use <Block direction="row">.', props, { direction: "row" });
|
|
195
238
|
}
|
|
196
239
|
|
|
197
240
|
/** @deprecated Compose semantic {@link Block} primitives instead. */
|
|
@@ -199,19 +242,22 @@ export function Shell(props: LegacyLayoutProps & { variant?: string }): JSX.Elem
|
|
|
199
242
|
export function Shell(props: LegacyLayoutProps & { variant?: string }): JSX.Element {
|
|
200
243
|
const { variant: _variant, ...rest } = props;
|
|
201
244
|
void _variant;
|
|
202
|
-
return layoutAlias(rest, {});
|
|
245
|
+
return layoutAlias("Shell", "Compose semantic Block primitives instead.", rest, {});
|
|
203
246
|
}
|
|
204
247
|
|
|
205
248
|
/** @deprecated Use `<Block as="nav">`. */
|
|
206
249
|
export function ShellNav(props: LegacyLayoutProps): JSX.Element;
|
|
207
250
|
export function ShellNav(props: LegacyLayoutProps): JSX.Element {
|
|
208
|
-
return layoutAlias(props, {});
|
|
251
|
+
return layoutAlias("ShellNav", 'Use <Block as="nav">.', props, {});
|
|
209
252
|
}
|
|
210
253
|
|
|
211
254
|
/** @deprecated Use `<Block as="main" grow>`. */
|
|
212
255
|
export function ShellMain(props: LegacyLayoutProps): JSX.Element;
|
|
213
256
|
export function ShellMain(props: LegacyLayoutProps): JSX.Element {
|
|
214
|
-
return layoutAlias(
|
|
257
|
+
return layoutAlias("ShellMain", 'Use <Block as="main" grow>.', props, {
|
|
258
|
+
as: "main",
|
|
259
|
+
grow: true,
|
|
260
|
+
});
|
|
215
261
|
}
|
|
216
262
|
|
|
217
263
|
/** Renders the `alert-title` part of the shadcn-compatible catalog primitives. */
|
|
@@ -230,7 +276,14 @@ export function AlertDescription(props: CatalogComponentProps): JSX.Element {
|
|
|
230
276
|
|
|
231
277
|
/** Renders the `breadcrumb` part of the shadcn-compatible catalog primitives. */
|
|
232
278
|
export function Breadcrumb(props: CatalogComponentProps): JSX.Element {
|
|
233
|
-
return catalogPart(
|
|
279
|
+
return catalogPart(
|
|
280
|
+
{ "aria-label": "Breadcrumb", ...props },
|
|
281
|
+
{
|
|
282
|
+
slot: "breadcrumb",
|
|
283
|
+
element: "nav",
|
|
284
|
+
role: "navigation",
|
|
285
|
+
},
|
|
286
|
+
);
|
|
234
287
|
}
|
|
235
288
|
|
|
236
289
|
/** Renders the `breadcrumb-list` part of the shadcn-compatible catalog primitives. */
|
|
@@ -325,12 +378,12 @@ export function CalendarNextButton(props: CatalogComponentProps): JSX.Element {
|
|
|
325
378
|
|
|
326
379
|
/** Renders the `calendar-grid` part of the shadcn-compatible catalog primitives. */
|
|
327
380
|
export function CalendarGrid(props: CatalogComponentProps): JSX.Element {
|
|
328
|
-
return catalogPart(props, { slot: "calendar-grid"
|
|
381
|
+
return catalogPart(props, { slot: "calendar-grid" });
|
|
329
382
|
}
|
|
330
383
|
|
|
331
384
|
/** Renders the `calendar-head` part of the shadcn-compatible catalog primitives. */
|
|
332
385
|
export function CalendarHead(props: CatalogComponentProps): JSX.Element {
|
|
333
|
-
return catalogPart(props, { slot: "calendar-head"
|
|
386
|
+
return catalogPart(props, { slot: "calendar-head" });
|
|
334
387
|
}
|
|
335
388
|
|
|
336
389
|
/** Renders the `calendar-body` part of the shadcn-compatible catalog primitives. */
|
|
@@ -340,12 +393,12 @@ export function CalendarBody(props: CatalogComponentProps): JSX.Element {
|
|
|
340
393
|
|
|
341
394
|
/** Renders the `calendar-row` part of the shadcn-compatible catalog primitives. */
|
|
342
395
|
export function CalendarRow(props: CatalogComponentProps): JSX.Element {
|
|
343
|
-
return catalogPart(props, { slot: "calendar-row"
|
|
396
|
+
return catalogPart(props, { slot: "calendar-row" });
|
|
344
397
|
}
|
|
345
398
|
|
|
346
399
|
/** Renders the `calendar-cell` part of the shadcn-compatible catalog primitives. */
|
|
347
400
|
export function CalendarCell(props: CatalogComponentProps): JSX.Element {
|
|
348
|
-
return catalogPart(props, { slot: "calendar-cell"
|
|
401
|
+
return catalogPart(props, { slot: "calendar-cell" });
|
|
349
402
|
}
|
|
350
403
|
|
|
351
404
|
/** Renders a single selectable day cell in the calendar grid, with selection/range/today state exposed as data attributes. */
|
|
@@ -365,7 +418,6 @@ export function CalendarDay(
|
|
|
365
418
|
{
|
|
366
419
|
disabled,
|
|
367
420
|
"aria-disabled": disabled ? "true" : undefined,
|
|
368
|
-
"aria-selected": selected ? "true" : undefined,
|
|
369
421
|
"data-disabled": disabled ? "" : undefined,
|
|
370
422
|
"data-outside": outside ? "true" : undefined,
|
|
371
423
|
"data-range-end": rangeEnd ? "true" : undefined,
|
|
@@ -411,14 +463,13 @@ export function Combobox(props: CatalogComponentProps): JSX.Element {
|
|
|
411
463
|
return catalogPart(props, { slot: "combobox" });
|
|
412
464
|
}
|
|
413
465
|
|
|
414
|
-
/**
|
|
466
|
+
/** Styling-only combobox input; consumers supplying behavior also own its complete ARIA contract. */
|
|
415
467
|
export function ComboboxInput(props: CatalogComponentProps): JSX.Element {
|
|
416
468
|
const { ref, class: className, ...rest } = props;
|
|
417
469
|
const finalProps = mergeProps(rest, {
|
|
418
470
|
ref,
|
|
419
471
|
class: classes("input", className),
|
|
420
472
|
"data-slot": "combobox-input",
|
|
421
|
-
role: "combobox",
|
|
422
473
|
});
|
|
423
474
|
|
|
424
475
|
return <input {...finalProps} />;
|
|
@@ -426,12 +477,12 @@ export function ComboboxInput(props: CatalogComponentProps): JSX.Element {
|
|
|
426
477
|
|
|
427
478
|
/** Renders the `combobox-list` part of the shadcn-compatible catalog primitives. */
|
|
428
479
|
export function ComboboxList(props: CatalogComponentProps): JSX.Element {
|
|
429
|
-
return catalogPart(props, { slot: "combobox-list"
|
|
480
|
+
return catalogPart(props, { slot: "combobox-list" });
|
|
430
481
|
}
|
|
431
482
|
|
|
432
483
|
/** Renders the `combobox-option` part of the shadcn-compatible catalog primitives. */
|
|
433
484
|
export function ComboboxOption(props: CatalogComponentProps): JSX.Element {
|
|
434
|
-
return catalogPart(props, { slot: "combobox-option"
|
|
485
|
+
return catalogPart(props, { slot: "combobox-option" });
|
|
435
486
|
}
|
|
436
487
|
|
|
437
488
|
/** Renders the `command` part of the shadcn-compatible catalog primitives. */
|
|
@@ -463,7 +514,7 @@ export function CommandHeader(props: CatalogComponentProps): JSX.Element {
|
|
|
463
514
|
|
|
464
515
|
/** Renders the `command-list` part of the shadcn-compatible catalog primitives. */
|
|
465
516
|
export function CommandList(props: CatalogComponentProps): JSX.Element {
|
|
466
|
-
return catalogPart(props, { slot: "command-list"
|
|
517
|
+
return catalogPart(props, { slot: "command-list" });
|
|
467
518
|
}
|
|
468
519
|
|
|
469
520
|
/** Renders the `command-empty` part of the shadcn-compatible catalog primitives. */
|
|
@@ -489,12 +540,11 @@ export function CommandItem(
|
|
|
489
540
|
return catalogPart(
|
|
490
541
|
{
|
|
491
542
|
"aria-disabled": disabled ? "true" : undefined,
|
|
492
|
-
"aria-selected": selected || active ? "true" : undefined,
|
|
493
543
|
"data-disabled": disabled ? "" : undefined,
|
|
494
544
|
"data-selected": selected || active ? "true" : undefined,
|
|
495
545
|
...rest,
|
|
496
546
|
},
|
|
497
|
-
{ slot: "command-item"
|
|
547
|
+
{ slot: "command-item" },
|
|
498
548
|
);
|
|
499
549
|
}
|
|
500
550
|
|
|
@@ -755,7 +805,14 @@ export function NavigationMenuIndicator(props: CatalogComponentProps): JSX.Eleme
|
|
|
755
805
|
|
|
756
806
|
/** Renders the `pagination` part of the shadcn-compatible catalog primitives. */
|
|
757
807
|
export function Pagination(props: CatalogComponentProps): JSX.Element {
|
|
758
|
-
return catalogPart(
|
|
808
|
+
return catalogPart(
|
|
809
|
+
{ "aria-label": "Pagination", ...props },
|
|
810
|
+
{
|
|
811
|
+
slot: "pagination",
|
|
812
|
+
element: "nav",
|
|
813
|
+
role: "navigation",
|
|
814
|
+
},
|
|
815
|
+
);
|
|
759
816
|
}
|
|
760
817
|
|
|
761
818
|
/** Renders the `pagination-content` part of the shadcn-compatible catalog primitives. */
|
|
@@ -820,12 +877,12 @@ export function ResizablePanel(props: CatalogComponentProps): JSX.Element {
|
|
|
820
877
|
|
|
821
878
|
/** Styling-only separator slot; it does not implement resizing, pointer dragging, or keyboard controls. */
|
|
822
879
|
export function ResizableHandle(props: CatalogComponentProps): JSX.Element {
|
|
823
|
-
return catalogPart(props, { slot: "resizable-handle"
|
|
880
|
+
return catalogPart(props, { slot: "resizable-handle" });
|
|
824
881
|
}
|
|
825
882
|
|
|
826
883
|
/** Renders the `tabs-list` part of the shadcn-compatible catalog primitives. */
|
|
827
884
|
export function TabsList(props: CatalogComponentProps): JSX.Element {
|
|
828
|
-
return catalogPart(props, { slot: "tabs-list"
|
|
885
|
+
return catalogPart(props, { slot: "tabs-list" });
|
|
829
886
|
}
|
|
830
887
|
|
|
831
888
|
/** Renders the `tabs-content` part of the shadcn-compatible catalog primitives. */
|
|
@@ -835,7 +892,7 @@ export function TabsTrigger(props: CatalogComponentProps): JSX.Element {
|
|
|
835
892
|
|
|
836
893
|
/** Renders the `tabs-content` part of the shadcn-compatible catalog primitives. */
|
|
837
894
|
export function TabsContent(props: CatalogComponentProps): JSX.Element {
|
|
838
|
-
return catalogPart(props, { slot: "tabs-content"
|
|
895
|
+
return catalogPart(props, { slot: "tabs-content" });
|
|
839
896
|
}
|
|
840
897
|
|
|
841
898
|
/** Sheet variant of the dialog content part; defaults to sliding in from the right. */
|
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
min-inline-size: 0;
|
|
4
4
|
border-collapse: collapse;
|
|
5
5
|
border-spacing: 0;
|
|
6
|
-
table-layout:
|
|
6
|
+
table-layout: auto;
|
|
7
7
|
border: 0;
|
|
8
8
|
border-radius: 0;
|
|
9
9
|
background: transparent;
|
|
10
10
|
color: var(--ak-color-text);
|
|
11
11
|
box-shadow: none;
|
|
12
|
-
overflow: hidden;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
:where([data-slot="data-table"]) {
|
|
@@ -19,16 +18,16 @@
|
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
:where([data-slot="table-caption"]) {
|
|
22
|
-
padding:
|
|
21
|
+
padding-block-start: var(--ak-space-md);
|
|
23
22
|
color: var(--ak-color-text-muted);
|
|
24
23
|
font-size: var(--ak-font-size-sm);
|
|
25
24
|
line-height: var(--ak-line-height-normal);
|
|
26
25
|
text-align: start;
|
|
27
|
-
caption-side:
|
|
26
|
+
caption-side: bottom;
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
:where([data-slot="table-head"]) {
|
|
31
|
-
background:
|
|
30
|
+
background: transparent;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
:where([data-slot="table-body"]) {
|
|
@@ -36,58 +35,60 @@
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
:where([data-slot="table-foot"]) {
|
|
39
|
-
|
|
38
|
+
border-block-start: 1px solid var(--ak-color-border);
|
|
39
|
+
background: color-mix(in srgb, var(--ak-color-surface-muted) 50%, transparent);
|
|
40
|
+
font-weight: var(--ak-font-weight-medium);
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
:where([data-slot="table-row"]) {
|
|
43
44
|
background: inherit;
|
|
45
|
+
border-block-end: 1px solid var(--ak-color-border);
|
|
44
46
|
transition: background var(--ak-duration-fast) var(--ak-ease-standard);
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
:where(
|
|
48
|
-
|
|
49
|
+
:where(
|
|
50
|
+
[data-slot="table-row"]:hover,
|
|
51
|
+
[data-slot="table-row"][aria-expanded="true"],
|
|
52
|
+
[data-slot="table-row"][data-state="selected"]
|
|
53
|
+
) {
|
|
54
|
+
background: color-mix(in srgb, var(--ak-color-surface-muted) 50%, transparent);
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
:where([data-slot="table-header-cell"]),
|
|
52
58
|
:where([data-slot="table-cell"]) {
|
|
53
|
-
padding: var(--ak-space-sm);
|
|
54
|
-
border-block-end: 1px solid var(--ak-color-border);
|
|
59
|
+
padding: var(--ak-space-sm) var(--ak-space-xs);
|
|
55
60
|
color: var(--ak-color-text);
|
|
56
61
|
font-size: var(--ak-font-size-sm);
|
|
57
62
|
line-height: var(--ak-line-height-normal);
|
|
58
63
|
text-align: start;
|
|
59
|
-
vertical-align:
|
|
60
|
-
|
|
64
|
+
vertical-align: middle;
|
|
65
|
+
white-space: normal;
|
|
61
66
|
}
|
|
62
67
|
|
|
63
|
-
:where([data-slot="table-body"] [data-slot="table-row"]:last-child
|
|
68
|
+
:where([data-slot="table-body"] [data-slot="table-row"]:last-child),
|
|
69
|
+
:where([data-slot="table-foot"] [data-slot="table-row"]:last-child) {
|
|
64
70
|
border-block-end: 0;
|
|
65
71
|
}
|
|
66
72
|
|
|
67
73
|
:where([data-slot="table-header-cell"]) {
|
|
68
|
-
|
|
69
|
-
font-weight: var(--ak-font-weight-
|
|
70
|
-
letter-spacing: 0;
|
|
71
|
-
overflow-wrap: normal;
|
|
72
|
-
text-transform: none;
|
|
73
|
-
word-break: normal;
|
|
74
|
-
white-space: normal;
|
|
74
|
+
block-size: 2.5rem;
|
|
75
|
+
font-weight: var(--ak-font-weight-medium);
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
:where([data-slot="table-cell"]) {
|
|
78
79
|
font-weight: var(--ak-font-weight-regular);
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
82
|
+
:where(
|
|
83
|
+
[data-slot="table-header-cell"]:has([role="checkbox"]),
|
|
84
|
+
[data-slot="table-cell"]:has([role="checkbox"])
|
|
85
|
+
) {
|
|
86
|
+
padding-inline-end: 0;
|
|
87
|
+
}
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
:where(
|
|
90
|
+
[data-slot="table-header-cell"] > [role="checkbox"],
|
|
91
|
+
[data-slot="table-cell"] > [role="checkbox"]
|
|
92
|
+
) {
|
|
93
|
+
transform: translateY(2px);
|
|
93
94
|
}
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
:where([data-slot="virtual-table-head"]) {
|
|
33
|
-
background: var(--ak-color-surface
|
|
33
|
+
background: var(--ak-color-surface);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
:where([data-slot="virtual-table-header-row"]) {
|
|
37
|
-
background:
|
|
37
|
+
background: var(--ak-color-surface);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
:where([data-slot="virtual-table-body"]) {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
:where([data-slot="virtual-table-header-cell"], [data-slot="virtual-table-cell"]) {
|
|
45
|
-
padding: var(--ak-space-sm);
|
|
45
|
+
padding: var(--ak-space-sm) var(--ak-space-xs);
|
|
46
46
|
border-block-end: 1px solid var(--ak-color-border);
|
|
47
47
|
color: var(--ak-color-text);
|
|
48
48
|
font-size: var(--ak-font-size-sm);
|
|
@@ -55,10 +55,8 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
:where([data-slot="virtual-table-header-cell"]) {
|
|
58
|
-
|
|
59
|
-
font-weight: var(--ak-font-weight-
|
|
60
|
-
letter-spacing: 0;
|
|
61
|
-
text-transform: none;
|
|
58
|
+
block-size: 2.5rem;
|
|
59
|
+
font-weight: var(--ak-font-weight-medium);
|
|
62
60
|
}
|
|
63
61
|
|
|
64
62
|
:where([data-slot="virtual-table-row"]) {
|
|
@@ -69,11 +67,11 @@
|
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
:where([data-slot="virtual-table-row"]:hover) {
|
|
72
|
-
background: var(--ak-color-
|
|
70
|
+
background: color-mix(in srgb, var(--ak-color-surface-muted) 50%, transparent);
|
|
73
71
|
}
|
|
74
72
|
|
|
75
73
|
:where([data-slot="virtual-table-row"][data-selected="true"]) {
|
|
76
|
-
background: var(--ak-color-
|
|
74
|
+
background: color-mix(in srgb, var(--ak-color-surface-muted) 50%, transparent);
|
|
77
75
|
color: var(--ak-color-text);
|
|
78
76
|
}
|
|
79
77
|
|
|
@@ -87,6 +85,20 @@
|
|
|
87
85
|
min-inline-size: 0;
|
|
88
86
|
}
|
|
89
87
|
|
|
88
|
+
:where(
|
|
89
|
+
[data-slot="virtual-table-header-cell"]:has([role="checkbox"]),
|
|
90
|
+
[data-slot="virtual-table-cell"]:has([role="checkbox"])
|
|
91
|
+
) {
|
|
92
|
+
padding-inline-end: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:where(
|
|
96
|
+
[data-slot="virtual-table-header-cell"] > [role="checkbox"],
|
|
97
|
+
[data-slot="virtual-table-cell"] > [role="checkbox"]
|
|
98
|
+
) {
|
|
99
|
+
transform: translateY(2px);
|
|
100
|
+
}
|
|
101
|
+
|
|
90
102
|
@media (max-width: 30rem) {
|
|
91
103
|
:where([data-slot="virtual-table-header-cell"], [data-slot="virtual-table-cell"]) {
|
|
92
104
|
padding: var(--ak-space-sm) var(--ak-space-xs);
|