@offlinemediainc/offline-ui 0.1.3 → 0.2.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.
@@ -0,0 +1,1505 @@
1
+ 'use strict';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
+ var __objRest = (source, exclude) => {
23
+ var target = {};
24
+ for (var prop in source)
25
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
+ target[prop] = source[prop];
27
+ if (source != null && __getOwnPropSymbols)
28
+ for (var prop of __getOwnPropSymbols(source)) {
29
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
+ target[prop] = source[prop];
31
+ }
32
+ return target;
33
+ };
34
+
35
+ // src/design-system/semantics/colors.ts
36
+ var semanticColors = {
37
+ brand: {
38
+ /** Yellow-400 (#de8e0f) - brand accent for highlights, badges, premium touches. NEVER for buttons */
39
+ primary: "yellow-400",
40
+ /** Blue-400 (#004fff) - for links and clickable text ONLY */
41
+ interactive: "blue-400"
42
+ },
43
+ text: {
44
+ /** Gray-900 (#191919) - primary text, headings, important content */
45
+ primary: "gray-900",
46
+ /** Gray-600 (#636363) - secondary/supporting text */
47
+ secondary: "gray-600",
48
+ /** Gray-500 (#7c7c7c) - muted text, timestamps, helpers */
49
+ muted: "gray-500",
50
+ /** White text on dark backgrounds */
51
+ onDark: "white",
52
+ /** Blue-400 for clickable links */
53
+ link: "blue-400",
54
+ /** Success green for positive text */
55
+ positive: "semantic-success500",
56
+ /** Red for error/negative text */
57
+ negative: "red-400"
58
+ },
59
+ surface: {
60
+ /** White - default page/card background */
61
+ default: "white",
62
+ /** Gray-50 (#ececec) - muted/secondary backgrounds */
63
+ muted: "gray-50",
64
+ /** White with shadow-elevated for floating surfaces */
65
+ elevated: "white + shadow-elevated"
66
+ },
67
+ border: {
68
+ /** Gray-200 (#c6c6c6) - default borders */
69
+ default: "gray-200",
70
+ /** Gray-300 (#aeaeae) - stronger borders */
71
+ strong: "gray-300",
72
+ /** Yellow-400 - interactive/accent borders */
73
+ interactive: "yellow-400",
74
+ /** Gray-900 - focus ring borders */
75
+ focus: "gray-900"
76
+ },
77
+ feedback: {
78
+ /** Chart-3 (#099250) - success, positive, growth */
79
+ positive: "chart-3",
80
+ /** Chart-5 (#d31a0c) - error, negative, problems */
81
+ negative: "chart-5",
82
+ /** Yellow-400 - warning states */
83
+ warning: "yellow-400",
84
+ /** Chart-4 (#636363) - neutral/baseline */
85
+ neutral: "chart-4"
86
+ }
87
+ };
88
+ var colorHexValues = {
89
+ "yellow-25": "#fff2d8",
90
+ "yellow-50": "#ffe9bd",
91
+ "yellow-100": "#ffd386",
92
+ "yellow-200": "#ffbd54",
93
+ "yellow-300": "#f0a52c",
94
+ "yellow-400": "#de8e0f",
95
+ "yellow-500": "#c57900",
96
+ "yellow-600": "#a76700",
97
+ "yellow-700": "#835100",
98
+ "yellow-800": "#5c3900",
99
+ "yellow-900": "#331f00",
100
+ "blue-25": "#d8e7ff",
101
+ "blue-50": "#bed6ff",
102
+ "blue-100": "#85afff",
103
+ "blue-200": "#508bff",
104
+ "blue-300": "#236aff",
105
+ "blue-400": "#004fff",
106
+ "blue-500": "#0046e0",
107
+ "blue-600": "#003bbb",
108
+ "blue-700": "#002e91",
109
+ "blue-800": "#001f63",
110
+ "blue-900": "#001033",
111
+ "gray-25": "#f2f2f2",
112
+ "gray-50": "#ececec",
113
+ "gray-100": "#dfdfdf",
114
+ "gray-200": "#c6c6c6",
115
+ "gray-300": "#aeaeae",
116
+ "gray-400": "#959595",
117
+ "gray-500": "#7c7c7c",
118
+ "gray-600": "#636363",
119
+ "gray-700": "#4a4a4a",
120
+ "gray-800": "#323232",
121
+ "gray-900": "#191919",
122
+ "red-400": "#d31a0c",
123
+ "semantic-success500": "#099250",
124
+ "chart-1": "#de8e0f",
125
+ "chart-2": "#004fff",
126
+ "chart-3": "#099250",
127
+ "chart-4": "#636363",
128
+ "chart-5": "#d31a0c",
129
+ "chart-6": "#a76700",
130
+ "chart-7": "#003bbb",
131
+ "chart-8": "#959595"
132
+ };
133
+
134
+ // src/design-system/semantics/typography.ts
135
+ var typographyDecisions = {
136
+ // Page structure
137
+ /** Hero headlines, major section titles - Cabinet Grotesk, use sparingly */
138
+ pageTitle: "display-small",
139
+ /** Section headings within pages */
140
+ sectionHeading: "headline-medium",
141
+ /** Card titles, panel headers */
142
+ cardTitle: "headline-small",
143
+ // Stats & metrics
144
+ /** Large stat values in dashboards */
145
+ statValueLarge: "display-medium",
146
+ /** Smaller stat values */
147
+ statValueSmall: "display-small",
148
+ /** Labels under stat values */
149
+ statLabel: "body-small",
150
+ // Body text
151
+ /** Default body text */
152
+ bodyDefault: "body-medium",
153
+ /** Secondary/supporting body text */
154
+ bodySecondary: "body-small",
155
+ // Forms
156
+ /** Form field labels */
157
+ formLabel: "label-medium",
158
+ /** Helper text below inputs */
159
+ formHelper: "body-small text-muted",
160
+ /** Error messages below inputs */
161
+ formError: "body-small text-negative",
162
+ // UI elements
163
+ /** Button text */
164
+ buttonText: "label-medium",
165
+ /** Sidebar/nav items */
166
+ navItem: "body-medium",
167
+ /** Badge text */
168
+ badgeText: "label-small",
169
+ /** Table header cells */
170
+ tableHeader: "label-medium",
171
+ /** Table body cells */
172
+ tableCell: "body-medium",
173
+ /** Timestamps, dates */
174
+ timestamp: "body-small text-muted",
175
+ // Empty states
176
+ /** Empty state headline */
177
+ emptyStateTitle: "headline-small",
178
+ /** Empty state description */
179
+ emptyStateDescription: "body-medium text-muted",
180
+ // Dialog/Modal
181
+ /** Dialog title */
182
+ dialogTitle: "headline-medium",
183
+ /** Dialog description */
184
+ dialogDescription: "body-medium text-muted",
185
+ // Sidebar
186
+ /** Sidebar section labels */
187
+ sidebarLabel: "nav-label",
188
+ /** Sidebar navigation items */
189
+ sidebarItem: "body-medium",
190
+ // Breadcrumb
191
+ /** Breadcrumb items */
192
+ breadcrumbItem: "body-small",
193
+ /** Current breadcrumb (muted) */
194
+ breadcrumbCurrent: "body-small text-muted"
195
+ };
196
+ var fontFamilyDecisions = {
197
+ /** Cabinet Grotesk - hero headlines, major titles. Use sparingly for impact */
198
+ display: "var(--font-cabinet-grotesk), var(--font-satoshi), sans-serif",
199
+ /** Satoshi - everything else: headlines, body, labels. The workhorse font */
200
+ body: "var(--font-satoshi), sans-serif",
201
+ /** DM Mono - stats, numbers, code. When precision matters */
202
+ mono: "var(--font-dm-mono), 'DM Mono', monospace"
203
+ };
204
+ var typographyScale = {
205
+ "display-large": { size: "36px", lineHeight: "100%", weight: 800, font: "Cabinet Grotesk" },
206
+ "display-medium": { size: "32px", lineHeight: "100%", weight: 800, font: "Cabinet Grotesk" },
207
+ "display-small": { size: "29px", lineHeight: "100%", weight: 800, font: "Cabinet Grotesk" },
208
+ "headline-large": { size: "26px", lineHeight: "32px", weight: 700, font: "Satoshi" },
209
+ "headline-medium": { size: "23px", lineHeight: "28px", weight: 700, font: "Satoshi" },
210
+ "headline-small": { size: "20px", lineHeight: "24px", weight: 700, font: "Satoshi" },
211
+ "title-large": { size: "18px", lineHeight: "22px", weight: 700, font: "Satoshi" },
212
+ "title-medium": { size: "16px", lineHeight: "20px", weight: 700, font: "Satoshi" },
213
+ "title-small": { size: "14px", lineHeight: "18px", weight: 700, font: "Satoshi" },
214
+ "body-large": { size: "16px", lineHeight: "24px", weight: 500, font: "Satoshi" },
215
+ "body-medium": { size: "14px", lineHeight: "20px", weight: 500, font: "Satoshi" },
216
+ "body-small": { size: "12px", lineHeight: "16px", weight: 500, font: "Satoshi" },
217
+ "body-x-small": { size: "10px", lineHeight: "14px", weight: 500, font: "Satoshi" },
218
+ "label-large": { size: "14px", lineHeight: "18px", weight: 700, font: "Satoshi" },
219
+ "label-medium": { size: "12px", lineHeight: "16px", weight: 700, font: "Satoshi" },
220
+ "label-small": { size: "10px", lineHeight: "14px", weight: 700, font: "Satoshi" },
221
+ "stat-mono": { weight: 500, letterSpacing: "0.04em", font: "DM Mono" }
222
+ };
223
+
224
+ // src/design-system/components/decisions.ts
225
+ var componentDecisions = {
226
+ lists: {
227
+ /** Clickable list rows (partners, offers, events) */
228
+ clickableRow: "Item",
229
+ /** Structured data with sorting/filtering */
230
+ dataTable: "Table",
231
+ /** Grid of cards (dashboard, gallery) */
232
+ cardGrid: "Card in grid",
233
+ /** Simple bulleted/numbered lists */
234
+ simpleList: "ul with body-medium",
235
+ /** Key-value pairs */
236
+ descriptionList: "dl with label-medium dt and body-medium dd"
237
+ },
238
+ feedback: {
239
+ /** Success after action (save, create, delete) */
240
+ actionSuccess: "toast.success",
241
+ /** Error after action */
242
+ actionError: "toast.error",
243
+ /** Warning banner in content area */
244
+ inlineWarning: "Alert variant=warning",
245
+ /** Error banner in content area */
246
+ inlineError: "Alert variant=destructive",
247
+ /** Form field validation error */
248
+ fieldError: "body-small text-negative below input",
249
+ /** Info/tip banner */
250
+ inlineInfo: "Alert variant=default"
251
+ },
252
+ modals: {
253
+ /** Forms, content entry, multi-step flows */
254
+ formEntry: "Dialog",
255
+ /** Destructive action confirmation (delete, discard) */
256
+ confirmDestructive: "AlertDialog",
257
+ /** Side panel for details, secondary content */
258
+ sidePanel: "Sheet side=right",
259
+ /** Mobile navigation drawer */
260
+ mobileNav: "Sheet side=left",
261
+ /** Mobile action sheets */
262
+ mobileActions: "Sheet side=bottom h-auto max-h-[80vh]",
263
+ /** Preview/detail view */
264
+ preview: "Dialog or Sheet"
265
+ },
266
+ navigation: {
267
+ /** Primary app navigation */
268
+ primaryNav: "Sidebar",
269
+ /** Page-level tabs */
270
+ pageTabs: "Tabs",
271
+ /** Location breadcrumbs */
272
+ breadcrumbs: "Breadcrumb",
273
+ /** Section header with back button */
274
+ sectionHeader: "Breadcrumb + headline",
275
+ /** Dropdown navigation menu */
276
+ dropdownNav: "DropdownMenu"
277
+ },
278
+ selection: {
279
+ /** Single choice from 2-5 options */
280
+ singleFromFew: "radio group",
281
+ /** Single choice from many options */
282
+ singleFromMany: "Select",
283
+ /** Multiple choices allowed */
284
+ multiple: "Checkbox group",
285
+ /** On/off toggle */
286
+ toggle: "single Checkbox",
287
+ /** Segmented control (view modes) */
288
+ segmented: "Tabs variant=pill"
289
+ },
290
+ data: {
291
+ /** Status indicator */
292
+ status: "Badge",
293
+ /** Progress indication */
294
+ progress: "Progress",
295
+ /** Avatar/profile image */
296
+ avatar: "Avatar",
297
+ /** Data visualization */
298
+ chart: "Chart (recharts)",
299
+ /** Loading placeholder */
300
+ skeleton: "Skeleton"
301
+ },
302
+ forms: {
303
+ /** Single-line text input */
304
+ textInput: "Input",
305
+ /** Multi-line text input */
306
+ textArea: "Textarea",
307
+ /** Email/password/number input */
308
+ typedInput: "Input type=email|password|number",
309
+ /** OTP/verification code */
310
+ otpInput: "InputOTP",
311
+ /** Form field label */
312
+ label: "Label htmlFor={id}",
313
+ /** Checkbox with label */
314
+ checkbox: "Checkbox + Label"
315
+ },
316
+ layout: {
317
+ /** Content card container */
318
+ card: "Card",
319
+ /** Expandable content */
320
+ accordion: "Accordion",
321
+ /** Collapsible section */
322
+ collapsible: "Collapsible",
323
+ /** Visual divider */
324
+ separator: "Separator",
325
+ /** Hover information */
326
+ tooltip: "Tooltip"
327
+ }
328
+ };
329
+
330
+ // src/design-system/components/registry.ts
331
+ var componentRegistry = {
332
+ // Layout Components
333
+ Card: {
334
+ name: "Card",
335
+ status: "approved",
336
+ description: "Container for grouped content with optional header/footer",
337
+ imports: ["Card", "CardHeader", "CardTitle", "CardDescription", "CardContent", "CardFooter"],
338
+ composition: ["CardHeader", "CardTitle", "CardDescription", "CardContent", "CardFooter"]
339
+ },
340
+ Item: {
341
+ name: "Item",
342
+ status: "approved",
343
+ description: "Flexible list item with media, content, and actions slots",
344
+ imports: ["Item", "ItemMedia", "ItemContent", "ItemTitle", "ItemDescription", "ItemActions"],
345
+ variants: { variant: ["default", "outline", "muted"] },
346
+ composition: ["ItemMedia", "ItemContent", "ItemTitle", "ItemDescription", "ItemActions"]
347
+ },
348
+ Separator: {
349
+ name: "Separator",
350
+ status: "approved",
351
+ description: "Visual divider between sections",
352
+ imports: ["Separator"]
353
+ },
354
+ // Navigation Components
355
+ Sidebar: {
356
+ name: "Sidebar",
357
+ status: "approved",
358
+ description: "Primary navigation sidebar with collapsible state",
359
+ imports: [
360
+ "Sidebar",
361
+ "SidebarContent",
362
+ "SidebarGroup",
363
+ "SidebarGroupLabel",
364
+ "SidebarGroupContent",
365
+ "SidebarMenu",
366
+ "SidebarMenuItem",
367
+ "SidebarMenuButton",
368
+ "SidebarHeader",
369
+ "SidebarFooter",
370
+ "SidebarTrigger",
371
+ "SidebarProvider"
372
+ ],
373
+ composition: ["SidebarHeader", "SidebarContent", "SidebarGroup", "SidebarFooter"]
374
+ },
375
+ OfflineSidebar: {
376
+ name: "OfflineSidebar",
377
+ status: "approved",
378
+ description: "Pre-configured sidebar with Offline branding (requires Next.js)",
379
+ imports: ["OfflineSidebar", "OfflineSidebarNav", "OfflineSidebarFooter"]
380
+ },
381
+ Breadcrumb: {
382
+ name: "Breadcrumb",
383
+ status: "approved",
384
+ description: "Location breadcrumb trail",
385
+ imports: [
386
+ "Breadcrumb",
387
+ "BreadcrumbList",
388
+ "BreadcrumbItem",
389
+ "BreadcrumbLink",
390
+ "BreadcrumbPage",
391
+ "BreadcrumbSeparator"
392
+ ],
393
+ composition: ["BreadcrumbList", "BreadcrumbItem", "BreadcrumbLink", "BreadcrumbPage"]
394
+ },
395
+ Tabs: {
396
+ name: "Tabs",
397
+ status: "approved",
398
+ description: "Tab navigation for switching views",
399
+ imports: ["Tabs", "TabsList", "TabsTrigger", "TabsContent"],
400
+ variants: { style: ["default (pill)", "line (underline)"] },
401
+ composition: ["TabsList", "TabsTrigger", "TabsContent"]
402
+ },
403
+ DropdownMenu: {
404
+ name: "DropdownMenu",
405
+ status: "approved",
406
+ description: "Dropdown menu for actions",
407
+ imports: [
408
+ "DropdownMenu",
409
+ "DropdownMenuTrigger",
410
+ "DropdownMenuContent",
411
+ "DropdownMenuItem",
412
+ "DropdownMenuSeparator",
413
+ "DropdownMenuLabel"
414
+ ],
415
+ composition: ["DropdownMenuTrigger", "DropdownMenuContent", "DropdownMenuItem"]
416
+ },
417
+ // Action Components
418
+ Button: {
419
+ name: "Button",
420
+ status: "approved",
421
+ description: "Primary action trigger. Black (default) is primary color per brand",
422
+ imports: ["Button", "buttonVariants"],
423
+ variants: {
424
+ variant: ["default", "secondary", "outline", "ghost", "destructive", "link"],
425
+ size: ["default", "sm", "lg", "icon"]
426
+ }
427
+ },
428
+ Badge: {
429
+ name: "Badge",
430
+ status: "approved",
431
+ description: "Status indicators, tags, labels",
432
+ imports: ["Badge", "badgeVariants"],
433
+ variants: {
434
+ variant: ["default", "secondary", "destructive", "success", "warning", "outline"]
435
+ }
436
+ },
437
+ // Form Components
438
+ Input: {
439
+ name: "Input",
440
+ status: "approved",
441
+ description: "Single-line text input",
442
+ imports: ["Input"]
443
+ },
444
+ Label: {
445
+ name: "Label",
446
+ status: "approved",
447
+ description: "Form field label - always use with htmlFor",
448
+ imports: ["Label"]
449
+ },
450
+ Checkbox: {
451
+ name: "Checkbox",
452
+ status: "approved",
453
+ description: "Checkbox for boolean/multi-select",
454
+ imports: ["Checkbox"]
455
+ },
456
+ InputOTP: {
457
+ name: "InputOTP",
458
+ status: "approved",
459
+ description: "OTP/verification code input",
460
+ imports: ["InputOTP", "InputOTPGroup", "InputOTPSlot", "InputOTPSeparator"],
461
+ composition: ["InputOTPGroup", "InputOTPSlot"]
462
+ },
463
+ Progress: {
464
+ name: "Progress",
465
+ status: "approved",
466
+ description: "Progress bar indicator",
467
+ imports: ["Progress"]
468
+ },
469
+ // Overlay Components
470
+ Dialog: {
471
+ name: "Dialog",
472
+ status: "approved",
473
+ description: "Modal for forms and content. User can dismiss freely",
474
+ imports: [
475
+ "Dialog",
476
+ "DialogTrigger",
477
+ "DialogContent",
478
+ "DialogHeader",
479
+ "DialogFooter",
480
+ "DialogTitle",
481
+ "DialogDescription",
482
+ "DialogClose"
483
+ ],
484
+ composition: ["DialogTrigger", "DialogContent", "DialogHeader", "DialogFooter"]
485
+ },
486
+ AlertDialog: {
487
+ name: "AlertDialog",
488
+ status: "approved",
489
+ description: "Interruption requiring decision. Cannot dismiss by clicking outside",
490
+ imports: [
491
+ "AlertDialog",
492
+ "AlertDialogTrigger",
493
+ "AlertDialogContent",
494
+ "AlertDialogHeader",
495
+ "AlertDialogFooter",
496
+ "AlertDialogTitle",
497
+ "AlertDialogDescription",
498
+ "AlertDialogAction",
499
+ "AlertDialogCancel"
500
+ ],
501
+ composition: ["AlertDialogTrigger", "AlertDialogContent", "AlertDialogAction", "AlertDialogCancel"]
502
+ },
503
+ Sheet: {
504
+ name: "Sheet",
505
+ status: "approved",
506
+ description: "Slide-in panel for secondary content",
507
+ imports: [
508
+ "Sheet",
509
+ "SheetTrigger",
510
+ "SheetContent",
511
+ "SheetHeader",
512
+ "SheetFooter",
513
+ "SheetTitle",
514
+ "SheetDescription",
515
+ "SheetClose"
516
+ ],
517
+ variants: { side: ["right", "left", "top", "bottom"] },
518
+ composition: ["SheetTrigger", "SheetContent", "SheetHeader", "SheetFooter"]
519
+ },
520
+ Tooltip: {
521
+ name: "Tooltip",
522
+ status: "approved",
523
+ description: "Hover/focus information overlay",
524
+ imports: ["Tooltip", "TooltipTrigger", "TooltipContent", "TooltipProvider"],
525
+ composition: ["TooltipTrigger", "TooltipContent"]
526
+ },
527
+ // Data Display Components
528
+ Avatar: {
529
+ name: "Avatar",
530
+ status: "approved",
531
+ description: "User/entity avatar with fallback",
532
+ imports: ["Avatar", "AvatarImage", "AvatarFallback"],
533
+ composition: ["AvatarImage", "AvatarFallback"],
534
+ sizes: ["default", "sm", "lg"]
535
+ },
536
+ Skeleton: {
537
+ name: "Skeleton",
538
+ status: "approved",
539
+ description: "Loading placeholder matching content shape",
540
+ imports: ["Skeleton"]
541
+ },
542
+ Chart: {
543
+ name: "Chart",
544
+ status: "approved",
545
+ description: "Data visualization wrapper for Recharts",
546
+ imports: ["ChartContainer", "ChartTooltip", "ChartTooltipContent", "ChartLegend", "ChartLegendContent"]
547
+ },
548
+ // Interactive Components
549
+ Accordion: {
550
+ name: "Accordion",
551
+ status: "approved",
552
+ description: "Expandable content sections",
553
+ imports: ["Accordion", "AccordionItem", "AccordionTrigger", "AccordionContent"],
554
+ composition: ["AccordionItem", "AccordionTrigger", "AccordionContent"]
555
+ },
556
+ Collapsible: {
557
+ name: "Collapsible",
558
+ status: "approved",
559
+ description: "Single collapsible section",
560
+ imports: ["Collapsible", "CollapsibleTrigger", "CollapsibleContent"],
561
+ composition: ["CollapsibleTrigger", "CollapsibleContent"]
562
+ },
563
+ // Draft Components (not recommended for production)
564
+ Select: {
565
+ name: "Select",
566
+ status: "draft",
567
+ description: "Dropdown select - still being refined",
568
+ imports: [
569
+ "Select",
570
+ "SelectTrigger",
571
+ "SelectContent",
572
+ "SelectItem",
573
+ "SelectValue",
574
+ "SelectGroup",
575
+ "SelectLabel"
576
+ ]
577
+ },
578
+ Sonner: {
579
+ name: "Sonner",
580
+ status: "draft",
581
+ description: "Toast notifications - integration in progress",
582
+ imports: ["Toaster", "toast"]
583
+ },
584
+ Table: {
585
+ name: "Table",
586
+ status: "draft",
587
+ description: "Data table - needs more patterns",
588
+ imports: [
589
+ "Table",
590
+ "TableHeader",
591
+ "TableBody",
592
+ "TableFooter",
593
+ "TableHead",
594
+ "TableRow",
595
+ "TableCell",
596
+ "TableCaption"
597
+ ]
598
+ },
599
+ Textarea: {
600
+ name: "Textarea",
601
+ status: "draft",
602
+ description: "Multi-line text input - under review",
603
+ imports: ["Textarea"]
604
+ }
605
+ };
606
+ var approvedComponents = Object.entries(componentRegistry).filter(([_, meta]) => meta.status === "approved").map(([name]) => name);
607
+ var draftComponents = Object.entries(componentRegistry).filter(([_, meta]) => meta.status === "draft").map(([name]) => name);
608
+
609
+ // src/design-system/patterns/layout.ts
610
+ var layoutPatterns = {
611
+ page: {
612
+ /** Content area max width */
613
+ maxWidth: "max-w-4xl",
614
+ /** Wider content area (dashboards, tables) */
615
+ maxWidthWide: "max-w-6xl",
616
+ /** Page padding */
617
+ padding: "px-4 py-6",
618
+ /** Gap between major sections */
619
+ sectionGap: "space-y-8",
620
+ /** Main content wrapper */
621
+ wrapper: "mx-auto px-4 py-6"
622
+ },
623
+ cards: {
624
+ /** Standard card padding */
625
+ padding: "p-6",
626
+ /** Compact card padding */
627
+ paddingCompact: "p-4",
628
+ /** Gap between cards in grid */
629
+ gap: "gap-4",
630
+ /** 2-column responsive grid */
631
+ grid2col: "grid grid-cols-1 md:grid-cols-2 gap-4",
632
+ /** 3-column responsive grid */
633
+ grid3col: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
634
+ /** 4-column responsive grid */
635
+ grid4col: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
636
+ /** Stack of cards */
637
+ stack: "flex flex-col gap-4"
638
+ },
639
+ forms: {
640
+ /** Gap between form fields */
641
+ fieldGap: "space-y-4",
642
+ /** Gap between label and input */
643
+ labelGap: "mb-2",
644
+ /** Gap between input and helper text */
645
+ helperGap: "mt-1",
646
+ /** Gap between buttons in button group */
647
+ buttonGap: "gap-2",
648
+ /** Gap between form sections */
649
+ sectionGap: "space-y-6",
650
+ /** Form container */
651
+ container: "space-y-4",
652
+ /** Form actions row */
653
+ actions: "flex justify-end gap-2 pt-4",
654
+ /** Full-width form field */
655
+ fieldFull: "w-full",
656
+ /** Inline field pair */
657
+ fieldPair: "grid grid-cols-2 gap-4"
658
+ },
659
+ inline: {
660
+ /** Icon + text alignment */
661
+ iconText: "inline-flex items-center gap-2",
662
+ /** Badge group spacing */
663
+ badges: "flex flex-wrap gap-2",
664
+ /** Button group spacing */
665
+ buttons: "flex items-center gap-2",
666
+ /** Tag list */
667
+ tags: "flex flex-wrap gap-1"
668
+ },
669
+ header: {
670
+ /** Page header with title and actions */
671
+ pageHeader: "flex items-center justify-between mb-6",
672
+ /** Section header */
673
+ sectionHeader: "flex items-center justify-between mb-4",
674
+ /** Card header */
675
+ cardHeader: "flex items-center justify-between"
676
+ },
677
+ sidebar: {
678
+ /** Sidebar width */
679
+ width: "w-64",
680
+ /** Collapsed sidebar width */
681
+ widthCollapsed: "w-16",
682
+ /** Content area with sidebar */
683
+ contentWithSidebar: "ml-64",
684
+ /** Mobile: full width content */
685
+ contentMobile: "ml-0"
686
+ },
687
+ responsive: {
688
+ /** Hide on mobile, show on tablet+ */
689
+ hideMobile: "hidden md:block",
690
+ /** Show on mobile, hide on tablet+ */
691
+ showMobile: "md:hidden",
692
+ /** Stack on mobile, row on tablet+ */
693
+ stackToRow: "flex flex-col md:flex-row",
694
+ /** Full width on mobile, auto on tablet+ */
695
+ fullToAuto: "w-full md:w-auto"
696
+ }
697
+ };
698
+
699
+ // src/design-system/patterns/states.ts
700
+ var statePatterns = {
701
+ loading: {
702
+ /** Full page loading skeleton */
703
+ page: "Skeleton matching page structure",
704
+ /** Card loading skeleton */
705
+ card: "Skeleton matching card structure",
706
+ /** Button loading state */
707
+ button: {
708
+ icon: "Loader2",
709
+ text: "Loading...",
710
+ classes: "disabled opacity-50",
711
+ iconClasses: "animate-spin mr-2 h-4 w-4"
712
+ },
713
+ /** Inline loading spinner */
714
+ inline: {
715
+ icon: "Loader2",
716
+ classes: "animate-spin h-4 w-4"
717
+ },
718
+ /** Table row skeleton */
719
+ tableRow: "Skeleton h-12 w-full",
720
+ /** List item skeleton */
721
+ listItem: "Skeleton h-16 w-full",
722
+ /** Avatar skeleton */
723
+ avatar: "Skeleton h-10 w-10 rounded-full"
724
+ },
725
+ empty: {
726
+ /** Empty state container structure */
727
+ structure: "flex flex-col items-center justify-center py-12 text-center",
728
+ /** Empty state icon */
729
+ icon: {
730
+ classes: "h-12 w-12 text-muted-foreground mb-4",
731
+ note: "Use relevant lucide icon for context"
732
+ },
733
+ /** Empty state title */
734
+ title: {
735
+ classes: "headline-small mb-2"
736
+ },
737
+ /** Empty state description */
738
+ description: {
739
+ classes: "body-medium text-muted-foreground max-w-sm mx-auto mb-4"
740
+ },
741
+ /** Empty state action button */
742
+ action: {
743
+ variant: "outline",
744
+ note: "Optional - only if user can take action to fill empty state"
745
+ }
746
+ },
747
+ error: {
748
+ /** Full page error */
749
+ page: {
750
+ component: "Alert",
751
+ variant: "destructive",
752
+ includeRetry: true,
753
+ classes: "max-w-lg mx-auto my-8"
754
+ },
755
+ /** Inline error message */
756
+ inline: {
757
+ classes: "body-small text-destructive"
758
+ },
759
+ /** Form field error */
760
+ field: {
761
+ inputClasses: "border-destructive focus:ring-destructive",
762
+ messageClasses: "body-small text-destructive mt-1"
763
+ },
764
+ /** Error banner */
765
+ banner: {
766
+ component: "Alert",
767
+ variant: "destructive",
768
+ classes: "mb-4"
769
+ }
770
+ },
771
+ disabled: {
772
+ /** Disabled opacity */
773
+ opacity: "opacity-50",
774
+ /** Disabled cursor */
775
+ cursor: "cursor-not-allowed",
776
+ /** Prevent interaction */
777
+ interaction: "pointer-events-none",
778
+ /** Combined disabled classes */
779
+ combined: "opacity-50 cursor-not-allowed pointer-events-none"
780
+ },
781
+ success: {
782
+ /** Success toast */
783
+ toast: {
784
+ method: "toast.success",
785
+ duration: 3e3
786
+ },
787
+ /** Inline success message */
788
+ inline: {
789
+ classes: "body-small text-[var(--semantic-success500)]"
790
+ },
791
+ /** Success banner */
792
+ banner: {
793
+ component: "Alert",
794
+ variant: "default",
795
+ icon: "CheckCircle",
796
+ classes: "border-[var(--semantic-success500)] bg-green-50"
797
+ }
798
+ },
799
+ warning: {
800
+ /** Warning banner */
801
+ banner: {
802
+ component: "Alert",
803
+ variant: "warning",
804
+ icon: "AlertTriangle"
805
+ },
806
+ /** Inline warning */
807
+ inline: {
808
+ classes: "body-small text-[var(--colors-yellow-600)]"
809
+ }
810
+ }
811
+ };
812
+
813
+ // src/design-system/patterns/interactions.ts
814
+ var interactionPatterns = {
815
+ clickableCard: {
816
+ /** Default state */
817
+ default: "shadow-card transition-shadow duration-200",
818
+ /** Hover state */
819
+ hover: "hover:shadow-elevated",
820
+ /** Cursor */
821
+ cursor: "cursor-pointer",
822
+ /** Combined classes */
823
+ combined: "shadow-card hover:shadow-elevated cursor-pointer transition-shadow duration-200",
824
+ /** With border change */
825
+ withBorder: "border border-gray-200 hover:border-gray-300 cursor-pointer transition-colors"
826
+ },
827
+ link: {
828
+ /** Default link styling */
829
+ default: "text-[var(--colors-blue-400)] underline-offset-4",
830
+ /** Hover state */
831
+ hover: "hover:underline",
832
+ /** Combined classes */
833
+ combined: "text-[var(--colors-blue-400)] underline-offset-4 hover:underline",
834
+ /** Navigation link (no underline by default) */
835
+ nav: "text-[var(--colors-blue-400)] hover:underline underline-offset-4"
836
+ },
837
+ iconButton: {
838
+ /** Default state */
839
+ default: "p-2 rounded-md transition-colors",
840
+ /** Hover state */
841
+ hover: "hover:bg-muted",
842
+ /** Combined classes */
843
+ combined: "p-2 rounded-md hover:bg-muted transition-colors",
844
+ /** Destructive icon button */
845
+ destructive: "p-2 rounded-md hover:bg-destructive/10 hover:text-destructive transition-colors"
846
+ },
847
+ tableRow: {
848
+ /** Default state */
849
+ default: "transition-colors",
850
+ /** Hover state */
851
+ hover: "hover:bg-muted/50",
852
+ /** Combined classes */
853
+ combined: "hover:bg-muted/50 transition-colors",
854
+ /** Clickable row */
855
+ clickable: "hover:bg-muted/50 cursor-pointer transition-colors"
856
+ },
857
+ listItem: {
858
+ /** Default Item hover */
859
+ default: "transition-colors",
860
+ /** Hover state */
861
+ hover: "hover:bg-muted/50",
862
+ /** Active/selected state */
863
+ active: "bg-muted",
864
+ /** Combined for clickable items */
865
+ combined: "hover:bg-muted/50 cursor-pointer transition-colors"
866
+ },
867
+ button: {
868
+ /** Focus ring */
869
+ focus: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
870
+ /** Active/pressed state */
871
+ active: "active:scale-[0.98]",
872
+ /** Transition */
873
+ transition: "transition-colors"
874
+ },
875
+ input: {
876
+ /** Default state */
877
+ default: "border border-gray-200 transition-colors",
878
+ /** Hover state */
879
+ hover: "hover:border-gray-300",
880
+ /** Focus state */
881
+ focus: "focus:border-gray-900 focus:ring-2 focus:ring-gray-900/10",
882
+ /** Error state */
883
+ error: "border-destructive focus:border-destructive focus:ring-destructive/10",
884
+ /** Combined */
885
+ combined: "border border-gray-200 hover:border-gray-300 focus:border-gray-900 focus:ring-2 focus:ring-gray-900/10 transition-colors"
886
+ },
887
+ menuItem: {
888
+ /** Default state */
889
+ default: "transition-colors rounded-sm",
890
+ /** Hover/focus state */
891
+ hover: "hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
892
+ /** Combined classes */
893
+ combined: "hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground rounded-sm transition-colors"
894
+ },
895
+ sidebarItem: {
896
+ /** Default state */
897
+ default: "transition-colors rounded-md",
898
+ /** Hover state */
899
+ hover: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
900
+ /** Active/current page */
901
+ active: "bg-sidebar-accent text-sidebar-accent-foreground",
902
+ /** Combined */
903
+ combined: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground rounded-md transition-colors"
904
+ },
905
+ transitions: {
906
+ /** Fast transition (colors, opacity) */
907
+ fast: "transition-colors duration-150",
908
+ /** Medium transition (transform, shadow) */
909
+ medium: "transition-all duration-200",
910
+ /** Slow transition (layout) */
911
+ slow: "transition-all duration-300",
912
+ /** Ease functions */
913
+ ease: {
914
+ default: "ease-in-out",
915
+ in: "ease-in",
916
+ out: "ease-out",
917
+ bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
918
+ }
919
+ }
920
+ };
921
+
922
+ // src/design-system/patterns/charts.ts
923
+ var chartPatterns = {
924
+ /** Order of colors when assigning to data series */
925
+ colorPriority: ["chart-1", "chart-3", "chart-5", "chart-4", "chart-6", "chart-8"],
926
+ /** Rating distribution color mapping (5-star to 1-star) */
927
+ ratingDistribution: {
928
+ "5": "chart-3",
929
+ // Green - great
930
+ "4": "chart-1",
931
+ // Yellow - good
932
+ "3": "chart-4",
933
+ // Gray - neutral
934
+ "2": "chart-5",
935
+ // Red - poor
936
+ "1": "chart-5"
937
+ // Red - poor
938
+ },
939
+ /** Colors for positive/growth metrics */
940
+ positiveMetrics: ["chart-1", "chart-3", "chart-6"],
941
+ /** Colors for negative/decline metrics */
942
+ negativeMetrics: ["chart-5", "chart-4", "chart-8"],
943
+ /** Comparison pairs (e.g., this period vs last period) */
944
+ comparisonPairs: {
945
+ current: "chart-1",
946
+ previous: "chart-4"
947
+ },
948
+ /** Axis styling (Recharts) */
949
+ axisStyle: {
950
+ tickLine: false,
951
+ axisLine: false,
952
+ tick: {
953
+ fill: "hsl(var(--muted-foreground))",
954
+ fontSize: 12
955
+ },
956
+ tickMargin: 8
957
+ },
958
+ /** Y-axis specific */
959
+ yAxisStyle: {
960
+ tickLine: false,
961
+ axisLine: false,
962
+ tick: {
963
+ fill: "hsl(var(--muted-foreground))",
964
+ fontSize: 12
965
+ },
966
+ width: 40
967
+ },
968
+ /** X-axis specific */
969
+ xAxisStyle: {
970
+ tickLine: false,
971
+ axisLine: false,
972
+ tick: {
973
+ fill: "hsl(var(--muted-foreground))",
974
+ fontSize: 12
975
+ },
976
+ height: 40
977
+ },
978
+ /** Bar chart corner radius */
979
+ barRadius: [4, 4, 0, 0],
980
+ /** Grid styling */
981
+ gridStyle: {
982
+ stroke: "hsl(var(--border))",
983
+ strokeDasharray: "3 3"
984
+ },
985
+ /** Tooltip styling */
986
+ tooltipStyle: {
987
+ contentStyle: {
988
+ backgroundColor: "hsl(var(--popover))",
989
+ border: "1px solid hsl(var(--border))",
990
+ borderRadius: "6px",
991
+ boxShadow: "var(--card-shadow)"
992
+ },
993
+ labelStyle: {
994
+ fontWeight: 600,
995
+ marginBottom: 4
996
+ }
997
+ },
998
+ /** Legend styling */
999
+ legendStyle: {
1000
+ iconType: "circle",
1001
+ iconSize: 8,
1002
+ wrapperStyle: {
1003
+ paddingTop: 16
1004
+ }
1005
+ },
1006
+ /** Chart container sizing */
1007
+ containerSizing: {
1008
+ /** Small chart (sparkline, mini) */
1009
+ small: { height: 100 },
1010
+ /** Medium chart (card) */
1011
+ medium: { height: 200 },
1012
+ /** Large chart (main view) */
1013
+ large: { height: 300 },
1014
+ /** Full height (dashboard) */
1015
+ full: { height: 400 }
1016
+ },
1017
+ /** Margin presets */
1018
+ margins: {
1019
+ /** No labels */
1020
+ none: { top: 0, right: 0, bottom: 0, left: 0 },
1021
+ /** With axis labels */
1022
+ withAxis: { top: 10, right: 10, bottom: 30, left: 40 },
1023
+ /** With legend */
1024
+ withLegend: { top: 10, right: 10, bottom: 50, left: 40 }
1025
+ },
1026
+ /** Semantic data series names */
1027
+ semanticSeries: {
1028
+ revenue: { color: "chart-1", label: "Revenue" },
1029
+ growth: { color: "chart-3", label: "Growth" },
1030
+ decline: { color: "chart-5", label: "Decline" },
1031
+ baseline: { color: "chart-4", label: "Baseline" },
1032
+ target: { color: "chart-2", label: "Target" }
1033
+ }
1034
+ };
1035
+
1036
+ // src/design-system/patterns/modals.ts
1037
+ var modalPatterns = {
1038
+ sizes: {
1039
+ /** Small dialogs (simple confirm, single field) */
1040
+ small: "max-w-sm",
1041
+ /** Default dialogs (forms, content) */
1042
+ default: "max-w-lg",
1043
+ /** Large dialogs (complex forms, multi-step) */
1044
+ large: "max-w-2xl",
1045
+ /** Extra large (previews, rich content) */
1046
+ xl: "max-w-3xl",
1047
+ /** Full width (tables, complex layouts) */
1048
+ full: "max-w-4xl"
1049
+ },
1050
+ /** Header with icon (for important dialogs) */
1051
+ headerWithIcon: {
1052
+ /** Icon container base classes */
1053
+ iconContainer: "size-12 rounded-full flex items-center justify-center mb-4",
1054
+ /** Positive/success icon background */
1055
+ iconPositive: "bg-yellow-100 text-yellow-600",
1056
+ /** Info icon background */
1057
+ iconInfo: "bg-blue-100 text-blue-600",
1058
+ /** Destructive/warning icon background */
1059
+ iconDestructive: "bg-red-100 text-red-600",
1060
+ /** Success icon background */
1061
+ iconSuccess: "bg-green-100 text-green-600",
1062
+ /** Icon size inside container */
1063
+ iconSize: "h-6 w-6"
1064
+ },
1065
+ /** Footer patterns */
1066
+ footer: {
1067
+ /** Standard alignment */
1068
+ alignment: "flex justify-end gap-2",
1069
+ /** Cancel button comes first (left) */
1070
+ cancelFirst: true,
1071
+ /** Destructive actions */
1072
+ destructive: {
1073
+ cancelVariant: "outline",
1074
+ actionVariant: "destructive"
1075
+ },
1076
+ /** Standard actions */
1077
+ standard: {
1078
+ cancelVariant: "outline",
1079
+ actionVariant: "default"
1080
+ }
1081
+ },
1082
+ /** Mobile considerations */
1083
+ mobile: {
1084
+ /** Dialog content height constraint */
1085
+ dialogHeight: "max-h-[90vh] overflow-y-auto",
1086
+ /** Bottom sheet height */
1087
+ bottomSheetHeight: "h-auto max-h-[80vh]",
1088
+ /** Full screen dialog */
1089
+ fullScreen: "fixed inset-0 max-w-none rounded-none"
1090
+ },
1091
+ /** Sheet-specific patterns */
1092
+ sheet: {
1093
+ /** Right panel (default) - detail views */
1094
+ right: {
1095
+ side: "right",
1096
+ width: "w-[400px] sm:max-w-[540px]"
1097
+ },
1098
+ /** Left panel - mobile navigation */
1099
+ left: {
1100
+ side: "left",
1101
+ width: "w-[300px] sm:max-w-[400px]"
1102
+ },
1103
+ /** Bottom panel - mobile actions */
1104
+ bottom: {
1105
+ side: "bottom",
1106
+ height: "h-auto max-h-[80vh]",
1107
+ rounded: "rounded-t-xl"
1108
+ }
1109
+ },
1110
+ /** AlertDialog specific (destructive confirmations) */
1111
+ alertDialog: {
1112
+ /** Header: title + description only. NO icons, NO decoration */
1113
+ headerRule: "Title and description text only",
1114
+ /** Footer button order */
1115
+ buttonOrder: ["AlertDialogCancel", "AlertDialogAction"],
1116
+ /** Action button for destructive */
1117
+ destructiveAction: {
1118
+ variant: "destructive",
1119
+ text: "Delete"
1120
+ // or appropriate action verb
1121
+ },
1122
+ /** Standard messaging */
1123
+ messaging: {
1124
+ title: "Action verb + object (e.g., 'Delete this item?')",
1125
+ description: "Consequence explanation (e.g., 'This action cannot be undone.')"
1126
+ }
1127
+ },
1128
+ /** Common dialog content patterns */
1129
+ contentPatterns: {
1130
+ /** Form dialog */
1131
+ form: {
1132
+ spacing: "space-y-4",
1133
+ footerSpacing: "pt-4"
1134
+ },
1135
+ /** Confirmation dialog */
1136
+ confirmation: {
1137
+ textAlign: "text-center",
1138
+ spacing: "space-y-2"
1139
+ },
1140
+ /** Detail/preview dialog */
1141
+ detail: {
1142
+ maxHeight: "max-h-[70vh]",
1143
+ overflow: "overflow-y-auto"
1144
+ }
1145
+ },
1146
+ /** Animation timing */
1147
+ animation: {
1148
+ /** Dialog fade/scale */
1149
+ dialog: "duration-200",
1150
+ /** Sheet slide */
1151
+ sheet: "duration-300",
1152
+ /** Overlay fade */
1153
+ overlay: "duration-200"
1154
+ }
1155
+ };
1156
+
1157
+ // src/design-system/mappings/icons.ts
1158
+ var iconMappings = {
1159
+ /** Action icons - for buttons and interactive elements */
1160
+ actions: {
1161
+ edit: "Pencil",
1162
+ delete: "Trash2",
1163
+ add: "Plus",
1164
+ create: "Plus",
1165
+ close: "X",
1166
+ cancel: "X",
1167
+ menu: "MoreVertical",
1168
+ menuHorizontal: "MoreHorizontal",
1169
+ settings: "Settings",
1170
+ copy: "Copy",
1171
+ duplicate: "Copy",
1172
+ download: "Download",
1173
+ upload: "Upload",
1174
+ refresh: "RefreshCw",
1175
+ save: "Save",
1176
+ send: "Send",
1177
+ search: "Search",
1178
+ filter: "Filter",
1179
+ sort: "ArrowUpDown",
1180
+ archive: "Archive",
1181
+ restore: "ArchiveRestore",
1182
+ undo: "Undo2",
1183
+ redo: "Redo2",
1184
+ print: "Printer",
1185
+ export: "FileDown",
1186
+ import: "FileUp"
1187
+ },
1188
+ /** Navigation icons */
1189
+ navigation: {
1190
+ back: "ArrowLeft",
1191
+ forward: "ArrowRight",
1192
+ up: "ArrowUp",
1193
+ down: "ArrowDown",
1194
+ external: "ExternalLink",
1195
+ expand: "ChevronDown",
1196
+ collapse: "ChevronUp",
1197
+ chevronLeft: "ChevronLeft",
1198
+ chevronRight: "ChevronRight",
1199
+ home: "Home",
1200
+ menu: "Menu",
1201
+ sidebar: "PanelLeft",
1202
+ grid: "LayoutGrid",
1203
+ list: "List"
1204
+ },
1205
+ /** Status icons */
1206
+ status: {
1207
+ success: "CheckCircle",
1208
+ check: "Check",
1209
+ warning: "AlertTriangle",
1210
+ error: "AlertCircle",
1211
+ info: "Info",
1212
+ loading: "Loader2",
1213
+ pending: "Clock",
1214
+ scheduled: "CalendarClock",
1215
+ draft: "FileEdit",
1216
+ active: "CircleDot",
1217
+ inactive: "Circle",
1218
+ verified: "BadgeCheck",
1219
+ locked: "Lock",
1220
+ unlocked: "Unlock",
1221
+ visible: "Eye",
1222
+ hidden: "EyeOff"
1223
+ },
1224
+ /** Domain-specific icons */
1225
+ domain: {
1226
+ calendar: "Calendar",
1227
+ date: "Calendar",
1228
+ time: "Clock",
1229
+ location: "MapPin",
1230
+ address: "MapPin",
1231
+ team: "Users",
1232
+ user: "User",
1233
+ profile: "UserCircle",
1234
+ email: "Mail",
1235
+ phone: "Phone",
1236
+ money: "DollarSign",
1237
+ payment: "CreditCard",
1238
+ invoice: "Receipt",
1239
+ rating: "Star",
1240
+ favorite: "Heart",
1241
+ bookmark: "Bookmark",
1242
+ share: "Share2",
1243
+ link: "Link",
1244
+ attachment: "Paperclip",
1245
+ image: "Image",
1246
+ file: "File",
1247
+ folder: "Folder",
1248
+ document: "FileText",
1249
+ chart: "BarChart3",
1250
+ analytics: "TrendingUp",
1251
+ dashboard: "LayoutDashboard",
1252
+ notification: "Bell",
1253
+ message: "MessageSquare",
1254
+ comment: "MessageCircle",
1255
+ tag: "Tag",
1256
+ category: "Folder",
1257
+ partner: "Building2",
1258
+ company: "Building",
1259
+ store: "Store",
1260
+ product: "Package",
1261
+ inventory: "Boxes",
1262
+ order: "ShoppingCart",
1263
+ offer: "Ticket",
1264
+ event: "CalendarDays",
1265
+ campaign: "Megaphone"
1266
+ },
1267
+ /** Form icons */
1268
+ form: {
1269
+ required: "Asterisk",
1270
+ optional: "Circle",
1271
+ help: "HelpCircle",
1272
+ clear: "XCircle",
1273
+ show: "Eye",
1274
+ hide: "EyeOff",
1275
+ increment: "Plus",
1276
+ decrement: "Minus"
1277
+ },
1278
+ /** Empty state icons */
1279
+ emptyStates: {
1280
+ noData: "Inbox",
1281
+ noResults: "SearchX",
1282
+ noItems: "PackageOpen",
1283
+ noContent: "FileX",
1284
+ noAccess: "ShieldX",
1285
+ error: "AlertOctagon",
1286
+ maintenance: "Wrench",
1287
+ construction: "Construction"
1288
+ }
1289
+ };
1290
+ var getIcon = (category, key) => {
1291
+ const categoryIcons = iconMappings[category];
1292
+ return categoryIcons[key];
1293
+ };
1294
+
1295
+ // src/design-system/mappings/badges.ts
1296
+ var badgeMappings = {
1297
+ /** Status badge variants */
1298
+ status: {
1299
+ // Positive states
1300
+ active: "success",
1301
+ live: "success",
1302
+ complete: "success",
1303
+ completed: "success",
1304
+ approved: "success",
1305
+ verified: "success",
1306
+ published: "success",
1307
+ online: "success",
1308
+ // Pending/in-progress states
1309
+ pending: "warning",
1310
+ pendingReview: "warning",
1311
+ inReview: "warning",
1312
+ processing: "warning",
1313
+ scheduled: "warning",
1314
+ // Neutral/draft states
1315
+ draft: "secondary",
1316
+ inProgress: "secondary",
1317
+ paused: "secondary",
1318
+ inactive: "secondary",
1319
+ offline: "secondary",
1320
+ // Negative states
1321
+ error: "destructive",
1322
+ failed: "destructive",
1323
+ cancelled: "destructive",
1324
+ rejected: "destructive",
1325
+ expired: "destructive",
1326
+ overdue: "destructive",
1327
+ // Past/archived states
1328
+ archived: "outline",
1329
+ closed: "outline",
1330
+ ended: "outline",
1331
+ past: "outline"
1332
+ },
1333
+ /** Generic tag styling */
1334
+ tags: "outline",
1335
+ /** Premium/VIP styling (use CSS class, not Badge component) */
1336
+ premium: {
1337
+ className: "badge-premium",
1338
+ note: "Use badge-premium CSS class, not Badge component variant"
1339
+ },
1340
+ /** Badge with shadow for floating effect */
1341
+ floating: {
1342
+ additionalClass: "shadow-tag",
1343
+ note: "Add shadow-tag class to Badge for floating effect"
1344
+ }
1345
+ };
1346
+ var getBadgeVariant = (status) => {
1347
+ const normalizedStatus = status.toLowerCase().replace(/[\s-_]/g, "");
1348
+ const statusMap = badgeMappings.status;
1349
+ if (statusMap[normalizedStatus]) {
1350
+ return statusMap[normalizedStatus];
1351
+ }
1352
+ for (const [key, variant] of Object.entries(statusMap)) {
1353
+ if (normalizedStatus.includes(key.toLowerCase())) {
1354
+ return variant;
1355
+ }
1356
+ }
1357
+ return "secondary";
1358
+ };
1359
+ var statusLabels = {
1360
+ active: "Active",
1361
+ live: "Live",
1362
+ complete: "Complete",
1363
+ completed: "Completed",
1364
+ approved: "Approved",
1365
+ verified: "Verified",
1366
+ published: "Published",
1367
+ online: "Online",
1368
+ pending: "Pending",
1369
+ pendingReview: "Pending Review",
1370
+ inReview: "In Review",
1371
+ processing: "Processing",
1372
+ scheduled: "Scheduled",
1373
+ draft: "Draft",
1374
+ inProgress: "In Progress",
1375
+ paused: "Paused",
1376
+ inactive: "Inactive",
1377
+ offline: "Offline",
1378
+ error: "Error",
1379
+ failed: "Failed",
1380
+ cancelled: "Cancelled",
1381
+ rejected: "Rejected",
1382
+ expired: "Expired",
1383
+ overdue: "Overdue",
1384
+ archived: "Archived",
1385
+ closed: "Closed",
1386
+ ended: "Ended",
1387
+ past: "Past"
1388
+ };
1389
+
1390
+ // src/design-system/index.ts
1391
+ var offlineDesignSystem = {
1392
+ /** Package metadata */
1393
+ meta: {
1394
+ name: "@offlinemediainc/offline-ui",
1395
+ version: "0.2.0",
1396
+ description: "Offline Media Design System - LLM-friendly design decisions and patterns"
1397
+ },
1398
+ /** Quick reference for most common decisions */
1399
+ quickReference: {
1400
+ colors: {
1401
+ primary: "#191919 (gray-900) - buttons, text, UI elements",
1402
+ accent: "#de8e0f (yellow-400) - ACCENT ONLY, never buttons",
1403
+ link: "#004fff (blue-400) - clickable text only",
1404
+ success: "#099250 (chart-3) - positive feedback",
1405
+ error: "#d31a0c (chart-5) - errors, destructive"
1406
+ },
1407
+ fonts: {
1408
+ display: "Cabinet Grotesk - hero headlines only",
1409
+ body: "Satoshi - everything else",
1410
+ mono: "DM Mono - stats and numbers"
1411
+ },
1412
+ shadows: {
1413
+ card: "shadow-card - default for containers",
1414
+ floating: "shadow-tag - floating badges",
1415
+ modal: "shadow-elevated - dialogs, popovers"
1416
+ },
1417
+ components: {
1418
+ formModal: "Dialog",
1419
+ destructiveConfirm: "AlertDialog",
1420
+ sidePanel: "Sheet side=right",
1421
+ listItem: "Item",
1422
+ toast: "toast.success / toast.error"
1423
+ }
1424
+ },
1425
+ /** Semantic color and typography mappings */
1426
+ semantics: {
1427
+ colors: semanticColors,
1428
+ colorHexValues,
1429
+ typography: typographyDecisions,
1430
+ fontFamilies: fontFamilyDecisions,
1431
+ typographyScale
1432
+ },
1433
+ /** Component decisions and metadata */
1434
+ components: {
1435
+ decisions: componentDecisions,
1436
+ registry: componentRegistry,
1437
+ approved: approvedComponents,
1438
+ draft: draftComponents
1439
+ },
1440
+ /** Layout, state, and interaction patterns */
1441
+ patterns: {
1442
+ layout: layoutPatterns,
1443
+ states: statePatterns,
1444
+ interactions: interactionPatterns,
1445
+ charts: chartPatterns,
1446
+ modals: modalPatterns
1447
+ },
1448
+ /** Icon and badge mappings */
1449
+ mappings: {
1450
+ icons: iconMappings,
1451
+ badges: badgeMappings,
1452
+ statusLabels
1453
+ },
1454
+ /** Design rules and anti-patterns */
1455
+ rules: {
1456
+ critical: [
1457
+ "NEVER use yellow (#de8e0f) for buttons - yellow is accent only",
1458
+ "Blue (#004fff) is ONLY for clickable text links",
1459
+ "AlertDialog headers: title + description only, NO icons or decoration",
1460
+ "Icon-only buttons MUST have aria-label",
1461
+ "Inputs MUST be paired with Label using htmlFor"
1462
+ ],
1463
+ guidelines: [
1464
+ "Use CSS variables instead of hardcoded hex values",
1465
+ "Match shadow level to element importance: card < tag < elevated",
1466
+ "Use Cabinet Grotesk (display-*) sparingly for hero headlines",
1467
+ "Use stat-mono for numerical data and statistics",
1468
+ "Add max-h-[90vh] overflow-y-auto to Dialog for mobile"
1469
+ ],
1470
+ antiPatterns: [
1471
+ { bad: "Yellow buttons", fix: "Use Button variant='default' (black)" },
1472
+ { bad: "Home icon in breadcrumb", fix: "Use 'Home' text instead" },
1473
+ { bad: "Decorated AlertDialog headers", fix: "Title + description only" },
1474
+ { bad: "Missing input labels", fix: "Always pair Input with Label htmlFor" },
1475
+ { bad: "Hardcoded colors", fix: "Use CSS variables or semantic classes" },
1476
+ { bad: "Overusing premium styling", fix: "Reserve for actual premium content" }
1477
+ ]
1478
+ }
1479
+ };
1480
+
1481
+ exports.__objRest = __objRest;
1482
+ exports.__spreadProps = __spreadProps;
1483
+ exports.__spreadValues = __spreadValues;
1484
+ exports.approvedComponents = approvedComponents;
1485
+ exports.badgeMappings = badgeMappings;
1486
+ exports.chartPatterns = chartPatterns;
1487
+ exports.colorHexValues = colorHexValues;
1488
+ exports.componentDecisions = componentDecisions;
1489
+ exports.componentRegistry = componentRegistry;
1490
+ exports.draftComponents = draftComponents;
1491
+ exports.fontFamilyDecisions = fontFamilyDecisions;
1492
+ exports.getBadgeVariant = getBadgeVariant;
1493
+ exports.getIcon = getIcon;
1494
+ exports.iconMappings = iconMappings;
1495
+ exports.interactionPatterns = interactionPatterns;
1496
+ exports.layoutPatterns = layoutPatterns;
1497
+ exports.modalPatterns = modalPatterns;
1498
+ exports.offlineDesignSystem = offlineDesignSystem;
1499
+ exports.semanticColors = semanticColors;
1500
+ exports.statePatterns = statePatterns;
1501
+ exports.statusLabels = statusLabels;
1502
+ exports.typographyDecisions = typographyDecisions;
1503
+ exports.typographyScale = typographyScale;
1504
+ //# sourceMappingURL=chunk-XOGYSEME.cjs.map
1505
+ //# sourceMappingURL=chunk-XOGYSEME.cjs.map