@quan-erp/shared-ui 1.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 (489) hide show
  1. package/README.md +90 -0
  2. package/dist/common/common.d.ts +2 -0
  3. package/dist/components/blocks/editor-00/editor.d.ts +8 -0
  4. package/dist/components/blocks/editor-00/nodes.d.ts +3 -0
  5. package/dist/components/blocks/editor-00/plugins.d.ts +2 -0
  6. package/dist/components/custom/confirm-dialog.d.ts +15 -0
  7. package/dist/components/custom/dashboard.d.ts +22 -0
  8. package/dist/components/custom/data-table/cursor-based-pagination.d.ts +9 -0
  9. package/dist/components/custom/data-table/data-table-bulk-action-menu.d.ts +9 -0
  10. package/dist/components/custom/data-table/data-table-bulk-export.d.ts +8 -0
  11. package/dist/components/custom/data-table/data-table-column-header.d.ts +9 -0
  12. package/dist/components/custom/data-table/data-table-grid.d.ts +21 -0
  13. package/dist/components/custom/data-table/data-table-group-by.types.d.ts +11 -0
  14. package/dist/components/custom/data-table/data-table-helper.d.ts +2 -0
  15. package/dist/components/custom/data-table/data-table-list-view.d.ts +13 -0
  16. package/dist/components/custom/data-table/data-table-page-size.d.ts +11 -0
  17. package/dist/components/custom/data-table/data-table-pagination.d.ts +9 -0
  18. package/dist/components/custom/data-table/data-table-toolbar.d.ts +26 -0
  19. package/dist/components/custom/data-table/data-table-util.d.ts +7 -0
  20. package/dist/components/custom/data-table/data-table-view-fallback.d.ts +2 -0
  21. package/dist/components/custom/data-table/data-table-view-options.d.ts +17 -0
  22. package/dist/components/custom/data-table/data-table-view-preferences.d.ts +22 -0
  23. package/dist/components/custom/data-table/data-table-view-preferences.storage.d.ts +15 -0
  24. package/dist/components/custom/data-table/data-table-wrapper.d.ts +51 -0
  25. package/dist/components/custom/data-table/data-table.d.ts +47 -0
  26. package/dist/components/custom/data-table/export.d.ts +22 -0
  27. package/dist/components/custom/data-table/group-table-rows.d.ts +3 -0
  28. package/dist/components/custom/data-table/types.d.ts +17 -0
  29. package/dist/components/custom/data-table/use-data-table-page-size.d.ts +41 -0
  30. package/dist/components/custom/document-title.d.ts +4 -0
  31. package/dist/components/custom/empty-screen.d.ts +8 -0
  32. package/dist/components/custom/error-screen.d.ts +9 -0
  33. package/dist/components/custom/floating-action-btn.d.ts +39 -0
  34. package/dist/components/custom/index.d.ts +20 -0
  35. package/dist/components/custom/loading-screen.d.ts +7 -0
  36. package/dist/components/custom/menu-tab.d.ts +17 -0
  37. package/dist/components/custom/page.d.ts +35 -0
  38. package/dist/components/custom/plugin-theme.d.ts +8 -0
  39. package/dist/components/custom/portal.d.ts +4 -0
  40. package/dist/components/custom/protected-page.d.ts +26 -0
  41. package/dist/components/custom/pull-to-refresh.d.ts +16 -0
  42. package/dist/components/custom/render-in-view.d.ts +12 -0
  43. package/dist/components/custom/responsive-dialog.d.ts +47 -0
  44. package/dist/components/custom/safearea.d.ts +5 -0
  45. package/dist/components/custom/scrollable.d.ts +17 -0
  46. package/dist/components/custom/search-and-filter-suite.d.ts +16 -0
  47. package/dist/components/custom/setting.d.ts +30 -0
  48. package/dist/components/custom/submenu-hub.d.ts +17 -0
  49. package/dist/components/editor/editor-ui/content-editable.d.ts +9 -0
  50. package/dist/components/editor/themes/editor-theme.d.ts +3 -0
  51. package/dist/components/ui/accordion.d.ts +8 -0
  52. package/dist/components/ui/alert-dialog.d.ts +19 -0
  53. package/dist/components/ui/alert.d.ts +9 -0
  54. package/dist/components/ui/avatar.d.ts +7 -0
  55. package/dist/components/ui/badge.d.ts +10 -0
  56. package/dist/components/ui/breadcrumb.d.ts +20 -0
  57. package/dist/components/ui/button-group.d.ts +12 -0
  58. package/dist/components/ui/button.d.ts +11 -0
  59. package/dist/components/ui/calendar.d.ts +12 -0
  60. package/dist/components/ui/card.d.ts +10 -0
  61. package/dist/components/ui/carousel.d.ts +29 -0
  62. package/dist/components/ui/chart.d.ts +63 -0
  63. package/dist/components/ui/checkbox.d.ts +5 -0
  64. package/dist/components/ui/collapsible.d.ts +6 -0
  65. package/dist/components/ui/command.d.ts +81 -0
  66. package/dist/components/ui/context-menu.d.ts +28 -0
  67. package/dist/components/ui/dialog.d.ts +16 -0
  68. package/dist/components/ui/drawer.d.ts +23 -0
  69. package/dist/components/ui/dropdown-menu.d.ts +28 -0
  70. package/dist/components/ui/field.d.ts +25 -0
  71. package/dist/components/ui/form.d.ts +26 -0
  72. package/dist/components/ui/hover-card.d.ts +7 -0
  73. package/dist/components/ui/index.d.ts +54 -0
  74. package/dist/components/ui/input-group.d.ts +17 -0
  75. package/dist/components/ui/input-otp.d.ts +35 -0
  76. package/dist/components/ui/input.d.ts +10 -0
  77. package/dist/components/ui/item.d.ts +24 -0
  78. package/dist/components/ui/kbd.d.ts +4 -0
  79. package/dist/components/ui/label.d.ts +5 -0
  80. package/dist/components/ui/menubar.d.ts +29 -0
  81. package/dist/components/ui/navigation-menu.d.ts +13 -0
  82. package/dist/components/ui/pagination.d.ts +28 -0
  83. package/dist/components/ui/popover.d.ts +8 -0
  84. package/dist/components/ui/progress.d.ts +5 -0
  85. package/dist/components/ui/radio-group.d.ts +6 -0
  86. package/dist/components/ui/resizable.d.ts +24 -0
  87. package/dist/components/ui/scroll-area.d.ts +6 -0
  88. package/dist/components/ui/select.d.ts +14 -0
  89. package/dist/components/ui/separator.d.ts +5 -0
  90. package/dist/components/ui/sheet.d.ts +16 -0
  91. package/dist/components/ui/sidebar.d.ts +71 -0
  92. package/dist/components/ui/skeleton.d.ts +3 -0
  93. package/dist/components/ui/slider.d.ts +12 -0
  94. package/dist/components/ui/sonner.d.ts +6 -0
  95. package/dist/components/ui/spinner.d.ts +9 -0
  96. package/dist/components/ui/switch.d.ts +11 -0
  97. package/dist/components/ui/table.d.ts +14 -0
  98. package/dist/components/ui/tabs.d.ts +16 -0
  99. package/dist/components/ui/textarea.d.ts +10 -0
  100. package/dist/components/ui/time-picker.d.ts +13 -0
  101. package/dist/components/ui/toggle-group.d.ts +13 -0
  102. package/dist/components/ui/toggle.d.ts +10 -0
  103. package/dist/components/ui/tooltip.d.ts +8 -0
  104. package/dist/es/common/common.js +4 -0
  105. package/dist/es/components/blocks/editor-00/editor.js +49 -0
  106. package/dist/es/components/blocks/editor-00/nodes.js +6 -0
  107. package/dist/es/components/blocks/editor-00/plugins.js +23 -0
  108. package/dist/es/components/custom/confirm-dialog.js +34 -0
  109. package/dist/es/components/custom/dashboard.js +86 -0
  110. package/dist/es/components/custom/data-table/cursor-based-pagination.js +123 -0
  111. package/dist/es/components/custom/data-table/data-table-bulk-action-menu.js +112 -0
  112. package/dist/es/components/custom/data-table/data-table-bulk-export.js +76 -0
  113. package/dist/es/components/custom/data-table/data-table-column-header.js +102 -0
  114. package/dist/es/components/custom/data-table/data-table-grid.js +234 -0
  115. package/dist/es/components/custom/data-table/data-table-helper.js +8 -0
  116. package/dist/es/components/custom/data-table/data-table-list-view.js +121 -0
  117. package/dist/es/components/custom/data-table/data-table-page-size.js +49 -0
  118. package/dist/es/components/custom/data-table/data-table-pagination.js +156 -0
  119. package/dist/es/components/custom/data-table/data-table-toolbar.js +149 -0
  120. package/dist/es/components/custom/data-table/data-table-util.js +31 -0
  121. package/dist/es/components/custom/data-table/data-table-view-fallback.js +7 -0
  122. package/dist/es/components/custom/data-table/data-table-view-options.js +311 -0
  123. package/dist/es/components/custom/data-table/data-table-view-preferences.js +71 -0
  124. package/dist/es/components/custom/data-table/data-table-view-preferences.storage.js +115 -0
  125. package/dist/es/components/custom/data-table/data-table.js +425 -0
  126. package/dist/es/components/custom/data-table/group-table-rows.js +16 -0
  127. package/dist/es/components/custom/data-table/use-data-table-page-size.js +155 -0
  128. package/dist/es/components/custom/empty-screen.js +28 -0
  129. package/dist/es/components/custom/error-screen.js +84 -0
  130. package/dist/es/components/custom/floating-action-btn.js +200 -0
  131. package/dist/es/components/custom/loading-screen.js +26 -0
  132. package/dist/es/components/custom/menu-tab.js +45 -0
  133. package/dist/es/components/custom/page.js +105 -0
  134. package/dist/es/components/custom/plugin-theme.js +13 -0
  135. package/dist/es/components/custom/portal.js +13 -0
  136. package/dist/es/components/custom/protected-page.js +74 -0
  137. package/dist/es/components/custom/pull-to-refresh.js +378 -0
  138. package/dist/es/components/custom/render-in-view.js +35 -0
  139. package/dist/es/components/custom/responsive-dialog.js +163 -0
  140. package/dist/es/components/custom/safearea.js +8 -0
  141. package/dist/es/components/custom/scrollable.js +96 -0
  142. package/dist/es/components/custom/setting.js +39 -0
  143. package/dist/es/components/editor/editor-ui/content-editable.js +26 -0
  144. package/dist/es/components/editor/themes/editor-theme.js +119 -0
  145. package/dist/es/components/ui/accordion.js +47 -0
  146. package/dist/es/components/ui/alert-dialog.js +178 -0
  147. package/dist/es/components/ui/alert.js +51 -0
  148. package/dist/es/components/ui/avatar.js +42 -0
  149. package/dist/es/components/ui/badge.js +27 -0
  150. package/dist/es/components/ui/breadcrumb.js +93 -0
  151. package/dist/es/components/ui/button-group.js +76 -0
  152. package/dist/es/components/ui/button.js +57 -0
  153. package/dist/es/components/ui/calendar.js +402 -0
  154. package/dist/es/components/ui/card.js +91 -0
  155. package/dist/es/components/ui/carousel.js +194 -0
  156. package/dist/es/components/ui/chart.js +239 -0
  157. package/dist/es/components/ui/checkbox.js +27 -0
  158. package/dist/es/components/ui/collapsible.js +9 -0
  159. package/dist/es/components/ui/command.js +115 -0
  160. package/dist/es/components/ui/context-menu.js +153 -0
  161. package/dist/es/components/ui/dialog.js +137 -0
  162. package/dist/es/components/ui/drawer.js +107 -0
  163. package/dist/es/components/ui/dropdown-menu.js +152 -0
  164. package/dist/es/components/ui/field.js +226 -0
  165. package/dist/es/components/ui/form.js +109 -0
  166. package/dist/es/components/ui/hover-card.js +25 -0
  167. package/dist/es/components/ui/input-group.js +155 -0
  168. package/dist/es/components/ui/input-otp.js +49 -0
  169. package/dist/es/components/ui/input.js +37 -0
  170. package/dist/es/components/ui/item.js +188 -0
  171. package/dist/es/components/ui/kbd.js +31 -0
  172. package/dist/es/components/ui/label.js +23 -0
  173. package/dist/es/components/ui/menubar.js +202 -0
  174. package/dist/es/components/ui/navigation-menu.js +107 -0
  175. package/dist/es/components/ui/pagination.js +101 -0
  176. package/dist/es/components/ui/popover.js +27 -0
  177. package/dist/es/components/ui/progress.js +26 -0
  178. package/dist/es/components/ui/radio-group.js +35 -0
  179. package/dist/es/components/ui/resizable.js +38 -0
  180. package/dist/es/components/ui/scroll-area.js +38 -0
  181. package/dist/es/components/ui/select.js +124 -0
  182. package/dist/es/components/ui/separator.js +27 -0
  183. package/dist/es/components/ui/sheet.js +129 -0
  184. package/dist/es/components/ui/sidebar.js +604 -0
  185. package/dist/es/components/ui/skeleton.js +17 -0
  186. package/dist/es/components/ui/slider.js +62 -0
  187. package/dist/es/components/ui/sonner.js +26 -0
  188. package/dist/es/components/ui/spinner.js +34 -0
  189. package/dist/es/components/ui/switch.js +54 -0
  190. package/dist/es/components/ui/table.js +90 -0
  191. package/dist/es/components/ui/tabs.js +84 -0
  192. package/dist/es/components/ui/textarea.js +32 -0
  193. package/dist/es/components/ui/time-picker.js +199 -0
  194. package/dist/es/components/ui/toggle-group.js +43 -0
  195. package/dist/es/components/ui/toggle.js +44 -0
  196. package/dist/es/components/ui/tooltip.js +56 -0
  197. package/dist/es/hooks/use-debounce-value.js +16 -0
  198. package/dist/es/hooks/use-is-inview.js +25 -0
  199. package/dist/es/hooks/use-mobile-back-dialog.js +34 -0
  200. package/dist/es/hooks/use-mobile.js +43 -0
  201. package/dist/es/hooks/use-mounted.js +14 -0
  202. package/dist/es/hooks/use-scroll-direction.js +26 -0
  203. package/dist/es/hooks/use-user-hand-behavior.js +20 -0
  204. package/dist/es/index.d.ts +2 -0
  205. package/dist/es/index.js +487 -0
  206. package/dist/es/lib/utils.js +8 -0
  207. package/dist/es/locale/locale.js +87 -0
  208. package/dist/es/node_modules/@tanstack/react-table/build/lib/index.js +93 -0
  209. package/dist/es/node_modules/@tanstack/table-core/build/lib/index.js +2737 -0
  210. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +85 -0
  211. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +49 -0
  212. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +86 -0
  213. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +19 -0
  214. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +14 -0
  215. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +5 -0
  216. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/LazyContext.js +5 -0
  217. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +9 -0
  218. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/MotionContext/create.js +13 -0
  219. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/MotionContext/index.js +5 -0
  220. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +15 -0
  221. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/PresenceContext.js +5 -0
  222. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +5 -0
  223. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/events/add-pointer-event.js +8 -0
  224. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/events/event-info.js +14 -0
  225. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +432 -0
  226. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/drag/index.js +38 -0
  227. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +93 -0
  228. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/focus.js +35 -0
  229. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/hover.js +31 -0
  230. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +215 -0
  231. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/pan/index.js +50 -0
  232. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/press.js +38 -0
  233. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +60 -0
  234. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/animation/index.js +40 -0
  235. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/animations.js +13 -0
  236. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/definitions.js +42 -0
  237. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/drag.js +17 -0
  238. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/gestures.js +21 -0
  239. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +111 -0
  240. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/layout.js +11 -0
  241. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/load-features.js +15 -0
  242. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +64 -0
  243. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +33 -0
  244. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/index.js +69 -0
  245. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/utils/symbol.js +4 -0
  246. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +35 -0
  247. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +106 -0
  248. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +66 -0
  249. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +39 -0
  250. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/components/create-proxy.js +35 -0
  251. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +13 -0
  252. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +7 -0
  253. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +13 -0
  254. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/dom/use-render.js +21 -0
  255. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +31 -0
  256. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +29 -0
  257. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +10 -0
  258. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/html/use-props.js +44 -0
  259. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +9 -0
  260. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +30 -0
  261. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/svg/use-props.js +24 -0
  262. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +10 -0
  263. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +8 -0
  264. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/distance.js +10 -0
  265. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/get-context-window.js +6 -0
  266. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/is-browser.js +4 -0
  267. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/is-ref-object.js +6 -0
  268. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +38 -0
  269. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/use-constant.js +11 -0
  270. package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +6 -0
  271. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +153 -0
  272. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/JSAnimation.js +294 -0
  273. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +160 -0
  274. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +51 -0
  275. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/animate/single-value.js +11 -0
  276. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/drivers/frame.js +17 -0
  277. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/inertia.js +67 -0
  278. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +37 -0
  279. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/spring.js +246 -0
  280. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +15 -0
  281. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +16 -0
  282. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +6 -0
  283. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +9 -0
  284. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +69 -0
  285. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +78 -0
  286. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +36 -0
  287. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +22 -0
  288. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +107 -0
  289. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +131 -0
  290. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +10 -0
  291. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +9 -0
  292. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +12 -0
  293. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +6 -0
  294. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +8 -0
  295. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +13 -0
  296. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +22 -0
  297. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +43 -0
  298. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +7 -0
  299. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +7 -0
  300. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +27 -0
  301. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +10 -0
  302. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +31 -0
  303. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +31 -0
  304. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +33 -0
  305. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +11 -0
  306. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +16 -0
  307. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +20 -0
  308. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +22 -0
  309. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +7 -0
  310. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +18 -0
  311. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +10 -0
  312. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +4 -0
  313. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +21 -0
  314. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +15 -0
  315. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +26 -0
  316. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +36 -0
  317. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +12 -0
  318. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +14 -0
  319. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +12 -0
  320. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +11 -0
  321. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +19 -0
  322. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/events/add-dom-event.js +7 -0
  323. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/batcher.js +67 -0
  324. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/frame.js +9 -0
  325. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/microtask.js +5 -0
  326. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/order.js +21 -0
  327. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/render-step.js +64 -0
  328. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/sync-time.js +21 -0
  329. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +11 -0
  330. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +25 -0
  331. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/hover.js +62 -0
  332. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/press/index.js +62 -0
  333. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +18 -0
  334. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +32 -0
  335. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +4 -0
  336. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +12 -0
  337. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +10 -0
  338. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/utils/setup.js +15 -0
  339. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +60 -0
  340. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +26 -0
  341. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/copy.js +19 -0
  342. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +86 -0
  343. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +57 -0
  344. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +40 -0
  345. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/models.js +21 -0
  346. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/utils.js +34 -0
  347. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +13 -0
  348. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +28 -0
  349. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +1124 -0
  350. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/node/state.js +15 -0
  351. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/shared/stack.js +83 -0
  352. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +26 -0
  353. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +25 -0
  354. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
  355. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/styles/transform.js +38 -0
  356. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +4 -0
  357. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +6 -0
  358. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +24 -0
  359. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +20 -0
  360. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/utils/measure.js +18 -0
  361. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/Feature.js +11 -0
  362. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/VisualElement.js +426 -0
  363. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +37 -0
  364. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +4 -0
  365. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +83 -0
  366. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/dom/style-set.js +7 -0
  367. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
  368. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +40 -0
  369. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +42 -0
  370. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +53 -0
  371. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/html/utils/render.js +14 -0
  372. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +18 -0
  373. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/store.js +4 -0
  374. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +45 -0
  375. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +59 -0
  376. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +28 -0
  377. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +4 -0
  378. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/path.js +17 -0
  379. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/render.js +12 -0
  380. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +16 -0
  381. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/animation-state.js +223 -0
  382. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +26 -0
  383. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +6 -0
  384. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +13 -0
  385. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
  386. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +6 -0
  387. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +6 -0
  388. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/keys-position.js +13 -0
  389. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +24 -0
  390. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/motion-values.js +33 -0
  391. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +20 -0
  392. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +6 -0
  393. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +8 -0
  394. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +25 -0
  395. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/setters.js +25 -0
  396. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +15 -0
  397. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/variant-props.js +14 -0
  398. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/resize/handle-element.js +61 -0
  399. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/resize/handle-window.js +31 -0
  400. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/resize/index.js +8 -0
  401. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/delay.js +17 -0
  402. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/interpolate.js +53 -0
  403. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/is-html-element.js +7 -0
  404. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/is-svg-element.js +7 -0
  405. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +7 -0
  406. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/color.js +44 -0
  407. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/complex.js +83 -0
  408. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/immediate.js +6 -0
  409. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/index.js +12 -0
  410. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/number.js +6 -0
  411. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/visibility.js +12 -0
  412. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/resolve-elements.js +16 -0
  413. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/supports/flags.js +4 -0
  414. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +12 -0
  415. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/supports/memo.js +9 -0
  416. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +5 -0
  417. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/index.js +286 -0
  418. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/auto.js +7 -0
  419. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/hex.js +37 -0
  420. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +39 -0
  421. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/hsla.js +14 -0
  422. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/index.js +26 -0
  423. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/rgba.js +18 -0
  424. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/utils.js +21 -0
  425. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/complex/filter.js +27 -0
  426. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/complex/index.js +91 -0
  427. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/complex/mask.js +12 -0
  428. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/dimensions.js +10 -0
  429. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/int.js +8 -0
  430. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +28 -0
  431. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/maps/number.js +70 -0
  432. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/maps/transform.js +37 -0
  433. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/numbers/index.js +19 -0
  434. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/numbers/units.js +23 -0
  435. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/test.js +4 -0
  436. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +14 -0
  437. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +4 -0
  438. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/find.js +9 -0
  439. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +4 -0
  440. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +6 -0
  441. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +6 -0
  442. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +4 -0
  443. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +4 -0
  444. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +4 -0
  445. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
  446. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +15 -0
  447. package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
  448. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/array.js +13 -0
  449. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/clamp.js +10 -0
  450. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/anticipate.js +5 -0
  451. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/back.js +11 -0
  452. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/circ.js +10 -0
  453. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +29 -0
  454. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/ease.js +9 -0
  455. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +4 -0
  456. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +4 -0
  457. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +4 -0
  458. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +6 -0
  459. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/utils/map.js +38 -0
  460. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/errors.js +21 -0
  461. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/format-error-message.js +6 -0
  462. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/global-config.js +4 -0
  463. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/is-numerical-string.js +4 -0
  464. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/is-object.js +4 -0
  465. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/is-zero-value-string.js +4 -0
  466. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/memo.js +12 -0
  467. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/noop.js +4 -0
  468. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/pipe.js +4 -0
  469. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/progress.js +7 -0
  470. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/subscription-manager.js +32 -0
  471. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/time-conversion.js +6 -0
  472. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/velocity-per-second.js +4 -0
  473. package/dist/es/shared-ui/node_modules/motion-utils/dist/es/warn-once.js +11 -0
  474. package/dist/es/shared-ui.css +95 -0
  475. package/dist/hooks/index.d.ts +8 -0
  476. package/dist/hooks/use-debounce-value.d.ts +2 -0
  477. package/dist/hooks/use-inview.d.ts +7 -0
  478. package/dist/hooks/use-is-inview.d.ts +7 -0
  479. package/dist/hooks/use-mobile-back-dialog.d.ts +6 -0
  480. package/dist/hooks/use-mobile.d.ts +9 -0
  481. package/dist/hooks/use-mounted.d.ts +2 -0
  482. package/dist/hooks/use-scroll-direction.d.ts +3 -0
  483. package/dist/hooks/use-user-hand-behavior.d.ts +7 -0
  484. package/dist/index.d.ts +13 -0
  485. package/dist/lib/index.d.ts +2 -0
  486. package/dist/lib/utils.d.ts +3 -0
  487. package/dist/locale/index.d.ts +2 -0
  488. package/dist/locale/locale.d.ts +26 -0
  489. package/package.json +118 -0
@@ -0,0 +1,93 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { MoreHorizontal, ChevronRight } from "lucide-react";
5
+ import { cn } from "../../lib/utils.js";
6
+ const Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
7
+ Breadcrumb.displayName = "Breadcrumb";
8
+ const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9
+ "ol",
10
+ {
11
+ ref,
12
+ className: cn(
13
+ "shared:flex shared:flex-wrap shared:items-center shared:gap-1.5 shared:break-words shared:text-sm shared:text-muted-foreground shared:sm:gap-2.5",
14
+ className
15
+ ),
16
+ ...props
17
+ }
18
+ ));
19
+ BreadcrumbList.displayName = "BreadcrumbList";
20
+ const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
21
+ "li",
22
+ {
23
+ ref,
24
+ className: cn("shared:inline-flex shared:items-center shared:gap-1.5", className),
25
+ ...props
26
+ }
27
+ ));
28
+ BreadcrumbItem.displayName = "BreadcrumbItem";
29
+ const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
30
+ const Comp = asChild ? Slot : "a";
31
+ return /* @__PURE__ */ jsx(
32
+ Comp,
33
+ {
34
+ ref,
35
+ className: cn("shared:transition-colors shared:hover:text-foreground", className),
36
+ ...props
37
+ }
38
+ );
39
+ });
40
+ BreadcrumbLink.displayName = "BreadcrumbLink";
41
+ const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
42
+ "span",
43
+ {
44
+ ref,
45
+ role: "link",
46
+ "aria-disabled": "true",
47
+ "aria-current": "page",
48
+ className: cn("shared:font-normal shared:text-foreground", className),
49
+ ...props
50
+ }
51
+ ));
52
+ BreadcrumbPage.displayName = "BreadcrumbPage";
53
+ const BreadcrumbSeparator = ({
54
+ children,
55
+ className,
56
+ ...props
57
+ }) => /* @__PURE__ */ jsx(
58
+ "li",
59
+ {
60
+ role: "presentation",
61
+ "aria-hidden": "true",
62
+ className: cn("shared:[&>svg]:w-3.5 shared:[&>svg]:h-3.5", className),
63
+ ...props,
64
+ children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
65
+ }
66
+ );
67
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
68
+ const BreadcrumbEllipsis = ({
69
+ className,
70
+ ...props
71
+ }) => /* @__PURE__ */ jsxs(
72
+ "span",
73
+ {
74
+ role: "presentation",
75
+ "aria-hidden": "true",
76
+ className: cn("shared:flex shared:h-9 shared:w-9 shared:items-center shared:justify-center", className),
77
+ ...props,
78
+ children: [
79
+ /* @__PURE__ */ jsx(MoreHorizontal, { className: "shared:h-4 shared:w-4" }),
80
+ /* @__PURE__ */ jsx("span", { className: "shared:sr-only", children: "More" })
81
+ ]
82
+ }
83
+ );
84
+ BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
85
+ export {
86
+ Breadcrumb,
87
+ BreadcrumbEllipsis,
88
+ BreadcrumbItem,
89
+ BreadcrumbLink,
90
+ BreadcrumbList,
91
+ BreadcrumbPage,
92
+ BreadcrumbSeparator
93
+ };
@@ -0,0 +1,76 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../../lib/utils.js";
5
+ import { Separator } from "./separator.js";
6
+ const buttonGroupVariants = cva(
7
+ "shared:flex shared:w-fit shared:items-stretch has-[>shared:[data-slot=button-group]]:gap-2 [&>shared:*]:focus-visible:relative [&>shared:*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>shared:[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])shared:]:w-fit shared:[&>input]:flex-1",
8
+ {
9
+ variants: {
10
+ orientation: {
11
+ horizontal: "shared:[&>*:not(:first-child)]:rounded-l-none shared:[&>*:not(:first-child)]:border-l-0 shared:[&>*:not(:last-child)]:rounded-r-none",
12
+ vertical: "shared:flex-col shared:[&>*:not(:first-child)]:rounded-t-none shared:[&>*:not(:first-child)]:border-t-0 shared:[&>*:not(:last-child)]:rounded-b-none"
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ orientation: "horizontal"
17
+ }
18
+ }
19
+ );
20
+ function ButtonGroup({
21
+ className,
22
+ orientation,
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(
26
+ "div",
27
+ {
28
+ role: "group",
29
+ "data-slot": "button-group",
30
+ "data-orientation": orientation,
31
+ className: cn(buttonGroupVariants({ orientation }), className),
32
+ ...props
33
+ }
34
+ );
35
+ }
36
+ function ButtonGroupText({
37
+ className,
38
+ asChild = false,
39
+ ...props
40
+ }) {
41
+ const Comp = asChild ? Slot : "div";
42
+ return /* @__PURE__ */ jsx(
43
+ Comp,
44
+ {
45
+ className: cn(
46
+ "shared:bg-muted shared:shadow-xs shared:flex shared:items-center shared:gap-2 shared:rounded-md shared:border shared:px-4 shared:text-sm shared:font-medium shared:[&_svg:not([class*='size-'])]:size-4 shared:[&_svg]:pointer-events-none",
47
+ className
48
+ ),
49
+ ...props
50
+ }
51
+ );
52
+ }
53
+ function ButtonGroupSeparator({
54
+ className,
55
+ orientation = "vertical",
56
+ ...props
57
+ }) {
58
+ return /* @__PURE__ */ jsx(
59
+ Separator,
60
+ {
61
+ "data-slot": "button-group-separator",
62
+ orientation,
63
+ className: cn(
64
+ "shared:bg-input shared:relative !shared:m-0 shared:self-stretch shared:data-[orientation=vertical]:h-auto",
65
+ className
66
+ ),
67
+ ...props
68
+ }
69
+ );
70
+ }
71
+ export {
72
+ ButtonGroup,
73
+ ButtonGroupSeparator,
74
+ ButtonGroupText,
75
+ buttonGroupVariants
76
+ };
@@ -0,0 +1,57 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../../lib/utils.js";
6
+ const buttonVariants = cva(
7
+ "shared:inline-flex shared:items-center shared:justify-center shared:gap-2 shared:whitespace-nowrap shared:cupertino-corner shared:rounded-full shared:text-md shared:md:text-sm shared:font-medium shared:transition-all shared:cursor-pointer shared:disabled:cursor-not-allowed shared:disabled:pointer-events-none shared:disabled:opacity-50 shared:[&_svg]:pointer-events-none shared:[&_svg:not([class*='size-'])]:size-4 shared:shrink-0 shared:[&_svg]:shrink-0 shared:outline-none shared:focus-visible:border-ring shared:focus-visible:ring-ring/50 shared:focus-visible:ring-[3px] shared:aria-invalid:ring-destructive/20 shared:dark:aria-invalid:ring-destructive/40 shared:aria-invalid:border-destructive",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "shared:bg-primary shared:text-white shared:hover:bg-primary/90",
12
+ default2: "shared:bg-primary/10 shared:text-primary shared:hover:bg-primary/30 shared:font-bold",
13
+ destructive: "shared:bg-destructive shared:text-white shared:hover:bg-destructive/90 shared:focus-visible:ring-destructive/20 shared:dark:focus-visible:ring-destructive/40 shared:dark:bg-destructive/60",
14
+ destructive2: "shared:bg-destructive/10 shared:text-destructive shared:hover:bg-destructive/30 shared:font-bold",
15
+ outline: "shared:border shared:border-primary shared:text-primary shared:bg-background shared:shadow-xs shared:hover:bg-accent shared:hover:text-accent-foreground shared:dark:bg-input/30 shared:dark:border-input shared:dark:hover:bg-input/50",
16
+ secondary: "shared:bg-secondary shared:text-secondary-foreground shared:hover:bg-secondary/80",
17
+ ghost: "shared:hover:bg-accent shared:hover:text-accent-foreground shared:dark:hover:bg-accent/50",
18
+ link: "shared:text-primary shared:underline-offset-4 shared:hover:underline",
19
+ input: "shared:file:text-foreground shared:placeholder:text-muted-foreground shared:selection:bg-primary shared:selection:text-primary-foreground shared:dark:bg-input/30 shared:border-input shared:h-12 shared:md:h-9 shared:px-4 shared:md:px-2 shared:md:py-1 shared:w-full shared:min-w-0 shared:cupertino-corner shared:border shared:bg-transparent shared:px-3 shared:py-1 shared:text-base shared:shadow-xs shared:transition-[color,box-shadow] shared:outline-none shared:file:inline-flex shared:file:h-7 shared:file:border-0 shared:file:bg-transparent shared:file:text-sm shared:file:font-medium shared:disabled:pointer-events-none shared:disabled:cursor-not-allowed shared:disabled:opacity-50 shared:md:text-sm shared:focus-visible:border-ring shared:focus-visible:ring-ring/50 shared:focus-visible:ring-[3px] shared:aria-invalid:ring-destructive/20 shared:dark:aria-invalid:ring-destructive/40 shared:aria-invalid:border-destructive shared:items-flex shared:justify-start",
20
+ select: "shared:file:text-foreground shared:placeholder:text-muted-foreground shared:selection:bg-primary shared:selection:text-primary-foreground shared:dark:bg-input/30 shared:border-input shared:h-12 shared:md:h-9 shared:px-4 shared:md:px-2 shared:md:py-1 shared:w-full shared:min-w-0 shared:cupertino-corner shared:border shared:bg-transparent shared:px-3 shared:py-1 shared:text-base shared:shadow-xs shared:transition-[color,box-shadow] shared:outline-none shared:file:inline-flex shared:file:h-7 shared:file:border-0 shared:file:bg-transparent shared:file:text-sm shared:file:font-medium shared:disabled:pointer-events-none shared:disabled:cursor-not-allowed shared:disabled:opacity-50 shared:md:text-sm shared:focus-visible:border-ring shared:focus-visible:ring-ring/50 shared:focus-visible:ring-[3px] shared:aria-invalid:ring-destructive/20 shared:dark:aria-invalid:ring-destructive/40 shared:aria-invalid:border-destructive shared:items-flex shared:justify-between"
21
+ },
22
+ size: {
23
+ default: "shared:h-12 shared:md:h-9 shared:px-4 shared:md:px-2 shared:md:py-1 shared:has-[>svg]:px-3",
24
+ sm: "shared:h-8 shared:px-2 shared:gap-1.5 shared:px-3 shared:has-[>svg]:px-2.5",
25
+ lg: "shared:h-12 shared:px-6 shared:py-3 shared:md:h-9 shared:md:px-4 shared:md:py-2 shared:has-[>svg]:px-3",
26
+ icon: "shared:size-12 shared:md:size-9",
27
+ "icon-sm": "shared:size-8",
28
+ "icon-lg": "shared:size-10"
29
+ }
30
+ },
31
+ defaultVariants: {
32
+ variant: "default",
33
+ size: "default"
34
+ }
35
+ }
36
+ );
37
+ function Button({
38
+ className,
39
+ variant,
40
+ size,
41
+ asChild = false,
42
+ ...props
43
+ }) {
44
+ const Comp = asChild ? Slot : "button";
45
+ return /* @__PURE__ */ jsx(
46
+ Comp,
47
+ {
48
+ "data-slot": "button",
49
+ className: cn(buttonVariants({ variant, size, className })),
50
+ ...props
51
+ }
52
+ );
53
+ }
54
+ export {
55
+ Button,
56
+ buttonVariants
57
+ };
@@ -0,0 +1,402 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from "lucide-react";
4
+ import { getDefaultClassNames, DayPicker } from "react-day-picker";
5
+ import { cn } from "../../lib/utils.js";
6
+ import { Button, buttonVariants } from "./button.js";
7
+ import { Popover, PopoverTrigger, PopoverContent } from "./popover.js";
8
+ import { Drawer, DrawerTrigger, DrawerContent, DrawerFooter, DrawerClose } from "./drawer.js";
9
+ import "./select.js";
10
+ import { useMediaQuery } from "../../hooks/use-mobile.js";
11
+ import { useMobileBackDialog } from "../../hooks/use-mobile-back-dialog.js";
12
+ import "@quan-erp/shared-frontend-core";
13
+ import { Calendar as Calendar$1 } from "@icon-park/react";
14
+ function Calendar({
15
+ className,
16
+ classNames,
17
+ showOutsideDays = true,
18
+ captionLayout = "label",
19
+ buttonVariant = "ghost",
20
+ formatters,
21
+ components,
22
+ type = "raw",
23
+ trigger,
24
+ label,
25
+ ...props
26
+ }) {
27
+ const defaultClassNames = getDefaultClassNames();
28
+ const isMobile = useMediaQuery();
29
+ const [open, setOpen] = React.useState(false);
30
+ const isDrawer = type === "drawer" || type === "automatic" && isMobile;
31
+ const [internalMonth, setInternalMonth] = React.useState(props.defaultMonth || props.month || /* @__PURE__ */ new Date());
32
+ useMobileBackDialog({
33
+ open,
34
+ enable: open && isDrawer,
35
+ onOpenChange: setOpen
36
+ });
37
+ React.useEffect(() => {
38
+ if (props.month) {
39
+ setInternalMonth(props.month);
40
+ }
41
+ }, [props.month]);
42
+ const [showMonthYearPicker, setShowMonthYearPicker] = React.useState(false);
43
+ const selectedMonthRef = React.useRef(null);
44
+ const selectedYearRef = React.useRef(null);
45
+ const internalMonthRef = React.useRef(internalMonth);
46
+ internalMonthRef.current = internalMonth;
47
+ const scrollTimeoutMonthRef = React.useRef(void 0);
48
+ const scrollTimeoutYearRef = React.useRef(void 0);
49
+ const handleScroll = (e, type2, timeoutRef) => {
50
+ const container = e.currentTarget;
51
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
52
+ timeoutRef.current = setTimeout(() => {
53
+ const children = Array.from(container.children);
54
+ const center = container.scrollTop + container.clientHeight / 2;
55
+ let closest = null;
56
+ let minDiff = Infinity;
57
+ for (const child of children) {
58
+ if (child.tagName !== "BUTTON") continue;
59
+ const htmlChild = child;
60
+ const childCenter = htmlChild.offsetTop + htmlChild.offsetHeight / 2;
61
+ const diff = Math.abs(childCenter - center);
62
+ if (diff < minDiff) {
63
+ minDiff = diff;
64
+ closest = htmlChild;
65
+ }
66
+ }
67
+ if (closest) {
68
+ const val = parseInt(closest.getAttribute(`data-${type2}`) || "0", 10);
69
+ const newDate = new Date(internalMonthRef.current);
70
+ if (type2 === "month") {
71
+ if (newDate.getMonth() !== val) {
72
+ newDate.setMonth(val);
73
+ handleMonthChange(newDate);
74
+ }
75
+ } else {
76
+ if (newDate.getFullYear() !== val) {
77
+ newDate.setFullYear(val);
78
+ handleMonthChange(newDate);
79
+ }
80
+ }
81
+ }
82
+ }, 100);
83
+ };
84
+ React.useEffect(() => {
85
+ if (showMonthYearPicker) {
86
+ setTimeout(() => {
87
+ selectedMonthRef.current?.scrollIntoView({ block: "center", behavior: "smooth" });
88
+ selectedYearRef.current?.scrollIntoView({ block: "center", behavior: "smooth" });
89
+ }, 10);
90
+ }
91
+ }, [showMonthYearPicker]);
92
+ const startYear = props.startMonth?.getFullYear() || 1970;
93
+ const endYear = props.endMonth?.getFullYear() || 2050;
94
+ const years = React.useMemo(() => Array.from({ length: endYear - startYear + 1 }, (_, i) => startYear + i), [startYear, endYear]);
95
+ const months = React.useMemo(() => Array.from({ length: 12 }, (_, i) => {
96
+ const d = /* @__PURE__ */ new Date();
97
+ d.setMonth(i);
98
+ return d.toLocaleString("default", { month: "long" });
99
+ }), []);
100
+ const handleMonthChange = (newMonth) => {
101
+ setInternalMonth(newMonth);
102
+ props.onMonthChange?.(newMonth);
103
+ };
104
+ const handleTodayClick = () => {
105
+ const today = /* @__PURE__ */ new Date();
106
+ setInternalMonth(today);
107
+ props.onMonthChange?.(today);
108
+ if (props.mode === "single" && props.onSelect) {
109
+ props.onSelect(today, today, { selected: false }, {});
110
+ }
111
+ };
112
+ const CalendarContent = /* @__PURE__ */ jsxs("div", { className: "shared:flex shared:flex-col shared:gap-2 shared:w-full shared:overflow-hidden shared:md:h-[26.5rem] shared:h-[31.5rem] shared:md:mt-0 shared:mt-5", children: [
113
+ showMonthYearPicker ? /* @__PURE__ */ jsxs("div", { className: "shared:relative shared:flex shared:gap-2 shared:md:h-[23rem] shared:h-[26.5rem] shared:p-2 shared:w-full shared:md:w-[var(--radix-popover-trigger-width)]", children: [
114
+ /* @__PURE__ */ jsx("div", { className: "shared:absolute shared:top-0 shared:inset-x-0 shared:h-16 shared:bg-gradient-to-b shared:from-popover shared:from-[40%] shared:to-transparent shared:pointer-events-none shared:z-10" }),
115
+ /* @__PURE__ */ jsx("div", { className: "shared:absolute shared:bottom-0 shared:inset-x-0 shared:h-16 shared:bg-gradient-to-t shared:from-popover shared:from-[40%] shared:to-transparent shared:pointer-events-none shared:z-10" }),
116
+ /* @__PURE__ */ jsxs(
117
+ "div",
118
+ {
119
+ className: "shared:relative shared:flex-1 shared:overflow-y-auto shared:overscroll-contain shared:h-full shared:flex shared:flex-col shared:gap-1 shared:snap-y shared:snap-mandatory hide-scrollbar",
120
+ onScroll: (e) => handleScroll(e, "month", scrollTimeoutMonthRef),
121
+ onWheel: (e) => e.stopPropagation(),
122
+ onTouchMove: (e) => e.stopPropagation(),
123
+ children: [
124
+ /* @__PURE__ */ jsx("div", { className: "shared:h-[calc(50%-1rem)] shared:shrink-0 shared:pointer-events-none" }),
125
+ months.map((month, i) => {
126
+ const isSelected = internalMonth.getMonth() === i;
127
+ return /* @__PURE__ */ jsx(
128
+ Button,
129
+ {
130
+ "data-month": i,
131
+ ref: isSelected ? selectedMonthRef : null,
132
+ variant: isSelected ? "default" : "ghost",
133
+ className: "shared:w-full shared:justify-center shared:snap-center",
134
+ onClick: (e) => {
135
+ const newDate = new Date(internalMonth);
136
+ newDate.setMonth(i);
137
+ handleMonthChange(newDate);
138
+ e.currentTarget.scrollIntoView({ block: "center", behavior: "smooth" });
139
+ },
140
+ children: month
141
+ },
142
+ month
143
+ );
144
+ }),
145
+ /* @__PURE__ */ jsx("div", { className: "shared:h-[calc(50%-1rem)] shared:shrink-0 shared:pointer-events-none" })
146
+ ]
147
+ }
148
+ ),
149
+ /* @__PURE__ */ jsxs(
150
+ "div",
151
+ {
152
+ className: "shared:relative shared:flex-1 shared:overflow-y-auto shared:overscroll-contain shared:flex shared:flex-col shared:gap-1 shared:snap-y shared:snap-mandatory hide-scrollbar",
153
+ onScroll: (e) => handleScroll(e, "year", scrollTimeoutYearRef),
154
+ onWheel: (e) => e.stopPropagation(),
155
+ onTouchMove: (e) => e.stopPropagation(),
156
+ children: [
157
+ /* @__PURE__ */ jsx("div", { className: "shared:h-[calc(50%-1rem)] shared:shrink-0 shared:pointer-events-none" }),
158
+ years.map((year) => {
159
+ const isSelected = internalMonth.getFullYear() === year;
160
+ return /* @__PURE__ */ jsx(
161
+ Button,
162
+ {
163
+ "data-year": year,
164
+ ref: isSelected ? selectedYearRef : null,
165
+ variant: isSelected ? "default" : "ghost",
166
+ className: "shared:w-full shared:justify-center shared:snap-center",
167
+ onClick: (e) => {
168
+ const newDate = new Date(internalMonth);
169
+ newDate.setFullYear(year);
170
+ handleMonthChange(newDate);
171
+ e.currentTarget.scrollIntoView({ block: "center", behavior: "smooth" });
172
+ },
173
+ children: year
174
+ },
175
+ year
176
+ );
177
+ }),
178
+ /* @__PURE__ */ jsx("div", { className: "shared:h-[calc(50%-1rem)] shared:shrink-0 shared:pointer-events-none" })
179
+ ]
180
+ }
181
+ )
182
+ ] }) : /* @__PURE__ */ jsx(
183
+ DayPicker,
184
+ {
185
+ month: internalMonth,
186
+ onMonthChange: handleMonthChange,
187
+ showOutsideDays,
188
+ fixedWeeks: showOutsideDays,
189
+ className: cn(
190
+ "shared:w-full shared:group/calendar shared:p-0 shared:md:p-3 shared:[--cell-size:2rem] shared:[[data-slot=card-content]_&]:bg-transparent shared:[[data-slot=popover-content]_&]:bg-transparent calendar",
191
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
192
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
193
+ className
194
+ ),
195
+ captionLayout: "label",
196
+ formatters: {
197
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
198
+ ...formatters
199
+ },
200
+ classNames: {
201
+ root: cn("shared:p-2 shared:pb-0", isDrawer ? "shared:w-full shared:[&_.calendar]:w-full shared:p-0 shared:md:h-[20rem]" : "shared:w-fit", defaultClassNames.root),
202
+ months: cn(
203
+ "shared:relative shared:flex shared:flex-col shared:gap-4 shared:md:flex-row",
204
+ defaultClassNames.months
205
+ ),
206
+ month: cn("shared:flex shared:w-full shared:flex-col shared:gap-4", defaultClassNames.month),
207
+ nav: cn(
208
+ "shared:absolute shared:inset-x-0 shared:top-0 shared:flex shared:w-full shared:items-center shared:justify-between shared:gap-1 shared:pointer-events-none",
209
+ defaultClassNames.nav
210
+ ),
211
+ button_previous: cn(
212
+ buttonVariants({ variant: buttonVariant }),
213
+ "shared:h-[var(--cell-size)] shared:w-[var(--cell-size)] shared:select-none shared:p-0 shared:aria-disabled:opacity-50 shared:pointer-events-auto",
214
+ defaultClassNames.button_previous
215
+ ),
216
+ button_next: cn(
217
+ buttonVariants({ variant: buttonVariant }),
218
+ "shared:h-[var(--cell-size)] shared:w-[var(--cell-size)] shared:select-none shared:p-0 shared:aria-disabled:opacity-50 shared:pointer-events-auto",
219
+ defaultClassNames.button_next
220
+ ),
221
+ month_caption: cn(
222
+ "shared:flex shared:h-[var(--cell-size)] shared:w-full shared:items-center shared:justify-center shared:px-[var(--cell-size)]",
223
+ defaultClassNames.month_caption
224
+ ),
225
+ dropdowns: cn(
226
+ "shared:flex shared:h-[var(--cell-size)] shared:w-full shared:items-center shared:justify-center shared:gap-1.5 shared:text-sm shared:font-medium",
227
+ defaultClassNames.dropdowns
228
+ ),
229
+ dropdown_root: cn(
230
+ "shared:has-focus:border-ring shared:border-input shared:shadow-xs shared:has-focus:ring-ring/50 shared:has-focus:ring-[3px] shared:relative shared:rounded-md shared:border",
231
+ defaultClassNames.dropdown_root
232
+ ),
233
+ dropdown: cn(
234
+ "shared:bg-popover shared:absolute shared:inset-0 shared:opacity-0",
235
+ defaultClassNames.dropdown
236
+ ),
237
+ caption_label: cn(
238
+ "shared:select-none shared:font-medium",
239
+ captionLayout === "label" ? "shared:text-sm" : "shared:[&>svg]:text-muted-foreground shared:flex shared:h-8 shared:items-center shared:gap-1 shared:rounded-md shared:pl-2 shared:pr-1 shared:text-sm shared:[&>svg]:size-3.5",
240
+ defaultClassNames.caption_label
241
+ ),
242
+ table: "shared:w-full shared:border-collapse",
243
+ weekdays: cn("shared:flex", defaultClassNames.weekdays),
244
+ weekday: cn(
245
+ "shared:text-muted-foreground shared:flex-1 shared:select-none shared:rounded-md shared:text-[0.8rem] shared:font-normal",
246
+ defaultClassNames.weekday
247
+ ),
248
+ week: cn("shared:mt-2 shared:flex shared:w-full", defaultClassNames.week),
249
+ week_number_header: cn(
250
+ "shared:w-[var(--cell-size)] shared:select-none",
251
+ defaultClassNames.week_number_header
252
+ ),
253
+ week_number: cn(
254
+ "shared:text-muted-foreground shared:select-none shared:text-[0.8rem]",
255
+ defaultClassNames.week_number
256
+ ),
257
+ day: cn(
258
+ "shared:group/day shared:relative shared:flex shared:items-center shared:justify-center shared:aspect-square shared:h-full shared:w-full shared:text-md shared:md:text-base shared:select-none shared:p-0 shared:text-center shared:[&:first-child[data-selected=true]_button]:rounded-l-full shared:[&:last-child[data-selected=true]_button]:rounded-r-full",
259
+ defaultClassNames.day
260
+ ),
261
+ range_start: cn(
262
+ "shared:bg-accent shared:rounded-l-full",
263
+ defaultClassNames.range_start
264
+ ),
265
+ range_middle: cn("shared:rounded-none", defaultClassNames.range_middle),
266
+ range_end: cn("shared:bg-accent shared:rounded-r-full", defaultClassNames.range_end),
267
+ today: cn(
268
+ "shared:bg-red-500 shared:text-white shared:text-center shared:rounded-full shared:[&:not([data-selected=true])_button:hover]:bg-red-600 shared:[&:not([data-selected=true])_button:hover]:text-white shared:data-[selected=true]:bg-transparent",
269
+ defaultClassNames.today
270
+ ),
271
+ outside: cn(
272
+ "shared:text-muted-foreground shared:aria-selected:text-muted-foreground",
273
+ defaultClassNames.outside
274
+ ),
275
+ disabled: cn(
276
+ "shared:text-muted-foreground shared:opacity-50",
277
+ defaultClassNames.disabled
278
+ ),
279
+ hidden: cn("shared:invisible", defaultClassNames.hidden),
280
+ ...classNames
281
+ },
282
+ components: {
283
+ CaptionLabel: (props2) => {
284
+ return /* @__PURE__ */ jsxs(
285
+ Button,
286
+ {
287
+ variant: "secondary",
288
+ size: "default",
289
+ className: "shared:text-sm shared:font-medium shared:hover:bg-accent shared:hover:text-accent-foreground",
290
+ onClick: () => setShowMonthYearPicker((prev) => !prev),
291
+ children: [
292
+ internalMonth.toLocaleString("default", { month: "long" }),
293
+ " ",
294
+ internalMonth.getFullYear()
295
+ ]
296
+ }
297
+ );
298
+ },
299
+ Root: ({ className: className2, rootRef, ...props2 }) => {
300
+ return /* @__PURE__ */ jsx(
301
+ "div",
302
+ {
303
+ "data-slot": "calendar",
304
+ ref: rootRef,
305
+ className: cn(className2),
306
+ ...props2
307
+ }
308
+ );
309
+ },
310
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
311
+ if (orientation === "left") {
312
+ return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("shared:size-10 shared:p-2 shared:bg-muted/50 shared:rounded-full", className2), ...props2 });
313
+ }
314
+ if (orientation === "right") {
315
+ return /* @__PURE__ */ jsx(
316
+ ChevronRightIcon,
317
+ {
318
+ className: cn("shared:size-10 shared:p-2 shared:bg-muted/50 shared:rounded-full", className2),
319
+ ...props2
320
+ }
321
+ );
322
+ }
323
+ return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("shared:size-4", className2), ...props2 });
324
+ },
325
+ DayButton: CalendarDayButton,
326
+ WeekNumber: ({ children, ...props2 }) => {
327
+ return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "shared:flex shared:size-[var(--cell-size)] shared:items-center shared:justify-center shared:text-center", children }) });
328
+ },
329
+ ...components
330
+ },
331
+ ...props
332
+ }
333
+ ),
334
+ /* @__PURE__ */ jsx("div", { className: "shared:px-2 shared:pb-2 shared:mt-[-4px] shared:min-h-min shared:flex shared:justify-end", children: showMonthYearPicker ? /* @__PURE__ */ jsx(
335
+ Button,
336
+ {
337
+ variant: "default2",
338
+ onClick: () => setShowMonthYearPicker(false),
339
+ children: "Done"
340
+ }
341
+ ) : /* @__PURE__ */ jsx(
342
+ Button,
343
+ {
344
+ variant: "default2",
345
+ onClick: handleTodayClick,
346
+ children: "Today"
347
+ }
348
+ ) })
349
+ ] });
350
+ if (type === "raw") return CalendarContent;
351
+ if (isDrawer) {
352
+ return /* @__PURE__ */ jsxs(Drawer, { open, onOpenChange: setOpen, shouldScaleBackground: false, children: [
353
+ /* @__PURE__ */ jsx(DrawerTrigger, { asChild: true, children: trigger || /* @__PURE__ */ jsxs(Button, { type: "button", variant: "input", children: [
354
+ label,
355
+ /* @__PURE__ */ jsx(Calendar$1, { theme: "outline", size: "19", fill: "#000000" })
356
+ ] }) }),
357
+ /* @__PURE__ */ jsxs(DrawerContent, { className: "shared:p-2 shared:flex shared:flex-col shared:justify-center shared:items-center", children: [
358
+ CalendarContent,
359
+ /* @__PURE__ */ jsx(DrawerFooter, { className: "shared:w-full shared:pt-0 shared:max-w-sm shared:px-0 shared:pb-0", children: /* @__PURE__ */ jsx(DrawerClose, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "lg", className: "shared:w-full", children: "Close" }) }) })
360
+ ] })
361
+ ] });
362
+ }
363
+ return /* @__PURE__ */ jsxs(Popover, { children: [
364
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: trigger }),
365
+ /* @__PURE__ */ jsx(PopoverContent, { className: "shared:w-auto shared:p-0", align: "start", children: CalendarContent })
366
+ ] });
367
+ }
368
+ function CalendarDayButton({
369
+ className,
370
+ day,
371
+ modifiers,
372
+ ...props
373
+ }) {
374
+ const defaultClassNames = getDefaultClassNames();
375
+ const ref = React.useRef(null);
376
+ React.useEffect(() => {
377
+ if (modifiers.focused) ref.current?.focus();
378
+ }, [modifiers.focused]);
379
+ return /* @__PURE__ */ jsx(
380
+ Button,
381
+ {
382
+ ref,
383
+ variant: "ghost",
384
+ size: "icon",
385
+ "data-day": day.date.toLocaleDateString(),
386
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
387
+ "data-range-start": modifiers.range_start,
388
+ "data-range-end": modifiers.range_end,
389
+ "data-range-middle": modifiers.range_middle,
390
+ className: cn(
391
+ "shared:rounded-full shared:cupertino-corner shared:data-[selected-single=true]:bg-primary shared:data-[selected-single=true]:text-primary-foreground shared:data-[range-middle=true]:bg-accent shared:data-[range-middle=true]:text-accent-foreground shared:data-[range-start=true]:bg-primary shared:data-[range-start=true]:text-primary-foreground shared:data-[range-end=true]:bg-primary shared:data-[range-end=true]:text-primary-foreground shared:focus-visible:border-ring shared:focus-visible:ring-ring/50 shared:flex shared:items-center shared:justify-center shared:aspect-square shared:h-12 shared:md:h-9 shared:min-w-[--cell-size] shared:flex-col shared:gap-1 shared:font-normal shared:leading-none shared:data-[range-end=true]:rounded-full shared:data-[range-end=true]:cupertino-corner shared:data-[range-middle=true]:rounded-none shared:data-[range-start=true]:rounded-full shared:data-[range-start=true]:cupertino-corner shared:focus-visible:relative shared:focus-visible:z-10 shared:focus-visible:ring-[3px] shared:[&>span]:text-xs shared:[&>span]:opacity-70 shared:hover:text-black shared:data-[selected-single=true]:hover:text-primary-foreground shared:data-[selected-single=true]:hover:bg-primary shared:data-[range-start=true]:hover:text-primary-foreground shared:data-[range-start=true]:hover:bg-primary shared:data-[range-end=true]:hover:text-primary-foreground shared:data-[range-end=true]:hover:bg-primary",
392
+ defaultClassNames.day,
393
+ className
394
+ ),
395
+ ...props
396
+ }
397
+ );
398
+ }
399
+ export {
400
+ Calendar,
401
+ CalendarDayButton
402
+ };