@psnext/design-system 1.3.0 → 1.5.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/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index10.d.cts +6 -6
- package/dist/index10.d.cts.map +1 -1
- package/dist/index10.d.ts +6 -6
- package/dist/index10.d.ts.map +1 -1
- package/dist/index11.d.cts +3 -3
- package/dist/index11.d.ts +3 -3
- package/dist/index11.d.ts.map +1 -1
- package/dist/index12.d.cts +9 -9
- package/dist/index12.d.ts +12 -12
- package/dist/index12.d.ts.map +1 -1
- package/dist/index13.d.cts +6 -6
- package/dist/index13.d.ts +6 -6
- package/dist/index14.d.cts +5 -5
- package/dist/index14.d.ts +5 -5
- package/dist/index15.d.cts +3 -3
- package/dist/index15.d.cts.map +1 -1
- package/dist/index15.d.ts +3 -3
- package/dist/index16.d.cts +2 -2
- package/dist/index16.d.ts +2 -2
- package/dist/index17.d.cts +4 -4
- package/dist/index17.d.ts +4 -4
- package/dist/index17.d.ts.map +1 -1
- package/dist/index18.d.cts +11 -11
- package/dist/index18.d.ts +11 -11
- package/dist/index19.d.cts +10 -10
- package/dist/index19.d.cts.map +1 -1
- package/dist/index19.d.ts +10 -10
- package/dist/index2.d.cts +8 -8
- package/dist/index2.d.cts.map +1 -1
- package/dist/index2.d.ts +8 -8
- package/dist/index20.d.cts +16 -16
- package/dist/index20.d.cts.map +1 -1
- package/dist/index20.d.ts +16 -16
- package/dist/index21.d.cts +4 -4
- package/dist/index21.d.cts.map +1 -1
- package/dist/index21.d.ts +4 -4
- package/dist/index22.d.cts +11 -11
- package/dist/index22.d.cts.map +1 -1
- package/dist/index22.d.ts +11 -11
- package/dist/index23.d.cts +16 -16
- package/dist/index23.d.ts +16 -16
- package/dist/index24.d.cts +10 -10
- package/dist/index24.d.cts.map +1 -1
- package/dist/index24.d.ts +10 -10
- package/dist/index25.d.cts +2 -2
- package/dist/index25.d.ts +2 -2
- package/dist/index25.d.ts.map +1 -1
- package/dist/index26.d.cts +13 -13
- package/dist/index26.d.cts.map +1 -1
- package/dist/index26.d.ts +13 -13
- package/dist/index27.d.cts +7 -7
- package/dist/index27.d.ts +7 -7
- package/dist/index28.d.cts +4 -4
- package/dist/index28.d.cts.map +1 -1
- package/dist/index28.d.ts +4 -4
- package/dist/index28.d.ts.map +1 -1
- package/dist/index29.d.cts +4 -4
- package/dist/index29.d.cts.map +1 -1
- package/dist/index29.d.ts +4 -4
- package/dist/index3.d.cts +13 -13
- package/dist/index3.d.cts.map +1 -1
- package/dist/index3.d.ts +13 -13
- package/dist/index3.d.ts.map +1 -1
- package/dist/index30.d.cts +5 -5
- package/dist/index30.d.cts.map +1 -1
- package/dist/index30.d.ts +6 -6
- package/dist/index30.d.ts.map +1 -1
- package/dist/index31.d.cts +5 -5
- package/dist/index31.d.cts.map +1 -1
- package/dist/index31.d.ts +4 -4
- package/dist/index31.d.ts.map +1 -1
- package/dist/index32.d.cts +5 -5
- package/dist/index32.d.ts +5 -5
- package/dist/index32.d.ts.map +1 -1
- package/dist/index33.d.cts +10 -10
- package/dist/index33.d.cts.map +1 -1
- package/dist/index33.d.ts +11 -11
- package/dist/index33.d.ts.map +1 -1
- package/dist/index34.d.cts +5 -5
- package/dist/index34.d.ts +5 -5
- package/dist/index35.d.cts +17 -17
- package/dist/index35.d.cts.map +1 -1
- package/dist/index35.d.ts +16 -16
- package/dist/index35.d.ts.map +1 -1
- package/dist/index36.d.cts +3 -3
- package/dist/index36.d.ts +3 -3
- package/dist/index36.d.ts.map +1 -1
- package/dist/index37.d.cts +4 -4
- package/dist/index37.d.ts +4 -4
- package/dist/index37.d.ts.map +1 -1
- package/dist/index38.d.cts +2 -2
- package/dist/index38.d.cts.map +1 -1
- package/dist/index38.d.ts +2 -2
- package/dist/index39.d.cts +17 -17
- package/dist/index39.d.cts.map +1 -1
- package/dist/index39.d.ts +17 -17
- package/dist/index4.d.cts +2 -2
- package/dist/index4.d.ts +2 -2
- package/dist/index4.d.ts.map +1 -1
- package/dist/index40.d.cts +5 -5
- package/dist/index40.d.cts.map +1 -1
- package/dist/index40.d.ts +5 -5
- package/dist/index40.d.ts.map +1 -1
- package/dist/index41.d.cts +9 -9
- package/dist/index41.d.ts +11 -11
- package/dist/index42.d.cts +8 -8
- package/dist/index42.d.cts.map +1 -1
- package/dist/index42.d.ts +8 -8
- package/dist/index43.d.cts +9 -9
- package/dist/index43.d.ts +9 -9
- package/dist/index43.d.ts.map +1 -1
- package/dist/index44.d.cts +8 -8
- package/dist/index44.d.cts.map +1 -1
- package/dist/index44.d.ts +8 -8
- package/dist/index44.d.ts.map +1 -1
- package/dist/index45.d.cts +2 -2
- package/dist/index45.d.cts.map +1 -1
- package/dist/index45.d.ts +2 -2
- package/dist/index45.d.ts.map +1 -1
- package/dist/index46.d.cts +4 -4
- package/dist/index46.d.cts.map +1 -1
- package/dist/index46.d.ts +4 -4
- package/dist/index47.d.cts +4 -4
- package/dist/index47.d.cts.map +1 -1
- package/dist/index47.d.ts +4 -4
- package/dist/index48.d.cts +3 -3
- package/dist/index48.d.cts.map +1 -1
- package/dist/index48.d.ts +3 -3
- package/dist/index48.d.ts.map +1 -1
- package/dist/index49.d.cts +11 -11
- package/dist/index49.d.cts.map +1 -1
- package/dist/index49.d.ts +11 -11
- package/dist/index49.d.ts.map +1 -1
- package/dist/index5.d.cts +7 -7
- package/dist/index5.d.ts +7 -7
- package/dist/index5.d.ts.map +1 -1
- package/dist/index50.d.cts +9 -9
- package/dist/index50.d.ts +9 -9
- package/dist/index51.d.cts +5 -5
- package/dist/index51.d.ts +5 -5
- package/dist/index51.d.ts.map +1 -1
- package/dist/index52.d.cts +27 -27
- package/dist/index52.d.cts.map +1 -1
- package/dist/index52.d.ts +25 -25
- package/dist/index52.d.ts.map +1 -1
- package/dist/index53.d.cts +5 -5
- package/dist/index53.d.ts +5 -5
- package/dist/index53.d.ts.map +1 -1
- package/dist/index54.d.cts +2 -2
- package/dist/index54.d.ts +2 -2
- package/dist/index54.d.ts.map +1 -1
- package/dist/index55.d.cts +2 -2
- package/dist/index55.d.cts.map +1 -1
- package/dist/index55.d.ts +2 -2
- package/dist/index56.d.cts +2 -2
- package/dist/index56.d.ts +2 -2
- package/dist/index57.d.cts +4 -4
- package/dist/index57.d.ts +4 -4
- package/dist/index58.d.cts +9 -9
- package/dist/index58.d.ts +9 -9
- package/dist/index59.d.cts +14 -9
- package/dist/index59.d.cts.map +1 -1
- package/dist/index59.d.ts +16 -11
- package/dist/index59.d.ts.map +1 -1
- package/dist/index6.d.cts +5 -5
- package/dist/index6.d.ts +5 -5
- package/dist/index6.d.ts.map +1 -1
- package/dist/index60.d.cts +5 -5
- package/dist/index60.d.ts +5 -5
- package/dist/index61.d.cts +4 -4
- package/dist/index61.d.cts.map +1 -1
- package/dist/index61.d.ts +4 -4
- package/dist/index62.d.cts +2 -2
- package/dist/index62.d.cts.map +1 -1
- package/dist/index62.d.ts +2 -2
- package/dist/index63.d.cts +5 -5
- package/dist/index63.d.ts +6 -6
- package/dist/index64.d.cts +3 -3
- package/dist/index64.d.ts +3 -3
- package/dist/index64.d.ts.map +1 -1
- package/dist/index65.d.cts +4 -4
- package/dist/index65.d.ts +4 -4
- package/dist/index66.d.cts +2 -2
- package/dist/index66.d.ts +2 -2
- package/dist/index66.d.ts.map +1 -1
- package/dist/index67.d.cts +4 -4
- package/dist/index67.d.ts +5 -5
- package/dist/index67.d.ts.map +1 -1
- package/dist/index68.d.cts +6 -6
- package/dist/index68.d.ts +7 -7
- package/dist/index68.d.ts.map +1 -1
- package/dist/index7.d.cts +8 -8
- package/dist/index7.d.cts.map +1 -1
- package/dist/index7.d.ts +8 -8
- package/dist/index7.d.ts.map +1 -1
- package/dist/index70.d.cts +8 -8
- package/dist/index70.d.ts +8 -8
- package/dist/index8.d.cts +4 -4
- package/dist/index8.d.ts +3 -3
- package/dist/index9.d.cts +2 -2
- package/dist/index9.d.cts.map +1 -1
- package/dist/index9.d.ts +2 -2
- package/dist/index9.d.ts.map +1 -1
- package/dist/patterns/DataTable/index.d.cts +3 -3
- package/dist/patterns/DataTable/index.d.ts +3 -3
- package/dist/patterns/Footer/index.d.cts +7 -7
- package/dist/patterns/Footer/index.d.ts +7 -7
- package/dist/patterns/MediaObject/index.d.cts +11 -11
- package/dist/patterns/MediaObject/index.d.ts +13 -13
- package/dist/patterns/MediaObject/index.d.ts.map +1 -1
- package/dist/patterns/SectionCard/index.d.cts +2 -2
- package/dist/patterns/SectionCard/index.d.ts +2 -2
- package/dist/patterns/SectionCard/index.d.ts.map +1 -1
- package/dist/patterns/SectionHeading/index.d.cts +2 -2
- package/dist/patterns/SectionHeading/index.d.ts +2 -2
- package/dist/patterns/SectionHeading/index.d.ts.map +1 -1
- package/dist/primitives/Tabs/index.cjs +22 -17
- package/dist/primitives/Tabs/index.cjs.map +1 -1
- package/dist/primitives/Tabs/index.js +22 -17
- package/dist/primitives/Tabs/index.js.map +1 -1
- package/dist/styles/base.css +49 -44
- package/dist/styles/typography.css +118 -112
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime273 from "react/jsx-runtime";
|
|
2
2
|
import { Column, ColumnDef } from "@tanstack/react-table";
|
|
3
3
|
|
|
4
4
|
//#region src/patterns/DataTable/DataTable.d.ts
|
|
@@ -24,7 +24,7 @@ declare function DataTable<TData, TValue>({
|
|
|
24
24
|
striped,
|
|
25
25
|
enablePagination,
|
|
26
26
|
pageSize
|
|
27
|
-
}: DataTableProps<TData, TValue>):
|
|
27
|
+
}: DataTableProps<TData, TValue>): react_jsx_runtime273.JSX.Element;
|
|
28
28
|
/** Sortable column header — drop into a column's `header` to get click-to-sort. */
|
|
29
29
|
declare function DataTableColumnHeader<TData, TValue>({
|
|
30
30
|
column,
|
|
@@ -37,7 +37,7 @@ declare function DataTableColumnHeader<TData, TValue>({
|
|
|
37
37
|
title: string;
|
|
38
38
|
/** Optional class applied to the header button (or span when unsortable). */
|
|
39
39
|
className?: string;
|
|
40
|
-
}):
|
|
40
|
+
}): react_jsx_runtime273.JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { type ColumnDef, DataTable, DataTableColumnHeader };
|
|
43
43
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime171 from "react/jsx-runtime";
|
|
2
2
|
import { Column, ColumnDef } from "@tanstack/react-table";
|
|
3
3
|
|
|
4
4
|
//#region src/patterns/DataTable/DataTable.d.ts
|
|
@@ -24,7 +24,7 @@ declare function DataTable<TData, TValue>({
|
|
|
24
24
|
striped,
|
|
25
25
|
enablePagination,
|
|
26
26
|
pageSize
|
|
27
|
-
}: DataTableProps<TData, TValue>):
|
|
27
|
+
}: DataTableProps<TData, TValue>): react_jsx_runtime171.JSX.Element;
|
|
28
28
|
/** Sortable column header — drop into a column's `header` to get click-to-sort. */
|
|
29
29
|
declare function DataTableColumnHeader<TData, TValue>({
|
|
30
30
|
column,
|
|
@@ -37,7 +37,7 @@ declare function DataTableColumnHeader<TData, TValue>({
|
|
|
37
37
|
title: string;
|
|
38
38
|
/** Optional class applied to the header button (or span when unsortable). */
|
|
39
39
|
className?: string;
|
|
40
|
-
}):
|
|
40
|
+
}): react_jsx_runtime171.JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { type ColumnDef, DataTable, DataTableColumnHeader };
|
|
43
43
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime245 from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/patterns/Footer/Footer.d.ts
|
|
@@ -18,22 +18,22 @@ declare function Footer({
|
|
|
18
18
|
bordered?: boolean;
|
|
19
19
|
/** Surface fill. `glass` is a translucent, blurred panel over the page background. */
|
|
20
20
|
background?: keyof typeof footerBackgrounds;
|
|
21
|
-
}):
|
|
21
|
+
}): react_jsx_runtime245.JSX.Element;
|
|
22
22
|
/** Leading region — left-aligned on md+ (e.g. an app version). */
|
|
23
23
|
declare function FooterStart({
|
|
24
24
|
className,
|
|
25
25
|
...props
|
|
26
|
-
}: React.ComponentProps<"div">):
|
|
26
|
+
}: React.ComponentProps<"div">): react_jsx_runtime245.JSX.Element;
|
|
27
27
|
/** Centre region — always centred (e.g. a "Powered by" lockup). */
|
|
28
28
|
declare function FooterCenter({
|
|
29
29
|
className,
|
|
30
30
|
...props
|
|
31
|
-
}: React.ComponentProps<"div">):
|
|
31
|
+
}: React.ComponentProps<"div">): react_jsx_runtime245.JSX.Element;
|
|
32
32
|
/** Trailing region — right-aligned on md+ (e.g. legal links). Wraps on small screens. */
|
|
33
33
|
declare function FooterEnd({
|
|
34
34
|
className,
|
|
35
35
|
...props
|
|
36
|
-
}: React.ComponentProps<"div">):
|
|
36
|
+
}: React.ComponentProps<"div">): react_jsx_runtime245.JSX.Element;
|
|
37
37
|
/** "Powered by" lockup — the label plus a slot for the brand mark (a <Logo />). */
|
|
38
38
|
declare function FooterPoweredBy({
|
|
39
39
|
className,
|
|
@@ -43,12 +43,12 @@ declare function FooterPoweredBy({
|
|
|
43
43
|
}: React.ComponentProps<"div"> & {
|
|
44
44
|
/** Override the default "Powered by" label. */
|
|
45
45
|
label?: React.ReactNode;
|
|
46
|
-
}):
|
|
46
|
+
}): react_jsx_runtime245.JSX.Element;
|
|
47
47
|
/** Visual divider between trailing links. */
|
|
48
48
|
declare function FooterSeparator({
|
|
49
49
|
className,
|
|
50
50
|
...props
|
|
51
|
-
}: React.ComponentProps<"span">):
|
|
51
|
+
}: React.ComponentProps<"span">): react_jsx_runtime245.JSX.Element;
|
|
52
52
|
//#endregion
|
|
53
53
|
export { Footer, FooterCenter, FooterEnd, FooterPoweredBy, FooterSeparator, FooterStart };
|
|
54
54
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime25 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/patterns/Footer/Footer.d.ts
|
|
5
5
|
declare const footerBackgrounds: {
|
|
@@ -18,22 +18,22 @@ declare function Footer({
|
|
|
18
18
|
bordered?: boolean;
|
|
19
19
|
/** Surface fill. `glass` is a translucent, blurred panel over the page background. */
|
|
20
20
|
background?: keyof typeof footerBackgrounds;
|
|
21
|
-
}):
|
|
21
|
+
}): react_jsx_runtime25.JSX.Element;
|
|
22
22
|
/** Leading region — left-aligned on md+ (e.g. an app version). */
|
|
23
23
|
declare function FooterStart({
|
|
24
24
|
className,
|
|
25
25
|
...props
|
|
26
|
-
}: React.ComponentProps<"div">):
|
|
26
|
+
}: React.ComponentProps<"div">): react_jsx_runtime25.JSX.Element;
|
|
27
27
|
/** Centre region — always centred (e.g. a "Powered by" lockup). */
|
|
28
28
|
declare function FooterCenter({
|
|
29
29
|
className,
|
|
30
30
|
...props
|
|
31
|
-
}: React.ComponentProps<"div">):
|
|
31
|
+
}: React.ComponentProps<"div">): react_jsx_runtime25.JSX.Element;
|
|
32
32
|
/** Trailing region — right-aligned on md+ (e.g. legal links). Wraps on small screens. */
|
|
33
33
|
declare function FooterEnd({
|
|
34
34
|
className,
|
|
35
35
|
...props
|
|
36
|
-
}: React.ComponentProps<"div">):
|
|
36
|
+
}: React.ComponentProps<"div">): react_jsx_runtime25.JSX.Element;
|
|
37
37
|
/** "Powered by" lockup — the label plus a slot for the brand mark (a <Logo />). */
|
|
38
38
|
declare function FooterPoweredBy({
|
|
39
39
|
className,
|
|
@@ -43,12 +43,12 @@ declare function FooterPoweredBy({
|
|
|
43
43
|
}: React.ComponentProps<"div"> & {
|
|
44
44
|
/** Override the default "Powered by" label. */
|
|
45
45
|
label?: React.ReactNode;
|
|
46
|
-
}):
|
|
46
|
+
}): react_jsx_runtime25.JSX.Element;
|
|
47
47
|
/** Visual divider between trailing links. */
|
|
48
48
|
declare function FooterSeparator({
|
|
49
49
|
className,
|
|
50
50
|
...props
|
|
51
|
-
}: React.ComponentProps<"span">):
|
|
51
|
+
}: React.ComponentProps<"span">): react_jsx_runtime25.JSX.Element;
|
|
52
52
|
//#endregion
|
|
53
53
|
export { Footer, FooterCenter, FooterEnd, FooterPoweredBy, FooterSeparator, FooterStart };
|
|
54
54
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as HeadingProps } from "../../index28.cjs";
|
|
2
2
|
import { t as Text } from "../../index60.cjs";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime265 from "react/jsx-runtime";
|
|
4
|
+
import * as class_variance_authority_types22 from "class-variance-authority/types";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
|
|
@@ -15,7 +15,7 @@ declare function MediaObject({
|
|
|
15
15
|
className,
|
|
16
16
|
interactive,
|
|
17
17
|
...props
|
|
18
|
-
}: MediaObjectProps):
|
|
18
|
+
}: MediaObjectProps): react_jsx_runtime265.JSX.Element;
|
|
19
19
|
type MediaObjectImageProps = React.ComponentProps<"img"> & {
|
|
20
20
|
/** Required alt text describing the media (enforced for accessibility). */
|
|
21
21
|
alt: string;
|
|
@@ -25,17 +25,17 @@ declare function MediaObjectImage({
|
|
|
25
25
|
className,
|
|
26
26
|
alt,
|
|
27
27
|
...props
|
|
28
|
-
}: MediaObjectImageProps):
|
|
28
|
+
}: MediaObjectImageProps): react_jsx_runtime265.JSX.Element;
|
|
29
29
|
/** Square container for the icon-top card variant; place an Icon inside it. */
|
|
30
30
|
declare function MediaObjectIcon({
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
33
|
-
}: React.ComponentProps<"div">):
|
|
33
|
+
}: React.ComponentProps<"div">): react_jsx_runtime265.JSX.Element;
|
|
34
34
|
/** Padded body region of a card that holds the title, text, and actions. */
|
|
35
35
|
declare function MediaObjectContent({
|
|
36
36
|
className,
|
|
37
37
|
...props
|
|
38
|
-
}: React.ComponentProps<"div">):
|
|
38
|
+
}: React.ComponentProps<"div">): react_jsx_runtime265.JSX.Element;
|
|
39
39
|
type MediaObjectTitleProps = Omit<HeadingProps, "as"> & {
|
|
40
40
|
/** Heading size step passthrough (defaults to "4"). */
|
|
41
41
|
size?: HeadingProps["size"];
|
|
@@ -44,20 +44,20 @@ type MediaObjectTitleProps = Omit<HeadingProps, "as"> & {
|
|
|
44
44
|
declare function MediaObjectTitle({
|
|
45
45
|
size,
|
|
46
46
|
...props
|
|
47
|
-
}: MediaObjectTitleProps):
|
|
47
|
+
}: MediaObjectTitleProps): react_jsx_runtime265.JSX.Element;
|
|
48
48
|
/** Supporting body copy; wraps the Text primitive (muted, small). */
|
|
49
49
|
declare function MediaObjectText({
|
|
50
50
|
...props
|
|
51
|
-
}: React.ComponentProps<typeof Text>):
|
|
51
|
+
}: React.ComponentProps<typeof Text>): react_jsx_runtime265.JSX.Element;
|
|
52
52
|
/** Action row pinned to the bottom of the content; holds a Button or Link. */
|
|
53
53
|
declare function MediaObjectActions({
|
|
54
54
|
className,
|
|
55
55
|
...props
|
|
56
|
-
}: React.ComponentProps<"div">):
|
|
56
|
+
}: React.ComponentProps<"div">): react_jsx_runtime265.JSX.Element;
|
|
57
57
|
declare const mediaObjectGroupVariants: (props?: ({
|
|
58
58
|
columns?: 1 | 2 | 3 | 4 | null | undefined;
|
|
59
59
|
gap?: "sm" | "lg" | "md" | null | undefined;
|
|
60
|
-
} &
|
|
60
|
+
} & class_variance_authority_types22.ClassProp) | undefined) => string;
|
|
61
61
|
type MediaObjectGroupProps = React.ComponentProps<"div"> & VariantProps<typeof mediaObjectGroupVariants>;
|
|
62
62
|
/** Responsive grid wrapper that lays out a set of MediaObject cards. */
|
|
63
63
|
declare function MediaObjectGroup({
|
|
@@ -65,7 +65,7 @@ declare function MediaObjectGroup({
|
|
|
65
65
|
columns,
|
|
66
66
|
gap,
|
|
67
67
|
...props
|
|
68
|
-
}: MediaObjectGroupProps):
|
|
68
|
+
}: MediaObjectGroupProps): react_jsx_runtime265.JSX.Element;
|
|
69
69
|
//#endregion
|
|
70
70
|
export { MediaObject, MediaObjectActions, MediaObjectContent, MediaObjectGroup, type MediaObjectGroupProps, MediaObjectIcon, MediaObjectImage, type MediaObjectImageProps, type MediaObjectProps, MediaObjectText, MediaObjectTitle, type MediaObjectTitleProps, mediaObjectGroupVariants };
|
|
71
71
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as HeadingProps } from "../../index28.js";
|
|
2
2
|
import { t as Text } from "../../index60.js";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
|
-
import * as
|
|
6
|
+
import * as class_variance_authority_types3 from "class-variance-authority/types";
|
|
7
7
|
|
|
8
8
|
//#region src/patterns/MediaObject/MediaObject.d.ts
|
|
9
9
|
type MediaObjectProps = React.ComponentProps<"article"> & {
|
|
@@ -15,7 +15,7 @@ declare function MediaObject({
|
|
|
15
15
|
className,
|
|
16
16
|
interactive,
|
|
17
17
|
...props
|
|
18
|
-
}: MediaObjectProps):
|
|
18
|
+
}: MediaObjectProps): react_jsx_runtime5.JSX.Element;
|
|
19
19
|
type MediaObjectImageProps = React.ComponentProps<"img"> & {
|
|
20
20
|
/** Required alt text describing the media (enforced for accessibility). */
|
|
21
21
|
alt: string;
|
|
@@ -25,17 +25,17 @@ declare function MediaObjectImage({
|
|
|
25
25
|
className,
|
|
26
26
|
alt,
|
|
27
27
|
...props
|
|
28
|
-
}: MediaObjectImageProps):
|
|
28
|
+
}: MediaObjectImageProps): react_jsx_runtime5.JSX.Element;
|
|
29
29
|
/** Square container for the icon-top card variant; place an Icon inside it. */
|
|
30
30
|
declare function MediaObjectIcon({
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
33
|
-
}: React.ComponentProps<"div">):
|
|
33
|
+
}: React.ComponentProps<"div">): react_jsx_runtime5.JSX.Element;
|
|
34
34
|
/** Padded body region of a card that holds the title, text, and actions. */
|
|
35
35
|
declare function MediaObjectContent({
|
|
36
36
|
className,
|
|
37
37
|
...props
|
|
38
|
-
}: React.ComponentProps<"div">):
|
|
38
|
+
}: React.ComponentProps<"div">): react_jsx_runtime5.JSX.Element;
|
|
39
39
|
type MediaObjectTitleProps = Omit<HeadingProps, "as"> & {
|
|
40
40
|
/** Heading size step passthrough (defaults to "4"). */
|
|
41
41
|
size?: HeadingProps["size"];
|
|
@@ -44,20 +44,20 @@ type MediaObjectTitleProps = Omit<HeadingProps, "as"> & {
|
|
|
44
44
|
declare function MediaObjectTitle({
|
|
45
45
|
size,
|
|
46
46
|
...props
|
|
47
|
-
}: MediaObjectTitleProps):
|
|
47
|
+
}: MediaObjectTitleProps): react_jsx_runtime5.JSX.Element;
|
|
48
48
|
/** Supporting body copy; wraps the Text primitive (muted, small). */
|
|
49
49
|
declare function MediaObjectText({
|
|
50
50
|
...props
|
|
51
|
-
}: React.ComponentProps<typeof Text>):
|
|
51
|
+
}: React.ComponentProps<typeof Text>): react_jsx_runtime5.JSX.Element;
|
|
52
52
|
/** Action row pinned to the bottom of the content; holds a Button or Link. */
|
|
53
53
|
declare function MediaObjectActions({
|
|
54
54
|
className,
|
|
55
55
|
...props
|
|
56
|
-
}: React.ComponentProps<"div">):
|
|
56
|
+
}: React.ComponentProps<"div">): react_jsx_runtime5.JSX.Element;
|
|
57
57
|
declare const mediaObjectGroupVariants: (props?: ({
|
|
58
|
-
columns?:
|
|
59
|
-
gap?: "sm" | "
|
|
60
|
-
} &
|
|
58
|
+
columns?: 1 | 2 | 3 | 4 | null | undefined;
|
|
59
|
+
gap?: "sm" | "lg" | "md" | null | undefined;
|
|
60
|
+
} & class_variance_authority_types3.ClassProp) | undefined) => string;
|
|
61
61
|
type MediaObjectGroupProps = React.ComponentProps<"div"> & VariantProps<typeof mediaObjectGroupVariants>;
|
|
62
62
|
/** Responsive grid wrapper that lays out a set of MediaObject cards. */
|
|
63
63
|
declare function MediaObjectGroup({
|
|
@@ -65,7 +65,7 @@ declare function MediaObjectGroup({
|
|
|
65
65
|
columns,
|
|
66
66
|
gap,
|
|
67
67
|
...props
|
|
68
|
-
}: MediaObjectGroupProps):
|
|
68
|
+
}: MediaObjectGroupProps): react_jsx_runtime5.JSX.Element;
|
|
69
69
|
//#endregion
|
|
70
70
|
export { MediaObject, MediaObjectActions, MediaObjectContent, MediaObjectGroup, type MediaObjectGroupProps, MediaObjectIcon, MediaObjectImage, type MediaObjectImageProps, type MediaObjectProps, MediaObjectText, MediaObjectTitle, type MediaObjectTitleProps, mediaObjectGroupVariants };
|
|
71
71
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/patterns/MediaObject/MediaObject.tsx"],"mappings":";;;;;;;;KAcK,gBAAA,GAAmB,KAAA,CAAM;;;;AAVW;AAUG,iBAMnC,WAAA,CAAW;EAAA,SAAA;EAAA,WAAA;EAAA,GAAA;AAAA,CAAA,EAAuC,gBAAvC,CAAA,EAAuD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/patterns/MediaObject/MediaObject.tsx"],"mappings":";;;;;;;;KAcK,gBAAA,GAAmB,KAAA,CAAM;;;;AAVW;AAUG,iBAMnC,WAAA,CAAW;EAAA,SAAA;EAAA,WAAA;EAAA,GAAA;AAAA,CAAA,EAAuC,gBAAvC,CAAA,EAAuD,kBAAA,CAAA,GAAA,CAAA,OAAvD;KAef,qBAAA,GAAwB,KAAA,CAAM,cAff,CAAA,KAAA,CAAA,GAAA;;KAAc,EAAA,MAAA;;;AAAyC,iBAqBlE,gBAAA,CArBkE;EAAA,SAAA;EAAA,GAAA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SA3DyD,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;KA6DtD,qBAAA,GAAwB,KAAA,CAAM,cA7D6C,CAAA,KAAA,CAAA,GA8D9E,YA9D8E,CAAA,OA8D1D,wBA9D0D,CAAA;AAAA;AAAA,iBAiEvE,gBAAA,CAtDiB;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;EAAA,GAAA;AAAA,CAAA,EAsDuC,qBAtDvC,CAAA,EAsD4D,kBAAA,CAAA,GAAA,CAAA,OAtD5D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime314 from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/patterns/SectionCard/SectionCard.d.ts
|
|
@@ -15,7 +15,7 @@ declare function SectionCard({
|
|
|
15
15
|
className,
|
|
16
16
|
children,
|
|
17
17
|
...props
|
|
18
|
-
}: SectionCardProps):
|
|
18
|
+
}: SectionCardProps): react_jsx_runtime314.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { SectionCard, type SectionCardProps };
|
|
21
21
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/patterns/SectionCard/SectionCard.d.ts
|
|
5
5
|
type SectionCardProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
@@ -15,7 +15,7 @@ declare function SectionCard({
|
|
|
15
15
|
className,
|
|
16
16
|
children,
|
|
17
17
|
...props
|
|
18
|
-
}: SectionCardProps):
|
|
18
|
+
}: SectionCardProps): react_jsx_runtime4.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { SectionCard, type SectionCardProps };
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/patterns/SectionCard/SectionCard.tsx"],"mappings":";;;;KASK,gBAAA,GAAmB,KAAK,KAAA,CAAM;;SAE1B,KAAA,CAAM;EAFV;EAAgB,MAAA,CAAA,EAIV,KAAA,CAAM,SAJI;;;iBAQZ,WAAA,CANM;EAAA,KAAA;EAAA,MAAA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAMwD,gBANxD,CAAA,EAMwE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/patterns/SectionCard/SectionCard.tsx"],"mappings":";;;;KASK,gBAAA,GAAmB,KAAK,KAAA,CAAM;;SAE1B,KAAA,CAAM;EAFV;EAAgB,MAAA,CAAA,EAIV,KAAA,CAAM,SAJI;;;iBAQZ,WAAA,CANM;EAAA,KAAA;EAAA,MAAA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAMwD,gBANxD,CAAA,EAMwE,kBAAA,CAAA,GAAA,CAAA,OANxE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as HeadingProps } from "../../index28.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime263 from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/patterns/SectionHeading/SectionHeading.d.ts
|
|
@@ -31,7 +31,7 @@ declare function SectionHeading({
|
|
|
31
31
|
titleAs,
|
|
32
32
|
className,
|
|
33
33
|
...props
|
|
34
|
-
}: SectionHeadingProps):
|
|
34
|
+
}: SectionHeadingProps): react_jsx_runtime263.JSX.Element;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { SectionHeading, type SectionHeadingProps };
|
|
37
37
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as HeadingProps } from "../../index28.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/patterns/SectionHeading/SectionHeading.d.ts
|
|
6
6
|
/** Props for the {@link SectionHeading} pattern. */
|
|
@@ -31,7 +31,7 @@ declare function SectionHeading({
|
|
|
31
31
|
titleAs,
|
|
32
32
|
className,
|
|
33
33
|
...props
|
|
34
|
-
}: SectionHeadingProps):
|
|
34
|
+
}: SectionHeadingProps): react_jsx_runtime3.JSX.Element;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { SectionHeading, type SectionHeadingProps };
|
|
37
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/patterns/SectionHeading/SectionHeading.tsx"],"mappings":";;;;;;KAYK,mBAAA,GAAsB,KAAK,KAAA,CAAM;;EAAjC,KAAA,EAEI,KAAA,CAAM,SAFS;EAAA;UAAQ,CAAM,EAIzB,KAAA,CAAM,SAJmB;;SAE7B,CAAA,EAIG,KAAA,CAAM,SAJH;;OAIH,CAAA,EAAA,QAAM,GAAA,MAAA;;UAQN,CAAM,EAAA,OAAA;EAAW;EAIpB,SAAA,CAAA,EANK,YAMS,CAAA,MAAA,CAAA;EAAA;SACrB,CAAA,EALU,KAAA,CAAM,WAKhB;;;iBADO,cAAA,CAIP;EAAA,KAAA;EAAA,QAAA;EAAA,OAAA;EAAA,KAAA;EAAA,QAAA;EAAA,SAAA;EAAA,OAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAMC,mBAND,CAAA,EAMoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/patterns/SectionHeading/SectionHeading.tsx"],"mappings":";;;;;;KAYK,mBAAA,GAAsB,KAAK,KAAA,CAAM;;EAAjC,KAAA,EAEI,KAAA,CAAM,SAFS;EAAA;UAAQ,CAAM,EAIzB,KAAA,CAAM,SAJmB;;SAE7B,CAAA,EAIG,KAAA,CAAM,SAJH;;OAIH,CAAA,EAAA,QAAM,GAAA,MAAA;;UAQN,CAAM,EAAA,OAAA;EAAW;EAIpB,SAAA,CAAA,EANK,YAMS,CAAA,MAAA,CAAA;EAAA;SACrB,CAAA,EALU,KAAA,CAAM,WAKhB;;;iBADO,cAAA,CAIP;EAAA,KAAA;EAAA,QAAA;EAAA,OAAA;EAAA,KAAA;EAAA,QAAA;EAAA,SAAA;EAAA,OAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAMC,mBAND,CAAA,EAMoB,kBAAA,CAAA,GAAA,CAAA,OANpB"}
|
|
@@ -84,7 +84,7 @@ const tabsListVariants = (0, class_variance_authority.cva)("relative inline-flex
|
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
/** Row (or column) of tab triggers; renders the sliding indicator for the `segmented` variant. */
|
|
87
|
-
function TabsList({ className, children, ...props }) {
|
|
87
|
+
function TabsList({ className, children, tabPrefix, tabSuffix, ...props }) {
|
|
88
88
|
const { variant, size, orientation } = react.useContext(TabsContext);
|
|
89
89
|
const isSegmented = variant === "segmented";
|
|
90
90
|
const listRef = react.useRef(null);
|
|
@@ -129,22 +129,27 @@ function TabsList({ className, children, ...props }) {
|
|
|
129
129
|
orientation
|
|
130
130
|
}), className),
|
|
131
131
|
...props,
|
|
132
|
-
children: [
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
132
|
+
children: [
|
|
133
|
+
tabPrefix,
|
|
134
|
+
isSegmented && indicator && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
135
|
+
"data-slot": "tabs-indicator",
|
|
136
|
+
"aria-hidden": true,
|
|
137
|
+
className: "absolute z-0 rounded-lg bg-background shadow-sm transition-all duration-200 ease-out motion-reduce:transition-none",
|
|
138
|
+
style: orientation === "vertical" ? {
|
|
139
|
+
top: indicator.top,
|
|
140
|
+
height: indicator.height,
|
|
141
|
+
left: 4,
|
|
142
|
+
right: 4
|
|
143
|
+
} : {
|
|
144
|
+
left: indicator.left,
|
|
145
|
+
width: indicator.width,
|
|
146
|
+
top: 4,
|
|
147
|
+
bottom: 4
|
|
148
|
+
}
|
|
149
|
+
}),
|
|
150
|
+
children,
|
|
151
|
+
tabSuffix
|
|
152
|
+
]
|
|
148
153
|
});
|
|
149
154
|
}
|
|
150
155
|
const tabsTriggerVariants = (0, class_variance_authority.cva)("relative inline-flex items-center justify-center gap-1.5 font-medium whitespace-nowrap text-foreground/70 outline-none transition-all hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["React","TabsPrimitive","cn"],"sources":["../../../src/primitives/Tabs/Tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport { cva } from \"class-variance-authority\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// Tabs — built on Radix Tabs (content panels + roving-focus keyboard nav + a11y).\n// One component, four visual `variant`s, each supporting horizontal/vertical\n// `orientation`:\n// - \"line\": underline under the active tab.\n// - \"pill\" (default): a muted track; the active tab is an elevated pill.\n// - \"segmented\": a muted track with a single sliding indicator that animates\n// between tabs.\n// - \"fancy\": translucent glass card tabs; the active tab merges into the glass\n// content panel below (login-style). `size` controls the fancy vertical padding.\n// `variant`/`size`/`orientation` are set on the root and shared via context.\n\ntype TabsVariant = \"line\" | \"pill\" | \"segmented\" | \"fancy\";\ntype TabsSize = \"sm\" | \"md\" | \"lg\";\ntype TabsOrientation = \"horizontal\" | \"vertical\";\n\nconst TabsContext = React.createContext<{\n variant: TabsVariant;\n size: TabsSize;\n orientation: TabsOrientation;\n}>({ variant: \"pill\", size: \"md\", orientation: \"horizontal\" });\n\n/**\n * Tabbed interface root: holds the active value and shares `variant`/`size`/\n * `orientation` with its `TabsList`/`TabsTrigger`/`TabsContent` via context.\n */\nfunction Tabs({\n className,\n variant = \"pill\",\n size = \"md\",\n orientation = \"horizontal\",\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root> & {\n /** Visual style of the tabs: underline, pill track, sliding segmented, or glass cards. */\n variant?: TabsVariant;\n /** Control density — drives padding and text size of the triggers. */\n size?: TabsSize;\n}) {\n const resolvedOrientation: TabsOrientation =\n orientation === \"vertical\" ? \"vertical\" : \"horizontal\";\n const ctx = React.useMemo(\n () => ({ variant, size, orientation: resolvedOrientation }),\n [variant, size, resolvedOrientation],\n );\n return (\n <TabsContext.Provider value={ctx}>\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-variant={variant}\n data-orientation={resolvedOrientation}\n orientation={resolvedOrientation}\n className={cn(\n \"group/tabs flex data-[orientation=horizontal]:flex-col\",\n variant === \"fancy\" ? \"gap-0\" : \"gap-2\",\n className,\n )}\n {...props}\n />\n </TabsContext.Provider>\n );\n}\n\nconst tabsListVariants = cva(\"relative inline-flex items-center text-muted-foreground\", {\n variants: {\n variant: {\n line: \"gap-1 bg-transparent\",\n pill: \"justify-center rounded-lg bg-muted p-[3px]\",\n segmented: \"justify-center rounded-xl bg-muted p-1\",\n fancy: \"w-full items-stretch gap-2 bg-transparent\",\n },\n orientation: {\n horizontal: \"\",\n vertical: \"h-fit flex-col\",\n },\n size: { sm: \"\", md: \"\", lg: \"\" },\n },\n compoundVariants: [\n // Track height for the horizontal pill/segmented variants.\n { variant: [\"pill\", \"segmented\"], orientation: \"horizontal\", size: \"sm\", class: \"h-8\" },\n { variant: [\"pill\", \"segmented\"], orientation: \"horizontal\", size: \"md\", class: \"h-9\" },\n { variant: [\"pill\", \"segmented\"], orientation: \"horizontal\", size: \"lg\", class: \"h-10\" },\n ],\n defaultVariants: { variant: \"pill\", orientation: \"horizontal\", size: \"md\" },\n});\n\n/** Row (or column) of tab triggers; renders the sliding indicator for the `segmented` variant. */\nfunction TabsList({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n const { variant, size, orientation } = React.useContext(TabsContext);\n const isSegmented = variant === \"segmented\";\n const listRef = React.useRef<HTMLDivElement>(null);\n const [indicator, setIndicator] = React.useState<{\n left: number;\n top: number;\n width: number;\n height: number;\n } | null>(null);\n\n React.useEffect(() => {\n if (!isSegmented) return;\n const list = listRef.current;\n if (!list) return;\n const update = () => {\n const active = list.querySelector<HTMLElement>(\n '[data-slot=\"tabs-trigger\"][data-state=\"active\"]',\n );\n if (!active) {\n setIndicator(null);\n return;\n }\n setIndicator({\n left: active.offsetLeft,\n top: active.offsetTop,\n width: active.offsetWidth,\n height: active.offsetHeight,\n });\n };\n update();\n const mutation = new MutationObserver(update);\n mutation.observe(list, { attributes: true, attributeFilter: [\"data-state\"], subtree: true });\n const resize = new ResizeObserver(update);\n resize.observe(list);\n return () => {\n mutation.disconnect();\n resize.disconnect();\n };\n }, [isSegmented]);\n\n return (\n <TabsPrimitive.List\n ref={listRef}\n data-slot=\"tabs-list\"\n className={cn(tabsListVariants({ variant, size, orientation }), className)}\n {...props}\n >\n {isSegmented && indicator && (\n <span\n data-slot=\"tabs-indicator\"\n aria-hidden\n className=\"absolute z-0 rounded-lg bg-background shadow-sm transition-all duration-200 ease-out motion-reduce:transition-none\"\n style={\n orientation === \"vertical\"\n ? { top: indicator.top, height: indicator.height, left: 4, right: 4 }\n : { left: indicator.left, width: indicator.width, top: 4, bottom: 4 }\n }\n />\n )}\n {children}\n </TabsPrimitive.List>\n );\n}\n\nconst tabsTriggerVariants = cva(\n \"relative inline-flex items-center justify-center gap-1.5 font-medium whitespace-nowrap text-foreground/70 outline-none transition-all hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n line: \"h-[calc(100%-1px)] flex-1 rounded-none\",\n pill: \"h-[calc(100%-1px)] flex-1 rounded-10 border border-transparent data-[state=active]:bg-background data-[state=active]:shadow-sm\",\n segmented: \"z-[1] h-[calc(100%-1px)] flex-1 rounded-lg\",\n fancy:\n \"mb-1.5 flex-1 justify-between rounded-xl bg-[var(--glass-subtle)] backdrop-blur-glass hover:bg-[var(--glass-light)] data-[state=active]:mb-0 data-[state=active]:rounded-b-none data-[state=active]:bg-[var(--glass-light)]\",\n },\n orientation: { horizontal: \"\", vertical: \"w-full justify-start\" },\n size: { sm: \"\", md: \"\", lg: \"\" },\n },\n compoundVariants: [\n // Padding + text size for the track variants.\n { variant: [\"line\", \"pill\", \"segmented\"], size: \"sm\", class: \"px-1.5 py-1 text-xs\" },\n { variant: [\"line\", \"pill\", \"segmented\"], size: \"md\", class: \"px-2 py-1 text-sm\" },\n { variant: [\"line\", \"pill\", \"segmented\"], size: \"lg\", class: \"px-3 py-1 text-base\" },\n // Fancy footprint scales with size; the active tab adds bottom padding so it\n // merges into the panel while inactive tabs stay shorter (gap above content).\n { variant: \"fancy\", size: \"sm\", class: \"px-4 py-2 text-sm\" },\n { variant: \"fancy\", size: \"md\", class: \"px-4 py-3 text-sm\" },\n { variant: \"fancy\", size: \"lg\", class: \"px-4 py-4 text-base\" },\n // Underline position for the line variant (per orientation).\n {\n variant: \"line\",\n orientation: \"horizontal\",\n class:\n \"after:absolute after:inset-x-0 after:bottom-[-5px] after:h-0.5 after:bg-foreground after:opacity-0 after:transition-opacity data-[state=active]:after:opacity-100\",\n },\n {\n variant: \"line\",\n orientation: \"vertical\",\n class:\n \"after:absolute after:inset-y-0 after:right-[-5px] after:w-0.5 after:bg-foreground after:opacity-0 after:transition-opacity data-[state=active]:after:opacity-100\",\n },\n ],\n defaultVariants: { variant: \"pill\", orientation: \"horizontal\", size: \"md\" },\n },\n);\n\n/** Clickable tab button; its `value` selects the matching `TabsContent` panel. */\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n const { variant, size, orientation } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(tabsTriggerVariants({ variant, size, orientation }), className)}\n {...props}\n />\n );\n}\n\n/** Panel shown when its `value` matches the active tab; styled as a glass panel for the `fancy` variant. */\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n const { variant } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn(\n \"flex-1 outline-none\",\n // Fancy: a glass panel the active tab merges into (flat top, matching tint).\n variant === \"fancy\" &&\n \"flex-none rounded-xl rounded-t-none bg-[var(--glass-light)] p-5 backdrop-blur-glass\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Trailing count badge for a tab trigger; goes dark on the `fancy` variant to match its cards. */\nfunction TabsCounter({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"tabs-counter\"\n className={cn(\n \"ml-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-muted px-1 text-xs font-medium text-muted-foreground\",\n \"group-data-[variant=fancy]/tabs:h-5 group-data-[variant=fancy]/tabs:min-w-5 group-data-[variant=fancy]/tabs:bg-inverse group-data-[variant=fancy]/tabs:text-inverse-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n TabsCounter,\n tabsListVariants,\n tabsTriggerVariants,\n};\n"],"mappings":";;;;;;;;;AAuBA,MAAM,cAAcA,MAAM,cAIvB;CAAE,SAAS;CAAQ,MAAM;CAAM,aAAa;AAAa,CAAC;;;;;AAM7D,SAAS,KAAK,EACZ,WACA,UAAU,QACV,OAAO,MACP,cAAc,cACd,GAAG,SAM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rimitive","cn"],"sources":["../../../src/primitives/Tabs/Tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport { cva } from \"class-variance-authority\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// Tabs — built on Radix Tabs (content panels + roving-focus keyboard nav + a11y).\n// One component, four visual `variant`s, each supporting horizontal/vertical\n// `orientation`:\n// - \"line\": underline under the active tab.\n// - \"pill\" (default): a muted track; the active tab is an elevated pill.\n// - \"segmented\": a muted track with a single sliding indicator that animates\n// between tabs.\n// - \"fancy\": translucent glass card tabs; the active tab merges into the glass\n// content panel below (login-style). `size` controls the fancy vertical padding.\n// `variant`/`size`/`orientation` are set on the root and shared via context.\n\ntype TabsVariant = \"line\" | \"pill\" | \"segmented\" | \"fancy\";\ntype TabsSize = \"sm\" | \"md\" | \"lg\";\ntype TabsOrientation = \"horizontal\" | \"vertical\";\n\nconst TabsContext = React.createContext<{\n variant: TabsVariant;\n size: TabsSize;\n orientation: TabsOrientation;\n}>({ variant: \"pill\", size: \"md\", orientation: \"horizontal\" });\n\n/**\n * Tabbed interface root: holds the active value and shares `variant`/`size`/\n * `orientation` with its `TabsList`/`TabsTrigger`/`TabsContent` via context.\n */\nfunction Tabs({\n className,\n variant = \"pill\",\n size = \"md\",\n orientation = \"horizontal\",\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root> & {\n /** Visual style of the tabs: underline, pill track, sliding segmented, or glass cards. */\n variant?: TabsVariant;\n /** Control density — drives padding and text size of the triggers. */\n size?: TabsSize;\n}) {\n const resolvedOrientation: TabsOrientation =\n orientation === \"vertical\" ? \"vertical\" : \"horizontal\";\n const ctx = React.useMemo(\n () => ({ variant, size, orientation: resolvedOrientation }),\n [variant, size, resolvedOrientation],\n );\n return (\n <TabsContext.Provider value={ctx}>\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-variant={variant}\n data-orientation={resolvedOrientation}\n orientation={resolvedOrientation}\n className={cn(\n \"group/tabs flex data-[orientation=horizontal]:flex-col\",\n variant === \"fancy\" ? \"gap-0\" : \"gap-2\",\n className,\n )}\n {...props}\n />\n </TabsContext.Provider>\n );\n}\n\nconst tabsListVariants = cva(\"relative inline-flex items-center text-muted-foreground\", {\n variants: {\n variant: {\n line: \"gap-1 bg-transparent\",\n pill: \"justify-center rounded-lg bg-muted p-[3px]\",\n segmented: \"justify-center rounded-xl bg-muted p-1\",\n fancy: \"w-full items-stretch gap-2 bg-transparent\",\n },\n orientation: {\n horizontal: \"\",\n vertical: \"h-fit flex-col\",\n },\n size: { sm: \"\", md: \"\", lg: \"\" },\n },\n compoundVariants: [\n // Track height for the horizontal pill/segmented variants.\n { variant: [\"pill\", \"segmented\"], orientation: \"horizontal\", size: \"sm\", class: \"h-8\" },\n { variant: [\"pill\", \"segmented\"], orientation: \"horizontal\", size: \"md\", class: \"h-9\" },\n { variant: [\"pill\", \"segmented\"], orientation: \"horizontal\", size: \"lg\", class: \"h-10\" },\n ],\n defaultVariants: { variant: \"pill\", orientation: \"horizontal\", size: \"md\" },\n});\n\n/** Row (or column) of tab triggers; renders the sliding indicator for the `segmented` variant. */\nfunction TabsList({\n className,\n children,\n tabPrefix,\n tabSuffix,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List> & {\n tabPrefix?: React.ReactNode;\n tabSuffix?: React.ReactNode;\n}) {\n const { variant, size, orientation } = React.useContext(TabsContext);\n const isSegmented = variant === \"segmented\";\n const listRef = React.useRef<HTMLDivElement>(null);\n const [indicator, setIndicator] = React.useState<{\n left: number;\n top: number;\n width: number;\n height: number;\n } | null>(null);\n\n React.useEffect(() => {\n if (!isSegmented) return;\n const list = listRef.current;\n if (!list) return;\n const update = () => {\n const active = list.querySelector<HTMLElement>(\n '[data-slot=\"tabs-trigger\"][data-state=\"active\"]',\n );\n if (!active) {\n setIndicator(null);\n return;\n }\n setIndicator({\n left: active.offsetLeft,\n top: active.offsetTop,\n width: active.offsetWidth,\n height: active.offsetHeight,\n });\n };\n update();\n const mutation = new MutationObserver(update);\n mutation.observe(list, { attributes: true, attributeFilter: [\"data-state\"], subtree: true });\n const resize = new ResizeObserver(update);\n resize.observe(list);\n return () => {\n mutation.disconnect();\n resize.disconnect();\n };\n }, [isSegmented]);\n\n return (\n <TabsPrimitive.List\n ref={listRef}\n data-slot=\"tabs-list\"\n className={cn(tabsListVariants({ variant, size, orientation }), className)}\n {...props}\n >\n {tabPrefix}\n {isSegmented && indicator && (\n <span\n data-slot=\"tabs-indicator\"\n aria-hidden\n className=\"absolute z-0 rounded-lg bg-background shadow-sm transition-all duration-200 ease-out motion-reduce:transition-none\"\n style={\n orientation === \"vertical\"\n ? { top: indicator.top, height: indicator.height, left: 4, right: 4 }\n : { left: indicator.left, width: indicator.width, top: 4, bottom: 4 }\n }\n />\n )}\n {children}\n {tabSuffix}\n </TabsPrimitive.List>\n );\n}\n\nconst tabsTriggerVariants = cva(\n \"relative inline-flex items-center justify-center gap-1.5 font-medium whitespace-nowrap text-foreground/70 outline-none transition-all hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n line: \"h-[calc(100%-1px)] flex-1 rounded-none\",\n pill: \"h-[calc(100%-1px)] flex-1 rounded-10 border border-transparent data-[state=active]:bg-background data-[state=active]:shadow-sm\",\n segmented: \"z-[1] h-[calc(100%-1px)] flex-1 rounded-lg\",\n fancy:\n \"mb-1.5 flex-1 justify-between rounded-xl bg-[var(--glass-subtle)] backdrop-blur-glass hover:bg-[var(--glass-light)] data-[state=active]:mb-0 data-[state=active]:rounded-b-none data-[state=active]:bg-[var(--glass-light)]\",\n },\n orientation: { horizontal: \"\", vertical: \"w-full justify-start\" },\n size: { sm: \"\", md: \"\", lg: \"\" },\n },\n compoundVariants: [\n // Padding + text size for the track variants.\n { variant: [\"line\", \"pill\", \"segmented\"], size: \"sm\", class: \"px-1.5 py-1 text-xs\" },\n { variant: [\"line\", \"pill\", \"segmented\"], size: \"md\", class: \"px-2 py-1 text-sm\" },\n { variant: [\"line\", \"pill\", \"segmented\"], size: \"lg\", class: \"px-3 py-1 text-base\" },\n // Fancy footprint scales with size; the active tab adds bottom padding so it\n // merges into the panel while inactive tabs stay shorter (gap above content).\n { variant: \"fancy\", size: \"sm\", class: \"px-4 py-2 text-sm\" },\n { variant: \"fancy\", size: \"md\", class: \"px-4 py-3 text-sm\" },\n { variant: \"fancy\", size: \"lg\", class: \"px-4 py-4 text-base\" },\n // Underline position for the line variant (per orientation).\n {\n variant: \"line\",\n orientation: \"horizontal\",\n class:\n \"after:absolute after:inset-x-0 after:bottom-[-5px] after:h-0.5 after:bg-foreground after:opacity-0 after:transition-opacity data-[state=active]:after:opacity-100\",\n },\n {\n variant: \"line\",\n orientation: \"vertical\",\n class:\n \"after:absolute after:inset-y-0 after:right-[-5px] after:w-0.5 after:bg-foreground after:opacity-0 after:transition-opacity data-[state=active]:after:opacity-100\",\n },\n ],\n defaultVariants: { variant: \"pill\", orientation: \"horizontal\", size: \"md\" },\n },\n);\n\n/** Clickable tab button; its `value` selects the matching `TabsContent` panel. */\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n const { variant, size, orientation } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(tabsTriggerVariants({ variant, size, orientation }), className)}\n {...props}\n />\n );\n}\n\n/** Panel shown when its `value` matches the active tab; styled as a glass panel for the `fancy` variant. */\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n const { variant } = React.useContext(TabsContext);\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn(\n \"flex-1 outline-none\",\n // Fancy: a glass panel the active tab merges into (flat top, matching tint).\n variant === \"fancy\" &&\n \"flex-none rounded-xl rounded-t-none bg-[var(--glass-light)] p-5 backdrop-blur-glass\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Trailing count badge for a tab trigger; goes dark on the `fancy` variant to match its cards. */\nfunction TabsCounter({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"tabs-counter\"\n className={cn(\n \"ml-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-muted px-1 text-xs font-medium text-muted-foreground\",\n \"group-data-[variant=fancy]/tabs:h-5 group-data-[variant=fancy]/tabs:min-w-5 group-data-[variant=fancy]/tabs:bg-inverse group-data-[variant=fancy]/tabs:text-inverse-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n TabsCounter,\n tabsListVariants,\n tabsTriggerVariants,\n};\n"],"mappings":";;;;;;;;;AAuBA,MAAM,cAAcA,MAAM,cAIvB;CAAE,SAAS;CAAQ,MAAM;CAAM,aAAa;AAAa,CAAC;;;;;AAM7D,SAAS,KAAK,EACZ,WACA,UAAU,QACV,OAAO,MACP,cAAc,cACd,GAAG,SAMF;CACD,MAAM,sBACJ,gBAAgB,aAAa,aAAa;CAC5C,MAAM,MAAMA,MAAM,eACT;EAAE;EAAS;EAAM,aAAa;CAAoB,IACzD;EAAC;EAAS;EAAM;CAAmB,CACrC;CACA,OACE,iBAAA,GAAA,kBAAA,KAAC,YAAY,UAAb;EAAsB,OAAO;YAC3B,iBAAA,GAAA,kBAAA,KAACC,SAAAA,KAAc,MAAf;GACE,aAAU;GACV,gBAAc;GACd,oBAAkB;GAClB,aAAa;GACb,WAAWC,WAAAA,GACT,0DACA,YAAY,UAAU,UAAU,SAChC,SACF;GACA,GAAI;EACL,CAAA;CACmB,CAAA;AAE1B;AAEA,MAAM,oBAAA,GAAA,yBAAA,KAAuB,2DAA2D;CACtF,UAAU;EACR,SAAS;GACP,MAAM;GACN,MAAM;GACN,WAAW;GACX,OAAO;EACT;EACA,aAAa;GACX,YAAY;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EAAE,WAAW,GAAG,SAA6D;CAChG,MAAM,EAAE,SAAS,MAAM,gBAAgBF,MAAM,WAAW,WAAW;CACnE,OACE,iBAAA,GAAA,kBAAA,KAACC,SAAAA,KAAc,SAAf;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,oBAAoB;GAAE;GAAS;GAAM;EAAY,CAAC,GAAG,SAAS;EAC5E,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,MAAM,EAAE,YAAYF,MAAM,WAAW,WAAW;CAChD,OACE,iBAAA,GAAA,kBAAA,KAACC,SAAAA,KAAc,SAAf;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,uBAEA,YAAY,WACV,uFACF,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAuC;CAC1E,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GACT,iIACA,kLACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -81,7 +81,7 @@ const tabsListVariants = cva("relative inline-flex items-center text-muted-foreg
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
/** Row (or column) of tab triggers; renders the sliding indicator for the `segmented` variant. */
|
|
84
|
-
function TabsList({ className, children, ...props }) {
|
|
84
|
+
function TabsList({ className, children, tabPrefix, tabSuffix, ...props }) {
|
|
85
85
|
const { variant, size, orientation } = React.useContext(TabsContext);
|
|
86
86
|
const isSegmented = variant === "segmented";
|
|
87
87
|
const listRef = React.useRef(null);
|
|
@@ -126,22 +126,27 @@ function TabsList({ className, children, ...props }) {
|
|
|
126
126
|
orientation
|
|
127
127
|
}), className),
|
|
128
128
|
...props,
|
|
129
|
-
children: [
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
129
|
+
children: [
|
|
130
|
+
tabPrefix,
|
|
131
|
+
isSegmented && indicator && /* @__PURE__ */ jsx("span", {
|
|
132
|
+
"data-slot": "tabs-indicator",
|
|
133
|
+
"aria-hidden": true,
|
|
134
|
+
className: "absolute z-0 rounded-lg bg-background shadow-sm transition-all duration-200 ease-out motion-reduce:transition-none",
|
|
135
|
+
style: orientation === "vertical" ? {
|
|
136
|
+
top: indicator.top,
|
|
137
|
+
height: indicator.height,
|
|
138
|
+
left: 4,
|
|
139
|
+
right: 4
|
|
140
|
+
} : {
|
|
141
|
+
left: indicator.left,
|
|
142
|
+
width: indicator.width,
|
|
143
|
+
top: 4,
|
|
144
|
+
bottom: 4
|
|
145
|
+
}
|
|
146
|
+
}),
|
|
147
|
+
children,
|
|
148
|
+
tabSuffix
|
|
149
|
+
]
|
|
145
150
|
});
|
|
146
151
|
}
|
|
147
152
|
const tabsTriggerVariants = cva("relative inline-flex items-center justify-center gap-1.5 font-medium whitespace-nowrap text-foreground/70 outline-none transition-all hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|