@fiestaboard/ui 5.5.1 → 5.6.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/dist/components/containment/card.d.ts +42 -2
- package/dist/components/containment/card.js +20 -12
- package/dist/components/containment/card.js.map +1 -1
- package/dist/components/containment/icon-tile.d.ts +1 -1
- package/dist/components/feedback/spinner.d.ts +1 -1
- package/dist/components/feedback/status-dot.d.ts +1 -1
- package/dist/components/forms/button.d.ts +1 -1
- package/dist/components/forms/swatch.d.ts +3 -3
- package/dist/components/forms/toggle-card.d.ts +2 -2
- package/dist/components/forms/toggle.d.ts +1 -1
- package/dist/components/typography/heading.d.ts +1 -1
- package/dist/components/typography/text.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,49 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3
3
|
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
4
|
-
|
|
4
|
+
export type CardTitleProps = React.ComponentProps<"h3"> & {
|
|
5
5
|
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Leading glyph. Decorative — the title text is the accessible name, and
|
|
8
|
+
* the wrapper below is `aria-hidden`, so a glyph passed here is never
|
|
9
|
+
* announced. An icon that carries meaning the title does not is a
|
|
10
|
+
* different component (a Badge, a StatusDot); it does not belong in a
|
|
11
|
+
* heading whose text is the name.
|
|
12
|
+
*/
|
|
13
|
+
icon?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* `"base"` is the settings-card scale (#274): 19 FiestaBoard headers spell
|
|
16
|
+
* `text-base` by hand because the default here is the parent's size.
|
|
17
|
+
* `"lg"` is the untouched default, so no existing call site moves.
|
|
18
|
+
*/
|
|
19
|
+
size?: "base" | "lg";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The heading inside a CardHeader, with an optional leading glyph.
|
|
23
|
+
*
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <CardTitle size="base" icon={<Info />}>About</CardTitle>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* The icon slot exists because the alternative had already drifted. Every
|
|
29
|
+
* settings card in FiestaBoard restated the same three decisions inline —
|
|
30
|
+
* turn the title into a flex row, drop it to `text-base`, size the glyph to
|
|
31
|
+
* 16px — and the one decision nobody restated consistently was the glyph's
|
|
32
|
+
* tone: most inherited the title's ink, some were `text-muted-foreground`,
|
|
33
|
+
* one `text-destructive`, one `text-brand`.
|
|
34
|
+
*
|
|
35
|
+
* `text-muted-foreground` is the default here. It is the majority of what
|
|
36
|
+
* the app already spelled, and it is the right reading: next to a
|
|
37
|
+
* `font-semibold` title the glyph is decoration, not a second voice. The
|
|
38
|
+
* other two tones stay reachable — the consumer owns the element passed to
|
|
39
|
+
* `icon`, so a `className` on it wins (see the `:not([class*='size-'])`
|
|
40
|
+
* escape hatch below, which does the same for size).
|
|
41
|
+
*
|
|
42
|
+
* Layout only becomes a flex row when an icon is present. A title without
|
|
43
|
+
* one keeps its original block layout, so this is additive for the ~40 call
|
|
44
|
+
* sites across the two apps that pass no icon.
|
|
45
|
+
*/
|
|
46
|
+
declare function CardTitle({ className, as: Component, icon, size, ...props }: CardTitleProps): React.JSX.Element;
|
|
7
47
|
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
48
|
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
49
|
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
@@ -1,50 +1,58 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/containment/card.tsx
|
|
5
|
-
function
|
|
5
|
+
function r({ className: n, ...r }) {
|
|
6
6
|
return /* @__PURE__ */ t("div", {
|
|
7
7
|
"data-slot": "card",
|
|
8
8
|
className: e("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-card transition-[box-shadow,border-color] duration-base", n),
|
|
9
9
|
...r
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function i({ className: n, ...r }) {
|
|
13
13
|
return /* @__PURE__ */ t("div", {
|
|
14
14
|
"data-slot": "card-header",
|
|
15
15
|
className: e("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", n),
|
|
16
16
|
...r
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
19
|
+
function a({ className: r, as: i = "h3", icon: a, size: o = "lg", ...s }) {
|
|
20
|
+
let { children: c, ...l } = s;
|
|
21
|
+
return /* @__PURE__ */ n(i, {
|
|
21
22
|
"data-slot": "card-title",
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
"data-size": o,
|
|
24
|
+
className: e("leading-none font-semibold", o === "base" && "text-base", a && "flex items-center gap-2", r),
|
|
25
|
+
...l,
|
|
26
|
+
children: [a ? /* @__PURE__ */ t("span", {
|
|
27
|
+
"data-slot": "card-title-icon",
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
className: e("inline-flex shrink-0 items-center justify-center text-muted-foreground", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"),
|
|
30
|
+
children: a
|
|
31
|
+
}) : null, c]
|
|
24
32
|
});
|
|
25
33
|
}
|
|
26
|
-
function
|
|
34
|
+
function o({ className: n, ...r }) {
|
|
27
35
|
return /* @__PURE__ */ t("div", {
|
|
28
36
|
"data-slot": "card-description",
|
|
29
37
|
className: e("text-muted-foreground text-sm", n),
|
|
30
38
|
...r
|
|
31
39
|
});
|
|
32
40
|
}
|
|
33
|
-
function
|
|
41
|
+
function s({ className: n, ...r }) {
|
|
34
42
|
return /* @__PURE__ */ t("div", {
|
|
35
43
|
"data-slot": "card-action",
|
|
36
44
|
className: e("col-start-2 row-span-2 row-start-1 self-start justify-self-end", n),
|
|
37
45
|
...r
|
|
38
46
|
});
|
|
39
47
|
}
|
|
40
|
-
function
|
|
48
|
+
function c({ className: n, ...r }) {
|
|
41
49
|
return /* @__PURE__ */ t("div", {
|
|
42
50
|
"data-slot": "card-content",
|
|
43
51
|
className: e("px-6", n),
|
|
44
52
|
...r
|
|
45
53
|
});
|
|
46
54
|
}
|
|
47
|
-
function
|
|
55
|
+
function l({ className: n, ...r }) {
|
|
48
56
|
return /* @__PURE__ */ t("div", {
|
|
49
57
|
"data-slot": "card-footer",
|
|
50
58
|
className: e("flex items-center px-6 [.border-t]:pt-6", n),
|
|
@@ -52,6 +60,6 @@ function c({ className: n, ...r }) {
|
|
|
52
60
|
});
|
|
53
61
|
}
|
|
54
62
|
//#endregion
|
|
55
|
-
export {
|
|
63
|
+
export { r as Card, s as CardAction, c as CardContent, o as CardDescription, l as CardFooter, i as CardHeader, a as CardTitle };
|
|
56
64
|
|
|
57
65
|
//# sourceMappingURL=card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","names":[],"sources":["../../../src/components/containment/card.tsx"],"mappings":";;;;AAIA,SAAS,EAAK,EAAE,cAAW,GAAG,KAAsC;CAClE,OACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAW,EACT,0IACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;CACxE,OACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAW,EACT,4JACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../../../src/components/containment/card.tsx"],"mappings":";;;;AAIA,SAAS,EAAK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
42
42
|
* was promoted to fix.
|
|
43
43
|
*/
|
|
44
44
|
declare const iconTileVariants: (props?: ({
|
|
45
|
-
size?: "
|
|
45
|
+
size?: "lg" | "sm" | "md" | null | undefined;
|
|
46
46
|
tone?: "muted" | "board" | null | undefined;
|
|
47
47
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
48
48
|
export type IconTileProps = React.ComponentProps<"span"> & VariantProps<typeof iconTileVariants> & {
|
|
@@ -10,7 +10,7 @@ import * as React from "react";
|
|
|
10
10
|
* lg 20px Button size="lg" / "icon-lg" (h-10)
|
|
11
11
|
*/
|
|
12
12
|
declare const spinnerVariants: (props?: ({
|
|
13
|
-
size?: "
|
|
13
|
+
size?: "lg" | "sm" | "md" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
export interface SpinnerProps extends Omit<React.ComponentProps<"span">, "children">, VariantProps<typeof spinnerVariants> {
|
|
16
16
|
/**
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const statusDotVariants: (props?: ({
|
|
4
4
|
status?: "info" | "success" | "warning" | "danger" | "neutral" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "lg" | "sm" | "md" | null | undefined;
|
|
6
6
|
pulse?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface StatusDotProps extends Omit<React.ComponentProps<"span">, "children" | "color">, VariantProps<typeof statusDotVariants> {
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "destructive" | "brand" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "lg" | "icon" | "sm" | "default" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, loading, children, onClick, ref, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -5,13 +5,13 @@ declare const swatchGroupVariants: (props?: ({
|
|
|
5
5
|
wrap?: boolean | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare const swatchVariants: (props?: ({
|
|
8
|
-
size?: "
|
|
8
|
+
size?: "lg" | "sm" | "md" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
declare const swatchFillVariants: (props?: ({
|
|
11
|
-
size?: "
|
|
11
|
+
size?: "lg" | "sm" | "md" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
declare const swatchIndicatorVariants: (props?: ({
|
|
14
|
-
size?: "
|
|
14
|
+
size?: "lg" | "sm" | "md" | null | undefined;
|
|
15
15
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
16
|
type SwatchSize = NonNullable<VariantProps<typeof swatchVariants>["size"]>;
|
|
17
17
|
export type SwatchGroupProps = SelectionGroupBaseProps & SelectionGroupNameProps & VariantProps<typeof swatchGroupVariants> & {
|
|
@@ -13,7 +13,7 @@ declare const toggleCardGroupVariants: (props?: ({
|
|
|
13
13
|
columns?: "1" | "2" | "3" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
declare const toggleCardVariants: (props?: ({
|
|
16
|
-
size?: "
|
|
16
|
+
size?: "lg" | "sm" | "md" | null | undefined;
|
|
17
17
|
align?: "start" | "center" | null | undefined;
|
|
18
18
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
19
19
|
type ToggleCardSize = NonNullable<VariantProps<typeof toggleCardVariants>["size"]>;
|
|
@@ -81,7 +81,7 @@ declare const segmentedControlVariants: (props?: ({
|
|
|
81
81
|
wrap?: boolean | null | undefined;
|
|
82
82
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
83
83
|
declare const segmentedControlItemVariants: (props?: ({
|
|
84
|
-
size?: "
|
|
84
|
+
size?: "lg" | "sm" | "md" | null | undefined;
|
|
85
85
|
layout?: "grid" | "inline" | null | undefined;
|
|
86
86
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
87
87
|
type SegmentedControlSize = NonNullable<VariantProps<typeof segmentedControlItemVariants>["size"]>;
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import type { SelectionGroupNameProps } from "./toggle-card";
|
|
6
6
|
declare const toggleVariants: (props?: ({
|
|
7
7
|
variant?: "default" | "outline" | null | undefined;
|
|
8
|
-
size?: "
|
|
8
|
+
size?: "lg" | "icon" | "sm" | "default" | "icon-sm" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
export type ToggleProps = Omit<React.ComponentProps<typeof TogglePrimitive>, "onPressedChange"> & VariantProps<typeof toggleVariants> & {
|
|
11
11
|
/**
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const headingVariants: (props?: ({
|
|
4
4
|
tone?: "muted" | "default" | "destructive" | null | undefined;
|
|
5
|
-
size?: "base" | "
|
|
5
|
+
size?: "base" | "lg" | "sm" | "xl" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof headingVariants> {
|
|
8
8
|
/** Semantic heading element. h1 is reserved for PageHeader. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const textVariants: (props?: ({
|
|
4
|
-
size?: "base" | "
|
|
4
|
+
size?: "base" | "lg" | "sm" | "xs" | null | undefined;
|
|
5
5
|
tone?: "muted" | "default" | "destructive" | "info" | "success" | "warning" | null | undefined;
|
|
6
6
|
weight?: "normal" | "medium" | "semibold" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|