atlas-react-kit 0.11.1 → 0.11.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/README.md +2 -2
- package/dist/card.d.ts +1 -1
- package/dist/card.js +13 -2
- package/dist/internal/styles.d.ts +2 -2
- package/dist/internal/styles.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ React 19, Tailwind 4, and Node >=20.19 are required. Next 16 is needed only
|
|
|
8
8
|
when using `next/tabs-nav-link`.
|
|
9
9
|
|
|
10
10
|
```sh
|
|
11
|
-
npm install --save-exact atlas-react-kit@0.11.
|
|
11
|
+
npm install --save-exact atlas-react-kit@0.11.2
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Import components by subpath:
|
|
@@ -128,7 +128,7 @@ artifact with the package owner's npm login:
|
|
|
128
128
|
```sh
|
|
129
129
|
mkdir -p release-artifacts
|
|
130
130
|
npm pack --pack-destination release-artifacts
|
|
131
|
-
npm publish ./release-artifacts/atlas-react-kit-0.11.
|
|
131
|
+
npm publish ./release-artifacts/atlas-react-kit-0.11.2.tgz --access public
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
Pin an exact package version in consuming applications. Roll back an upgrade by
|
package/dist/card.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import * as React from "react";
|
|
|
7
7
|
* collapsing inside a bounded flex column. `min-w-0` lets nested tables
|
|
8
8
|
* scroll instead of widening the card. `overflow-hidden` still clips media.
|
|
9
9
|
*/
|
|
10
|
-
declare function Card({ className, size, flush, ...props }: React.ComponentProps<"div"> & {
|
|
10
|
+
declare function Card({ className, size, flush, role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: React.ComponentProps<"div"> & {
|
|
11
11
|
size?: "default" | "sm";
|
|
12
12
|
flush?: boolean;
|
|
13
13
|
}): React.JSX.Element;
|
package/dist/card.js
CHANGED
|
@@ -9,8 +9,19 @@ import { cn } from "./utils.js";
|
|
|
9
9
|
* collapsing inside a bounded flex column. `min-w-0` lets nested tables
|
|
10
10
|
* scroll instead of widening the card. `overflow-hidden` still clips media.
|
|
11
11
|
*/
|
|
12
|
-
function Card({ className, size = "default", flush = false, ...props }) {
|
|
13
|
-
|
|
12
|
+
function Card({ className, size = "default", flush = false, role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }) {
|
|
13
|
+
const canName = role &&
|
|
14
|
+
[
|
|
15
|
+
"region",
|
|
16
|
+
"main",
|
|
17
|
+
"navigation",
|
|
18
|
+
"complementary",
|
|
19
|
+
"banner",
|
|
20
|
+
"contentinfo",
|
|
21
|
+
"form",
|
|
22
|
+
"search",
|
|
23
|
+
].includes(role);
|
|
24
|
+
return (_jsx("div", { "data-slot": "card", "data-size": size, role: role, "aria-label": canName ? ariaLabel : undefined, "aria-labelledby": canName ? ariaLabelledBy : undefined, className: cn("group/card flex min-h-min min-w-0 shrink-0 flex-col overflow-hidden bg-card text-sm text-card-foreground shadow-sm ring-1 ring-foreground/5 has-[>img:first-child]:pt-0 *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none", size === "sm"
|
|
14
25
|
? "gap-5 [--card-p:--spacing(5)]"
|
|
15
26
|
: "gap-8 [--card-p:--spacing(8)]", flush && "[--card-p:0px]", className), ...props }));
|
|
16
27
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* its own complete string. `test/dry.test.ts` fails when a component types
|
|
7
7
|
* one of these by hand.
|
|
8
8
|
*/
|
|
9
|
-
/** Keyboard focus: a
|
|
10
|
-
export declare const focusRing = "outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring";
|
|
9
|
+
/** Keyboard focus: a solid 2px ring separated from filled controls (WCAG 1.4.11). */
|
|
10
|
+
export declare const focusRing = "outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background";
|
|
11
11
|
/** `aria-invalid`: destructive border and a soft glow; the error text carries the message. */
|
|
12
12
|
export declare const invalidState = "aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40";
|
|
13
13
|
/** Native `disabled`: dimmed, with no hover or click. */
|
package/dist/internal/styles.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* its own complete string. `test/dry.test.ts` fails when a component types
|
|
7
7
|
* one of these by hand.
|
|
8
8
|
*/
|
|
9
|
-
/** Keyboard focus: a
|
|
10
|
-
export const focusRing = "outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring";
|
|
9
|
+
/** Keyboard focus: a solid 2px ring separated from filled controls (WCAG 1.4.11). */
|
|
10
|
+
export const focusRing = "outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background";
|
|
11
11
|
/** `aria-invalid`: destructive border and a soft glow; the error text carries the message. */
|
|
12
12
|
export const invalidState = "aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40";
|
|
13
13
|
/** Native `disabled`: dimmed, with no hover or click. */
|