@warmio/ui 1.4.0 → 2.0.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 (51) hide show
  1. package/LICENSES/fluid-functionalism.txt +24 -0
  2. package/README.md +23 -14
  3. package/dist/badge.js +2 -2
  4. package/dist/button.js +4 -1
  5. package/dist/chunks/chunk-A2PN77YE.js +42 -0
  6. package/dist/chunks/chunk-DHV2A22F.js +240 -0
  7. package/dist/chunks/chunk-DOOSH3V6.js +72 -0
  8. package/dist/chunks/chunk-EIEA5RJJ.js +97 -0
  9. package/dist/chunks/chunk-FKGHMPVW.js +875 -0
  10. package/dist/chunks/chunk-K36HD5J5.js +133 -0
  11. package/dist/chunks/chunk-L6L3GVGM.js +130 -0
  12. package/dist/chunks/chunk-MGX6ZL6Q.js +224 -0
  13. package/dist/chunks/chunk-MVUHHKBL.js +492 -0
  14. package/dist/chunks/chunk-PJUNSOJK.js +116 -0
  15. package/dist/chunks/chunk-RVVHR7RY.js +0 -0
  16. package/dist/chunks/chunk-U7D32UN3.js +0 -0
  17. package/dist/chunks/chunk-W24JGQWM.js +65 -0
  18. package/dist/dropdown-menu.js +4 -3
  19. package/dist/entries/badge.css +178 -0
  20. package/dist/entries/button.css +422 -0
  21. package/dist/entries/dropdown-menu.css +167 -0
  22. package/dist/entries/index.css +2789 -0
  23. package/dist/entries/logo.css +147 -0
  24. package/dist/entries/product-header.css +88 -0
  25. package/dist/entries/sheet.css +666 -0
  26. package/dist/entries/sidebar.css +2108 -0
  27. package/dist/entries/text.css +97 -0
  28. package/dist/index.js +17 -13
  29. package/dist/logo.js +2 -2
  30. package/dist/product-header.js +2 -2
  31. package/dist/product-header.types.d.ts +3 -2
  32. package/dist/sheet.js +5 -3
  33. package/dist/sidebar.css +129 -0
  34. package/dist/sidebar.js +7 -3
  35. package/dist/text.css +121 -0
  36. package/dist/text.js +2 -2
  37. package/package.json +15 -5
  38. package/types/badge.d.ts +10 -2
  39. package/types/button.d.ts +65 -9
  40. package/types/sidebar.d.ts +10 -2
  41. package/types/text.d.ts +10 -2
  42. package/dist/chunks/chunk-4RQCHKAW.js +0 -105
  43. package/dist/chunks/chunk-FW2EHGRK.js +0 -748
  44. package/dist/chunks/chunk-GKEYV2XW.js +0 -10
  45. package/dist/chunks/chunk-HDCV4ACN.js +0 -469
  46. package/dist/chunks/chunk-ICC7GQXS.js +0 -74
  47. package/dist/chunks/chunk-KN6WVLCR.js +0 -261
  48. package/dist/chunks/chunk-MIMC4M6W.js +0 -86
  49. package/dist/chunks/chunk-PBWF6BDE.js +0 -88
  50. package/dist/chunks/chunk-VIB7OX7D.js +0 -10
  51. package/dist/chunks/chunk-YTDMREDR.js +0 -201
@@ -0,0 +1,492 @@
1
+ // ../ui/src/warmio/mascot/mascot.tsx
2
+ import { useEffect, useEffectEvent, useRef, useState } from "react";
3
+
4
+ // ../ui/src/warmio/mascot-pupils.ts
5
+ var MAX_LOOK = 1.35;
6
+ var MAX_WANDER = 0.55;
7
+ var FOLLOW = 0.045;
8
+ var pointer = { x: 0, y: 0 };
9
+ var pointerBound = false;
10
+ var pointerCount = 0;
11
+ function bindPointer() {
12
+ if (pointerBound) return;
13
+ pointerBound = true;
14
+ pointer = { x: window.innerWidth / 2, y: window.innerHeight / 2 };
15
+ window.addEventListener("pointermove", onPointerMove, { passive: true });
16
+ }
17
+ function unbindPointer() {
18
+ if (pointerCount > 0) return;
19
+ if (!pointerBound) return;
20
+ pointerBound = false;
21
+ window.removeEventListener("pointermove", onPointerMove);
22
+ }
23
+ function onPointerMove(event) {
24
+ pointer = { x: event.clientX, y: event.clientY };
25
+ }
26
+ function findSvgGroup(svg, id) {
27
+ for (const node of svg.getElementsByTagName("g")) {
28
+ if (node.id === id && node instanceof SVGGElement) return node;
29
+ }
30
+ return null;
31
+ }
32
+ function uniquifyClipIds(svg) {
33
+ const prefix = `m${Math.random().toString(36).slice(2, 8)}`;
34
+ for (const id of ["left_eye_clip", "right_eye_clip"]) {
35
+ let clip = null;
36
+ for (const node of svg.getElementsByTagName("clipPath")) {
37
+ if (node.id === id) {
38
+ clip = node;
39
+ break;
40
+ }
41
+ }
42
+ if (!clip) continue;
43
+ const nextId = `${prefix}-${id}`;
44
+ clip.id = nextId;
45
+ for (const node of svg.querySelectorAll("[clip-path]")) {
46
+ if (node.getAttribute("clip-path") === `url(#${id})`) {
47
+ node.setAttribute("clip-path", `url(#${nextId})`);
48
+ }
49
+ }
50
+ }
51
+ }
52
+ function lookTarget(svg) {
53
+ const box = svg.getBoundingClientRect();
54
+ if (box.width === 0 || box.height === 0) return { x: 0, y: 0 };
55
+ const cx = box.left + box.width / 2;
56
+ const cy = box.top + box.height * 0.62;
57
+ const nx = Math.max(-1, Math.min(1, (pointer.x - cx) / (box.width * 1.6)));
58
+ const ny = Math.max(-1, Math.min(1, (pointer.y - cy) / (box.height * 1.6)));
59
+ return { x: nx * MAX_LOOK, y: ny * MAX_LOOK * 0.85 };
60
+ }
61
+ function warmMascotSourceSupportsLivePupils(source) {
62
+ if (!source.endsWith(".svg")) return false;
63
+ const file = source.split("/").pop() ?? "";
64
+ return !file.toUpperCase().includes("CLOSED");
65
+ }
66
+ function startWarmMascotPupilDrift(host) {
67
+ const svg = host.querySelector("svg");
68
+ if (!(svg instanceof SVGSVGElement)) return () => {
69
+ };
70
+ const left = findSvgGroup(svg, "left_pupil");
71
+ const right = findSvgGroup(svg, "right_pupil");
72
+ if (!left || !right) {
73
+ return () => {
74
+ };
75
+ }
76
+ uniquifyClipIds(svg);
77
+ pointerCount += 1;
78
+ bindPointer();
79
+ const phase = Math.random() * Math.PI * 2;
80
+ let x = 0;
81
+ let y = 0;
82
+ let frame = 0;
83
+ const tick = (now) => {
84
+ const t = now / 1e3;
85
+ const wanderX = Math.sin(t * 0.32 + phase) * MAX_WANDER;
86
+ const wanderY = Math.cos(t * 0.24 + phase * 1.3) * MAX_WANDER * 0.7;
87
+ const look = lookTarget(svg);
88
+ const targetX = look.x + wanderX;
89
+ const targetY = look.y + wanderY;
90
+ x += (targetX - x) * FOLLOW;
91
+ y += (targetY - y) * FOLLOW;
92
+ const transform = `translate(${x.toFixed(3)} ${y.toFixed(3)})`;
93
+ left.setAttribute("transform", transform);
94
+ right.setAttribute("transform", transform);
95
+ frame = window.requestAnimationFrame(tick);
96
+ };
97
+ frame = window.requestAnimationFrame(tick);
98
+ return () => {
99
+ window.cancelAnimationFrame(frame);
100
+ pointerCount -= 1;
101
+ unbindPointer();
102
+ };
103
+ }
104
+
105
+ // ../ui/src/warmio/mascot/mascot-assets.ts
106
+ var WARM_MASCOT_IDS = ["NORMAL", "CLOSED", "SAD", "HYPE", "CONFUSED"];
107
+ var WARM_MASCOT_MOOD_TO_EXPRESSION = {
108
+ calm: "NORMAL",
109
+ happy: "HYPE",
110
+ focused: "NORMAL",
111
+ relieved: "NORMAL",
112
+ "password-retry": "NORMAL",
113
+ sad: "SAD"
114
+ };
115
+ function isWarmMascotMood(expression) {
116
+ return Object.hasOwn(WARM_MASCOT_MOOD_TO_EXPRESSION, expression);
117
+ }
118
+ function isWarmMascotId(expression) {
119
+ for (const id of WARM_MASCOT_IDS) {
120
+ if (id === expression) return true;
121
+ }
122
+ return false;
123
+ }
124
+ function getWarmMascotSrc(expression, _theme) {
125
+ return `/mascot/${expression}.svg`;
126
+ }
127
+ function getWarmMascotPeekSrc(eyes, _theme) {
128
+ if (eyes === "closed") {
129
+ return "/mascot/CLOSED.svg";
130
+ }
131
+ return "/mascot/NORMAL.svg";
132
+ }
133
+ function getWarmMascotStillSrc(expression, peekEyes) {
134
+ if (peekEyes === "closed") {
135
+ return "/mascot/CLOSED.svg";
136
+ }
137
+ if (peekEyes === "open") {
138
+ return "/mascot/NORMAL.svg";
139
+ }
140
+ return `/mascot/${expression}.svg`;
141
+ }
142
+ function getWarmMascotFallbackSrc(expression, peekEyes) {
143
+ if (peekEyes === "closed") {
144
+ return "/mascot/CLOSED.svg";
145
+ }
146
+ return `/mascot/${expression}.svg`;
147
+ }
148
+ function prefersReducedMascotMotion() {
149
+ return globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
150
+ }
151
+ function resolveWarmMascotId(expression) {
152
+ if (!expression) return "NORMAL";
153
+ if (isWarmMascotMood(expression)) {
154
+ return WARM_MASCOT_MOOD_TO_EXPRESSION[expression];
155
+ }
156
+ if (isWarmMascotId(expression)) {
157
+ return expression;
158
+ }
159
+ return "NORMAL";
160
+ }
161
+
162
+ // ../ui/src/warmio/mascot/mascot.tsx
163
+ import { jsx, jsxs } from "react/jsx-runtime";
164
+ var HYPE_CTA_SELECTOR = "[data-auth-cta], [data-auth-guest], [data-waitlist-cta], [data-home-marketing-nav-login], [data-home-marketing-nav-signup]";
165
+ function isWarmMascotHypeCta(node) {
166
+ return node instanceof Element && node.closest(HYPE_CTA_SELECTOR) != null;
167
+ }
168
+ function useCtaHype(enabled) {
169
+ const [active, setActiveState] = useState(false);
170
+ const setActive = useEffectEvent((next) => {
171
+ if (next) {
172
+ setActiveState(true);
173
+ return;
174
+ }
175
+ const focused = isWarmMascotHypeCta(document.activeElement);
176
+ const hovered = document.querySelector(":hover");
177
+ setActiveState(focused || isWarmMascotHypeCta(hovered));
178
+ });
179
+ useEffect(() => {
180
+ if (!enabled) return;
181
+ const onEnter = (event) => {
182
+ if (isWarmMascotHypeCta(event.target)) setActive(true);
183
+ };
184
+ const onLeave = (event) => {
185
+ if (!isWarmMascotHypeCta(event.target)) return;
186
+ const next = "relatedTarget" in event ? event.relatedTarget : null;
187
+ if (isWarmMascotHypeCta(next)) return;
188
+ setActive(false);
189
+ };
190
+ document.addEventListener("pointerenter", onEnter, true);
191
+ document.addEventListener("pointerleave", onLeave, true);
192
+ document.addEventListener("focusin", onEnter);
193
+ document.addEventListener("focusout", onLeave);
194
+ return () => {
195
+ document.removeEventListener("pointerenter", onEnter, true);
196
+ document.removeEventListener("pointerleave", onLeave, true);
197
+ document.removeEventListener("focusin", onEnter);
198
+ document.removeEventListener("focusout", onLeave);
199
+ };
200
+ }, [enabled]);
201
+ return enabled && active;
202
+ }
203
+ function markMascotFallback(target) {
204
+ if (!(target instanceof HTMLElement)) return;
205
+ const root = target.closest('[data-slot="warm-mascot"]');
206
+ if (root instanceof HTMLElement) root.dataset["mascotFallback"] = "";
207
+ }
208
+ function WarmMascotMedia({
209
+ source,
210
+ stillSrc,
211
+ fallbackSrc
212
+ }) {
213
+ const liveHostRef = useRef(null);
214
+ const [liveMarkup, setLiveMarkup] = useState(null);
215
+ const useLivePupils = warmMascotSourceSupportsLivePupils(source);
216
+ useEffect(() => {
217
+ if (!useLivePupils) {
218
+ setLiveMarkup(null);
219
+ return;
220
+ }
221
+ if (prefersReducedMascotMotion()) return;
222
+ let cancelled = false;
223
+ fetch(source).then((response) => response.text()).then((markup) => {
224
+ if (!cancelled) setLiveMarkup(markup);
225
+ }).catch(() => {
226
+ if (!cancelled) setLiveMarkup(null);
227
+ });
228
+ return () => {
229
+ cancelled = true;
230
+ };
231
+ }, [source, useLivePupils]);
232
+ useEffect(() => {
233
+ const host = liveHostRef.current;
234
+ if (!host || liveMarkup == null) return;
235
+ return startWarmMascotPupilDrift(host);
236
+ }, [liveMarkup]);
237
+ if (liveMarkup) {
238
+ return /* @__PURE__ */ jsx(
239
+ "div",
240
+ {
241
+ ref: liveHostRef,
242
+ "data-slot": "warm-mascot-frame",
243
+ dangerouslySetInnerHTML: { __html: liveMarkup }
244
+ }
245
+ );
246
+ }
247
+ return /* @__PURE__ */ jsxs("picture", { children: [
248
+ /* @__PURE__ */ jsx("source", { srcSet: stillSrc, media: "(prefers-reduced-motion: reduce)" }),
249
+ /* @__PURE__ */ jsx(
250
+ "img",
251
+ {
252
+ "data-slot": "warm-mascot-frame",
253
+ src: source,
254
+ alt: "",
255
+ draggable: false,
256
+ "aria-hidden": "true",
257
+ onError: (event) => {
258
+ const img = event.currentTarget;
259
+ if (img.dataset["fallbackApplied"] != null) return;
260
+ img.dataset["fallbackApplied"] = "";
261
+ img.src = fallbackSrc;
262
+ markMascotFallback(img);
263
+ }
264
+ }
265
+ )
266
+ ] });
267
+ }
268
+ function toggleWarmMascotOnKeyDown(event, onToggleHype) {
269
+ if (event.key !== "Enter" && event.key !== " ") return;
270
+ event.preventDefault();
271
+ onToggleHype();
272
+ }
273
+ function WarmMascotFrame({
274
+ size,
275
+ expression,
276
+ peekEyes,
277
+ theme,
278
+ source,
279
+ stillSrc,
280
+ fallbackSrc,
281
+ label,
282
+ clickHype,
283
+ clickedHype,
284
+ onToggleHype
285
+ }) {
286
+ const commonProps = {
287
+ "data-slot": "warm-mascot",
288
+ "data-size": size,
289
+ "data-expression": expression,
290
+ "data-flame-peek-eyes": peekEyes,
291
+ "data-flame-theme": theme,
292
+ "data-flame-vector": source.endsWith(".svg") ? "" : void 0,
293
+ "data-click-hype": clickHype ? "" : void 0
294
+ };
295
+ const media = /* @__PURE__ */ jsx(WarmMascotMedia, { source, stillSrc, fallbackSrc });
296
+ if (clickHype) {
297
+ return /* @__PURE__ */ jsx(
298
+ "div",
299
+ {
300
+ ...commonProps,
301
+ role: "button",
302
+ tabIndex: 0,
303
+ "aria-label": "Make the Warm mascot poggers",
304
+ "aria-pressed": clickedHype,
305
+ onClick: onToggleHype,
306
+ onKeyDown: (event) => toggleWarmMascotOnKeyDown(event, onToggleHype),
307
+ children: media
308
+ }
309
+ );
310
+ }
311
+ return /* @__PURE__ */ jsx(
312
+ "div",
313
+ {
314
+ ...commonProps,
315
+ role: label ? "img" : void 0,
316
+ "aria-label": label ?? void 0,
317
+ "aria-hidden": label ? void 0 : true,
318
+ children: media
319
+ }
320
+ );
321
+ }
322
+ function WarmMascot({
323
+ expression: expressionProp = "NORMAL",
324
+ size = "default",
325
+ label = null,
326
+ theme: themeProp,
327
+ peekEyes,
328
+ ctaHype = true,
329
+ clickHype = false,
330
+ className: _className,
331
+ style: _style
332
+ }) {
333
+ const [clickedHype, setClickedHype] = useState(false);
334
+ const activePeekEyes = clickHype && clickedHype ? void 0 : peekEyes;
335
+ const baseExpression = resolveWarmMascotId(expressionProp);
336
+ const hype = useCtaHype(ctaHype && activePeekEyes == null) || clickHype && clickedHype;
337
+ const expression = hype ? "HYPE" : baseExpression;
338
+ const theme = themeProp ?? "light";
339
+ const source = activePeekEyes ? getWarmMascotPeekSrc(activePeekEyes, theme) : getWarmMascotSrc(expression, theme);
340
+ return /* @__PURE__ */ jsx(
341
+ WarmMascotFrame,
342
+ {
343
+ size,
344
+ expression,
345
+ peekEyes: activePeekEyes,
346
+ theme,
347
+ source,
348
+ stillSrc: getWarmMascotStillSrc(expression, activePeekEyes),
349
+ fallbackSrc: getWarmMascotFallbackSrc(expression, activePeekEyes),
350
+ label,
351
+ clickHype,
352
+ clickedHype,
353
+ onToggleHype: () => setClickedHype((current) => !current)
354
+ }
355
+ );
356
+ }
357
+
358
+ // ../design/src/logo.tsx
359
+ import * as React from "react";
360
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
361
+ var WShape = /* @__PURE__ */ jsxs2("g", { fill: "currentColor", transform: "translate(0 108)", children: [
362
+ /* @__PURE__ */ jsx2("path", { d: "M 33.500 40.660 C 20.206 42.744, 0 48.560, -0 50.302 C -0 51.759, 123.955 348.889, 127.738 356.500 C 142.182 385.561, 169.450 410.275, 198.946 421.040 C 218.922 428.330, 243.683 430.825, 264.526 427.648 C 277.151 425.724, 294.628 420.011, 294.194 417.952 C 293.790 416.040, 172.732 124.599, 168.522 115.405 C 161.779 100.679, 149.168 84.171, 135.093 71.646 C 119.358 57.644, 98.880 47.362, 77 42.478 C 69.645 40.836, 40.220 39.606, 33.500 40.660" }),
363
+ /* @__PURE__ */ jsx2("path", { d: "M 229.651 41.597 C 217.916 43.718, 202.443 49.144, 202.744 51.035 C 203.418 55.268, 329.689 356.584, 333.687 363.500 C 340.525 375.327, 345.293 381.483, 355.408 391.538 C 374.603 410.619, 398.878 423.014, 425.907 427.533 C 439.649 429.831, 463.594 429.132, 476 426.072 C 489.892 422.645, 497.188 419.815, 496.703 418.043 C 495.416 413.331, 371.058 116.094, 367.406 109 C 349.467 74.149, 313.008 47.875, 273.752 41.509 C 262.281 39.648, 240.195 39.693, 229.651 41.597" }),
364
+ /* @__PURE__ */ jsx2("path", { d: "M 463 40.593 C 451.670 42.545, 447.288 43.569, 439 46.203 C 433.775 47.864, 429.338 49.372, 429.140 49.555 C 428.942 49.737, 434.670 64.021, 441.868 81.297 C 455.574 114.190, 462.215 131.660, 468.447 151.208 C 475.360 172.892, 486.124 186.213, 503.834 194.997 C 530.956 208.450, 564.982 201.679, 583.654 179.112 C 604.399 154.041, 605.407 121.944, 586.291 95.155 C 567.827 69.280, 539.107 50.114, 508 42.907 C 500.680 41.212, 494.713 40.644, 482 40.434 C 472.925 40.284, 464.375 40.356, 463 40.593" })
365
+ ] });
366
+ function WarmLogoIcon({
367
+ size = "default",
368
+ tone = "default",
369
+ decorative = false,
370
+ className: _className,
371
+ style: _style,
372
+ asChild: _asChild,
373
+ render: _render,
374
+ ...props
375
+ }) {
376
+ const label = decorative ? void 0 : "Warm logo";
377
+ return /* @__PURE__ */ jsx2(
378
+ "svg",
379
+ {
380
+ xmlns: "http://www.w3.org/2000/svg",
381
+ viewBox: "0 0 600 600",
382
+ "data-warm-logo": true,
383
+ "data-size": size,
384
+ "data-tone": tone,
385
+ width: size === "hero" ? 56 : size === "feature" ? 32 : size === "default" ? 28 : 12,
386
+ height: size === "hero" ? 56 : size === "feature" ? 32 : size === "default" ? 28 : 12,
387
+ "aria-hidden": decorative ? true : void 0,
388
+ "aria-label": label,
389
+ ...props,
390
+ children: WShape
391
+ }
392
+ );
393
+ }
394
+ var Logo = React.forwardRef(function Logo2({
395
+ size = "default",
396
+ tone = "default",
397
+ showText = true,
398
+ className: _className,
399
+ style: _style,
400
+ textClass: _textClass,
401
+ asChild: _asChild,
402
+ render: _render,
403
+ ...props
404
+ }, ref) {
405
+ return /* @__PURE__ */ jsxs2("div", { ref, "data-warm-logo": true, "data-size": size, "data-tone": tone, ...props, children: [
406
+ /* @__PURE__ */ jsx2(WarmLogoIcon, { size, tone, decorative: showText }),
407
+ showText ? /* @__PURE__ */ jsx2("span", { children: "Warm" }) : null
408
+ ] });
409
+ });
410
+
411
+ // ../ui/src/warmio/logo/logo.tsx
412
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
413
+ var _WarmLogoGlyph = /* @__PURE__ */ jsxs3(Fragment, { children: [
414
+ /* @__PURE__ */ jsx3(
415
+ "path",
416
+ {
417
+ d: "M 33.500 40.660 C 20.206 42.744, 0 48.560, -0 50.302 C -0 51.759, 123.955 348.889, 127.738 356.500 C 142.182 385.561, 169.450 410.275, 198.946 421.040 C 218.922 428.330, 243.683 430.825, 264.526 427.648 C 277.151 425.724, 294.628 420.011, 294.194 417.952 C 293.790 416.040, 172.732 124.599, 168.522 115.405 C 161.779 100.679, 149.168 84.171, 135.093 71.646 C 119.358 57.644, 98.880 47.362, 77 42.478 C 69.645 40.836, 40.220 39.606, 33.500 40.660",
418
+ fill: "currentColor"
419
+ }
420
+ ),
421
+ /* @__PURE__ */ jsx3(
422
+ "path",
423
+ {
424
+ d: "M 229.651 41.597 C 217.916 43.718, 202.443 49.144, 202.744 51.035 C 203.418 55.268, 329.689 356.584, 333.687 363.500 C 340.525 375.327, 345.293 381.483, 355.408 391.538 C 374.603 410.619, 398.878 423.014, 425.907 427.533 C 439.649 429.831, 463.594 429.132, 476 426.072 C 489.892 422.645, 497.188 419.815, 496.703 418.043 C 495.416 413.331, 371.058 116.094, 367.406 109 C 349.467 74.149, 313.008 47.875, 273.752 41.509 C 262.281 39.648, 240.195 39.693, 229.651 41.597",
425
+ fill: "currentColor"
426
+ }
427
+ ),
428
+ /* @__PURE__ */ jsx3(
429
+ "path",
430
+ {
431
+ d: "M 463 40.593 C 451.670 42.545, 447.288 43.569, 439 46.203 C 433.775 47.864, 429.338 49.372, 429.140 49.555 C 428.942 49.737, 434.670 64.021, 441.868 81.297 C 455.574 114.190, 462.215 131.660, 468.447 151.208 C 475.360 172.892, 486.124 186.213, 503.834 194.997 C 530.956 208.450, 564.982 201.679, 583.654 179.112 C 604.399 154.041, 605.407 121.944, 586.291 95.155 C 567.827 69.280, 539.107 50.114, 508 42.907 C 500.680 41.212, 494.713 40.644, 482 40.434 C 472.925 40.284, 464.375 40.356, 463 40.593",
432
+ fill: "currentColor"
433
+ }
434
+ )
435
+ ] });
436
+ function WarmBrandedLogoMark({
437
+ size = "md",
438
+ className: _className,
439
+ logoClassName: _logoClassName
440
+ }) {
441
+ return /* @__PURE__ */ jsxs3("span", { "data-slot": "warm-branded-logo", "data-size": size, "aria-hidden": "true", children: [
442
+ /* @__PURE__ */ jsx3("span", { "data-slot": "warm-branded-logo-mascot", children: /* @__PURE__ */ jsx3(WarmMascot, { expression: "calm", label: null }) }),
443
+ /* @__PURE__ */ jsx3(
444
+ "svg",
445
+ {
446
+ xmlns: "http://www.w3.org/2000/svg",
447
+ viewBox: "0 0 600 600",
448
+ "data-slot": "warm-branded-logo-icon",
449
+ "data-size": size,
450
+ "aria-hidden": "true",
451
+ children: /* @__PURE__ */ jsx3("g", { transform: "translate(0 108)", children: _WarmLogoGlyph })
452
+ }
453
+ )
454
+ ] });
455
+ }
456
+ function WarmBrandedLogoLink({
457
+ href,
458
+ ariaLabel = "Warm home",
459
+ size = "md",
460
+ className: _className,
461
+ logoClassName: _logoClassName
462
+ }) {
463
+ return /* @__PURE__ */ jsx3("a", { href, "aria-label": ariaLabel, "data-slot": "warm-branded-logo-link", children: /* @__PURE__ */ jsx3(WarmBrandedLogoMark, { size }) });
464
+ }
465
+ function WarmBrandedLogoMarkStatic({
466
+ className: _className,
467
+ style: _style,
468
+ logoClassName: _logoClassName
469
+ }) {
470
+ return /* @__PURE__ */ jsxs3("span", { "data-slot": "warm-branded-logo-static", children: [
471
+ /* @__PURE__ */ jsx3("span", { "aria-hidden": "true", "data-slot": "warm-branded-logo-static-fill" }),
472
+ /* @__PURE__ */ jsx3(
473
+ "svg",
474
+ {
475
+ xmlns: "http://www.w3.org/2000/svg",
476
+ viewBox: "0 0 600 600",
477
+ "data-slot": "warm-branded-logo-icon",
478
+ "data-size": "sm",
479
+ "aria-hidden": "true",
480
+ children: /* @__PURE__ */ jsx3("g", { transform: "translate(0 108)", children: _WarmLogoGlyph })
481
+ }
482
+ )
483
+ ] });
484
+ }
485
+
486
+ export {
487
+ WarmLogoIcon,
488
+ Logo,
489
+ WarmBrandedLogoMark,
490
+ WarmBrandedLogoLink,
491
+ WarmBrandedLogoMarkStatic
492
+ };
@@ -0,0 +1,116 @@
1
+ import {
2
+ SheetClose,
3
+ SheetContent,
4
+ SheetDescription,
5
+ SheetFooter,
6
+ SheetHeader,
7
+ SheetTitle,
8
+ SheetTrigger
9
+ } from "./chunk-EIEA5RJJ.js";
10
+
11
+ // ../ui/src/warmio/close-button/close-button.tsx
12
+ import * as React from "react";
13
+ import { XIcon } from "lucide-react";
14
+ import { jsx } from "react/jsx-runtime";
15
+ var WarmCloseButton = React.forwardRef(
16
+ function WarmCloseButton2({
17
+ size = "default",
18
+ type,
19
+ "aria-label": ariaLabel = "Close",
20
+ children: _children,
21
+ className: _className,
22
+ style: _style,
23
+ ...props
24
+ }, ref) {
25
+ return /* @__PURE__ */ jsx(
26
+ "button",
27
+ {
28
+ "data-slot": "close-button",
29
+ "data-warm-close-button": "",
30
+ "data-size": size,
31
+ ...props,
32
+ "data-warm-button": "",
33
+ "data-variant": "ghost",
34
+ ref,
35
+ type: type ?? "button",
36
+ "aria-label": ariaLabel,
37
+ children: /* @__PURE__ */ jsx(XIcon, { "data-slot": "close-button-icon", "aria-hidden": "true" })
38
+ }
39
+ );
40
+ }
41
+ );
42
+
43
+ // ../ui/src/warmio/sheet/sheet.tsx
44
+ import { jsx as jsx2 } from "react/jsx-runtime";
45
+ function SheetTrigger2({
46
+ className: _className,
47
+ style: _style,
48
+ ...props
49
+ }) {
50
+ return /* @__PURE__ */ jsx2(SheetTrigger, { ...props });
51
+ }
52
+ function SheetClose2({ className: _className, style: _style, ...props }) {
53
+ return /* @__PURE__ */ jsx2(SheetClose, { ...props });
54
+ }
55
+ function SheetContent2({
56
+ className: _className,
57
+ overlayClassName: _overlayClassName,
58
+ presentation,
59
+ responsive = "always",
60
+ style: _style,
61
+ width = "default",
62
+ ...props
63
+ }) {
64
+ return /* @__PURE__ */ jsx2(
65
+ SheetContent,
66
+ {
67
+ ...props,
68
+ closeButton: /* @__PURE__ */ jsx2(WarmCloseButton, { size: "default" }),
69
+ "data-presentation": presentation,
70
+ "data-responsive": responsive === "mobileOnly" ? "mobileOnly" : void 0,
71
+ "data-width": presentation === "navigation" || width === "default" ? void 0 : width
72
+ }
73
+ );
74
+ }
75
+ function SheetFooter2({ className: _className, style: _style, ...props }) {
76
+ return /* @__PURE__ */ jsx2(SheetFooter, { ...props });
77
+ }
78
+ function SheetHeader2({
79
+ className: _className,
80
+ presentation,
81
+ style: _style,
82
+ ...props
83
+ }) {
84
+ return /* @__PURE__ */ jsx2(
85
+ SheetHeader,
86
+ {
87
+ ...props,
88
+ "data-presentation": presentation === "navigation" ? "navigation" : void 0
89
+ }
90
+ );
91
+ }
92
+ function SheetTitle2({
93
+ className: _className,
94
+ presentation,
95
+ style: _style,
96
+ ...props
97
+ }) {
98
+ return /* @__PURE__ */ jsx2(SheetTitle, { ...props, "data-presentation": presentation });
99
+ }
100
+ function SheetDescription2({
101
+ className: _className,
102
+ style: _style,
103
+ ...props
104
+ }) {
105
+ return /* @__PURE__ */ jsx2(SheetDescription, { ...props });
106
+ }
107
+
108
+ export {
109
+ SheetTrigger2 as SheetTrigger,
110
+ SheetClose2 as SheetClose,
111
+ SheetContent2 as SheetContent,
112
+ SheetFooter2 as SheetFooter,
113
+ SheetHeader2 as SheetHeader,
114
+ SheetTitle2 as SheetTitle,
115
+ SheetDescription2 as SheetDescription
116
+ };
File without changes
File without changes
@@ -0,0 +1,65 @@
1
+ // ../ui/src/warmio/text/text.tsx
2
+ import * as React from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ var defaultTextElementByVariant = {
5
+ heading: "h3",
6
+ metric: "span",
7
+ body: "p",
8
+ caption: "span"
9
+ };
10
+ function Text({
11
+ as,
12
+ variant = "caption",
13
+ tone = "default",
14
+ align,
15
+ numeric = false,
16
+ mono = false,
17
+ size = "default",
18
+ truncate = false,
19
+ animateNumber = false,
20
+ className: _className,
21
+ style: _style,
22
+ ...props
23
+ }) {
24
+ const Component = as ?? defaultTextElementByVariant[variant];
25
+ return React.createElement(Component, {
26
+ ...props,
27
+ "data-animate-number": animateNumber || void 0,
28
+ "data-text-variant": variant,
29
+ "data-text-element": Component,
30
+ "data-text-size": size === "default" ? void 0 : size,
31
+ "data-text-tone": tone,
32
+ "data-text-align": align,
33
+ "data-mono": mono || void 0,
34
+ "data-text-numeric": numeric || void 0,
35
+ "data-text-truncate": truncate || void 0
36
+ });
37
+ }
38
+ Text.displayName = "WarmText";
39
+ function StackedDisplay({
40
+ align = "start",
41
+ firstLine,
42
+ presentation = "dashboard",
43
+ secondLine
44
+ }) {
45
+ return /* @__PURE__ */ jsxs(
46
+ Text,
47
+ {
48
+ as: "h2",
49
+ variant: "heading",
50
+ align,
51
+ "data-slot": "stacked-display",
52
+ "data-presentation": presentation,
53
+ children: [
54
+ /* @__PURE__ */ jsx("span", { "data-presentation": presentation, "data-text-line": "first", children: firstLine }),
55
+ /* @__PURE__ */ jsx("span", { "data-presentation": presentation, "data-text-line": "second", children: secondLine })
56
+ ]
57
+ }
58
+ );
59
+ }
60
+ StackedDisplay.displayName = "WarmStackedDisplay";
61
+
62
+ export {
63
+ Text,
64
+ StackedDisplay
65
+ };
@@ -1,4 +1,4 @@
1
- "use client";
1
+ import "./entries/dropdown-menu.css";
2
2
  import {
3
3
  DropdownMenu,
4
4
  DropdownMenuCheckboxItem,
@@ -11,8 +11,9 @@ import {
11
11
  DropdownMenuRadioItem,
12
12
  DropdownMenuSeparator,
13
13
  DropdownMenuTrigger
14
- } from "./chunks/chunk-KN6WVLCR.js";
15
- import "./chunks/chunk-VIB7OX7D.js";
14
+ } from "./chunks/chunk-MGX6ZL6Q.js";
15
+ import "./chunks/chunk-DHV2A22F.js";
16
+ import "./chunks/chunk-K36HD5J5.js";
16
17
  export {
17
18
  DropdownMenu,
18
19
  DropdownMenuCheckboxItem,