@shipfox/react-ui 0.9.0 → 0.11.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.
Files changed (45) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/.turbo/turbo-check.log +2 -2
  3. package/.turbo/turbo-type.log +1 -1
  4. package/CHANGELOG.md +12 -0
  5. package/dist/components/button/button.js +14 -11
  6. package/dist/components/button/button.js.map +1 -1
  7. package/dist/components/dropdown-menu/dropdown-menu.d.ts +58 -0
  8. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
  9. package/dist/components/dropdown-menu/dropdown-menu.js +280 -0
  10. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -0
  11. package/dist/components/dropdown-menu/dropdown-menu.stories.js +462 -0
  12. package/dist/components/dropdown-menu/dropdown-menu.stories.js.map +1 -0
  13. package/dist/components/dropdown-menu/index.d.ts +3 -0
  14. package/dist/components/dropdown-menu/index.d.ts.map +1 -0
  15. package/dist/components/dropdown-menu/index.js +3 -0
  16. package/dist/components/dropdown-menu/index.js.map +1 -0
  17. package/dist/components/dynamic-item/dynamic-item.d.ts +1 -1
  18. package/dist/components/dynamic-item/dynamic-item.d.ts.map +1 -1
  19. package/dist/components/dynamic-item/dynamic-item.js +4 -4
  20. package/dist/components/dynamic-item/dynamic-item.js.map +1 -1
  21. package/dist/components/dynamic-item/dynamic-item.stories.js +11 -1
  22. package/dist/components/dynamic-item/dynamic-item.stories.js.map +1 -1
  23. package/dist/components/icon/icon.d.ts +3 -17
  24. package/dist/components/icon/icon.d.ts.map +1 -1
  25. package/dist/components/icon/icon.js +21 -13
  26. package/dist/components/icon/icon.js.map +1 -1
  27. package/dist/components/icon/remixicon-registry.d.ts +5 -0
  28. package/dist/components/icon/remixicon-registry.d.ts.map +1 -0
  29. package/dist/components/icon/remixicon-registry.js +14 -0
  30. package/dist/components/icon/remixicon-registry.js.map +1 -0
  31. package/dist/components/index.d.ts +1 -0
  32. package/dist/components/index.d.ts.map +1 -1
  33. package/dist/components/index.js +1 -0
  34. package/dist/components/index.js.map +1 -1
  35. package/dist/styles.css +1 -1
  36. package/package.json +3 -3
  37. package/src/components/button/button.tsx +12 -12
  38. package/src/components/dropdown-menu/dropdown-menu.stories.tsx +384 -0
  39. package/src/components/dropdown-menu/dropdown-menu.tsx +416 -0
  40. package/src/components/dropdown-menu/index.ts +29 -0
  41. package/src/components/dynamic-item/dynamic-item.stories.tsx +6 -1
  42. package/src/components/dynamic-item/dynamic-item.tsx +9 -3
  43. package/src/components/icon/icon.tsx +23 -13
  44. package/src/components/icon/remixicon-registry.ts +24 -0
  45. package/src/components/index.ts +1 -0
@@ -0,0 +1,462 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { argosScreenshot } from '@argos-ci/storybook/vitest';
3
+ import { screen, within } from '@testing-library/react';
4
+ import userEvent from '@testing-library/user-event';
5
+ import { useState } from 'react';
6
+ import { Avatar } from '../avatar/index.js';
7
+ import { Button } from '../button/index.js';
8
+ import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './dropdown-menu.js';
9
+ const OPEN_MENU_REGEX = /open menu/i;
10
+ const ACTIONS_REGEX = /actions/i;
11
+ const ORGANIZATION_REGEX = /organization/i;
12
+ const COMPLETE_MENU_REGEX = /complete menu/i;
13
+ const SWITCH_ORGANIZATION_REGEX = /switch organization/i;
14
+ const isTestEnvironment = ()=>typeof navigator !== 'undefined' && navigator.webdriver === true;
15
+ async function openMenuAndScreenshot(ctx, triggerRegex, screenshotName, additionalSteps) {
16
+ const { canvasElement, step } = ctx;
17
+ const canvas = within(canvasElement);
18
+ const user = userEvent.setup();
19
+ let triggerButton = null;
20
+ await step('Open the dropdown menu', async ()=>{
21
+ triggerButton = canvas.getByRole('button', {
22
+ name: triggerRegex
23
+ });
24
+ await user.click(triggerButton);
25
+ });
26
+ await step('Wait for menu to appear and render', async ()=>{
27
+ await screen.findByRole('menu');
28
+ await new Promise((resolve)=>setTimeout(resolve, 300));
29
+ if (isTestEnvironment() && triggerButton instanceof HTMLElement) {
30
+ triggerButton.style.display = 'none';
31
+ }
32
+ await new Promise((resolve)=>setTimeout(resolve, 100));
33
+ });
34
+ await argosScreenshot(ctx, screenshotName);
35
+ if (additionalSteps) {
36
+ await additionalSteps(ctx, user);
37
+ }
38
+ }
39
+ const meta = {
40
+ title: 'Components/DropdownMenu',
41
+ component: DropdownMenuContent,
42
+ subcomponents: {
43
+ DropdownMenu,
44
+ DropdownMenuTrigger,
45
+ DropdownMenuItem,
46
+ DropdownMenuCheckboxItem,
47
+ DropdownMenuRadioGroup,
48
+ DropdownMenuRadioItem,
49
+ DropdownMenuLabel,
50
+ DropdownMenuSeparator,
51
+ DropdownMenuGroup,
52
+ DropdownMenuSub,
53
+ DropdownMenuSubTrigger,
54
+ DropdownMenuSubContent
55
+ },
56
+ parameters: {
57
+ layout: 'centered'
58
+ },
59
+ tags: [
60
+ 'autodocs'
61
+ ],
62
+ argTypes: {
63
+ side: {
64
+ control: 'select',
65
+ options: [
66
+ 'top',
67
+ 'right',
68
+ 'bottom',
69
+ 'left'
70
+ ],
71
+ description: 'The preferred side of the trigger to render against',
72
+ table: {
73
+ defaultValue: {
74
+ summary: 'bottom'
75
+ }
76
+ }
77
+ },
78
+ align: {
79
+ control: 'select',
80
+ options: [
81
+ 'start',
82
+ 'center',
83
+ 'end'
84
+ ],
85
+ description: 'The preferred alignment against the trigger',
86
+ table: {
87
+ defaultValue: {
88
+ summary: 'start'
89
+ }
90
+ }
91
+ },
92
+ sideOffset: {
93
+ control: {
94
+ type: 'number',
95
+ min: 0,
96
+ max: 20,
97
+ step: 1
98
+ },
99
+ description: 'Distance in pixels from the trigger',
100
+ table: {
101
+ defaultValue: {
102
+ summary: '4'
103
+ }
104
+ }
105
+ },
106
+ alignOffset: {
107
+ control: {
108
+ type: 'number',
109
+ min: -20,
110
+ max: 20,
111
+ step: 1
112
+ },
113
+ description: 'Offset in pixels from the alignment edge',
114
+ table: {
115
+ defaultValue: {
116
+ summary: '0'
117
+ }
118
+ }
119
+ },
120
+ size: {
121
+ control: 'select',
122
+ options: [
123
+ 'sm',
124
+ 'md',
125
+ 'lg'
126
+ ],
127
+ description: 'Size variant of the dropdown content',
128
+ table: {
129
+ defaultValue: {
130
+ summary: 'md'
131
+ }
132
+ }
133
+ }
134
+ },
135
+ args: {
136
+ side: 'bottom',
137
+ align: 'center',
138
+ sideOffset: 8,
139
+ alignOffset: 0,
140
+ size: 'md'
141
+ }
142
+ };
143
+ export default meta;
144
+ export const Default = {
145
+ play: (ctx)=>openMenuAndScreenshot(ctx, OPEN_MENU_REGEX, 'DropdownMenu Default Open'),
146
+ render: function DefaultStory(args) {
147
+ const [container, setContainer] = useState(null);
148
+ return /*#__PURE__*/ _jsx("div", {
149
+ ref: setContainer,
150
+ className: "relative flex h-500 w-500 items-center justify-center rounded-16 bg-background-subtle-base shadow-tooltip overflow-visible",
151
+ children: container && /*#__PURE__*/ _jsxs(DropdownMenu, {
152
+ children: [
153
+ /*#__PURE__*/ _jsx(DropdownMenuTrigger, {
154
+ asChild: true,
155
+ children: /*#__PURE__*/ _jsx(Button, {
156
+ variant: "secondary",
157
+ children: "Open Menu"
158
+ })
159
+ }),
160
+ /*#__PURE__*/ _jsxs(DropdownMenuContent, {
161
+ ...args,
162
+ container: container,
163
+ side: "bottom",
164
+ align: "center",
165
+ children: [
166
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
167
+ icon: "editLine",
168
+ children: "Edit"
169
+ }),
170
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
171
+ icon: "addLine",
172
+ children: "Add"
173
+ }),
174
+ /*#__PURE__*/ _jsx(DropdownMenuSeparator, {}),
175
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
176
+ icon: "deleteBinLine",
177
+ children: "Delete"
178
+ })
179
+ ]
180
+ })
181
+ ]
182
+ })
183
+ });
184
+ }
185
+ };
186
+ export const WithShortcuts = {
187
+ play: (ctx)=>openMenuAndScreenshot(ctx, ACTIONS_REGEX, 'DropdownMenu With Shortcuts Open'),
188
+ render: function WithShortcutsStory(args) {
189
+ const [container, setContainer] = useState(null);
190
+ return /*#__PURE__*/ _jsx("div", {
191
+ ref: setContainer,
192
+ className: "relative flex h-500 w-500 items-center justify-center rounded-16 bg-background-subtle-base shadow-tooltip overflow-visible",
193
+ children: container && /*#__PURE__*/ _jsxs(DropdownMenu, {
194
+ children: [
195
+ /*#__PURE__*/ _jsx(DropdownMenuTrigger, {
196
+ asChild: true,
197
+ children: /*#__PURE__*/ _jsx(Button, {
198
+ variant: "secondary",
199
+ children: "Actions"
200
+ })
201
+ }),
202
+ /*#__PURE__*/ _jsxs(DropdownMenuContent, {
203
+ ...args,
204
+ container: container,
205
+ side: "bottom",
206
+ align: "center",
207
+ children: [
208
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
209
+ icon: "fileCopyLine",
210
+ shortcut: "⌘C",
211
+ children: "Copy"
212
+ }),
213
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
214
+ icon: "clipboardLine",
215
+ shortcut: "⌘V",
216
+ children: "Paste"
217
+ }),
218
+ /*#__PURE__*/ _jsx(DropdownMenuSeparator, {}),
219
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
220
+ icon: "deleteBinLine",
221
+ shortcut: "⌘⌫",
222
+ children: "Delete"
223
+ })
224
+ ]
225
+ })
226
+ ]
227
+ })
228
+ });
229
+ }
230
+ };
231
+ function UserProfileSection() {
232
+ return /*#__PURE__*/ _jsxs("div", {
233
+ className: "flex items-center gap-8 px-8 py-6",
234
+ children: [
235
+ /*#__PURE__*/ _jsx(Avatar, {
236
+ size: "sm",
237
+ content: "image",
238
+ src: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100&h=100&fit=crop&crop=faces",
239
+ fallback: "John Doe"
240
+ }),
241
+ /*#__PURE__*/ _jsxs("div", {
242
+ className: "flex flex-col",
243
+ children: [
244
+ /*#__PURE__*/ _jsx("span", {
245
+ className: "text-sm font-medium leading-20 text-foreground-neutral-base",
246
+ children: "John Doe"
247
+ }),
248
+ /*#__PURE__*/ _jsx("span", {
249
+ className: "text-xs leading-16 text-foreground-neutral-muted",
250
+ children: "john@example.com"
251
+ })
252
+ ]
253
+ })
254
+ ]
255
+ });
256
+ }
257
+ function OrganizationItem() {
258
+ return /*#__PURE__*/ _jsxs("div", {
259
+ className: "flex items-center gap-8 px-8 py-6",
260
+ children: [
261
+ /*#__PURE__*/ _jsx(Avatar, {
262
+ size: "3xs",
263
+ content: "logo",
264
+ logoName: "stripe",
265
+ radius: "rounded"
266
+ }),
267
+ /*#__PURE__*/ _jsx("span", {
268
+ className: "text-sm leading-20 text-foreground-neutral-subtle",
269
+ children: "Stripe's organization"
270
+ })
271
+ ]
272
+ });
273
+ }
274
+ export const OrganizationMenu = {
275
+ args: {
276
+ size: 'md'
277
+ },
278
+ play: (ctx)=>openMenuAndScreenshot(ctx, ORGANIZATION_REGEX, 'DropdownMenu Organization Menu Open', async ({ step }, user)=>{
279
+ await step('Hover over submenu trigger', async ()=>{
280
+ const submenuTrigger = screen.getByRole('menuitem', {
281
+ name: SWITCH_ORGANIZATION_REGEX
282
+ });
283
+ await user.hover(submenuTrigger);
284
+ await new Promise((resolve)=>setTimeout(resolve, 200));
285
+ });
286
+ await argosScreenshot(ctx, 'DropdownMenu Organization Menu Submenu Open');
287
+ }),
288
+ render: function OrganizationMenuStory(args) {
289
+ const [container, setContainer] = useState(null);
290
+ return /*#__PURE__*/ _jsx("div", {
291
+ ref: setContainer,
292
+ className: "relative flex h-600 w-600 items-center justify-center rounded-16 bg-background-subtle-base shadow-tooltip overflow-visible",
293
+ children: container && /*#__PURE__*/ _jsxs(DropdownMenu, {
294
+ children: [
295
+ /*#__PURE__*/ _jsx(DropdownMenuTrigger, {
296
+ asChild: true,
297
+ children: /*#__PURE__*/ _jsx(Button, {
298
+ variant: "secondary",
299
+ iconLeft: "buildingLine",
300
+ children: "Organization"
301
+ })
302
+ }),
303
+ /*#__PURE__*/ _jsxs(DropdownMenuContent, {
304
+ ...args,
305
+ container: container,
306
+ side: "bottom",
307
+ align: "start",
308
+ children: [
309
+ /*#__PURE__*/ _jsx(OrganizationItem, {}),
310
+ /*#__PURE__*/ _jsx(DropdownMenuSeparator, {}),
311
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
312
+ icon: "settings3Line",
313
+ children: "Settings"
314
+ }),
315
+ /*#__PURE__*/ _jsxs(DropdownMenuSub, {
316
+ children: [
317
+ /*#__PURE__*/ _jsx(DropdownMenuSubTrigger, {
318
+ icon: "arrowLeftRightLine",
319
+ children: "Switch organization"
320
+ }),
321
+ /*#__PURE__*/ _jsxs(DropdownMenuSubContent, {
322
+ children: [
323
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
324
+ icon: "shipfox",
325
+ iconStyle: "text-foreground-neutral-base",
326
+ className: "text-foreground-neutral-base",
327
+ children: "Shipfox"
328
+ }),
329
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
330
+ icon: "github",
331
+ iconStyle: "text-foreground-neutral-base",
332
+ className: "text-foreground-neutral-base",
333
+ children: "Github"
334
+ }),
335
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
336
+ icon: "google",
337
+ iconStyle: "text-foreground-neutral-base",
338
+ className: "text-foreground-neutral-base",
339
+ children: "Google"
340
+ })
341
+ ]
342
+ })
343
+ ]
344
+ }),
345
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
346
+ icon: "addLine",
347
+ children: "New organization"
348
+ })
349
+ ]
350
+ })
351
+ ]
352
+ })
353
+ });
354
+ }
355
+ };
356
+ export const CompleteExample = {
357
+ args: {
358
+ size: 'lg',
359
+ side: 'bottom'
360
+ },
361
+ play: (ctx)=>openMenuAndScreenshot(ctx, COMPLETE_MENU_REGEX, 'DropdownMenu Complete Example Open'),
362
+ render: function CompleteExampleStory(args) {
363
+ const [container, setContainer] = useState(null);
364
+ const [showNotifications, setShowNotifications] = useState(true);
365
+ const [showBadges, setShowBadges] = useState(false);
366
+ const [theme, setTheme] = useState('dark');
367
+ return /*#__PURE__*/ _jsx("div", {
368
+ ref: setContainer,
369
+ className: "relative flex h-600 w-500 items-center justify-center rounded-16 bg-background-subtle-base shadow-tooltip overflow-visible",
370
+ children: container && /*#__PURE__*/ _jsxs(DropdownMenu, {
371
+ children: [
372
+ /*#__PURE__*/ _jsx(DropdownMenuTrigger, {
373
+ asChild: true,
374
+ children: /*#__PURE__*/ _jsx(Button, {
375
+ variant: "secondary",
376
+ iconLeft: "menu3Line",
377
+ children: "Complete Menu"
378
+ })
379
+ }),
380
+ /*#__PURE__*/ _jsxs(DropdownMenuContent, {
381
+ ...args,
382
+ className: "w-260",
383
+ container: container,
384
+ side: "bottom",
385
+ align: "start",
386
+ children: [
387
+ /*#__PURE__*/ _jsx(UserProfileSection, {}),
388
+ /*#__PURE__*/ _jsx(DropdownMenuSeparator, {}),
389
+ /*#__PURE__*/ _jsx(DropdownMenuLabel, {
390
+ children: "Actions"
391
+ }),
392
+ /*#__PURE__*/ _jsxs(DropdownMenuGroup, {
393
+ children: [
394
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
395
+ icon: "sparklingLine",
396
+ children: "Getting started"
397
+ }),
398
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
399
+ icon: "userLine",
400
+ children: "Profile settings"
401
+ })
402
+ ]
403
+ }),
404
+ /*#__PURE__*/ _jsx(DropdownMenuSeparator, {}),
405
+ /*#__PURE__*/ _jsx(DropdownMenuLabel, {
406
+ children: "Preferences"
407
+ }),
408
+ /*#__PURE__*/ _jsxs(DropdownMenuGroup, {
409
+ children: [
410
+ /*#__PURE__*/ _jsx(DropdownMenuCheckboxItem, {
411
+ checked: showNotifications,
412
+ onCheckedChange: setShowNotifications,
413
+ closeOnSelect: false,
414
+ children: "Show notifications"
415
+ }),
416
+ /*#__PURE__*/ _jsx(DropdownMenuCheckboxItem, {
417
+ checked: showBadges,
418
+ onCheckedChange: setShowBadges,
419
+ closeOnSelect: false,
420
+ children: "Show badges"
421
+ })
422
+ ]
423
+ }),
424
+ /*#__PURE__*/ _jsx(DropdownMenuSeparator, {}),
425
+ /*#__PURE__*/ _jsx(DropdownMenuLabel, {
426
+ children: "Theme"
427
+ }),
428
+ /*#__PURE__*/ _jsxs(DropdownMenuRadioGroup, {
429
+ value: theme,
430
+ onValueChange: setTheme,
431
+ children: [
432
+ /*#__PURE__*/ _jsx(DropdownMenuRadioItem, {
433
+ value: "light",
434
+ closeOnSelect: false,
435
+ children: "Light"
436
+ }),
437
+ /*#__PURE__*/ _jsx(DropdownMenuRadioItem, {
438
+ value: "dark",
439
+ closeOnSelect: false,
440
+ children: "Dark"
441
+ }),
442
+ /*#__PURE__*/ _jsx(DropdownMenuRadioItem, {
443
+ value: "system",
444
+ closeOnSelect: false,
445
+ children: "System"
446
+ })
447
+ ]
448
+ }),
449
+ /*#__PURE__*/ _jsx(DropdownMenuSeparator, {}),
450
+ /*#__PURE__*/ _jsx(DropdownMenuItem, {
451
+ icon: "logoutCircleLine",
452
+ children: "Log out"
453
+ })
454
+ ]
455
+ })
456
+ ]
457
+ })
458
+ });
459
+ }
460
+ };
461
+
462
+ //# sourceMappingURL=dropdown-menu.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/dropdown-menu/dropdown-menu.stories.tsx"],"sourcesContent":["import {argosScreenshot} from '@argos-ci/storybook/vitest';\nimport type {Meta, StoryObj} from '@storybook/react';\nimport {screen, within} from '@testing-library/react';\nimport type {UserEvent} from '@testing-library/user-event';\nimport userEvent from '@testing-library/user-event';\nimport {useState} from 'react';\nimport {Avatar} from '../avatar';\nimport {Button} from '../button';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from './dropdown-menu';\n\nconst OPEN_MENU_REGEX = /open menu/i;\nconst ACTIONS_REGEX = /actions/i;\nconst ORGANIZATION_REGEX = /organization/i;\nconst COMPLETE_MENU_REGEX = /complete menu/i;\nconst SWITCH_ORGANIZATION_REGEX = /switch organization/i;\n\nconst isTestEnvironment = () => typeof navigator !== 'undefined' && navigator.webdriver === true;\n\ntype StoryContext = Parameters<NonNullable<Story['play']>>[0];\ntype AdditionalStepsCallback = (ctx: StoryContext, user: UserEvent) => Promise<void>;\n\nasync function openMenuAndScreenshot(\n ctx: StoryContext,\n triggerRegex: RegExp,\n screenshotName: string,\n additionalSteps?: AdditionalStepsCallback,\n): Promise<void> {\n const {canvasElement, step} = ctx;\n const canvas = within(canvasElement);\n const user = userEvent.setup();\n\n let triggerButton: HTMLElement | null = null;\n\n await step('Open the dropdown menu', async () => {\n triggerButton = canvas.getByRole('button', {name: triggerRegex});\n await user.click(triggerButton);\n });\n\n await step('Wait for menu to appear and render', async () => {\n await screen.findByRole('menu');\n await new Promise((resolve) => setTimeout(resolve, 300));\n\n if (isTestEnvironment() && triggerButton instanceof HTMLElement) {\n triggerButton.style.display = 'none';\n }\n await new Promise((resolve) => setTimeout(resolve, 100));\n });\n\n await argosScreenshot(ctx, screenshotName);\n\n if (additionalSteps) {\n await additionalSteps(ctx, user);\n }\n}\n\nconst meta = {\n title: 'Components/DropdownMenu',\n component: DropdownMenuContent,\n subcomponents: {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n },\n parameters: {\n layout: 'centered',\n },\n tags: ['autodocs'],\n argTypes: {\n side: {\n control: 'select',\n options: ['top', 'right', 'bottom', 'left'],\n description: 'The preferred side of the trigger to render against',\n table: {defaultValue: {summary: 'bottom'}},\n },\n align: {\n control: 'select',\n options: ['start', 'center', 'end'],\n description: 'The preferred alignment against the trigger',\n table: {defaultValue: {summary: 'start'}},\n },\n sideOffset: {\n control: {type: 'number', min: 0, max: 20, step: 1},\n description: 'Distance in pixels from the trigger',\n table: {defaultValue: {summary: '4'}},\n },\n alignOffset: {\n control: {type: 'number', min: -20, max: 20, step: 1},\n description: 'Offset in pixels from the alignment edge',\n table: {defaultValue: {summary: '0'}},\n },\n size: {\n control: 'select',\n options: ['sm', 'md', 'lg'],\n description: 'Size variant of the dropdown content',\n table: {defaultValue: {summary: 'md'}},\n },\n },\n args: {\n side: 'bottom',\n align: 'center',\n sideOffset: 8,\n alignOffset: 0,\n size: 'md',\n },\n} satisfies Meta<typeof DropdownMenuContent>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const Default: Story = {\n play: (ctx) => openMenuAndScreenshot(ctx, OPEN_MENU_REGEX, 'DropdownMenu Default Open'),\n render: function DefaultStory(args) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n\n return (\n <div\n ref={setContainer}\n className=\"relative flex h-500 w-500 items-center justify-center rounded-16 bg-background-subtle-base shadow-tooltip overflow-visible\"\n >\n {container && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"secondary\">Open Menu</Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent {...args} container={container} side=\"bottom\" align=\"center\">\n <DropdownMenuItem icon=\"editLine\">Edit</DropdownMenuItem>\n <DropdownMenuItem icon=\"addLine\">Add</DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem icon=\"deleteBinLine\">Delete</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n );\n },\n};\n\nexport const WithShortcuts: Story = {\n play: (ctx) => openMenuAndScreenshot(ctx, ACTIONS_REGEX, 'DropdownMenu With Shortcuts Open'),\n render: function WithShortcutsStory(args) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n\n return (\n <div\n ref={setContainer}\n className=\"relative flex h-500 w-500 items-center justify-center rounded-16 bg-background-subtle-base shadow-tooltip overflow-visible\"\n >\n {container && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"secondary\">Actions</Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent {...args} container={container} side=\"bottom\" align=\"center\">\n <DropdownMenuItem icon=\"fileCopyLine\" shortcut=\"⌘C\">\n Copy\n </DropdownMenuItem>\n <DropdownMenuItem icon=\"clipboardLine\" shortcut=\"⌘V\">\n Paste\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem icon=\"deleteBinLine\" shortcut=\"⌘⌫\">\n Delete\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n );\n },\n};\n\nfunction UserProfileSection() {\n return (\n <div className=\"flex items-center gap-8 px-8 py-6\">\n <Avatar\n size=\"sm\"\n content=\"image\"\n src=\"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100&h=100&fit=crop&crop=faces\"\n fallback=\"John Doe\"\n />\n <div className=\"flex flex-col\">\n <span className=\"text-sm font-medium leading-20 text-foreground-neutral-base\">\n John Doe\n </span>\n <span className=\"text-xs leading-16 text-foreground-neutral-muted\">john@example.com</span>\n </div>\n </div>\n );\n}\n\nfunction OrganizationItem() {\n return (\n <div className=\"flex items-center gap-8 px-8 py-6\">\n <Avatar size=\"3xs\" content=\"logo\" logoName=\"stripe\" radius=\"rounded\" />\n <span className=\"text-sm leading-20 text-foreground-neutral-subtle\">\n Stripe&apos;s organization\n </span>\n </div>\n );\n}\n\nexport const OrganizationMenu: Story = {\n args: {\n size: 'md',\n },\n play: (ctx) =>\n openMenuAndScreenshot(\n ctx,\n ORGANIZATION_REGEX,\n 'DropdownMenu Organization Menu Open',\n async ({step}, user) => {\n await step('Hover over submenu trigger', async () => {\n const submenuTrigger = screen.getByRole('menuitem', {name: SWITCH_ORGANIZATION_REGEX});\n await user.hover(submenuTrigger);\n await new Promise((resolve) => setTimeout(resolve, 200));\n });\n\n await argosScreenshot(ctx, 'DropdownMenu Organization Menu Submenu Open');\n },\n ),\n render: function OrganizationMenuStory(args) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n\n return (\n <div\n ref={setContainer}\n className=\"relative flex h-600 w-600 items-center justify-center rounded-16 bg-background-subtle-base shadow-tooltip overflow-visible\"\n >\n {container && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"secondary\" iconLeft=\"buildingLine\">\n Organization\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent {...args} container={container} side=\"bottom\" align=\"start\">\n <OrganizationItem />\n <DropdownMenuSeparator />\n <DropdownMenuItem icon=\"settings3Line\">Settings</DropdownMenuItem>\n <DropdownMenuSub>\n <DropdownMenuSubTrigger icon=\"arrowLeftRightLine\">\n Switch organization\n </DropdownMenuSubTrigger>\n <DropdownMenuSubContent>\n <DropdownMenuItem\n icon=\"shipfox\"\n iconStyle=\"text-foreground-neutral-base\"\n className=\"text-foreground-neutral-base\"\n >\n Shipfox\n </DropdownMenuItem>\n <DropdownMenuItem\n icon=\"github\"\n iconStyle=\"text-foreground-neutral-base\"\n className=\"text-foreground-neutral-base\"\n >\n Github\n </DropdownMenuItem>\n <DropdownMenuItem\n icon=\"google\"\n iconStyle=\"text-foreground-neutral-base\"\n className=\"text-foreground-neutral-base\"\n >\n Google\n </DropdownMenuItem>\n </DropdownMenuSubContent>\n </DropdownMenuSub>\n <DropdownMenuItem icon=\"addLine\">New organization</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n );\n },\n};\n\nexport const CompleteExample: Story = {\n args: {\n size: 'lg',\n side: 'bottom',\n },\n play: (ctx) =>\n openMenuAndScreenshot(ctx, COMPLETE_MENU_REGEX, 'DropdownMenu Complete Example Open'),\n render: function CompleteExampleStory(args) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const [showNotifications, setShowNotifications] = useState(true);\n const [showBadges, setShowBadges] = useState(false);\n const [theme, setTheme] = useState('dark');\n\n return (\n <div\n ref={setContainer}\n className=\"relative flex h-600 w-500 items-center justify-center rounded-16 bg-background-subtle-base shadow-tooltip overflow-visible\"\n >\n {container && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"secondary\" iconLeft=\"menu3Line\">\n Complete Menu\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent\n {...args}\n className=\"w-260\"\n container={container}\n side=\"bottom\"\n align=\"start\"\n >\n <UserProfileSection />\n <DropdownMenuSeparator />\n\n <DropdownMenuLabel>Actions</DropdownMenuLabel>\n <DropdownMenuGroup>\n <DropdownMenuItem icon=\"sparklingLine\">Getting started</DropdownMenuItem>\n <DropdownMenuItem icon=\"userLine\">Profile settings</DropdownMenuItem>\n </DropdownMenuGroup>\n\n <DropdownMenuSeparator />\n\n <DropdownMenuLabel>Preferences</DropdownMenuLabel>\n <DropdownMenuGroup>\n <DropdownMenuCheckboxItem\n checked={showNotifications}\n onCheckedChange={setShowNotifications}\n closeOnSelect={false}\n >\n Show notifications\n </DropdownMenuCheckboxItem>\n <DropdownMenuCheckboxItem\n checked={showBadges}\n onCheckedChange={setShowBadges}\n closeOnSelect={false}\n >\n Show badges\n </DropdownMenuCheckboxItem>\n </DropdownMenuGroup>\n\n <DropdownMenuSeparator />\n\n <DropdownMenuLabel>Theme</DropdownMenuLabel>\n <DropdownMenuRadioGroup value={theme} onValueChange={setTheme}>\n <DropdownMenuRadioItem value=\"light\" closeOnSelect={false}>\n Light\n </DropdownMenuRadioItem>\n <DropdownMenuRadioItem value=\"dark\" closeOnSelect={false}>\n Dark\n </DropdownMenuRadioItem>\n <DropdownMenuRadioItem value=\"system\" closeOnSelect={false}>\n System\n </DropdownMenuRadioItem>\n </DropdownMenuRadioGroup>\n\n <DropdownMenuSeparator />\n <DropdownMenuItem icon=\"logoutCircleLine\">Log out</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n );\n },\n};\n"],"names":["argosScreenshot","screen","within","userEvent","useState","Avatar","Button","DropdownMenu","DropdownMenuCheckboxItem","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuLabel","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuSub","DropdownMenuSubContent","DropdownMenuSubTrigger","DropdownMenuTrigger","OPEN_MENU_REGEX","ACTIONS_REGEX","ORGANIZATION_REGEX","COMPLETE_MENU_REGEX","SWITCH_ORGANIZATION_REGEX","isTestEnvironment","navigator","webdriver","openMenuAndScreenshot","ctx","triggerRegex","screenshotName","additionalSteps","canvasElement","step","canvas","user","setup","triggerButton","getByRole","name","click","findByRole","Promise","resolve","setTimeout","HTMLElement","style","display","meta","title","component","subcomponents","parameters","layout","tags","argTypes","side","control","options","description","table","defaultValue","summary","align","sideOffset","type","min","max","alignOffset","size","args","Default","play","render","DefaultStory","container","setContainer","div","ref","className","asChild","variant","icon","WithShortcuts","WithShortcutsStory","shortcut","UserProfileSection","content","src","fallback","span","OrganizationItem","logoName","radius","OrganizationMenu","submenuTrigger","hover","OrganizationMenuStory","iconLeft","iconStyle","CompleteExample","CompleteExampleStory","showNotifications","setShowNotifications","showBadges","setShowBadges","theme","setTheme","checked","onCheckedChange","closeOnSelect","value","onValueChange"],"mappings":";AAAA,SAAQA,eAAe,QAAO,6BAA6B;AAE3D,SAAQC,MAAM,EAAEC,MAAM,QAAO,yBAAyB;AAEtD,OAAOC,eAAe,8BAA8B;AACpD,SAAQC,QAAQ,QAAO,QAAQ;AAC/B,SAAQC,MAAM,QAAO,YAAY;AACjC,SAAQC,MAAM,QAAO,YAAY;AACjC,SAC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ownMenuContentProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuRadioItemProps, DropdownMenuShortcutProps, DropdownMenuSubTriggerProps, } from './dropdown-menu';
2
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, dropdownMenuContentVariants, dropdownMenuItemVariants, dropdownMenuLabelVariants, } from './dropdown-menu';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,6BAA6B,EAC7B,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, dropdownMenuContentVariants, dropdownMenuItemVariants, dropdownMenuLabelVariants } from './dropdown-menu.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/dropdown-menu/index.ts"],"sourcesContent":["export type {\n DropdownMenuCheckboxItemProps,\n DropdownMenuContentProps,\n DropdownMenuItemProps,\n DropdownMenuLabelProps,\n DropdownMenuRadioItemProps,\n DropdownMenuShortcutProps,\n DropdownMenuSubTriggerProps,\n} from './dropdown-menu';\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n dropdownMenuContentVariants,\n dropdownMenuItemVariants,\n dropdownMenuLabelVariants,\n} from './dropdown-menu';\n"],"names":["DropdownMenu","DropdownMenuCheckboxItem","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuLabel","DropdownMenuPortal","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubContent","DropdownMenuSubTrigger","DropdownMenuTrigger","dropdownMenuContentVariants","dropdownMenuItemVariants","dropdownMenuLabelVariants"],"mappings":"AASA,SACEA,YAAY,EACZC,wBAAwB,EACxBC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,sBAAsB,EACtBC,qBAAqB,EACrBC,qBAAqB,EACrBC,oBAAoB,EACpBC,eAAe,EACfC,sBAAsB,EACtBC,sBAAsB,EACtBC,mBAAmB,EACnBC,2BAA2B,EAC3BC,wBAAwB,EACxBC,yBAAyB,QACpB,kBAAkB"}
@@ -4,7 +4,7 @@ export type DynamicItemProps = Omit<ItemProps, 'variant' | 'children' | 'title'>
4
4
  variant?: 'default' | 'neutral';
5
5
  leftElement?: ReactNode;
6
6
  title?: ReactNode;
7
- description?: string;
7
+ description?: ReactNode;
8
8
  action?: ReactNode;
9
9
  rightElement?: ReactNode;
10
10
  contentClassName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-item.d.ts","sourceRoot":"","sources":["../../../src/components/dynamic-item/dynamic-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAErC,OAAO,EAML,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC,GAAG;IACjF,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,OAAmB,EACnB,WAAW,EACX,KAAK,EACL,WAAW,EACX,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAmClB"}
1
+ {"version":3,"file":"dynamic-item.d.ts","sourceRoot":"","sources":["../../../src/components/dynamic-item/dynamic-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAErC,OAAO,EAML,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC,GAAG;IACjF,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,OAAmB,EACnB,WAAW,EACX,KAAK,EACL,WAAW,EACX,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAyClB"}
@@ -19,12 +19,12 @@ export function DynamicItem({ className, variant = 'default', leftElement, title
19
19
  hasContent && /*#__PURE__*/ _jsxs(ItemContent, {
20
20
  className: "text-center sm:text-left",
21
21
  children: [
22
- title && typeof title === 'string' ? /*#__PURE__*/ _jsx(ItemTitle, {
22
+ title ? typeof title === 'string' ? /*#__PURE__*/ _jsx(ItemTitle, {
23
23
  children: title
24
- }) : title,
25
- description && /*#__PURE__*/ _jsx(ItemDescription, {
24
+ }) : title : null,
25
+ description ? typeof description === 'string' ? /*#__PURE__*/ _jsx(ItemDescription, {
26
26
  children: description
27
- }),
27
+ }) : description : null,
28
28
  action && /*#__PURE__*/ _jsx(ItemActions, {
29
29
  className: cn('mt-8 flex flex-wrap items-center gap-16'),
30
30
  children: action
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/dynamic-item/dynamic-item.tsx"],"sourcesContent":["import type {ReactNode} from 'react';\nimport {cn} from 'utils/cn';\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemMedia,\n type ItemProps,\n ItemTitle,\n} from '../item/item';\n\nexport type DynamicItemProps = Omit<ItemProps, 'variant' | 'children' | 'title'> & {\n variant?: 'default' | 'neutral';\n leftElement?: ReactNode;\n title?: ReactNode;\n description?: string;\n action?: ReactNode;\n rightElement?: ReactNode;\n contentClassName?: string;\n};\n\nexport function DynamicItem({\n className,\n variant = 'default',\n leftElement,\n title,\n description,\n action,\n rightElement,\n contentClassName,\n ...props\n}: DynamicItemProps) {\n const hasLeftSide = Boolean(leftElement);\n const hasRightSide = Boolean(rightElement);\n const hasContent = Boolean(title || description || action);\n\n return (\n <Item variant={variant} className={className} {...props}>\n <div\n className={cn(\n 'relative flex flex-col sm:flex-row justify-center items-center gap-16 min-h-64 px-12 py-12',\n contentClassName,\n )}\n >\n {hasLeftSide && (\n <ItemMedia className={cn('self-center sm:self-start pt-2')}>{leftElement}</ItemMedia>\n )}\n\n {hasContent && (\n <ItemContent className=\"text-center sm:text-left\">\n {title && typeof title === 'string' ? <ItemTitle>{title}</ItemTitle> : title}\n {description && <ItemDescription>{description}</ItemDescription>}\n {action && (\n <ItemActions className={cn('mt-8 flex flex-wrap items-center gap-16')}>\n {action}\n </ItemActions>\n )}\n </ItemContent>\n )}\n\n {hasRightSide && (\n <ItemActions className=\"self-center sm:ml-auto\">{rightElement}</ItemActions>\n )}\n </div>\n </Item>\n );\n}\n"],"names":["cn","Item","ItemActions","ItemContent","ItemDescription","ItemMedia","ItemTitle","DynamicItem","className","variant","leftElement","title","description","action","rightElement","contentClassName","props","hasLeftSide","Boolean","hasRightSide","hasContent","div"],"mappings":";AACA,SAAQA,EAAE,QAAO,WAAW;AAC5B,SACEC,IAAI,EACJC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfC,SAAS,EAETC,SAAS,QACJ,eAAe;AAYtB,OAAO,SAASC,YAAY,EAC1BC,SAAS,EACTC,UAAU,SAAS,EACnBC,WAAW,EACXC,KAAK,EACLC,WAAW,EACXC,MAAM,EACNC,YAAY,EACZC,gBAAgB,EAChB,GAAGC,OACc;IACjB,MAAMC,cAAcC,QAAQR;IAC5B,MAAMS,eAAeD,QAAQJ;IAC7B,MAAMM,aAAaF,QAAQP,SAASC,eAAeC;IAEnD,qBACE,KAACZ;QAAKQ,SAASA;QAASD,WAAWA;QAAY,GAAGQ,KAAK;kBACrD,cAAA,MAACK;YACCb,WAAWR,GACT,8FACAe;;gBAGDE,6BACC,KAACZ;oBAAUG,WAAWR,GAAG;8BAAoCU;;gBAG9DU,4BACC,MAACjB;oBAAYK,WAAU;;wBACpBG,SAAS,OAAOA,UAAU,yBAAW,KAACL;sCAAWK;6BAAqBA;wBACtEC,6BAAe,KAACR;sCAAiBQ;;wBACjCC,wBACC,KAACX;4BAAYM,WAAWR,GAAG;sCACxBa;;;;gBAMRM,8BACC,KAACjB;oBAAYM,WAAU;8BAA0BM;;;;;AAK3D"}
1
+ {"version":3,"sources":["../../../src/components/dynamic-item/dynamic-item.tsx"],"sourcesContent":["import type {ReactNode} from 'react';\nimport {cn} from 'utils/cn';\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemMedia,\n type ItemProps,\n ItemTitle,\n} from '../item/item';\n\nexport type DynamicItemProps = Omit<ItemProps, 'variant' | 'children' | 'title'> & {\n variant?: 'default' | 'neutral';\n leftElement?: ReactNode;\n title?: ReactNode;\n description?: ReactNode;\n action?: ReactNode;\n rightElement?: ReactNode;\n contentClassName?: string;\n};\n\nexport function DynamicItem({\n className,\n variant = 'default',\n leftElement,\n title,\n description,\n action,\n rightElement,\n contentClassName,\n ...props\n}: DynamicItemProps) {\n const hasLeftSide = Boolean(leftElement);\n const hasRightSide = Boolean(rightElement);\n const hasContent = Boolean(title || description || action);\n\n return (\n <Item variant={variant} className={className} {...props}>\n <div\n className={cn(\n 'relative flex flex-col sm:flex-row justify-center items-center gap-16 min-h-64 px-12 py-12',\n contentClassName,\n )}\n >\n {hasLeftSide && (\n <ItemMedia className={cn('self-center sm:self-start pt-2')}>{leftElement}</ItemMedia>\n )}\n\n {hasContent && (\n <ItemContent className=\"text-center sm:text-left\">\n {title ? typeof title === 'string' ? <ItemTitle>{title}</ItemTitle> : title : null}\n {description ? (\n typeof description === 'string' ? (\n <ItemDescription>{description}</ItemDescription>\n ) : (\n description\n )\n ) : null}\n {action && (\n <ItemActions className={cn('mt-8 flex flex-wrap items-center gap-16')}>\n {action}\n </ItemActions>\n )}\n </ItemContent>\n )}\n\n {hasRightSide && (\n <ItemActions className=\"self-center sm:ml-auto\">{rightElement}</ItemActions>\n )}\n </div>\n </Item>\n );\n}\n"],"names":["cn","Item","ItemActions","ItemContent","ItemDescription","ItemMedia","ItemTitle","DynamicItem","className","variant","leftElement","title","description","action","rightElement","contentClassName","props","hasLeftSide","Boolean","hasRightSide","hasContent","div"],"mappings":";AACA,SAAQA,EAAE,QAAO,WAAW;AAC5B,SACEC,IAAI,EACJC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfC,SAAS,EAETC,SAAS,QACJ,eAAe;AAYtB,OAAO,SAASC,YAAY,EAC1BC,SAAS,EACTC,UAAU,SAAS,EACnBC,WAAW,EACXC,KAAK,EACLC,WAAW,EACXC,MAAM,EACNC,YAAY,EACZC,gBAAgB,EAChB,GAAGC,OACc;IACjB,MAAMC,cAAcC,QAAQR;IAC5B,MAAMS,eAAeD,QAAQJ;IAC7B,MAAMM,aAAaF,QAAQP,SAASC,eAAeC;IAEnD,qBACE,KAACZ;QAAKQ,SAASA;QAASD,WAAWA;QAAY,GAAGQ,KAAK;kBACrD,cAAA,MAACK;YACCb,WAAWR,GACT,8FACAe;;gBAGDE,6BACC,KAACZ;oBAAUG,WAAWR,GAAG;8BAAoCU;;gBAG9DU,4BACC,MAACjB;oBAAYK,WAAU;;wBACpBG,QAAQ,OAAOA,UAAU,yBAAW,KAACL;sCAAWK;6BAAqBA,QAAQ;wBAC7EC,cACC,OAAOA,gBAAgB,yBACrB,KAACR;sCAAiBQ;6BAElBA,cAEA;wBACHC,wBACC,KAACX;4BAAYM,WAAWR,GAAG;sCACxBa;;;;gBAMRM,8BACC,KAACjB;oBAAYM,WAAU;8BAA0BM;;;;;AAK3D"}
@@ -230,7 +230,17 @@ export const ConnectGithubAccountItem = {
230
230
  ]
231
231
  }),
232
232
  title: "Slack",
233
- description: "Personal account (kye-nguyen)",
233
+ description: /*#__PURE__*/ _jsxs("p", {
234
+ className: "text-xs leading-20 text-tag-warning-icon inline-flex items-center gap-2",
235
+ children: [
236
+ "Personal account (kyle-nguyen)",
237
+ /*#__PURE__*/ _jsx(Icon, {
238
+ name: "info",
239
+ size: "sm",
240
+ className: "shrink-0 size-16 text-tag-warning-icon"
241
+ })
242
+ ]
243
+ }),
234
244
  rightElement: /*#__PURE__*/ _jsx(Button, {
235
245
  variant: "primary",
236
246
  size: "sm",