@syscore/ui-library 1.3.5 → 1.3.7
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/client/components/ui/card.tsx +3 -1
- package/client/components/ui/standard-navigation.tsx +578 -0
- package/client/global.css +1 -0
- package/client/ui/StandardNavigation.stories.tsx +399 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +424 -1
- package/package.json +1 -1
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { StandardNavigation, NavItem } from "@/components/ui/standard-navigation";
|
|
3
|
+
import { StandardLogo } from "@/components/icons/StandardLogo";
|
|
4
|
+
import { NavAccount } from "@/components/icons/NavAccount";
|
|
5
|
+
import { Globe } from "lucide-react";
|
|
6
|
+
import { Button } from "@/components/ui/button";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const meta = {
|
|
11
|
+
title: "Review/StandardNavigation",
|
|
12
|
+
component: StandardNavigation,
|
|
13
|
+
tags: ["autodocs"],
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: "fullscreen",
|
|
16
|
+
},
|
|
17
|
+
} satisfies Meta<typeof StandardNavigation>;
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
|
|
23
|
+
// Sample navigation links with nested sections
|
|
24
|
+
const sampleNavLinks: NavItem[] = [
|
|
25
|
+
{
|
|
26
|
+
label: "WELL",
|
|
27
|
+
section: {
|
|
28
|
+
heading: "WELL sets the standard for people-first places",
|
|
29
|
+
headingGradient:
|
|
30
|
+
"linear-gradient(90deg, #41D5F6 0%, #3EECD1 25%, #66FCD9 50%, #66FCD9 75%, #3EECD1 100%)",
|
|
31
|
+
columns: [
|
|
32
|
+
{
|
|
33
|
+
title: "Everything",
|
|
34
|
+
links: [
|
|
35
|
+
{ label: "Explore WELL", href: "/explore" },
|
|
36
|
+
{ label: "Enroll in WELL", href: "/enroll" },
|
|
37
|
+
{ label: "What's new", href: "/whats-new" },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: "WHY WELL",
|
|
42
|
+
links: [
|
|
43
|
+
{ label: "Performance", href: "/performance" },
|
|
44
|
+
{ label: "ROI", href: "/roi" },
|
|
45
|
+
{ label: "Impact", href: "/impact" },
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: "Standard",
|
|
50
|
+
links: [
|
|
51
|
+
{ label: "Strategies", href: "/strategies" },
|
|
52
|
+
{ label: "Themes", href: "/themes" },
|
|
53
|
+
{ label: "Milestones", href: "/milestones" },
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
title: "Network",
|
|
58
|
+
links: [
|
|
59
|
+
{ label: "Organizations", href: "/organizations" },
|
|
60
|
+
{ label: "People", href: "/people" },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: "Solutions",
|
|
65
|
+
links: [
|
|
66
|
+
{ label: "Products", href: "/products" },
|
|
67
|
+
{ label: "Services", href: "/services" },
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: "Places",
|
|
72
|
+
links: [
|
|
73
|
+
{ label: "Locations", href: "/locations" },
|
|
74
|
+
{ label: "Portfolios", href: "/portfolios" },
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: "Pursuits",
|
|
82
|
+
section: {
|
|
83
|
+
heading: "WELL works everywhere, at any scale",
|
|
84
|
+
headingGradient:
|
|
85
|
+
"linear-gradient(99deg, #41D5F6 3.39%, #3EECD1 57.86%, #66FCD9 112.32%)",
|
|
86
|
+
columns: [
|
|
87
|
+
{
|
|
88
|
+
title: "SUBSCRIBE",
|
|
89
|
+
links: [
|
|
90
|
+
{ label: "WELL at scale", href: "/well-at-scale" },
|
|
91
|
+
{ label: "Pricing", href: "/pricing", bulletColor: "" },
|
|
92
|
+
{ label: "Leaderboard", href: "/leaderboard", bulletColor: "" },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: "Certify",
|
|
97
|
+
links: [
|
|
98
|
+
{ label: "WELL Certification", href: "/certification" },
|
|
99
|
+
{
|
|
100
|
+
label: "WELL Residence",
|
|
101
|
+
href: "/residence",
|
|
102
|
+
badge: "PILOT",
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
title: "Get rated",
|
|
108
|
+
links: [
|
|
109
|
+
{ label: "WELL Ratings", href: "/ratings" },
|
|
110
|
+
{
|
|
111
|
+
label: "Health-Safety Rating",
|
|
112
|
+
href: "/health-safety",
|
|
113
|
+
bulletColor: "#F3E7D8",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: "Performance Rating",
|
|
117
|
+
href: "/performance-rating",
|
|
118
|
+
bulletColor: "#0F748A",
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: "Equity Rating",
|
|
122
|
+
href: "/equity-rating",
|
|
123
|
+
bulletColor: "#17AA8D",
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: "Network",
|
|
132
|
+
section: {
|
|
133
|
+
heading: "Our network drives our movement",
|
|
134
|
+
headingGradient:
|
|
135
|
+
"linear-gradient(90deg, #41D5F6 0%, #3EECD1 25%, #66FCD9 50%, #66FCD9 75%, #3EECD1 100%)",
|
|
136
|
+
columns: [
|
|
137
|
+
{
|
|
138
|
+
title: "JOIN",
|
|
139
|
+
links: [
|
|
140
|
+
{ label: "Membership", href: "/membership" },
|
|
141
|
+
{ label: "Works with WELL", href: "/works-with-well" },
|
|
142
|
+
{
|
|
143
|
+
label: "Enterprise Provider",
|
|
144
|
+
href: "/enterprise-provider",
|
|
145
|
+
bulletColor: "#2E74AD",
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
label: "Product Provider",
|
|
149
|
+
href: "/product-provider",
|
|
150
|
+
bulletColor: "#149EBD",
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: "Performance Testing Provider",
|
|
154
|
+
href: "/performance-testing",
|
|
155
|
+
bulletColor: "#ED896F",
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
title: "EARN",
|
|
161
|
+
links: [
|
|
162
|
+
{ label: "WELL AP", href: "/well-ap" },
|
|
163
|
+
{ label: "WELL Faculty", href: "/well-faculty" },
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
label: "Knowledge",
|
|
171
|
+
section: {
|
|
172
|
+
heading: "Learn from the experts on health",
|
|
173
|
+
headingGradient:
|
|
174
|
+
"linear-gradient(90deg, #41D5F6 0%, #3EECD1 25%, #66FCD9 50%, #66FCD9 75%, #3EECD1 100%)",
|
|
175
|
+
columns: [
|
|
176
|
+
{
|
|
177
|
+
title: "LEARN",
|
|
178
|
+
links: [
|
|
179
|
+
{ label: "WELL Forum", href: "/forum" },
|
|
180
|
+
{ label: "Threads", href: "/threads", bulletColor: "" },
|
|
181
|
+
{ label: "Webcasts", href: "/webcasts", bulletColor: "" },
|
|
182
|
+
{ label: "Trainings", href: "/trainings", bulletColor: "" },
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
title: "ATTEND",
|
|
187
|
+
links: [
|
|
188
|
+
{ label: "WELL 2025", href: "/well-2025" },
|
|
189
|
+
{ label: "Flagship events", href: "/flagship", bulletColor: "" },
|
|
190
|
+
{ label: "Thematic summits", href: "/thematic", bulletColor: "" },
|
|
191
|
+
{ label: "Regional summits", href: "/regional", bulletColor: "" },
|
|
192
|
+
],
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
title: "GUIDANCE",
|
|
196
|
+
links: [
|
|
197
|
+
{ label: "Knowledge base", href: "/knowledge-base" },
|
|
198
|
+
{ label: "Tutorials", href: "/tutorials", bulletColor: "" },
|
|
199
|
+
{ label: "Guides", href: "/guides", bulletColor: "" },
|
|
200
|
+
{ label: "FAQs", href: "/faqs", bulletColor: "" },
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
title: "Resources",
|
|
205
|
+
links: [
|
|
206
|
+
{ label: "Resource library", href: "/resources" },
|
|
207
|
+
{ label: "Technical tools", href: "/technical-tools", bulletColor: "" },
|
|
208
|
+
{ label: "Sales tools", href: "/sales-tools", bulletColor: "" },
|
|
209
|
+
{ label: "Media", href: "/media", bulletColor: "" },
|
|
210
|
+
],
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
label: "IWBI",
|
|
217
|
+
section: {
|
|
218
|
+
heading: "The International WELL Building Institute (IWBI)",
|
|
219
|
+
headingGradient:
|
|
220
|
+
"linear-gradient(90deg, #41D5F6 0%, #3EECD1 25%, #66FCD9 50%, #66FCD9 75%, #3EECD1 100%)",
|
|
221
|
+
columns: [
|
|
222
|
+
{
|
|
223
|
+
title: "About",
|
|
224
|
+
links: [
|
|
225
|
+
{ label: "IWBI", href: "/iwbi" },
|
|
226
|
+
{ label: "Research", href: "/research" },
|
|
227
|
+
{ label: "Advocacy", href: "/advocacy" },
|
|
228
|
+
],
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
title: "Meet",
|
|
232
|
+
links: [
|
|
233
|
+
{ label: "Team", href: "/team" },
|
|
234
|
+
{ label: "Advisories", href: "/advisories" },
|
|
235
|
+
{ label: "Governance Council", href: "/governance" },
|
|
236
|
+
],
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
title: "Explore",
|
|
240
|
+
links: [
|
|
241
|
+
{ label: "Newsroom", href: "/newsroom" },
|
|
242
|
+
{ label: "Jobs", href: "/jobs" },
|
|
243
|
+
{ label: "Blog", href: "/blog" },
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
];
|
|
250
|
+
|
|
251
|
+
// Simple navigation links without nested sections
|
|
252
|
+
const simpleNavLinks: NavItem[] = [
|
|
253
|
+
{ label: "Home", href: "/" },
|
|
254
|
+
{ label: "About", href: "/about" },
|
|
255
|
+
{ label: "Services", href: "/services" },
|
|
256
|
+
{ label: "Contact", href: "/contact" },
|
|
257
|
+
];
|
|
258
|
+
|
|
259
|
+
export const Default: Story = {
|
|
260
|
+
render: () => (
|
|
261
|
+
<div className="h-screen bg-[linear-gradient(var(--gradient-0))]">
|
|
262
|
+
<StandardNavigation
|
|
263
|
+
navLinks={sampleNavLinks}
|
|
264
|
+
logo={StandardLogo}
|
|
265
|
+
userIcon={NavAccount}
|
|
266
|
+
onLinkClick={(href) => console.log("Clicked:", href)}
|
|
267
|
+
/>
|
|
268
|
+
<div className="pt-20 p-8">
|
|
269
|
+
<p className="text-gray-600">
|
|
270
|
+
StandardNavigation component with StandardLogo and nested navigation
|
|
271
|
+
links.
|
|
272
|
+
</p>
|
|
273
|
+
<p className="text-gray-600">
|
|
274
|
+
Hover over menu items to see dropdown trays.
|
|
275
|
+
</p>
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
),
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
export const WithCustomActions: Story = {
|
|
282
|
+
render: () => {
|
|
283
|
+
return (
|
|
284
|
+
<div className="h-screen bg-[linear-gradient(var(--gradient-0))]">
|
|
285
|
+
<StandardNavigation
|
|
286
|
+
navLinks={sampleNavLinks}
|
|
287
|
+
logo={StandardLogo}
|
|
288
|
+
userIcon={NavAccount}
|
|
289
|
+
beforeActions={
|
|
290
|
+
<Button
|
|
291
|
+
variant="ghost"
|
|
292
|
+
size="icon"
|
|
293
|
+
className="navigation-action-button"
|
|
294
|
+
aria-label="Change language"
|
|
295
|
+
>
|
|
296
|
+
<Globe className="h-5 w-5" />
|
|
297
|
+
</Button>
|
|
298
|
+
}
|
|
299
|
+
userDropdown={
|
|
300
|
+
<div className="navigation-user-dropdown-content p-2 bg-white border border-gray-200 rounded-md shadow-lg min-w-[200px]">
|
|
301
|
+
<button className="w-full text-left px-3 py-2 text-sm hover:bg-gray-100 rounded">
|
|
302
|
+
Profile
|
|
303
|
+
</button>
|
|
304
|
+
<button className="w-full text-left px-3 py-2 text-sm hover:bg-gray-100 rounded">
|
|
305
|
+
Settings
|
|
306
|
+
</button>
|
|
307
|
+
<hr className="my-1" />
|
|
308
|
+
<button className="w-full text-left px-3 py-2 text-sm hover:bg-gray-100 rounded">
|
|
309
|
+
Account
|
|
310
|
+
</button>
|
|
311
|
+
<hr className="my-1" />
|
|
312
|
+
<button className="w-full text-left px-3 py-2 text-sm text-red-600 hover:bg-gray-100 rounded">
|
|
313
|
+
Sign Out
|
|
314
|
+
</button>
|
|
315
|
+
</div>
|
|
316
|
+
}
|
|
317
|
+
onLinkClick={(href) => console.log("Clicked:", href)}
|
|
318
|
+
/>
|
|
319
|
+
<div className="pt-20 p-8">
|
|
320
|
+
<p className="text-gray-600">
|
|
321
|
+
Navigation with custom actions (language switcher) and user dropdown
|
|
322
|
+
menu.
|
|
323
|
+
</p>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
);
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
export const SimpleLinks: Story = {
|
|
331
|
+
render: () => (
|
|
332
|
+
<div className="h-screen bg-[linear-gradient(var(--gradient-0))]">
|
|
333
|
+
<StandardNavigation
|
|
334
|
+
navLinks={simpleNavLinks}
|
|
335
|
+
logo={StandardLogo}
|
|
336
|
+
userIcon={NavAccount}
|
|
337
|
+
onLinkClick={(href) => console.log("Clicked:", href)}
|
|
338
|
+
/>
|
|
339
|
+
<div className="pt-20 p-8">
|
|
340
|
+
<p className="text-gray-600">
|
|
341
|
+
Navigation with simple links (no nested sections).
|
|
342
|
+
</p>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
),
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
export const StrategyMode: Story = {
|
|
349
|
+
render: () => (
|
|
350
|
+
<div className="h-screen bg-white">
|
|
351
|
+
<StandardNavigation
|
|
352
|
+
navLinks={sampleNavLinks}
|
|
353
|
+
logo={StandardLogo}
|
|
354
|
+
userIcon={NavAccount}
|
|
355
|
+
isStrategy={true}
|
|
356
|
+
onLinkClick={(href) => console.log("Clicked:", href)}
|
|
357
|
+
onClose={() => console.log("Close clicked")}
|
|
358
|
+
/>
|
|
359
|
+
<div className="pt-20 p-8">
|
|
360
|
+
<p className="text-gray-600">Strategy mode navigation.</p>
|
|
361
|
+
</div>
|
|
362
|
+
</div>
|
|
363
|
+
),
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
export const WithoutLogo: Story = {
|
|
367
|
+
render: () => (
|
|
368
|
+
<div className="h-screen bg-[linear-gradient(var(--gradient-0))]">
|
|
369
|
+
<StandardNavigation
|
|
370
|
+
navLinks={sampleNavLinks}
|
|
371
|
+
userIcon={NavAccount}
|
|
372
|
+
onLinkClick={(href) => console.log("Clicked:", href)}
|
|
373
|
+
/>
|
|
374
|
+
<div className="pt-20 p-8">
|
|
375
|
+
<p className="text-gray-600">
|
|
376
|
+
Navigation without logo (shows placeholder).
|
|
377
|
+
</p>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
),
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
export const WithoutUserIcon: Story = {
|
|
384
|
+
render: () => (
|
|
385
|
+
<div className="h-screen bg-[linear-gradient(var(--gradient-0))]">
|
|
386
|
+
<StandardNavigation
|
|
387
|
+
navLinks={sampleNavLinks}
|
|
388
|
+
logo={StandardLogo}
|
|
389
|
+
onLinkClick={(href) => console.log("Clicked:", href)}
|
|
390
|
+
/>
|
|
391
|
+
<div className="pt-20 p-8">
|
|
392
|
+
<p className="text-gray-600">
|
|
393
|
+
Navigation without user icon (shows placeholder).
|
|
394
|
+
</p>
|
|
395
|
+
</div>
|
|
396
|
+
</div>
|
|
397
|
+
),
|
|
398
|
+
};
|
|
399
|
+
|