@lateralus-ai/shipping-ui 2.0.0-dev.3 → 2.0.0-dev.30
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/Entry.d.ts +27 -7
- package/dist/components/PageHeader.d.ts +41 -0
- package/dist/components/ScrollableList.d.ts +22 -0
- package/dist/components/Tabs.d.ts +5 -5
- package/dist/components/index.d.ts +4 -2
- package/dist/domain/Filters/FilterDropdown.d.ts +119 -0
- package/dist/domain/Filters/FilterPill.d.ts +22 -5
- package/dist/domain/Filters/FilterPills.d.ts +18 -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.d.ts +2 -2
- package/dist/index.esm.js +6383 -4792
- package/dist/patterns/Search/ResultRow.d.ts +11 -5
- package/dist/patterns/Sidebar/sidebar-styles.d.ts +2 -1
- package/dist/primitives/Badge.d.ts +7 -4
- package/dist/primitives/Button.d.ts +3 -1
- package/dist/primitives/Switch.d.ts +5 -0
- package/dist/primitives/index.d.ts +1 -1
- package/dist/tailwind-theme.d.ts +8 -4
- package/dist/theme-entry-Dwr2mV7_.js +1 -0
- package/dist/{theme-entry-CxDa1D0_.mjs → theme-entry-tLBc6zGT.mjs} +12 -8
- package/dist/theme.cjs +1 -1
- package/dist/theme.esm.js +1 -1
- package/package.json +3 -2
- package/src/components/EmptyState.tsx +44 -44
- package/src/components/Entry.tsx +119 -45
- package/src/components/Modal.tsx +141 -141
- package/src/components/PageHeader.tsx +132 -0
- package/src/components/ScrollableList.tsx +61 -0
- package/src/components/Tabs.tsx +33 -26
- package/src/components/index.ts +15 -1
- package/src/domain/Filters/FilterDropdown.tsx +540 -0
- package/src/domain/Filters/FilterPill.tsx +74 -25
- package/src/domain/Filters/FilterPills.tsx +34 -0
- package/src/domain/Filters/FilteredPill.tsx +59 -39
- package/src/domain/Filters/FiltersBar.tsx +72 -76
- package/src/domain/Filters/formatActiveFilterChipLabel.ts +23 -0
- package/src/domain/Filters/index.ts +37 -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 +11 -0
- package/src/patterns/Search/ResultRow.tsx +24 -38
- package/src/patterns/Search/SearchModal.tsx +26 -8
- package/src/patterns/Sidebar/CollapsibleNavGroup.tsx +1 -1
- package/src/patterns/Sidebar/SidebarAction.tsx +26 -17
- package/src/patterns/Sidebar/SidebarEntry.tsx +54 -39
- package/src/patterns/Sidebar/SidebarLink.tsx +30 -20
- 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/Sidebar/sidebar-styles.ts +2 -1
- package/src/primitives/Badge.tsx +20 -10
- package/src/primitives/Button.tsx +21 -11
- package/src/primitives/Logo.tsx +20 -8
- package/src/primitives/Switch.tsx +27 -7
- package/src/primitives/button-styles.ts +92 -92
- package/src/primitives/index.ts +1 -1
- package/src/stories/canvases/ButtonsCanvas.tsx +107 -107
- package/src/stories/canvases/ButtonsMatrixCanvas.tsx +65 -65
- package/src/stories/canvases/ContentCanvas.tsx +253 -14
- package/src/stories/canvases/FiltersCanvas.tsx +171 -41
- 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 +8 -4
- package/src/theme-entry.ts +2 -2
- package/src/utils/cn.ts +28 -1
- package/dist/theme-entry-D2X3Ptjf.js +0 -1
package/src/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ export {
|
|
|
19
19
|
TabsTrigger,
|
|
20
20
|
TabsContent,
|
|
21
21
|
Header,
|
|
22
|
+
PageHeader,
|
|
22
23
|
Entry,
|
|
23
24
|
EmptyState,
|
|
24
25
|
Modal,
|
|
@@ -35,6 +36,7 @@ export {
|
|
|
35
36
|
PdfViewer,
|
|
36
37
|
ImageViewer,
|
|
37
38
|
DocumentEditor,
|
|
39
|
+
ScrollableList,
|
|
38
40
|
} from "./components";
|
|
39
41
|
|
|
40
42
|
export type {
|
|
@@ -56,11 +58,20 @@ export type {
|
|
|
56
58
|
TabsContentProps,
|
|
57
59
|
TabsItem,
|
|
58
60
|
TabsType,
|
|
61
|
+
TabsAppearance,
|
|
59
62
|
HeaderProps,
|
|
60
63
|
HeaderVariant,
|
|
64
|
+
PageHeaderProps,
|
|
65
|
+
PageHeaderCrumb,
|
|
66
|
+
PageHeaderShellProps,
|
|
67
|
+
PageHeaderBodyProps,
|
|
68
|
+
ScrollableListProps,
|
|
69
|
+
ScrollableListHeaderProps,
|
|
70
|
+
ScrollableListBodyProps,
|
|
61
71
|
EntryProps,
|
|
62
72
|
EntryType,
|
|
63
73
|
EntryState,
|
|
74
|
+
EntryVariant,
|
|
64
75
|
EmptyStateProps,
|
|
65
76
|
ModalProps,
|
|
66
77
|
ModalOverlayProps,
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
Entry,
|
|
4
|
+
type EntryProps,
|
|
5
|
+
type EntryState,
|
|
6
|
+
type EntryVariant,
|
|
7
|
+
} from "../../components/Entry";
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
export type
|
|
9
|
+
/** @deprecated Prefer `EntryVariant`. */
|
|
10
|
+
export type ResultRowVariant = EntryVariant;
|
|
11
|
+
/** @deprecated Prefer `EntryState`. */
|
|
12
|
+
export type ResultRowState = EntryState;
|
|
7
13
|
|
|
8
14
|
export type ResultRowProps = {
|
|
9
|
-
variant?:
|
|
10
|
-
state?:
|
|
15
|
+
variant?: EntryVariant;
|
|
16
|
+
state?: EntryState;
|
|
11
17
|
title?: ReactNode;
|
|
12
|
-
/** Secondary line — excerpt, metadata, or highlighted query match. */
|
|
13
18
|
subtitle?: ReactNode;
|
|
14
19
|
onClick?: () => void;
|
|
15
20
|
className?: string;
|
|
16
21
|
};
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
issue: <IssuesIcon className="size-4" />,
|
|
22
|
-
};
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Prefer `Entry` — ResultRow is a thin alias for search lists.
|
|
25
|
+
*/
|
|
24
26
|
export const ResultRow = ({
|
|
25
27
|
variant = "report",
|
|
26
28
|
state = "idle",
|
|
@@ -29,30 +31,14 @@ export const ResultRow = ({
|
|
|
29
31
|
onClick,
|
|
30
32
|
className,
|
|
31
33
|
}: ResultRowProps) => (
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
state === "active" && "bg-[rgba(38,36,32,0.04)]",
|
|
38
|
-
className,
|
|
39
|
-
)}
|
|
40
|
-
data-variant={variant}
|
|
41
|
-
data-state={state}
|
|
34
|
+
<Entry
|
|
35
|
+
variant={variant}
|
|
36
|
+
state={state}
|
|
37
|
+
title={title}
|
|
38
|
+
subtitle={subtitle}
|
|
42
39
|
onClick={onClick}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
{variantIcons[variant]}
|
|
46
|
-
</span>
|
|
47
|
-
<span className="min-w-0 flex-1">
|
|
48
|
-
<span className="block truncate text-caption-1-em text-display-on-light-primary">
|
|
49
|
-
{title}
|
|
50
|
-
</span>
|
|
51
|
-
{subtitle != null && subtitle !== false && (
|
|
52
|
-
<span className="mt-0.5 block truncate text-caption-2 text-display-on-light-secondary">
|
|
53
|
-
{subtitle}
|
|
54
|
-
</span>
|
|
55
|
-
)}
|
|
56
|
-
</span>
|
|
57
|
-
</button>
|
|
40
|
+
className={className}
|
|
41
|
+
/>
|
|
58
42
|
);
|
|
43
|
+
|
|
44
|
+
export type { EntryProps };
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
type ModalProps,
|
|
14
14
|
} from "../../components/Modal";
|
|
15
15
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../components/Tabs";
|
|
16
|
+
import { Badge } from "../../primitives/Badge";
|
|
16
17
|
import { cn } from "../../utils/cn";
|
|
17
18
|
import { ResultRow, type ResultRowProps } from "./ResultRow";
|
|
18
19
|
import { SectionHeader } from "./SectionHeader";
|
|
@@ -131,7 +132,12 @@ export const SearchModalBody = ({
|
|
|
131
132
|
children,
|
|
132
133
|
className,
|
|
133
134
|
}: SearchModalBodyProps) => (
|
|
134
|
-
<ModalBody
|
|
135
|
+
<ModalBody
|
|
136
|
+
className={cn(
|
|
137
|
+
"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden p-2",
|
|
138
|
+
className,
|
|
139
|
+
)}
|
|
140
|
+
>
|
|
135
141
|
{children}
|
|
136
142
|
</ModalBody>
|
|
137
143
|
);
|
|
@@ -162,16 +168,26 @@ export const SearchModalFilters = ({
|
|
|
162
168
|
type="pills"
|
|
163
169
|
value={value}
|
|
164
170
|
onValueChange={onValueChange}
|
|
165
|
-
className={cn("gap-0", className)}
|
|
171
|
+
className={cn("min-h-0 flex-1 gap-0", className)}
|
|
166
172
|
>
|
|
167
|
-
<TabsList
|
|
173
|
+
<TabsList
|
|
174
|
+
className={cn(
|
|
175
|
+
"w-full shrink-0 bg-background-primary p-2",
|
|
176
|
+
listClassName,
|
|
177
|
+
)}
|
|
178
|
+
>
|
|
168
179
|
{tabs.map((tab) => (
|
|
169
|
-
<TabsTrigger key={tab.value} value={tab.value}
|
|
180
|
+
<TabsTrigger key={tab.value} value={tab.value}>
|
|
170
181
|
{tab.label}
|
|
182
|
+
{typeof tab.count === "number" && (
|
|
183
|
+
<Badge color="blue">
|
|
184
|
+
{tab.count > 99 ? "99+" : tab.count}
|
|
185
|
+
</Badge>
|
|
186
|
+
)}
|
|
171
187
|
</TabsTrigger>
|
|
172
188
|
))}
|
|
173
189
|
</TabsList>
|
|
174
|
-
{children}
|
|
190
|
+
<div className="min-h-0 flex-1 overflow-y-auto">{children}</div>
|
|
175
191
|
</Tabs>
|
|
176
192
|
);
|
|
177
193
|
|
|
@@ -223,12 +239,14 @@ export const SearchModalIdle = ({
|
|
|
223
239
|
children,
|
|
224
240
|
className,
|
|
225
241
|
}: SearchModalIdleProps) => (
|
|
226
|
-
<div className={cn("flex flex-col p-1", className)}>
|
|
242
|
+
<div className={cn("flex min-h-0 flex-1 flex-col p-1", className)}>
|
|
227
243
|
<SectionHeader
|
|
228
244
|
label={label}
|
|
229
|
-
className="px-3 py-1 text-caption-2 font-normal normal-case tracking-[0.01em] text-display-on-light-secondary"
|
|
245
|
+
className="shrink-0 px-3 py-1 text-caption-2 font-normal normal-case tracking-[0.01em] text-display-on-light-secondary"
|
|
230
246
|
/>
|
|
231
|
-
<
|
|
247
|
+
<div className="min-h-0 flex-1 overflow-y-auto">
|
|
248
|
+
<SearchModalResults items={items}>{children}</SearchModalResults>
|
|
249
|
+
</div>
|
|
232
250
|
</div>
|
|
233
251
|
);
|
|
234
252
|
|
|
@@ -45,7 +45,6 @@ export const CollapsibleNavGroup = ({
|
|
|
45
45
|
href={href}
|
|
46
46
|
label={label}
|
|
47
47
|
icon={icon}
|
|
48
|
-
tall
|
|
49
48
|
onNavigate={onNavigate}
|
|
50
49
|
trailing={
|
|
51
50
|
<IconButton
|
|
@@ -93,6 +92,7 @@ export const CollapsibleNavGroup = ({
|
|
|
93
92
|
) : undefined
|
|
94
93
|
}
|
|
95
94
|
menuItems={entryMenuItems}
|
|
95
|
+
onNavigate={onNavigate}
|
|
96
96
|
/>
|
|
97
97
|
))}
|
|
98
98
|
</div>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { Tooltip } from "../../primitives";
|
|
3
3
|
import { cn } from "../../utils/cn";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
sidebarLinkActive,
|
|
6
|
+
sidebarLinkIdle,
|
|
7
|
+
sidebarRowInteractiveHover,
|
|
8
|
+
sidebarSectionIconClass,
|
|
9
|
+
sidebarSectionShell,
|
|
10
|
+
sidebarSectionShellCollapsed,
|
|
11
|
+
} from "./sidebar-styles";
|
|
5
12
|
|
|
6
13
|
export type SidebarActionProps = {
|
|
7
14
|
label: string;
|
|
@@ -23,26 +30,28 @@ export const SidebarAction = ({
|
|
|
23
30
|
className,
|
|
24
31
|
}: SidebarActionProps) => {
|
|
25
32
|
const row = (
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
<button
|
|
34
|
+
type="button"
|
|
35
|
+
onClick={onClick}
|
|
36
|
+
aria-label={label}
|
|
37
|
+
className={cn(
|
|
38
|
+
collapsed ? sidebarSectionShellCollapsed : sidebarSectionShell,
|
|
39
|
+
"cursor-pointer text-left",
|
|
40
|
+
active ? sidebarLinkActive : sidebarLinkIdle,
|
|
41
|
+
!active && sidebarRowInteractiveHover,
|
|
42
|
+
!collapsed && "gap-2",
|
|
43
|
+
className,
|
|
33
44
|
)}
|
|
34
45
|
data-active={active}
|
|
35
46
|
data-collapsed={collapsed}
|
|
36
47
|
>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
className=
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</button>
|
|
45
|
-
</div>
|
|
48
|
+
{icon && <span className={sidebarSectionIconClass}>{icon}</span>}
|
|
49
|
+
{!collapsed && (
|
|
50
|
+
<span className="min-w-0 flex-1 truncate text-caption-2 tracking-[0.01em]">
|
|
51
|
+
{label}
|
|
52
|
+
</span>
|
|
53
|
+
)}
|
|
54
|
+
</button>
|
|
46
55
|
);
|
|
47
56
|
|
|
48
57
|
if (!collapsed || !tooltip) return row;
|
|
@@ -3,7 +3,6 @@ import { DropdownMenu, DropdownMenuItem, IconButton } from "../../primitives";
|
|
|
3
3
|
import { MoreIcon } from "../../icons";
|
|
4
4
|
import { cn } from "../../utils/cn";
|
|
5
5
|
import {
|
|
6
|
-
sidebarAnchorClass,
|
|
7
6
|
sidebarEntryHover,
|
|
8
7
|
sidebarEntryIdle,
|
|
9
8
|
sidebarEntrySelected,
|
|
@@ -66,58 +65,74 @@ export const SidebarEntry = ({
|
|
|
66
65
|
)}
|
|
67
66
|
data-state={state}
|
|
68
67
|
>
|
|
68
|
+
{/* Stretch hit target over shell padding (hover was on the shell, link was content-only). */}
|
|
69
69
|
<a
|
|
70
70
|
href={href}
|
|
71
|
-
className=
|
|
71
|
+
className="absolute inset-0 z-0 rounded-control"
|
|
72
|
+
aria-label={label}
|
|
72
73
|
aria-current={state === "selected" ? "true" : undefined}
|
|
73
74
|
onClick={onNavigate}
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
/>
|
|
76
|
+
|
|
77
|
+
<div className="pointer-events-none relative z-10 flex min-w-0 flex-1 items-center gap-2 text-caption-2">
|
|
78
|
+
{icon && <span className="shrink-0 [&>svg]:size-4">{icon}</span>}
|
|
76
79
|
<span className="truncate">{label}</span>
|
|
77
|
-
</
|
|
80
|
+
</div>
|
|
78
81
|
|
|
79
82
|
{badge && !(showMenu && menuVisible) && (
|
|
80
83
|
<span
|
|
81
|
-
className={cn(
|
|
84
|
+
className={cn(
|
|
85
|
+
"pointer-events-none relative z-10 shrink-0",
|
|
86
|
+
showMenu && !forceMenuVisible && "group-hover/row:hidden",
|
|
87
|
+
)}
|
|
82
88
|
>
|
|
83
89
|
{badge}
|
|
84
90
|
</span>
|
|
85
91
|
)}
|
|
86
92
|
|
|
87
93
|
{showMenu && (
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
94
|
+
<div className="relative z-10 shrink-0">
|
|
95
|
+
<DropdownMenu
|
|
96
|
+
open={menuOpen}
|
|
97
|
+
onOpenChange={setMenuOpen}
|
|
98
|
+
align="end"
|
|
99
|
+
trigger={
|
|
100
|
+
<IconButton
|
|
101
|
+
hierarchy="quaternary"
|
|
102
|
+
size="small"
|
|
103
|
+
aria-label={`Actions for ${label}`}
|
|
104
|
+
aria-haspopup="menu"
|
|
105
|
+
aria-expanded={menuOpen}
|
|
106
|
+
className={cn(
|
|
107
|
+
"size-6 min-h-6 shrink-0 p-1",
|
|
108
|
+
sidebarQuaternaryIconButton,
|
|
109
|
+
!forceMenuVisible &&
|
|
110
|
+
!menuOpen &&
|
|
111
|
+
"hidden group-hover/row:inline-flex",
|
|
112
|
+
(forceMenuVisible || menuOpen) && "inline-flex",
|
|
113
|
+
)}
|
|
114
|
+
>
|
|
115
|
+
<MoreIcon size="small" />
|
|
116
|
+
</IconButton>
|
|
117
|
+
}
|
|
118
|
+
>
|
|
119
|
+
{menuItems?.map((item) => (
|
|
120
|
+
<DropdownMenuItem
|
|
121
|
+
key={item.id}
|
|
122
|
+
className={cn(
|
|
123
|
+
item.destructive &&
|
|
124
|
+
"text-red-500 hover:bg-red-50 hover:text-red-700",
|
|
125
|
+
)}
|
|
126
|
+
onSelect={() => item.onSelect()}
|
|
127
|
+
>
|
|
128
|
+
{item.icon && (
|
|
129
|
+
<span className="shrink-0 [&>svg]:size-4">{item.icon}</span>
|
|
130
|
+
)}
|
|
131
|
+
{item.label}
|
|
132
|
+
</DropdownMenuItem>
|
|
133
|
+
))}
|
|
134
|
+
</DropdownMenu>
|
|
135
|
+
</div>
|
|
121
136
|
)}
|
|
122
137
|
</div>
|
|
123
138
|
);
|
|
@@ -58,6 +58,7 @@ export const SidebarLink = ({
|
|
|
58
58
|
const row = collapsed ? (
|
|
59
59
|
<div
|
|
60
60
|
className={cn(
|
|
61
|
+
"relative",
|
|
61
62
|
sidebarSectionShellCollapsed,
|
|
62
63
|
stateStyles[state],
|
|
63
64
|
state === "idle" && sidebarRowInteractiveHover,
|
|
@@ -68,24 +69,24 @@ export const SidebarLink = ({
|
|
|
68
69
|
>
|
|
69
70
|
<a
|
|
70
71
|
href={href}
|
|
71
|
-
className="
|
|
72
|
+
className="absolute inset-0 z-0 rounded-control"
|
|
72
73
|
aria-current={state === "active" ? "page" : undefined}
|
|
73
74
|
aria-label={label}
|
|
74
75
|
onClick={onNavigate}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
</a>
|
|
76
|
+
/>
|
|
77
|
+
<span className="pointer-events-none relative z-10 inline-flex shrink-0 items-center">
|
|
78
|
+
{icon && <span className={sidebarSectionIconClass}>{icon}</span>}
|
|
79
|
+
{unread && (
|
|
80
|
+
<span aria-hidden className={sidebarUnreadOverlay}>
|
|
81
|
+
<span className={sidebarUnreadDot} />
|
|
82
|
+
</span>
|
|
83
|
+
)}
|
|
84
|
+
</span>
|
|
85
85
|
</div>
|
|
86
86
|
) : (
|
|
87
87
|
<div
|
|
88
88
|
className={cn(
|
|
89
|
+
"relative",
|
|
89
90
|
tall ? sidebarSectionShellTall : sidebarSectionShell,
|
|
90
91
|
stateStyles[state],
|
|
91
92
|
state === "idle" && sidebarRowInteractiveHover,
|
|
@@ -94,18 +95,27 @@ export const SidebarLink = ({
|
|
|
94
95
|
data-state={state}
|
|
95
96
|
data-collapsed={collapsed}
|
|
96
97
|
>
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
<a
|
|
99
|
+
href={href}
|
|
100
|
+
className="absolute inset-0 z-0 rounded-control"
|
|
101
|
+
aria-current={state === "active" ? "page" : undefined}
|
|
102
|
+
aria-label={label}
|
|
103
|
+
onClick={onNavigate}
|
|
104
|
+
/>
|
|
105
|
+
<div
|
|
106
|
+
className={cn(
|
|
107
|
+
sidebarSectionContent,
|
|
108
|
+
"pointer-events-none relative z-10",
|
|
109
|
+
)}
|
|
110
|
+
>
|
|
111
|
+
<span className="flex min-w-0 flex-1 items-center gap-2 truncate text-left">
|
|
104
112
|
{icon && <span className={sidebarSectionIconClass}>{icon}</span>}
|
|
105
113
|
<span className={sidebarSectionLabelClass}>{label}</span>
|
|
106
114
|
{badge}
|
|
107
|
-
</
|
|
108
|
-
{trailing
|
|
115
|
+
</span>
|
|
116
|
+
{trailing != null && (
|
|
117
|
+
<span className="pointer-events-auto shrink-0">{trailing}</span>
|
|
118
|
+
)}
|
|
109
119
|
</div>
|
|
110
120
|
</div>
|
|
111
121
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="Logo">
|
|
3
|
-
<path id="Glyph" d="M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z" fill="var(--fill-0, #262420)"/>
|
|
4
|
-
</g>
|
|
5
|
-
</svg>
|
|
1
|
+
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Logo">
|
|
3
|
+
<path id="Glyph" d="M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z" fill="var(--fill-0, #262420)"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="Mask" clip-path="url(#clip0_0_4)">
|
|
3
|
-
<g id="icon-compliance.svg">
|
|
4
|
-
<path id="Vector" d="M8.30333 5.84667L5.18333 14.2917H6.33833V14.2883C6.34 14.2883 6.34167 14.29 6.34167 14.29L8.90667 11.7267H9.06667L11.6283 14.2917H12.8233L9.71667 5.84667H8.305H8.30333ZM9.215 10.4433H8.75667L7.15167 12.0483L8.89 7.25167H9.10167L10.825 12.055L9.21667 10.4433H9.215Z" fill="var(--fill-0, #232323)"/>
|
|
5
|
-
<path id="Vector_2" d="M8.98833 4.85833C9.87167 4.85833 10.6817 5.23 11.3117 5.84667H12.7967C11.925 4.54667 10.5433 3.70667 8.98833 3.70667C7.43333 3.70667 6.05167 4.54667 5.18 5.84667H6.665C7.29333 5.23 8.105 4.85833 8.98833 4.85833Z" fill="var(--fill-0, #232323)"/>
|
|
6
|
-
</g>
|
|
7
|
-
</g>
|
|
8
|
-
<defs>
|
|
9
|
-
<clipPath id="clip0_0_4">
|
|
10
|
-
<rect width="18" height="18" fill="white"/>
|
|
11
|
-
</clipPath>
|
|
12
|
-
</defs>
|
|
13
|
-
</svg>
|
|
1
|
+
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Mask" clip-path="url(#clip0_0_4)">
|
|
3
|
+
<g id="icon-compliance.svg">
|
|
4
|
+
<path id="Vector" d="M8.30333 5.84667L5.18333 14.2917H6.33833V14.2883C6.34 14.2883 6.34167 14.29 6.34167 14.29L8.90667 11.7267H9.06667L11.6283 14.2917H12.8233L9.71667 5.84667H8.305H8.30333ZM9.215 10.4433H8.75667L7.15167 12.0483L8.89 7.25167H9.10167L10.825 12.055L9.21667 10.4433H9.215Z" fill="var(--fill-0, #232323)"/>
|
|
5
|
+
<path id="Vector_2" d="M8.98833 4.85833C9.87167 4.85833 10.6817 5.23 11.3117 5.84667H12.7967C11.925 4.54667 10.5433 3.70667 8.98833 3.70667C7.43333 3.70667 6.05167 4.54667 5.18 5.84667H6.665C7.29333 5.23 8.105 4.85833 8.98833 4.85833Z" fill="var(--fill-0, #232323)"/>
|
|
6
|
+
</g>
|
|
7
|
+
</g>
|
|
8
|
+
<defs>
|
|
9
|
+
<clipPath id="clip0_0_4">
|
|
10
|
+
<rect width="18" height="18" fill="white"/>
|
|
11
|
+
</clipPath>
|
|
12
|
+
</defs>
|
|
13
|
+
</svg>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect width="18" height="18" fill="#F5F5F5"/>
|
|
3
|
-
<g id="Core">
|
|
4
|
-
<path d="M-330 -683C-330 -694.046 -321.046 -703 -310 -703H382C393.046 -703 402 -694.046 402 -683V927C402 938.046 393.046 947 382 947H-310C-321.046 947 -330 938.046 -330 927V-683Z" fill="#FDFDFC"/>
|
|
5
|
-
<g id="Content">
|
|
6
|
-
<g id="Avatar">
|
|
7
|
-
<rect x="-273.5" y="-30.5" width="619" height="79" rx="4.5" stroke="#9747FF" stroke-dasharray="10 5"/>
|
|
8
|
-
<g id="Chief=Technical, Size=18">
|
|
9
|
-
<path d="M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z" fill="#FDFDFC"/>
|
|
10
|
-
<g id="Logo">
|
|
11
|
-
<path id="Glyph" d="M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z" fill="#262420"/>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
16
|
-
</g>
|
|
17
|
-
</svg>
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="18" height="18" fill="#F5F5F5"/>
|
|
3
|
+
<g id="Core">
|
|
4
|
+
<path d="M-330 -683C-330 -694.046 -321.046 -703 -310 -703H382C393.046 -703 402 -694.046 402 -683V927C402 938.046 393.046 947 382 947H-310C-321.046 947 -330 938.046 -330 927V-683Z" fill="#FDFDFC"/>
|
|
5
|
+
<g id="Content">
|
|
6
|
+
<g id="Avatar">
|
|
7
|
+
<rect x="-273.5" y="-30.5" width="619" height="79" rx="4.5" stroke="#9747FF" stroke-dasharray="10 5"/>
|
|
8
|
+
<g id="Chief=Technical, Size=18">
|
|
9
|
+
<path d="M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z" fill="#FDFDFC"/>
|
|
10
|
+
<g id="Logo">
|
|
11
|
+
<path id="Glyph" d="M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z" fill="#262420"/>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect width="18" height="18" fill="#F5F5F5"/>
|
|
3
|
-
<g id="Core">
|
|
4
|
-
<path d="M-330 -683C-330 -694.046 -321.046 -703 -310 -703H382C393.046 -703 402 -694.046 402 -683V927C402 938.046 393.046 947 382 947H-310C-321.046 947 -330 938.046 -330 927V-683Z" fill="#FDFDFC"/>
|
|
5
|
-
<g id="Content">
|
|
6
|
-
<g id="Avatar">
|
|
7
|
-
<rect x="-273.5" y="-30.5" width="619" height="79" rx="4.5" stroke="#9747FF" stroke-dasharray="10 5"/>
|
|
8
|
-
<g id="Chief=Technical, Size=18">
|
|
9
|
-
<path d="M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z" fill="#FDFDFC"/>
|
|
10
|
-
<g id="Logo">
|
|
11
|
-
<path id="Glyph" d="M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z" fill="#262420"/>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
16
|
-
</g>
|
|
17
|
-
</svg>
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="18" height="18" fill="#F5F5F5"/>
|
|
3
|
+
<g id="Core">
|
|
4
|
+
<path d="M-330 -683C-330 -694.046 -321.046 -703 -310 -703H382C393.046 -703 402 -694.046 402 -683V927C402 938.046 393.046 947 382 947H-310C-321.046 947 -330 938.046 -330 927V-683Z" fill="#FDFDFC"/>
|
|
5
|
+
<g id="Content">
|
|
6
|
+
<g id="Avatar">
|
|
7
|
+
<rect x="-273.5" y="-30.5" width="619" height="79" rx="4.5" stroke="#9747FF" stroke-dasharray="10 5"/>
|
|
8
|
+
<g id="Chief=Technical, Size=18">
|
|
9
|
+
<path d="M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z" fill="#FDFDFC"/>
|
|
10
|
+
<g id="Logo">
|
|
11
|
+
<path id="Glyph" d="M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z" fill="#262420"/>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="Logo">
|
|
3
|
-
<path id="Glyph" d="M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z" fill="var(--fill-0, #262420)"/>
|
|
4
|
-
</g>
|
|
5
|
-
</svg>
|
|
1
|
+
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Logo">
|
|
3
|
+
<path id="Glyph" d="M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z" fill="var(--fill-0, #262420)"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect width="18" height="18" fill="#F5F5F5"/>
|
|
3
|
-
<g id="Core">
|
|
4
|
-
<path d="M-330 -683C-330 -694.046 -321.046 -703 -310 -703H382C393.046 -703 402 -694.046 402 -683V927C402 938.046 393.046 947 382 947H-310C-321.046 947 -330 938.046 -330 927V-683Z" fill="white"/>
|
|
5
|
-
<g id="Content">
|
|
6
|
-
<g id="Avatar">
|
|
7
|
-
<rect x="-273.5" y="-30.5" width="619" height="79" rx="4.5" stroke="#9747FF" stroke-dasharray="10 5"/>
|
|
8
|
-
<g id="Chief=Technical, Size=18">
|
|
9
|
-
<g id="Logo">
|
|
10
|
-
<path id="Glyph" d="M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z" fill="#262420"/>
|
|
11
|
-
</g>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
16
|
-
</svg>
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="18" height="18" fill="#F5F5F5"/>
|
|
3
|
+
<g id="Core">
|
|
4
|
+
<path d="M-330 -683C-330 -694.046 -321.046 -703 -310 -703H382C393.046 -703 402 -694.046 402 -683V927C402 938.046 393.046 947 382 947H-310C-321.046 947 -330 938.046 -330 927V-683Z" fill="white"/>
|
|
5
|
+
<g id="Content">
|
|
6
|
+
<g id="Avatar">
|
|
7
|
+
<rect x="-273.5" y="-30.5" width="619" height="79" rx="4.5" stroke="#9747FF" stroke-dasharray="10 5"/>
|
|
8
|
+
<g id="Chief=Technical, Size=18">
|
|
9
|
+
<g id="Logo">
|
|
10
|
+
<path id="Glyph" d="M9.89258 5.62793L13.2041 14.625H11.9316L9.20117 11.8926H9.03223L6.29785 14.623C6.29785 14.623 6.29573 14.6211 6.29395 14.6211V14.625H5.0625L8.38867 5.62793H9.89258ZM9.01172 7.12305L7.16016 12.2334L8.87109 10.5234H9.36133L11.0762 12.2402L9.23828 7.12305H9.01172ZM12.6904 3.375V4.64355H5.61328V3.375H12.6904Z" fill="#262420"/>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
@@ -30,7 +30,8 @@ export const sidebarUnreadOverlay =
|
|
|
30
30
|
export const sidebarUnreadDot =
|
|
31
31
|
"absolute right-0 top-0 size-1.5 rounded-full bg-[#802c20]";
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
/** Icon + label row inside a section shell — no extra inset (shell already has p-2). */
|
|
34
|
+
export const sidebarSectionContent = "flex w-full min-w-0 items-center gap-2";
|
|
34
35
|
|
|
35
36
|
export const sidebarSectionIconClass = "shrink-0 [&>svg]:size-4";
|
|
36
37
|
|