atlas-react-kit 0.13.0 → 1.0.0
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/COMPONENTS.md +118 -98
- package/DESIGN_RULES.md +30 -0
- package/README.md +10 -9
- package/dist/accordion.d.ts +1 -0
- package/dist/avatar.d.ts +1 -0
- package/dist/badge.d.ts +2 -3
- package/dist/breadcrumb.d.ts +2 -3
- package/dist/button.d.ts +2 -3
- package/dist/calendar.d.ts +2 -0
- package/dist/card.d.ts +3 -0
- package/dist/chart.d.ts +152 -0
- package/dist/chart.js +177 -0
- package/dist/color-legend.d.ts +8 -0
- package/dist/combobox.d.ts +13 -4
- package/dist/combobox.js +1 -8
- package/dist/date-picker.d.ts +14 -2
- package/dist/date-picker.js +12 -19
- package/dist/date-time-picker.d.ts +5 -2
- package/dist/date-time-picker.js +6 -5
- package/dist/dialog.d.ts +1 -0
- package/dist/dialog.js +4 -2
- package/dist/dropdown-menu.d.ts +9 -8
- package/dist/empty-panel.d.ts +8 -2
- package/dist/empty-panel.js +2 -2
- package/dist/error-boundary.d.ts +6 -1
- package/dist/field.d.ts +3 -0
- package/dist/field.js +1 -1
- package/dist/form/checkbox-field.d.ts +45 -0
- package/dist/form/checkbox-field.js +39 -0
- package/dist/form/combobox-field.d.ts +13 -0
- package/dist/form/combobox-field.js +14 -0
- package/dist/form/control-field.d.ts +6 -7
- package/dist/form/date-picker-field.d.ts +6 -20
- package/dist/form/date-picker-field.js +2 -2
- package/dist/form/date-time-picker-field.d.ts +6 -21
- package/dist/form/date-time-picker-field.js +1 -1
- package/dist/form/feedback-field.d.ts +2 -0
- package/dist/form/field-error.d.ts +31 -0
- package/dist/form/field-shell.d.ts +29 -1
- package/dist/form/markdown-field.d.ts +4 -16
- package/dist/form/select-field.d.ts +6 -6
- package/dist/form/text-field.d.ts +29 -10
- package/dist/form/text-field.js +4 -0
- package/dist/form/toggle-group-field.d.ts +30 -0
- package/dist/form/toggle-group-field.js +19 -0
- package/dist/info-tip.d.ts +10 -1
- package/dist/internal/as-child.d.ts +8 -0
- package/dist/internal/as-child.js +1 -0
- package/dist/internal/form-control.d.ts +3 -2
- package/dist/internal/form-control.js +3 -2
- package/dist/internal/kanban-layout.d.ts +55 -0
- package/dist/internal/kanban-layout.js +80 -0
- package/dist/internal/kanban-plugins.d.ts +17 -0
- package/dist/internal/kanban-plugins.js +17 -0
- package/dist/internal/use-media-query.d.ts +4 -2
- package/dist/internal/use-media-query.js +11 -15
- package/dist/kanban.d.ts +84 -0
- package/dist/kanban.js +197 -0
- package/dist/markdown.d.ts +2 -0
- package/dist/meter.d.ts +7 -0
- package/dist/nav-link.d.ts +3 -2
- package/dist/next/period-stepper.d.ts +11 -0
- package/dist/next/period-stepper.js +16 -0
- package/dist/page-header.d.ts +19 -0
- package/dist/page-header.js +11 -0
- package/dist/pagination.d.ts +2 -0
- package/dist/period-stepper.d.ts +32 -0
- package/dist/period-stepper.js +27 -0
- package/dist/picker-shell.d.ts +12 -0
- package/dist/picker-shell.js +1 -1
- package/dist/progress.d.ts +1 -0
- package/dist/search-picker.d.ts +12 -0
- package/dist/select.d.ts +1 -0
- package/dist/skip-link.d.ts +7 -0
- package/dist/skip-link.js +10 -0
- package/dist/slider.d.ts +11 -0
- package/dist/sortable-table-head.d.ts +2 -0
- package/dist/stat-tile.d.ts +5 -0
- package/dist/table-body-skeleton.d.ts +2 -0
- package/dist/table.d.ts +1 -0
- package/dist/tabs.d.ts +9 -5
- package/dist/tabs.js +1 -1
- package/dist/toast.d.ts +7 -1
- package/dist/toggle-group.d.ts +9 -2
- package/dist/toggle-group.js +2 -1
- package/package.json +69 -7
- package/theme.css +11 -0
package/dist/tabs.d.ts
CHANGED
|
@@ -2,15 +2,18 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
4
4
|
import { tabsListVariants, tabsTriggerVariants } from "./internal/tabs-styles.js";
|
|
5
|
+
/** Props `TabsList` and `TabsNav` share for the scroller around their row. */
|
|
6
|
+
type TabsScrollerClassNameProps = {
|
|
7
|
+
/** Classes for the scroller around the tab row (`h-13` with `p-1` by default). */
|
|
8
|
+
scrollerClassName?: string;
|
|
9
|
+
};
|
|
5
10
|
declare function Tabs({ className, orientation, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): React.JSX.Element;
|
|
6
11
|
/**
|
|
7
12
|
* The tab row inside its scroller. `className` styles the list (its `h-11`
|
|
8
13
|
* height, fill, gap); `scrollerClassName` styles the scroller around it
|
|
9
14
|
* (`h-13` with `p-1` for the active border and focus ring).
|
|
10
15
|
*/
|
|
11
|
-
declare function TabsList({ className, scrollerClassName, variant, ...props }: React.ComponentProps<typeof TabsPrimitive.List> & Omit<VariantProps<typeof tabsListVariants>, "orientation"> &
|
|
12
|
-
scrollerClassName?: string;
|
|
13
|
-
}): React.JSX.Element;
|
|
16
|
+
declare function TabsList({ className, scrollerClassName, variant, ...props }: React.ComponentProps<typeof TabsPrimitive.List> & Omit<VariantProps<typeof tabsListVariants>, "orientation"> & TabsScrollerClassNameProps): React.JSX.Element;
|
|
14
17
|
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): React.JSX.Element;
|
|
15
18
|
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): React.JSX.Element;
|
|
16
19
|
/**
|
|
@@ -28,9 +31,10 @@ declare function TabsContent({ className, ...props }: React.ComponentProps<typeo
|
|
|
28
31
|
* `overflow-x-auto`. `scrollerClassName` styles that scroller and
|
|
29
32
|
* `listClassName` the row of links inside it.
|
|
30
33
|
*/
|
|
31
|
-
declare function TabsNav({ className, scrollerClassName, listClassName, children, ...props }: React.ComponentProps<"nav"> & {
|
|
34
|
+
declare function TabsNav({ className, scrollerClassName, listClassName, children, ...props }: React.ComponentProps<"nav"> & TabsScrollerClassNameProps & {
|
|
35
|
+
/** Required accessible name for the nav landmark. */
|
|
32
36
|
"aria-label": string;
|
|
33
|
-
|
|
37
|
+
/** Classes for the row of links inside the scroller. */
|
|
34
38
|
listClassName?: string;
|
|
35
39
|
}): React.JSX.Element;
|
|
36
40
|
export { Tabs, TabsList, TabsTrigger, TabsContent, TabsNav, tabsListVariants, tabsTriggerVariants, };
|
package/dist/tabs.js
CHANGED
|
@@ -61,7 +61,7 @@ function TabsTrigger({ className, ...props }) {
|
|
|
61
61
|
return (_jsx(TabsPrimitive.Trigger, { "data-slot": "tabs-trigger", className: cn(tabsTriggerVariants(), className), ...props }));
|
|
62
62
|
}
|
|
63
63
|
function TabsContent({ className, ...props }) {
|
|
64
|
-
return (_jsx(TabsPrimitive.Content, { "data-slot": "tabs-content", className: cn("flex-1 text-sm
|
|
64
|
+
return (_jsx(TabsPrimitive.Content, { "data-slot": "tabs-content", className: cn("flex-1 text-sm", focusRing, className), ...props }));
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Tab-styled links for a view switcher that changes the URL. Use this, not
|
package/dist/toast.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ import { type ReactNode } from "react";
|
|
|
3
3
|
type ToastId = string | number;
|
|
4
4
|
/** A button in a toast. Clicking it runs `onClick`, then closes the toast. */
|
|
5
5
|
interface ToastAction {
|
|
6
|
+
/** The button's text. */
|
|
6
7
|
label: string;
|
|
8
|
+
/** Runs when the button is clicked, before the toast closes. */
|
|
7
9
|
onClick: () => void;
|
|
8
10
|
}
|
|
9
11
|
interface ToastOptions {
|
|
@@ -21,9 +23,13 @@ interface ToastOptions {
|
|
|
21
23
|
/** Shows a toast and returns its id. */
|
|
22
24
|
type ShowToast = (message: ReactNode, options?: ToastOptions) => ToastId;
|
|
23
25
|
type Toast = ShowToast & {
|
|
26
|
+
/** A toast with a check icon and a success-toned title and border. */
|
|
24
27
|
success: ShowToast;
|
|
28
|
+
/** A toast with an info icon. */
|
|
25
29
|
info: ShowToast;
|
|
30
|
+
/** A toast with an alert icon and a warning-toned title and border. */
|
|
26
31
|
warning: ShowToast;
|
|
32
|
+
/** A toast with an alert icon and a destructive-toned title and border. */
|
|
27
33
|
error: ShowToast;
|
|
28
34
|
/** A spinner toast that stays until it is replaced (same `id`) or dismissed. */
|
|
29
35
|
loading: ShowToast;
|
|
@@ -36,7 +42,7 @@ interface ToasterProps {
|
|
|
36
42
|
position?: ToastPosition;
|
|
37
43
|
/** A labelled close button on every toast. Default `true`. */
|
|
38
44
|
closeButton?: boolean;
|
|
39
|
-
/** Keep the stack expanded instead of collapsed behind the newest toast. */
|
|
45
|
+
/** Keep the stack expanded instead of collapsed behind the newest toast. Default `false`. */
|
|
40
46
|
expand?: boolean;
|
|
41
47
|
/** How many toasts show at once. Default 3. */
|
|
42
48
|
visibleToasts?: number;
|
package/dist/toggle-group.d.ts
CHANGED
|
@@ -2,9 +2,16 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
|
|
4
4
|
import { toggleVariants } from "./toggle.js";
|
|
5
|
-
|
|
5
|
+
/** Layout props a `ToggleGroup` shares with its items. */
|
|
6
|
+
type ToggleGroupLayoutProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Gap between items, in spacing units. `0` joins them into one segmented
|
|
9
|
+
* control. Default `2`.
|
|
10
|
+
*/
|
|
6
11
|
spacing?: number;
|
|
12
|
+
/** Lay items out in a row or a column. Default `horizontal`. */
|
|
7
13
|
orientation?: "horizontal" | "vertical";
|
|
8
|
-
}
|
|
14
|
+
};
|
|
15
|
+
declare function ToggleGroup({ className, variant, size, spacing, orientation, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & ToggleGroupLayoutProps): React.JSX.Element;
|
|
9
16
|
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): React.JSX.Element;
|
|
10
17
|
export { ToggleGroup, ToggleGroupItem };
|
package/dist/toggle-group.js
CHANGED
|
@@ -12,7 +12,8 @@ const ToggleGroupContext = React.createContext({
|
|
|
12
12
|
orientation: "horizontal",
|
|
13
13
|
});
|
|
14
14
|
function ToggleGroup({ className, variant, size, spacing = 2, orientation = "horizontal", children, ...props }) {
|
|
15
|
-
|
|
15
|
+
const context = React.useMemo(() => ({ variant, size, spacing, orientation }), [variant, size, spacing, orientation]);
|
|
16
|
+
return (_jsx(ToggleGroupPrimitive.Root, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, "data-orientation": orientation, style: { "--gap": spacing }, className: cn("group/toggle-group flex w-fit max-w-full flex-row flex-wrap items-center gap-[--spacing(var(--gap))] data-[spacing=0]:data-[variant=outline]:rounded-none data-vertical:flex-col data-vertical:flex-nowrap data-vertical:items-stretch", className), ...props, children: _jsx(ToggleGroupContext.Provider, { value: context, children: children }) }));
|
|
16
17
|
}
|
|
17
18
|
function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
|
|
18
19
|
const context = React.useContext(ToggleGroupContext);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atlas-react-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Shared React components and Tailwind theme for Atlas",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,6 +52,10 @@
|
|
|
52
52
|
"types": "./dist/card.d.ts",
|
|
53
53
|
"default": "./dist/card.js"
|
|
54
54
|
},
|
|
55
|
+
"./chart": {
|
|
56
|
+
"types": "./dist/chart.d.ts",
|
|
57
|
+
"default": "./dist/chart.js"
|
|
58
|
+
},
|
|
55
59
|
"./checkbox": {
|
|
56
60
|
"types": "./dist/checkbox.d.ts",
|
|
57
61
|
"default": "./dist/checkbox.js"
|
|
@@ -100,6 +104,10 @@
|
|
|
100
104
|
"types": "./dist/input.d.ts",
|
|
101
105
|
"default": "./dist/input.js"
|
|
102
106
|
},
|
|
107
|
+
"./kanban": {
|
|
108
|
+
"types": "./dist/kanban.d.ts",
|
|
109
|
+
"default": "./dist/kanban.js"
|
|
110
|
+
},
|
|
103
111
|
"./label": {
|
|
104
112
|
"types": "./dist/label.d.ts",
|
|
105
113
|
"default": "./dist/label.js"
|
|
@@ -116,10 +124,18 @@
|
|
|
116
124
|
"types": "./dist/nav-link.d.ts",
|
|
117
125
|
"default": "./dist/nav-link.js"
|
|
118
126
|
},
|
|
127
|
+
"./page-header": {
|
|
128
|
+
"types": "./dist/page-header.d.ts",
|
|
129
|
+
"default": "./dist/page-header.js"
|
|
130
|
+
},
|
|
119
131
|
"./pagination": {
|
|
120
132
|
"types": "./dist/pagination.d.ts",
|
|
121
133
|
"default": "./dist/pagination.js"
|
|
122
134
|
},
|
|
135
|
+
"./period-stepper": {
|
|
136
|
+
"types": "./dist/period-stepper.d.ts",
|
|
137
|
+
"default": "./dist/period-stepper.js"
|
|
138
|
+
},
|
|
123
139
|
"./popover": {
|
|
124
140
|
"types": "./dist/popover.d.ts",
|
|
125
141
|
"default": "./dist/popover.js"
|
|
@@ -148,6 +164,10 @@
|
|
|
148
164
|
"types": "./dist/skeleton.d.ts",
|
|
149
165
|
"default": "./dist/skeleton.js"
|
|
150
166
|
},
|
|
167
|
+
"./skip-link": {
|
|
168
|
+
"types": "./dist/skip-link.d.ts",
|
|
169
|
+
"default": "./dist/skip-link.js"
|
|
170
|
+
},
|
|
151
171
|
"./slider": {
|
|
152
172
|
"types": "./dist/slider.d.ts",
|
|
153
173
|
"default": "./dist/slider.js"
|
|
@@ -204,6 +224,14 @@
|
|
|
204
224
|
"types": "./dist/tooltip.d.ts",
|
|
205
225
|
"default": "./dist/tooltip.js"
|
|
206
226
|
},
|
|
227
|
+
"./form/checkbox-field": {
|
|
228
|
+
"types": "./dist/form/checkbox-field.d.ts",
|
|
229
|
+
"default": "./dist/form/checkbox-field.js"
|
|
230
|
+
},
|
|
231
|
+
"./form/combobox-field": {
|
|
232
|
+
"types": "./dist/form/combobox-field.d.ts",
|
|
233
|
+
"default": "./dist/form/combobox-field.js"
|
|
234
|
+
},
|
|
207
235
|
"./form/control-field": {
|
|
208
236
|
"types": "./dist/form/control-field.d.ts",
|
|
209
237
|
"default": "./dist/form/control-field.js"
|
|
@@ -216,14 +244,14 @@
|
|
|
216
244
|
"types": "./dist/form/date-time-picker-field.d.ts",
|
|
217
245
|
"default": "./dist/form/date-time-picker-field.js"
|
|
218
246
|
},
|
|
219
|
-
"./form/field-error": {
|
|
220
|
-
"types": "./dist/form/field-error.d.ts",
|
|
221
|
-
"default": "./dist/form/field-error.js"
|
|
222
|
-
},
|
|
223
247
|
"./form/feedback-field": {
|
|
224
248
|
"types": "./dist/form/feedback-field.d.ts",
|
|
225
249
|
"default": "./dist/form/feedback-field.js"
|
|
226
250
|
},
|
|
251
|
+
"./form/field-error": {
|
|
252
|
+
"types": "./dist/form/field-error.d.ts",
|
|
253
|
+
"default": "./dist/form/field-error.js"
|
|
254
|
+
},
|
|
227
255
|
"./form/markdown-field": {
|
|
228
256
|
"types": "./dist/form/markdown-field.d.ts",
|
|
229
257
|
"default": "./dist/form/markdown-field.js"
|
|
@@ -236,10 +264,18 @@
|
|
|
236
264
|
"types": "./dist/form/text-field.d.ts",
|
|
237
265
|
"default": "./dist/form/text-field.js"
|
|
238
266
|
},
|
|
267
|
+
"./form/toggle-group-field": {
|
|
268
|
+
"types": "./dist/form/toggle-group-field.d.ts",
|
|
269
|
+
"default": "./dist/form/toggle-group-field.js"
|
|
270
|
+
},
|
|
239
271
|
"./next/nav-link": {
|
|
240
272
|
"types": "./dist/next/nav-link.d.ts",
|
|
241
273
|
"default": "./dist/next/nav-link.js"
|
|
242
274
|
},
|
|
275
|
+
"./next/period-stepper": {
|
|
276
|
+
"types": "./dist/next/period-stepper.d.ts",
|
|
277
|
+
"default": "./dist/next/period-stepper.js"
|
|
278
|
+
},
|
|
243
279
|
"./next/tabs-nav-link": {
|
|
244
280
|
"types": "./dist/next/tabs-nav-link.d.ts",
|
|
245
281
|
"default": "./dist/next/tabs-nav-link.js"
|
|
@@ -257,9 +293,17 @@
|
|
|
257
293
|
"build": "tsc",
|
|
258
294
|
"check": "npm run build && npm run docs:check && prettier --check .",
|
|
259
295
|
"docs:check": "node scripts/check-doc-links.mjs",
|
|
296
|
+
"lint": "oxlint --type-aware --deny-warnings",
|
|
297
|
+
"knip": "knip",
|
|
298
|
+
"sast": "node scripts/sast.mjs",
|
|
299
|
+
"secrets": "secretlint \"**/*\"",
|
|
300
|
+
"size": "size-limit",
|
|
301
|
+
"gate:static": "npm run lint && npm run knip && npm run sast && npm run secrets",
|
|
302
|
+
"gate": "npm run check && npm run gate:static && npm run size && vitest run",
|
|
260
303
|
"test": "npm run build && vitest run",
|
|
261
304
|
"test:coverage": "npm run build && vitest run --coverage",
|
|
262
|
-
"prepack": "npm run build"
|
|
305
|
+
"prepack": "npm run build",
|
|
306
|
+
"prepare": "lefthook install"
|
|
263
307
|
},
|
|
264
308
|
"engines": {
|
|
265
309
|
"node": ">=20.19.0"
|
|
@@ -268,6 +312,8 @@
|
|
|
268
312
|
"access": "public"
|
|
269
313
|
},
|
|
270
314
|
"peerDependencies": {
|
|
315
|
+
"@dnd-kit/dom": "^0.4.0",
|
|
316
|
+
"@dnd-kit/react": "^0.4.0",
|
|
271
317
|
"date-fns": "^4.4.0",
|
|
272
318
|
"next": "^16.0.0",
|
|
273
319
|
"next-themes": "^0.4.6",
|
|
@@ -276,11 +322,16 @@
|
|
|
276
322
|
"react-dom": "^19.0.0",
|
|
277
323
|
"react-markdown": "^10.1.0",
|
|
278
324
|
"remark-gfm": "^4.0.1",
|
|
279
|
-
"remark-parse": "^11.0.0",
|
|
280
325
|
"sonner": "^2.0.7",
|
|
281
326
|
"tailwindcss": "^4.0.0"
|
|
282
327
|
},
|
|
283
328
|
"peerDependenciesMeta": {
|
|
329
|
+
"@dnd-kit/dom": {
|
|
330
|
+
"optional": true
|
|
331
|
+
},
|
|
332
|
+
"@dnd-kit/react": {
|
|
333
|
+
"optional": true
|
|
334
|
+
},
|
|
284
335
|
"date-fns": {
|
|
285
336
|
"optional": true
|
|
286
337
|
},
|
|
@@ -312,6 +363,10 @@
|
|
|
312
363
|
"tw-animate-css": "^1.4.0"
|
|
313
364
|
},
|
|
314
365
|
"devDependencies": {
|
|
366
|
+
"@dnd-kit/dom": "^0.4.0",
|
|
367
|
+
"@dnd-kit/react": "^0.4.0",
|
|
368
|
+
"@secretlint/secretlint-rule-preset-recommend": "^13.0.7",
|
|
369
|
+
"@size-limit/file": "^14.2.0",
|
|
315
370
|
"@testing-library/dom": "^10.4.2",
|
|
316
371
|
"@testing-library/jest-dom": "^7.0.1",
|
|
317
372
|
"@testing-library/react": "^16.3.3",
|
|
@@ -322,14 +377,21 @@
|
|
|
322
377
|
"@vitest/coverage-v8": "5.0.5",
|
|
323
378
|
"date-fns": "^4.4.0",
|
|
324
379
|
"jsdom": "^29.1.1",
|
|
380
|
+
"knip": "^6.41.0",
|
|
381
|
+
"lefthook": "^2.2.2",
|
|
325
382
|
"next": "16.4.2",
|
|
326
383
|
"next-themes": "^0.4.6",
|
|
384
|
+
"oxlint": "^1.88.0",
|
|
385
|
+
"oxlint-tsgolint": "^7.0.2004",
|
|
327
386
|
"prettier": "^3.8.1",
|
|
328
387
|
"react": "^19.2.4",
|
|
329
388
|
"react-day-picker": "^10.0.1",
|
|
330
389
|
"react-dom": "^19.2.4",
|
|
331
390
|
"react-markdown": "^10.1.0",
|
|
332
391
|
"remark-gfm": "^4.0.1",
|
|
392
|
+
"remark-parse": "^11.0.0",
|
|
393
|
+
"secretlint": "^13.0.7",
|
|
394
|
+
"size-limit": "^14.2.0",
|
|
333
395
|
"sonner": "^2.0.7",
|
|
334
396
|
"tailwindcss": "^4.2.1",
|
|
335
397
|
"typescript": "^7.0.2",
|
package/theme.css
CHANGED
|
@@ -197,6 +197,17 @@
|
|
|
197
197
|
* Radix can unmount closing overlays. `!important` in this early layer
|
|
198
198
|
* beats the utility classes that set the animations.
|
|
199
199
|
*/
|
|
200
|
+
/*
|
|
201
|
+
* Forced colors (Windows High Contrast) drop box-shadow, which is how the
|
|
202
|
+
* kit draws its focus ring, so keyboard focus would vanish. Draw it as a
|
|
203
|
+
* system-colored outline there instead (WCAG 2.4.7).
|
|
204
|
+
*/
|
|
205
|
+
@media (forced-colors: active) {
|
|
206
|
+
:focus-visible {
|
|
207
|
+
outline: 2px solid Highlight !important;
|
|
208
|
+
outline-offset: 2px !important;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
200
211
|
@media (prefers-reduced-motion: reduce) {
|
|
201
212
|
*,
|
|
202
213
|
::before,
|