@syscore/ui-library 1.1.10 → 1.1.11

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 (100) hide show
  1. package/client/App.tsx +47 -0
  2. package/client/components/icons/ConceptIcons.tsx +667 -0
  3. package/client/components/icons/NavAccount.tsx +31 -0
  4. package/client/components/icons/NavBullet.tsx +19 -0
  5. package/client/components/icons/NavLogo.tsx +36 -0
  6. package/client/components/icons/ProviderBadges.tsx +295 -0
  7. package/client/components/icons/ProviderSeals.tsx +319 -0
  8. package/client/components/icons/SealHealthSafetyRating.tsx +65 -0
  9. package/client/components/icons/SealIwbiMember.tsx +86 -0
  10. package/client/components/icons/SealWell.tsx +84 -0
  11. package/client/components/icons/SealWellCertification.tsx +138 -0
  12. package/client/components/icons/SealWellCommunity.tsx +122 -0
  13. package/client/components/icons/SealWellResidence.tsx +122 -0
  14. package/client/components/icons/SealWorksWithWell.tsx +140 -0
  15. package/client/components/icons/UtilityAccordion.tsx +21 -0
  16. package/client/components/icons/UtilityChevronDown.tsx +36 -0
  17. package/client/components/icons/UtilityClassification.tsx +45 -0
  18. package/client/components/icons/UtilityClose.tsx +41 -0
  19. package/client/components/icons/UtilityDrag.tsx +69 -0
  20. package/client/components/icons/UtilityEdit.tsx +42 -0
  21. package/client/components/icons/UtilityOptions.tsx +45 -0
  22. package/client/components/icons/UtilityPortfolio.tsx +87 -0
  23. package/client/components/icons/UtilityReset.tsx +41 -0
  24. package/client/components/icons/UtilityScoring.tsx +43 -0
  25. package/client/components/icons/UtilitySearch.tsx +38 -0
  26. package/client/components/icons/UtilitySort.tsx +52 -0
  27. package/client/components/icons/UtilityText.tsx +34 -0
  28. package/client/components/icons/WaterMarkWWWProducts.tsx +26 -0
  29. package/client/components/icons/WaterMarkWellProjects.tsx +30 -0
  30. package/client/components/icons/WatermarkMemberOrg.tsx +59 -0
  31. package/client/components/icons/WellSeal.tsx +79 -0
  32. package/client/components/icons/X.tsx +35 -0
  33. package/client/hooks/UseTabs.tsx +35 -0
  34. package/client/hooks/use-mobile.tsx +21 -0
  35. package/client/hooks/use-segmented-control.ts +42 -0
  36. package/client/hooks/use-toast.ts +188 -0
  37. package/client/pages/Index.tsx +88 -0
  38. package/client/pages/NotFound.tsx +29 -0
  39. package/client/ui/Accordion/Accordion.stories.tsx +74 -0
  40. package/client/ui/Alert/Alert.stories.tsx +82 -0
  41. package/client/ui/AlertDialog/AlertDialog.stories.tsx +106 -0
  42. package/client/ui/AspectRatio.stories.tsx +78 -0
  43. package/client/ui/Avatar/Avatar.stories.tsx +94 -0
  44. package/client/ui/Badge/Badge.stories.tsx +60 -0
  45. package/client/ui/Breadcrumb/Breadcrumb.stories.tsx +97 -0
  46. package/client/ui/Button.stories.tsx +429 -0
  47. package/client/ui/Calendar/Calendar.stories.tsx +99 -0
  48. package/client/ui/Card.stories.tsx +84 -0
  49. package/client/ui/Carousel/Carousel.stories.tsx +85 -0
  50. package/client/ui/Chart/Chart.stories.tsx +58 -0
  51. package/client/ui/Checkbox/Checkbox.stories.tsx +112 -0
  52. package/client/ui/Collapsible/Collapsible.stories.tsx +101 -0
  53. package/client/ui/Colors.stories.tsx +1041 -0
  54. package/client/ui/Command/Command.stories.tsx +97 -0
  55. package/client/ui/ContextMenu/ContextMenu.stories.tsx +74 -0
  56. package/client/ui/Dialog.stories.tsx +69 -0
  57. package/client/ui/Drawer/Drawer.stories.tsx +87 -0
  58. package/client/ui/DropdownMenu/DropdownMenu.stories.tsx +139 -0
  59. package/client/ui/Form/Form.stories.tsx +74 -0
  60. package/client/ui/HoverCard/HoverCard.stories.tsx +94 -0
  61. package/client/ui/Icons.stories.tsx +328 -0
  62. package/client/ui/Input/Input.stories.tsx +69 -0
  63. package/client/ui/InputOTP/InputOTP.stories.tsx +85 -0
  64. package/client/ui/Label.stories.tsx +66 -0
  65. package/client/ui/Menubar/Menubar.stories.tsx +88 -0
  66. package/client/ui/Navigation.stories.tsx +57 -0
  67. package/client/ui/NavigationMenu/NavigationMenu.stories.tsx +106 -0
  68. package/client/ui/Pagination/Pagination.stories.tsx +115 -0
  69. package/client/ui/Popover/Popover.stories.tsx +99 -0
  70. package/client/ui/Progress/Progress.stories.tsx +63 -0
  71. package/client/ui/RadioGroup/RadioGroup.stories.tsx +110 -0
  72. package/client/ui/Resizable/Resizable.stories.tsx +88 -0
  73. package/client/ui/ScrollArea/ScrollArea.stories.tsx +64 -0
  74. package/client/ui/SearchField.stories.tsx +63 -0
  75. package/client/ui/Select/Select.stories.tsx +111 -0
  76. package/client/ui/Separator/Separator.stories.tsx +67 -0
  77. package/client/ui/Sheet/Sheet.stories.tsx +138 -0
  78. package/client/ui/Sidebar/Sidebar.stories.tsx +92 -0
  79. package/client/ui/Skeleton/Skeleton.stories.tsx +65 -0
  80. package/client/ui/Slider/Slider.stories.tsx +101 -0
  81. package/client/ui/Sonner/Sonner.stories.tsx +48 -0
  82. package/client/ui/StrategyTable.stories.tsx +138 -0
  83. package/client/ui/Switch/Switch.stories.tsx +96 -0
  84. package/client/ui/Table/Table.stories.tsx +135 -0
  85. package/client/ui/Tabs.stories.tsx +33 -0
  86. package/client/ui/Tag.stories.tsx +190 -0
  87. package/client/ui/Textarea/Textarea.stories.tsx +56 -0
  88. package/client/ui/Toast/Toast.stories.tsx +76 -0
  89. package/client/ui/Toaster/Toaster.stories.tsx +52 -0
  90. package/client/ui/Toggle.stories.tsx +248 -0
  91. package/client/ui/ToggleGroup/ToggleGroup.stories.tsx +88 -0
  92. package/client/ui/Tooltip.stories.tsx +72 -0
  93. package/client/ui/Typography.stories.tsx +421 -0
  94. package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +115 -0
  95. package/client/ui/WELLDashboard/index.tsx +221 -0
  96. package/client/vite-env.d.ts +1 -0
  97. package/dist/ui/index.cjs.js +1 -1
  98. package/dist/ui/index.d.ts +1 -0
  99. package/dist/ui/index.es.js +163 -1
  100. package/package.json +2 -1
@@ -0,0 +1,221 @@
1
+ import * as React from "react";
2
+ import { cn } from "../../lib/utils";
3
+ import { Building2 } from "lucide-react";
4
+
5
+ interface CertificationLevel {
6
+ name: string;
7
+ locations: number;
8
+ color: string;
9
+ icon?: string;
10
+ }
11
+
12
+ interface RatingCategory {
13
+ name: string;
14
+ locations: number | string;
15
+ color: string;
16
+ percentage: number;
17
+ icon?: string;
18
+ inactive?: boolean;
19
+ }
20
+
21
+ export interface WELLDashboardProps {
22
+ certifiedPercentage?: number;
23
+ certifications?: CertificationLevel[];
24
+ ratings?: RatingCategory[];
25
+ className?: string;
26
+ }
27
+
28
+ const defaultCertifications: CertificationLevel[] = [
29
+ { name: "Platinum", locations: 1, color: "#A8A7AE", icon: "platinum" },
30
+ { name: "Gold", locations: 1, color: "#D7C686", icon: "gold" },
31
+ { name: "Silver", locations: 1, color: "#C0C2C4", icon: "silver" },
32
+ { name: "Bronze", locations: 1, color: "#D1A778", icon: "bronze" },
33
+ { name: "Precertified", locations: 1, color: "#44B0BC", icon: "precertified" },
34
+ ];
35
+
36
+ const defaultRatings: RatingCategory[] = [
37
+ { name: "Health-Safety", locations: 1, color: "#7FB3DC", percentage: 50, icon: "health" },
38
+ { name: "Equity", locations: 1, color: "#41937D", percentage: 67, icon: "equity" },
39
+ { name: "Performance", locations: "Not Pursued", color: "#0B667F", percentage: 2, icon: "performance", inactive: true },
40
+ { name: "Coworking", locations: "Not Pursued", color: "#AD7DA3", percentage: 2, icon: "coworking", inactive: true },
41
+ ];
42
+
43
+ export const WELLDashboard = React.forwardRef<HTMLDivElement, WELLDashboardProps>(
44
+ ({ certifiedPercentage = 60, certifications = defaultCertifications, ratings = defaultRatings, className }, ref) => {
45
+ return (
46
+ <div ref={ref} className={cn("flex flex-col gap-4", className)}>
47
+ <div className="flex flex-col lg:flex-row gap-4">
48
+ {/* WELL Certified Locations Card */}
49
+ <div className="flex-1 min-w-0 rounded-md border border-[#DEDEE5] bg-white/0 p-4 shadow-xs">
50
+ <h2 className="text-xl font-medium text-[#3D3E46] text-center mb-6" style={{ fontFamily: "'DM Sans', sans-serif" }}>
51
+ WELL Certified Locations
52
+ </h2>
53
+
54
+ <div className="flex flex-col md:flex-row justify-center items-center gap-10">
55
+ {/* Circular Progress Chart */}
56
+ <div className="relative w-60 h-60 shrink-0">
57
+ <svg width="240" height="240" viewBox="0 0 240 240" className="transform -rotate-90">
58
+ {/* Background circle */}
59
+ <circle cx="120" cy="120" r="120" fill="#F5F9FB" />
60
+
61
+ {/* Progress segments */}
62
+ <circle
63
+ cx="120"
64
+ cy="120"
65
+ r="100"
66
+ fill="none"
67
+ stroke="#327DB9"
68
+ strokeWidth="20"
69
+ strokeDasharray={`${(certifiedPercentage / 100) * 628} 628`}
70
+ strokeLinecap="round"
71
+ />
72
+
73
+ {/* Certification level arcs */}
74
+ {certifications.map((cert, index) => {
75
+ const totalSegments = certifications.length;
76
+ const segmentAngle = (certifiedPercentage / 100) * 360 / totalSegments;
77
+ const startAngle = index * segmentAngle;
78
+ const arcLength = (segmentAngle * Math.PI * 100) / 180;
79
+ const offset = (startAngle * Math.PI * 100) / 180;
80
+
81
+ return (
82
+ <circle
83
+ key={cert.name}
84
+ cx="120"
85
+ cy="120"
86
+ r="100"
87
+ fill="none"
88
+ stroke={cert.color}
89
+ strokeWidth="20"
90
+ strokeDasharray={`${arcLength} 628`}
91
+ strokeDashoffset={-offset}
92
+ opacity="0.7"
93
+ />
94
+ );
95
+ })}
96
+
97
+ {/* Inner white circle */}
98
+ <circle cx="120" cy="120" r="80" fill="white" filter="drop-shadow(0 0 16px rgba(0,0,0,0.04))" />
99
+ </svg>
100
+
101
+ {/* Center text */}
102
+ <div className="absolute inset-0 flex flex-col items-center justify-center">
103
+ <div className="text-5xl font-medium text-[#327DB9]" style={{ fontFamily: "'DM Sans', sans-serif" }}>
104
+ {certifiedPercentage}%
105
+ </div>
106
+ <div className="text-sm font-medium text-[#78777F] mt-1" style={{ fontFamily: "'DM Sans', sans-serif" }}>
107
+ Certified
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+ {/* Legend */}
113
+ <div className="flex flex-col gap-4 min-w-[160px]">
114
+ {certifications.map((cert) => (
115
+ <div key={cert.name} className="flex items-center gap-2">
116
+ <div
117
+ className="w-10 h-10 rounded-full shrink-0 flex items-center justify-center"
118
+ style={{ backgroundColor: cert.color }}
119
+ >
120
+ {cert.icon === "precertified" && (
121
+ <div className="w-9 h-6 bg-[#44B0BC] rounded-sm flex items-center justify-center text-white text-[10px] font-bold">
122
+ WELL
123
+ </div>
124
+ )}
125
+ </div>
126
+ <div className="flex flex-col gap-0.5 flex-1">
127
+ <div className="text-base font-medium text-[#3D3E46]" style={{ fontFamily: "'DM Sans', sans-serif" }}>
128
+ {cert.name}
129
+ </div>
130
+ <div className="flex items-center gap-1">
131
+ <Building2 size={16} className="text-[#327DB9]" strokeWidth={1.2} />
132
+ <span className="text-xs font-medium text-[#327DB9]" style={{ fontFamily: "'DM Sans', sans-serif" }}>
133
+ {cert.locations} Location{cert.locations !== 1 ? 's' : ''}
134
+ </span>
135
+ </div>
136
+ </div>
137
+ </div>
138
+ ))}
139
+ </div>
140
+ </div>
141
+ </div>
142
+
143
+ {/* WELL Rated Locations Card */}
144
+ <div className="flex-1 min-w-0 rounded-md border border-[#DEDEE5] bg-white/0 p-4 shadow-xs">
145
+ <h2 className="text-xl font-medium text-[#3D3E46] text-center mb-6" style={{ fontFamily: "'DM Sans', sans-serif" }}>
146
+ WELL Rated Locations
147
+ </h2>
148
+
149
+ <div className="flex flex-col md:flex-row justify-center items-center gap-10">
150
+ {/* Bar Chart */}
151
+ <div className="flex items-end gap-4 h-60 px-4">
152
+ {ratings.map((rating) => (
153
+ <div key={rating.name} className="w-10 h-60 relative">
154
+ {/* Background */}
155
+ <div className="absolute inset-0 rounded-t border border-[#DEDEE5] bg-[#F5F9FB]" />
156
+ {/* Bar */}
157
+ <div
158
+ className="absolute bottom-0 left-0 right-0 rounded-t transition-all"
159
+ style={{
160
+ backgroundColor: rating.color,
161
+ height: `${rating.percentage}%`,
162
+ }}
163
+ />
164
+ </div>
165
+ ))}
166
+ {/* Y-axis */}
167
+ <div className="w-px h-60 bg-[#DEDEE5]" />
168
+ </div>
169
+
170
+ {/* Legend */}
171
+ <div className="flex flex-col gap-4 min-w-[160px]">
172
+ {ratings.map((rating) => (
173
+ <div
174
+ key={rating.name}
175
+ className={cn("flex items-center gap-2", rating.inactive && "opacity-50")}
176
+ >
177
+ <div
178
+ className="w-10 h-10 rounded-full shrink-0 flex items-center justify-center"
179
+ style={{ backgroundColor: rating.color }}
180
+ />
181
+ <div className="flex flex-col gap-0.5 flex-1">
182
+ <div className="text-base font-medium text-[#3D3E46]" style={{ fontFamily: "'DM Sans', sans-serif" }}>
183
+ {rating.name}
184
+ </div>
185
+ <div className="flex items-center gap-1">
186
+ <Building2
187
+ size={16}
188
+ className={rating.inactive ? "text-[#78777F]" : "text-[#327DB9]"}
189
+ strokeWidth={1.2}
190
+ />
191
+ <span
192
+ className={cn(
193
+ "text-xs font-medium",
194
+ rating.inactive ? "text-[#78777F]" : "text-[#327DB9]"
195
+ )}
196
+ style={{ fontFamily: "'DM Sans', sans-serif" }}
197
+ >
198
+ {typeof rating.locations === 'number'
199
+ ? `${rating.locations} Location${rating.locations !== 1 ? 's' : ''}`
200
+ : rating.locations
201
+ }
202
+ </span>
203
+ </div>
204
+ </div>
205
+ </div>
206
+ ))}
207
+ </div>
208
+ </div>
209
+ </div>
210
+ </div>
211
+
212
+ {/* Footer note */}
213
+ <p className="text-[10px] leading-3 font-medium text-[#78777F] text-center" style={{ fontFamily: "'DM Sans', sans-serif" }}>
214
+ Achievement metrics reflect all active program achievements, as of {new Date().toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' })}
215
+ </p>
216
+ </div>
217
+ );
218
+ }
219
+ );
220
+
221
+ WELLDashboard.displayName = "WELLDashboard";
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />