@lateralus-ai/shipping-ui 2.0.0-dev.20 → 2.0.0-dev.21
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/domain/Filters/FilterDropdown.d.ts +93 -0
- package/dist/domain/Filters/FilterPill.d.ts +12 -5
- package/dist/domain/Filters/FilterPills.d.ts +21 -0
- package/dist/domain/Filters/FilteredPill.d.ts +15 -5
- package/dist/domain/Filters/formatActiveFilterChipLabel.d.ts +11 -0
- package/dist/domain/Filters/index.d.ts +8 -3
- package/dist/index.cjs +33 -33
- package/dist/index.esm.js +7299 -5989
- package/package.json +2 -1
- package/src/components/EmptyState.tsx +44 -44
- package/src/components/Modal.tsx +141 -141
- package/src/components/PageHeader.tsx +132 -132
- package/src/components/ScrollableList.tsx +61 -61
- package/src/components/Tabs.tsx +146 -146
- package/src/components/index.ts +56 -56
- package/src/domain/Filters/FilterDropdown.tsx +438 -0
- package/src/domain/Filters/FilterPill.tsx +54 -18
- package/src/domain/Filters/FilterPills.tsx +41 -0
- package/src/domain/Filters/FilteredPill.tsx +40 -23
- package/src/domain/Filters/FiltersBar.tsx +15 -19
- package/src/domain/Filters/formatActiveFilterChipLabel.ts +23 -0
- package/src/domain/Filters/index.ts +35 -3
- package/src/icons/arrow-paths.ts +8 -8
- package/src/icons/chevron-paths.ts +17 -17
- package/src/icons/icons-data.ts +656 -656
- package/src/index.ts +85 -85
- package/src/patterns/Search/ResultRow.tsx +44 -44
- package/src/patterns/Search/SearchModal.tsx +310 -310
- package/src/patterns/Search/index.ts +31 -31
- package/src/patterns/Sidebar/assets/logo-compliance-mark.png +5 -5
- package/src/patterns/Sidebar/assets/logo-compliance-mask.png +13 -13
- package/src/patterns/Sidebar/assets/logo-compliance.svg +17 -17
- package/src/patterns/Sidebar/assets/logo-technical-avatar.svg +17 -17
- package/src/patterns/Sidebar/assets/logo-technical-mark.png +5 -5
- package/src/patterns/Sidebar/assets/logo-technical.svg +16 -16
- package/src/patterns/Skeleton/Skeleton.tsx +56 -56
- package/src/primitives/button-styles.ts +92 -92
- package/src/stories/canvases/ButtonsCanvas.tsx +107 -107
- package/src/stories/canvases/ButtonsMatrixCanvas.tsx +65 -65
- package/src/stories/canvases/ContentCanvas.tsx +353 -353
- package/src/stories/canvases/FiltersCanvas.tsx +156 -30
- package/src/stories/canvases/SearchCanvas.tsx +150 -150
- package/src/stories/canvases/figma-buttons-layout.ts +83 -83
- package/src/stories/canvases/figma-widths.ts +28 -28
- package/src/stories/canvases/helpers.tsx +146 -146
- package/src/stories/components/Buttons.stories.tsx +11 -11
- package/src/stories/components/Chat.stories.tsx +11 -11
- package/src/stories/components/Content.stories.tsx +11 -11
- package/src/stories/components/Core.stories.tsx +11 -11
- package/src/stories/components/DomainForms.stories.tsx +11 -11
- package/src/stories/components/Filters.stories.tsx +11 -11
- package/src/stories/components/Forms.stories.tsx +11 -11
- package/src/stories/components/Icons.stories.tsx +11 -11
- package/src/stories/components/Illustrations.stories.tsx +11 -11
- package/src/stories/components/Library.stories.tsx +11 -11
- package/src/stories/components/Modals.stories.tsx +11 -11
- package/src/stories/components/Report.stories.tsx +11 -11
- package/src/stories/components/ReportLayout.stories.tsx +11 -11
- package/src/stories/components/Search.stories.tsx +11 -11
- package/src/stories/components/Settings.stories.tsx +11 -11
- package/src/stories/components/Ships.stories.tsx +11 -11
- package/src/stories/components/SidebarLayouts.stories.tsx +11 -11
- package/src/stories/components/Skeletons.stories.tsx +11 -11
- package/src/stories/components/Workflows.stories.tsx +11 -11
- package/src/stories/style-guide/Buttons.stories.tsx +11 -11
- package/src/stories/style-guide/ColorTokens.stories.tsx +11 -11
- package/src/stories/style-guide/Colors.stories.tsx +11 -11
- package/src/stories/style-guide/RaiseLevels.stories.tsx +11 -11
- package/src/stories/style-guide/Typography.stories.tsx +11 -11
- package/src/tailwind-theme.ts +186 -186
- package/src/theme-entry.ts +2 -2
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
-
import { cn } from "../utils/cn";
|
|
3
|
-
|
|
4
|
-
export type ScrollableListProps = ComponentPropsWithoutRef<"div">;
|
|
5
|
-
export type ScrollableListHeaderProps = ComponentPropsWithoutRef<"div">;
|
|
6
|
-
export type ScrollableListBodyProps = ComponentPropsWithoutRef<"div">;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Fill-height list chrome — Figma `Table` (6154:152285).
|
|
10
|
-
* Outer grey-100 frame + header slot + internally scrolling grey-50 body.
|
|
11
|
-
* Column layout and rows are caller-owned children.
|
|
12
|
-
*/
|
|
13
|
-
function ScrollableListRoot({ className, ...props }: ScrollableListProps) {
|
|
14
|
-
return (
|
|
15
|
-
<div
|
|
16
|
-
className={cn(
|
|
17
|
-
"flex min-h-0 flex-1 flex-col gap-2 overflow-hidden rounded-lg bg-grey-100 p-1",
|
|
18
|
-
className,
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Column title bar. Default left padding aligns with a 24px leading icon +
|
|
27
|
-
* 8px gap + 8px row padding (Figma). Override `className` when rows have no icon.
|
|
28
|
-
*/
|
|
29
|
-
function ScrollableListHeader({
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}: ScrollableListHeaderProps) {
|
|
33
|
-
return (
|
|
34
|
-
<div
|
|
35
|
-
className={cn(
|
|
36
|
-
"flex shrink-0 items-start gap-8 pl-10 pr-2 py-1",
|
|
37
|
-
"text-caption-2-em text-display-on-light-secondary",
|
|
38
|
-
className,
|
|
39
|
-
)}
|
|
40
|
-
{...props}
|
|
41
|
-
/>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/** Internally scrolling row region. */
|
|
46
|
-
function ScrollableListBody({ className, ...props }: ScrollableListBodyProps) {
|
|
47
|
-
return (
|
|
48
|
-
<div
|
|
49
|
-
className={cn(
|
|
50
|
-
"flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto rounded bg-grey-50 p-1",
|
|
51
|
-
className,
|
|
52
|
-
)}
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export const ScrollableList = Object.assign(ScrollableListRoot, {
|
|
59
|
-
Header: ScrollableListHeader,
|
|
60
|
-
Body: ScrollableListBody,
|
|
61
|
-
});
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import { cn } from "../utils/cn";
|
|
3
|
+
|
|
4
|
+
export type ScrollableListProps = ComponentPropsWithoutRef<"div">;
|
|
5
|
+
export type ScrollableListHeaderProps = ComponentPropsWithoutRef<"div">;
|
|
6
|
+
export type ScrollableListBodyProps = ComponentPropsWithoutRef<"div">;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Fill-height list chrome — Figma `Table` (6154:152285).
|
|
10
|
+
* Outer grey-100 frame + header slot + internally scrolling grey-50 body.
|
|
11
|
+
* Column layout and rows are caller-owned children.
|
|
12
|
+
*/
|
|
13
|
+
function ScrollableListRoot({ className, ...props }: ScrollableListProps) {
|
|
14
|
+
return (
|
|
15
|
+
<div
|
|
16
|
+
className={cn(
|
|
17
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-hidden rounded-lg bg-grey-100 p-1",
|
|
18
|
+
className,
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Column title bar. Default left padding aligns with a 24px leading icon +
|
|
27
|
+
* 8px gap + 8px row padding (Figma). Override `className` when rows have no icon.
|
|
28
|
+
*/
|
|
29
|
+
function ScrollableListHeader({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: ScrollableListHeaderProps) {
|
|
33
|
+
return (
|
|
34
|
+
<div
|
|
35
|
+
className={cn(
|
|
36
|
+
"flex shrink-0 items-start gap-8 pl-10 pr-2 py-1",
|
|
37
|
+
"text-caption-2-em text-display-on-light-secondary",
|
|
38
|
+
className,
|
|
39
|
+
)}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Internally scrolling row region. */
|
|
46
|
+
function ScrollableListBody({ className, ...props }: ScrollableListBodyProps) {
|
|
47
|
+
return (
|
|
48
|
+
<div
|
|
49
|
+
className={cn(
|
|
50
|
+
"flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto rounded bg-grey-50 p-1",
|
|
51
|
+
className,
|
|
52
|
+
)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const ScrollableList = Object.assign(ScrollableListRoot, {
|
|
59
|
+
Header: ScrollableListHeader,
|
|
60
|
+
Body: ScrollableListBody,
|
|
61
|
+
});
|
package/src/components/Tabs.tsx
CHANGED
|
@@ -1,146 +1,146 @@
|
|
|
1
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2
|
-
import {
|
|
3
|
-
createContext,
|
|
4
|
-
forwardRef,
|
|
5
|
-
useContext,
|
|
6
|
-
type ComponentPropsWithoutRef,
|
|
7
|
-
type ElementRef,
|
|
8
|
-
type ReactNode,
|
|
9
|
-
} from "react";
|
|
10
|
-
import { cn } from "../utils/cn";
|
|
11
|
-
|
|
12
|
-
export type TabsType = "tabs" | "pills";
|
|
13
|
-
|
|
14
|
-
/** Soft = search filters (filled idle, light accent active). Solid = list filters (grey-100 idle, blue-600 active). */
|
|
15
|
-
export type TabsAppearance = "soft" | "solid";
|
|
16
|
-
|
|
17
|
-
type TabsContextValue = {
|
|
18
|
-
type: TabsType;
|
|
19
|
-
appearance: TabsAppearance;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const TabsContext = createContext<TabsContextValue>({
|
|
23
|
-
type: "tabs",
|
|
24
|
-
appearance: "soft",
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export type TabsProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {
|
|
28
|
-
type?: TabsType;
|
|
29
|
-
/** Only applies when `type="pills"`. Defaults to `soft`. */
|
|
30
|
-
appearance?: TabsAppearance;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const Tabs = ({
|
|
34
|
-
type = "tabs",
|
|
35
|
-
appearance = "soft",
|
|
36
|
-
className,
|
|
37
|
-
children,
|
|
38
|
-
...props
|
|
39
|
-
}: TabsProps) => (
|
|
40
|
-
<TabsContext.Provider value={{ type, appearance }}>
|
|
41
|
-
<TabsPrimitive.Root
|
|
42
|
-
className={cn("flex flex-col", className)}
|
|
43
|
-
data-type={type}
|
|
44
|
-
data-appearance={type === "pills" ? appearance : undefined}
|
|
45
|
-
{...props}
|
|
46
|
-
>
|
|
47
|
-
{children}
|
|
48
|
-
</TabsPrimitive.Root>
|
|
49
|
-
</TabsContext.Provider>
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
export type TabsListProps = ComponentPropsWithoutRef<typeof TabsPrimitive.List>;
|
|
53
|
-
|
|
54
|
-
export const TabsList = forwardRef<
|
|
55
|
-
ElementRef<typeof TabsPrimitive.List>,
|
|
56
|
-
TabsListProps
|
|
57
|
-
>(({ className, ...props }, ref) => {
|
|
58
|
-
const { type } = useContext(TabsContext);
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<TabsPrimitive.List
|
|
62
|
-
ref={ref}
|
|
63
|
-
className={cn(
|
|
64
|
-
"flex items-center",
|
|
65
|
-
type === "tabs" && "gap-6 border-b border-divider-primary",
|
|
66
|
-
type === "pills" && "gap-2",
|
|
67
|
-
className,
|
|
68
|
-
)}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
72
|
-
});
|
|
73
|
-
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
74
|
-
|
|
75
|
-
export type TabsTriggerProps = ComponentPropsWithoutRef<
|
|
76
|
-
typeof TabsPrimitive.Trigger
|
|
77
|
-
> & {
|
|
78
|
-
children: ReactNode;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const TabsTrigger = forwardRef<
|
|
82
|
-
ElementRef<typeof TabsPrimitive.Trigger>,
|
|
83
|
-
TabsTriggerProps
|
|
84
|
-
>(({ className, children, ...props }, ref) => {
|
|
85
|
-
const { type, appearance } = useContext(TabsContext);
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
<TabsPrimitive.Trigger
|
|
89
|
-
ref={ref}
|
|
90
|
-
className={cn(
|
|
91
|
-
"inline-flex items-center justify-center gap-2.5 transition-colors outline-none",
|
|
92
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
93
|
-
type === "tabs" && [
|
|
94
|
-
"relative h-12 gap-2 px-0 py-0 text-caption-2 text-display-on-light-secondary",
|
|
95
|
-
"hover:text-display-on-light-primary",
|
|
96
|
-
"data-[state=active]:text-caption-2-em data-[state=active]:text-display-on-light-primary",
|
|
97
|
-
"data-[state=active]:after:absolute data-[state=active]:after:inset-x-0 data-[state=active]:after:-bottom-px",
|
|
98
|
-
"data-[state=active]:after:h-0.5 data-[state=active]:after:rounded-full data-[state=active]:after:bg-grey-900",
|
|
99
|
-
],
|
|
100
|
-
type === "pills" &&
|
|
101
|
-
appearance === "soft" && [
|
|
102
|
-
"min-h-9 rounded-full px-3 py-1 text-caption-2-em",
|
|
103
|
-
"bg-grey-100 text-display-on-light-secondary",
|
|
104
|
-
"hover:bg-grey-200",
|
|
105
|
-
"data-[state=active]:bg-accent-bg-light data-[state=active]:text-display-on-light-primary",
|
|
106
|
-
],
|
|
107
|
-
type === "pills" &&
|
|
108
|
-
appearance === "solid" && [
|
|
109
|
-
"min-h-9 rounded-full px-3 py-1 text-caption-2-em",
|
|
110
|
-
"bg-grey-100 text-display-on-light-tertiary",
|
|
111
|
-
"hover:bg-grey-200 hover:text-display-on-light-primary",
|
|
112
|
-
"data-[state=active]:bg-blue-600 data-[state=active]:text-white",
|
|
113
|
-
"data-[state=active]:hover:bg-blue-600",
|
|
114
|
-
],
|
|
115
|
-
className,
|
|
116
|
-
)}
|
|
117
|
-
{...props}
|
|
118
|
-
>
|
|
119
|
-
{children}
|
|
120
|
-
</TabsPrimitive.Trigger>
|
|
121
|
-
);
|
|
122
|
-
});
|
|
123
|
-
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
124
|
-
|
|
125
|
-
export type TabsContentProps = ComponentPropsWithoutRef<
|
|
126
|
-
typeof TabsPrimitive.Content
|
|
127
|
-
>;
|
|
128
|
-
|
|
129
|
-
export const TabsContent = forwardRef<
|
|
130
|
-
ElementRef<typeof TabsPrimitive.Content>,
|
|
131
|
-
TabsContentProps
|
|
132
|
-
>(({ className, ...props }, ref) => (
|
|
133
|
-
<TabsPrimitive.Content
|
|
134
|
-
ref={ref}
|
|
135
|
-
className={cn("outline-none", className)}
|
|
136
|
-
{...props}
|
|
137
|
-
/>
|
|
138
|
-
));
|
|
139
|
-
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
140
|
-
|
|
141
|
-
/** @deprecated Prefer Tabs + TabsTrigger. Kept for Storybook atom demos. */
|
|
142
|
-
export type TabsItem = {
|
|
143
|
-
label: string;
|
|
144
|
-
value?: string;
|
|
145
|
-
count?: number;
|
|
146
|
-
};
|
|
1
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2
|
+
import {
|
|
3
|
+
createContext,
|
|
4
|
+
forwardRef,
|
|
5
|
+
useContext,
|
|
6
|
+
type ComponentPropsWithoutRef,
|
|
7
|
+
type ElementRef,
|
|
8
|
+
type ReactNode,
|
|
9
|
+
} from "react";
|
|
10
|
+
import { cn } from "../utils/cn";
|
|
11
|
+
|
|
12
|
+
export type TabsType = "tabs" | "pills";
|
|
13
|
+
|
|
14
|
+
/** Soft = search filters (filled idle, light accent active). Solid = list filters (grey-100 idle, blue-600 active). */
|
|
15
|
+
export type TabsAppearance = "soft" | "solid";
|
|
16
|
+
|
|
17
|
+
type TabsContextValue = {
|
|
18
|
+
type: TabsType;
|
|
19
|
+
appearance: TabsAppearance;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const TabsContext = createContext<TabsContextValue>({
|
|
23
|
+
type: "tabs",
|
|
24
|
+
appearance: "soft",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type TabsProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {
|
|
28
|
+
type?: TabsType;
|
|
29
|
+
/** Only applies when `type="pills"`. Defaults to `soft`. */
|
|
30
|
+
appearance?: TabsAppearance;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const Tabs = ({
|
|
34
|
+
type = "tabs",
|
|
35
|
+
appearance = "soft",
|
|
36
|
+
className,
|
|
37
|
+
children,
|
|
38
|
+
...props
|
|
39
|
+
}: TabsProps) => (
|
|
40
|
+
<TabsContext.Provider value={{ type, appearance }}>
|
|
41
|
+
<TabsPrimitive.Root
|
|
42
|
+
className={cn("flex flex-col", className)}
|
|
43
|
+
data-type={type}
|
|
44
|
+
data-appearance={type === "pills" ? appearance : undefined}
|
|
45
|
+
{...props}
|
|
46
|
+
>
|
|
47
|
+
{children}
|
|
48
|
+
</TabsPrimitive.Root>
|
|
49
|
+
</TabsContext.Provider>
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export type TabsListProps = ComponentPropsWithoutRef<typeof TabsPrimitive.List>;
|
|
53
|
+
|
|
54
|
+
export const TabsList = forwardRef<
|
|
55
|
+
ElementRef<typeof TabsPrimitive.List>,
|
|
56
|
+
TabsListProps
|
|
57
|
+
>(({ className, ...props }, ref) => {
|
|
58
|
+
const { type } = useContext(TabsContext);
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<TabsPrimitive.List
|
|
62
|
+
ref={ref}
|
|
63
|
+
className={cn(
|
|
64
|
+
"flex items-center",
|
|
65
|
+
type === "tabs" && "gap-6 border-b border-divider-primary",
|
|
66
|
+
type === "pills" && "gap-2",
|
|
67
|
+
className,
|
|
68
|
+
)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
74
|
+
|
|
75
|
+
export type TabsTriggerProps = ComponentPropsWithoutRef<
|
|
76
|
+
typeof TabsPrimitive.Trigger
|
|
77
|
+
> & {
|
|
78
|
+
children: ReactNode;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const TabsTrigger = forwardRef<
|
|
82
|
+
ElementRef<typeof TabsPrimitive.Trigger>,
|
|
83
|
+
TabsTriggerProps
|
|
84
|
+
>(({ className, children, ...props }, ref) => {
|
|
85
|
+
const { type, appearance } = useContext(TabsContext);
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<TabsPrimitive.Trigger
|
|
89
|
+
ref={ref}
|
|
90
|
+
className={cn(
|
|
91
|
+
"inline-flex items-center justify-center gap-2.5 transition-colors outline-none",
|
|
92
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
93
|
+
type === "tabs" && [
|
|
94
|
+
"relative h-12 gap-2 px-0 py-0 text-caption-2 text-display-on-light-secondary",
|
|
95
|
+
"hover:text-display-on-light-primary",
|
|
96
|
+
"data-[state=active]:text-caption-2-em data-[state=active]:text-display-on-light-primary",
|
|
97
|
+
"data-[state=active]:after:absolute data-[state=active]:after:inset-x-0 data-[state=active]:after:-bottom-px",
|
|
98
|
+
"data-[state=active]:after:h-0.5 data-[state=active]:after:rounded-full data-[state=active]:after:bg-grey-900",
|
|
99
|
+
],
|
|
100
|
+
type === "pills" &&
|
|
101
|
+
appearance === "soft" && [
|
|
102
|
+
"min-h-9 rounded-full px-3 py-1 text-caption-2-em",
|
|
103
|
+
"bg-grey-100 text-display-on-light-secondary",
|
|
104
|
+
"hover:bg-grey-200",
|
|
105
|
+
"data-[state=active]:bg-accent-bg-light data-[state=active]:text-display-on-light-primary",
|
|
106
|
+
],
|
|
107
|
+
type === "pills" &&
|
|
108
|
+
appearance === "solid" && [
|
|
109
|
+
"min-h-9 rounded-full px-3 py-1 text-caption-2-em",
|
|
110
|
+
"bg-grey-100 text-display-on-light-tertiary",
|
|
111
|
+
"hover:bg-grey-200 hover:text-display-on-light-primary",
|
|
112
|
+
"data-[state=active]:bg-blue-600 data-[state=active]:text-white",
|
|
113
|
+
"data-[state=active]:hover:bg-blue-600",
|
|
114
|
+
],
|
|
115
|
+
className,
|
|
116
|
+
)}
|
|
117
|
+
{...props}
|
|
118
|
+
>
|
|
119
|
+
{children}
|
|
120
|
+
</TabsPrimitive.Trigger>
|
|
121
|
+
);
|
|
122
|
+
});
|
|
123
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
124
|
+
|
|
125
|
+
export type TabsContentProps = ComponentPropsWithoutRef<
|
|
126
|
+
typeof TabsPrimitive.Content
|
|
127
|
+
>;
|
|
128
|
+
|
|
129
|
+
export const TabsContent = forwardRef<
|
|
130
|
+
ElementRef<typeof TabsPrimitive.Content>,
|
|
131
|
+
TabsContentProps
|
|
132
|
+
>(({ className, ...props }, ref) => (
|
|
133
|
+
<TabsPrimitive.Content
|
|
134
|
+
ref={ref}
|
|
135
|
+
className={cn("outline-none", className)}
|
|
136
|
+
{...props}
|
|
137
|
+
/>
|
|
138
|
+
));
|
|
139
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
140
|
+
|
|
141
|
+
/** @deprecated Prefer Tabs + TabsTrigger. Kept for Storybook atom demos. */
|
|
142
|
+
export type TabsItem = {
|
|
143
|
+
label: string;
|
|
144
|
+
value?: string;
|
|
145
|
+
count?: number;
|
|
146
|
+
};
|
package/src/components/index.ts
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
export { Input, type InputProps, type InputState } from "./Input";
|
|
2
|
-
export { ReportInput, type ReportInputProps, type ReportInputState } from "./ReportInput";
|
|
3
|
-
export { InputType, type InputTypeProps, type InputTypeKind, type InputTypeState } from "./InputType";
|
|
4
|
-
export { Chip, type ChipProps, type ChipVariant } from "./Chip";
|
|
5
|
-
export { Checkbox, type CheckboxProps } from "./Checkbox";
|
|
6
|
-
export { Tab, type TabProps, type TabState } from "./Tab";
|
|
7
|
-
export {
|
|
8
|
-
Tabs,
|
|
9
|
-
TabsList,
|
|
10
|
-
TabsTrigger,
|
|
11
|
-
TabsContent,
|
|
12
|
-
type TabsProps,
|
|
13
|
-
type TabsListProps,
|
|
14
|
-
type TabsTriggerProps,
|
|
15
|
-
type TabsContentProps,
|
|
16
|
-
type TabsItem,
|
|
17
|
-
type TabsType,
|
|
18
|
-
type TabsAppearance,
|
|
19
|
-
} from "./Tabs";
|
|
20
|
-
export { Header, type HeaderProps, type HeaderVariant } from "./Header";
|
|
21
|
-
export {
|
|
22
|
-
PageHeader,
|
|
23
|
-
type PageHeaderProps,
|
|
24
|
-
type PageHeaderCrumb,
|
|
25
|
-
type PageHeaderShellProps,
|
|
26
|
-
type PageHeaderBodyProps,
|
|
27
|
-
} from "./PageHeader";
|
|
28
|
-
export {
|
|
29
|
-
ScrollableList,
|
|
30
|
-
type ScrollableListProps,
|
|
31
|
-
type ScrollableListHeaderProps,
|
|
32
|
-
type ScrollableListBodyProps,
|
|
33
|
-
} from "./ScrollableList";
|
|
34
|
-
export { Entry, type EntryProps, type EntryType, type EntryState, type EntryVariant } from "./Entry";
|
|
35
|
-
export { EmptyState, type EmptyStateProps } from "./EmptyState";
|
|
36
|
-
export {
|
|
37
|
-
Modal,
|
|
38
|
-
ModalTrigger,
|
|
39
|
-
ModalClose,
|
|
40
|
-
ModalPortal,
|
|
41
|
-
ModalOverlay,
|
|
42
|
-
ModalContent,
|
|
43
|
-
ModalTitle,
|
|
44
|
-
ModalDescription,
|
|
45
|
-
ModalHeaderSlot,
|
|
46
|
-
ModalBody,
|
|
47
|
-
type ModalProps,
|
|
48
|
-
type ModalOverlayProps,
|
|
49
|
-
type ModalContentProps,
|
|
50
|
-
type ModalTitleProps,
|
|
51
|
-
type ModalDescriptionProps,
|
|
52
|
-
type ModalBodyProps,
|
|
53
|
-
} from "./Modal";
|
|
54
|
-
export { ModalPanel } from "./ModalPanel";
|
|
55
|
-
export * from "./PdfViewer/";
|
|
56
|
-
export * from "./DocumentEditor";
|
|
1
|
+
export { Input, type InputProps, type InputState } from "./Input";
|
|
2
|
+
export { ReportInput, type ReportInputProps, type ReportInputState } from "./ReportInput";
|
|
3
|
+
export { InputType, type InputTypeProps, type InputTypeKind, type InputTypeState } from "./InputType";
|
|
4
|
+
export { Chip, type ChipProps, type ChipVariant } from "./Chip";
|
|
5
|
+
export { Checkbox, type CheckboxProps } from "./Checkbox";
|
|
6
|
+
export { Tab, type TabProps, type TabState } from "./Tab";
|
|
7
|
+
export {
|
|
8
|
+
Tabs,
|
|
9
|
+
TabsList,
|
|
10
|
+
TabsTrigger,
|
|
11
|
+
TabsContent,
|
|
12
|
+
type TabsProps,
|
|
13
|
+
type TabsListProps,
|
|
14
|
+
type TabsTriggerProps,
|
|
15
|
+
type TabsContentProps,
|
|
16
|
+
type TabsItem,
|
|
17
|
+
type TabsType,
|
|
18
|
+
type TabsAppearance,
|
|
19
|
+
} from "./Tabs";
|
|
20
|
+
export { Header, type HeaderProps, type HeaderVariant } from "./Header";
|
|
21
|
+
export {
|
|
22
|
+
PageHeader,
|
|
23
|
+
type PageHeaderProps,
|
|
24
|
+
type PageHeaderCrumb,
|
|
25
|
+
type PageHeaderShellProps,
|
|
26
|
+
type PageHeaderBodyProps,
|
|
27
|
+
} from "./PageHeader";
|
|
28
|
+
export {
|
|
29
|
+
ScrollableList,
|
|
30
|
+
type ScrollableListProps,
|
|
31
|
+
type ScrollableListHeaderProps,
|
|
32
|
+
type ScrollableListBodyProps,
|
|
33
|
+
} from "./ScrollableList";
|
|
34
|
+
export { Entry, type EntryProps, type EntryType, type EntryState, type EntryVariant } from "./Entry";
|
|
35
|
+
export { EmptyState, type EmptyStateProps } from "./EmptyState";
|
|
36
|
+
export {
|
|
37
|
+
Modal,
|
|
38
|
+
ModalTrigger,
|
|
39
|
+
ModalClose,
|
|
40
|
+
ModalPortal,
|
|
41
|
+
ModalOverlay,
|
|
42
|
+
ModalContent,
|
|
43
|
+
ModalTitle,
|
|
44
|
+
ModalDescription,
|
|
45
|
+
ModalHeaderSlot,
|
|
46
|
+
ModalBody,
|
|
47
|
+
type ModalProps,
|
|
48
|
+
type ModalOverlayProps,
|
|
49
|
+
type ModalContentProps,
|
|
50
|
+
type ModalTitleProps,
|
|
51
|
+
type ModalDescriptionProps,
|
|
52
|
+
type ModalBodyProps,
|
|
53
|
+
} from "./Modal";
|
|
54
|
+
export { ModalPanel } from "./ModalPanel";
|
|
55
|
+
export * from "./PdfViewer/";
|
|
56
|
+
export * from "./DocumentEditor";
|