@spacesync/client 0.1.0 → 0.1.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 (122) hide show
  1. package/README.md +9 -14
  2. package/dist/analog-clock-picker.d.ts +2 -2
  3. package/dist/analog-clock-picker.js +12 -406
  4. package/dist/analog-clock-picker.js.map +1 -1
  5. package/dist/api.js +7 -87
  6. package/dist/api.js.map +1 -1
  7. package/dist/app-modal.d.ts +7 -8
  8. package/dist/app-modal.js +3 -74
  9. package/dist/app-modal.js.map +1 -1
  10. package/dist/app-shell-mobile-nav.d.ts +1 -2
  11. package/dist/app-shell-mobile-nav.js +2 -66
  12. package/dist/app-shell-mobile-nav.js.map +1 -1
  13. package/dist/app-web-shell.d.ts +2 -2
  14. package/dist/app-web-shell.js +1 -4
  15. package/dist/app-web-shell.js.map +1 -1
  16. package/dist/booking-schedule-calendars.d.ts +12 -12
  17. package/dist/booking-schedule-calendars.js +13 -402
  18. package/dist/booking-schedule-calendars.js.map +1 -1
  19. package/dist/chat-stick-to-bottom.d.ts +1 -2
  20. package/dist/chat-stick-to-bottom.js +12 -48
  21. package/dist/chat-stick-to-bottom.js.map +1 -1
  22. package/dist/chunk-4A6RCBB5.js +4925 -0
  23. package/dist/chunk-4A6RCBB5.js.map +1 -0
  24. package/dist/chunk-4NNK5IXY.js +79 -0
  25. package/dist/chunk-4NNK5IXY.js.map +1 -0
  26. package/dist/chunk-4Y5DBM6Z.js +6 -0
  27. package/dist/chunk-4Y5DBM6Z.js.map +1 -0
  28. package/dist/chunk-7YCAAP43.js +107 -0
  29. package/dist/chunk-7YCAAP43.js.map +1 -0
  30. package/dist/chunk-DMPSQ22Q.js +11 -0
  31. package/dist/chunk-DMPSQ22Q.js.map +1 -0
  32. package/dist/chunk-FCY5FYJB.js +104 -0
  33. package/dist/chunk-FCY5FYJB.js.map +1 -0
  34. package/dist/chunk-H7EX6B6N.js +580 -0
  35. package/dist/chunk-H7EX6B6N.js.map +1 -0
  36. package/dist/chunk-HCHASUB6.js +13 -0
  37. package/dist/chunk-HCHASUB6.js.map +1 -0
  38. package/dist/chunk-L65F4EMK.js +34 -0
  39. package/dist/chunk-L65F4EMK.js.map +1 -0
  40. package/dist/chunk-LUB7QWGU.js +301 -0
  41. package/dist/chunk-LUB7QWGU.js.map +1 -0
  42. package/dist/chunk-OMSJWTSZ.js +120 -0
  43. package/dist/chunk-OMSJWTSZ.js.map +1 -0
  44. package/dist/chunk-OWNUMPUC.js +9 -0
  45. package/dist/chunk-OWNUMPUC.js.map +1 -0
  46. package/dist/chunk-P65TMY3D.js +87 -0
  47. package/dist/chunk-P65TMY3D.js.map +1 -0
  48. package/dist/chunk-PBNBLCC2.js +84 -0
  49. package/dist/chunk-PBNBLCC2.js.map +1 -0
  50. package/dist/chunk-RV5PMZYZ.js +63 -0
  51. package/dist/chunk-RV5PMZYZ.js.map +1 -0
  52. package/dist/chunk-VHINHHZQ.js +48 -0
  53. package/dist/chunk-VHINHHZQ.js.map +1 -0
  54. package/dist/chunk-VVXGQKN7.js +107 -0
  55. package/dist/chunk-VVXGQKN7.js.map +1 -0
  56. package/dist/chunk-XU3EFSQX.js +22 -0
  57. package/dist/chunk-XU3EFSQX.js.map +1 -0
  58. package/dist/chunk-YAVEMXXV.js +381 -0
  59. package/dist/chunk-YAVEMXXV.js.map +1 -0
  60. package/dist/chunk-ZIJQ7BXU.js +27 -0
  61. package/dist/chunk-ZIJQ7BXU.js.map +1 -0
  62. package/dist/detail-page-header.d.ts +3 -3
  63. package/dist/detail-page-header.js +5 -149
  64. package/dist/detail-page-header.js.map +1 -1
  65. package/dist/{dialog-CIdvylPK.d.ts → dialog-CPkbi5N3.d.ts} +10 -11
  66. package/dist/file-picker-field.d.ts +2 -2
  67. package/dist/file-picker-field.js +3 -163
  68. package/dist/file-picker-field.js.map +1 -1
  69. package/dist/file-viewer-dialog.d.ts +2 -2
  70. package/dist/file-viewer-dialog.js +12 -223
  71. package/dist/file-viewer-dialog.js.map +1 -1
  72. package/dist/floor-switcher.d.ts +2 -2
  73. package/dist/floor-switcher.js +13 -323
  74. package/dist/floor-switcher.js.map +1 -1
  75. package/dist/forms.js +1 -23
  76. package/dist/forms.js.map +1 -1
  77. package/dist/image-picker-field.d.ts +2 -2
  78. package/dist/image-picker-field.js +3 -48
  79. package/dist/image-picker-field.js.map +1 -1
  80. package/dist/layout-canvas-view.d.ts +2 -2
  81. package/dist/layout-canvas-view.js +17 -220
  82. package/dist/layout-canvas-view.js.map +1 -1
  83. package/dist/lib/dateDisplay.js +1 -82
  84. package/dist/lib/dateDisplay.js.map +1 -1
  85. package/dist/live-resource-meta.js +1 -25
  86. package/dist/live-resource-meta.js.map +1 -1
  87. package/dist/live-space-pulse-dot.d.ts +2 -2
  88. package/dist/live-space-pulse-dot.js +2 -16
  89. package/dist/live-space-pulse-dot.js.map +1 -1
  90. package/dist/notification-sidebar-preview.d.ts +3 -3
  91. package/dist/notification-sidebar-preview.js +3 -61
  92. package/dist/notification-sidebar-preview.js.map +1 -1
  93. package/dist/page-list-chrome.d.ts +25 -25
  94. package/dist/page-list-chrome.js +6 -968
  95. package/dist/page-list-chrome.js.map +1 -1
  96. package/dist/platform-support-message-composer.d.ts +4 -4
  97. package/dist/platform-support-message-composer.js +15 -218
  98. package/dist/platform-support-message-composer.js.map +1 -1
  99. package/dist/shell-sidebar-nav.js +8 -13
  100. package/dist/shell-sidebar-nav.js.map +1 -1
  101. package/dist/shell-theme.js +1 -7
  102. package/dist/shell-theme.js.map +1 -1
  103. package/dist/shell-top-bar-chrome.js +3 -103
  104. package/dist/shell-top-bar-chrome.js.map +1 -1
  105. package/dist/shell-top-bar.d.ts +3 -3
  106. package/dist/shell-top-bar.js +1 -69
  107. package/dist/shell-top-bar.js.map +1 -1
  108. package/dist/support-presence-status.d.ts +2 -2
  109. package/dist/support-presence-status.js +3 -41
  110. package/dist/support-presence-status.js.map +1 -1
  111. package/dist/theme-appearance-control.d.ts +2 -2
  112. package/dist/theme-appearance-control.js +4 -63
  113. package/dist/theme-appearance-control.js.map +1 -1
  114. package/dist/theme-boot-script.js +1 -2
  115. package/dist/theme-boot-script.js.map +1 -1
  116. package/dist/theme-provider.d.ts +2 -2
  117. package/dist/theme-provider.js +2 -23
  118. package/dist/theme-provider.js.map +1 -1
  119. package/dist/ui.d.ts +261 -262
  120. package/dist/ui.js +11 -5635
  121. package/dist/ui.js.map +1 -1
  122. package/package.json +11 -2
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/api/envelope.ts","../src/api/errors.ts"],"names":["message","z"],"mappings":";;;;AAeO,IAAM,oBAAA,GAAuB,EACjC,MAAA,CAAO;AAAA,EACN,IAAA,EAAM,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC1B,KAAA,EAAO,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC3B,KAAA,EAAO,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC3B,UAAA,EAAY,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AACzB,CAAC,EACA,WAAA;AAEI,IAAM,kBAAA,GAAqB,EAAE,MAAA,CAAO;AAAA,EACzC,OAAA,EAAS,CAAA,CAAE,OAAA,CAAQ,KAAK,CAAA;AAAA,EACxB,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,EACb,KAAA,EAAO,EAAE,MAAA,CAAO;AAAA,IACd,OAAA,EAAS,EAAE,MAAA,EAAO;AAAA,IAClB,OAAA,EAAS,CAAA,CAAE,OAAA,EAAQ,CAAE,QAAA;AAAS,GAC/B,CAAA;AAAA,EACD,IAAA,EAAM,qBAAqB,QAAA;AAC7B,CAAC;AAQM,SAAS,qBAAiD,UAAA,EAAmB;AAClF,EAAA,OAAO,EAAE,MAAA,CAAO;AAAA,IACd,OAAA,EAAS,CAAA,CAAE,OAAA,CAAQ,IAAI,CAAA;AAAA,IACvB,IAAA,EAAM,UAAA;AAAA,IACN,KAAA,EAA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,KAAA,GAAQ,GAAA,CAAI,OAAA,GAAU,yCAAA;AACrD,EAAA,OAAO,IAAI,cAAA,CAAe,MAAA,EAAQ,OAAO,CAAA;AAC3C","file":"chunk-P65TMY3D.js","sourcesContent":["import { z } from \"zod\";\n\n/**\n * Mirrors `apps/api/src/lib/ApiResponse.ts` exactly. Every route on the\n * backend responds with this envelope (the only exceptions are documented\n * per-service, e.g. `POST /auth/logout` returns 204 with no body).\n */\nexport interface ApiResponseMeta {\n page?: number;\n limit?: number;\n total?: number;\n totalPages?: number;\n [key: string]: unknown;\n}\n\nexport const paginationMetaSchema = z\n .object({\n page: z.number().optional(),\n limit: z.number().optional(),\n total: z.number().optional(),\n totalPages: z.number().optional(),\n })\n .passthrough();\n\nexport const apiErrorBodySchema = z.object({\n success: z.literal(false),\n data: z.null(),\n error: z.object({\n message: z.string(),\n details: z.unknown().optional(),\n }),\n meta: paginationMetaSchema.optional(),\n});\n\nexport type ApiErrorBody = z.infer<typeof apiErrorBodySchema>;\n\n/**\n * Builds a schema for the success envelope around a given data schema, e.g.\n * `apiSuccessBodySchema(bookingSchema)` or `apiSuccessBodySchema(z.array(bookingSchema))`.\n */\nexport function apiSuccessBodySchema<TData extends z.ZodTypeAny>(dataSchema: TData) {\n return z.object({\n success: z.literal(true),\n data: dataSchema,\n error: z.null(),\n meta: paginationMetaSchema.optional(),\n });\n}\n\nexport type ApiSuccessBody<TData> = {\n success: true;\n data: TData;\n error: null;\n meta?: ApiResponseMeta;\n};\n","import axios from \"axios\";\nimport { z } from \"zod\";\nimport { apiErrorBodySchema } from \"./envelope\";\n\n/**\n * - \"network\": the request never got a response at all (server unreachable, timeout, CORS/preflight failure).\n * - \"validation\": HTTP 400 from our API where `error.details` is the Zod-issues shape produced by\n * `validate.middleware.ts` — field-mappable.\n * - \"http\": every other status our API returns (401, 403, 404, 409, 500, ...). Not field-specific by default.\n */\nexport type ApiClientErrorKind = \"network\" | \"validation\" | \"http\";\n\nexport interface ApiFieldError {\n /** Dot-path, e.g. \"email\" — matched against react-hook-form field names. */\n path: string;\n message: string;\n}\n\nexport interface ApiClientErrorOptions {\n statusCode?: number;\n details?: unknown;\n fieldErrors?: ApiFieldError[];\n}\n\nexport class ApiClientError extends Error {\n readonly kind: ApiClientErrorKind;\n readonly statusCode?: number;\n readonly details?: unknown;\n readonly fieldErrors?: ApiFieldError[];\n\n constructor(kind: ApiClientErrorKind, message: string, options: ApiClientErrorOptions = {}) {\n super(message);\n this.name = \"ApiClientError\";\n this.kind = kind;\n this.statusCode = options.statusCode;\n this.details = options.details;\n this.fieldErrors = options.fieldErrors;\n Object.setPrototypeOf(this, ApiClientError.prototype);\n }\n}\n\nexport function isApiClientError(err: unknown): err is ApiClientError {\n return err instanceof ApiClientError;\n}\n\ninterface ZodLikeIssue {\n path: Array<string | number>;\n message: string;\n}\n\nfunction isZodIssueArray(details: unknown): details is ZodLikeIssue[] {\n return (\n Array.isArray(details) &&\n details.length > 0 &&\n details.every(\n (issue) =>\n typeof issue === \"object\" &&\n issue !== null &&\n Array.isArray((issue as ZodLikeIssue).path) &&\n typeof (issue as ZodLikeIssue).message === \"string\",\n )\n );\n}\n\nfunction toFieldErrors(issues: ZodLikeIssue[]): ApiFieldError[] {\n return issues.map((issue) => ({\n path: issue.path.join(\".\"),\n message: issue.message,\n }));\n}\n\n/**\n * Normalizes anything that can be thrown while making a request (axios error,\n * envelope-shape mismatch, or an unexpected exception) into one `ApiClientError`,\n * classified by `kind` so callers like `useApiForm` can apply a sensible default\n * per failure mode instead of treating a dropped connection the same as a 409.\n */\nexport function normalizeAxiosError(err: unknown): ApiClientError {\n if (isApiClientError(err)) return err;\n\n if (axios.isAxiosError(err)) {\n if (!err.response) {\n return new ApiClientError(\"network\", \"Unable to reach the server. Check your connection and try again.\");\n }\n\n const status = err.response.status;\n const parsedBody = apiErrorBodySchema.safeParse(err.response.data);\n const message = parsedBody.success ? parsedBody.data.error.message : `Request failed with status ${status}`;\n const details = parsedBody.success ? parsedBody.data.error.details : undefined;\n\n if (status === 400 && isZodIssueArray(details)) {\n return new ApiClientError(\"validation\", message, {\n statusCode: status,\n details,\n fieldErrors: toFieldErrors(details),\n });\n }\n\n return new ApiClientError(\"http\", message, { statusCode: status, details });\n }\n\n if (err instanceof z.ZodError) {\n // The server responded 2xx but the payload didn't match the schema we expected -\n // a frontend/backend contract mismatch, not a user-facing form error.\n return new ApiClientError(\"http\", \"Unexpected response shape from the server.\", {\n details: err.issues,\n });\n }\n\n const message = err instanceof Error ? err.message : \"Something went wrong. Please try again.\";\n return new ApiClientError(\"http\", message);\n}\n"]}
@@ -0,0 +1,84 @@
1
+ // src/lib/dateDisplay.ts
2
+ function parseWallClockHm(value) {
3
+ const m = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(value.trim());
4
+ if (!m) return void 0;
5
+ const h = Number(m[1]);
6
+ const min = Number(m[2]);
7
+ if (h > 23 || min > 59) return void 0;
8
+ return { h, m: min };
9
+ }
10
+ function toWallClockHmStr(h, m) {
11
+ return `${String(h).padStart(2, "0")}:${String(m).padStart(2, "0")}`;
12
+ }
13
+ function formatWallClockTime(value, timeFormat) {
14
+ const p = parseWallClockHm(value);
15
+ if (!p) return value.trim() || "\u2014";
16
+ if (timeFormat === "24h") return toWallClockHmStr(p.h, p.m);
17
+ const ap = p.h >= 12 ? "PM" : "AM";
18
+ const h12 = p.h % 12 || 12;
19
+ return `${h12}:${String(p.m).padStart(2, "0")} ${ap}`;
20
+ }
21
+ function addWallClockMinutes(value, minutes) {
22
+ const p = parseWallClockHm(value);
23
+ if (!p) return value;
24
+ const total = p.h * 60 + p.m + minutes;
25
+ const wrapped = (total % (24 * 60) + 24 * 60) % (24 * 60);
26
+ return toWallClockHmStr(Math.floor(wrapped / 60), wrapped % 60);
27
+ }
28
+ function formatCalendarDate(ymd) {
29
+ if (!ymd || !/^\d{4}-\d{2}-\d{2}$/.test(ymd)) return ymd || "\u2014";
30
+ const [y, m, d] = ymd.split("-").map(Number);
31
+ return new Date(y, m - 1, d).toLocaleDateString("en-US", {
32
+ month: "short",
33
+ day: "numeric",
34
+ year: "numeric"
35
+ });
36
+ }
37
+ function toDateStr(date) {
38
+ const y = date.getFullYear();
39
+ const m = String(date.getMonth() + 1).padStart(2, "0");
40
+ const d = String(date.getDate()).padStart(2, "0");
41
+ return `${y}-${m}-${d}`;
42
+ }
43
+ function isSameDay(a, b) {
44
+ return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
45
+ }
46
+ function formatDate(date) {
47
+ if (isSameDay(date, /* @__PURE__ */ new Date())) return "Today";
48
+ return date.toLocaleDateString("en-US", {
49
+ weekday: "short",
50
+ month: "short",
51
+ day: "numeric"
52
+ });
53
+ }
54
+ var MS_MIN = 6e4;
55
+ var MS_HOUR = 60 * MS_MIN;
56
+ var MS_DAY = 24 * MS_HOUR;
57
+ function formatRelativeTimeAgo(iso, now = /* @__PURE__ */ new Date()) {
58
+ try {
59
+ const d = new Date(iso.trim());
60
+ if (!Number.isFinite(d.getTime())) return "";
61
+ let diffMs = now.getTime() - d.getTime();
62
+ if (diffMs < 0) diffMs = 0;
63
+ const sec = Math.floor(diffMs / 1e3);
64
+ if (sec < 60) return "just now";
65
+ const min = Math.floor(diffMs / MS_MIN);
66
+ if (min < 60) return `${min}m ago`;
67
+ const hr = Math.floor(diffMs / MS_HOUR);
68
+ if (hr < 24) return `${hr}h ago`;
69
+ const day = Math.floor(diffMs / MS_DAY);
70
+ if (day < 7) return `${day}d ago`;
71
+ const week = Math.floor(day / 7);
72
+ if (week < 5) return `${week}w ago`;
73
+ const mo = Math.floor(day / 30);
74
+ if (mo < 12) return `${mo}mo ago`;
75
+ const yr = Math.floor(day / 365);
76
+ return `${Math.max(1, yr)}y ago`;
77
+ } catch {
78
+ return "";
79
+ }
80
+ }
81
+
82
+ export { addWallClockMinutes, formatCalendarDate, formatDate, formatRelativeTimeAgo, formatWallClockTime, isSameDay, parseWallClockHm, toDateStr, toWallClockHmStr };
83
+ //# sourceMapp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number } | undefined {\n const m = /^([01]\\d|2[0-3]):([0-5]\\d)$/.exec(value.trim());\n if (!m) return undefined;\n const h = Number(m[1]);\n const min = Number(m[2]);\n if (h > 23 || min > 59) return undefined;\n return { h, m: min };\n}\n\nexport function toWallClockHmStr(h: number, m: number): string {\n return `${String(h).padStart(2, \"0\")}:${String(m).padStart(2, \"0\")}`;\n}\n\n/** Format stored `HH:mm` without timezone conversion. */\nexport function formatWallClockTime(value: string, timeFormat: \"12h\" | \"24h\"): string {\n const p = parseWallClockHm(value);\n if (!p) return value.trim() || \"—\";\n if (timeFormat === \"24h\") return toWallClockHmStr(p.h, p.m);\n const ap = p.h >= 12 ? \"PM\" : \"AM\";\n const h12 = p.h % 12 || 12;\n return `${h12}:${String(p.m).padStart(2, \"0\")} ${ap}`;\n}\n\n/** Add minutes to a wall-clock `HH:mm`, wrapping at 24h. */\nexport function addWallClockMinutes(value: string, minutes: number): string {\n const p = parseWallClockHm(value);\n if (!p) return value;\n const total = p.h * 60 + p.m + minutes;\n const wrapped = ((total % (24 * 60)) + 24 * 60) % (24 * 60);\n return toWallClockHmStr(Math.floor(wrapped / 60), wrapped % 60);\n}\n\n/** Format `YYYY-MM-DD` as a calendar date (no timezone shift). */\nexport function formatCalendarDate(ymd: string): string {\n if (!ymd || !/^\\d{4}-\\d{2}-\\d{2}$/.test(ymd)) return ymd || \"—\";\n const [y, m, d] = ymd.split(\"-\").map(Number);\n return new Date(y, m - 1, d).toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n year: \"numeric\",\n });\n}\n\n/** ISO `yyyy-mm-dd` for a local calendar date. */\nexport function toDateStr(date: Date): string {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, \"0\");\n const d = String(date.getDate()).padStart(2, \"0\");\n return `${y}-${m}-${d}`;\n}\n\nexport function isSameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\n\n/** Short label for a date; shows \"Today\" when it matches the current local day. */\nexport function formatDate(date: Date): string {\n if (isSameDay(date, new Date())) return \"Today\";\n return date.toLocaleDateString(\"en-US\", {\n weekday: \"short\",\n month: \"short\",\n day: \"numeric\",\n });\n}\n\nconst MS_MIN = 60_000;\nconst MS_HOUR = 60 * MS_MIN;\nconst MS_DAY = 24 * MS_HOUR;\n\n/**\n * Compact relative time for feeds (e.g. announcements, notifications): `2m ago`, `2d ago`.\n * Uses elapsed wall time from `now` (defaults to current time). Returns \"\" if `iso` is unparseable.\n */\nexport function formatRelativeTimeAgo(iso: string, now: Date = new Date()): string {\n try {\n const d = new Date(iso.trim());\n if (!Number.isFinite(d.getTime())) return \"\";\n let diffMs = now.getTime() - d.getTime();\n if (diffMs < 0) diffMs = 0;\n const sec = Math.floor(diffMs / 1000);\n if (sec < 60) return \"just now\";\n const min = Math.floor(diffMs / MS_MIN);\n if (min < 60) return `${min}m ago`;\n const hr = Math.floor(diffMs / MS_HOUR);\n if (hr < 24) return `${hr}h ago`;\n const day = Math.floor(diffMs / MS_DAY);\n if (day < 7) return `${day}d ago`;\n const week = Math.floor(day / 7);\n if (week < 5) return `${week}w ago`;\n const mo = Math.floor(day / 30);\n if (mo < 12) return `${mo}mo ago`;\n const yr = Math.floor(day / 365);\n return `${Math.max(1, yr)}y ago`;\n } catch {\n return \"\";\n }\n}\n"]}
@@ -0,0 +1,63 @@
1
+ import { cn } from './chunk-DMPSQ22Q.js';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
5
+
6
+ function Label({ className, ...props }) {
7
+ return /* @__PURE__ */ jsx(
8
+ LabelPrimitive.Root,
9
+ {
10
+ "data-slot": "label",
11
+ className: cn(
12
+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
13
+ className
14
+ ),
15
+ ...props
16
+ }
17
+ );
18
+ }
19
+ function RadioGroup({
20
+ className,
21
+ ...props
22
+ }) {
23
+ return /* @__PURE__ */ jsx(
24
+ RadioGroupPrimitive.Root,
25
+ {
26
+ "data-slot": "radio-group",
27
+ className: cn("grid gap-3", className),
28
+ ...props
29
+ }
30
+ );
31
+ }
32
+ function RadioGroupItem({
33
+ className,
34
+ ...props
35
+ }) {
36
+ return /* @__PURE__ */ jsx(
37
+ RadioGroupPrimitive.Item,
38
+ {
39
+ "data-slot": "radio-group-item",
40
+ className: cn(
41
+ "flex size-[18px] shrink-0 items-center justify-center rounded-full border border-border bg-card shadow-sm outline-none transition-[border-color,box-shadow]",
42
+ "focus-visible:border-blue-500 focus-visible:ring-[3px] focus-visible:ring-blue-500/25",
43
+ "aria-invalid:border-red-400 aria-invalid:ring-red-500/20",
44
+ "disabled:cursor-not-allowed disabled:opacity-50",
45
+ "data-[state=checked]:border-blue-600",
46
+ className
47
+ ),
48
+ ...props,
49
+ children: /* @__PURE__ */ jsx(
50
+ RadioGroupPrimitive.Indicator,
51
+ {
52
+ "data-slot": "radio-group-indicator",
53
+ className: "flex items-center justify-center",
54
+ children: /* @__PURE__ */ jsx("span", { className: "size-2.5 rounded-full bg-blue-600" })
55
+ }
56
+ )
57
+ }
58
+ );
59
+ }
60
+
61
+ export { Label, RadioGroup, RadioGroupItem };
62
+ //# sourceMappingURL=chunk-RV5PMZYZ.js.map
63
+ //# sourceMappingURL=chunk-RV5PMZYZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/label.tsx","../src/ui/radio-group.tsx"],"names":["jsx"],"mappings":";;;;;AAOA,SAAS,KAAA,CAAM,EAAE,SAAA,EAAW,GAAG,OAAM,EAAqD;AACxF,EAAA,uBACE,GAAA;AAAA,IAAgB,cAAA,CAAA,IAAA;AAAA,IAAf;AAAA,MACC,WAAA,EAAU,OAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,qNAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;ACXA,SAAS,UAAA,CAAW;AAAA,EAClB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA0D;AACxD,EAAA,uBACEA,GAAAA;AAAA,IAAqB,mBAAA,CAAA,IAAA;AAAA,IAApB;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,YAAA,EAAc,SAAS,CAAA;AAAA,MACpC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,cAAA,CAAe;AAAA,EACtB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA0D;AACxD,EAAA,uBACEA,GAAAA;AAAA,IAAqB,mBAAA,CAAA,IAAA;AAAA,IAApB;AAAA,MACC,WAAA,EAAU,kBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,6JAAA;AAAA,QACA,uFAAA;AAAA,QACA,0DAAA;AAAA,QACA,iDAAA;AAAA,QACA,sCAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAAA,GAAAA;AAAA,QAAqB,mBAAA,CAAA,SAAA;AAAA,QAApB;AAAA,UACC,WAAA,EAAU,uBAAA;AAAA,UACV,SAAA,EAAU,kCAAA;AAAA,UAEV,QAAA,kBAAAA,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,mCAAA,EAAoC;AAAA;AAAA;AACtD;AAAA,GACF;AAEJ","file":"chunk-RV5PMZYZ.js","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\n\nimport { cn } from \"./utils\";\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\n\nimport { cn } from \"./utils\";\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn(\"grid gap-3\", className)}\n {...props}\n />\n );\n}\n\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n \"flex size-[18px] shrink-0 items-center justify-center rounded-full border border-border bg-card shadow-sm outline-none transition-[border-color,box-shadow]\",\n \"focus-visible:border-blue-500 focus-visible:ring-[3px] focus-visible:ring-blue-500/25\",\n \"aria-invalid:border-red-400 aria-invalid:ring-red-500/20\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"data-[state=checked]:border-blue-600\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"flex items-center justify-center\"\n >\n <span className=\"size-2.5 rounded-full bg-blue-600\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\nexport { RadioGroup, RadioGroupItem };\n"]}
@@ -0,0 +1,48 @@
1
+ import { cn } from './chunk-DMPSQ22Q.js';
2
+ import * as React from 'react';
3
+ import { Slot } from '@radix-ui/react-slot';
4
+ import { cva } from 'class-variance-authority';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ var buttonVariants = cva(
8
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-all disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: "bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80 active:scale-[0.98]",
13
+ destructive: "bg-destructive text-white hover:bg-destructive/90 active:bg-destructive/80 active:scale-[0.98] focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 dark:active:bg-destructive/70",
14
+ outline: "border bg-background text-foreground hover:bg-accent hover:text-accent-foreground active:bg-accent/80 active:scale-[0.98] dark:bg-input/30 dark:border-input dark:hover:bg-input/50 dark:active:bg-input/60",
15
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 active:bg-secondary/70 active:scale-[0.98]",
16
+ ghost: "hover:bg-accent hover:text-accent-foreground active:bg-accent/90 active:scale-[0.98] dark:hover:bg-accent/50 dark:active:bg-accent/40",
17
+ link: "text-primary underline-offset-4 hover:underline active:text-primary/80"
18
+ },
19
+ size: {
20
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
21
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
22
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
23
+ icon: "size-9 rounded-md"
24
+ }
25
+ },
26
+ defaultVariants: {
27
+ variant: "default",
28
+ size: "default"
29
+ }
30
+ }
31
+ );
32
+ var Button = React.forwardRef(function Button2({ className, variant, size, asChild = false, ...props }, ref) {
33
+ const Comp = asChild ? Slot : "button";
34
+ return /* @__PURE__ */ jsx(
35
+ Comp,
36
+ {
37
+ ref,
38
+ "data-slot": "button",
39
+ className: cn(buttonVariants({ variant, size }), className),
40
+ ...props
41
+ }
42
+ );
43
+ });
44
+ Button.displayName = "Button";
45
+
46
+ export { Button, buttonVariants };
47
+ //# sourceMappingURL=chunk-VHINHHZQ.js.map
48
+ //# sourceMappingURL=chunk-VHINHHZQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/button.tsx"],"names":["Button"],"mappings":";;;;;;AAMA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB,weAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EACE,iGAAA;AAAA,QACF,WAAA,EACE,8NAAA;AAAA,QACF,OAAA,EACE,6MAAA;AAAA,QACF,SAAA,EACE,yGAAA;AAAA,QACF,KAAA,EACE,uIAAA;AAAA,QACF,IAAA,EAAM;AAAA,OACR;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS,+BAAA;AAAA,QACT,EAAA,EAAI,+CAAA;AAAA,QACJ,EAAA,EAAI,sCAAA;AAAA,QACJ,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AAEA,IAAM,MAAA,GAAe,KAAA,CAAA,UAAA,CAMnB,SAASA,OAAAA,CAAO,EAAE,SAAA,EAAW,OAAA,EAAS,IAAA,EAAM,OAAA,GAAU,KAAA,EAAO,GAAG,KAAA,IAAS,GAAA,EAAK;AAC9E,EAAA,MAAM,IAAA,GAAO,UAAU,IAAA,GAAO,QAAA;AAE9B,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAA,EAAU,QAAA;AAAA,MACV,SAAA,EAAW,GAAG,cAAA,CAAe,EAAE,SAAS,IAAA,EAAM,GAAG,SAAS,CAAA;AAAA,MACzD,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC;AACD,MAAA,CAAO,WAAA,GAAc,QAAA","file":"chunk-VHINHHZQ.js","sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"./utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-all disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80 active:scale-[0.98]\",\n destructive:\n \"bg-destructive text-white hover:bg-destructive/90 active:bg-destructive/80 active:scale-[0.98] focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 dark:active:bg-destructive/70\",\n outline:\n \"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground active:bg-accent/80 active:scale-[0.98] dark:bg-input/30 dark:border-input dark:hover:bg-input/50 dark:active:bg-input/60\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80 active:bg-secondary/70 active:scale-[0.98]\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground active:bg-accent/90 active:scale-[0.98] dark:hover:bg-accent/50 dark:active:bg-accent/40\",\n link: \"text-primary underline-offset-4 hover:underline active:text-primary/80\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9 rounded-md\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nconst Button = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }\n>(function Button({ className, variant, size, asChild = false, ...props }, ref) {\n const Comp = asChild ? Slot : \"button\";\n\n return (\n <Comp\n ref={ref}\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size }), className)}\n {...props}\n />\n );\n});\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n"]}
@@ -0,0 +1,107 @@
1
+ import { cn } from './chunk-DMPSQ22Q.js';
2
+ import { Drawer as Drawer$1 } from 'vaul';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+
5
+ function Drawer({ ...props }) {
6
+ return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
7
+ }
8
+ function DrawerTrigger({ ...props }) {
9
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
10
+ }
11
+ function DrawerPortal({ ...props }) {
12
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
13
+ }
14
+ function DrawerClose({ ...props }) {
15
+ return /* @__PURE__ */ jsx(Drawer$1.Close, { "data-slot": "drawer-close", ...props });
16
+ }
17
+ function DrawerOverlay({
18
+ className,
19
+ ...props
20
+ }) {
21
+ return /* @__PURE__ */ jsx(
22
+ Drawer$1.Overlay,
23
+ {
24
+ "data-slot": "drawer-overlay",
25
+ className: cn(
26
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
27
+ className
28
+ ),
29
+ ...props
30
+ }
31
+ );
32
+ }
33
+ function DrawerContent({
34
+ className,
35
+ children,
36
+ ...props
37
+ }) {
38
+ return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
39
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
40
+ /* @__PURE__ */ jsxs(
41
+ Drawer$1.Content,
42
+ {
43
+ "data-slot": "drawer-content",
44
+ className: cn(
45
+ "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
46
+ "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
47
+ "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
48
+ "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
49
+ "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
50
+ className
51
+ ),
52
+ ...props,
53
+ children: [
54
+ /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
55
+ children
56
+ ]
57
+ }
58
+ )
59
+ ] });
60
+ }
61
+ function DrawerHeader({ className, ...props }) {
62
+ return /* @__PURE__ */ jsx(
63
+ "div",
64
+ {
65
+ "data-slot": "drawer-header",
66
+ className: cn("flex flex-col gap-1.5 p-4", className),
67
+ ...props
68
+ }
69
+ );
70
+ }
71
+ function DrawerFooter({ className, ...props }) {
72
+ return /* @__PURE__ */ jsx(
73
+ "div",
74
+ {
75
+ "data-slot": "drawer-footer",
76
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
77
+ ...props
78
+ }
79
+ );
80
+ }
81
+ function DrawerTitle({ className, ...props }) {
82
+ return /* @__PURE__ */ jsx(
83
+ Drawer$1.Title,
84
+ {
85
+ "data-slot": "drawer-title",
86
+ className: cn("text-foreground font-semibold", className),
87
+ ...props
88
+ }
89
+ );
90
+ }
91
+ function DrawerDescription({
92
+ className,
93
+ ...props
94
+ }) {
95
+ return /* @__PURE__ */ jsx(
96
+ Drawer$1.Description,
97
+ {
98
+ "data-slot": "drawer-description",
99
+ className: cn("text-muted-foreground text-sm", className),
100
+ ...props
101
+ }
102
+ );
103
+ }
104
+
105
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
106
+ //# sourceMappingURL=chunk-VVXGQKN7.js.map
107
+ //# sourceMappingURL=chunk-VVXGQKN7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/drawer.tsx"],"names":["DrawerPrimitive"],"mappings":";;;;AAOA,SAAS,MAAA,CAAO,EAAE,GAAG,KAAA,EAAM,EAAsD;AAC/E,EAAA,2BAAQA,QAAA,CAAgB,IAAA,EAAhB,EAAqB,WAAA,EAAU,QAAA,EAAU,GAAG,KAAA,EAAO,CAAA;AAC7D;AAEA,SAAS,aAAA,CAAc,EAAE,GAAG,KAAA,EAAM,EAAyD;AACzF,EAAA,2BAAQA,QAAA,CAAgB,OAAA,EAAhB,EAAwB,WAAA,EAAU,gBAAA,EAAkB,GAAG,KAAA,EAAO,CAAA;AACxE;AAEA,SAAS,YAAA,CAAa,EAAE,GAAG,KAAA,EAAM,EAAwD;AACvF,EAAA,2BAAQA,QAAA,CAAgB,MAAA,EAAhB,EAAuB,WAAA,EAAU,eAAA,EAAiB,GAAG,KAAA,EAAO,CAAA;AACtE;AAEA,SAAS,WAAA,CAAY,EAAE,GAAG,KAAA,EAAM,EAAuD;AACrF,EAAA,2BAAQA,QAAA,CAAgB,KAAA,EAAhB,EAAsB,WAAA,EAAU,cAAA,EAAgB,GAAG,KAAA,EAAO,CAAA;AACpE;AAEA,SAAS,aAAA,CAAc;AAAA,EACrB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAy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EAAU,eAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,iCAAA,EAAmC,SAAS,CAAA;AAAA,MACzD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAuD;AAChG,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,KAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,iBAAA,CAAkB;AAAA,EACzB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA6D;AAC3D,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,WAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACN;AAEJ","file":"chunk-VVXGQKN7.js","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"./utils\";\n\nfunction Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />;\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n \"group/drawer-content bg-background fixed z-50 flex h-auto flex-col\",\n \"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b\",\n \"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t\",\n \"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm\",\n \"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\"flex flex-col gap-1.5 p-4\", className)}\n {...props}\n />\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n );\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn(\"text-foreground font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n"]}
@@ -0,0 +1,22 @@
1
+ import { WEB_THEME_STORAGE_KEY } from './chunk-4Y5DBM6Z.js';
2
+ import { ThemeProvider as ThemeProvider$1 } from 'next-themes';
3
+ export { useTheme } from 'next-themes';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ function ThemeProvider({ children }) {
7
+ return /* @__PURE__ */ jsx(
8
+ ThemeProvider$1,
9
+ {
10
+ attribute: "class",
11
+ defaultTheme: "light",
12
+ enableSystem: true,
13
+ storageKey: WEB_THEME_STORAGE_KEY,
14
+ disableTransitionOnChange: true,
15
+ children
16
+ }
17
+ );
18
+ }
19
+
20
+ export { ThemeProvider };
21
+ //# sourceMappingURL=chunk-XU3EFSQX.js.map
22
+ //# sourceMappingURL=chunk-XU3EFSQX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme/theme-provider.tsx"],"names":["NextThemesProvider"],"mappings":";;;;;AAIO,SAAS,aAAA,CAAc,EAAE,QAAA,EAAS,EAA4B;AACnE,EAAA,uBACE,GAAA;AAAA,IAACA,eAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAU,OAAA;AAAA,MACV,YAAA,EAAa,OAAA;AAAA,MACb,YAAA,EAAY,IAAA;AAAA,MACZ,UAAA,EAAY,qBAAA;AAAA,MACZ,yBAAA,EAAyB,IAAA;AAAA,MAExB;AAAA;AAAA,GACH;AAEJ","file":"chunk-XU3EFSQX.js","sourcesContent":["import { ThemeProvider as NextThemesProvider } from \"next-themes\";\nimport type { ReactNode } from \"react\";\nimport { WEB_THEME_STORAGE_KEY } from \"./constants\";\n\nexport function ThemeProvider({ children }: { children: ReactNode }) {\n return (\n <NextThemesProvider\n attribute=\"class\"\n defaultTheme=\"light\"\n enableSystem\n storageKey={WEB_THEME_STORAGE_KEY}\n disableTransitionOnChange\n >\n {children}\n </NextThemesProvider>\n );\n}\n\nexport { useTheme } from \"next-themes\";\n"]}