@askrjs/themes 0.2.1 → 0.2.3

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.
@@ -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<boolean>;
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 layoutAlias(props: LegacyLayoutProps, defaults: Record<string, unknown>): JSX.Element {
166
- const { gap, p, padding, ...rest } = props as LegacyLayoutProps & Record<string, unknown>;
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(props, { as: "main", grow: true });
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(props, { slot: "breadcrumb", element: "nav", role: "navigation" });
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", role: "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", role: "row" });
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", role: "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", role: "gridcell" });
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
- /** Renders the combobox's text input, wired up with `role="combobox"`. */
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", role: "listbox" });
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", role: "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", role: "listbox" });
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", role: "option" },
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(props, { slot: "pagination", element: "nav", role: "navigation" });
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", role: "separator" });
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", role: "tablist" });
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", role: "tabpanel" });
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. */
@@ -134,9 +134,16 @@ export function NavGroup(props: NavGroupProps): JSX.Element {
134
134
  const { align, children, label, title = label, ...rest } = props;
135
135
 
136
136
  return (
137
- <LayoutBlock align={align} gap="sm" {...rest} data-align={align} data-slot="nav-group">
137
+ <LayoutBlock
138
+ direction="column"
139
+ align={align}
140
+ gap="sm"
141
+ {...rest}
142
+ data-align={align}
143
+ data-slot="nav-group"
144
+ >
138
145
  {title !== undefined ? <div data-slot="nav-group-label">{title}</div> : null}
139
- <LayoutBlock gap="xs" data-slot="nav-group-body">
146
+ <LayoutBlock direction="column" gap="xs" data-slot="nav-group-body">
140
147
  {children}
141
148
  </LayoutBlock>
142
149
  </LayoutBlock>
@@ -22,6 +22,10 @@
22
22
  display: block;
23
23
  }
24
24
 
25
+ :where([data-askr-native-control="true"]) {
26
+ font: inherit;
27
+ }
28
+
25
29
  ::selection {
26
30
  background: color-mix(in srgb, var(--ak-color-primary-soft) 84%, transparent);
27
31
  color: var(--ak-color-text);
@@ -3,13 +3,12 @@
3
3
  min-inline-size: 0;
4
4
  border-collapse: collapse;
5
5
  border-spacing: 0;
6
- table-layout: fixed;
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: 0 0 var(--ak-space-sm);
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: top;
26
+ caption-side: bottom;
28
27
  }
29
28
 
30
29
  :where([data-slot="table-head"]) {
31
- background: var(--ak-color-surface-muted);
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
- background: transparent;
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([data-slot="table-row"]:hover) {
48
- background: var(--ak-color-hover);
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: top;
60
- overflow-wrap: anywhere;
64
+ vertical-align: middle;
65
+ white-space: normal;
61
66
  }
62
67
 
63
- :where([data-slot="table-body"] [data-slot="table-row"]:last-child [data-slot="table-cell"]) {
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
- color: var(--ak-color-text-muted);
69
- font-weight: var(--ak-font-weight-semibold);
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
- @media (max-width: 30rem) {
82
- :where([data-slot="table-header-cell"]),
83
- :where([data-slot="table-cell"]) {
84
- padding: var(--ak-space-sm) var(--ak-space-xs);
85
- font-size: var(--ak-font-size-xs);
86
- line-height: var(--ak-line-height-tight);
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
- :where([data-slot="table-header-cell"]) {
90
- letter-spacing: 0;
91
- overflow-wrap: anywhere;
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
  }
@@ -9,6 +9,9 @@
9
9
  overscroll-behavior: contain;
10
10
  scrollbar-width: thin;
11
11
  scrollbar-color: var(--ak-color-border-strong) transparent;
12
+ transition:
13
+ border-color var(--ak-duration-fast) var(--ak-ease-standard),
14
+ box-shadow var(--ak-duration-fast) var(--ak-ease-standard);
12
15
  }
13
16
 
14
17
  :where([data-slot="virtual-table"][data-viewport="lg"]) {
@@ -31,41 +34,69 @@
31
34
 
32
35
  :where([data-slot="virtual-table-head"]) {
33
36
  background: var(--ak-color-surface-muted);
37
+ box-shadow: inset 0 -1px 0 var(--ak-color-border);
34
38
  }
35
39
 
36
40
  :where([data-slot="virtual-table-header-row"]) {
37
41
  background: inherit;
38
42
  }
39
43
 
44
+ :where([data-slot="virtual-table"][data-at-top="false"]) :where([data-slot="virtual-table-head"]) {
45
+ box-shadow:
46
+ inset 0 -1px 0 var(--ak-color-border),
47
+ var(--ak-shadow-md);
48
+ }
49
+
40
50
  :where([data-slot="virtual-table-body"]) {
41
51
  background: transparent;
42
52
  }
43
53
 
44
54
  :where([data-slot="virtual-table-header-cell"], [data-slot="virtual-table-cell"]) {
45
- padding: var(--ak-space-sm);
46
- border-block-end: 1px solid var(--ak-color-border);
47
- color: var(--ak-color-text);
48
55
  font-size: var(--ak-font-size-sm);
49
56
  line-height: var(--ak-line-height-normal);
50
57
  text-align: start;
51
58
  vertical-align: middle;
59
+ }
60
+
61
+ :where([data-slot="virtual-table-header-cell"]) {
62
+ padding: 0 var(--ak-space-sm);
63
+ background: inherit;
64
+ color: var(--ak-color-text-muted);
65
+ font-weight: var(--ak-font-weight-medium);
52
66
  overflow: hidden;
53
67
  text-overflow: ellipsis;
54
68
  white-space: nowrap;
55
69
  }
56
70
 
57
- :where([data-slot="virtual-table-header-cell"]) {
58
- color: var(--ak-color-text-muted);
59
- font-weight: var(--ak-font-weight-semibold);
60
- letter-spacing: 0;
61
- text-transform: none;
71
+ :where([data-slot="virtual-table-cell"]) {
72
+ position: relative;
73
+ padding: 0;
74
+ border-block-end: 1px solid var(--ak-color-border);
75
+ color: var(--ak-color-text);
76
+ overflow: hidden;
77
+ text-overflow: ellipsis;
78
+ white-space: nowrap;
62
79
  }
63
80
 
64
81
  :where([data-slot="virtual-table-row"]) {
65
82
  background: transparent;
83
+ cursor: pointer;
66
84
  transition:
67
85
  background var(--ak-duration-fast) var(--ak-ease-standard),
68
- color var(--ak-duration-fast) var(--ak-ease-standard);
86
+ color var(--ak-duration-fast) var(--ak-ease-standard),
87
+ box-shadow var(--ak-duration-fast) var(--ak-ease-standard);
88
+ }
89
+
90
+ :where([data-slot="virtual-table-row"])
91
+ :where(
92
+ [data-slot="input"]:not(:disabled, [data-disabled], [aria-disabled="true"]),
93
+ [data-slot="textarea"]:not(:disabled, [data-disabled], [aria-disabled="true"]),
94
+ [contenteditable="true"],
95
+ [role="searchbox"],
96
+ [role="spinbutton"],
97
+ [role="textbox"]
98
+ ) {
99
+ cursor: text;
69
100
  }
70
101
 
71
102
  :where([data-slot="virtual-table-row"]:hover) {
@@ -75,6 +106,19 @@
75
106
  :where([data-slot="virtual-table-row"][data-selected="true"]) {
76
107
  background: var(--ak-color-selected);
77
108
  color: var(--ak-color-text);
109
+ box-shadow: inset 0 0 0 var(--ak-border-width-sm) var(--ak-color-selected-border);
110
+ }
111
+
112
+ :where(
113
+ [data-slot="virtual-table-row"][data-selected="true"]
114
+ > [data-slot="virtual-table-cell"]:first-child
115
+ )::before {
116
+ position: absolute;
117
+ inset-block: 0;
118
+ inset-inline-start: 0;
119
+ inline-size: var(--ak-border-width-md);
120
+ background: var(--ak-color-primary);
121
+ content: "";
78
122
  }
79
123
 
80
124
  :where([data-slot="virtual-table-spacer-row"]) {
@@ -84,13 +128,98 @@
84
128
  :where([data-slot="virtual-table-cell-content"]) {
85
129
  display: flex;
86
130
  align-items: center;
131
+ gap: var(--ak-space-xs);
132
+ inline-size: 100%;
133
+ block-size: 100%;
87
134
  min-inline-size: 0;
135
+ padding-inline: var(--ak-space-sm);
136
+ box-sizing: border-box;
137
+ text-overflow: ellipsis;
138
+ white-space: nowrap;
88
139
  }
89
140
 
90
- @media (max-width: 30rem) {
141
+ :where(
142
+ [data-slot="virtual-table-cell-content"] > [data-slot="text"],
143
+ [data-slot="virtual-table-cell-content"] > [data-truncate="true"]
144
+ ) {
145
+ min-inline-size: 0;
146
+ max-inline-size: 100%;
147
+ overflow: hidden;
148
+ text-overflow: ellipsis;
149
+ white-space: nowrap;
150
+ }
151
+
152
+ :where(
153
+ [data-slot="virtual-table-header-cell"]:has([role="checkbox"]),
154
+ [data-slot="virtual-table-cell-content"]:has([role="checkbox"])
155
+ ) {
156
+ padding-inline-end: 0;
157
+ }
158
+
159
+ :where([data-slot="virtual-table-header-cell"] > [role="checkbox"]) {
160
+ transform: translateY(2px);
161
+ }
162
+
163
+ :where(
164
+ [data-slot="virtual-table-body"]
165
+ > [data-slot="virtual-table-row"][data-terminal-row="true"]
166
+ > [data-slot="virtual-table-cell"]
167
+ ) {
168
+ border-block-end: 0;
169
+ }
170
+
171
+ :where([data-slot="virtual-table"]:focus-visible, [data-slot="virtual-table-table"]:focus-visible) {
172
+ outline: none;
173
+ }
174
+
175
+ :where(
176
+ [data-slot="virtual-table"]:focus-visible,
177
+ [data-slot="virtual-table"]:has([data-slot="virtual-table-table"]:focus-visible)
178
+ ) {
179
+ border-color: var(--ak-color-ring);
180
+ box-shadow: 0 0 0 var(--ak-focus-ring-width) var(--ak-color-focus-ring);
181
+ }
182
+
183
+ @media (forced-colors: active) {
184
+ :where([data-slot="virtual-table"]) {
185
+ border-color: CanvasText;
186
+ }
187
+
188
+ :where(
189
+ [data-slot="virtual-table"]:focus-visible,
190
+ [data-slot="virtual-table"]:has([data-slot="virtual-table-table"]:focus-visible)
191
+ ) {
192
+ outline: 2px solid Highlight;
193
+ outline-offset: 2px;
194
+ box-shadow: none;
195
+ }
196
+
197
+ :where([data-slot="virtual-table-head"]) {
198
+ background: Canvas;
199
+ color: CanvasText;
200
+ box-shadow: inset 0 -1px 0 CanvasText;
201
+ }
202
+
91
203
  :where([data-slot="virtual-table-header-cell"], [data-slot="virtual-table-cell"]) {
92
- padding: var(--ak-space-sm) var(--ak-space-xs);
93
- font-size: var(--ak-font-size-xs);
94
- line-height: var(--ak-line-height-tight);
204
+ border-color: CanvasText;
205
+ }
206
+
207
+ :where([data-slot="virtual-table-row"][data-selected="true"]) {
208
+ background: Highlight;
209
+ color: HighlightText;
210
+ outline: 2px solid Highlight;
211
+ outline-offset: -2px;
212
+ box-shadow: none;
213
+ }
214
+
215
+ :where([data-slot="virtual-table-row"][data-selected="true"] > [data-slot="virtual-table-cell"]) {
216
+ color: HighlightText;
217
+ }
218
+
219
+ :where(
220
+ [data-slot="virtual-table-row"][data-selected="true"]
221
+ > [data-slot="virtual-table-cell"]:first-child
222
+ )::before {
223
+ background: HighlightText;
95
224
  }
96
225
  }
@@ -1,5 +1,4 @@
1
1
  :where(
2
- [data-slot="block"],
3
2
  [data-slot="container"],
4
3
  [data-slot="header"],
5
4
  [data-slot="main"],