@zimyo/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 (307) hide show
  1. package/dist/_virtual/_rollupPluginBabelHelpers.js +11 -0
  2. package/dist/components/index.d.ts +59 -0
  3. package/dist/components/ui/accordion.d.ts +9 -0
  4. package/dist/components/ui/accordion.js +53 -0
  5. package/dist/components/ui/alert-dialog.d.ts +16 -0
  6. package/dist/components/ui/alert-dialog.js +107 -0
  7. package/dist/components/ui/alert.d.ts +12 -0
  8. package/dist/components/ui/alert.js +53 -0
  9. package/dist/components/ui/aspect-ratio.d.ts +6 -0
  10. package/dist/components/ui/aspect-ratio.js +12 -0
  11. package/dist/components/ui/avatar.d.ts +8 -0
  12. package/dist/components/ui/avatar.js +38 -0
  13. package/dist/components/ui/badge.d.ts +12 -0
  14. package/dist/components/ui/badge.js +37 -0
  15. package/dist/components/ui/breadcrumb.d.ts +13 -0
  16. package/dist/components/ui/breadcrumb.js +90 -0
  17. package/dist/components/ui/button.d.ts +13 -0
  18. package/dist/components/ui/button.js +49 -0
  19. package/dist/components/ui/calendar.d.ts +12 -0
  20. package/dist/components/ui/calendar.js +134 -0
  21. package/dist/components/ui/card.d.ts +11 -0
  22. package/dist/components/ui/card.js +77 -0
  23. package/dist/components/ui/carousel.d.ts +24 -0
  24. package/dist/components/ui/carousel.js +163 -0
  25. package/dist/components/ui/chart.d.ts +43 -0
  26. package/dist/components/ui/chart.js +187 -0
  27. package/dist/components/ui/checkbox.d.ts +6 -0
  28. package/dist/components/ui/checkbox.js +24 -0
  29. package/dist/components/ui/collapsible.d.ts +8 -0
  30. package/dist/components/ui/collapsible.js +24 -0
  31. package/dist/components/ui/command.d.ts +21 -0
  32. package/dist/components/ui/command.js +110 -0
  33. package/dist/components/ui/context-menu.d.ts +27 -0
  34. package/dist/components/ui/context-menu.js +158 -0
  35. package/dist/components/ui/dialog.d.ts +17 -0
  36. package/dist/components/ui/dialog.js +102 -0
  37. package/dist/components/ui/drawer.d.ts +15 -0
  38. package/dist/components/ui/drawer.js +97 -0
  39. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  40. package/dist/components/ui/dropdown-menu.js +160 -0
  41. package/dist/components/ui/form.d.ts +26 -0
  42. package/dist/components/ui/form.js +125 -0
  43. package/dist/components/ui/hover-card.d.ts +8 -0
  44. package/dist/components/ui/hover-card.js +36 -0
  45. package/dist/components/ui/input-otp.d.ts +13 -0
  46. package/dist/components/ui/input-otp.js +61 -0
  47. package/dist/components/ui/input.d.ts +5 -0
  48. package/dist/components/ui/input.js +19 -0
  49. package/dist/components/ui/label.d.ts +6 -0
  50. package/dist/components/ui/label.js +18 -0
  51. package/dist/components/ui/menubar.d.ts +28 -0
  52. package/dist/components/ui/menubar.js +178 -0
  53. package/dist/components/ui/navigation-menu.d.ts +17 -0
  54. package/dist/components/ui/navigation-menu.js +102 -0
  55. package/dist/components/ui/pagination.d.ts +17 -0
  56. package/dist/components/ui/pagination.js +95 -0
  57. package/dist/components/ui/popover.d.ts +9 -0
  58. package/dist/components/ui/popover.js +40 -0
  59. package/dist/components/ui/progress.d.ts +6 -0
  60. package/dist/components/ui/progress.js +25 -0
  61. package/dist/components/ui/radio-group.d.ts +7 -0
  62. package/dist/components/ui/radio-group.js +34 -0
  63. package/dist/components/ui/resizable.d.ts +10 -0
  64. package/dist/components/ui/resizable.js +40 -0
  65. package/dist/components/ui/scroll-area.d.ts +7 -0
  66. package/dist/components/ui/scroll-area.js +37 -0
  67. package/dist/components/ui/select.d.ts +17 -0
  68. package/dist/components/ui/select.js +118 -0
  69. package/dist/components/ui/separator.d.ts +6 -0
  70. package/dist/components/ui/separator.js +22 -0
  71. package/dist/components/ui/sheet.d.ts +15 -0
  72. package/dist/components/ui/sheet.js +101 -0
  73. package/dist/components/ui/sidebar.d.ts +73 -0
  74. package/dist/components/ui/sidebar.js +484 -0
  75. package/dist/components/ui/skeleton.d.ts +5 -0
  76. package/dist/components/ui/skeleton.js +16 -0
  77. package/dist/components/ui/slider.d.ts +6 -0
  78. package/dist/components/ui/slider.js +39 -0
  79. package/dist/components/ui/sonner.d.ts +6 -0
  80. package/dist/components/ui/sonner.js +18 -0
  81. package/dist/components/ui/switch.d.ts +6 -0
  82. package/dist/components/ui/switch.js +21 -0
  83. package/dist/components/ui/table.d.ts +12 -0
  84. package/dist/components/ui/table.js +90 -0
  85. package/dist/components/ui/tabs.d.ts +9 -0
  86. package/dist/components/ui/tabs.js +48 -0
  87. package/dist/components/ui/textarea.d.ts +5 -0
  88. package/dist/components/ui/textarea.js +17 -0
  89. package/dist/components/ui/toggle-group.d.ts +10 -0
  90. package/dist/components/ui/toggle-group.js +52 -0
  91. package/dist/components/ui/toggle.d.ts +12 -0
  92. package/dist/components/ui/toggle.js +42 -0
  93. package/dist/components/ui/tooltip.d.ts +9 -0
  94. package/dist/components/ui/tooltip.js +45 -0
  95. package/dist/index.d.ts +61 -0
  96. package/dist/index.js +47 -0
  97. package/dist/lib/utils.d.ts +5 -0
  98. package/dist/lib/utils.js +8 -0
  99. package/dist/node_modules/@date-fns/tz/date/index.js +101 -0
  100. package/dist/node_modules/@date-fns/tz/date/mini.js +207 -0
  101. package/dist/node_modules/@date-fns/tz/tzOffset/index.js +43 -0
  102. package/dist/node_modules/@radix-ui/primitive/dist/index.js +11 -0
  103. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +39 -0
  104. package/dist/node_modules/@radix-ui/react-context/dist/index.js +79 -0
  105. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +321 -0
  106. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +211 -0
  107. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +29 -0
  108. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +207 -0
  109. package/dist/node_modules/@radix-ui/react-id/dist/index.js +15 -0
  110. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
  111. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
  112. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +43 -0
  113. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +89 -0
  114. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +12 -0
  115. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +70 -0
  116. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
  117. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
  118. package/dist/node_modules/aria-hidden/dist/es2015/index.js +137 -0
  119. package/dist/node_modules/class-variance-authority/dist/index.js +44 -0
  120. package/dist/node_modules/clsx/dist/clsx.js +3 -0
  121. package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.js +3 -0
  122. package/dist/node_modules/cmdk/dist/index.js +10 -0
  123. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
  124. package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
  125. package/dist/node_modules/date-fns/_lib/format/formatters.js +775 -0
  126. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +94 -0
  127. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +66 -0
  128. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +31 -0
  129. package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
  130. package/dist/node_modules/date-fns/_lib/normalizeInterval.js +8 -0
  131. package/dist/node_modules/date-fns/_lib/protectedTokens.js +25 -0
  132. package/dist/node_modules/date-fns/addDays.js +41 -0
  133. package/dist/node_modules/date-fns/addMonths.js +75 -0
  134. package/dist/node_modules/date-fns/addWeeks.js +33 -0
  135. package/dist/node_modules/date-fns/addYears.js +33 -0
  136. package/dist/node_modules/date-fns/constants.js +46 -0
  137. package/dist/node_modules/date-fns/constructFrom.js +49 -0
  138. package/dist/node_modules/date-fns/differenceInCalendarDays.js +62 -0
  139. package/dist/node_modules/date-fns/differenceInCalendarMonths.js +42 -0
  140. package/dist/node_modules/date-fns/eachMonthOfInterval.js +65 -0
  141. package/dist/node_modules/date-fns/endOfISOWeek.js +35 -0
  142. package/dist/node_modules/date-fns/endOfMonth.js +37 -0
  143. package/dist/node_modules/date-fns/endOfWeek.js +53 -0
  144. package/dist/node_modules/date-fns/endOfYear.js +37 -0
  145. package/dist/node_modules/date-fns/format.js +423 -0
  146. package/dist/node_modules/date-fns/getDayOfYear.js +34 -0
  147. package/dist/node_modules/date-fns/getDaysInMonth.js +36 -0
  148. package/dist/node_modules/date-fns/getISOWeek.js +40 -0
  149. package/dist/node_modules/date-fns/getISOWeekYear.js +52 -0
  150. package/dist/node_modules/date-fns/getMonth.js +29 -0
  151. package/dist/node_modules/date-fns/getWeek.js +54 -0
  152. package/dist/node_modules/date-fns/getWeekYear.js +75 -0
  153. package/dist/node_modules/date-fns/getYear.js +29 -0
  154. package/dist/node_modules/date-fns/isAfter.js +25 -0
  155. package/dist/node_modules/date-fns/isBefore.js +25 -0
  156. package/dist/node_modules/date-fns/isDate.js +41 -0
  157. package/dist/node_modules/date-fns/isSameDay.js +46 -0
  158. package/dist/node_modules/date-fns/isSameMonth.js +43 -0
  159. package/dist/node_modules/date-fns/isSameYear.js +35 -0
  160. package/dist/node_modules/date-fns/isValid.js +39 -0
  161. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +10 -0
  162. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +64 -0
  163. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +59 -0
  164. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +22 -0
  165. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +103 -0
  166. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +41 -0
  167. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +13 -0
  168. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +189 -0
  169. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +134 -0
  170. package/dist/node_modules/date-fns/locale/en-US.js +28 -0
  171. package/dist/node_modules/date-fns/max.js +49 -0
  172. package/dist/node_modules/date-fns/min.js +49 -0
  173. package/dist/node_modules/date-fns/setMonth.js +46 -0
  174. package/dist/node_modules/date-fns/setYear.js +40 -0
  175. package/dist/node_modules/date-fns/startOfDay.js +35 -0
  176. package/dist/node_modules/date-fns/startOfISOWeek.js +35 -0
  177. package/dist/node_modules/date-fns/startOfISOWeekYear.js +42 -0
  178. package/dist/node_modules/date-fns/startOfMonth.js +37 -0
  179. package/dist/node_modules/date-fns/startOfWeek.js +53 -0
  180. package/dist/node_modules/date-fns/startOfWeekYear.js +64 -0
  181. package/dist/node_modules/date-fns/startOfYear.js +36 -0
  182. package/dist/node_modules/date-fns/toDate.js +46 -0
  183. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1669 -0
  184. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +37 -0
  185. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +38 -0
  186. package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
  187. package/dist/node_modules/input-otp/dist/index.js +24 -0
  188. package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +285 -0
  189. package/dist/node_modules/react-day-picker/dist/esm/UI.js +122 -0
  190. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +30 -0
  191. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +14 -0
  192. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +13 -0
  193. package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +522 -0
  194. package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +13 -0
  195. package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +13 -0
  196. package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +18 -0
  197. package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +18 -0
  198. package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +19 -0
  199. package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +21 -0
  200. package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +13 -0
  201. package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +13 -0
  202. package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +15 -0
  203. package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +14 -0
  204. package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +13 -0
  205. package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +13 -0
  206. package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +15 -0
  207. package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +31 -0
  208. package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +15 -0
  209. package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +13 -0
  210. package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +15 -0
  211. package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +14 -0
  212. package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +13 -0
  213. package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +14 -0
  214. package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +14 -0
  215. package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +13 -0
  216. package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +13 -0
  217. package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +14 -0
  218. package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +13 -0
  219. package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +15 -0
  220. package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +26 -0
  221. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +25 -0
  222. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +19 -0
  223. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +18 -0
  224. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +21 -0
  225. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +13 -0
  226. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +19 -0
  227. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +23 -0
  228. package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +7 -0
  229. package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +73 -0
  230. package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +95 -0
  231. package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +22 -0
  232. package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +28 -0
  233. package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +33 -0
  234. package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +20 -0
  235. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +27 -0
  236. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +51 -0
  237. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +19 -0
  238. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +33 -0
  239. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +24 -0
  240. package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +46 -0
  241. package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +24 -0
  242. package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +28 -0
  243. package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +33 -0
  244. package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +69 -0
  245. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +51 -0
  246. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +39 -0
  247. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +36 -0
  248. package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +37 -0
  249. package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +27 -0
  250. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +24 -0
  251. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +14 -0
  252. package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +38 -0
  253. package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +27 -0
  254. package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +31 -0
  255. package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +11 -0
  256. package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +32 -0
  257. package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +24 -0
  258. package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +22 -0
  259. package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +14 -0
  260. package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +13 -0
  261. package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +15 -0
  262. package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +15 -0
  263. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +15 -0
  264. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +14 -0
  265. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +18 -0
  266. package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +14 -0
  267. package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +57 -0
  268. package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +45 -0
  269. package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +44 -0
  270. package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +175 -0
  271. package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +85 -0
  272. package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +25 -0
  273. package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +50 -0
  274. package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +31 -0
  275. package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +92 -0
  276. package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +62 -0
  277. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +30 -0
  278. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +74 -0
  279. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +35 -0
  280. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +21 -0
  281. package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +66 -0
  282. package/dist/node_modules/react-hook-form/dist/index.esm.js +507 -0
  283. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +9 -0
  284. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +160 -0
  285. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +38 -0
  286. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +21 -0
  287. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +110 -0
  288. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  289. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  290. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +56 -0
  291. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +10 -0
  292. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +31 -0
  293. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js +2407 -0
  294. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +19 -0
  295. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +25 -0
  296. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +51 -0
  297. package/dist/node_modules/sonner/dist/index.js +1125 -0
  298. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2956 -0
  299. package/dist/node_modules/tslib/tslib.es6.js +56 -0
  300. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +24 -0
  301. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +48 -0
  302. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +42 -0
  303. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +21 -0
  304. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +77 -0
  305. package/dist/node_modules/vaul/dist/index.js +1627 -0
  306. package/dist/styles.css +1 -0
  307. package/package.json +91 -0
@@ -0,0 +1,38 @@
1
+ import { __rest, __assign } from '../../../tslib/tslib.es6.js';
2
+ import * as React from 'react';
3
+ import { zeroRightClassName, fullWidthClassName } from '../../../react-remove-scroll-bar/dist/es2015/constants.js';
4
+ import { effectCar } from './medium.js';
5
+ import { useMergeRefs } from '../../../use-callback-ref/dist/es2015/useMergeRef.js';
6
+
7
+ var nothing = function () {
8
+ return;
9
+ };
10
+ /**
11
+ * Removes scrollbar from the page and contain the scroll within the Lock
12
+ */
13
+ var RemoveScroll = React.forwardRef(function (props, parentRef) {
14
+ var ref = React.useRef(null);
15
+ var _a = React.useState({
16
+ onScrollCapture: nothing,
17
+ onWheelCapture: nothing,
18
+ onTouchMoveCapture: nothing,
19
+ }), callbacks = _a[0], setCallbacks = _a[1];
20
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
21
+ var SideCar = sideCar;
22
+ var containerRef = useMergeRefs([ref, parentRef]);
23
+ var containerProps = __assign(__assign({}, rest), callbacks);
24
+ return (React.createElement(React.Fragment, null,
25
+ enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),
26
+ forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
27
+ });
28
+ RemoveScroll.defaultProps = {
29
+ enabled: true,
30
+ removeScrollBar: true,
31
+ inert: false,
32
+ };
33
+ RemoveScroll.classNames = {
34
+ fullWidth: fullWidthClassName,
35
+ zeroRight: zeroRightClassName,
36
+ };
37
+
38
+ export { RemoveScroll };
@@ -0,0 +1,21 @@
1
+ var passiveSupported = false;
2
+ if (typeof window !== 'undefined') {
3
+ try {
4
+ var options = Object.defineProperty({}, 'passive', {
5
+ get: function () {
6
+ passiveSupported = true;
7
+ return true;
8
+ },
9
+ });
10
+ // @ts-ignore
11
+ window.addEventListener('test', options, options);
12
+ // @ts-ignore
13
+ window.removeEventListener('test', options, options);
14
+ }
15
+ catch (err) {
16
+ passiveSupported = false;
17
+ }
18
+ }
19
+ var nonPassive = passiveSupported ? { passive: false } : false;
20
+
21
+ export { nonPassive };
@@ -0,0 +1,110 @@
1
+ var alwaysContainsScroll = function (node) {
2
+ // textarea will always _contain_ scroll inside self. It only can be hidden
3
+ return node.tagName === 'TEXTAREA';
4
+ };
5
+ var elementCanBeScrolled = function (node, overflow) {
6
+ if (!(node instanceof Element)) {
7
+ return false;
8
+ }
9
+ var styles = window.getComputedStyle(node);
10
+ return (
11
+ // not-not-scrollable
12
+ styles[overflow] !== 'hidden' &&
13
+ // contains scroll inside self
14
+ !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));
15
+ };
16
+ var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };
17
+ var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };
18
+ var locationCouldBeScrolled = function (axis, node) {
19
+ var ownerDocument = node.ownerDocument;
20
+ var current = node;
21
+ do {
22
+ // Skip over shadow root
23
+ if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
24
+ current = current.host;
25
+ }
26
+ var isScrollable = elementCouldBeScrolled(axis, current);
27
+ if (isScrollable) {
28
+ var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
29
+ if (scrollHeight > clientHeight) {
30
+ return true;
31
+ }
32
+ }
33
+ current = current.parentNode;
34
+ } while (current && current !== ownerDocument.body);
35
+ return false;
36
+ };
37
+ var getVScrollVariables = function (_a) {
38
+ var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
39
+ return [
40
+ scrollTop,
41
+ scrollHeight,
42
+ clientHeight,
43
+ ];
44
+ };
45
+ var getHScrollVariables = function (_a) {
46
+ var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
47
+ return [
48
+ scrollLeft,
49
+ scrollWidth,
50
+ clientWidth,
51
+ ];
52
+ };
53
+ var elementCouldBeScrolled = function (axis, node) {
54
+ return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
55
+ };
56
+ var getScrollVariables = function (axis, node) {
57
+ return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
58
+ };
59
+ var getDirectionFactor = function (axis, direction) {
60
+ /**
61
+ * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
62
+ * and then increasingly negative as you scroll towards the end of the content.
63
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
64
+ */
65
+ return axis === 'h' && direction === 'rtl' ? -1 : 1;
66
+ };
67
+ var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
68
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
69
+ var delta = directionFactor * sourceDelta;
70
+ // find scrollable target
71
+ var target = event.target;
72
+ var targetInLock = endTarget.contains(target);
73
+ var shouldCancelScroll = false;
74
+ var isDeltaPositive = delta > 0;
75
+ var availableScroll = 0;
76
+ var availableScrollTop = 0;
77
+ do {
78
+ if (!target) {
79
+ break;
80
+ }
81
+ var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
82
+ var elementScroll = scroll_1 - capacity - directionFactor * position;
83
+ if (position || elementScroll) {
84
+ if (elementCouldBeScrolled(axis, target)) {
85
+ availableScroll += elementScroll;
86
+ availableScrollTop += position;
87
+ }
88
+ }
89
+ var parent_1 = target.parentNode;
90
+ // we will "bubble" from ShadowDom in case we are, or just to the parent in normal case
91
+ // this is the same logic used in focus-lock
92
+ target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1);
93
+ } while (
94
+ // portaled content
95
+ (!targetInLock && target !== document.body) ||
96
+ // self content
97
+ (targetInLock && (endTarget.contains(target) || endTarget === target)));
98
+ // handle epsilon around 0 (non standard zoom levels)
99
+ if (isDeltaPositive &&
100
+ ((Math.abs(availableScroll) < 1) || (false))) {
101
+ shouldCancelScroll = true;
102
+ }
103
+ else if (!isDeltaPositive &&
104
+ ((Math.abs(availableScrollTop) < 1) || (false))) {
105
+ shouldCancelScroll = true;
106
+ }
107
+ return shouldCancelScroll;
108
+ };
109
+
110
+ export { handleScroll, locationCouldBeScrolled };
@@ -0,0 +1,5 @@
1
+ import { createSidecarMedium } from '../../../use-sidecar/dist/es2015/medium.js';
2
+
3
+ var effectCar = createSidecarMedium();
4
+
5
+ export { effectCar };
@@ -0,0 +1,7 @@
1
+ import { RemoveScrollSideCar } from './SideEffect.js';
2
+ import { effectCar } from './medium.js';
3
+ import { exportSidecar } from '../../../use-sidecar/dist/es2015/exports.js';
4
+
5
+ var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
6
+
7
+ export { SideCar as default };
@@ -0,0 +1,56 @@
1
+ import * as React from 'react';
2
+ import { styleSingleton } from '../../../react-style-singleton/dist/es2015/component.js';
3
+ import { noScrollbarsClassName, zeroRightClassName, fullWidthClassName, removedBarSizeVariable } from './constants.js';
4
+ import { getGapWidth } from './utils.js';
5
+
6
+ var Style = styleSingleton();
7
+ var lockAttribute = 'data-scroll-locked';
8
+ // important tip - once we measure scrollBar width and remove them
9
+ // we could not repeat this operation
10
+ // thus we are using style-singleton - only the first "yet correct" style will be applied.
11
+ var getStyles = function (_a, allowRelative, gapMode, important) {
12
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
13
+ if (gapMode === void 0) { gapMode = 'margin'; }
14
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
15
+ allowRelative && "position: relative ".concat(important, ";"),
16
+ gapMode === 'margin' &&
17
+ "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
18
+ gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"),
19
+ ]
20
+ .filter(Boolean)
21
+ .join(''), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
22
+ };
23
+ var getCurrentUseCounter = function () {
24
+ var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);
25
+ return isFinite(counter) ? counter : 0;
26
+ };
27
+ var useLockAttribute = function () {
28
+ React.useEffect(function () {
29
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
30
+ return function () {
31
+ var newCounter = getCurrentUseCounter() - 1;
32
+ if (newCounter <= 0) {
33
+ document.body.removeAttribute(lockAttribute);
34
+ }
35
+ else {
36
+ document.body.setAttribute(lockAttribute, newCounter.toString());
37
+ }
38
+ };
39
+ }, []);
40
+ };
41
+ /**
42
+ * Removes page scrollbar and blocks page scroll when mounted
43
+ */
44
+ var RemoveScrollBar = function (_a) {
45
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;
46
+ useLockAttribute();
47
+ /*
48
+ gap will be measured on every component mount
49
+ however it will be used only by the "first" invocation
50
+ due to singleton nature of <Style
51
+ */
52
+ var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
53
+ return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
54
+ };
55
+
56
+ export { RemoveScrollBar, lockAttribute, useLockAttribute };
@@ -0,0 +1,10 @@
1
+ var zeroRightClassName = 'right-scroll-bar-position';
2
+ var fullWidthClassName = 'width-before-scroll-bar';
3
+ var noScrollbarsClassName = 'with-scroll-bars-hidden';
4
+ /**
5
+ * Name of a CSS variable containing the amount of "hidden" scrollbar
6
+ * ! might be undefined ! use will fallback!
7
+ */
8
+ var removedBarSizeVariable = '--removed-body-scroll-bar-size';
9
+
10
+ export { fullWidthClassName, noScrollbarsClassName, removedBarSizeVariable, zeroRightClassName };
@@ -0,0 +1,31 @@
1
+ var zeroGap = {
2
+ left: 0,
3
+ top: 0,
4
+ right: 0,
5
+ gap: 0,
6
+ };
7
+ var parse = function (x) { return parseInt(x || '', 10) || 0; };
8
+ var getOffset = function (gapMode) {
9
+ var cs = window.getComputedStyle(document.body);
10
+ var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
11
+ var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
12
+ var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
13
+ return [parse(left), parse(top), parse(right)];
14
+ };
15
+ var getGapWidth = function (gapMode) {
16
+ if (gapMode === void 0) { gapMode = 'margin'; }
17
+ if (typeof window === 'undefined') {
18
+ return zeroGap;
19
+ }
20
+ var offsets = getOffset(gapMode);
21
+ var documentWidth = document.documentElement.clientWidth;
22
+ var windowWidth = window.innerWidth;
23
+ return {
24
+ left: offsets[0],
25
+ top: offsets[1],
26
+ right: offsets[2],
27
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),
28
+ };
29
+ };
30
+
31
+ export { getGapWidth, zeroGap };