@syscore/ui-library 1.1.12 → 1.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.
Files changed (100) hide show
  1. package/client/components/icons/AchievementBadges.tsx +33 -0
  2. package/client/components/icons/ConceptIcons.tsx +169 -22
  3. package/client/components/icons/NavLogo.tsx +4 -4
  4. package/client/components/icons/ProviderBadges.tsx +28 -28
  5. package/client/components/icons/ProviderSeals.tsx +35 -35
  6. package/client/components/icons/StandardLogo.tsx +47 -0
  7. package/client/components/icons/UtilityChevronDown.tsx +1 -1
  8. package/client/components/icons/UtilityClearRegular.tsx +43 -0
  9. package/client/components/icons/UtilityCompare.tsx +71 -0
  10. package/client/components/icons/UtilityHome.tsx +26 -0
  11. package/client/components/icons/UtilityReset.tsx +7 -7
  12. package/client/components/icons/UtilitySave.tsx +35 -0
  13. package/client/components/icons/UtilityScopeLarge.tsx +86 -0
  14. package/client/components/icons/UtilityShow.tsx +41 -0
  15. package/client/components/icons/UtilityTarget.tsx +21 -0
  16. package/client/components/icons/UtilityTargetActive.tsx +34 -0
  17. package/client/components/icons/UtilityText.tsx +8 -8
  18. package/client/components/ui/accordion.tsx +6 -9
  19. package/client/components/ui/alert-dialog.tsx +6 -19
  20. package/client/components/ui/alert.tsx +5 -6
  21. package/client/components/ui/avatar.tsx +3 -9
  22. package/client/components/ui/badge.tsx +5 -8
  23. package/client/components/ui/breadcrumb.tsx +24 -11
  24. package/client/components/ui/button.tsx +40 -56
  25. package/client/components/ui/calendar.tsx +24 -28
  26. package/client/components/ui/card.tsx +6 -9
  27. package/client/components/ui/carousel.tsx +14 -14
  28. package/client/components/ui/chart.tsx +25 -28
  29. package/client/components/ui/checkbox.tsx +3 -8
  30. package/client/components/ui/code-badge.tsx +22 -0
  31. package/client/components/ui/command.tsx +12 -48
  32. package/client/components/ui/context-menu.tsx +17 -32
  33. package/client/components/ui/dialog.tsx +9 -18
  34. package/client/components/ui/drawer.tsx +7 -13
  35. package/client/components/ui/dropdown-menu.tsx +17 -29
  36. package/client/components/ui/form.tsx +4 -4
  37. package/client/components/ui/hover-card.tsx +1 -4
  38. package/client/components/ui/input-otp.tsx +7 -10
  39. package/client/components/ui/input.tsx +34 -9
  40. package/client/components/ui/label.tsx +2 -4
  41. package/client/components/ui/menubar.tsx +19 -40
  42. package/client/components/ui/navigation-menu.tsx +10 -27
  43. package/client/components/ui/navigation.tsx +861 -0
  44. package/client/components/ui/pagination.tsx +8 -8
  45. package/client/components/ui/popover.tsx +1 -4
  46. package/client/components/ui/progress.tsx +2 -5
  47. package/client/components/ui/radio-group.tsx +4 -7
  48. package/client/components/ui/resizable.tsx +4 -10
  49. package/client/components/ui/scroll-area.tsx +5 -8
  50. package/client/components/ui/{SearchField.tsx → search.tsx} +7 -10
  51. package/client/components/ui/select.tsx +19 -44
  52. package/client/components/ui/separator.tsx +2 -2
  53. package/client/components/ui/sheet.tsx +12 -23
  54. package/client/components/ui/sidebar.tsx +55 -82
  55. package/client/components/ui/skeleton.tsx +1 -1
  56. package/client/components/ui/slider.tsx +4 -7
  57. package/client/components/ui/sonner.tsx +5 -8
  58. package/client/components/ui/switch.tsx +2 -9
  59. package/client/components/ui/table.tsx +9 -18
  60. package/client/components/ui/tabs.tsx +43 -203
  61. package/client/components/ui/tag.tsx +68 -0
  62. package/client/components/ui/textarea.tsx +1 -4
  63. package/client/components/ui/toast.tsx +9 -19
  64. package/client/components/ui/toaster.tsx +1 -1
  65. package/client/components/ui/toggle-group.tsx +20 -3
  66. package/client/components/ui/toggle.tsx +13 -13
  67. package/client/components/ui/tooltip.tsx +147 -10
  68. package/client/global.css +5421 -1049
  69. package/client/storybook.css +1164 -0
  70. package/client/ui/AspectRatio.stories.tsx +1 -1
  71. package/client/ui/Button.stories.tsx +5 -5
  72. package/client/ui/Card.stories.tsx +223 -2
  73. package/client/ui/CodeBadge.stories.tsx +76 -0
  74. package/client/ui/Dialog.stories.tsx +52 -5
  75. package/client/ui/Icons.stories.tsx +31 -31
  76. package/client/ui/Input.stories.tsx +125 -0
  77. package/client/ui/Label.stories.tsx +8 -11
  78. package/client/ui/Navigation.stories.tsx +1 -1
  79. package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
  80. package/client/ui/SearchField.stories.tsx +1 -1
  81. package/client/ui/{Select/Select.stories.tsx → Select.stories.tsx} +2 -2
  82. package/client/ui/{Switch/Switch.stories.tsx → Switch.stories.tsx} +3 -3
  83. package/client/ui/Tabs.stories.tsx +174 -10
  84. package/client/ui/Tag.stories.tsx +48 -1
  85. package/client/ui/{Textarea/Textarea.stories.tsx → Textarea.stories.tsx} +9 -10
  86. package/client/ui/Toggle.stories.tsx +3 -3
  87. package/client/ui/Tooltip.stories.tsx +28 -4
  88. package/dist/ui/index.cjs.js +1 -1
  89. package/dist/ui/index.d.ts +4 -6
  90. package/dist/ui/index.es.js +1227 -2235
  91. package/dist/ui/ui-library.css +1 -0
  92. package/package.json +3 -3
  93. package/client/components/ui/Navigation.tsx +0 -958
  94. package/client/components/ui/StrategyTable.tsx +0 -303
  95. package/client/components/ui/Tag.tsx +0 -127
  96. package/client/ui/Input/Input.stories.tsx +0 -69
  97. package/client/ui/StrategyTable.stories.tsx +0 -138
  98. package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +0 -115
  99. package/client/ui/WELLDashboard/index.tsx +0 -317
  100. /package/client/hooks/{UseTabs.tsx → use-tabs.tsx} +0 -0
@@ -1,115 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { WELLDashboard } from ".";
3
-
4
- const meta = {
5
- title: "UI/WELLDashboard",
6
- component: WELLDashboard,
7
- tags: ["autodocs"],
8
- parameters: {
9
- layout: "padded",
10
- },
11
- argTypes: {
12
- certifiedPercentage: {
13
- control: { type: "range", min: 0, max: 100, step: 1 },
14
- description: "Percentage of locations certified (0-100)",
15
- },
16
- },
17
- } satisfies Meta<typeof WELLDashboard>;
18
-
19
- export default meta;
20
-
21
- type Story = StoryObj<typeof meta>;
22
-
23
- // Default dashboard with standard data
24
- export const Default: Story = {
25
- args: {
26
- certifiedPercentage: 60,
27
- },
28
- };
29
-
30
- // Full certification (100%)
31
- export const FullyCertified: Story = {
32
- args: {
33
- certifiedPercentage: 100,
34
- },
35
- };
36
-
37
- // Low certification percentage
38
- export const LowCertification: Story = {
39
- args: {
40
- certifiedPercentage: 25,
41
- },
42
- };
43
-
44
- // Custom data example
45
- export const CustomData: Story = {
46
- args: {
47
- certifiedPercentage: 75,
48
- certifications: [
49
- { name: "Platinum", locations: 3, color: "#A8A7AE" },
50
- { name: "Gold", locations: 5, color: "#D7C686" },
51
- { name: "Silver", locations: 2, color: "#C0C2C4" },
52
- { name: "Bronze", locations: 1, color: "#D1A778" },
53
- ],
54
- ratings: [
55
- { name: "Health-Safety", locations: 8, color: "#7FB3DC", percentage: 80 },
56
- { name: "Equity", locations: 5, color: "#41937D", percentage: 60 },
57
- { name: "Performance", locations: 3, color: "#0B667F", percentage: 40 },
58
- { name: "Coworking", locations: 1, color: "#AD7DA3", percentage: 15 },
59
- ],
60
- },
61
- };
62
-
63
- // All ratings active
64
- export const AllRatingsActive: Story = {
65
- args: {
66
- certifiedPercentage: 85,
67
- ratings: [
68
- { name: "Health-Safety", locations: 10, color: "#7FB3DC", percentage: 90 },
69
- { name: "Equity", locations: 8, color: "#41937D", percentage: 75 },
70
- { name: "Performance", locations: 6, color: "#0B667F", percentage: 60 },
71
- { name: "Coworking", locations: 4, color: "#AD7DA3", percentage: 45 },
72
- ],
73
- },
74
- };
75
-
76
- // Complete overview in a constrained container
77
- export const InContainer: Story = {
78
- render: (args) => (
79
- <div className="max-w-6xl mx-auto p-8 bg-[#FAFAFA]">
80
- <WELLDashboard {...args} />
81
- </div>
82
- ),
83
- args: {
84
- certifiedPercentage: 60,
85
- },
86
- };
87
-
88
- // Responsive demo
89
- export const ResponsiveDemo: Story = {
90
- render: (args) => (
91
- <div className="space-y-8">
92
- <div>
93
- <h3 className="text-lg font-semibold mb-4">Desktop (1200px)</h3>
94
- <div className="w-full max-w-6xl border-2 border-dashed border-gray-300 p-4">
95
- <WELLDashboard {...args} />
96
- </div>
97
- </div>
98
- <div>
99
- <h3 className="text-lg font-semibold mb-4">Tablet (768px)</h3>
100
- <div className="w-full max-w-3xl border-2 border-dashed border-gray-300 p-4">
101
- <WELLDashboard {...args} />
102
- </div>
103
- </div>
104
- <div>
105
- <h3 className="text-lg font-semibold mb-4">Mobile (375px)</h3>
106
- <div className="w-full max-w-sm border-2 border-dashed border-gray-300 p-4">
107
- <WELLDashboard {...args} />
108
- </div>
109
- </div>
110
- </div>
111
- ),
112
- args: {
113
- certifiedPercentage: 60,
114
- },
115
- };
@@ -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";
File without changes