@caspeco/casper-ui-library 10.4.0 → 10.5.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 (781) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +11 -0
  2. package/dist/_virtual/builtin_esm-external-require-react.js +9 -0
  3. package/dist/components/accordion/accordion-context.js +5 -6
  4. package/dist/components/accordion/accordion-item.js +28 -40
  5. package/dist/components/accordion/accordion-panel.js +17 -14
  6. package/dist/components/accordion/accordion-recipe.js +85 -120
  7. package/dist/components/accordion/accordion.js +23 -20
  8. package/dist/components/alert/alert.js +80 -59
  9. package/dist/components/alert/helper.js +30 -42
  10. package/dist/components/alert/types.d.ts.map +1 -1
  11. package/dist/components/badge/badge-recipe.js +57 -49
  12. package/dist/components/badge/badge.js +66 -71
  13. package/dist/components/badge/helper.js +8 -9
  14. package/dist/components/box/box.js +14 -11
  15. package/dist/components/breadcrumbs/breadcrumb-item.js +21 -17
  16. package/dist/components/breadcrumbs/breadcrumb-link.js +21 -20
  17. package/dist/components/breadcrumbs/breadcrumbs.js +123 -90
  18. package/dist/components/button/button-recipe.js +280 -315
  19. package/dist/components/button/button.js +39 -40
  20. package/dist/components/checkbox/checkbox-icon.js +38 -46
  21. package/dist/components/checkbox/checkbox-recipe.js +176 -204
  22. package/dist/components/checkbox/checkbox.js +43 -36
  23. package/dist/components/checkbox/icons/check.js +5 -5
  24. package/dist/components/checkbox/icons/minus.js +5 -5
  25. package/dist/components/checkbox/icons/plus.js +5 -5
  26. package/dist/components/checkbox-group/checkbox-group.js +17 -16
  27. package/dist/components/collapsible/collapsible.js +117 -101
  28. package/dist/components/collapsible/translations.js +29 -29
  29. package/dist/components/combobox/combobox-button.js +173 -143
  30. package/dist/components/combobox/combobox-item.js +45 -23
  31. package/dist/components/combobox/combobox-menu.js +240 -190
  32. package/dist/components/combobox/combobox-recipe.js +69 -103
  33. package/dist/components/combobox/combobox.js +243 -273
  34. package/dist/components/combobox/translations.js +49 -50
  35. package/dist/components/date-picker/base-date-picker.js +238 -248
  36. package/dist/components/date-picker/date-cell-recipe.js +149 -179
  37. package/dist/components/date-picker/date-multi-picker.js +35 -29
  38. package/dist/components/date-picker/date-picker-date-cell.js +109 -114
  39. package/dist/components/date-picker/date-picker-header.js +152 -170
  40. package/dist/components/date-picker/date-picker-week-cell.js +41 -43
  41. package/dist/components/date-picker/date-picker.js +32 -29
  42. package/dist/components/date-picker/date-range-picker.js +29 -24
  43. package/dist/components/date-picker/date-week-picker.js +29 -22
  44. package/dist/components/date-picker/datepicker-week-recipe.js +75 -91
  45. package/dist/components/date-picker/helper.js +11 -16
  46. package/dist/components/divider/divider-recipe.js +9 -11
  47. package/dist/components/divider/divider.js +19 -18
  48. package/dist/components/drawer/drawer-recipe.js +21 -50
  49. package/dist/components/drawer/drawer.js +45 -41
  50. package/dist/components/drawer/inline-drawer.js +69 -66
  51. package/dist/components/drawer/use-drawer-key-down.js +20 -20
  52. package/dist/components/fieldset/fieldset-error-text.js +15 -15
  53. package/dist/components/fieldset/fieldset-helper-text.js +15 -15
  54. package/dist/components/fieldset/fieldset-legend.js +15 -15
  55. package/dist/components/fieldset/fieldset-recipe.js +14 -24
  56. package/dist/components/fieldset/fieldset.js +17 -17
  57. package/dist/components/flex/flex.js +15 -15
  58. package/dist/components/form-control/form-control-recipe.js +42 -46
  59. package/dist/components/form-control/form-control.js +19 -19
  60. package/dist/components/form-control/form-error-message.js +15 -15
  61. package/dist/components/form-control/form-helper-text.js +15 -15
  62. package/dist/components/form-control/form-label.js +24 -26
  63. package/dist/components/grid/grid-item.js +15 -15
  64. package/dist/components/grid/grid.js +15 -15
  65. package/dist/components/heading/heading.js +24 -23
  66. package/dist/components/highlight/highlight.js +22 -21
  67. package/dist/components/icon/create-icon.js +27 -26
  68. package/dist/components/icon/icons/absence-icon.js +5 -5
  69. package/dist/components/icon/icons/accessibility-icon.js +5 -5
  70. package/dist/components/icon/icons/add-absence-icon.js +5 -5
  71. package/dist/components/icon/icons/add-emoji-icon.js +5 -5
  72. package/dist/components/icon/icons/add-icon.js +5 -5
  73. package/dist/components/icon/icons/apple-icon.js +5 -5
  74. package/dist/components/icon/icons/apps-icon.js +5 -5
  75. package/dist/components/icon/icons/archive-icon.js +6 -6
  76. package/dist/components/icon/icons/area-icon.js +5 -5
  77. package/dist/components/icon/icons/at-icon.js +5 -5
  78. package/dist/components/icon/icons/attachment-icon.js +5 -5
  79. package/dist/components/icon/icons/baby-icon.js +5 -5
  80. package/dist/components/icon/icons/back-icon.js +5 -5
  81. package/dist/components/icon/icons/backspace-icon.js +5 -5
  82. package/dist/components/icon/icons/bank-icon.js +5 -5
  83. package/dist/components/icon/icons/bank-id-icon.js +5 -5
  84. package/dist/components/icon/icons/barcode-icon.js +5 -5
  85. package/dist/components/icon/icons/bell-icon.js +5 -5
  86. package/dist/components/icon/icons/bolt-icon.js +7 -7
  87. package/dist/components/icon/icons/calendar-icon.js +5 -5
  88. package/dist/components/icon/icons/camera-icon.js +5 -5
  89. package/dist/components/icon/icons/cancel-icon.js +5 -5
  90. package/dist/components/icon/icons/card-icon.js +5 -5
  91. package/dist/components/icon/icons/cart-icon.js +5 -5
  92. package/dist/components/icon/icons/caspeco-icon.js +7 -7
  93. package/dist/components/icon/icons/channels-icon.js +5 -5
  94. package/dist/components/icon/icons/chart-icon.js +5 -5
  95. package/dist/components/icon/icons/chart-line-icon.js +5 -5
  96. package/dist/components/icon/icons/chart-mixed-icon.js +5 -5
  97. package/dist/components/icon/icons/chart-pie-icon.js +5 -5
  98. package/dist/components/icon/icons/chart-scatter-icon.js +5 -5
  99. package/dist/components/icon/icons/check-icon.js +5 -5
  100. package/dist/components/icon/icons/checkbox-icon.js +5 -5
  101. package/dist/components/icon/icons/chevron-left-icon.js +5 -5
  102. package/dist/components/icon/icons/chevron-right-icon.js +5 -5
  103. package/dist/components/icon/icons/child-icon.js +5 -5
  104. package/dist/components/icon/icons/circle-info-icon.js +5 -5
  105. package/dist/components/icon/icons/circle-parking-icon.js +5 -5
  106. package/dist/components/icon/icons/circle-question-icon.js +5 -5
  107. package/dist/components/icon/icons/circle-select-icon.js +5 -5
  108. package/dist/components/icon/icons/circle-success-icon.js +5 -5
  109. package/dist/components/icon/icons/circle-user-icon.js +5 -5
  110. package/dist/components/icon/icons/clear-icon.js +5 -5
  111. package/dist/components/icon/icons/close-icon.js +5 -5
  112. package/dist/components/icon/icons/closed-icon.js +5 -5
  113. package/dist/components/icon/icons/collapse-icon.js +5 -5
  114. package/dist/components/icon/icons/color-icon.js +5 -5
  115. package/dist/components/icon/icons/columns-icon.js +5 -5
  116. package/dist/components/icon/icons/comment-add-icon.js +5 -5
  117. package/dist/components/icon/icons/comment-icon.js +5 -5
  118. package/dist/components/icon/icons/cookies-icon.js +5 -5
  119. package/dist/components/icon/icons/copy-icon.js +5 -5
  120. package/dist/components/icon/icons/date-icon.js +5 -5
  121. package/dist/components/icon/icons/decrease-icon.js +4 -4
  122. package/dist/components/icon/icons/delete-icon.js +5 -5
  123. package/dist/components/icon/icons/deliverect-icon.js +5 -5
  124. package/dist/components/icon/icons/delivery-icon.js +5 -5
  125. package/dist/components/icon/icons/description-icon.js +5 -5
  126. package/dist/components/icon/icons/discount-icon.js +5 -5
  127. package/dist/components/icon/icons/distribute-evenly-icon.js +5 -5
  128. package/dist/components/icon/icons/door-closed-icon.js +5 -5
  129. package/dist/components/icon/icons/door-open-icon.js +5 -5
  130. package/dist/components/icon/icons/down-icon.js +5 -5
  131. package/dist/components/icon/icons/eat-in-icon.js +5 -5
  132. package/dist/components/icon/icons/edit-icon.js +5 -5
  133. package/dist/components/icon/icons/email-icon.js +5 -5
  134. package/dist/components/icon/icons/error-icon.js +5 -5
  135. package/dist/components/icon/icons/expand-icon.js +5 -5
  136. package/dist/components/icon/icons/export-icon.js +5 -5
  137. package/dist/components/icon/icons/extract-icon.js +5 -5
  138. package/dist/components/icon/icons/facebook-icon.js +5 -5
  139. package/dist/components/icon/icons/failed-print-icon.js +5 -5
  140. package/dist/components/icon/icons/file-icon.js +5 -5
  141. package/dist/components/icon/icons/filter-icon.js +5 -5
  142. package/dist/components/icon/icons/folder-icon.js +5 -5
  143. package/dist/components/icon/icons/foodora-icon.js +5 -5
  144. package/dist/components/icon/icons/forward-icon.js +5 -5
  145. package/dist/components/icon/icons/glovo-icon.js +7 -7
  146. package/dist/components/icon/icons/goal-icon.js +5 -5
  147. package/dist/components/icon/icons/google-icon.js +5 -5
  148. package/dist/components/icon/icons/grip-more-icon.js +5 -5
  149. package/dist/components/icon/icons/hash-icon.js +5 -5
  150. package/dist/components/icon/icons/hexagon-error-icon.js +5 -5
  151. package/dist/components/icon/icons/hide-icon.js +5 -5
  152. package/dist/components/icon/icons/history-icon.js +5 -5
  153. package/dist/components/icon/icons/icon-picker-anchor-icon.js +5 -5
  154. package/dist/components/icon/icons/icon-picker-asterisk-icon.js +5 -5
  155. package/dist/components/icon/icons/icon-picker-beer-icon.js +5 -5
  156. package/dist/components/icon/icons/icon-picker-bicycle-icon.js +5 -5
  157. package/dist/components/icon/icons/icon-picker-binoculars-icon.js +5 -5
  158. package/dist/components/icon/icons/icon-picker-bomb-icon.js +5 -5
  159. package/dist/components/icon/icons/icon-picker-car-icon.js +5 -5
  160. package/dist/components/icon/icons/icon-picker-cocktail-icon.js +5 -5
  161. package/dist/components/icon/icons/icon-picker-gem-icon.js +5 -5
  162. package/dist/components/icon/icons/icon-picker-heart-full-icon.js +5 -5
  163. package/dist/components/icon/icons/icon-picker-heart-icon.js +5 -5
  164. package/dist/components/icon/icons/icon-picker-magnet-icon.js +5 -5
  165. package/dist/components/icon/icons/icon-picker-money-icon.js +5 -5
  166. package/dist/components/icon/icons/icon-picker-moon-icon.js +5 -5
  167. package/dist/components/icon/icons/icon-picker-music-icon.js +5 -5
  168. package/dist/components/icon/icons/icon-picker-star-full-icon.js +5 -5
  169. package/dist/components/icon/icons/icon-picker-star-half-icon.js +5 -5
  170. package/dist/components/icon/icons/icon-picker-star-icon.js +5 -5
  171. package/dist/components/icon/icons/icon-picker-tint-icon.js +5 -5
  172. package/dist/components/icon/icons/icon-picker-tree-icon.js +5 -5
  173. package/dist/components/icon/icons/icon-picker-utensils-icon.js +5 -5
  174. package/dist/components/icon/icons/icon-picker-wheelchair-icon.js +5 -5
  175. package/dist/components/icon/icons/image-icon.js +5 -5
  176. package/dist/components/icon/icons/import-icon.js +5 -5
  177. package/dist/components/icon/icons/inbox-icon.js +5 -5
  178. package/dist/components/icon/icons/increase-icon.js +5 -5
  179. package/dist/components/icon/icons/indeterminate-icon.js +4 -4
  180. package/dist/components/icon/icons/info-icon.js +5 -5
  181. package/dist/components/icon/icons/inheritance-icon.js +5 -5
  182. package/dist/components/icon/icons/just-eat-icon.js +5 -5
  183. package/dist/components/icon/icons/karma-icon.js +5 -5
  184. package/dist/components/icon/icons/key-command-icon.js +5 -5
  185. package/dist/components/icon/icons/key-enter-icon.js +5 -5
  186. package/dist/components/icon/icons/key-icon.js +5 -5
  187. package/dist/components/icon/icons/key-option-icon.js +5 -5
  188. package/dist/components/icon/icons/language-icon.js +5 -5
  189. package/dist/components/icon/icons/link-broken-icon.js +5 -5
  190. package/dist/components/icon/icons/link-external-icon.js +5 -5
  191. package/dist/components/icon/icons/link-icon.js +5 -5
  192. package/dist/components/icon/icons/list-ol-icon.js +5 -5
  193. package/dist/components/icon/icons/list-ul-icon.js +5 -5
  194. package/dist/components/icon/icons/loading-icon.js +5 -5
  195. package/dist/components/icon/icons/location-icon.js +5 -5
  196. package/dist/components/icon/icons/lock-icon.js +5 -5
  197. package/dist/components/icon/icons/log-in-icon.js +5 -5
  198. package/dist/components/icon/icons/log-out-icon.js +5 -5
  199. package/dist/components/icon/icons/map-icon.js +5 -5
  200. package/dist/components/icon/icons/maximize-icon.js +5 -5
  201. package/dist/components/icon/icons/members-icon.js +5 -5
  202. package/dist/components/icon/icons/menu-hide-icon.js +5 -5
  203. package/dist/components/icon/icons/menu-icon.js +5 -5
  204. package/dist/components/icon/icons/menu-show-icon.js +5 -5
  205. package/dist/components/icon/icons/message-add-icon.js +5 -5
  206. package/dist/components/icon/icons/message-icon.js +5 -5
  207. package/dist/components/icon/icons/message-lines-icon.js +5 -5
  208. package/dist/components/icon/icons/minimize-icon.js +5 -5
  209. package/dist/components/icon/icons/minimize-window-icon.js +5 -5
  210. package/dist/components/icon/icons/mobile-rotate-icon.js +5 -5
  211. package/dist/components/icon/icons/module-accounting-icon.js +5 -5
  212. package/dist/components/icon/icons/module-ai-forecast-icon.js +5 -5
  213. package/dist/components/icon/icons/module-app-icon.js +5 -5
  214. package/dist/components/icon/icons/module-articles-icon.js +5 -5
  215. package/dist/components/icon/icons/module-benchmark-icon.js +5 -5
  216. package/dist/components/icon/icons/module-booking-icon.js +5 -5
  217. package/dist/components/icon/icons/module-cai-icon.js +5 -5
  218. package/dist/components/icon/icons/module-campaigns-icon.js +5 -5
  219. package/dist/components/icon/icons/module-cashier-icon.js +5 -5
  220. package/dist/components/icon/icons/module-communication-icon.js +5 -5
  221. package/dist/components/icon/icons/module-copilot-icon.js +5 -5
  222. package/dist/components/icon/icons/module-dashboard-icon.js +5 -5
  223. package/dist/components/icon/icons/module-document-icon.js +5 -5
  224. package/dist/components/icon/icons/module-employees-icon.js +5 -5
  225. package/dist/components/icon/icons/module-feed-icon.js +5 -5
  226. package/dist/components/icon/icons/module-history-icon.js +5 -5
  227. package/dist/components/icon/icons/module-home-icon.js +5 -5
  228. package/dist/components/icon/icons/module-insights-icon.js +5 -5
  229. package/dist/components/icon/icons/module-kds-icon.js +5 -5
  230. package/dist/components/icon/icons/module-members-icon.js +5 -5
  231. package/dist/components/icon/icons/module-menus-icon.js +5 -5
  232. package/dist/components/icon/icons/module-my-city-icon.js +5 -5
  233. package/dist/components/icon/icons/module-notification-center-icon.js +5 -5
  234. package/dist/components/icon/icons/module-online-order-icon.js +5 -5
  235. package/dist/components/icon/icons/module-organisation-icon.js +5 -5
  236. package/dist/components/icon/icons/module-pos-icon.js +5 -5
  237. package/dist/components/icon/icons/module-pulse-icon.js +5 -5
  238. package/dist/components/icon/icons/module-result-icon.js +5 -5
  239. package/dist/components/icon/icons/module-salary-icon.js +5 -5
  240. package/dist/components/icon/icons/module-schedule-icon.js +5 -5
  241. package/dist/components/icon/icons/module-settings-alt-icon.js +5 -5
  242. package/dist/components/icon/icons/module-settings-icon.js +5 -5
  243. package/dist/components/icon/icons/module-support-icon.js +5 -5
  244. package/dist/components/icon/icons/module-survey-icon.js +5 -5
  245. package/dist/components/icon/icons/module-table-map-icon.js +6 -6
  246. package/dist/components/icon/icons/module-tablet-icon.js +5 -5
  247. package/dist/components/icon/icons/module-time-icon.js +5 -5
  248. package/dist/components/icon/icons/module-timeline-icon.js +5 -5
  249. package/dist/components/icon/icons/module-tip-icon.js +5 -5
  250. package/dist/components/icon/icons/module-to-do-icon.js +5 -5
  251. package/dist/components/icon/icons/module-tools-icon.js +5 -5
  252. package/dist/components/icon/icons/module-top-list-icon.js +5 -5
  253. package/dist/components/icon/icons/module-web-charts-icon.js +5 -5
  254. package/dist/components/icon/icons/module-web-icon.js +5 -5
  255. package/dist/components/icon/icons/more-horizontal-icon.js +5 -5
  256. package/dist/components/icon/icons/more-vertical-icon.js +5 -5
  257. package/dist/components/icon/icons/nfc-icon.js +5 -5
  258. package/dist/components/icon/icons/no-cart-icon.js +5 -5
  259. package/dist/components/icon/icons/note-icon.js +5 -5
  260. package/dist/components/icon/icons/number-icon.js +6 -6
  261. package/dist/components/icon/icons/open-modal-icon.js +5 -5
  262. package/dist/components/icon/icons/parking-icon.js +5 -5
  263. package/dist/components/icon/icons/party-horn-icon.js +5 -5
  264. package/dist/components/icon/icons/paste-icon.js +5 -5
  265. package/dist/components/icon/icons/pause-icon.js +5 -5
  266. package/dist/components/icon/icons/payment-card-icon.js +5 -5
  267. package/dist/components/icon/icons/payment-cash-icon.js +5 -5
  268. package/dist/components/icon/icons/payment-generic-icon.js +5 -5
  269. package/dist/components/icon/icons/payment-giftcard-icon.js +5 -5
  270. package/dist/components/icon/icons/payment-hotel-icon.js +5 -5
  271. package/dist/components/icon/icons/payment-invoice-icon.js +5 -5
  272. package/dist/components/icon/icons/percentage-icon.js +5 -5
  273. package/dist/components/icon/icons/phone-icon.js +5 -5
  274. package/dist/components/icon/icons/pin-icon.js +5 -5
  275. package/dist/components/icon/icons/pin-map-icon.js +5 -5
  276. package/dist/components/icon/icons/play-icon.js +5 -5
  277. package/dist/components/icon/icons/preview-icon.js +5 -5
  278. package/dist/components/icon/icons/print-icon.js +5 -5
  279. package/dist/components/icon/icons/privacy-icon.js +5 -5
  280. package/dist/components/icon/icons/product-admin-icon.js +5 -5
  281. package/dist/components/icon/icons/product-analytics-icon.js +5 -5
  282. package/dist/components/icon/icons/product-booking-icon.js +5 -5
  283. package/dist/components/icon/icons/product-checkout-icon.js +5 -5
  284. package/dist/components/icon/icons/product-my-pages-icon.js +5 -5
  285. package/dist/components/icon/icons/product-staff-icon.js +5 -5
  286. package/dist/components/icon/icons/puck-icon.js +5 -5
  287. package/dist/components/icon/icons/qr-code-icon.js +5 -5
  288. package/dist/components/icon/icons/question-icon.js +5 -5
  289. package/dist/components/icon/icons/radio-icon.js +5 -5
  290. package/dist/components/icon/icons/receipt-icon.js +5 -5
  291. package/dist/components/icon/icons/redo-icon.js +5 -5
  292. package/dist/components/icon/icons/refund-icon.js +5 -5
  293. package/dist/components/icon/icons/remove-icon.js +5 -5
  294. package/dist/components/icon/icons/replace-icon.js +5 -5
  295. package/dist/components/icon/icons/schedule-icon.js +5 -5
  296. package/dist/components/icon/icons/search-icon.js +5 -5
  297. package/dist/components/icon/icons/select-icon.js +4 -4
  298. package/dist/components/icon/icons/send-icon.js +5 -5
  299. package/dist/components/icon/icons/share-icon.js +5 -5
  300. package/dist/components/icon/icons/show-icon.js +5 -5
  301. package/dist/components/icon/icons/shuffle-icon.js +5 -5
  302. package/dist/components/icon/icons/sidebar-hide-icon.js +4 -4
  303. package/dist/components/icon/icons/sidebar-left-icon.js +4 -4
  304. package/dist/components/icon/icons/sidebar-right-icon.js +5 -5
  305. package/dist/components/icon/icons/sidebar-show-icon.js +5 -5
  306. package/dist/components/icon/icons/sliders-icon.js +5 -5
  307. package/dist/components/icon/icons/slightly-sad-icon.js +5 -5
  308. package/dist/components/icon/icons/smile-icon.js +5 -5
  309. package/dist/components/icon/icons/sort-asc-icon.js +5 -5
  310. package/dist/components/icon/icons/sort-desc-icon.js +5 -5
  311. package/dist/components/icon/icons/split-icon.js +5 -5
  312. package/dist/components/icon/icons/status-icon.js +5 -5
  313. package/dist/components/icon/icons/stop-icon.js +5 -5
  314. package/dist/components/icon/icons/submenu-icon.js +5 -5
  315. package/dist/components/icon/icons/success-icon.js +5 -5
  316. package/dist/components/icon/icons/swap-icon.js +5 -5
  317. package/dist/components/icon/icons/swatch-icon.js +5 -5
  318. package/dist/components/icon/icons/sweat-icon.js +5 -5
  319. package/dist/components/icon/icons/table-icon.js +5 -5
  320. package/dist/components/icon/icons/table-map-icon.js +5 -5
  321. package/dist/components/icon/icons/take-away-dot-com-icon.js +5 -5
  322. package/dist/components/icon/icons/take-away-icon.js +5 -5
  323. package/dist/components/icon/icons/talk-icon.js +5 -5
  324. package/dist/components/icon/icons/thumbtack-icon.js +5 -5
  325. package/dist/components/icon/icons/time-icon.js +5 -5
  326. package/dist/components/icon/icons/timeline-icon.js +5 -5
  327. package/dist/components/icon/icons/tip-icon.js +5 -5
  328. package/dist/components/icon/icons/title-icon.js +5 -5
  329. package/dist/components/icon/icons/translate-icon.js +5 -5
  330. package/dist/components/icon/icons/tree-view-collapse-icon.js +4 -4
  331. package/dist/components/icon/icons/tree-view-expand-icon.js +4 -4
  332. package/dist/components/icon/icons/tree-view-last-icon.js +4 -4
  333. package/dist/components/icon/icons/trend-down-icon.js +5 -5
  334. package/dist/components/icon/icons/trend-up-icon.js +5 -5
  335. package/dist/components/icon/icons/triangle-warning-icon.js +5 -5
  336. package/dist/components/icon/icons/trivec-icon.js +6 -6
  337. package/dist/components/icon/icons/uber-eats-icon.js +5 -5
  338. package/dist/components/icon/icons/undo-icon.js +5 -5
  339. package/dist/components/icon/icons/unlock-icon.js +5 -5
  340. package/dist/components/icon/icons/unwrap-content-icon.js +5 -5
  341. package/dist/components/icon/icons/up-icon.js +5 -5
  342. package/dist/components/icon/icons/user-group-icon.js +5 -5
  343. package/dist/components/icon/icons/user-icon.js +5 -5
  344. package/dist/components/icon/icons/user-permissions-icon.js +5 -5
  345. package/dist/components/icon/icons/user-wait-icon.js +5 -5
  346. package/dist/components/icon/icons/users-icon.js +5 -5
  347. package/dist/components/icon/icons/version-control-icon.js +5 -5
  348. package/dist/components/icon/icons/volume-high-icon.js +5 -5
  349. package/dist/components/icon/icons/volume-icon.js +5 -5
  350. package/dist/components/icon/icons/volume-low-icon.js +5 -5
  351. package/dist/components/icon/icons/volume-off-icon.js +5 -5
  352. package/dist/components/icon/icons/warning-icon.js +5 -5
  353. package/dist/components/icon/icons/waste-icon.js +5 -5
  354. package/dist/components/icon/icons/wifi-icon.js +5 -5
  355. package/dist/components/icon/icons/wifi-off-icon.js +5 -5
  356. package/dist/components/icon/icons/wolt-icon.js +5 -5
  357. package/dist/components/icon/icons/wrap-content-icon.js +5 -5
  358. package/dist/components/icon-button/icon-button.js +37 -39
  359. package/dist/components/image/image.js +12 -14
  360. package/dist/components/image-upload/image-cropper.helper.js +74 -82
  361. package/dist/components/image-upload/image-cropper.js +156 -183
  362. package/dist/components/image-upload/image-upload-dropzone.js +134 -112
  363. package/dist/components/image-upload/image-upload-helper.js +15 -19
  364. package/dist/components/image-upload/image-upload-icons.js +52 -20
  365. package/dist/components/image-upload/image-upload-modal.js +131 -106
  366. package/dist/components/image-upload/image-upload.js +96 -86
  367. package/dist/components/image-upload/translations.js +65 -65
  368. package/dist/components/image-upload/types.js +6 -4
  369. package/dist/components/input/helper.js +18 -29
  370. package/dist/components/input/input-addon-recipe.js +37 -43
  371. package/dist/components/input/input-recipe.js +124 -133
  372. package/dist/components/input/input.js +78 -83
  373. package/dist/components/link/link-recipe.js +18 -22
  374. package/dist/components/link/link.js +14 -14
  375. package/dist/components/list/list-item.js +15 -15
  376. package/dist/components/list/list.js +19 -20
  377. package/dist/components/menu/helper.js +12 -16
  378. package/dist/components/menu/menu-box-button.js +22 -18
  379. package/dist/components/menu/menu-button.js +18 -16
  380. package/dist/components/menu/menu-divider.js +31 -28
  381. package/dist/components/menu/menu-group.js +138 -142
  382. package/dist/components/menu/menu-icon-button.js +13 -11
  383. package/dist/components/menu/menu-item.js +44 -45
  384. package/dist/components/menu/menu-list.js +14 -15
  385. package/dist/components/menu/menu-recipe.js +67 -81
  386. package/dist/components/menu/menu.js +34 -41
  387. package/dist/components/message/message.js +52 -38
  388. package/dist/components/modal/modal-body-context.js +6 -7
  389. package/dist/components/modal/modal-body.js +17 -17
  390. package/dist/components/modal/modal-close-button.js +23 -18
  391. package/dist/components/modal/modal-footer.js +29 -32
  392. package/dist/components/modal/modal-header.js +17 -17
  393. package/dist/components/modal/modal-recipe.js +110 -141
  394. package/dist/components/modal/modal.js +54 -58
  395. package/dist/components/navigation-list/navigation-list-item.js +76 -88
  396. package/dist/components/navigation-list/navigation-list.js +23 -17
  397. package/dist/components/paginator/paginator-recipe.js +34 -40
  398. package/dist/components/paginator/paginator.js +65 -70
  399. package/dist/components/paginator/translations.js +35 -35
  400. package/dist/components/phone-input/country-data.js +31 -36
  401. package/dist/components/phone-input/country-list.js +45 -25
  402. package/dist/components/phone-input/country-selector.js +167 -115
  403. package/dist/components/phone-input/phone-input-helpers.js +91 -119
  404. package/dist/components/phone-input/phone-input.js +47 -42
  405. package/dist/components/phone-input/translations.js +53 -53
  406. package/dist/components/phone-input/use-phone-input.js +110 -137
  407. package/dist/components/quantity-button/minus-button.js +18 -16
  408. package/dist/components/quantity-button/plus-button.js +18 -16
  409. package/dist/components/quantity-button/quantity-button.js +72 -40
  410. package/dist/components/radio/check-icon.js +5 -5
  411. package/dist/components/radio/hover-styles.js +21 -36
  412. package/dist/components/radio/radio-group-context.js +5 -6
  413. package/dist/components/radio/radio-group-recipe.js +124 -142
  414. package/dist/components/radio/radio-group.js +30 -28
  415. package/dist/components/radio/radio.js +72 -55
  416. package/dist/components/radio-card/hover-styles.js +21 -36
  417. package/dist/components/radio-card/radio-card-group.js +24 -25
  418. package/dist/components/radio-card/radio-card.js +87 -67
  419. package/dist/components/rich-text-editor/boolean-control.js +51 -54
  420. package/dist/components/rich-text-editor/extensions.js +39 -34
  421. package/dist/components/rich-text-editor/index.js +26 -22
  422. package/dist/components/rich-text-editor/rich-text-editor-context.js +9 -11
  423. package/dist/components/rich-text-editor/rich-text-editor-control.js +290 -284
  424. package/dist/components/rich-text-editor/rich-text-editor-recipe.js +71 -83
  425. package/dist/components/rich-text-editor/rich-text-editor.js +72 -69
  426. package/dist/components/rich-text-editor/rich-text-renderer.js +32 -32
  427. package/dist/components/rich-text-editor/translations.js +119 -119
  428. package/dist/components/rich-text-editor/use-rich-text-editor.js +22 -29
  429. package/dist/components/segmented-control/segmented-control-item.js +24 -25
  430. package/dist/components/segmented-control/segmented-control.js +49 -40
  431. package/dist/components/select/select-recipe.js +91 -106
  432. package/dist/components/select/select.js +27 -29
  433. package/dist/components/skeleton/skeleton-text.js +18 -19
  434. package/dist/components/skeleton/skeleton.js +19 -20
  435. package/dist/components/spinner/spinner.js +44 -28
  436. package/dist/components/stack/stack.js +18 -18
  437. package/dist/components/stepper/check-icon.js +5 -5
  438. package/dist/components/stepper/step-context.js +5 -5
  439. package/dist/components/stepper/step.js +111 -106
  440. package/dist/components/stepper/stepper.js +42 -43
  441. package/dist/components/stepper/times-icon.js +5 -5
  442. package/dist/components/switch/hover-styles.js +30 -44
  443. package/dist/components/switch/switch-recipe.js +76 -84
  444. package/dist/components/switch/switch.d.ts +3 -3
  445. package/dist/components/switch/switch.d.ts.map +1 -1
  446. package/dist/components/switch/switch.js +30 -31
  447. package/dist/components/switch/types.d.ts +4 -2
  448. package/dist/components/switch/types.d.ts.map +1 -1
  449. package/dist/components/table/helper.d.ts +6 -0
  450. package/dist/components/table/helper.d.ts.map +1 -1
  451. package/dist/components/table/helper.js +29 -9
  452. package/dist/components/table/index.d.ts +1 -1
  453. package/dist/components/table/index.d.ts.map +1 -1
  454. package/dist/components/table/table-cell.d.ts.map +1 -1
  455. package/dist/components/table/table-cell.js +136 -122
  456. package/dist/components/table/table-column-resize-handle.d.ts +12 -0
  457. package/dist/components/table/table-column-resize-handle.d.ts.map +1 -0
  458. package/dist/components/table/table-column-resize-handle.js +69 -0
  459. package/dist/components/table/table-content.d.ts.map +1 -1
  460. package/dist/components/table/table-content.js +174 -98
  461. package/dist/components/table/table-context-provider.d.ts +7 -2
  462. package/dist/components/table/table-context-provider.d.ts.map +1 -1
  463. package/dist/components/table/table-context-provider.js +203 -151
  464. package/dist/components/table/table-context.d.ts +24 -0
  465. package/dist/components/table/table-context.d.ts.map +1 -1
  466. package/dist/components/table/table-context.js +18 -11
  467. package/dist/components/table/table-filter.js +170 -118
  468. package/dist/components/table/table-header-dropdown.js +131 -89
  469. package/dist/components/table/table-header-row.d.ts.map +1 -1
  470. package/dist/components/table/table-header-row.js +202 -140
  471. package/dist/components/table/table-recipe.d.ts.map +1 -1
  472. package/dist/components/table/table-recipe.js +75 -96
  473. package/dist/components/table/table-row-expand-toggle-button.js +28 -35
  474. package/dist/components/table/table-row.d.ts.map +1 -1
  475. package/dist/components/table/table-row.js +51 -41
  476. package/dist/components/table/table-toolbar-actions.js +19 -19
  477. package/dist/components/table/table-toolbar-add-button.js +18 -13
  478. package/dist/components/table/table-toolbar-search.js +17 -12
  479. package/dist/components/table/table-toolbar-settings.js +180 -133
  480. package/dist/components/table/table-toolbar.js +72 -51
  481. package/dist/components/table/table.composition.d.ts +1 -0
  482. package/dist/components/table/table.composition.d.ts.map +1 -1
  483. package/dist/components/table/table.constants.d.ts +4 -0
  484. package/dist/components/table/table.constants.d.ts.map +1 -1
  485. package/dist/components/table/table.constants.js +9 -4
  486. package/dist/components/table/table.d.ts +1 -1
  487. package/dist/components/table/table.d.ts.map +1 -1
  488. package/dist/components/table/table.js +41 -37
  489. package/dist/components/table/translations.d.ts +7 -0
  490. package/dist/components/table/translations.d.ts.map +1 -1
  491. package/dist/components/table/translations.js +199 -194
  492. package/dist/components/table/types.d.ts +33 -2
  493. package/dist/components/table/types.d.ts.map +1 -1
  494. package/dist/components/tabs/tab-list.js +16 -17
  495. package/dist/components/tabs/tab-panel.js +14 -14
  496. package/dist/components/tabs/tab-panels.js +15 -15
  497. package/dist/components/tabs/tab-with-image.js +60 -53
  498. package/dist/components/tabs/tab.js +26 -22
  499. package/dist/components/tabs/tabs-recipe.js +96 -116
  500. package/dist/components/tabs/tabs.js +25 -24
  501. package/dist/components/tag/tag-recipe.js +225 -252
  502. package/dist/components/tag/tag.js +121 -62
  503. package/dist/components/text/text-recipe.js +3 -8
  504. package/dist/components/text/text.js +26 -27
  505. package/dist/components/textarea/textarea-recipe.js +90 -96
  506. package/dist/components/textarea/textarea.js +19 -19
  507. package/dist/components/toaster/toast-store.d.ts +2 -2
  508. package/dist/components/toaster/toast-store.d.ts.map +1 -1
  509. package/dist/components/toaster/toast-store.js +25 -32
  510. package/dist/components/toaster/toaster.js +39 -34
  511. package/dist/components/toggle-button/toggle-button.js +23 -25
  512. package/dist/components/toggle-button/use-button-children.js +36 -35
  513. package/dist/components/tooltip/tooltip.js +43 -47
  514. package/dist/hooks/use-color-mode.js +17 -22
  515. package/dist/hooks/use-disclosure.js +10 -13
  516. package/dist/hooks/use-measured-width.js +21 -21
  517. package/dist/hooks/use-remove-attributes.js +25 -24
  518. package/dist/index.js +396 -802
  519. package/dist/node_modules/@dnd-kit/abstract/index.js +658 -1185
  520. package/dist/node_modules/@dnd-kit/collision/dist/index.js +51 -90
  521. package/dist/node_modules/@dnd-kit/dom/index.js +1256 -1518
  522. package/dist/node_modules/@dnd-kit/dom/sortable.js +529 -654
  523. package/dist/node_modules/@dnd-kit/dom/utilities.js +772 -940
  524. package/dist/node_modules/@dnd-kit/geometry/dist/index.js +228 -196
  525. package/dist/node_modules/@dnd-kit/react/hooks.js +51 -63
  526. package/dist/node_modules/@dnd-kit/react/index.js +175 -235
  527. package/dist/node_modules/@dnd-kit/react/sortable.js +67 -142
  528. package/dist/node_modules/@dnd-kit/react/utilities.js +7 -9
  529. package/dist/node_modules/@dnd-kit/state/dist/index.js +157 -172
  530. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +154 -243
  531. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +294 -369
  532. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +95 -133
  533. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +96 -122
  534. package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +249 -264
  535. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +34 -88
  536. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +74 -88
  537. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1463 -1822
  538. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +633 -768
  539. package/dist/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +30 -32
  540. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +35 -48
  541. package/dist/node_modules/@tiptap/core/dist/index.js +3433 -3946
  542. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +19 -19
  543. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +73 -1498
  544. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +71 -84
  545. package/dist/node_modules/@tiptap/extension-code/dist/index.js +65 -70
  546. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +155 -216
  547. package/dist/node_modules/@tiptap/extension-document/dist/index.js +9 -11
  548. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +48 -60
  549. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +65 -66
  550. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +47 -55
  551. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +68 -82
  552. package/dist/node_modules/@tiptap/extension-link/dist/index.js +365 -334
  553. package/dist/node_modules/@tiptap/extension-list/dist/index.js +936 -1105
  554. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +43 -48
  555. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +53 -65
  556. package/dist/node_modules/@tiptap/extension-text/dist/index.js +12 -12
  557. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +60 -64
  558. package/dist/node_modules/@tiptap/extensions/dist/index.js +439 -462
  559. package/dist/node_modules/@tiptap/react/dist/index.js +314 -0
  560. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +23 -24
  561. package/dist/node_modules/country-flag-icons/modules/countries.json.js +4 -4
  562. package/dist/node_modules/country-flag-icons/modules/hasFlag.js +6 -6
  563. package/dist/node_modules/country-flag-icons/modules/react/3x2/index.js +5469 -6298
  564. package/dist/node_modules/country-flag-icons/react/3x2/index.js +273 -269
  565. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +5 -6
  566. package/dist/node_modules/date-fns/_lib/defaultOptions.js +6 -6
  567. package/dist/node_modules/date-fns/_lib/format/formatters.js +385 -544
  568. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +42 -57
  569. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +37 -48
  570. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +7 -17
  571. package/dist/node_modules/date-fns/_lib/normalizeDates.js +6 -9
  572. package/dist/node_modules/date-fns/_lib/protectedTokens.js +19 -16
  573. package/dist/node_modules/date-fns/addDays.js +8 -8
  574. package/dist/node_modules/date-fns/addMonths.js +11 -18
  575. package/dist/node_modules/date-fns/addWeeks.js +6 -6
  576. package/dist/node_modules/date-fns/constants.js +10 -6
  577. package/dist/node_modules/date-fns/constructFrom.js +6 -6
  578. package/dist/node_modules/date-fns/constructNow.js +6 -6
  579. package/dist/node_modules/date-fns/differenceInCalendarDays.js +10 -14
  580. package/dist/node_modules/date-fns/endOfDay.js +7 -7
  581. package/dist/node_modules/date-fns/endOfMonth.js +7 -7
  582. package/dist/node_modules/date-fns/format.js +57 -55
  583. package/dist/node_modules/date-fns/getDayOfYear.js +9 -9
  584. package/dist/node_modules/date-fns/getISOWeek.js +10 -10
  585. package/dist/node_modules/date-fns/getISOWeekYear.js +13 -13
  586. package/dist/node_modules/date-fns/getWeek.js +10 -10
  587. package/dist/node_modules/date-fns/getWeekYear.js +14 -14
  588. package/dist/node_modules/date-fns/isBefore.js +6 -6
  589. package/dist/node_modules/date-fns/isDate.js +5 -5
  590. package/dist/node_modules/date-fns/isPast.js +6 -6
  591. package/dist/node_modules/date-fns/isSameDay.js +8 -12
  592. package/dist/node_modules/date-fns/isSameMonth.js +7 -11
  593. package/dist/node_modules/date-fns/isSameWeek.js +8 -12
  594. package/dist/node_modules/date-fns/isSameYear.js +7 -11
  595. package/dist/node_modules/date-fns/isToday.js +7 -10
  596. package/dist/node_modules/date-fns/isValid.js +7 -7
  597. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +8 -8
  598. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +16 -17
  599. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +19 -28
  600. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +17 -14
  601. package/dist/node_modules/date-fns/locale/da/_lib/formatDistance.js +68 -69
  602. package/dist/node_modules/date-fns/locale/da/_lib/formatLong.js +31 -32
  603. package/dist/node_modules/date-fns/locale/da/_lib/formatRelative.js +11 -11
  604. package/dist/node_modules/date-fns/locale/da/_lib/localize.js +193 -142
  605. package/dist/node_modules/date-fns/locale/da/_lib/match.js +123 -109
  606. package/dist/node_modules/date-fns/locale/da.js +17 -17
  607. package/dist/node_modules/date-fns/locale/en-GB/_lib/formatLong.js +31 -32
  608. package/dist/node_modules/date-fns/locale/en-GB.js +18 -18
  609. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +68 -69
  610. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +31 -32
  611. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -11
  612. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +200 -153
  613. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +123 -109
  614. package/dist/node_modules/date-fns/locale/en-US.js +18 -18
  615. package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +68 -69
  616. package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +31 -32
  617. package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +18 -18
  618. package/dist/node_modules/date-fns/locale/es/_lib/localize.js +192 -141
  619. package/dist/node_modules/date-fns/locale/es/_lib/match.js +127 -114
  620. package/dist/node_modules/date-fns/locale/es.js +18 -18
  621. package/dist/node_modules/date-fns/locale/et/_lib/formatDistance.js +161 -162
  622. package/dist/node_modules/date-fns/locale/et/_lib/formatLong.js +31 -32
  623. package/dist/node_modules/date-fns/locale/et/_lib/formatRelative.js +11 -11
  624. package/dist/node_modules/date-fns/locale/et/_lib/localize.js +196 -152
  625. package/dist/node_modules/date-fns/locale/et/_lib/match.js +109 -107
  626. package/dist/node_modules/date-fns/locale/et.js +19 -19
  627. package/dist/node_modules/date-fns/locale/fi/_lib/formatDistance.js +101 -101
  628. package/dist/node_modules/date-fns/locale/fi/_lib/formatLong.js +31 -32
  629. package/dist/node_modules/date-fns/locale/fi/_lib/formatRelative.js +11 -11
  630. package/dist/node_modules/date-fns/locale/fi/_lib/localize.js +192 -140
  631. package/dist/node_modules/date-fns/locale/fi/_lib/match.js +122 -108
  632. package/dist/node_modules/date-fns/locale/fi.js +18 -18
  633. package/dist/node_modules/date-fns/locale/fr/_lib/formatDistance.js +68 -69
  634. package/dist/node_modules/date-fns/locale/fr/_lib/formatLong.js +31 -32
  635. package/dist/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -11
  636. package/dist/node_modules/date-fns/locale/fr/_lib/localize.js +176 -120
  637. package/dist/node_modules/date-fns/locale/fr/_lib/match.js +122 -108
  638. package/dist/node_modules/date-fns/locale/fr.js +18 -18
  639. package/dist/node_modules/date-fns/locale/lt/_lib/formatDistance.js +93 -109
  640. package/dist/node_modules/date-fns/locale/lt/_lib/formatLong.js +31 -32
  641. package/dist/node_modules/date-fns/locale/lt/_lib/formatRelative.js +11 -11
  642. package/dist/node_modules/date-fns/locale/lt/_lib/localize.js +298 -195
  643. package/dist/node_modules/date-fns/locale/lt/_lib/match.js +154 -121
  644. package/dist/node_modules/date-fns/locale/lt.js +19 -19
  645. package/dist/node_modules/date-fns/locale/lv/_lib/formatDistance.js +226 -120
  646. package/dist/node_modules/date-fns/locale/lv/_lib/formatLong.js +31 -32
  647. package/dist/node_modules/date-fns/locale/lv/_lib/formatRelative.js +22 -22
  648. package/dist/node_modules/date-fns/locale/lv/_lib/localize.js +298 -221
  649. package/dist/node_modules/date-fns/locale/lv/_lib/match.js +138 -112
  650. package/dist/node_modules/date-fns/locale/lv.js +18 -18
  651. package/dist/node_modules/date-fns/locale/nb/_lib/formatDistance.js +68 -69
  652. package/dist/node_modules/date-fns/locale/nb/_lib/formatLong.js +31 -32
  653. package/dist/node_modules/date-fns/locale/nb/_lib/formatRelative.js +11 -11
  654. package/dist/node_modules/date-fns/locale/nb/_lib/localize.js +159 -108
  655. package/dist/node_modules/date-fns/locale/nb/_lib/match.js +112 -108
  656. package/dist/node_modules/date-fns/locale/nb.js +18 -18
  657. package/dist/node_modules/date-fns/locale/nl/_lib/formatDistance.js +68 -69
  658. package/dist/node_modules/date-fns/locale/nl/_lib/formatLong.js +31 -32
  659. package/dist/node_modules/date-fns/locale/nl/_lib/formatRelative.js +11 -11
  660. package/dist/node_modules/date-fns/locale/nl/_lib/localize.js +160 -109
  661. package/dist/node_modules/date-fns/locale/nl/_lib/match.js +120 -108
  662. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatDistance.js +68 -69
  663. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatLong.js +31 -32
  664. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatRelative.js +11 -11
  665. package/dist/node_modules/date-fns/locale/nl-BE/_lib/localize.js +160 -109
  666. package/dist/node_modules/date-fns/locale/nl-BE/_lib/match.js +120 -108
  667. package/dist/node_modules/date-fns/locale/nl-BE.js +18 -18
  668. package/dist/node_modules/date-fns/locale/nl.js +18 -18
  669. package/dist/node_modules/date-fns/locale/sv/_lib/formatDistance.js +82 -86
  670. package/dist/node_modules/date-fns/locale/sv/_lib/formatLong.js +31 -32
  671. package/dist/node_modules/date-fns/locale/sv/_lib/formatRelative.js +11 -11
  672. package/dist/node_modules/date-fns/locale/sv/_lib/localize.js +199 -142
  673. package/dist/node_modules/date-fns/locale/sv/_lib/match.js +109 -107
  674. package/dist/node_modules/date-fns/locale/sv.js +18 -18
  675. package/dist/node_modules/date-fns/startOfDay.js +7 -7
  676. package/dist/node_modules/date-fns/startOfISOWeek.js +9 -6
  677. package/dist/node_modules/date-fns/startOfISOWeekYear.js +9 -9
  678. package/dist/node_modules/date-fns/startOfMonth.js +7 -7
  679. package/dist/node_modules/date-fns/startOfWeek.js +8 -8
  680. package/dist/node_modules/date-fns/startOfWeekYear.js +10 -10
  681. package/dist/node_modules/date-fns/startOfYear.js +7 -7
  682. package/dist/node_modules/date-fns/subDays.js +6 -6
  683. package/dist/node_modules/date-fns/subMonths.js +6 -6
  684. package/dist/node_modules/date-fns/subWeeks.js +6 -6
  685. package/dist/node_modules/date-fns/toDate.js +6 -6
  686. package/dist/node_modules/fast-equals/dist/es/index.js +239 -298
  687. package/dist/node_modules/libphonenumber-js/es6/ParseError.js +116 -89
  688. package/dist/node_modules/libphonenumber-js/es6/PhoneNumber.js +155 -183
  689. package/dist/node_modules/libphonenumber-js/es6/constants.js +4 -10
  690. package/dist/node_modules/libphonenumber-js/es6/format.js +70 -91
  691. package/dist/node_modules/libphonenumber-js/es6/getCountries.js +5 -5
  692. package/dist/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +8 -10
  693. package/dist/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +5 -5
  694. package/dist/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +19 -14
  695. package/dist/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +9 -9
  696. package/dist/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +15 -17
  697. package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +35 -45
  698. package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +20 -26
  699. package/dist/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +17 -22
  700. package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +24 -36
  701. package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +26 -30
  702. package/dist/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +13 -21
  703. package/dist/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +10 -24
  704. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +10 -11
  705. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +6 -8
  706. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +39 -39
  707. package/dist/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +9 -11
  708. package/dist/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +56 -47
  709. package/dist/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +12 -12
  710. package/dist/node_modules/libphonenumber-js/es6/helpers/isCallingCode.js +5 -5
  711. package/dist/node_modules/libphonenumber-js/es6/helpers/isCountryCode.js +5 -5
  712. package/dist/node_modules/libphonenumber-js/es6/helpers/isObject.js +6 -6
  713. package/dist/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +9 -17
  714. package/dist/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +5 -5
  715. package/dist/node_modules/libphonenumber-js/es6/helpers/mergeArrays.js +39 -0
  716. package/dist/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +46 -77
  717. package/dist/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +17 -18
  718. package/dist/node_modules/libphonenumber-js/es6/isPossible.js +29 -32
  719. package/dist/node_modules/libphonenumber-js/es6/isValid.js +12 -13
  720. package/dist/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +55 -52
  721. package/dist/node_modules/libphonenumber-js/es6/metadata.js +462 -482
  722. package/dist/node_modules/libphonenumber-js/es6/normalizeArguments.js +97 -95
  723. package/dist/node_modules/libphonenumber-js/es6/parse.js +98 -133
  724. package/dist/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +43 -35
  725. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +8 -8
  726. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +51 -48
  727. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +59 -55
  728. package/dist/node_modules/libphonenumber-js/es6/tools/semver-compare.js +13 -13
  729. package/dist/node_modules/libphonenumber-js/metadata.min.json.js +7437 -3
  730. package/dist/node_modules/libphonenumber-js/min/exports/getCountries.js +6 -6
  731. package/dist/node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js +6 -6
  732. package/dist/node_modules/libphonenumber-js/min/exports/isSupportedCountry.js +7 -7
  733. package/dist/node_modules/libphonenumber-js/min/exports/isValidPhoneNumber.js +6 -6
  734. package/dist/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +7 -7
  735. package/dist/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +6 -6
  736. package/dist/node_modules/linkifyjs/dist/linkify.js +486 -679
  737. package/dist/node_modules/next-themes/dist/index.js +120 -85
  738. package/dist/node_modules/orderedmap/dist/index.js +64 -100
  739. package/dist/node_modules/prosemirror-commands/dist/index.js +313 -368
  740. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +109 -84
  741. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +162 -195
  742. package/dist/node_modules/prosemirror-history/dist/index.js +203 -239
  743. package/dist/node_modules/prosemirror-keymap/dist/index.js +45 -57
  744. package/dist/node_modules/prosemirror-model/dist/index.js +1783 -2735
  745. package/dist/node_modules/prosemirror-schema-list/dist/index.js +66 -81
  746. package/dist/node_modules/prosemirror-state/dist/index.js +517 -814
  747. package/dist/node_modules/prosemirror-transform/dist/index.js +1104 -1505
  748. package/dist/node_modules/prosemirror-view/dist/index.js +3274 -3782
  749. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +15 -21
  750. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +12 -14
  751. package/dist/node_modules/react/compiler-runtime.js +10 -10
  752. package/dist/node_modules/rope-sequence/dist/index.js +82 -99
  753. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +55 -58
  754. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +53 -57
  755. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +53 -58
  756. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +45 -46
  757. package/dist/node_modules/use-sync-external-store/shim/index.js +10 -10
  758. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +10 -10
  759. package/dist/node_modules/w3c-keyname/index.js +87 -92
  760. package/dist/theme/component-recipes.js +52 -53
  761. package/dist/theme/theme-casper-ui.js +179 -420
  762. package/dist/theme/theme-helper.js +4 -4
  763. package/dist/theme/theme-provider.js +33 -34
  764. package/dist/theme/theme-style-props.d.ts.map +1 -1
  765. package/dist/theme/theme-tokens.js +22 -12
  766. package/dist/theme/theme-types.js +22 -12
  767. package/dist/theme/theme.js +213 -268
  768. package/package.json +30 -29
  769. package/dist/_virtual/compiler-runtime.js +0 -5
  770. package/dist/_virtual/compiler-runtime2.js +0 -4
  771. package/dist/_virtual/index.js +0 -5
  772. package/dist/_virtual/index2.js +0 -4
  773. package/dist/_virtual/react-compiler-runtime.development.js +0 -4
  774. package/dist/_virtual/react-compiler-runtime.production.js +0 -4
  775. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
  776. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
  777. package/dist/_virtual/with-selector.development.js +0 -4
  778. package/dist/_virtual/with-selector.js +0 -5
  779. package/dist/_virtual/with-selector.production.js +0 -4
  780. package/dist/_virtual/with-selector2.js +0 -4
  781. package/dist/packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js +0 -506
@@ -1,185 +1,158 @@
1
- import { jsx as q } from "react/jsx-runtime";
2
- import { useRef as R, useState as J, useEffect as j } from "react";
3
- import { adjustCrop as E, ScalingDirection as b, getAspectRatioValue as y, calculateHandlePositions as W, getCursorStyle as K, isPointInsideRect as B, getOppositeCorner as N } from "./image-cropper.helper.js";
4
- function _(I) {
5
- document.body.style.userSelect = I;
1
+ import { ScalingDirection as e, adjustCrop as t, calculateHandlePositions as n, getAspectRatioValue as r, getCursorStyle as i, getOppositeCorner as a, isPointInsideRect as o } from "./image-cropper.helper.js";
2
+ import { useEffect as s, useRef as c, useState as l } from "react";
3
+ import { jsx as u } from "react/jsx-runtime";
4
+ //#region lib/components/image-upload/image-cropper.tsx
5
+ function d(e) {
6
+ document.body.style.userSelect = e;
6
7
  }
7
- function x({
8
- src: I,
9
- crop: z,
10
- onCropCallback: P,
11
- setPreviewImage: Y,
12
- aspectRatio: F
13
- }) {
14
- const S = R(null), m = R(null), v = R(null), C = R(null), s = R({
15
- left: 0,
16
- top: 0,
17
- width: 0,
18
- height: 0
19
- }), a = R({
20
- left: 0,
21
- top: 0
22
- }), [U, V] = J("crosshair"), T = 10, k = (e) => {
23
- if (m.current && v.current) {
24
- const t = {
25
- width: v.current.width,
26
- height: v.current.height
27
- }, o = E(s.current, m.current, t, e);
28
- P(o);
29
- }
30
- }, A = (e, t, o, w) => {
31
- e.fillStyle = "rgba(0, 0, 0, 0.5)", e.fillRect(0, 0, t.width, t.height), e.save(), e.beginPath(), e.rect(o.left, o.top, o.width, o.height), e.clip(), m.current && e.drawImage(m.current, 0, 0, t.width, t.height), e.restore(), e.strokeStyle = "rgba(255, 255, 255, 0.88)", e.lineWidth = 1, e.strokeRect(o.left, o.top, o.width, o.height), w !== "new-selection" && W(o, T).forEach(({
32
- x: g,
33
- y: d,
34
- corner: M
35
- }) => {
36
- const i = T / 2, p = 3, c = (n, r = 0) => {
37
- e.strokeStyle = n, e.lineWidth = p + r, e.beginPath();
38
- const l = Math.min(o.width / 2, 16), h = Math.min(o.height / 2, 16);
39
- switch (M) {
40
- case "bottom-left":
41
- e.moveTo(g + i, d - h + i), e.lineTo(g + i, d + i), e.lineTo(g + l + i, d + i);
42
- break;
43
- case "bottom-right":
44
- e.moveTo(g + i, d - h + i), e.lineTo(g + i, d + i), e.lineTo(g - l + i, d + i);
45
- break;
46
- case "top-left":
47
- e.moveTo(g + i, d + h + i), e.lineTo(g + i, d + i), e.lineTo(g + l + i, d + i);
48
- break;
49
- case "top-right":
50
- e.moveTo(g + i, d + h + i), e.lineTo(g + i, d + i), e.lineTo(g - l + i, d + i);
51
- break;
52
- }
53
- e.stroke();
54
- };
55
- c("#000", 1), c("#FFF");
56
- });
57
- }, D = () => {
58
- if (S.current && m.current && v.current) {
59
- const e = document.createElement("canvas");
60
- e.width = m.current.width, e.height = m.current.height;
61
- const t = e.getContext("2d"), o = {
62
- width: v.current.width,
63
- height: v.current.height
64
- }, w = E(s.current, m.current, o, b.ToFullSize);
65
- if (t)
66
- return t.drawImage(
67
- m.current,
68
- // Reference to the original image
69
- w.left,
70
- w.top,
71
- w.width,
72
- w.height,
73
- 0,
74
- 0,
75
- e.width,
76
- e.height
77
- ), e.toDataURL("image/jpeg");
78
- }
79
- return null;
80
- };
81
- j(() => {
82
- const e = S.current, t = e?.getContext("2d");
83
- if (!e || !t) return;
84
- const o = new Image();
85
- o.src = I, o.onload = () => {
86
- const {
87
- width: d
88
- } = o, {
89
- height: M
90
- } = o, i = Math.min(528 / d, 418 / M), p = d * i, c = M * i;
91
- e.width = p, e.height = c, t.drawImage(o, 0, 0, e.width, e.height), m.current = o, m.current && t.drawImage(m.current, 0, 0, e.width, e.height), v.current = {
92
- width: p,
93
- height: c
94
- };
95
- let n, r, l;
96
- if (z)
97
- l = E(z, m.current, v.current, b.ToDisplayedSize);
98
- else {
99
- const h = y(F);
100
- h ? p / c < h ? (n = p, r = n / h) : (r = c, n = r * h) : (n = p, r = c), l = {
101
- width: n,
102
- height: r,
103
- left: (p - n) / 2,
104
- top: (c - r) / 2
105
- };
106
- }
107
- s.current = l, A(t, e, l, C.current), k(b.ToFullSize), Y(D() || "");
108
- };
109
- }, [I]);
110
- const L = () => {
111
- const e = S.current, t = e?.getContext("2d");
112
- !t || !e || (t.clearRect(0, 0, e.width, e.height), m.current && t.drawImage(m.current, 0, 0, e.width, e.height), A(t, e, s.current, null));
113
- }, G = (e) => {
114
- const t = K(e, S, s.current, T, W(s.current, T));
115
- V(t);
116
- }, H = (e) => {
117
- const t = S.current, o = t?.getContext("2d");
118
- if (!t || !o) return;
119
- const w = t.getBoundingClientRect(), g = e.clientX - w.left, d = e.clientY - w.top;
120
- let M = 0, i = 0;
121
- a.current && (M = g - a.current.left, i = d - a.current.top);
122
- let p = {
123
- ...s.current
124
- };
125
- if (C.current === "new-selection" || C.current === "resize") {
126
- if (!a.current) return;
127
- const c = y(F);
128
- let n = 0, r = 0, l = M, h = i, u = a.current.left, f = a.current.top;
129
- l >= 0 && h >= 0 ? (n = Math.min(t.width - u, l), r = n / c, r > h && (r = Math.min(t.height - f, h), n = r * c), u + n >= t.width && (n = t.width - u, r = n / c), f + r >= t.height && (r = t.height - f, n = r * c)) : l >= 0 && h < 0 ? (h = -h, n = Math.min(t.width - u, l), r = n / c, r > h && (r = h, n = r * c), f = a.current.top - r, f <= 0 && (r += f, f = 0, n = r * c)) : l < 0 && h >= 0 ? (u = Math.max(0, u + l), l = -l, n = l, r = n / c, r > h && (r = Math.min(t.height - f, h), n = r * c), u = a.current.left - n, u <= 0 && (n += u, u = 0, r = n / c), f + r >= t.height && (r = t.height - f, n = r * c, u = a.current.left - n)) : l < 0 && h < 0 && (u = Math.max(0, u + l), f = Math.max(0, f + h), l = -l, h = -h, n = l, r = n / c, r > h && (r = h, n = r * c), u = a.current.left - n, f = a.current.top - r, u <= 0 && (n += u, u = 0, r = n / c), f <= 0 && (r += f, f = 0, n = r * c), u + n > t.width && (n = t.width - u, r = n / c), f + r > t.height && (r = t.height - f, n = r * c), u = a.current.left - n, f = a.current.top - r), p = {
130
- left: u,
131
- top: f,
132
- width: n,
133
- height: r
134
- };
135
- } else if (C.current === "move") {
136
- if (!a.current) return;
137
- let c = Math.min(Math.max(s.current.left + M, 0), t.width - s.current.width), n = Math.min(Math.max(s.current.top + i, 0), t.height - s.current.height);
138
- c = Math.max(0, Math.min(c, t.width - s.current.width)), n = Math.max(0, Math.min(n, t.height - s.current.height)), a.current = {
139
- left: (a.current?.left || 0) + c - s.current.left,
140
- top: (a.current?.top || 0) + n - s.current.top
141
- }, p = {
142
- ...s.current,
143
- left: c,
144
- top: n
145
- };
146
- }
147
- s.current = p, L();
148
- }, X = () => {
149
- window.removeEventListener("mouseup", X), window.removeEventListener("mousemove", H), _(""), C.current = null, L(), k(b.ToFullSize), Y(D() || "");
150
- };
151
- function O(e) {
152
- const t = S.current;
153
- if (!t) return;
154
- _("none");
155
- const o = t.getBoundingClientRect(), w = W(s.current, T).find((i) => B(e.clientX - o.left, e.clientY - o.top, i.x, i.y, T, T)), g = e.clientX - o.left, d = e.clientY - o.top, M = B(e.clientX - o.left, e.clientY - o.top, s.current.left, s.current.top, s.current.width, s.current.height);
156
- if (w) {
157
- const i = N(s.current, w.corner);
158
- C.current = "resize", a.current = {
159
- left: i.x,
160
- top: i.y
161
- };
162
- } else M ? (a.current = {
163
- left: e.clientX - o.left,
164
- top: e.clientY - o.top
165
- }, C.current = "move") : (a.current = {
166
- left: g,
167
- top: d
168
- }, C.current = "new-selection", s.current = {
169
- left: g,
170
- top: d,
171
- width: 0,
172
- height: 0
173
- });
174
- window.addEventListener("mouseup", X), window.addEventListener("mousemove", H);
175
- }
176
- return j(() => () => {
177
- window.removeEventListener("mouseup", X), window.removeEventListener("mousemove", H);
178
- }, []), /* @__PURE__ */ q("canvas", { ref: S, onMouseDown: O, onMouseMove: G, draggable: !1, style: {
179
- cursor: U,
180
- margin: "0 auto"
181
- } });
8
+ function f({ src: f, crop: p, onCropCallback: m, setPreviewImage: h, aspectRatio: g }) {
9
+ let _ = c(null), v = c(null), y = c(null), b = c(null), x = c({
10
+ left: 0,
11
+ top: 0,
12
+ width: 0,
13
+ height: 0
14
+ }), S = c({
15
+ left: 0,
16
+ top: 0
17
+ }), [C, w] = l("crosshair"), T = (e) => {
18
+ if (v.current && y.current) {
19
+ let n = {
20
+ width: y.current.width,
21
+ height: y.current.height
22
+ };
23
+ m(t(x.current, v.current, n, e));
24
+ }
25
+ }, E = (e, t, r, i) => {
26
+ e.fillStyle = "rgba(0, 0, 0, 0.5)", e.fillRect(0, 0, t.width, t.height), e.save(), e.beginPath(), e.rect(r.left, r.top, r.width, r.height), e.clip(), v.current && e.drawImage(v.current, 0, 0, t.width, t.height), e.restore(), e.strokeStyle = "rgba(255, 255, 255, 0.88)", e.lineWidth = 1, e.strokeRect(r.left, r.top, r.width, r.height), i !== "new-selection" && n(r, 10).forEach(({ x: t, y: n, corner: i }) => {
27
+ let a = (a, o = 0) => {
28
+ e.strokeStyle = a, e.lineWidth = 3 + o, e.beginPath();
29
+ let s = Math.min(r.width / 2, 16), c = Math.min(r.height / 2, 16);
30
+ switch (i) {
31
+ case "bottom-left":
32
+ e.moveTo(t + 5, n - c + 5), e.lineTo(t + 5, n + 5), e.lineTo(t + s + 5, n + 5);
33
+ break;
34
+ case "bottom-right":
35
+ e.moveTo(t + 5, n - c + 5), e.lineTo(t + 5, n + 5), e.lineTo(t - s + 5, n + 5);
36
+ break;
37
+ case "top-left":
38
+ e.moveTo(t + 5, n + c + 5), e.lineTo(t + 5, n + 5), e.lineTo(t + s + 5, n + 5);
39
+ break;
40
+ case "top-right": e.moveTo(t + 5, n + c + 5), e.lineTo(t + 5, n + 5), e.lineTo(t - s + 5, n + 5);
41
+ }
42
+ e.stroke();
43
+ };
44
+ a("#000", 1), a("#FFF");
45
+ });
46
+ }, D = () => {
47
+ if (_.current && v.current && y.current) {
48
+ let n = document.createElement("canvas");
49
+ n.width = v.current.width, n.height = v.current.height;
50
+ let r = n.getContext("2d"), i = {
51
+ width: y.current.width,
52
+ height: y.current.height
53
+ }, a = t(x.current, v.current, i, e.ToFullSize);
54
+ if (r) return r.drawImage(v.current, a.left, a.top, a.width, a.height, 0, 0, n.width, n.height), n.toDataURL("image/jpeg");
55
+ }
56
+ return null;
57
+ };
58
+ s(() => {
59
+ let n = _.current, i = n?.getContext("2d");
60
+ if (!n || !i) return;
61
+ let a = new Image();
62
+ a.src = f, a.onload = () => {
63
+ let { width: o } = a, { height: s } = a, c = Math.min(528 / o, 418 / s), l = o * c, u = s * c;
64
+ n.width = l, n.height = u, i.drawImage(a, 0, 0, n.width, n.height), v.current = a, v.current && i.drawImage(v.current, 0, 0, n.width, n.height), y.current = {
65
+ width: l,
66
+ height: u
67
+ };
68
+ let d, f, m;
69
+ if (p) m = t(p, v.current, y.current, e.ToDisplayedSize);
70
+ else {
71
+ let e = r(g);
72
+ e ? l / u < e ? (d = l, f = d / e) : (f = u, d = f * e) : (d = l, f = u), m = {
73
+ width: d,
74
+ height: f,
75
+ left: (l - d) / 2,
76
+ top: (u - f) / 2
77
+ };
78
+ }
79
+ x.current = m, E(i, n, m, b.current), T(e.ToFullSize), h(D() || "");
80
+ };
81
+ }, [f]);
82
+ let O = () => {
83
+ let e = _.current, t = e?.getContext("2d");
84
+ !t || !e || (t.clearRect(0, 0, e.width, e.height), v.current && t.drawImage(v.current, 0, 0, e.width, e.height), E(t, e, x.current, null));
85
+ }, k = (e) => {
86
+ let t = i(e, _, x.current, 10, n(x.current, 10));
87
+ w(t);
88
+ }, A = (e) => {
89
+ let t = _.current, n = t?.getContext("2d");
90
+ if (!t || !n) return;
91
+ let i = t.getBoundingClientRect(), a = e.clientX - i.left, o = e.clientY - i.top, s = 0, c = 0;
92
+ S.current && (s = a - S.current.left, c = o - S.current.top);
93
+ let l = { ...x.current };
94
+ if (b.current === "new-selection" || b.current === "resize") {
95
+ if (!S.current) return;
96
+ let e = r(g), n = 0, i = 0, a = s, o = c, u = S.current.left, d = S.current.top;
97
+ a >= 0 && o >= 0 ? (n = Math.min(t.width - u, a), i = n / e, i > o && (i = Math.min(t.height - d, o), n = i * e), u + n >= t.width && (n = t.width - u, i = n / e), d + i >= t.height && (i = t.height - d, n = i * e)) : a >= 0 && o < 0 ? (o = -o, n = Math.min(t.width - u, a), i = n / e, i > o && (i = o, n = i * e), d = S.current.top - i, d <= 0 && (i += d, d = 0, n = i * e)) : a < 0 && o >= 0 ? (u = Math.max(0, u + a), a = -a, n = a, i = n / e, i > o && (i = Math.min(t.height - d, o), n = i * e), u = S.current.left - n, u <= 0 && (n += u, u = 0, i = n / e), d + i >= t.height && (i = t.height - d, n = i * e, u = S.current.left - n)) : a < 0 && o < 0 && (u = Math.max(0, u + a), d = Math.max(0, d + o), a = -a, o = -o, n = a, i = n / e, i > o && (i = o, n = i * e), u = S.current.left - n, d = S.current.top - i, u <= 0 && (n += u, u = 0, i = n / e), d <= 0 && (i += d, d = 0, n = i * e), u + n > t.width && (n = t.width - u, i = n / e), d + i > t.height && (i = t.height - d, n = i * e), u = S.current.left - n, d = S.current.top - i), l = {
98
+ left: u,
99
+ top: d,
100
+ width: n,
101
+ height: i
102
+ };
103
+ } else if (b.current === "move") {
104
+ if (!S.current) return;
105
+ let e = Math.min(Math.max(x.current.left + s, 0), t.width - x.current.width), n = Math.min(Math.max(x.current.top + c, 0), t.height - x.current.height);
106
+ e = Math.max(0, Math.min(e, t.width - x.current.width)), n = Math.max(0, Math.min(n, t.height - x.current.height)), S.current = {
107
+ left: (S.current?.left || 0) + e - x.current.left,
108
+ top: (S.current?.top || 0) + n - x.current.top
109
+ }, l = {
110
+ ...x.current,
111
+ left: e,
112
+ top: n
113
+ };
114
+ }
115
+ x.current = l, O();
116
+ }, j = () => {
117
+ window.removeEventListener("mouseup", j), window.removeEventListener("mousemove", A), d(""), b.current = null, O(), T(e.ToFullSize), h(D() || "");
118
+ };
119
+ function M(e) {
120
+ let t = _.current;
121
+ if (!t) return;
122
+ d("none");
123
+ let r = t.getBoundingClientRect(), i = n(x.current, 10).find((t) => o(e.clientX - r.left, e.clientY - r.top, t.x, t.y, 10, 10)), s = e.clientX - r.left, c = e.clientY - r.top, l = o(e.clientX - r.left, e.clientY - r.top, x.current.left, x.current.top, x.current.width, x.current.height);
124
+ if (i) {
125
+ let e = a(x.current, i.corner);
126
+ b.current = "resize", S.current = {
127
+ left: e.x,
128
+ top: e.y
129
+ };
130
+ } else l ? (S.current = {
131
+ left: e.clientX - r.left,
132
+ top: e.clientY - r.top
133
+ }, b.current = "move") : (S.current = {
134
+ left: s,
135
+ top: c
136
+ }, b.current = "new-selection", x.current = {
137
+ left: s,
138
+ top: c,
139
+ width: 0,
140
+ height: 0
141
+ });
142
+ window.addEventListener("mouseup", j), window.addEventListener("mousemove", A);
143
+ }
144
+ return s(() => () => {
145
+ window.removeEventListener("mouseup", j), window.removeEventListener("mousemove", A);
146
+ }, []), /* @__PURE__ */ u("canvas", {
147
+ ref: _,
148
+ onMouseDown: M,
149
+ onMouseMove: k,
150
+ draggable: !1,
151
+ style: {
152
+ cursor: C,
153
+ margin: "0 auto"
154
+ }
155
+ });
182
156
  }
183
- export {
184
- x as ImageCropper
185
- };
157
+ //#endregion
158
+ export { f as ImageCropper };
@@ -1,113 +1,135 @@
1
- import { jsx as u, jsxs as M, Fragment as te } from "react/jsx-runtime";
2
- import { c as re } from "../../_virtual/compiler-runtime.js";
3
- import { Text as N, Box as $, Input as le } from "@chakra-ui/react";
4
- import ae, { useState as V } from "react";
5
- import { sanitizeFilename as oe } from "./image-upload-helper.js";
6
- import { ImageIconLarge as ne } from "./image-upload-icons.js";
7
- import { translations as g } from "./translations.js";
8
- import { Alert as q } from "../alert/alert.js";
9
- import { ThemeColorVariable as H, ThemeRadiusVariable as ie, ThemeSpaceVariable as G } from "../../theme/theme-types.js";
10
- function _e(J) {
11
- const e = re.c(37), {
12
- locale: r,
13
- setFileItem: A,
14
- setHasImageChanged: C
15
- } = J, [K, z] = V(!1), [w, O] = V(!1), [E, W] = V(!1);
16
- let h;
17
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = ae.createRef(), e[0] = h) : h = e[0];
18
- const o = h;
19
- let b;
20
- e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = function(l, a) {
21
- const R = new FileReader();
22
- R.onload = a, R.readAsDataURL(l);
23
- }, e[1] = b) : b = e[1];
24
- const P = b;
25
- let _;
26
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = ["image/jpeg", "image/png", "image/webp", "image/gif", "image/svg+xml"], e[2] = _) : _ = e[2];
27
- const Q = _;
28
- let D;
29
- e[3] !== A || e[4] !== C ? (D = (t) => {
30
- const {
31
- target: l
32
- } = t;
33
- if (!l || !l.files || !l.files[0])
34
- return;
35
- const a = l.files[0];
36
- if (!Q.includes(a.type)) {
37
- W(!0);
38
- return;
39
- }
40
- W(!1), a.size > 3145728 ? O(!0) : (O(!1), P(a, (R) => {
41
- const v = R.target?.result, ee = {
42
- fileName: oe(a.name),
43
- data: v
44
- };
45
- A(ee), C(!0);
46
- }));
47
- }, e[3] = A, e[4] = C, e[5] = D) : D = e[5];
48
- const n = D;
49
- let x;
50
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = () => {
51
- o.current && o.current.click();
52
- }, e[6] = x) : x = e[6];
53
- const X = x;
54
- let y;
55
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = (t) => {
56
- t.preventDefault(), t.dataTransfer.items && t.dataTransfer.items.length > 0 && z(!0);
57
- }, e[7] = y) : y = e[7];
58
- const Y = y;
59
- let F;
60
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = () => {
61
- z(!1);
62
- }, e[8] = F) : F = e[8];
63
- const Z = F;
64
- let S;
65
- e[9] !== n ? (S = (t) => {
66
- if (t.preventDefault(), !!o.current && t.dataTransfer.files && t.dataTransfer.files.length > 0) {
67
- const l = new DataTransfer();
68
- Array.from(t.dataTransfer.files).forEach((a) => {
69
- l.items.add(a);
70
- }), o.current.files = l.files, n({
71
- target: o.current
72
- }), t.dataTransfer.clearData(), z(!1);
73
- }
74
- }, e[9] = n, e[10] = S) : S = e[10];
75
- const U = S, j = K ? H.OnSurfaceBorder : "transparent";
76
- let T;
77
- e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ u(ne, {}), e[11] = T) : T = e[11];
78
- const k = g[r];
79
- let i;
80
- e[12] !== k.pullAndDrop ? (i = /* @__PURE__ */ u(N, { children: k.pullAndDrop }), e[12] = k.pullAndDrop, e[13] = i) : i = e[13];
81
- const B = g[r], L = g[r];
82
- let s;
83
- e[14] !== L.upload ? (s = /* @__PURE__ */ u($, { as: "span", color: H.Accent, textDecoration: "underline", children: L.upload }), e[14] = L.upload, e[15] = s) : s = e[15];
84
- let c;
85
- e[16] !== B.or || e[17] !== s ? (c = /* @__PURE__ */ M(N, { children: [
86
- B.or,
87
- " ",
88
- s,
89
- "."
90
- ] }), e[16] = B.or, e[17] = s, e[18] = c) : c = e[18];
91
- let f;
92
- e[19] !== n ? (f = /* @__PURE__ */ u(le, { type: "file", ref: o, display: "none", onChange: n }), e[19] = n, e[20] = f) : f = e[20];
93
- let m;
94
- e[21] !== U || e[22] !== i || e[23] !== c || e[24] !== f || e[25] !== j ? (m = /* @__PURE__ */ M($, { p: "108px", bg: H.BackgroundDisabled, borderWidth: "1px", borderColor: j, transition: "150ms ease", borderRadius: ie.Medium, display: "flex", alignItems: "center", justifyContent: "center", flexDir: "column", onDragOver: Y, onDragLeave: Z, onDrop: U, onClick: X, cursor: "pointer", children: [
95
- T,
96
- i,
97
- c,
98
- f
99
- ] }), e[21] = U, e[22] = i, e[23] = c, e[24] = f, e[25] = j, e[26] = m) : m = e[26];
100
- let d;
101
- e[27] !== r || e[28] !== E ? (d = E && /* @__PURE__ */ u(q, { mt: G.Medium, type: "error", children: g[r].unsupportedFormat }), e[27] = r, e[28] = E, e[29] = d) : d = e[29];
102
- let p;
103
- e[30] !== r || e[31] !== w ? (p = w && /* @__PURE__ */ u(q, { mt: G.Medium, type: "error", children: g[r].sizeExceeded }), e[30] = r, e[31] = w, e[32] = p) : p = e[32];
104
- let I;
105
- return e[33] !== m || e[34] !== d || e[35] !== p ? (I = /* @__PURE__ */ M(te, { children: [
106
- m,
107
- d,
108
- p
109
- ] }), e[33] = m, e[34] = d, e[35] = p, e[36] = I) : I = e[36], I;
1
+ import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
2
+ import { ThemeColorVariable as t, ThemeRadiusVariable as n, ThemeSpaceVariable as r } from "../../theme/theme-types.js";
3
+ import { Alert as i } from "../alert/alert.js";
4
+ import { ImageIconLarge as a } from "./image-upload-icons.js";
5
+ import { sanitizeFilename as o } from "./image-upload-helper.js";
6
+ import { translations as s } from "./translations.js";
7
+ import c, { useState as l } from "react";
8
+ import { Box as u, Input as d, Text as f } from "@chakra-ui/react";
9
+ import { Fragment as ee, jsx as p, jsxs as m } from "react/jsx-runtime";
10
+ //#region lib/components/image-upload/image-upload-dropzone.tsx
11
+ var h = e();
12
+ function g(e) {
13
+ let g = (0, h.c)(37), { locale: _, setFileItem: v, setHasImageChanged: y } = e, [te, b] = l(!1), [x, S] = l(!1), [C, w] = l(!1), T;
14
+ g[0] === Symbol.for("react.memo_cache_sentinel") ? (T = c.createRef(), g[0] = T) : T = g[0];
15
+ let E = T, D;
16
+ g[1] === Symbol.for("react.memo_cache_sentinel") ? (D = function(e, t) {
17
+ let n = new FileReader();
18
+ n.onload = t, n.readAsDataURL(e);
19
+ }, g[1] = D) : D = g[1];
20
+ let O = D, k;
21
+ g[2] === Symbol.for("react.memo_cache_sentinel") ? (k = [
22
+ "image/jpeg",
23
+ "image/png",
24
+ "image/webp",
25
+ "image/gif",
26
+ "image/svg+xml"
27
+ ], g[2] = k) : k = g[2];
28
+ let A = k, j;
29
+ g[3] !== v || g[4] !== y ? (j = (e) => {
30
+ let { target: t } = e;
31
+ if (!t || !t.files || !t.files[0]) return;
32
+ let n = t.files[0];
33
+ if (!A.includes(n.type)) {
34
+ w(!0);
35
+ return;
36
+ }
37
+ w(!1), n.size > 3145728 ? S(!0) : (S(!1), O(n, (e) => {
38
+ let t = e.target?.result, r = {
39
+ fileName: o(n.name),
40
+ data: t
41
+ };
42
+ v(r), y(!0);
43
+ }));
44
+ }, g[3] = v, g[4] = y, g[5] = j) : j = g[5];
45
+ let M = j, N;
46
+ g[6] === Symbol.for("react.memo_cache_sentinel") ? (N = () => {
47
+ E.current && E.current.click();
48
+ }, g[6] = N) : N = g[6];
49
+ let P = N, F;
50
+ g[7] === Symbol.for("react.memo_cache_sentinel") ? (F = (e) => {
51
+ e.preventDefault(), e.dataTransfer.items && e.dataTransfer.items.length > 0 && b(!0);
52
+ }, g[7] = F) : F = g[7];
53
+ let I = F, L;
54
+ g[8] === Symbol.for("react.memo_cache_sentinel") ? (L = () => {
55
+ b(!1);
56
+ }, g[8] = L) : L = g[8];
57
+ let R = L, z;
58
+ g[9] === M ? z = g[10] : (z = (e) => {
59
+ if (e.preventDefault(), E.current && e.dataTransfer.files && e.dataTransfer.files.length > 0) {
60
+ let t = new DataTransfer();
61
+ Array.from(e.dataTransfer.files).forEach((e) => {
62
+ t.items.add(e);
63
+ }), E.current.files = t.files, M({ target: E.current }), e.dataTransfer.clearData(), b(!1);
64
+ }
65
+ }, g[9] = M, g[10] = z);
66
+ let B = z, V = te ? t.OnSurfaceBorder : "transparent", H;
67
+ g[11] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ p(a, {}), g[11] = H) : H = g[11];
68
+ let U = s[_], W;
69
+ g[12] === U.pullAndDrop ? W = g[13] : (W = /* @__PURE__ */ p(f, { children: U.pullAndDrop }), g[12] = U.pullAndDrop, g[13] = W);
70
+ let G = s[_], K = s[_], q;
71
+ g[14] === K.upload ? q = g[15] : (q = /* @__PURE__ */ p(u, {
72
+ as: "span",
73
+ color: t.Accent,
74
+ textDecoration: "underline",
75
+ children: K.upload
76
+ }), g[14] = K.upload, g[15] = q);
77
+ let J;
78
+ g[16] !== G.or || g[17] !== q ? (J = /* @__PURE__ */ m(f, { children: [
79
+ G.or,
80
+ " ",
81
+ q,
82
+ "."
83
+ ] }), g[16] = G.or, g[17] = q, g[18] = J) : J = g[18];
84
+ let Y;
85
+ g[19] === M ? Y = g[20] : (Y = /* @__PURE__ */ p(d, {
86
+ type: "file",
87
+ ref: E,
88
+ display: "none",
89
+ onChange: M
90
+ }), g[19] = M, g[20] = Y);
91
+ let X;
92
+ g[21] !== B || g[22] !== W || g[23] !== J || g[24] !== Y || g[25] !== V ? (X = /* @__PURE__ */ m(u, {
93
+ p: "108px",
94
+ bg: t.BackgroundDisabled,
95
+ borderWidth: "1px",
96
+ borderColor: V,
97
+ transition: "150ms ease",
98
+ borderRadius: n.Medium,
99
+ display: "flex",
100
+ alignItems: "center",
101
+ justifyContent: "center",
102
+ flexDir: "column",
103
+ onDragOver: I,
104
+ onDragLeave: R,
105
+ onDrop: B,
106
+ onClick: P,
107
+ cursor: "pointer",
108
+ children: [
109
+ H,
110
+ W,
111
+ J,
112
+ Y
113
+ ]
114
+ }), g[21] = B, g[22] = W, g[23] = J, g[24] = Y, g[25] = V, g[26] = X) : X = g[26];
115
+ let Z;
116
+ g[27] !== _ || g[28] !== C ? (Z = C && /* @__PURE__ */ p(i, {
117
+ mt: r.Medium,
118
+ type: "error",
119
+ children: s[_].unsupportedFormat
120
+ }), g[27] = _, g[28] = C, g[29] = Z) : Z = g[29];
121
+ let Q;
122
+ g[30] !== _ || g[31] !== x ? (Q = x && /* @__PURE__ */ p(i, {
123
+ mt: r.Medium,
124
+ type: "error",
125
+ children: s[_].sizeExceeded
126
+ }), g[30] = _, g[31] = x, g[32] = Q) : Q = g[32];
127
+ let $;
128
+ return g[33] !== X || g[34] !== Z || g[35] !== Q ? ($ = /* @__PURE__ */ m(ee, { children: [
129
+ X,
130
+ Z,
131
+ Q
132
+ ] }), g[33] = X, g[34] = Z, g[35] = Q, g[36] = $) : $ = g[36], $;
110
133
  }
111
- export {
112
- _e as default
113
- };
134
+ //#endregion
135
+ export { g as default };