@syscore/ui-library 1.13.0 → 1.15.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 (32) hide show
  1. package/client/components/icons/UtilityCheck.tsx +28 -0
  2. package/client/components/icons/seals/SealCertification.tsx +136 -0
  3. package/client/components/icons/seals/SealCertificationBronze.tsx +85 -0
  4. package/client/components/icons/seals/SealCertificationGold.tsx +85 -0
  5. package/client/components/icons/seals/SealCertificationPlatinum.tsx +85 -0
  6. package/client/components/icons/seals/SealCertificationSilver.tsx +85 -0
  7. package/client/components/icons/seals/SealRating.tsx +108 -0
  8. package/client/components/icons/seals/SealRatingCoworking.tsx +53 -0
  9. package/client/components/icons/seals/SealRatingDesign.tsx +53 -0
  10. package/client/components/icons/seals/SealRatingEquity.tsx +53 -0
  11. package/client/components/icons/seals/SealRatingHealthSafety.tsx +57 -0
  12. package/client/components/icons/seals/SealRatingOperations.tsx +53 -0
  13. package/client/components/icons/seals/SealRatingPerformance.tsx +57 -0
  14. package/client/components/icons/seals/SealRatingRealEstate.tsx +53 -0
  15. package/client/components/icons/seals/SealRatingWorkforce.tsx +53 -0
  16. package/client/components/icons/seals/WaterMarkWellProjects.tsx +27 -0
  17. package/client/components/icons/seals/WatermarkMemberOrg.tsx +17 -0
  18. package/client/components/icons/seals/index.tsx +20 -1
  19. package/client/components/ui/checkbox.tsx +4 -4
  20. package/client/global.css +20 -16
  21. package/client/ui/{Checkbox/Checkbox.stories.tsx → Checkbox.stories.tsx} +19 -5
  22. package/client/ui/Icons.stories.tsx +74 -27
  23. package/client/ui/PageHeader.stories.tsx +143 -5
  24. package/dist/index.cjs.js +1 -1
  25. package/dist/index.d.ts +45 -6
  26. package/dist/index.es.js +1800 -336
  27. package/package.json +1 -1
  28. package/client/components/icons/seals/WellSeal.tsx +0 -79
  29. package/client/components/icons/watermarks/WaterMarkWellProjects.tsx +0 -30
  30. package/client/components/icons/watermarks/WatermarkMemberOrg.tsx +0 -59
  31. package/client/components/icons/watermarks/index.tsx +0 -3
  32. /package/client/components/icons/{watermarks → seals}/WaterMarkWWWProducts.tsx +0 -0
@@ -14,6 +14,8 @@ import {
14
14
  TooltipTrigger,
15
15
  TooltipContent,
16
16
  } from "../components/ui/tooltip";
17
+ import { motion, AnimatePresence } from "motion/react";
18
+ import { useState } from "react";
17
19
 
18
20
  const meta = {
19
21
  title: "Review/PageHeader",
@@ -92,6 +94,10 @@ export const ThemeHeader: Story = {
92
94
  "This theme focuses on understanding and improving the overall experience of building occupants through research and feedback mechanisms.",
93
95
  };
94
96
 
97
+ const [isHovered, setIsHovered] = useState(false);
98
+ const [tooltipOpen, setTooltipOpen] = useState(false);
99
+ const isVisible = isHovered || tooltipOpen;
100
+
95
101
  return (
96
102
  <PageHeader>
97
103
  <PageHeaderTopSection className="mb-4">
@@ -123,7 +129,39 @@ export const ThemeHeader: Story = {
123
129
  </PageHeaderLeftContent>
124
130
 
125
131
  <PageHeaderBadge>
126
- <BadgeCertificationBronze />
132
+ <motion.div
133
+ className="flex items-center gap-2"
134
+ initial="hidden"
135
+ animate={isVisible ? "visible" : "hidden"}
136
+ onMouseEnter={() => setIsHovered(true)}
137
+ onMouseLeave={() => setIsHovered(false)}
138
+ >
139
+ <motion.div
140
+ className="text-gray-800 body-small font-ftmade"
141
+ variants={{
142
+ hidden: { opacity: 0, x: 10 },
143
+ visible: { opacity: 1, x: 0 },
144
+ }}
145
+ transition={{ duration: 0.3, ease: "easeOut" }}
146
+ >
147
+ <Tooltip trigger="click" onOpenChange={setTooltipOpen}>
148
+ <TooltipTrigger>
149
+ <span className="body-base text-gray-600 underline-dotted cursor-pointer">
150
+ WELL Certification
151
+ </span>
152
+ </TooltipTrigger>
153
+ <TooltipContent className="max-w-[400px]">
154
+ <p className="body-base text-white">
155
+ The WELL Certification is a globally recognized standard
156
+ for healthy, people-first buildings. It is based on the
157
+ WELL Building Standard, which is a comprehensive framework
158
+ for creating healthy, people-first buildings.
159
+ </p>
160
+ </TooltipContent>
161
+ </Tooltip>
162
+ </motion.div>
163
+ <BadgeCertificationBronze />
164
+ </motion.div>
127
165
  </PageHeaderBadge>
128
166
  </PageHeaderTopSection>
129
167
 
@@ -138,14 +176,114 @@ export const ThemeHeader: Story = {
138
176
  },
139
177
  };
140
178
 
141
- // Title only
142
- export const TitleOnly: Story = {
179
+ export const ThemeHeaderWithPoints: Story = {
143
180
  render: () => {
181
+ const themeCode = "C8";
182
+ const conceptColor = {
183
+ solid: "#0f748a",
184
+ contrast: "#0f748a",
185
+ border: "#0f748a",
186
+ };
187
+ const themeData = {
188
+ name: "Occupant experience",
189
+ description:
190
+ "This theme focuses on understanding and improving the overall experience of building occupants through research and feedback mechanisms.",
191
+ };
192
+
193
+ const [isHovered, setIsHovered] = useState(false);
194
+ const [tooltipOpen, setTooltipOpen] = useState(false);
195
+ const isVisible = isHovered || tooltipOpen;
196
+
144
197
  return (
145
198
  <PageHeader>
146
- <PageHeaderTitle className="heading-small">
147
- Title only header
199
+ <PageHeaderTopSection className="mb-4">
200
+ <PageHeaderLeftContent>
201
+ <Tag
202
+ variant="code"
203
+ style={{
204
+ backgroundColor: conceptColor.contrast || conceptColor.solid,
205
+ borderColor: conceptColor.border,
206
+ color: "white",
207
+ }}
208
+ >
209
+ {themeCode}
210
+ </Tag>
211
+ <Tooltip trigger="click">
212
+ <TooltipTrigger>
213
+ <span className="body-base text-gray-600 underline-dotted cursor-pointer">
214
+ Theme
215
+ </span>
216
+ </TooltipTrigger>
217
+ <TooltipContent className="max-w-[400px]">
218
+ <p className="body-base text-white">
219
+ Themes are groupings of related strategies that address
220
+ specific aspects of health and well-being within a concept
221
+ area.
222
+ </p>
223
+ </TooltipContent>
224
+ </Tooltip>
225
+ </PageHeaderLeftContent>
226
+
227
+ <PageHeaderBadge>
228
+ <div
229
+ className="flex items-center gap-4"
230
+ onMouseEnter={() => setIsHovered(true)}
231
+ onMouseLeave={() => setIsHovered(false)}
232
+ >
233
+ <AnimatePresence mode="wait">
234
+ {isVisible ? (
235
+ <motion.div
236
+ key="hover"
237
+ initial={{ opacity: 0, x: 10 }}
238
+ animate={{ opacity: 1, x: 0 }}
239
+ exit={{ opacity: 0, x: 10 }}
240
+ transition={{ duration: 0.2, ease: "easeOut" }}
241
+ >
242
+ <Tooltip trigger="click" onOpenChange={setTooltipOpen}>
243
+ <TooltipTrigger>
244
+ <span className="body-base text-gray-600 underline-dotted cursor-pointer">
245
+ WELL Certification
246
+ </span>
247
+ </TooltipTrigger>
248
+ <TooltipContent className="max-w-[400px]">
249
+ <p className="body-base text-white">
250
+ The WELL Certification is a globally recognized
251
+ standard for healthy, people-first buildings. It is
252
+ based on the WELL Building Standard, which is a
253
+ comprehensive framework for creating healthy,
254
+ people-first buildings.
255
+ </p>
256
+ </TooltipContent>
257
+ </Tooltip>
258
+ </motion.div>
259
+ ) : (
260
+ <motion.div
261
+ key="default"
262
+ initial={{ opacity: 0, x: -10 }}
263
+ animate={{ opacity: 1, x: 0 }}
264
+ exit={{ opacity: 0, x: -10 }}
265
+ transition={{ duration: 0.2, ease: "easeOut" }}
266
+ className="flex items-end gap-1"
267
+ >
268
+ <span className="text-gray-800 overline-medium">Up to</span>
269
+ <span className="text-gray-800 number-large font-semibold">
270
+ +10
271
+ </span>
272
+ <span className="text-gray-800 overline-medium">PTS</span>
273
+ </motion.div>
274
+ )}
275
+ </AnimatePresence>
276
+ <BadgeCertificationBronze />
277
+ </div>
278
+ </PageHeaderBadge>
279
+ </PageHeaderTopSection>
280
+
281
+ <PageHeaderTitle className="heading-small mb-3">
282
+ {themeData.name}
148
283
  </PageHeaderTitle>
284
+ <PageHeaderDescription className="body-large">
285
+ {themeData.description}
286
+ </PageHeaderDescription>
149
287
  </PageHeader>
150
288
  );
151
289
  },