@syscore/ui-library 1.1.13 → 1.2.1

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 (87) hide show
  1. package/client/components/ui/accordion.tsx +6 -9
  2. package/client/components/ui/alert-dialog.tsx +6 -19
  3. package/client/components/ui/alert.tsx +5 -6
  4. package/client/components/ui/avatar.tsx +3 -9
  5. package/client/components/ui/badge.tsx +5 -8
  6. package/client/components/ui/breadcrumb.tsx +7 -16
  7. package/client/components/ui/button.tsx +17 -45
  8. package/client/components/ui/calendar.tsx +24 -28
  9. package/client/components/ui/card.tsx +6 -9
  10. package/client/components/ui/carousel.tsx +14 -14
  11. package/client/components/ui/chart.tsx +25 -28
  12. package/client/components/ui/checkbox.tsx +3 -8
  13. package/client/components/ui/code-badge.tsx +1 -4
  14. package/client/components/ui/command.tsx +12 -48
  15. package/client/components/ui/context-menu.tsx +17 -32
  16. package/client/components/ui/dialog.tsx +9 -18
  17. package/client/components/ui/drawer.tsx +7 -13
  18. package/client/components/ui/dropdown-menu.tsx +17 -29
  19. package/client/components/ui/form.tsx +4 -4
  20. package/client/components/ui/hover-card.tsx +1 -4
  21. package/client/components/ui/input-otp.tsx +7 -10
  22. package/client/components/ui/input.tsx +4 -23
  23. package/client/components/ui/label.tsx +1 -3
  24. package/client/components/ui/menubar.tsx +19 -40
  25. package/client/components/ui/navigation-menu.tsx +10 -27
  26. package/client/components/ui/navigation.tsx +193 -331
  27. package/client/components/ui/pagination.tsx +8 -8
  28. package/client/components/ui/popover.tsx +1 -4
  29. package/client/components/ui/progress.tsx +2 -5
  30. package/client/components/ui/radio-group.tsx +4 -7
  31. package/client/components/ui/resizable.tsx +4 -10
  32. package/client/components/ui/scroll-area.tsx +5 -8
  33. package/client/components/ui/search.tsx +7 -10
  34. package/client/components/ui/select.tsx +11 -36
  35. package/client/components/ui/separator.tsx +2 -2
  36. package/client/components/ui/sheet.tsx +12 -23
  37. package/client/components/ui/sidebar.tsx +55 -82
  38. package/client/components/ui/skeleton.tsx +1 -1
  39. package/client/components/ui/slider.tsx +4 -7
  40. package/client/components/ui/sonner.tsx +5 -8
  41. package/client/components/ui/switch.tsx +2 -9
  42. package/client/components/ui/table.tsx +9 -18
  43. package/client/components/ui/tabs.tsx +19 -28
  44. package/client/components/ui/tag.tsx +6 -66
  45. package/client/components/ui/textarea.tsx +1 -4
  46. package/client/components/ui/toast.tsx +9 -19
  47. package/client/components/ui/toaster.tsx +1 -1
  48. package/client/components/ui/toggle-group.tsx +4 -4
  49. package/client/components/ui/toggle.tsx +13 -13
  50. package/client/components/ui/tooltip.tsx +12 -15
  51. package/client/global.css +5419 -1054
  52. package/client/storybook.css +1164 -0
  53. package/dist/index.cjs.js +1 -0
  54. package/dist/{ui/index.d.ts → index.d.ts} +0 -1
  55. package/dist/index.es.js +4552 -0
  56. package/dist/ui-library.css +1 -0
  57. package/package.json +9 -12
  58. package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +0 -115
  59. package/client/ui/WELLDashboard/index.tsx +0 -317
  60. package/dist/ui/index.cjs.js +0 -1
  61. package/dist/ui/index.es.js +0 -5502
  62. package/tailwind.preset.ts +0 -151
  63. /package/dist/{ui/favicon.ico → favicon.ico} +0 -0
  64. /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.otf +0 -0
  65. /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.ttf +0 -0
  66. /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.woff +0 -0
  67. /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.woff2 +0 -0
  68. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-black.otf +0 -0
  69. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-blackitalic.otf +0 -0
  70. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-bold.otf +0 -0
  71. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-bolditalic.otf +0 -0
  72. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extrabold.otf +0 -0
  73. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extrabolditalic.otf +0 -0
  74. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extralight.otf +0 -0
  75. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extralightitalic.otf +0 -0
  76. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-italic.otf +0 -0
  77. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-light.otf +0 -0
  78. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-lightitalic.otf +0 -0
  79. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-medium.otf +0 -0
  80. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-mediumitalic.otf +0 -0
  81. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-regular.otf +0 -0
  82. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-semibold.otf +0 -0
  83. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-semibolditalic.otf +0 -0
  84. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-thin.otf +0 -0
  85. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-thinitalic.otf +0 -0
  86. /package/dist/{ui/placeholder.svg → placeholder.svg} +0 -0
  87. /package/dist/{ui/robots.txt → robots.txt} +0 -0
@@ -1,317 +0,0 @@
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
- {
34
- name: "Precertified",
35
- locations: 1,
36
- color: "#44B0BC",
37
- icon: "precertified",
38
- },
39
- ];
40
-
41
- const defaultRatings: RatingCategory[] = [
42
- {
43
- name: "Health-Safety",
44
- locations: 1,
45
- color: "#7FB3DC",
46
- percentage: 50,
47
- icon: "health",
48
- },
49
- {
50
- name: "Equity",
51
- locations: 1,
52
- color: "#41937D",
53
- percentage: 67,
54
- icon: "equity",
55
- },
56
- {
57
- name: "Performance",
58
- locations: "Not Pursued",
59
- color: "#0B667F",
60
- percentage: 2,
61
- icon: "performance",
62
- inactive: true,
63
- },
64
- {
65
- name: "Coworking",
66
- locations: "Not Pursued",
67
- color: "#AD7DA3",
68
- percentage: 2,
69
- icon: "coworking",
70
- inactive: true,
71
- },
72
- ];
73
-
74
- export const WELLDashboard = React.forwardRef<
75
- HTMLDivElement,
76
- WELLDashboardProps
77
- >(
78
- (
79
- {
80
- certifiedPercentage = 60,
81
- certifications = defaultCertifications,
82
- ratings = defaultRatings,
83
- className,
84
- },
85
- ref,
86
- ) => {
87
- return (
88
- <div ref={ref} className={cn("flex flex-col gap-4", className)}>
89
- <div className="flex flex-col lg:flex-row gap-4">
90
- {/* WELL Certified Locations Card */}
91
- <div className="flex-1 min-w-0 rounded-md border border-[#DEDEE5] bg-white/0 p-4 shadow-xs">
92
- <h2
93
- className="text-xl font-medium text-[#3D3E46] text-center mb-6"
94
- style={{ fontFamily: "'DM Sans', sans-serif" }}
95
- >
96
- WELL Certified Locations
97
- </h2>
98
-
99
- <div className="flex flex-col md:flex-row justify-center items-center gap-10">
100
- {/* Circular Progress Chart */}
101
- <div className="relative w-60 h-60 shrink-0">
102
- <svg
103
- width="240"
104
- height="240"
105
- viewBox="0 0 240 240"
106
- className="transform -rotate-90"
107
- >
108
- {/* Background circle */}
109
- <circle cx="120" cy="120" r="120" fill="#F5F9FB" />
110
-
111
- {/* Progress segments */}
112
- <circle
113
- cx="120"
114
- cy="120"
115
- r="100"
116
- fill="none"
117
- stroke="#327DB9"
118
- strokeWidth="20"
119
- strokeDasharray={`${(certifiedPercentage / 100) * 628} 628`}
120
- strokeLinecap="round"
121
- />
122
-
123
- {/* Certification level arcs */}
124
- {certifications.map((cert, index) => {
125
- const totalSegments = certifications.length;
126
- const segmentAngle =
127
- ((certifiedPercentage / 100) * 360) / totalSegments;
128
- const startAngle = index * segmentAngle;
129
- const arcLength = (segmentAngle * Math.PI * 100) / 180;
130
- const offset = (startAngle * Math.PI * 100) / 180;
131
-
132
- return (
133
- <circle
134
- key={cert.name}
135
- cx="120"
136
- cy="120"
137
- r="100"
138
- fill="none"
139
- stroke={cert.color}
140
- strokeWidth="20"
141
- strokeDasharray={`${arcLength} 628`}
142
- strokeDashoffset={-offset}
143
- opacity="0.7"
144
- />
145
- );
146
- })}
147
-
148
- {/* Inner white circle */}
149
- <circle
150
- cx="120"
151
- cy="120"
152
- r="80"
153
- fill="white"
154
- filter="drop-shadow(0 0 16px rgba(0,0,0,0.04))"
155
- />
156
- </svg>
157
-
158
- {/* Center text */}
159
- <div className="absolute inset-0 flex flex-col items-center justify-center">
160
- <div
161
- className="text-5xl font-medium text-[#327DB9]"
162
- style={{ fontFamily: "'DM Sans', sans-serif" }}
163
- >
164
- {certifiedPercentage}%
165
- </div>
166
- <div
167
- className="text-sm font-medium text-[#78777F] mt-1"
168
- style={{ fontFamily: "'DM Sans', sans-serif" }}
169
- >
170
- Certified
171
- </div>
172
- </div>
173
- </div>
174
-
175
- {/* Legend */}
176
- <div className="flex flex-col gap-4 min-w-[160px]">
177
- {certifications.map((cert) => (
178
- <div key={cert.name} className="flex items-center gap-2">
179
- <div
180
- className="w-10 h-10 rounded-full shrink-0 flex items-center justify-center"
181
- style={{ backgroundColor: cert.color }}
182
- >
183
- {cert.icon === "precertified" && (
184
- <div className="w-9 h-6 bg-[#44B0BC] rounded-sm flex items-center justify-center text-white text-[10px] font-bold">
185
- WELL
186
- </div>
187
- )}
188
- </div>
189
- <div className="flex flex-col gap-0.5 flex-1">
190
- <div
191
- className="text-base font-medium text-[#3D3E46]"
192
- style={{ fontFamily: "'DM Sans', sans-serif" }}
193
- >
194
- {cert.name}
195
- </div>
196
- <div className="flex items-center gap-1">
197
- <Building2
198
- size={16}
199
- className="text-[#327DB9]"
200
- strokeWidth={1.2}
201
- />
202
- <span
203
- className="text-xs font-medium text-[#327DB9]"
204
- style={{ fontFamily: "'DM Sans', sans-serif" }}
205
- >
206
- {cert.locations} Location
207
- {cert.locations !== 1 ? "s" : ""}
208
- </span>
209
- </div>
210
- </div>
211
- </div>
212
- ))}
213
- </div>
214
- </div>
215
- </div>
216
-
217
- {/* WELL Rated Locations Card */}
218
- <div className="flex-1 min-w-0 rounded-md border border-[#DEDEE5] bg-white/0 p-4 shadow-xs">
219
- <h2
220
- className="text-xl font-medium text-[#3D3E46] text-center mb-6"
221
- style={{ fontFamily: "'DM Sans', sans-serif" }}
222
- >
223
- WELL Rated Locations
224
- </h2>
225
-
226
- <div className="flex flex-col md:flex-row justify-center items-center gap-10">
227
- {/* Bar Chart */}
228
- <div className="flex items-end gap-4 h-60 px-4">
229
- {ratings.map((rating) => (
230
- <div key={rating.name} className="w-10 h-60 relative">
231
- {/* Background */}
232
- <div className="absolute inset-0 rounded-t border border-[#DEDEE5] bg-[#F5F9FB]" />
233
- {/* Bar */}
234
- <div
235
- className="absolute bottom-0 left-0 right-0 rounded-t transition-all"
236
- style={{
237
- backgroundColor: rating.color,
238
- height: `${rating.percentage}%`,
239
- }}
240
- />
241
- </div>
242
- ))}
243
- {/* Y-axis */}
244
- <div className="w-px h-60 bg-[#DEDEE5]" />
245
- </div>
246
-
247
- {/* Legend */}
248
- <div className="flex flex-col gap-4 min-w-[160px]">
249
- {ratings.map((rating) => (
250
- <div
251
- key={rating.name}
252
- className={cn(
253
- "flex items-center gap-2",
254
- rating.inactive && "opacity-50",
255
- )}
256
- >
257
- <div
258
- className="w-10 h-10 rounded-full shrink-0 flex items-center justify-center"
259
- style={{ backgroundColor: rating.color }}
260
- />
261
- <div className="flex flex-col gap-0.5 flex-1">
262
- <div
263
- className="text-base font-medium text-[#3D3E46]"
264
- style={{ fontFamily: "'DM Sans', sans-serif" }}
265
- >
266
- {rating.name}
267
- </div>
268
- <div className="flex items-center gap-1">
269
- <Building2
270
- size={16}
271
- className={
272
- rating.inactive
273
- ? "text-[#78777F]"
274
- : "text-[#327DB9]"
275
- }
276
- strokeWidth={1.2}
277
- />
278
- <span
279
- className={cn(
280
- "text-xs font-medium",
281
- rating.inactive
282
- ? "text-[#78777F]"
283
- : "text-[#327DB9]",
284
- )}
285
- style={{ fontFamily: "'DM Sans', sans-serif" }}
286
- >
287
- {typeof rating.locations === "number"
288
- ? `${rating.locations} Location${rating.locations !== 1 ? "s" : ""}`
289
- : rating.locations}
290
- </span>
291
- </div>
292
- </div>
293
- </div>
294
- ))}
295
- </div>
296
- </div>
297
- </div>
298
- </div>
299
-
300
- {/* Footer note */}
301
- <p
302
- className="text-[10px] leading-3 font-medium text-[#78777F] text-center"
303
- style={{ fontFamily: "'DM Sans', sans-serif" }}
304
- >
305
- Achievement metrics reflect all active program achievements, as of{" "}
306
- {new Date().toLocaleDateString("en-US", {
307
- month: "long",
308
- day: "numeric",
309
- year: "numeric",
310
- })}
311
- </p>
312
- </div>
313
- );
314
- },
315
- );
316
-
317
- WELLDashboard.displayName = "WELLDashboard";