@avenue-ticketing/ui 0.11.0 → 0.12.0-beta.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 (225) hide show
  1. package/README.md +47 -0
  2. package/dist/badge-types-B67wcd4m.d.ts +22 -0
  3. package/dist/react/app-store-buttons-outline.d.ts +17 -0
  4. package/dist/react/app-store-buttons-outline.js +582 -0
  5. package/dist/react/app-store-buttons-outline.js.map +1 -0
  6. package/dist/react/app-store-buttons.d.ts +20 -0
  7. package/dist/react/app-store-buttons.js +817 -0
  8. package/dist/react/app-store-buttons.js.map +1 -0
  9. package/dist/react/avatar-label-group.d.ts +14 -0
  10. package/dist/react/avatar-label-group.js +183 -0
  11. package/dist/react/avatar-label-group.js.map +1 -0
  12. package/dist/react/avatar-profile-photo.d.ts +9 -0
  13. package/dist/react/avatar-profile-photo.js +202 -0
  14. package/dist/react/avatar-profile-photo.js.map +1 -0
  15. package/dist/react/avatar.d.ts +66 -40
  16. package/dist/react/avatar.js +159 -149
  17. package/dist/react/avatar.js.map +1 -1
  18. package/dist/react/badge-groups.d.ts +25 -0
  19. package/dist/react/badge-groups.js +162 -0
  20. package/dist/react/badge-groups.js.map +1 -0
  21. package/dist/react/badge.d.ts +123 -59
  22. package/dist/react/badge.js +314 -86
  23. package/dist/react/badge.js.map +1 -1
  24. package/dist/react/button-group.d.ts +43 -0
  25. package/dist/react/button-group.js +108 -0
  26. package/dist/react/button-group.js.map +1 -0
  27. package/dist/react/button-utility.d.ts +47 -0
  28. package/dist/react/button-utility.js +158 -0
  29. package/dist/react/button-utility.js.map +1 -0
  30. package/dist/react/button.d.ts +112 -37
  31. package/dist/react/button.js +270 -55
  32. package/dist/react/button.js.map +1 -1
  33. package/dist/react/checkbox.d.ts +25 -8
  34. package/dist/react/checkbox.js +112 -110
  35. package/dist/react/checkbox.js.map +1 -1
  36. package/dist/react/close-button.d.ts +25 -0
  37. package/dist/react/close-button.js +54 -0
  38. package/dist/react/close-button.js.map +1 -0
  39. package/dist/react/combobox.d.ts +17 -0
  40. package/dist/react/combobox.js +322 -0
  41. package/dist/react/combobox.js.map +1 -0
  42. package/dist/react/dialog.d.ts +15 -15
  43. package/dist/react/dialog.js +43 -108
  44. package/dist/react/dialog.js.map +1 -1
  45. package/dist/react/dropdown-account-breadcrumb.d.ts +5 -0
  46. package/dist/react/dropdown-account-breadcrumb.js +319 -0
  47. package/dist/react/dropdown-account-breadcrumb.js.map +1 -0
  48. package/dist/react/dropdown-account-button.d.ts +5 -0
  49. package/dist/react/dropdown-account-button.js +773 -0
  50. package/dist/react/dropdown-account-button.js.map +1 -0
  51. package/dist/react/dropdown-account-card-md.d.ts +5 -0
  52. package/dist/react/dropdown-account-card-md.js +549 -0
  53. package/dist/react/dropdown-account-card-md.js.map +1 -0
  54. package/dist/react/dropdown-account-card-sm.d.ts +5 -0
  55. package/dist/react/dropdown-account-card-sm.js +527 -0
  56. package/dist/react/dropdown-account-card-sm.js.map +1 -0
  57. package/dist/react/dropdown-account-card-xs.d.ts +5 -0
  58. package/dist/react/dropdown-account-card-xs.js +507 -0
  59. package/dist/react/dropdown-account-card-xs.js.map +1 -0
  60. package/dist/react/dropdown-avatar.d.ts +5 -0
  61. package/dist/react/dropdown-avatar.js +790 -0
  62. package/dist/react/dropdown-avatar.js.map +1 -0
  63. package/dist/react/dropdown-button-advanced.d.ts +5 -0
  64. package/dist/react/dropdown-button-advanced.js +799 -0
  65. package/dist/react/dropdown-button-advanced.js.map +1 -0
  66. package/dist/react/dropdown-button-link.d.ts +5 -0
  67. package/dist/react/dropdown-button-link.js +501 -0
  68. package/dist/react/dropdown-button-link.js.map +1 -0
  69. package/dist/react/dropdown-button-simple.d.ts +5 -0
  70. package/dist/react/dropdown-button-simple.js +754 -0
  71. package/dist/react/dropdown-button-simple.js.map +1 -0
  72. package/dist/react/dropdown-icon-advanced.d.ts +5 -0
  73. package/dist/react/dropdown-icon-advanced.js +543 -0
  74. package/dist/react/dropdown-icon-advanced.js.map +1 -0
  75. package/dist/react/dropdown-icon-simple.d.ts +5 -0
  76. package/dist/react/dropdown-icon-simple.js +505 -0
  77. package/dist/react/dropdown-icon-simple.js.map +1 -0
  78. package/dist/react/dropdown-integration.d.ts +5 -0
  79. package/dist/react/dropdown-integration.js +1325 -0
  80. package/dist/react/dropdown-integration.js.map +1 -0
  81. package/dist/react/dropdown-search-advanced.d.ts +5 -0
  82. package/dist/react/dropdown-search-advanced.js +998 -0
  83. package/dist/react/dropdown-search-advanced.js.map +1 -0
  84. package/dist/react/dropdown-search-simple.d.ts +5 -0
  85. package/dist/react/dropdown-search-simple.js +960 -0
  86. package/dist/react/dropdown-search-simple.js.map +1 -0
  87. package/dist/react/dropdown.d.ts +32 -133
  88. package/dist/react/dropdown.js +404 -1351
  89. package/dist/react/dropdown.js.map +1 -1
  90. package/dist/react/file-upload-trigger.d.ts +34 -0
  91. package/dist/react/file-upload-trigger.js +39 -0
  92. package/dist/react/file-upload-trigger.js.map +1 -0
  93. package/dist/react/form.d.ts +10 -0
  94. package/dist/react/form.js +11 -0
  95. package/dist/react/form.js.map +1 -0
  96. package/dist/react/hint-text.d.ts +17 -0
  97. package/dist/react/hint-text.js +36 -0
  98. package/dist/react/hint-text.js.map +1 -0
  99. package/dist/react/hook-form.d.ts +35 -0
  100. package/dist/react/hook-form.js +50 -0
  101. package/dist/react/hook-form.js.map +1 -0
  102. package/dist/react/input-date.d.ts +43 -0
  103. package/dist/react/input-date.js +306 -0
  104. package/dist/react/input-date.js.map +1 -0
  105. package/dist/react/input-file.d.ts +45 -0
  106. package/dist/react/input-file.js +748 -0
  107. package/dist/react/input-file.js.map +1 -0
  108. package/dist/react/input-group.d.ts +37 -0
  109. package/dist/react/input-group.js +251 -0
  110. package/dist/react/input-group.js.map +1 -0
  111. package/dist/react/input-number.d.ts +32 -0
  112. package/dist/react/input-number.js +553 -0
  113. package/dist/react/input-number.js.map +1 -0
  114. package/dist/react/input-payment.d.ts +16 -0
  115. package/dist/react/input-payment.js +593 -0
  116. package/dist/react/input-payment.js.map +1 -0
  117. package/dist/react/input-tags-outer.d.ts +53 -0
  118. package/dist/react/input-tags-outer.js +607 -0
  119. package/dist/react/input-tags-outer.js.map +1 -0
  120. package/dist/react/input-tags.d.ts +53 -0
  121. package/dist/react/input-tags.js +565 -0
  122. package/dist/react/input-tags.js.map +1 -0
  123. package/dist/react/input.d.ts +71 -22
  124. package/dist/react/input.js +332 -45
  125. package/dist/react/input.js.map +1 -1
  126. package/dist/react/label.d.ts +18 -0
  127. package/dist/react/label.js +112 -0
  128. package/dist/react/label.js.map +1 -0
  129. package/dist/react/multi-select.d.ts +89 -0
  130. package/dist/react/multi-select.js +1036 -0
  131. package/dist/react/multi-select.js.map +1 -0
  132. package/dist/react/pin-input.d.ts +59 -0
  133. package/dist/react/pin-input.js +229 -0
  134. package/dist/react/pin-input.js.map +1 -0
  135. package/dist/react/popover.d.ts +7 -73
  136. package/dist/react/popover.js +23 -569
  137. package/dist/react/popover.js.map +1 -1
  138. package/dist/react/progress-circle.d.ts +9 -0
  139. package/dist/react/progress-circle.js +36 -0
  140. package/dist/react/progress-circle.js.map +1 -0
  141. package/dist/react/progress-circles.d.ts +14 -0
  142. package/dist/react/progress-circles.js +160 -0
  143. package/dist/react/progress-circles.js.map +1 -0
  144. package/dist/react/progress-indicators.d.ts +52 -0
  145. package/dist/react/progress-indicators.js +78 -0
  146. package/dist/react/progress-indicators.js.map +1 -0
  147. package/dist/react/radio-buttons.d.ts +35 -0
  148. package/dist/react/radio-buttons.js +116 -0
  149. package/dist/react/radio-buttons.js.map +1 -0
  150. package/dist/react/scroll-header.d.ts +6 -0
  151. package/dist/react/scroll-header.js +42 -61
  152. package/dist/react/scroll-header.js.map +1 -1
  153. package/dist/react/scroll-wheel.d.ts +4 -5
  154. package/dist/react/scroll-wheel.js +19 -15
  155. package/dist/react/scroll-wheel.js.map +1 -1
  156. package/dist/react/select-item.d.ts +13 -0
  157. package/dist/react/select-item.js +336 -0
  158. package/dist/react/select-item.js.map +1 -0
  159. package/dist/react/select-native.d.ts +17 -0
  160. package/dist/react/select-native.js +203 -0
  161. package/dist/react/select-native.js.map +1 -0
  162. package/dist/react/select.d.ts +18 -61
  163. package/dist/react/select.js +625 -923
  164. package/dist/react/select.js.map +1 -1
  165. package/dist/react/sheet.d.ts +19 -19
  166. package/dist/react/sheet.js +97 -219
  167. package/dist/react/sheet.js.map +1 -1
  168. package/dist/react/slider.d.ts +15 -0
  169. package/dist/react/slider.js +66 -0
  170. package/dist/react/slider.js.map +1 -0
  171. package/dist/react/social-button.d.ts +55 -0
  172. package/dist/react/social-button.js +263 -0
  173. package/dist/react/social-button.js.map +1 -0
  174. package/dist/react/social-logos.d.ts +20 -0
  175. package/dist/react/social-logos.js +131 -0
  176. package/dist/react/social-logos.js.map +1 -0
  177. package/dist/react/switch.d.ts +21 -36
  178. package/dist/react/switch.js +121 -109
  179. package/dist/react/switch.js.map +1 -1
  180. package/dist/react/tag-select.d.ts +44 -0
  181. package/dist/react/tag-select.js +1062 -0
  182. package/dist/react/tag-select.js.map +1 -0
  183. package/dist/react/tags.d.ts +30 -0
  184. package/dist/react/tags.js +228 -0
  185. package/dist/react/tags.js.map +1 -0
  186. package/dist/react/textarea.d.ts +40 -4
  187. package/dist/react/textarea.js +193 -27
  188. package/dist/react/textarea.js.map +1 -1
  189. package/dist/react/tooltip.d.ts +30 -43
  190. package/dist/react/tooltip.js +65 -521
  191. package/dist/react/tooltip.js.map +1 -1
  192. package/dist/select-shared-B3Y5SMXU.d.ts +62 -0
  193. package/package.json +28 -21
  194. package/source.css +2 -13
  195. package/theme.css +883 -79
  196. package/dist/react/calendar.d.ts +0 -13
  197. package/dist/react/calendar.js +0 -4639
  198. package/dist/react/calendar.js.map +0 -1
  199. package/dist/react/card.d.ts +0 -11
  200. package/dist/react/card.js +0 -113
  201. package/dist/react/card.js.map +0 -1
  202. package/dist/react/datetime-picker.d.ts +0 -21
  203. package/dist/react/datetime-picker.js +0 -6142
  204. package/dist/react/datetime-picker.js.map +0 -1
  205. package/dist/react/pagination.d.ts +0 -28
  206. package/dist/react/pagination.js +0 -262
  207. package/dist/react/pagination.js.map +0 -1
  208. package/dist/react/table-pagination.d.ts +0 -15
  209. package/dist/react/table-pagination.js +0 -1247
  210. package/dist/react/table-pagination.js.map +0 -1
  211. package/dist/react/table-view/column-menu.d.ts +0 -15
  212. package/dist/react/table-view/column-menu.js +0 -1049
  213. package/dist/react/table-view/column-menu.js.map +0 -1
  214. package/dist/react/table-view/index.d.ts +0 -70
  215. package/dist/react/table-view/index.js +0 -2284
  216. package/dist/react/table-view/index.js.map +0 -1
  217. package/dist/react/table.d.ts +0 -86
  218. package/dist/react/table.js +0 -414
  219. package/dist/react/table.js.map +0 -1
  220. package/dist/react/tabs.d.ts +0 -34
  221. package/dist/react/tabs.js +0 -423
  222. package/dist/react/tabs.js.map +0 -1
  223. package/dist/react/time-picker.d.ts +0 -22
  224. package/dist/react/time-picker.js +0 -856
  225. package/dist/react/time-picker.js.map +0 -1
@@ -1,13 +1,18 @@
1
1
  import React, { useCallback, useState, useMemo, useEffect, useLayoutEffect } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
- import { X, ArrowLeft } from 'lucide-react';
4
- import { clsx } from 'clsx';
5
- import { twMerge } from 'tailwind-merge';
3
+ import { ArrowLeftIcon } from '@phosphor-icons/react/dist/csr/ArrowLeft';
4
+ import { XIcon } from '@phosphor-icons/react/dist/csr/X';
5
+ import { extendTailwindMerge } from 'tailwind-merge';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
7
 
8
- function cn(...inputs) {
9
- return twMerge(clsx(inputs));
10
- }
8
+ var twMerge = extendTailwindMerge({
9
+ extend: {
10
+ theme: {
11
+ text: ["display-xs", "display-sm", "display-md", "display-lg", "display-xl", "display-2xl"]
12
+ }
13
+ }
14
+ });
15
+ var cx = twMerge;
11
16
  var CLOSE_THRESHOLD = 200;
12
17
  var VELOCITY_THRESHOLD = 1;
13
18
  var SHEET_MOBILE_MAX_WIDTH_PX = 1024;
@@ -32,10 +37,10 @@ var PANEL_OFF_Y = "100%";
32
37
  var SHEET_Z_PANEL_CLOSE = 100;
33
38
  var SHEET_Z_PORTAL_STEP = 10;
34
39
  var SIDE_LAYOUT = {
35
- top: "top-0 left-0 right-0 border-b border-primary/10",
36
- bottom: "bottom-0 left-0 right-0 border-t border-primary/10",
37
- left: "left-0 top-0 bottom-0 border-r border-primary/10",
38
- right: "right-0 top-0 bottom-0 md:border-l border-primary/10"
40
+ top: "top-0 left-0 right-0 border-b border-secondary",
41
+ bottom: "bottom-0 left-0 right-0 border-t border-secondary",
42
+ left: "left-0 top-0 bottom-0 border-r border-secondary",
43
+ right: "right-0 top-0 bottom-0 md:border-l border-secondary"
39
44
  };
40
45
  function sizeClassFor(side, size) {
41
46
  const horizontal = side === "left" || side === "right";
@@ -93,22 +98,9 @@ var SheetBoundary = ({ className, children, ...props }) => {
93
98
  setHost(node);
94
99
  }, []);
95
100
  const boundaryValue = useMemo(() => ({ host, depth }), [host, depth]);
96
- return /* @__PURE__ */ jsx(SheetBoundaryContext.Provider, { value: boundaryValue, children: /* @__PURE__ */ jsx(
97
- "div",
98
- {
99
- ref: setRef,
100
- className: cn("relative min-h-0 min-w-0", className),
101
- ...props,
102
- children
103
- }
104
- ) });
101
+ return /* @__PURE__ */ jsx(SheetBoundaryContext.Provider, { value: boundaryValue, children: /* @__PURE__ */ jsx("div", { ref: setRef, className: cx("relative min-h-0 min-w-0", className), ...props, children }) });
105
102
  };
106
- var Sheet = ({
107
- children,
108
- open: controlledOpen,
109
- onOpenChange,
110
- showBackdrop = false
111
- }) => {
103
+ var Sheet = ({ children, open: controlledOpen, onOpenChange, showBackdrop = false }) => {
112
104
  const [internalOpen, setInternalOpen] = useState(false);
113
105
  const isControlled = controlledOpen !== void 0;
114
106
  const open = isControlled ? controlledOpen : internalOpen;
@@ -154,14 +146,7 @@ var Sheet = ({
154
146
  clearCloseHandoff,
155
147
  handoffAfterCloseRef
156
148
  }),
157
- [
158
- open,
159
- setOpen,
160
- nestDepth,
161
- showBackdrop,
162
- closeHandoffActive,
163
- clearCloseHandoff
164
- ]
149
+ [open, setOpen, nestDepth, showBackdrop, closeHandoffActive, clearCloseHandoff]
165
150
  );
166
151
  return /* @__PURE__ */ jsx(SheetContext.Provider, { value: sheetContextValue, children });
167
152
  };
@@ -184,18 +169,13 @@ var SheetTrigger = ({ children, asChild }) => {
184
169
  };
185
170
  var SheetClose = ({ children, asChild, afterClose }) => {
186
171
  const { setOpen } = useSheetContext();
187
- const closeSheet = useCallback(
188
- () => setOpen(false, afterClose ? { afterClose } : void 0),
189
- [setOpen, afterClose]
190
- );
172
+ const closeSheet = useCallback(() => setOpen(false, afterClose ? { afterClose } : void 0), [setOpen, afterClose]);
191
173
  return mergeChildClick(children, asChild, closeSheet);
192
174
  };
193
175
  function useSheetMobileViewport() {
194
176
  const [isMobileViewport, setIsMobileViewport] = useState(false);
195
177
  useEffect(() => {
196
- const mqMobile = window.matchMedia(
197
- `(max-width: ${SHEET_MOBILE_MAX_WIDTH_PX}px)`
198
- );
178
+ const mqMobile = window.matchMedia(`(max-width: ${SHEET_MOBILE_MAX_WIDTH_PX}px)`);
199
179
  const sync = () => setIsMobileViewport(mqMobile.matches);
200
180
  sync();
201
181
  mqMobile.addEventListener("change", sync);
@@ -212,10 +192,7 @@ function useSheetRenderLifecycle(open, panelCloseMs, showBackdrop) {
212
192
  setShouldRender(true);
213
193
  } else {
214
194
  setIsAnimating(false);
215
- const timer = setTimeout(
216
- () => setShouldRender(false),
217
- unmountAfterCloseMs
218
- );
195
+ const timer = setTimeout(() => setShouldRender(false), unmountAfterCloseMs);
219
196
  return () => clearTimeout(timer);
220
197
  }
221
198
  }, [open, unmountAfterCloseMs]);
@@ -275,14 +252,14 @@ var SheetCloseButton = React.forwardRef(
275
252
  ref,
276
253
  type,
277
254
  style: { zIndex: SHEET_Z_PANEL_CLOSE, ...style },
278
- className: cn(
279
- "flex size-12 cursor-pointer items-center justify-center rounded-full md:bg-background transition-all hover:bg-secondary-background active:scale-[0.96] md:border md:border-primary/10 md:shadow-xl hover:border-primary/20",
255
+ className: cx(
256
+ "flex size-12 cursor-pointer items-center justify-center rounded-full text-fg-primary transition duration-100 ease-linear hover:bg-primary_hover active:scale-[0.96] md:border md:border-secondary md:bg-primary md:shadow-xl md:hover:bg-primary_hover focus-visible:outline-none focus-visible:[box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]",
280
257
  className
281
258
  ),
282
259
  onClick: handleClick,
283
260
  ...props,
284
261
  children: [
285
- /* @__PURE__ */ jsx(X, { className: "size-5.5" }),
262
+ /* @__PURE__ */ jsx(XIcon, { className: "size-5.5", "aria-hidden": "true" }),
286
263
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
287
264
  ]
288
265
  }
@@ -303,38 +280,19 @@ var SheetContent = ({
303
280
  role,
304
281
  ...props
305
282
  }) => {
306
- const {
307
- open,
308
- setOpen,
309
- nestDepth,
310
- showBackdrop,
311
- closeHandoffActive,
312
- clearCloseHandoff,
313
- handoffAfterCloseRef
314
- } = useSheetContext();
283
+ const { open, setOpen, nestDepth, showBackdrop, closeHandoffActive, clearCloseHandoff, handoffAfterCloseRef } = useSheetContext();
315
284
  const boundaryCtx = React.useContext(SheetBoundaryContext);
316
285
  const inBoundaryTree = useMemo(() => boundaryCtx != null, [boundaryCtx]);
317
286
  const boundaryHost = useMemo(() => boundaryCtx?.host ?? null, [boundaryCtx]);
318
- const bounded = useMemo(
319
- () => inBoundaryTree && boundaryHost != null,
320
- [inBoundaryTree, boundaryHost]
321
- );
287
+ const bounded = useMemo(() => inBoundaryTree && boundaryHost != null, [inBoundaryTree, boundaryHost]);
322
288
  const isMobileViewport = useSheetMobileViewport();
323
- const dialogMotion = useMemo(
324
- () => bounded && role === "dialog" && isMobileViewport,
325
- [bounded, role, isMobileViewport]
326
- );
327
- const swipeActive = useMemo(
328
- () => swipeEnabled && !dialogMotion,
329
- [swipeEnabled, dialogMotion]
330
- );
289
+ const dialogMotion = useMemo(() => bounded && role === "dialog" && isMobileViewport, [bounded, role, isMobileViewport]);
290
+ const swipeActive = useMemo(() => swipeEnabled && !dialogMotion, [swipeEnabled, dialogMotion]);
331
291
  const basePanelCloseMs = useMemo(
332
292
  () => dialogMotion ? DIALOG_MOTION_MS : isMobileViewport ? PANEL_CLOSE_MS_MOBILE : PANEL_CLOSE_MS_DESKTOP,
333
293
  [dialogMotion, isMobileViewport]
334
294
  );
335
- const [handoffExitMsLatch, setHandoffExitMsLatch] = useState(
336
- null
337
- );
295
+ const [handoffExitMsLatch, setHandoffExitMsLatch] = useState(null);
338
296
  useLayoutEffect(() => {
339
297
  if (open) {
340
298
  setHandoffExitMsLatch(null);
@@ -347,11 +305,7 @@ var SheetContent = ({
347
305
  const panelCloseMs = useMemo(() => {
348
306
  return !open && closeHandoffActive ? PANEL_CLOSE_MS_HANDOFF : !open && handoffExitMsLatch != null ? handoffExitMsLatch : basePanelCloseMs;
349
307
  }, [open, closeHandoffActive, handoffExitMsLatch, basePanelCloseMs]);
350
- const { shouldRender, isAnimating } = useSheetRenderLifecycle(
351
- open,
352
- panelCloseMs,
353
- showBackdrop
354
- );
308
+ const { shouldRender, isAnimating } = useSheetRenderLifecycle(open, panelCloseMs, showBackdrop);
355
309
  useEffect(() => {
356
310
  if (open || !closeHandoffActive) return;
357
311
  const cb = handoffAfterCloseRef.current;
@@ -388,20 +342,15 @@ var SheetContent = ({
388
342
  swipeReboundCleanupRef.current = null;
389
343
  }, []);
390
344
  const updateTransform = useCallback(() => {
391
- if (!panelRef.current || !touchRef.current.isDragging || !swipeActive)
392
- return;
345
+ if (!panelRef.current || !touchRef.current.isDragging || !swipeActive) return;
393
346
  const { startX, startY, currentX, currentY, direction } = touchRef.current;
394
347
  const deltaX = currentX - startX;
395
348
  const deltaY = currentY - startY;
396
349
  let transform = "";
397
- if (side === "right" && direction === "x" && deltaX > 0)
398
- transform = `translateX(${deltaX}px)`;
399
- else if (side === "left" && direction === "x" && deltaX < 0)
400
- transform = `translateX(${deltaX}px)`;
401
- else if (side === "bottom" && direction === "y" && deltaY > 0)
402
- transform = `translateY(${deltaY}px)`;
403
- else if (side === "top" && direction === "y" && deltaY < 0)
404
- transform = `translateY(${deltaY}px)`;
350
+ if (side === "right" && direction === "x" && deltaX > 0) transform = `translateX(${deltaX}px)`;
351
+ else if (side === "left" && direction === "x" && deltaX < 0) transform = `translateX(${deltaX}px)`;
352
+ else if (side === "bottom" && direction === "y" && deltaY > 0) transform = `translateY(${deltaY}px)`;
353
+ else if (side === "top" && direction === "y" && deltaY < 0) transform = `translateY(${deltaY}px)`;
405
354
  if (transform) {
406
355
  panelRef.current.style.transform = transform;
407
356
  panelRef.current.style.transition = "none";
@@ -431,12 +380,8 @@ var SheetContent = ({
431
380
  if (!touchRef.current.isDragging || !swipeActive || !e.touches[0]) return;
432
381
  touchRef.current.currentX = e.touches[0].clientX;
433
382
  touchRef.current.currentY = e.touches[0].clientY;
434
- const deltaX = Math.abs(
435
- touchRef.current.currentX - touchRef.current.startX
436
- );
437
- const deltaY = Math.abs(
438
- touchRef.current.currentY - touchRef.current.startY
439
- );
383
+ const deltaX = Math.abs(touchRef.current.currentX - touchRef.current.startX);
384
+ const deltaY = Math.abs(touchRef.current.currentY - touchRef.current.startY);
440
385
  if (!touchRef.current.direction && (deltaX > 5 || deltaY > 5)) {
441
386
  touchRef.current.direction = deltaX > deltaY ? "x" : "y";
442
387
  }
@@ -445,8 +390,7 @@ var SheetContent = ({
445
390
  );
446
391
  const handleTouchEnd = useCallback(
447
392
  (e) => {
448
- if (!touchRef.current.isDragging || !swipeActive || !e.changedTouches[0])
449
- return;
393
+ if (!touchRef.current.isDragging || !swipeActive || !e.changedTouches[0]) return;
450
394
  touchRef.current.isDragging = false;
451
395
  if (rafId.current) cancelAnimationFrame(rafId.current);
452
396
  const endX = e.changedTouches[0].clientX;
@@ -517,17 +461,7 @@ var SheetContent = ({
517
461
  }
518
462
  }
519
463
  },
520
- [
521
- swipeActive,
522
- closeThreshold,
523
- velocityThreshold,
524
- side,
525
- isMobileViewport,
526
- bounded,
527
- setOpen,
528
- cancelSwipeRebound,
529
- panelOpenMs
530
- ]
464
+ [swipeActive, closeThreshold, velocityThreshold, side, isMobileViewport, bounded, setOpen, cancelSwipeRebound, panelOpenMs]
531
465
  );
532
466
  const panelTransform = useMemo(
533
467
  () => dialogMotion ? isAnimating ? "translateY(0)" : `translateY(${DIALOG_MOTION_OFFSET_PX}px)` : panelSlideTransform(side, isAnimating, bounded),
@@ -573,136 +507,80 @@ var SheetContent = ({
573
507
  transitionTimingFunction: open ? PANEL_OPEN_EASING : panelCloseEasingViaSwipeRef.current ? PANEL_SWIPE_CLOSE_EASING : PANEL_CLOSE_EASING,
574
508
  touchAction
575
509
  };
576
- }, [
577
- dialogMotion,
578
- props.style,
579
- panelTransform,
580
- isAnimating,
581
- open,
582
- panelOpenMs,
583
- panelCloseMs,
584
- side,
585
- swipeActive
586
- ]);
510
+ }, [dialogMotion, props.style, panelTransform, isAnimating, open, panelOpenMs, panelCloseMs, side, swipeActive]);
587
511
  if (!shouldRender) return null;
588
512
  if (inBoundaryTree && boundaryHost == null) {
589
513
  return null;
590
514
  }
591
- const sheetTree = /* @__PURE__ */ jsxs(
592
- "div",
593
- {
594
- className: cn(
595
- layerPosition,
596
- "inset-0",
597
- !bounded && "flex items-center justify-center",
598
- bounded && "pointer-events-none"
599
- ),
600
- style: rootLayerStyle,
601
- children: [
602
- /* @__PURE__ */ jsx(
603
- "div",
604
- {
605
- className: cn(
606
- layerPosition,
607
- "inset-0",
608
- showBackdrop && "bg-black/20 transition-opacity dark:bg-primary/4",
609
- showBackdrop && (isAnimating ? "opacity-100" : "opacity-0"),
610
- !showBackdrop && "bg-transparent",
611
- bounded && "pointer-events-auto"
612
- ),
613
- style: backdropStyle,
614
- onClick: closeSheet
615
- }
515
+ const sheetTree = /* @__PURE__ */ jsxs("div", { className: cx(layerPosition, "inset-0", !bounded && "flex items-center justify-center", bounded && "pointer-events-none"), style: rootLayerStyle, children: [
516
+ /* @__PURE__ */ jsx(
517
+ "div",
518
+ {
519
+ className: cx(
520
+ layerPosition,
521
+ "inset-0",
522
+ showBackdrop && "bg-overlay/40 transition-opacity",
523
+ showBackdrop && (isAnimating ? "opacity-100" : "opacity-0"),
524
+ !showBackdrop && "bg-transparent",
525
+ bounded && "pointer-events-auto"
526
+ ),
527
+ style: backdropStyle,
528
+ onClick: closeSheet
529
+ }
530
+ ),
531
+ /* @__PURE__ */ jsxs(
532
+ "div",
533
+ {
534
+ ...props,
535
+ ref: panelRef,
536
+ role,
537
+ className: cx(
538
+ "flex flex-col bg-primary p-6 shadow-xl",
539
+ layerPosition,
540
+ bounded ? cx("pointer-events-auto inset-0 z-10 h-full w-full max-w-none overflow-hidden") : cx("z-50", SIDE_LAYOUT[side], sizeClassFor(side, size)),
541
+ className
616
542
  ),
617
- /* @__PURE__ */ jsxs(
618
- "div",
619
- {
620
- ...props,
621
- ref: panelRef,
622
- role,
623
- className: cn(
624
- "bg-background flex flex-col p-6 shadow-xl",
625
- layerPosition,
626
- bounded ? cn(
627
- "inset-0 z-10 h-full w-full max-w-none overflow-hidden pointer-events-auto"
628
- ) : cn("z-50", SIDE_LAYOUT[side], sizeClassFor(side, size)),
629
- className
630
- ),
631
- style: panelSurfaceStyle,
632
- onTouchStart: swipeActive ? handleTouchStart : void 0,
633
- onTouchMove: swipeActive ? handleTouchMove : void 0,
634
- onTouchEnd: swipeActive ? handleTouchEnd : void 0,
635
- children: [
636
- children,
637
- showClose && /* @__PURE__ */ jsx(
638
- SheetCloseButton,
639
- {
640
- side,
641
- className: cn(
642
- "absolute top-4 right-4",
643
- side === "right" && "md:top-5 md:right-auto md:-left-16",
644
- side === "left" && "md:top-5 md:-right-16 md:left-auto",
645
- side === "top" && "md:top-auto md:right-auto md:-bottom-15 md:left-1/2 md:-translate-x-1/2",
646
- side === "bottom" && "md:-top-15 md:right-auto md:bottom-auto md:left-1/2 md:-translate-x-1/2"
647
- )
648
- }
543
+ style: panelSurfaceStyle,
544
+ onTouchStart: swipeActive ? handleTouchStart : void 0,
545
+ onTouchMove: swipeActive ? handleTouchMove : void 0,
546
+ onTouchEnd: swipeActive ? handleTouchEnd : void 0,
547
+ children: [
548
+ children,
549
+ showClose && /* @__PURE__ */ jsx(
550
+ SheetCloseButton,
551
+ {
552
+ side,
553
+ className: cx(
554
+ "absolute top-4 right-4",
555
+ side === "right" && "md:top-5 md:right-auto md:-left-16",
556
+ side === "left" && "md:top-5 md:-right-16 md:left-auto",
557
+ side === "top" && "md:top-auto md:right-auto md:-bottom-15 md:left-1/2 md:-translate-x-1/2",
558
+ side === "bottom" && "md:-top-15 md:right-auto md:bottom-auto md:left-1/2 md:-translate-x-1/2"
649
559
  )
650
- ]
651
- }
652
- )
653
- ]
654
- }
655
- );
656
- return createPortal(
657
- sheetTree,
658
- bounded && boundaryHost ? boundaryHost : document.body
659
- );
560
+ }
561
+ )
562
+ ]
563
+ }
564
+ )
565
+ ] });
566
+ return createPortal(sheetTree, bounded && boundaryHost ? boundaryHost : document.body);
660
567
  };
661
- var SheetHeader = ({ className, fixed, ...props }) => /* @__PURE__ */ jsx(
662
- "div",
663
- {
664
- className: cn(
665
- "flex flex-col text-left",
666
- fixed && "bg-background border-primary/10 sticky top-0 z-10 border-b p-4",
667
- className
668
- ),
669
- ...props
670
- }
671
- );
672
- var SheetFooter = ({ className, fixed, ...props }) => /* @__PURE__ */ jsx(
673
- "div",
674
- {
675
- className: cn(
676
- "flex flex-row",
677
- fixed && "bg-background border-primary/10 sticky bottom-0 z-10 border-t p-4",
678
- className
679
- ),
680
- ...props
681
- }
682
- );
683
- var SheetTitle = ({
684
- className,
685
- ...props
686
- }) => /* @__PURE__ */ jsx(
687
- "h3",
688
- {
689
- className: cn("text-primary text-lg font-semibold", className),
690
- ...props
691
- }
692
- );
693
- var SheetDescription = ({ className, ...props }) => /* @__PURE__ */ jsx("p", { className: cn("text-muted-foreground text-sm", className), ...props });
568
+ var SheetHeader = ({ className, fixed, ...props }) => /* @__PURE__ */ jsx("div", { className: cx("flex flex-col text-left", fixed && "sticky top-0 z-10 border-b border-secondary bg-primary p-4", className), ...props });
569
+ var SheetFooter = ({ className, fixed, ...props }) => /* @__PURE__ */ jsx("div", { className: cx("flex flex-row", fixed && "sticky bottom-0 z-10 border-t border-secondary bg-primary p-4", className), ...props });
570
+ var SheetTitle = ({ className, ...props }) => /* @__PURE__ */ jsx("h3", { className: cx("text-lg font-semibold text-primary", className), ...props });
571
+ var SheetDescription = ({ className, ...props }) => /* @__PURE__ */ jsx("p", { className: cx("text-sm text-tertiary", className), ...props });
694
572
  var SheetNestedClose = ({ className, children, onClick, afterClose, ...props }) => /* @__PURE__ */ jsx(SheetClose, { asChild: true, afterClose, children: /* @__PURE__ */ jsx(
695
573
  "button",
696
574
  {
697
575
  type: "button",
698
- className: cn(
699
- "inline-flex size-12 shrink-0 cursor-pointer items-center justify-center rounded-full bg-background transition-all hover:bg-primary/5 active:scale-[0.96]",
576
+ className: cx(
577
+ "inline-flex size-12 shrink-0 cursor-pointer items-center justify-center rounded-full bg-primary text-fg-primary transition duration-100 ease-linear hover:bg-primary_hover active:scale-[0.96]",
700
578
  className
701
579
  ),
702
580
  onClick,
703
581
  ...props,
704
582
  children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
705
- /* @__PURE__ */ jsx(ArrowLeft, { className: "size-5.5", "aria-hidden": true }),
583
+ /* @__PURE__ */ jsx(ArrowLeftIcon, { className: "size-5.5", "aria-hidden": true }),
706
584
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Back" })
707
585
  ] })
708
586
  }