@arkyn/components 3.0.1-beta.201 → 3.0.1-beta.205

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 (458) hide show
  1. package/LICENSE.txt +184 -1
  2. package/README.md +12 -1
  3. package/dist/components/alert/alertContainer/index.d.ts.map +1 -1
  4. package/dist/components/cardTab/cardTabContext.d.ts.map +1 -1
  5. package/dist/components/drawer/drawerContext.d.ts.map +1 -1
  6. package/dist/components/modal/modalContext.d.ts.map +1 -1
  7. package/dist/components/tab/tabContext.d.ts.map +1 -1
  8. package/dist/index.js +85 -62
  9. package/dist/index.js.map +1 -0
  10. package/dist/modules/components/alert/alertContainer/index.js +17 -15
  11. package/dist/modules/components/alert/alertContainer/index.js.map +1 -0
  12. package/dist/modules/components/alert/alertContainer/styles.css +3 -0
  13. package/dist/modules/components/alert/alertContent/index.js +2 -0
  14. package/dist/modules/components/alert/alertContent/index.js.map +1 -0
  15. package/dist/modules/components/alert/alertContent/styles.css +1 -0
  16. package/dist/modules/components/alert/alertDescription/index.js +2 -0
  17. package/dist/modules/components/alert/alertDescription/index.js.map +1 -0
  18. package/dist/modules/components/alert/alertDescription/styles.css +1 -0
  19. package/dist/modules/components/alert/alertIcon/index.js +2 -0
  20. package/dist/modules/components/alert/alertIcon/index.js.map +1 -0
  21. package/dist/modules/components/alert/alertIcon/styles.css +7 -0
  22. package/dist/modules/components/alert/alertTitle/index.js +2 -0
  23. package/dist/modules/components/alert/alertTitle/index.js.map +1 -0
  24. package/dist/modules/components/alert/alertTitle/styles.css +1 -0
  25. package/dist/modules/components/audioPlayer/index.js +2 -0
  26. package/dist/modules/components/audioPlayer/index.js.map +1 -0
  27. package/dist/modules/components/audioPlayer/styles.css +3 -0
  28. package/dist/modules/components/audioUpload/hasFileContent/index.js +2 -0
  29. package/dist/modules/components/audioUpload/hasFileContent/index.js.map +1 -0
  30. package/dist/modules/components/audioUpload/hasFileContent/styles.css +1 -0
  31. package/dist/modules/components/audioUpload/index.js +2 -0
  32. package/dist/modules/components/audioUpload/index.js.map +1 -0
  33. package/dist/modules/components/audioUpload/noFileContent/index.js +2 -0
  34. package/dist/modules/components/audioUpload/noFileContent/index.js.map +1 -0
  35. package/dist/modules/components/audioUpload/noFileContent/styles.css +1 -0
  36. package/dist/modules/components/audioUpload/styles.css +25 -0
  37. package/dist/modules/components/badge/index.js +2 -0
  38. package/dist/modules/components/badge/index.js.map +1 -0
  39. package/dist/modules/components/badge/styles.css +1 -0
  40. package/dist/modules/components/button/index.js +2 -0
  41. package/dist/modules/components/button/index.js.map +1 -0
  42. package/dist/modules/components/button/styles.css +1 -0
  43. package/dist/modules/components/calendar/_calendarProvider.js +2 -0
  44. package/dist/modules/components/calendar/_calendarProvider.js.map +1 -0
  45. package/dist/modules/components/calendar/_viewService.js +2 -0
  46. package/dist/modules/components/calendar/_viewService.js.map +1 -0
  47. package/dist/modules/components/calendar/calendarContainer/index.js +2 -0
  48. package/dist/modules/components/calendar/calendarContainer/index.js.map +1 -0
  49. package/dist/modules/components/calendar/calendarContainer/styles.css +1 -0
  50. package/dist/modules/components/calendar/calendarHeader/index.js +2 -0
  51. package/dist/modules/components/calendar/calendarHeader/index.js.map +1 -0
  52. package/dist/modules/components/calendar/calendarHeader/styles.css +1 -0
  53. package/dist/modules/components/calendar/calendarTableBody/index.js +2 -0
  54. package/dist/modules/components/calendar/calendarTableBody/index.js.map +1 -0
  55. package/dist/modules/components/calendar/calendarTableBody/styles.css +1 -0
  56. package/dist/modules/components/calendar/calendarTableContainer/index.js +2 -0
  57. package/dist/modules/components/calendar/calendarTableContainer/index.js.map +1 -0
  58. package/dist/modules/components/calendar/calendarTableContainer/styles.css +1 -0
  59. package/dist/modules/components/calendar/calendarTableHeader/index.js +2 -0
  60. package/dist/modules/components/calendar/calendarTableHeader/index.js.map +1 -0
  61. package/dist/modules/components/calendar/calendarTableHeader/styles.css +1 -0
  62. package/dist/modules/components/calendar/calendarTableTd/index.js +2 -0
  63. package/dist/modules/components/calendar/calendarTableTd/index.js.map +1 -0
  64. package/dist/modules/components/calendar/calendarTableTd/styles.css +1 -0
  65. package/dist/modules/components/calendar/index.js +2 -0
  66. package/dist/modules/components/calendar/index.js.map +1 -0
  67. package/dist/modules/components/calendar/styles.css +33 -0
  68. package/dist/modules/components/cardTab/cardTabButton/index.js +2 -0
  69. package/dist/modules/components/cardTab/cardTabButton/index.js.map +1 -0
  70. package/dist/modules/components/cardTab/cardTabButton/styles.css +1 -0
  71. package/dist/modules/components/cardTab/cardTabContainer/index.js +2 -0
  72. package/dist/modules/components/cardTab/cardTabContainer/index.js.map +1 -0
  73. package/dist/modules/components/cardTab/cardTabContainer/styles.css +1 -0
  74. package/dist/modules/components/cardTab/cardTabContext.js +20 -9
  75. package/dist/modules/components/cardTab/cardTabContext.js.map +1 -0
  76. package/dist/modules/components/checkbox/index.js +2 -0
  77. package/dist/modules/components/checkbox/index.js.map +1 -0
  78. package/dist/modules/components/checkbox/styles.css +7 -0
  79. package/dist/modules/components/clientOnly.js +2 -0
  80. package/dist/modules/components/clientOnly.js.map +1 -0
  81. package/dist/modules/components/currencyInput/index.js +2 -0
  82. package/dist/modules/components/currencyInput/index.js.map +1 -0
  83. package/dist/modules/components/currencyInput/style.css +1 -0
  84. package/dist/modules/components/currencyInput/styles.css +7 -0
  85. package/dist/modules/components/divider/index.js +2 -0
  86. package/dist/modules/components/divider/index.js.map +1 -0
  87. package/dist/modules/components/divider/styles.css +1 -0
  88. package/dist/modules/components/drawer/drawerContainer/index.js +2 -0
  89. package/dist/modules/components/drawer/drawerContainer/index.js.map +1 -0
  90. package/dist/modules/components/drawer/drawerContainer/styles.css +1 -0
  91. package/dist/modules/components/drawer/drawerContext.js +12 -9
  92. package/dist/modules/components/drawer/drawerContext.js.map +1 -0
  93. package/dist/modules/components/drawer/drawerHeader/index.js +2 -0
  94. package/dist/modules/components/drawer/drawerHeader/index.js.map +1 -0
  95. package/dist/modules/components/drawer/drawerHeader/styles.css +1 -0
  96. package/dist/modules/components/facebookPixel/facebookPixel.client.js +2 -0
  97. package/dist/modules/components/facebookPixel/facebookPixel.client.js.map +1 -0
  98. package/dist/modules/components/facebookPixel/index.js +2 -0
  99. package/dist/modules/components/facebookPixel/index.js.map +1 -0
  100. package/dist/modules/components/facebookPixel/pixel.js +2 -0
  101. package/dist/modules/components/facebookPixel/pixel.js.map +1 -0
  102. package/dist/modules/components/fieldError/index.js +2 -0
  103. package/dist/modules/components/fieldError/index.js.map +1 -0
  104. package/dist/modules/components/fieldError/styles.css +1 -0
  105. package/dist/modules/components/fieldLabel/index.js +2 -0
  106. package/dist/modules/components/fieldLabel/index.js.map +1 -0
  107. package/dist/modules/components/fieldLabel/styles.css +1 -0
  108. package/dist/modules/components/fieldWrapper/index.js +2 -0
  109. package/dist/modules/components/fieldWrapper/index.js.map +1 -0
  110. package/dist/modules/components/fieldWrapper/styles.css +1 -0
  111. package/dist/modules/components/fileUpload/hasFileContent/index.js +2 -0
  112. package/dist/modules/components/fileUpload/hasFileContent/index.js.map +1 -0
  113. package/dist/modules/components/fileUpload/hasFileContent/styles.css +1 -0
  114. package/dist/modules/components/fileUpload/index.js +2 -0
  115. package/dist/modules/components/fileUpload/index.js.map +1 -0
  116. package/dist/modules/components/fileUpload/noFileContent/index.js +2 -0
  117. package/dist/modules/components/fileUpload/noFileContent/index.js.map +1 -0
  118. package/dist/modules/components/fileUpload/noFileContent/styles.css +1 -0
  119. package/dist/modules/components/fileUpload/styles.css +19 -0
  120. package/dist/modules/components/fullCalendar/_fullCalendarProvider.js +2 -0
  121. package/dist/modules/components/fullCalendar/_fullCalendarProvider.js.map +1 -0
  122. package/dist/modules/components/fullCalendar/_viewService.js +2 -0
  123. package/dist/modules/components/fullCalendar/_viewService.js.map +1 -0
  124. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +2 -0
  125. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js.map +1 -0
  126. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/styles.css +1 -0
  127. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +2 -0
  128. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js.map +1 -0
  129. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/styles.css +1 -0
  130. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +2 -0
  131. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js.map +1 -0
  132. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/styles.css +1 -0
  133. package/dist/modules/components/fullCalendar/dayCalendar/index.js +2 -0
  134. package/dist/modules/components/fullCalendar/dayCalendar/index.js.map +1 -0
  135. package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js +2 -0
  136. package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js.map +1 -0
  137. package/dist/modules/components/fullCalendar/fullCalendarContainer/styles.css +1 -0
  138. package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js +2 -0
  139. package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js.map +1 -0
  140. package/dist/modules/components/fullCalendar/fullCalendarHeader/styles.css +1 -0
  141. package/dist/modules/components/fullCalendar/index.js +2 -0
  142. package/dist/modules/components/fullCalendar/index.js.map +1 -0
  143. package/dist/modules/components/fullCalendar/monthlyCalendar/index.js +2 -0
  144. package/dist/modules/components/fullCalendar/monthlyCalendar/index.js.map +1 -0
  145. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +2 -0
  146. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js.map +1 -0
  147. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/styles.css +1 -0
  148. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +2 -0
  149. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js.map +1 -0
  150. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/styles.css +1 -0
  151. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +2 -0
  152. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js.map +1 -0
  153. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/styles.css +1 -0
  154. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +2 -0
  155. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js.map +1 -0
  156. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/styles.css +1 -0
  157. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +2 -0
  158. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js.map +1 -0
  159. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/styles.css +1 -0
  160. package/dist/modules/components/fullCalendar/styles.css +35 -0
  161. package/dist/modules/components/fullCalendar/weekCalendar/index.js +2 -0
  162. package/dist/modules/components/fullCalendar/weekCalendar/index.js.map +1 -0
  163. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +2 -0
  164. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js.map +1 -0
  165. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/styles.css +1 -0
  166. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +2 -0
  167. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js.map +1 -0
  168. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/styles.css +1 -0
  169. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +2 -0
  170. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js.map +1 -0
  171. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/styles.css +1 -0
  172. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +2 -0
  173. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js.map +1 -0
  174. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/styles.css +1 -0
  175. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +2 -0
  176. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js.map +1 -0
  177. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/styles.css +1 -0
  178. package/dist/modules/components/googleAnalytics/googleAnalytics.client.js +2 -0
  179. package/dist/modules/components/googleAnalytics/googleAnalytics.client.js.map +1 -0
  180. package/dist/modules/components/googleAnalytics/googleAnalytics.js +2 -0
  181. package/dist/modules/components/googleAnalytics/googleAnalytics.js.map +1 -0
  182. package/dist/modules/components/googleAnalytics/index.js +2 -0
  183. package/dist/modules/components/googleAnalytics/index.js.map +1 -0
  184. package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js +2 -0
  185. package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js.map +1 -0
  186. package/dist/modules/components/googleTagManager/googleTagManager.client.js +2 -0
  187. package/dist/modules/components/googleTagManager/googleTagManager.client.js.map +1 -0
  188. package/dist/modules/components/googleTagManager/googleTagManager.js +2 -0
  189. package/dist/modules/components/googleTagManager/googleTagManager.js.map +1 -0
  190. package/dist/modules/components/googleTagManager/index.js +2 -0
  191. package/dist/modules/components/googleTagManager/index.js.map +1 -0
  192. package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +2 -0
  193. package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js.map +1 -0
  194. package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +2 -0
  195. package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js.map +1 -0
  196. package/dist/modules/components/iconButton/index.js +2 -0
  197. package/dist/modules/components/iconButton/index.js.map +1 -0
  198. package/dist/modules/components/iconButton/styles.css +1 -0
  199. package/dist/modules/components/imageUpload/hasFileContent/index.js +2 -0
  200. package/dist/modules/components/imageUpload/hasFileContent/index.js.map +1 -0
  201. package/dist/modules/components/imageUpload/hasFileContent/styles.css +1 -0
  202. package/dist/modules/components/imageUpload/index.js +2 -0
  203. package/dist/modules/components/imageUpload/index.js.map +1 -0
  204. package/dist/modules/components/imageUpload/noFileContent/index.js +2 -0
  205. package/dist/modules/components/imageUpload/noFileContent/index.js.map +1 -0
  206. package/dist/modules/components/imageUpload/noFileContent/styles.css +1 -0
  207. package/dist/modules/components/imageUpload/styles.css +17 -0
  208. package/dist/modules/components/input/index.js +2 -0
  209. package/dist/modules/components/input/index.js.map +1 -0
  210. package/dist/modules/components/input/style.css +1 -0
  211. package/dist/modules/components/input/styles.css +7 -0
  212. package/dist/modules/components/mapView/index.js +2 -0
  213. package/dist/modules/components/mapView/index.js.map +1 -0
  214. package/dist/modules/components/mapView/mapView.client.js +2 -0
  215. package/dist/modules/components/mapView/mapView.client.js.map +1 -0
  216. package/dist/modules/components/mapView/mapbox.css +1 -0
  217. package/dist/modules/components/mapView/styles.css +1 -0
  218. package/dist/modules/components/maskedInput/index.js +2 -0
  219. package/dist/modules/components/maskedInput/index.js.map +1 -0
  220. package/dist/modules/components/maskedInput/style.css +1 -0
  221. package/dist/modules/components/maskedInput/styles.css +7 -0
  222. package/dist/modules/components/modal/modalContainer/index.js +2 -0
  223. package/dist/modules/components/modal/modalContainer/index.js.map +1 -0
  224. package/dist/modules/components/modal/modalContainer/styles.css +1 -0
  225. package/dist/modules/components/modal/modalContext.js +12 -9
  226. package/dist/modules/components/modal/modalContext.js.map +1 -0
  227. package/dist/modules/components/modal/modalFooter/index.js +2 -0
  228. package/dist/modules/components/modal/modalFooter/index.js.map +1 -0
  229. package/dist/modules/components/modal/modalFooter/styles.css +1 -0
  230. package/dist/modules/components/modal/modalHeader/index.js +2 -0
  231. package/dist/modules/components/modal/modalHeader/index.js.map +1 -0
  232. package/dist/modules/components/modal/modalHeader/styles.css +1 -0
  233. package/dist/modules/components/multiSelect/index.js +2 -0
  234. package/dist/modules/components/multiSelect/index.js.map +1 -0
  235. package/dist/modules/components/multiSelect/multiSelectChevron/index.js +2 -0
  236. package/dist/modules/components/multiSelect/multiSelectChevron/index.js.map +1 -0
  237. package/dist/modules/components/multiSelect/multiSelectChevron/styles.css +1 -0
  238. package/dist/modules/components/multiSelect/multiSelectContainer/index.js +2 -0
  239. package/dist/modules/components/multiSelect/multiSelectContainer/index.js.map +1 -0
  240. package/dist/modules/components/multiSelect/multiSelectContainer/styles.css +1 -0
  241. package/dist/modules/components/multiSelect/multiSelectContent/index.js +2 -0
  242. package/dist/modules/components/multiSelect/multiSelectContent/index.js.map +1 -0
  243. package/dist/modules/components/multiSelect/multiSelectContent/styles.css +1 -0
  244. package/dist/modules/components/multiSelect/multiSelectMark/index.js +2 -0
  245. package/dist/modules/components/multiSelect/multiSelectMark/index.js.map +1 -0
  246. package/dist/modules/components/multiSelect/multiSelectMark/styles.css +1 -0
  247. package/dist/modules/components/multiSelect/multiSelectOption/index.js +2 -0
  248. package/dist/modules/components/multiSelect/multiSelectOption/index.js.map +1 -0
  249. package/dist/modules/components/multiSelect/multiSelectOption/styles.css +1 -0
  250. package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +2 -0
  251. package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js.map +1 -0
  252. package/dist/modules/components/multiSelect/multiSelectOptionsContainer/styles.css +1 -0
  253. package/dist/modules/components/multiSelect/multiSelectOverlay/index.js +2 -0
  254. package/dist/modules/components/multiSelect/multiSelectOverlay/index.js.map +1 -0
  255. package/dist/modules/components/multiSelect/multiSelectOverlay/styles.css +1 -0
  256. package/dist/modules/components/multiSelect/multiSelectSpinner/index.js +2 -0
  257. package/dist/modules/components/multiSelect/multiSelectSpinner/index.js.map +1 -0
  258. package/dist/modules/components/multiSelect/multiSelectSpinner/styles.css +1 -0
  259. package/dist/modules/components/multiSelect/styles.css +31 -0
  260. package/dist/modules/components/pagination/chevronButton/index.js +2 -0
  261. package/dist/modules/components/pagination/chevronButton/index.js.map +1 -0
  262. package/dist/modules/components/pagination/chevronButton/styles.css +1 -0
  263. package/dist/modules/components/pagination/currentButton/index.js +2 -0
  264. package/dist/modules/components/pagination/currentButton/index.js.map +1 -0
  265. package/dist/modules/components/pagination/currentButton/styles.css +1 -0
  266. package/dist/modules/components/pagination/index.js +2 -0
  267. package/dist/modules/components/pagination/index.js.map +1 -0
  268. package/dist/modules/components/pagination/pageButton/index.js +2 -0
  269. package/dist/modules/components/pagination/pageButton/index.js.map +1 -0
  270. package/dist/modules/components/pagination/pageButton/styles.css +1 -0
  271. package/dist/modules/components/pagination/paginationService.js +2 -0
  272. package/dist/modules/components/pagination/paginationService.js.map +1 -0
  273. package/dist/modules/components/pagination/spread/index.js +2 -0
  274. package/dist/modules/components/pagination/spread/index.js.map +1 -0
  275. package/dist/modules/components/pagination/spread/styles.css +1 -0
  276. package/dist/modules/components/pagination/styles.css +9 -0
  277. package/dist/modules/components/phoneInput/index.js +2 -0
  278. package/dist/modules/components/phoneInput/index.js.map +1 -0
  279. package/dist/modules/components/phoneInput/phoneInputContainer/index.js +2 -0
  280. package/dist/modules/components/phoneInput/phoneInputContainer/index.js.map +1 -0
  281. package/dist/modules/components/phoneInput/phoneInputContainer/styles.css +1 -0
  282. package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js +2 -0
  283. package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js.map +1 -0
  284. package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/styles.css +1 -0
  285. package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js +2 -0
  286. package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js.map +1 -0
  287. package/dist/modules/components/phoneInput/phoneInputCountryOption/styles.css +1 -0
  288. package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js +2 -0
  289. package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js.map +1 -0
  290. package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/styles.css +1 -0
  291. package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js +2 -0
  292. package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js.map +1 -0
  293. package/dist/modules/components/phoneInput/phoneInputCountrySelector/styles.css +1 -0
  294. package/dist/modules/components/phoneInput/phoneInputMask/index.js +2 -0
  295. package/dist/modules/components/phoneInput/phoneInputMask/index.js.map +1 -0
  296. package/dist/modules/components/phoneInput/phoneInputMask/style.css +1 -0
  297. package/dist/modules/components/phoneInput/styles.css +19 -0
  298. package/dist/modules/components/popover/index.js +2 -0
  299. package/dist/modules/components/popover/index.js.map +1 -0
  300. package/dist/modules/components/popover/styles.css +1 -0
  301. package/dist/modules/components/radio/radioBox/index.js +2 -0
  302. package/dist/modules/components/radio/radioBox/index.js.map +1 -0
  303. package/dist/modules/components/radio/radioBox/styles.css +1 -0
  304. package/dist/modules/components/radio/radioContext.js +2 -0
  305. package/dist/modules/components/radio/radioContext.js.map +1 -0
  306. package/dist/modules/components/radio/radioGroup/index.js +2 -0
  307. package/dist/modules/components/radio/radioGroup/index.js.map +1 -0
  308. package/dist/modules/components/radio/radioGroup/styles.css +7 -0
  309. package/dist/modules/components/richText/blockButton/index.js +2 -0
  310. package/dist/modules/components/richText/blockButton/index.js.map +1 -0
  311. package/dist/modules/components/richText/blockButton/styles.css +1 -0
  312. package/dist/modules/components/richText/element/index.js +2 -0
  313. package/dist/modules/components/richText/element/index.js.map +1 -0
  314. package/dist/modules/components/richText/element/styles.css +1 -0
  315. package/dist/modules/components/richText/index.js +2 -0
  316. package/dist/modules/components/richText/index.js.map +1 -0
  317. package/dist/modules/components/richText/insertImage/index.js +2 -0
  318. package/dist/modules/components/richText/insertImage/index.js.map +1 -0
  319. package/dist/modules/components/richText/insertImage/styles.css +1 -0
  320. package/dist/modules/components/richText/insertVideo/index.js +2 -0
  321. package/dist/modules/components/richText/insertVideo/index.js.map +1 -0
  322. package/dist/modules/components/richText/insertVideo/styles.css +1 -0
  323. package/dist/modules/components/richText/leaf/index.js +2 -0
  324. package/dist/modules/components/richText/leaf/index.js.map +1 -0
  325. package/dist/modules/components/richText/markButton/index.js +2 -0
  326. package/dist/modules/components/richText/markButton/index.js.map +1 -0
  327. package/dist/modules/components/richText/markButton/styles.css +1 -0
  328. package/dist/modules/components/richText/styles.css +67 -0
  329. package/dist/modules/components/richText/toolbar/index.js +2 -0
  330. package/dist/modules/components/richText/toolbar/index.js.map +1 -0
  331. package/dist/modules/components/richText/toolbar/styles.css +1 -0
  332. package/dist/modules/components/searchPlaces.js +2 -0
  333. package/dist/modules/components/searchPlaces.js.map +1 -0
  334. package/dist/modules/components/select/index.js +2 -0
  335. package/dist/modules/components/select/index.js.map +1 -0
  336. package/dist/modules/components/select/selectChevron/index.js +2 -0
  337. package/dist/modules/components/select/selectChevron/index.js.map +1 -0
  338. package/dist/modules/components/select/selectChevron/styles.css +1 -0
  339. package/dist/modules/components/select/selectContainer/index.js +2 -0
  340. package/dist/modules/components/select/selectContainer/index.js.map +1 -0
  341. package/dist/modules/components/select/selectContainer/styles.css +1 -0
  342. package/dist/modules/components/select/selectContent/index.js +2 -0
  343. package/dist/modules/components/select/selectContent/index.js.map +1 -0
  344. package/dist/modules/components/select/selectContent/styles.css +1 -0
  345. package/dist/modules/components/select/selectOption/index.js +2 -0
  346. package/dist/modules/components/select/selectOption/index.js.map +1 -0
  347. package/dist/modules/components/select/selectOption/styles.css +1 -0
  348. package/dist/modules/components/select/selectOptionsContainer/index.js +2 -0
  349. package/dist/modules/components/select/selectOptionsContainer/index.js.map +1 -0
  350. package/dist/modules/components/select/selectOptionsContainer/styles.css +1 -0
  351. package/dist/modules/components/select/selectOverlay/index.js +2 -0
  352. package/dist/modules/components/select/selectOverlay/index.js.map +1 -0
  353. package/dist/modules/components/select/selectOverlay/styles.css +1 -0
  354. package/dist/modules/components/select/selectSpinner/index.js +2 -0
  355. package/dist/modules/components/select/selectSpinner/index.js.map +1 -0
  356. package/dist/modules/components/select/selectSpinner/styles.css +1 -0
  357. package/dist/modules/components/select/styles.css +29 -0
  358. package/dist/modules/components/slider/index.js +2 -0
  359. package/dist/modules/components/slider/index.js.map +1 -0
  360. package/dist/modules/components/slider/styles.css +1 -0
  361. package/dist/modules/components/switch/index.js +2 -0
  362. package/dist/modules/components/switch/index.js.map +1 -0
  363. package/dist/modules/components/switch/styles.css +7 -0
  364. package/dist/modules/components/tab/tabButton/index.js +2 -0
  365. package/dist/modules/components/tab/tabButton/index.js.map +1 -0
  366. package/dist/modules/components/tab/tabButton/styles.css +1 -0
  367. package/dist/modules/components/tab/tabContainer/index.js +2 -0
  368. package/dist/modules/components/tab/tabContainer/index.js.map +1 -0
  369. package/dist/modules/components/tab/tabContainer/styles.css +1 -0
  370. package/dist/modules/components/tab/tabContext.js +20 -9
  371. package/dist/modules/components/tab/tabContext.js.map +1 -0
  372. package/dist/modules/components/table/tableBody/index.js +2 -0
  373. package/dist/modules/components/table/tableBody/index.js.map +1 -0
  374. package/dist/modules/components/table/tableBody/styles.css +1 -0
  375. package/dist/modules/components/table/tableCaption/index.js +2 -0
  376. package/dist/modules/components/table/tableCaption/index.js.map +1 -0
  377. package/dist/modules/components/table/tableCaption/styles.css +1 -0
  378. package/dist/modules/components/table/tableContainer/index.js +2 -0
  379. package/dist/modules/components/table/tableContainer/index.js.map +1 -0
  380. package/dist/modules/components/table/tableContainer/styles.css +1 -0
  381. package/dist/modules/components/table/tableFooter/index.js +2 -0
  382. package/dist/modules/components/table/tableFooter/index.js.map +1 -0
  383. package/dist/modules/components/table/tableFooter/styles.css +1 -0
  384. package/dist/modules/components/table/tableHeader/index.js +2 -0
  385. package/dist/modules/components/table/tableHeader/index.js.map +1 -0
  386. package/dist/modules/components/table/tableHeader/styles.css +1 -0
  387. package/dist/modules/components/textarea/index.js +2 -0
  388. package/dist/modules/components/textarea/index.js.map +1 -0
  389. package/dist/modules/components/textarea/styles.css +7 -0
  390. package/dist/modules/components/tooltip/index.js +2 -0
  391. package/dist/modules/components/tooltip/index.js.map +1 -0
  392. package/dist/modules/components/tooltip/styles.css +1 -0
  393. package/dist/modules/hooks/useAutomation.js +2 -0
  394. package/dist/modules/hooks/useAutomation.js.map +1 -0
  395. package/dist/modules/hooks/useDrawer.js +2 -0
  396. package/dist/modules/hooks/useDrawer.js.map +1 -0
  397. package/dist/modules/hooks/useForm.js +2 -0
  398. package/dist/modules/hooks/useForm.js.map +1 -0
  399. package/dist/modules/hooks/useHydrated.js +2 -0
  400. package/dist/modules/hooks/useHydrated.js.map +1 -0
  401. package/dist/modules/hooks/useModal.js +2 -0
  402. package/dist/modules/hooks/useModal.js.map +1 -0
  403. package/dist/modules/hooks/useScopedParams.js +2 -0
  404. package/dist/modules/hooks/useScopedParams.js.map +1 -0
  405. package/dist/modules/hooks/useScrollLock.js +2 -0
  406. package/dist/modules/hooks/useScrollLock.js.map +1 -0
  407. package/dist/modules/hooks/useSearchAutomation.js +2 -0
  408. package/dist/modules/hooks/useSearchAutomation.js.map +1 -0
  409. package/dist/modules/hooks/useSlider.js +2 -0
  410. package/dist/modules/hooks/useSlider.js.map +1 -0
  411. package/dist/modules/hooks/useToast.js +2 -0
  412. package/dist/modules/hooks/useToast.js.map +1 -0
  413. package/dist/modules/providers/drawerProvider.js +2 -0
  414. package/dist/modules/providers/drawerProvider.js.map +1 -0
  415. package/dist/modules/providers/formProvider.js +11 -9
  416. package/dist/modules/providers/formProvider.js.map +1 -0
  417. package/dist/modules/providers/modalProvider.js +2 -0
  418. package/dist/modules/providers/modalProvider.js.map +1 -0
  419. package/dist/modules/providers/placesProvider.js +2 -0
  420. package/dist/modules/providers/placesProvider.js.map +1 -0
  421. package/dist/modules/providers/toastProvider.js +41 -38
  422. package/dist/modules/providers/toastProvider.js.map +1 -0
  423. package/dist/modules/services/extractTextFromNode.js +2 -0
  424. package/dist/modules/services/extractTextFromNode.js.map +1 -0
  425. package/dist/modules/services/fieldTemplate.js +2 -0
  426. package/dist/modules/services/fieldTemplate.js.map +1 -0
  427. package/dist/modules/services/iconRenderer.js +2 -0
  428. package/dist/modules/services/iconRenderer.js.map +1 -0
  429. package/dist/modules/services/isBlockActive.js +2 -0
  430. package/dist/modules/services/isBlockActive.js.map +1 -0
  431. package/dist/modules/services/isMarkActive.js +2 -0
  432. package/dist/modules/services/isMarkActive.js.map +1 -0
  433. package/dist/modules/services/maskCurrencyValues.js +2 -0
  434. package/dist/modules/services/maskCurrencyValues.js.map +1 -0
  435. package/dist/modules/services/toHtml.js +2 -0
  436. package/dist/modules/services/toHtml.js.map +1 -0
  437. package/dist/modules/services/toRichTextValue.js +2 -0
  438. package/dist/modules/services/toRichTextValue.js.map +1 -0
  439. package/dist/modules/services/toggleBlock.js +2 -0
  440. package/dist/modules/services/toggleBlock.js.map +1 -0
  441. package/dist/modules/services/toggleMark.js +2 -0
  442. package/dist/modules/services/toggleMark.js.map +1 -0
  443. package/dist/modules/templates/badResponses.js +2 -0
  444. package/dist/modules/templates/badResponses.js.map +1 -0
  445. package/dist/modules/templates/richTextTemplates.js +2 -0
  446. package/dist/modules/templates/richTextTemplates.js.map +1 -0
  447. package/dist/modules/templates/successResponses.js +2 -0
  448. package/dist/modules/templates/successResponses.js.map +1 -0
  449. package/dist/modules/utils/phoneInputUtilities.js +2 -0
  450. package/dist/modules/utils/phoneInputUtilities.js.map +1 -0
  451. package/dist/modules/utils/richTextUtilities.js +2 -0
  452. package/dist/modules/utils/richTextUtilities.js.map +1 -0
  453. package/dist/providers/formProvider.d.ts.map +1 -1
  454. package/dist/providers/toastProvider.d.ts.map +1 -1
  455. package/dist/style.css +0 -1
  456. package/package.json +637 -8
  457. package/dist/modules/index.js +0 -72
  458. package/dist/modules/style.css +0 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/radio/radioBox/index.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes } from \"react\";\n\nimport { useRadioGroup } from \"../radioContext\";\nimport \"./styles.css\";\n\ntype RadioBoxProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n\t/** Value submitted to the form when this option is selected. Required. */\n\tvalue: string;\n\t/** Applies error styling. Inherited from `RadioGroup` when not set. */\n\tisError?: boolean;\n\t/** Size variant. Inherits from `RadioGroup` when not set. */\n\tsize?: \"sm\" | \"md\" | \"lg\";\n};\n\n/**\n * RadioBox — individual option inside a `RadioGroup`. Renders as a `<label>` + hidden `<button>` pair.\n *\n * Reads active value, size, error state, and disabled state from `RadioGroup` context.\n * Must be used as a direct child of `RadioGroup`.\n *\n * @param props.value - Option value. Required.\n * @param props.children - Option label content (text, icons, or rich markup).\n * @param props.disabled - Disables this option (group can also disable all options).\n * @param props.size - Size override. Inherits from group by default.\n *\n * **...Other valid HTML `<button>` properties**\n *\n * @returns RadioBox JSX element.\n *\n * @example\n * ```tsx\n * <RadioGroup name=\"plan\" label=\"Choose a plan\" onChange={setPlan}>\n * <RadioBox value=\"basic\">Basic — $9/mo</RadioBox>\n * <RadioBox value=\"pro\">Pro — $29/mo</RadioBox>\n * <RadioBox value=\"enterprise\" disabled>Enterprise — contact us</RadioBox>\n * </RadioGroup>\n * ```\n */\n\nfunction RadioBox(props: RadioBoxProps) {\n\tconst {\n\t\tvalue: componentValue,\n\t\tsize: componentSize,\n\t\tdisabled,\n\t\tchildren,\n\t\tclassName: baseClassName = \"\",\n\t\tonClick,\n\t\tonFocus,\n\t\t...rest\n\t} = props;\n\n\tconst {\n\t\thandleChange,\n\t\tsize: groupSize,\n\t\tvalue,\n\t\tisError,\n\t\tdisabled: groupDisabled,\n\t} = useRadioGroup();\n\n\tconst isChecked = value === componentValue;\n\tconst size = componentSize || groupSize;\n\n\tconst isDisabled = disabled || groupDisabled;\n\n\tconst checkedClass = isChecked ? \"checkedTrue\" : \"checkedFalse\";\n\tconst errorClass = isError ? \"errorTrue\" : \"errorFalse\";\n\tconst disabledClass = isDisabled ? \"disabledTrue\" : \"disabledFalse\";\n\tconst className = `arkynRadioBox ${size} ${checkedClass} ${errorClass} ${disabledClass} ${baseClassName}`;\n\n\tfunction handleClick(event: React.MouseEvent<HTMLButtonElement>) {\n\t\tonClick?.(event);\n\t\thandleChange(componentValue);\n\t}\n\n\tfunction handleFocus(event: React.FocusEvent<HTMLButtonElement>) {\n\t\tonFocus?.(event);\n\t\thandleChange(componentValue);\n\t}\n\n\treturn (\n\t\t<label className={className.trim()}>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tdisabled={isDisabled}\n\t\t\t\tonClick={handleClick}\n\t\t\t\tonFocus={handleFocus}\n\t\t\t\t{...rest}\n\t\t\t/>\n\n\t\t\t{children}\n\t\t</label>\n\t);\n}\n\nexport { RadioBox };\n"],"mappings":";;;;AAuCA,SAAS,EAAS,GAAsB;CACvC,IAAM,EACL,OAAO,GACP,MAAM,GACN,aACA,aACA,WAAW,IAAgB,IAC3B,YACA,YACA,GAAG,MACA,GAEE,EACL,iBACA,MAAM,GACN,UACA,YACA,UAAU,MACP,EAAc,GAEZ,IAAY,MAAU,GACtB,IAAO,KAAiB,GAExB,IAAa,KAAY,GAKzB,IAAY,iBAAiB,EAAK,GAHnB,IAAY,gBAAgB,eAGO,GAFrC,IAAU,cAAc,aAE2B,GADhD,IAAa,iBAAiB,gBACmC,GAAG;CAE1F,SAAS,EAAY,GAA4C;EAEhE,AADA,IAAU,CAAK,GACf,EAAa,CAAc;CAC5B;CAEA,SAAS,EAAY,GAA4C;EAEhE,AADA,IAAU,CAAK,GACf,EAAa,CAAc;CAC5B;CAEA,OACC,kBAAC,SAAD;EAAO,WAAW,EAAU,KAAK;YAAjC,CACC,kBAAC,UAAD;GACC,MAAK;GACL,UAAU;GACV,SAAS;GACT,SAAS;GACT,GAAI;EACJ,CAAA,GAEA,CACK;;AAET"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynRadioBox{color:var(--text-body);align-items:center;gap:8px;font-size:14px;line-height:19.07px;display:flex}.arkynRadioBox>button{background-color:var(--input-background);border:2px solid var(--border);border-radius:99999px;position:relative}.arkynRadioBox>button:not(:disabled):hover{cursor:pointer}.arkynRadioBox.checkedTrue>button{border-color:rgb(var(--spotlight-primary))}.arkynRadioBox.errorTrue>button{border-color:rgb(var(--spotlight-danger))}.arkynRadioBox.checkedTrue>button:before{content:" ";background-color:rgb(var(--spotlight-primary));border-radius:99999px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynRadioBox.sm>button{min-width:20px;max-width:20px;min-height:20px;max-height:20px}.arkynRadioBox.md>button,.arkynRadioBox.lg>button{min-width:24px;max-width:24px;min-height:24px;max-height:24px}.arkynRadioBox.checkedTrue.sm>button:before{min-width:10px;max-width:10px;min-height:10px;max-height:10px}.arkynRadioBox.checkedTrue.md>button:before,.arkynRadioBox.checkedTrue.lg>button:before{min-width:12px;max-width:12px;min-height:12px;max-height:12px}.arkynRadioBox.disabledTrue{opacity:.5}.arkynRadioBox.disabledTrue>button{cursor:not-allowed}}
@@ -20,3 +20,5 @@ function a() {
20
20
  }
21
21
  //#endregion
22
22
  export { i as RadioProvider, a as useRadioGroup };
23
+
24
+ //# sourceMappingURL=radioContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radioContext.js","names":[],"sources":["../../../../src/components/radio/radioContext.tsx"],"sourcesContent":["import { createContext, type ReactNode, useContext } from \"react\";\n\ntype RadioGroupContextType = {\n\tvalue: string;\n\tisError: boolean;\n\tsize: \"sm\" | \"md\" | \"lg\";\n\thandleChange: (value: string) => void;\n\tdisabled: boolean;\n};\n\ntype RadioProviderProps = {\n\tchildren: ReactNode;\n\tisError: boolean;\n\tsize: \"sm\" | \"md\" | \"lg\";\n\tvalue: string;\n\thandleChange: (value: string) => void;\n\tdisabled: boolean;\n};\n\nconst radioContext = createContext({} as RadioGroupContextType);\n\nfunction RadioProvider(props: RadioProviderProps) {\n\tconst { children, size, isError, handleChange, value, disabled } = props;\n\n\treturn (\n\t\t<radioContext.Provider\n\t\t\tvalue={{ handleChange, value, size, isError, disabled }}\n\t\t>\n\t\t\t{children}\n\t\t</radioContext.Provider>\n\t);\n}\n\nfunction useRadioGroup() {\n\treturn useContext(radioContext);\n}\n\nexport { RadioProvider, useRadioGroup };\n"],"mappings":";;;AAmBA,IAAM,IAAe,EAAc,CAAC,CAA0B;AAE9D,SAAS,EAAc,GAA2B;CACjD,IAAM,EAAE,aAAU,SAAM,YAAS,iBAAc,UAAO,gBAAa;CAEnE,OACC,kBAAC,EAAa,UAAd;EACC,OAAO;GAAE;GAAc;GAAO;GAAM;GAAS;EAAS;EAErD;CACqB,CAAA;AAEzB;AAEA,SAAS,IAAgB;CACxB,OAAO,EAAW,CAAY;AAC/B"}
@@ -40,3 +40,5 @@ function o(o) {
40
40
  }
41
41
  //#endregion
42
42
  export { o as RadioGroup };
43
+
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/radio/radioGroup/index.tsx"],"sourcesContent":["import { type HTMLAttributes, useState } from \"react\";\n\nimport { useForm } from \"../../../hooks/useForm\";\nimport { FieldTemplate } from \"../../../services/fieldTemplate\";\n\nimport { RadioProvider } from \"../radioContext\";\nimport \"./styles.css\";\n\ntype RadioGroupProps = Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> & {\n\t/** Field name used for form submission. Required. */\n\tname: string;\n\t/** Label displayed above the group. */\n\tlabel?: string;\n\t/** Appends an asterisk to the label. @default false */\n\tshowAsterisk?: boolean;\n\t/** Error message shown below the group. Overrides `fieldErrors[name]` from `FormProvider`. */\n\terrorMessage?: string;\n\t/** Controlled selected value. */\n\tvalue?: string;\n\t/** Initial selected value (uncontrolled). @default \"\" */\n\tdefaultValue?: string;\n\t/** Callback fired when the selected option changes. */\n\tonChange?: (value: string) => void;\n\t/** Size variant applied to all `RadioBox` children. @default \"md\" */\n\tsize?: \"sm\" | \"md\" | \"lg\";\n\t/** Disables all `RadioBox` children. @default false */\n\tdisabled?: boolean;\n\t/** When `true`, skips the `FieldTemplate` wrapper (label, error message). @default false */\n\tunShowFieldTemplate?: boolean;\n\t/** Layout direction of the `FieldWrapper`. @default \"horizontal\" */\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n};\n\n/**\n * RadioGroup — managed group of `RadioBox` options with form integration.\n *\n * Renders a hidden `<input>` for native form submission. Reads `fieldErrors[name]` from\n * the nearest `FormProvider` when no `errorMessage` is explicitly provided.\n *\n * @param props.name - Form field name. Required.\n * @param props.label - Label displayed above the group.\n * @param props.showAsterisk - Appends `*` to the label. Default: false\n * @param props.value - Controlled selection.\n * @param props.defaultValue - Initial selection (uncontrolled). Default: `\"\"`\n * @param props.onChange - Called with the newly selected value.\n * @param props.size - Size for all child `RadioBox` elements. Default: `\"md\"`\n * @param props.disabled - Disables all options. Default: false\n * @param props.errorMessage - Validation error message.\n * @param props.unShowFieldTemplate - Omit label/error wrapper. Default: false\n *\n * **...Other valid HTML `<div>` properties**\n *\n * @returns RadioGroup JSX element.\n *\n * @example\n * ```tsx\n * // Uncontrolled with label\n * <RadioGroup name=\"gender\" label=\"Gender\" showAsterisk defaultValue=\"male\">\n * <RadioBox value=\"male\">Male</RadioBox>\n * <RadioBox value=\"female\">Female</RadioBox>\n * <RadioBox value=\"other\">Other</RadioBox>\n * </RadioGroup>\n *\n * // Controlled with change handler\n * <RadioGroup name=\"plan\" label=\"Subscription plan\" value={plan} onChange={setPlan}>\n * <RadioBox value=\"basic\">Basic — $9/mo</RadioBox>\n * <RadioBox value=\"pro\">Pro — $29/mo</RadioBox>\n * </RadioGroup>\n * ```\n */\n\nfunction RadioGroup(props: RadioGroupProps) {\n\tconst {\n\t\tdefaultValue = \"\",\n\t\tname,\n\t\tlabel,\n\t\tshowAsterisk,\n\t\terrorMessage: baseErrorMessage,\n\t\tvalue: forceValue,\n\t\tonChange,\n\t\tsize = \"md\",\n\t\tclassName: wrapperClassName = \"\",\n\t\tdisabled = false,\n\t\tunShowFieldTemplate = false,\n\t\torientation = \"vertical\",\n\t\t...rest\n\t} = props;\n\n\tconst [value, setValue] = useState(defaultValue);\n\tconst { fieldErrors } = useForm();\n\n\tfunction handleChange(value: string) {\n\t\tsetValue(value);\n\t\tif (onChange) onChange(value);\n\t}\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = !!errorMessage;\n\tconst className = `arkynRadioGroup ${size}`;\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<RadioProvider\n\t\t\t\tisError={isError}\n\t\t\t\tsize={size}\n\t\t\t\tvalue={forceValue || value}\n\t\t\t\thandleChange={handleChange}\n\t\t\t\tdisabled={disabled}\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tstyle={{ display: \"none\" }}\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\treadOnly\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={forceValue || value}\n\t\t\t\t/>\n\n\t\t\t\t<div className={className.trim()} {...rest} />\n\t\t\t</RadioProvider>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { RadioGroup };\n"],"mappings":";;;;;;;AAuEA,SAAS,EAAW,GAAwB;CAC3C,IAAM,EACL,kBAAe,IACf,SACA,UACA,iBACA,cAAc,GACd,OAAO,GACP,aACA,UAAO,MACP,WAAW,IAAmB,IAC9B,cAAW,IACX,yBAAsB,IACtB,iBAAc,YACd,GAAG,MACA,GAEE,CAAC,GAAO,KAAY,EAAS,CAAY,GACzC,EAAE,mBAAgB,EAAQ;CAEhC,SAAS,EAAa,GAAe;EAEpC,AADA,EAAS,CAAK,GACV,KAAU,EAAS,CAAK;CAC7B;CAEA,IAAM,IAAe,KAAoB,IAAc,IACjD,IAAU,CAAC,CAAC,GACZ,IAAY,mBAAmB;CAErC,OACC,kBAAC,GAAD;EACO;EACC;EACO;EACd,WAAW;EACG;EACO;EACR;YAEb,kBAAC,GAAD;GACU;GACH;GACN,OAAO,KAAc;GACP;GACJ;aALX,CAOC,kBAAC,SAAD;IACC,OAAO,EAAE,SAAS,OAAO;IACzB,MAAK;IACL,UAAA;IACM;IACN,OAAO,KAAc;GACrB,CAAA,GAED,kBAAC,OAAD;IAAK,WAAW,EAAU,KAAK;IAAG,GAAI;GAAO,CAAA,CAC/B;;CACD,CAAA;AAEjB"}
@@ -0,0 +1,7 @@
1
+ @layer arkyn{.arkynRadioGroup{align-items:center;gap:32px;display:flex}}
2
+
3
+ @layer arkyn{.arkynFieldError{color:rgb(var(--spotlight-danger));font-size:12px;font-weight:600;line-height:12px}}
4
+
5
+ @layer arkyn{.arkynFieldLabel{color:var(--text-body);font-size:14px;font-weight:600;line-height:19.07px}.arkynFieldLabel.asteriskTrue:before{content:"* ";text-align:left;color:rgb(var(--spotlight-danger));font-size:12px;font-weight:600;line-height:16.34px}}
6
+
7
+ @layer arkyn{.arkynFieldWrapper{gap:6px;height:max-content;display:flex}.arkynFieldWrapper.horizontal{flex-direction:row;align-items:center}.arkynFieldWrapper.horizontalReverse{flex-direction:row-reverse;align-items:center;margin-right:auto}.arkynFieldWrapper.vertical{flex-direction:column;align-items:flex-start}}
@@ -19,3 +19,5 @@ function a({ format: a, icon: o }) {
19
19
  }
20
20
  //#endregion
21
21
  export { a as BlockButton };
22
+
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/richText/blockButton/index.tsx"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport type { MouseEvent } from \"react\";\nimport { useSlate } from \"slate-react\";\n\nimport { isBlockActive } from \"../../../services/isBlockActive\";\nimport { toggleBlock } from \"../../../services/toggleBlock\";\nimport { textAlignTypes } from \"../../../templates/richTextTemplates\";\nimport type {\n\tRichTextAlignFormatType,\n\tRichTextElementFormatType,\n} from \"../../../types/richTextTypes\";\n\nimport \"./styles.css\";\n\ntype BlockButtonProps = {\n\tformat: RichTextElementFormatType | RichTextAlignFormatType;\n\ticon: LucideIcon;\n};\n\nfunction BlockButton({ format, icon: Icon }: BlockButtonProps) {\n\tconst editor = useSlate();\n\n\tconst blockType = textAlignTypes.includes(format) ? \"align\" : \"type\";\n\tconst isActive = isBlockActive(editor, format, blockType);\n\n\tconst activeClass = isActive ? \"activeTrue\" : \"activeFalse\";\n\n\tfunction handleMouseDown(event: MouseEvent<HTMLButtonElement>) {\n\t\tevent.preventDefault();\n\t\ttoggleBlock(editor, format);\n\t}\n\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName={`arkynRichTextBlockButton ${activeClass}`}\n\t\t\tonMouseDown={handleMouseDown}\n\t\t>\n\t\t\t<Icon />\n\t\t</button>\n\t);\n}\n\nexport { BlockButton };\n"],"mappings":";;;;;;;AAmBA,SAAS,EAAY,EAAE,WAAQ,MAAM,KAA0B;CAC9D,IAAM,IAAS,EAAS,GAKlB,IAFW,EAAc,GAAQ,GADrB,EAAe,SAAS,CAAM,IAAI,UAAU,MAG1C,IAAW,eAAe;CAE9C,SAAS,EAAgB,GAAsC;EAE9D,AADA,EAAM,eAAe,GACrB,EAAY,GAAQ,CAAM;CAC3B;CAEA,OACC,kBAAC,UAAD;EACC,MAAK;EACL,WAAW,4BAA4B;EACvC,aAAa;YAEb,kBAAC,GAAD,CAAO,CAAA;CACA,CAAA;AAEV"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynRichTextBlockButton{background-color:var(--card-foreground-secondary);border:none;border-radius:4px;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.arkynRichTextBlockButton svg{width:20px;height:20px;color:var(--text-heading)}.arkynRichTextBlockButton:hover{cursor:pointer;filter:brightness(.98)}html.dark .arkynRichTextBlockButton:hover{cursor:pointer;filter:brightness(.9)}}
@@ -71,3 +71,5 @@ function n({ attributes: n, children: r, element: i }) {
71
71
  }
72
72
  //#endregion
73
73
  export { n as Element };
74
+
75
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/richText/element/index.tsx"],"sourcesContent":["import type { RenderElementProps } from \"slate-react\";\nimport \"./styles.css\";\n\nfunction Element({ attributes, children, element }: RenderElementProps) {\n\tconst style = { textAlign: element.align };\n\n\tswitch (element.type) {\n\t\tcase \"blockQuote\":\n\t\t\treturn (\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName=\"arkynElementBlockquote\"\n\t\t\t\t\tstyle={style}\n\t\t\t\t\t{...attributes}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</blockquote>\n\t\t\t);\n\t\tcase \"bulletedList\":\n\t\t\treturn (\n\t\t\t\t<ul className=\"arkynElementBulletList\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</ul>\n\t\t\t);\n\t\tcase \"headingOne\":\n\t\t\treturn (\n\t\t\t\t<h1 className=\"arkynElementHeadingOne\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</h1>\n\t\t\t);\n\t\tcase \"headingTwo\":\n\t\t\treturn (\n\t\t\t\t<h2 className=\"arkynElementHeadingTwo\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</h2>\n\t\t\t);\n\t\tcase \"listItem\":\n\t\t\treturn (\n\t\t\t\t<li className=\"arkynElementListItem\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</li>\n\t\t\t);\n\t\tcase \"numberedList\":\n\t\t\treturn (\n\t\t\t\t<ol className=\"arkynElementNumberedList\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</ol>\n\t\t\t);\n\t\tcase \"image\":\n\t\t\treturn (\n\t\t\t\t<div style={style} {...attributes}>\n\t\t\t\t\t<img\n\t\t\t\t\t\tclassName=\"arkynElementImage\"\n\t\t\t\t\t\talt=\"arkynElementImage\"\n\t\t\t\t\t\tsrc={element?.src || \"\"}\n\t\t\t\t\t/>\n\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\t\tcase \"video\":\n\t\t\treturn (\n\t\t\t\t<div style={style} {...attributes}>\n\t\t\t\t\t<iframe\n\t\t\t\t\t\tclassName=\"arkynElementVideo\"\n\t\t\t\t\t\tsrc={element?.src || \"\"}\n\t\t\t\t\t\ttitle=\"YouTube video player\"\n\t\t\t\t\t\tallow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n\t\t\t\t\t\treferrerPolicy=\"strict-origin-when-cross-origin\"\n\t\t\t\t\t\tallowFullScreen\n\t\t\t\t\t/>\n\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<p className=\"arkynElementParagraph\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</p>\n\t\t\t);\n\t}\n}\n\nexport { Element };\n"],"mappings":";;;AAGA,SAAS,EAAQ,EAAE,eAAY,aAAU,cAA+B;CACvE,IAAM,IAAQ,EAAE,WAAW,EAAQ,MAAM;CAEzC,QAAQ,EAAQ,MAAhB;EACC,KAAK,cACJ,OACC,kBAAC,cAAD;GACC,WAAU;GACH;GACP,GAAI;GAEH;EACU,CAAA;EAEd,KAAK,gBACJ,OACC,kBAAC,MAAD;GAAI,WAAU;GAAgC;GAAO,GAAI;GACvD;EACE,CAAA;EAEN,KAAK,cACJ,OACC,kBAAC,MAAD;GAAI,WAAU;GAAgC;GAAO,GAAI;GACvD;EACE,CAAA;EAEN,KAAK,cACJ,OACC,kBAAC,MAAD;GAAI,WAAU;GAAgC;GAAO,GAAI;GACvD;EACE,CAAA;EAEN,KAAK,YACJ,OACC,kBAAC,MAAD;GAAI,WAAU;GAA8B;GAAO,GAAI;GACrD;EACE,CAAA;EAEN,KAAK,gBACJ,OACC,kBAAC,MAAD;GAAI,WAAU;GAAkC;GAAO,GAAI;GACzD;EACE,CAAA;EAEN,KAAK,SACJ,OACC,kBAAC,OAAD;GAAY;GAAO,GAAI;aAAvB,CACC,kBAAC,OAAD;IACC,WAAU;IACV,KAAI;IACJ,KAAK,GAAS,OAAO;GACrB,CAAA,GAEA,CACG;;EAEP,KAAK,SACJ,OACC,kBAAC,OAAD;GAAY;GAAO,GAAI;aAAvB,CACC,kBAAC,UAAD;IACC,WAAU;IACV,KAAK,GAAS,OAAO;IACrB,OAAM;IACN,OAAM;IACN,gBAAe;IACf,iBAAA;GACA,CAAA,GAEA,CACG;;EAGP,SACC,OACC,kBAAC,KAAD;GAAG,WAAU;GAA+B;GAAO,GAAI;GACrD;EACC,CAAA;CAEN;AACD"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynElementBlockquote,.arkynElementBulletList,.arkynElementListItem,.arkynElementNumberedList,.arkynElementParagraph{color:var(--text-body);font-size:14px;font-weight:400}.arkynElementHeadingOne,.arkynElementHeadingTwo{color:var(--text-heading);font-weight:600}.arkynElementHeadingOne{font-size:18px}.arkynElementHeadingTwo{font-size:16px}.arkynElementImage{max-width:100%}}
@@ -140,3 +140,5 @@ function k(k) {
140
140
  }
141
141
  //#endregion
142
142
  export { k as RichText };
143
+
144
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/richText/index.tsx"],"sourcesContent":["import isHotkey from \"is-hotkey\";\nimport {\n\tAlignCenter,\n\tAlignJustify,\n\tAlignLeft,\n\tAlignRight,\n\tBold,\n\tCode,\n\tHeading1,\n\tHeading2,\n\tItalic,\n\tQuote,\n\tUnderline,\n} from \"lucide-react\";\nimport { useCallback, useId, useMemo, useRef, useState } from \"react\";\nimport { createEditor, type Descendant } from \"slate\";\nimport { withHistory } from \"slate-history\";\nimport { Editable, Slate, withReact } from \"slate-react\";\nimport { useForm } from \"../../hooks/useForm\";\nimport { extractTextFromNode } from \"../../services/extractTextFromNode\";\nimport { FieldTemplate } from \"../../services/fieldTemplate\";\nimport { toggleMark } from \"../../services/toggleMark\";\nimport { hotKeys, initialValue } from \"../../templates/richTextTemplates\";\nimport type {\n\tRichTextHiddenButtonKey,\n\tRichTextProps,\n} from \"../../types/richTextTypes\";\nimport { BlockButton } from \"./blockButton\";\nimport { Element } from \"./element\";\nimport { InsertImage } from \"./insertImage\";\nimport { InsertVideo } from \"./insertVideo\";\nimport { Leaf } from \"./leaf\";\nimport { MarkButton } from \"./markButton\";\nimport { Toolbar } from \"./toolbar\";\nimport \"./styles.css\";\n\n/**\n * RichText — WYSIWYG rich-text editor built on Slate.js with a configurable toolbar.\n *\n * **Toolbar features:** bold, italic, underline, code, H1/H2, block quote, alignment (left/center/right/justify), image and video insertion.\n *\n * Editor content is stored as a Slate JSON string in a hidden `<input>` for form submission.\n * Integrates with `useForm` to display validation errors by field name.\n *\n * @param props.name - Field name for form submission. Required.\n * @param props.label - Label text displayed above the editor.\n * @param props.hiddenButtons - Toolbar button keys to hide (e.g. `[\"image\", \"code\"]`).\n * @param props.imageConfig - Enables image insertion; contains the upload endpoint and modal labels.\n * @param props.defaultValue - Initial editor content as a Slate JSON string. Default: \"[]\"\n * @param props.maxLimit - Maximum character count. Default: 10000\n * @param props.enforceCharacterLimit - Prevents typing past `maxLimit`. Default: false\n * @param props.onChangeCharactersCount - Callback fired on every keystroke — receives the current character count.\n * @param props.onChange - Callback fired when editor content changes — receives the Slate `Descendant[]`.\n * @param props.baseErrorMessage - Custom error message (overrides `useForm` context error).\n * @param props.isError - Forces the error visual state.\n * @param props.id - Custom id for the editable area element.\n * @param props.showAsterisk - Appends `*` to the label.\n * @param props.orientation - Layout direction. Default: \"horizontal\"\n * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false\n *\n * @returns RichText JSX element wrapped in `FieldTemplate`.\n *\n * @example\n * ```tsx\n * // Basic\n * <RichText name=\"content\" />\n *\n * // With character limit and hidden toolbar buttons\n * <RichText\n * name=\"description\"\n * label=\"Description\"\n * maxLimit={500}\n * enforceCharacterLimit\n * hiddenButtons={[\"image\", \"video\", \"code\"]}\n * onChangeCharactersCount={(n) => setCharCount(n)}\n * />\n *\n * // With image upload support\n * <RichText\n * name=\"article\"\n * label=\"Article Body\"\n * imageConfig={{ action: \"/api/upload\" }}\n * />\n * ```\n */\n\nfunction RichText(props: RichTextProps) {\n\tconst {\n\t\tname,\n\t\thiddenButtons,\n\t\timageConfig,\n\t\tvideoConfig,\n\t\tclassName: wrapperClassName = \"\",\n\t\tdefaultValue = \"[]\",\n\t\tenforceCharacterLimit = false,\n\t\tonChangeCharactersCount,\n\t\tbaseErrorMessage,\n\t\tmaxLimit = 10000,\n\t\tonChange,\n\t\tisError: baseIsError,\n\t\tlabel,\n\t\tshowAsterisk,\n\t\tid,\n\t\torientation = \"vertical\",\n\t\tunShowFieldTemplate = false,\n\t} = props;\n\n\tconst editor = useMemo(() => withHistory(withReact(createEditor())), []);\n\n\tconst { fieldErrors } = useForm();\n\n\tconst defaultNodes = useMemo((): Descendant[] => {\n\t\ttry {\n\t\t\tconst parsedNodes = JSON.parse(defaultValue);\n\t\t\tif (!Array.isArray(parsedNodes) || parsedNodes.length === 0) {\n\t\t\t\treturn structuredClone(initialValue);\n\t\t\t}\n\n\t\t\tconst isValidNodes = parsedNodes.every(\n\t\t\t\t(node) =>\n\t\t\t\t\ttypeof node === \"object\" &&\n\t\t\t\t\tnode !== null &&\n\t\t\t\t\t\"type\" in node &&\n\t\t\t\t\t\"children\" in node,\n\t\t\t);\n\n\t\t\treturn isValidNodes ? parsedNodes : structuredClone(initialValue);\n\t\t} catch (_error) {\n\t\t\treturn structuredClone(initialValue);\n\t\t}\n\t}, [defaultValue]);\n\n\tconst textFromNodes = extractTextFromNode(defaultNodes);\n\n\tconst [charactersCount, setCharactersCount] = useState(textFromNodes.length);\n\tconst [inputValue, setInputValue] = useState(\n\t\tJSON.stringify(defaultNodes) || \"[]\",\n\t);\n\n\tconst [onFocus, setOnFocus] = useState(false);\n\n\tconst ref = useRef<HTMLInputElement>(null);\n\tconst generatedId = useId();\n\tconst inputId = id || generatedId;\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = baseIsError || !!errorMessage;\n\n\tconst renderLeaf = useCallback(Leaf, []);\n\tconst renderElement = useCallback(Element, []);\n\n\tfunction handleChange(value: Descendant[]) {\n\t\tconst text = extractTextFromNode(value);\n\n\t\tsetCharactersCount(text.length);\n\t\tonChangeCharactersCount?.(text.length);\n\n\t\tif (enforceCharacterLimit && text.length >= maxLimit) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetInputValue(JSON.stringify(value));\n\t\tonChange?.(value);\n\t}\n\n\tconst focusClass = onFocus ? \"focusTrue\" : \"focusFalse\";\n\tconst errorClass = isError\n\t\t? \"errorTrue\"\n\t\t: maxLimit < charactersCount\n\t\t\t? \"errorTrue\"\n\t\t\t: \"errorFalse\";\n\n\tconst className = `arkynRichText ${errorClass} ${focusClass}`;\n\n\tconst restatesCharacters = maxLimit - charactersCount;\n\n\tfunction buttonIsNotHidden(format: RichTextHiddenButtonKey) {\n\t\treturn !hiddenButtons?.includes(format);\n\t}\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<Slate\n\t\t\t\teditor={editor}\n\t\t\t\tinitialValue={defaultNodes}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tonValueChange={handleChange}\n\t\t\t>\n\t\t\t\t<div className={className}>\n\t\t\t\t\t<Toolbar>\n\t\t\t\t\t\t{buttonIsNotHidden(\"headingOne\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"headingOne\" icon={Heading1} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"headingTwo\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"headingTwo\" icon={Heading2} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"blockQuote\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"blockQuote\" icon={Quote} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"bold\") && (\n\t\t\t\t\t\t\t<MarkButton format=\"bold\" icon={Bold} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"italic\") && (\n\t\t\t\t\t\t\t<MarkButton format=\"italic\" icon={Italic} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"underline\") && (\n\t\t\t\t\t\t\t<MarkButton format=\"underline\" icon={Underline} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"code\") && (\n\t\t\t\t\t\t\t<MarkButton format=\"code\" icon={Code} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"left\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"left\" icon={AlignLeft} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"right\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"right\" icon={AlignRight} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"center\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"center\" icon={AlignCenter} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"justify\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"justify\" icon={AlignJustify} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{imageConfig && buttonIsNotHidden(\"image\") && (\n\t\t\t\t\t\t\t<InsertImage {...imageConfig} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"video\") && <InsertVideo {...videoConfig} />}\n\t\t\t\t\t</Toolbar>\n\n\t\t\t\t\t<Editable\n\t\t\t\t\t\tclassName=\"editorContainer\"\n\t\t\t\t\t\trenderElement={renderElement}\n\t\t\t\t\t\trenderLeaf={renderLeaf}\n\t\t\t\t\t\tspellCheck\n\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\tid={inputId}\n\t\t\t\t\t\tonFocus={() => setOnFocus(true)}\n\t\t\t\t\t\tonBlur={() => setOnFocus(false)}\n\t\t\t\t\t\tonKeyDown={(event) => {\n\t\t\t\t\t\t\tfor (const hotkey in hotKeys) {\n\t\t\t\t\t\t\t\t// biome-ignore lint/suspicious/noExplicitAny: intentional\n\t\t\t\t\t\t\t\tif (isHotkey(hotkey, event as any)) {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tconst mark = hotKeys[hotkey as keyof typeof hotKeys];\n\t\t\t\t\t\t\t\t\ttoggleMark(editor, mark);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\n\t\t\t\t\t{restatesCharacters < 0 && (\n\t\t\t\t\t\t<div className=\"restatesCharacters\">{restatesCharacters}</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<input\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={inputValue.slice(0, maxLimit)}\n\t\t\t\t/>\n\n\t\t\t\t<input type=\"hidden\" name={`${name}Count`} value={charactersCount} />\n\t\t\t</Slate>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { RichText };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsFA,SAAS,EAAS,GAAsB;CACvC,IAAM,EACL,SACA,kBACA,gBACA,gBACA,WAAW,IAAmB,IAC9B,kBAAe,MACf,2BAAwB,IACxB,4BACA,qBACA,cAAW,KACX,aACA,SAAS,GACT,WACA,iBACA,OACA,iBAAc,YACd,yBAAsB,OACnB,GAEE,IAAS,QAAc,EAAY,EAAU,EAAa,CAAC,CAAC,GAAG,CAAC,CAAC,GAEjE,EAAE,oBAAgB,EAAQ,GAE1B,IAAe,QAA4B;EAChD,IAAI;GACH,IAAM,IAAc,KAAK,MAAM,CAAY;GAa3C,OAZI,CAAC,MAAM,QAAQ,CAAW,KAAK,EAAY,WAAW,IAClD,gBAAgB,CAAY,IAGf,EAAY,OAC/B,MACA,OAAO,KAAS,cAChB,KACA,UAAU,KACV,cAAc,CAGT,IAAe,IAAc,gBAAgB,CAAY;EACjE,QAAiB;GAChB,OAAO,gBAAgB,CAAY;EACpC;CACD,GAAG,CAAC,CAAY,CAAC,GAIX,CAAC,GAAiB,MAAsB,EAFxB,EAAoB,CAEa,CAAA,CAAc,MAAM,GACrE,CAAC,IAAY,MAAiB,EACnC,KAAK,UAAU,CAAY,KAAK,IACjC,GAEM,CAAC,IAAS,KAAc,EAAS,EAAK,GAEtC,KAAM,EAAyB,IAAI,GACnC,KAAc,GAAM,GACpB,KAAU,KAAM,IAEhB,IAAe,KAAoB,KAAc,IACjD,KAAU,KAAe,CAAC,CAAC,GAE3B,KAAa,EAAY,GAAM,CAAC,CAAC,GACjC,KAAgB,EAAY,GAAS,CAAC,CAAC;CAE7C,SAAS,EAAa,GAAqB;EAC1C,IAAM,IAAO,EAAoB,CAAK;EAEtC,GAAmB,EAAK,MAAM,GAC9B,IAA0B,EAAK,MAAM,GAEjC,OAAyB,EAAK,UAAU,OAI5C,GAAc,KAAK,UAAU,CAAK,CAAC,GACnC,IAAW,CAAK;CACjB;CASA,IAAM,KAAY,iBANC,MAEhB,IAAW,IADX,cAGC,aAE0C,GAP3B,KAAU,cAAc,gBASrC,IAAqB,IAAW;CAEtC,SAAS,EAAkB,GAAiC;EAC3D,OAAO,CAAC,GAAe,SAAS,CAAM;CACvC;CAEA,OACC,kBAAC,GAAD;EACO;EACC;EACO;EACd,WAAW;EACG;EACO;EACR;YAEb,kBAAC,GAAD;GACS;GACR,cAAc;GACd,UAAU;GACV,eAAe;aAJhB;IAMC,kBAAC,OAAD;KAAgB;eAAhB;MACC,kBAAC,IAAD,EAAA,UAAA;OACE,EAAkB,YAAY,KAC9B,kBAAC,GAAD;QAAa,QAAO;QAAa,MAAM;OAAW,CAAA;OAGlD,EAAkB,YAAY,KAC9B,kBAAC,GAAD;QAAa,QAAO;QAAa,MAAM;OAAW,CAAA;OAGlD,EAAkB,YAAY,KAC9B,kBAAC,GAAD;QAAa,QAAO;QAAa,MAAM;OAAQ,CAAA;OAG/C,EAAkB,MAAM,KACxB,kBAAC,GAAD;QAAY,QAAO;QAAO,MAAM;OAAO,CAAA;OAGvC,EAAkB,QAAQ,KAC1B,kBAAC,GAAD;QAAY,QAAO;QAAS,MAAM;OAAS,CAAA;OAG3C,EAAkB,WAAW,KAC7B,kBAAC,GAAD;QAAY,QAAO;QAAY,MAAM;OAAY,CAAA;OAGjD,EAAkB,MAAM,KACxB,kBAAC,GAAD;QAAY,QAAO;QAAO,MAAM;OAAO,CAAA;OAGvC,EAAkB,MAAM,KACxB,kBAAC,GAAD;QAAa,QAAO;QAAO,MAAM;OAAY,CAAA;OAG7C,EAAkB,OAAO,KACzB,kBAAC,GAAD;QAAa,QAAO;QAAQ,MAAM;OAAa,CAAA;OAG/C,EAAkB,QAAQ,KAC1B,kBAAC,GAAD;QAAa,QAAO;QAAS,MAAM;OAAc,CAAA;OAGjD,EAAkB,SAAS,KAC3B,kBAAC,GAAD;QAAa,QAAO;QAAU,MAAM;OAAe,CAAA;OAGnD,KAAe,EAAkB,OAAO,KACxC,kBAAC,GAAD,EAAa,GAAI,EAAc,CAAA;OAG/B,EAAkB,OAAO,KAAK,kBAAC,GAAD,EAAa,GAAI,EAAc,CAAA;MACtD,EAAA,CAAA;MAET,kBAAC,GAAD;OACC,WAAU;OACK;OACH;OACZ,YAAA;OACK;OACL,IAAI;OACJ,eAAe,EAAW,EAAI;OAC9B,cAAc,EAAW,EAAK;OAC9B,YAAY,MAAU;QACrB,KAAK,IAAM,KAAU,GAEpB,IAAI,EAAS,GAAQ,CAAY,GAAG;SACnC,EAAM,eAAe;SACrB,IAAM,IAAO,EAAQ;SACrB,EAAW,GAAQ,CAAI;QACxB;OAEF;MACA,CAAA;MAEA,IAAqB,KACrB,kBAAC,OAAD;OAAK,WAAU;iBAAsB;MAAwB,CAAA;KAE1D;;IAEL,kBAAC,SAAD;KACC,MAAK;KACC;KACN,OAAO,GAAW,MAAM,GAAG,CAAQ;IACnC,CAAA;IAED,kBAAC,SAAD;KAAO,MAAK;KAAS,MAAM,GAAG,EAAK;KAAQ,OAAO;IAAkB,CAAA;GAC9D;;CACO,CAAA;AAEjB"}
@@ -93,3 +93,5 @@ function m(m) {
93
93
  }
94
94
  //#endregion
95
95
  export { m as InsertImage };
96
+
97
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/richText/insertImage/index.tsx"],"sourcesContent":["import { Image } from \"lucide-react\";\nimport { type MouseEvent, useState } from \"react\";\nimport { useSlate } from \"slate-react\";\n\nimport type { RichTextInsertImageProps } from \"../../../types/richTextTypes\";\n\nimport { Button } from \"../../button\";\nimport { ImageUpload } from \"../../imageUpload\";\nimport { Input } from \"../../input\";\nimport { ModalContainer } from \"../../modal/modalContainer\";\nimport { ModalFooter } from \"../../modal/modalFooter\";\nimport { ModalHeader } from \"../../modal/modalHeader\";\nimport { TabButton } from \"../../tab/tabButton\";\nimport { TabContainer } from \"../../tab/tabContainer\";\n\nimport \"./styles.css\";\n\nfunction InsertImage(props: RichTextInsertImageProps) {\n\tconst {\n\t\taction,\n\t\ttabLabels = [\"Adicionar URL\", \"Upload de arquivo\"],\n\t\tmodalCancelButton = \"Cancelar\",\n\t\tmodalConfirmButton = \"Confirmar\",\n\t\tmodalInputImageLabel = \"Imagem:\",\n\t\tmodalInputUrlLabel = \"URL da imagem:\",\n\t\tmodalTitle = \"Inserir imagem\",\n\t} = props;\n\n\tconst editor = useSlate();\n\n\tconst [modalIsVisible, setModalIsVisible] = useState(false);\n\tconst [imageURL, setImageURL] = useState(\"\");\n\tconst [uploadType, setUploadType] = useState(\"url\");\n\n\tfunction handleMouseDown(event: MouseEvent<HTMLButtonElement>) {\n\t\tevent.preventDefault();\n\t\tif (!imageURL || imageURL === \"\") return;\n\n\t\teditor.insertNodes([\n\t\t\t{ type: \"paragraph\", children: [{ text: \"\" }] },\n\t\t\t{ type: \"image\", src: imageURL, children: [{ text: \"\" }] },\n\t\t\t{ type: \"paragraph\", children: [{ text: \"\" }] },\n\t\t]);\n\n\t\tsetModalIsVisible(false);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclassName=\"arkynRichTextInsertImage\"\n\t\t\t\tonMouseDown={() => setModalIsVisible(true)}\n\t\t\t>\n\t\t\t\t<Image />\n\t\t\t</button>\n\n\t\t\t<ModalContainer\n\t\t\t\tisVisible={modalIsVisible}\n\t\t\t\tmakeInvisible={() => setModalIsVisible(false)}\n\t\t\t>\n\t\t\t\t<ModalHeader>{modalTitle}</ModalHeader>\n\n\t\t\t\t<div className=\"arkynRichTextInsertImageModalContent\">\n\t\t\t\t\t<TabContainer defaultValue={uploadType} onChange={setUploadType}>\n\t\t\t\t\t\t<TabButton value=\"url\">{tabLabels[0]}</TabButton>\n\t\t\t\t\t\t<TabButton value=\"file\">{tabLabels[1]}</TabButton>\n\t\t\t\t\t</TabContainer>\n\n\t\t\t\t\t{uploadType === \"url\" && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tname=\"richTextImageURL\"\n\t\t\t\t\t\t\t\tlabel={modalInputUrlLabel}\n\t\t\t\t\t\t\t\tshowAsterisk\n\t\t\t\t\t\t\t\tdefaultValue={imageURL}\n\t\t\t\t\t\t\t\tonChange={(e) => setImageURL(e.target.value)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{imageURL && (\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tclassName=\"arkynRichTextInsertImageModalPreviewImage\"\n\t\t\t\t\t\t\t\t\tsrc={imageURL}\n\t\t\t\t\t\t\t\t\talt=\"preview\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{uploadType === \"file\" && (\n\t\t\t\t\t\t<ImageUpload\n\t\t\t\t\t\t\tname=\"richTextImageURL\"\n\t\t\t\t\t\t\taction={action}\n\t\t\t\t\t\t\tlabel={modalInputImageLabel}\n\t\t\t\t\t\t\tshowAsterisk\n\t\t\t\t\t\t\tdefaultValue={imageURL}\n\t\t\t\t\t\t\tonChange={(url) => setImageURL(url)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<ModalFooter>\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tscheme=\"danger\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => setModalIsVisible(false)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{modalCancelButton}\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<Button type=\"button\" onClick={handleMouseDown}>\n\t\t\t\t\t\t{modalConfirmButton}\n\t\t\t\t\t</Button>\n\t\t\t\t</ModalFooter>\n\t\t\t</ModalContainer>\n\t\t</>\n\t);\n}\n\nexport { InsertImage };\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAS,EAAY,GAAiC;CACrD,IAAM,EACL,WACA,eAAY,CAAC,iBAAiB,mBAAmB,GACjD,uBAAoB,YACpB,wBAAqB,aACrB,0BAAuB,WACvB,wBAAqB,kBACrB,gBAAa,qBACV,GAEE,IAAS,EAAS,GAElB,CAAC,GAAgB,KAAqB,EAAS,EAAK,GACpD,CAAC,GAAU,KAAe,EAAS,EAAE,GACrC,CAAC,GAAY,KAAiB,EAAS,KAAK;CAElD,SAAS,EAAgB,GAAsC;EAC9D,EAAM,eAAe,GACjB,GAAC,KAAY,MAAa,QAE9B,EAAO,YAAY;GAClB;IAAE,MAAM;IAAa,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC;GAAE;GAC9C;IAAE,MAAM;IAAS,KAAK;IAAU,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC;GAAE;GACzD;IAAE,MAAM;IAAa,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC;GAAE;EAC/C,CAAC,GAED,EAAkB,EAAK;CACxB;CAEA,OACC,kBAAA,GAAA,EAAA,UAAA,CACC,kBAAC,UAAD;EACC,MAAK;EACL,WAAU;EACV,mBAAmB,EAAkB,EAAI;YAEzC,kBAAC,GAAD,CAAQ,CAAA;CACD,CAAA,GAER,kBAAC,GAAD;EACC,WAAW;EACX,qBAAqB,EAAkB,EAAK;YAF7C;GAIC,kBAAC,GAAD,EAAA,UAAc,EAAwB,CAAA;GAEtC,kBAAC,OAAD;IAAK,WAAU;cAAf;KACC,kBAAC,GAAD;MAAc,cAAc;MAAY,UAAU;gBAAlD,CACC,kBAAC,GAAD;OAAW,OAAM;iBAAO,EAAU;MAAc,CAAA,GAChD,kBAAC,GAAD;OAAW,OAAM;iBAAQ,EAAU;MAAc,CAAA,CACpC;;KAEb,MAAe,SACf,kBAAA,GAAA,EAAA,UAAA,CACC,kBAAC,GAAD;MACC,MAAK;MACL,MAAK;MACL,OAAO;MACP,cAAA;MACA,cAAc;MACd,WAAW,MAAM,EAAY,EAAE,OAAO,KAAK;KAC3C,CAAA,GAEA,KACA,kBAAC,OAAD;MACC,WAAU;MACV,KAAK;MACL,KAAI;KACJ,CAAA,CAED,EAAA,CAAA;KAGF,MAAe,UACf,kBAAC,GAAD;MACC,MAAK;MACG;MACR,OAAO;MACP,cAAA;MACA,cAAc;MACd,WAAW,MAAQ,EAAY,CAAG;KAClC,CAAA;IAEE;;GAEL,kBAAC,GAAD,EAAA,UAAA,CACC,kBAAC,GAAD;IACC,MAAK;IACL,QAAO;IACP,SAAQ;IACR,eAAe,EAAkB,EAAK;cAErC;GACM,CAAA,GAER,kBAAC,GAAD;IAAQ,MAAK;IAAS,SAAS;cAC7B;GACM,CAAA,CACI,EAAA,CAAA;EACE;GACf,EAAA,CAAA;AAEJ"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynRichTextInsertImage{background-color:var(--card-foreground-secondary);border:none;border-radius:4px;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.arkynRichTextInsertImage svg{width:20px;height:20px;color:var(--text-heading)}.arkynRichTextInsertImage:hover{cursor:pointer;filter:brightness(.98)}.arkynRichTextInsertImageModalContent{flex-direction:column;gap:16px;width:500px;padding:16px;display:flex}.arkynRichTextInsertImageModalPreviewImage{border-radius:var(--rounded-cards);width:100%}.arkynRichTextInsertImageModalContent .arkynImageUpload{min-height:174px}html.dark .arkynRichTextInsertImage:hover{cursor:pointer;filter:brightness(.9)}}
@@ -84,3 +84,5 @@ function f(f) {
84
84
  }
85
85
  //#endregion
86
86
  export { f as InsertVideo };
87
+
88
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/richText/insertVideo/index.tsx"],"sourcesContent":["import { Video } from \"lucide-react\";\nimport { type MouseEvent, useEffect, useState } from \"react\";\nimport { useSlate } from \"slate-react\";\n\nimport type { RichTextInsertVideoProps } from \"../../../types/richTextTypes\";\n\nimport { Button } from \"../../button\";\nimport { Input } from \"../../input\";\nimport { ModalContainer } from \"../../modal/modalContainer\";\nimport { ModalFooter } from \"../../modal/modalFooter\";\nimport { ModalHeader } from \"../../modal/modalHeader\";\n\nimport \"./styles.css\";\n\nfunction InsertVideo(props: RichTextInsertVideoProps) {\n\tconst {\n\t\tmodalCancelButton = \"Cancelar\",\n\t\tmodalConfirmButton = \"Confirmar\",\n\t\tmodalInputUrlLabel = \"URL do vídeo:\",\n\t\tmodalTitle = \"Inserir vídeo\",\n\t\tinvalidUrlMessage = \"URL inválida\",\n\t} = props;\n\n\tconst editor = useSlate();\n\n\tconst [modalIsVisible, setModalIsVisible] = useState(false);\n\tconst [videoId, setVideoId] = useState(\"\");\n\tconst [videoRawURL, setVideoRawURL] = useState(\"\");\n\tconst [errorMessage, setErrorMessage] = useState(\"\");\n\n\tfunction handleMouseDown(event: MouseEvent<HTMLButtonElement>) {\n\t\tevent.preventDefault();\n\n\t\tif (!videoId || videoId === \"\") return;\n\t\tconst videoUrl = `https://www.youtube.com/embed/${videoId}`;\n\n\t\teditor.insertNodes([\n\t\t\t{ type: \"paragraph\", children: [{ text: \"\" }] },\n\t\t\t{ type: \"video\", src: videoUrl, children: [{ text: \"\" }] },\n\t\t\t{ type: \"paragraph\", children: [{ text: \"\" }] },\n\t\t]);\n\n\t\tsetModalIsVisible(false);\n\t}\n\n\tuseEffect(() => {\n\t\tif (!videoRawURL || videoRawURL === \"\") return;\n\n\t\tsetVideoId(\"\");\n\t\tsetErrorMessage(\"\");\n\n\t\tconst searchParams = new URLSearchParams(videoRawURL.split(\"?\")[1]);\n\t\tconst vParam = searchParams.get(\"v\");\n\t\tif (vParam) setVideoId(vParam);\n\t\telse setErrorMessage(invalidUrlMessage);\n\t}, [videoRawURL, invalidUrlMessage]);\n\n\tuseEffect(() => {\n\t\tif (!modalIsVisible) {\n\t\t\tsetVideoId(\"\");\n\t\t\tsetVideoRawURL(\"\");\n\t\t\tsetErrorMessage(\"\");\n\t\t}\n\t}, [modalIsVisible]);\n\n\treturn (\n\t\t<>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclassName=\"arkynRichTextInsertVideo\"\n\t\t\t\tonMouseDown={() => setModalIsVisible(true)}\n\t\t\t>\n\t\t\t\t<Video />\n\t\t\t</button>\n\n\t\t\t<ModalContainer\n\t\t\t\tisVisible={modalIsVisible}\n\t\t\t\tmakeInvisible={() => setModalIsVisible(false)}\n\t\t\t>\n\t\t\t\t<ModalHeader>{modalTitle}</ModalHeader>\n\n\t\t\t\t<div className=\"arkynRichTextInsertVideoModalContent\">\n\t\t\t\t\t<Input\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tname=\"richTextVideoURL\"\n\t\t\t\t\t\tlabel={modalInputUrlLabel}\n\t\t\t\t\t\tshowAsterisk\n\t\t\t\t\t\tdefaultValue={videoRawURL}\n\t\t\t\t\t\tonChange={(e) => setVideoRawURL(e.target.value)}\n\t\t\t\t\t\terrorMessage={errorMessage}\n\t\t\t\t\t/>\n\n\t\t\t\t\t{videoId && (\n\t\t\t\t\t\t<iframe\n\t\t\t\t\t\t\twidth=\"auto\"\n\t\t\t\t\t\t\theight=\"315\"\n\t\t\t\t\t\t\tsrc={`https://www.youtube.com/embed/${videoId}`}\n\t\t\t\t\t\t\ttitle=\"YouTube video player\"\n\t\t\t\t\t\t\tallow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n\t\t\t\t\t\t\treferrerPolicy=\"strict-origin-when-cross-origin\"\n\t\t\t\t\t\t\tallowFullScreen\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<ModalFooter>\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tscheme=\"danger\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => setModalIsVisible(false)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{modalCancelButton}\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<Button disabled={!videoId} type=\"button\" onClick={handleMouseDown}>\n\t\t\t\t\t\t{modalConfirmButton}\n\t\t\t\t\t</Button>\n\t\t\t\t</ModalFooter>\n\t\t\t</ModalContainer>\n\t\t</>\n\t);\n}\n\nexport { InsertVideo };\n"],"mappings":";;;;;;;;;;;AAcA,SAAS,EAAY,GAAiC;CACrD,IAAM,EACL,uBAAoB,YACpB,wBAAqB,aACrB,wBAAqB,iBACrB,gBAAa,iBACb,uBAAoB,mBACjB,GAEE,IAAS,EAAS,GAElB,CAAC,GAAgB,KAAqB,EAAS,EAAK,GACpD,CAAC,GAAS,KAAc,EAAS,EAAE,GACnC,CAAC,GAAa,KAAkB,EAAS,EAAE,GAC3C,CAAC,GAAc,KAAmB,EAAS,EAAE;CAEnD,SAAS,EAAgB,GAAsC;EAG9D,IAFA,EAAM,eAAe,GAEjB,CAAC,KAAW,MAAY,IAAI;EAChC,IAAM,IAAW,iCAAiC;EAQlD,AANA,EAAO,YAAY;GAClB;IAAE,MAAM;IAAa,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC;GAAE;GAC9C;IAAE,MAAM;IAAS,KAAK;IAAU,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC;GAAE;GACzD;IAAE,MAAM;IAAa,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC;GAAE;EAC/C,CAAC,GAED,EAAkB,EAAK;CACxB;CAsBA,OApBA,QAAgB;EACf,IAAI,CAAC,KAAe,MAAgB,IAAI;EAGxC,AADA,EAAW,EAAE,GACb,EAAgB,EAAE;EAGlB,IAAM,IAAS,IADU,gBAAgB,EAAY,MAAM,GAAG,CAAC,CAAC,EACjD,CAAA,CAAa,IAAI,GAAG;EACnC,AAAI,IAAQ,EAAW,CAAM,IACxB,EAAgB,CAAiB;CACvC,GAAG,CAAC,GAAa,CAAiB,CAAC,GAEnC,QAAgB;EACf,AAAK,MACJ,EAAW,EAAE,GACb,EAAe,EAAE,GACjB,EAAgB,EAAE;CAEpB,GAAG,CAAC,CAAc,CAAC,GAGlB,kBAAA,GAAA,EAAA,UAAA,CACC,kBAAC,UAAD;EACC,MAAK;EACL,WAAU;EACV,mBAAmB,EAAkB,EAAI;YAEzC,kBAAC,GAAD,CAAQ,CAAA;CACD,CAAA,GAER,kBAAC,GAAD;EACC,WAAW;EACX,qBAAqB,EAAkB,EAAK;YAF7C;GAIC,kBAAC,GAAD,EAAA,UAAc,EAAwB,CAAA;GAEtC,kBAAC,OAAD;IAAK,WAAU;cAAf,CACC,kBAAC,GAAD;KACC,MAAK;KACL,MAAK;KACL,OAAO;KACP,cAAA;KACA,cAAc;KACd,WAAW,MAAM,EAAe,EAAE,OAAO,KAAK;KAChC;IACd,CAAA,GAEA,KACA,kBAAC,UAAD;KACC,OAAM;KACN,QAAO;KACP,KAAK,iCAAiC;KACtC,OAAM;KACN,OAAM;KACN,gBAAe;KACf,iBAAA;IACA,CAAA,CAEE;;GAEL,kBAAC,GAAD,EAAA,UAAA,CACC,kBAAC,GAAD;IACC,MAAK;IACL,QAAO;IACP,SAAQ;IACR,eAAe,EAAkB,EAAK;cAErC;GACM,CAAA,GAER,kBAAC,GAAD;IAAQ,UAAU,CAAC;IAAS,MAAK;IAAS,SAAS;cACjD;GACM,CAAA,CACI,EAAA,CAAA;EACE;GACf,EAAA,CAAA;AAEJ"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynRichTextInsertVideo{background-color:var(--card-foreground-secondary);border:none;border-radius:4px;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.arkynRichTextInsertVideo svg{width:20px;height:20px;color:var(--text-heading)}.arkynRichTextInsertVideo:hover{cursor:pointer;filter:brightness(.98)}.arkynRichTextInsertVideoModalContent{flex-direction:column;gap:16px;width:500px;padding:16px;display:flex}.arkynRichTextInsertVideoModalPreviewVideo{border-radius:var(--rounded-cards);width:100%}.arkynRichTextInsertVideoModalContent .arkynVideoUpload{min-height:174px}html.dark .arkynRichTextInsertVideo:hover{cursor:pointer;filter:brightness(.9)}}
@@ -8,3 +8,5 @@ function t({ attributes: t, children: n, leaf: r }) {
8
8
  }
9
9
  //#endregion
10
10
  export { t as Leaf };
11
+
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/richText/leaf/index.tsx"],"sourcesContent":["import type { RenderLeafProps } from \"slate-react\";\n\nfunction Leaf({ attributes, children, leaf }: RenderLeafProps) {\n\tif (leaf.bold) children = <strong>{children}</strong>;\n\tif (leaf.code) children = <code>{children}</code>;\n\tif (leaf.italic) children = <em>{children}</em>;\n\tif (leaf.underline) children = <u>{children}</u>;\n\n\treturn <span {...attributes}>{children}</span>;\n}\n\nexport { Leaf };\n"],"mappings":";;AAEA,SAAS,EAAK,EAAE,eAAY,aAAU,WAAyB;CAM9D,OALI,EAAK,SAAM,IAAW,kBAAC,UAAD,EAAS,YAAiB,CAAA,IAChD,EAAK,SAAM,IAAW,kBAAC,QAAD,EAAO,YAAe,CAAA,IAC5C,EAAK,WAAQ,IAAW,kBAAC,MAAD,EAAK,YAAa,CAAA,IAC1C,EAAK,cAAW,IAAW,kBAAC,KAAD,EAAI,YAAY,CAAA,IAExC,kBAAC,QAAD;EAAM,GAAI;EAAa;CAAe,CAAA;AAC9C"}
@@ -18,3 +18,5 @@ function i({ format: i, icon: a }) {
18
18
  }
19
19
  //#endregion
20
20
  export { i as MarkButton };
21
+
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/richText/markButton/index.tsx"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport type { MouseEvent } from \"react\";\nimport { useSlate } from \"slate-react\";\n\nimport { isMarkActive } from \"../../../services/isMarkActive\";\nimport { toggleMark } from \"../../../services/toggleMark\";\nimport type { RichTextMarkFormatType } from \"../../../types/richTextTypes\";\n\nimport \"./styles.css\";\n\ntype MarkButtonProps = {\n\tformat: RichTextMarkFormatType;\n\ticon: LucideIcon;\n};\n\nfunction MarkButton({ format, icon: Icon }: MarkButtonProps) {\n\tconst editor = useSlate();\n\n\tconst isActive = isMarkActive(editor, format);\n\tconst activeClass = isActive ? \"activeTrue\" : \"activeFalse\";\n\n\tfunction handleMouseDown(event: MouseEvent<HTMLButtonElement>) {\n\t\tevent.preventDefault();\n\t\ttoggleMark(editor, format);\n\t}\n\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName={`arkynRichTextMarkButton ${activeClass}`}\n\t\t\tonMouseDown={handleMouseDown}\n\t\t>\n\t\t\t<Icon />\n\t\t</button>\n\t);\n}\n\nexport { MarkButton };\n"],"mappings":";;;;;;AAeA,SAAS,EAAW,EAAE,WAAQ,MAAM,KAAyB;CAC5D,IAAM,IAAS,EAAS,GAGlB,IADW,EAAa,GAAQ,CAClB,IAAW,eAAe;CAE9C,SAAS,EAAgB,GAAsC;EAE9D,AADA,EAAM,eAAe,GACrB,EAAW,GAAQ,CAAM;CAC1B;CAEA,OACC,kBAAC,UAAD;EACC,MAAK;EACL,WAAW,2BAA2B;EACtC,aAAa;YAEb,kBAAC,GAAD,CAAO,CAAA;CACA,CAAA;AAEV"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynRichTextMarkButton{background-color:var(--card-foreground-secondary);border:none;border-radius:4px;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.arkynRichTextMarkButton svg{width:20px;height:20px;color:var(--text-heading)}.arkynRichTextMarkButton:hover{cursor:pointer;filter:brightness(.97)}html.dark .arkynRichTextMarkButton:hover{cursor:pointer;filter:brightness(.9)}.arkynRichTextMarkButton.activeTrue{filter:brightness(.97)}html.dark .arkynRichTextMarkButton.activeTrue{filter:brightness(.9)}.arkynRichTextMarkButton.activeTrue svg{color:rgba(var(--spotlight-primary), 1)}}
@@ -0,0 +1,67 @@
1
+ @layer arkyn{.arkynRichText{background-color:var(--input-background);border:1px solid var(--border);border-radius:8px;outline:1px solid #0000;flex-direction:column;display:flex}.arkynRichText.errorTrue{outline-color:rgb(var(--spotlight-danger));border-color:rgb(var(--spotlight-danger))}.arkynRichText.focusTrue{outline-color:rgb(var(--spotlight-primary));border-color:rgb(var(--spotlight-primary))}.arkynRichText .editorContainer{outline:none;min-height:300px;padding:16px}.arkynRichText .restatesCharacters{color:rgb(var(--spotlight-danger));margin-left:auto;padding:8px;font-size:16px;font-weight:600;display:block}}
2
+
3
+ @layer arkyn{.arkynFieldError{color:rgb(var(--spotlight-danger));font-size:12px;font-weight:600;line-height:12px}}
4
+
5
+ @layer arkyn{.arkynFieldLabel{color:var(--text-body);font-size:14px;font-weight:600;line-height:19.07px}.arkynFieldLabel.asteriskTrue:before{content:"* ";text-align:left;color:rgb(var(--spotlight-danger));font-size:12px;font-weight:600;line-height:16.34px}}
6
+
7
+ @layer arkyn{.arkynFieldWrapper{gap:6px;height:max-content;display:flex}.arkynFieldWrapper.horizontal{flex-direction:row;align-items:center}.arkynFieldWrapper.horizontalReverse{flex-direction:row-reverse;align-items:center;margin-right:auto}.arkynFieldWrapper.vertical{flex-direction:column;align-items:flex-start}}
8
+
9
+ @layer arkyn{.arkynRichTextBlockButton{background-color:var(--card-foreground-secondary);border:none;border-radius:4px;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.arkynRichTextBlockButton svg{width:20px;height:20px;color:var(--text-heading)}.arkynRichTextBlockButton:hover{cursor:pointer;filter:brightness(.98)}html.dark .arkynRichTextBlockButton:hover{cursor:pointer;filter:brightness(.9)}}
10
+
11
+ @layer arkyn{.arkynElementBlockquote,.arkynElementBulletList,.arkynElementListItem,.arkynElementNumberedList,.arkynElementParagraph{color:var(--text-body);font-size:14px;font-weight:400}.arkynElementHeadingOne,.arkynElementHeadingTwo{color:var(--text-heading);font-weight:600}.arkynElementHeadingOne{font-size:18px}.arkynElementHeadingTwo{font-size:16px}.arkynElementImage{max-width:100%}}
12
+
13
+ @layer arkyn{.arkynRichTextInsertImage{background-color:var(--card-foreground-secondary);border:none;border-radius:4px;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.arkynRichTextInsertImage svg{width:20px;height:20px;color:var(--text-heading)}.arkynRichTextInsertImage:hover{cursor:pointer;filter:brightness(.98)}.arkynRichTextInsertImageModalContent{flex-direction:column;gap:16px;width:500px;padding:16px;display:flex}.arkynRichTextInsertImageModalPreviewImage{border-radius:var(--rounded-cards);width:100%}.arkynRichTextInsertImageModalContent .arkynImageUpload{min-height:174px}html.dark .arkynRichTextInsertImage:hover{cursor:pointer;filter:brightness(.9)}}
14
+
15
+ @layer arkyn{.arkynButton{background:0 0;border:1px solid #0000;outline:1px solid #0000;position:relative}.arkynButton:hover{cursor:pointer;filter:brightness(.95);transition:all .3s}html.dark .arkynButton:hover{cursor:pointer;filter:brightness(1.2)}.arkynButton:disabled{cursor:not-allowed;opacity:.5}.arkynButton .arkynButtonContent{white-space:nowrap;justify-content:center;align-items:center;display:flex}.arkynButton .arkynButtonSpinner{white-space:nowrap;opacity:0;justify-content:center;align-items:center;display:flex}.arkynButton.solid{color:var(--white)}.arkynButton.solid.primary{background-color:rgb(var(--spotlight-primary))}.arkynButton.solid.secondary{background-color:rgb(var(--spotlight-secondary))}.arkynButton.solid.danger{background-color:rgb(var(--spotlight-danger))}.arkynButton.solid.success{background-color:rgb(var(--spotlight-success))}.arkynButton.solid.warning{background-color:rgb(var(--spotlight-warning))}.arkynButton.solid.info{background-color:rgb(var(--spotlight-info))}.arkynButton.outline{background-color:var(--background-underground);border-color:var(--border)}.arkynButton.outline.primary{color:rgb(var(--spotlight-primary))}.arkynButton.outline.secondary{color:rgb(var(--spotlight-secondary))}.arkynButton.outline.danger{color:rgb(var(--spotlight-danger))}.arkynButton.outline.success{color:rgb(var(--spotlight-success))}.arkynButton.outline.warning{color:rgb(var(--spotlight-warning))}.arkynButton.outline.info{color:rgb(var(--spotlight-info))}.arkynButton.ghost.primary{color:rgb(var(--spotlight-primary));background-color:rgb(var(--spotlight-primary-foreground))}.arkynButton.ghost.secondary{color:rgb(var(--spotlight-secondary));background-color:rgb(var(--spotlight-secondary-foreground))}.arkynButton.ghost.danger{color:rgb(var(--spotlight-danger));background-color:rgb(var(--spotlight-danger-foreground))}.arkynButton.ghost.success{color:rgb(var(--spotlight-success));background-color:rgb(var(--spotlight-success-foreground))}.arkynButton.ghost.warning{color:rgb(var(--spotlight-warning));background-color:rgb(var(--spotlight-warning-foreground))}.arkynButton.ghost.info{color:rgb(var(--spotlight-info));background-color:rgb(var(--spotlight-info-foreground))}.arkynButton.invisible.primary{color:rgb(var(--spotlight-primary))}.arkynButton.invisible.secondary{color:rgb(var(--spotlight-secondary))}.arkynButton.invisible.danger{color:rgb(var(--spotlight-danger))}.arkynButton.invisible.success{color:rgb(var(--spotlight-success))}.arkynButton.invisible.warning{color:rgb(var(--spotlight-warning))}.arkynButton.invisible.info{color:rgb(var(--spotlight-info))}.arkynButton.lg{border-radius:8px;height:44px;padding:0 20px;font-size:14px;font-weight:600;line-height:14px}.arkynButton.lg .arkynButtonContent,.arkynButton.lg .arkynButtonSpinner{gap:16px}.arkynButton.md{border-radius:8px;gap:16px;height:40px;padding:0 16px;font-size:14px;font-weight:600;line-height:14px}.arkynButton.md .arkynButtonContent,.arkynButton.md .arkynButtonSpinner{gap:14px}.arkynButton.sm{border-radius:6px;height:32px;padding:0 16px;font-size:12px;font-weight:600;line-height:12px}.arkynButton.sm .arkynButtonContent,.arkynButton.sm .arkynButtonSpinner{gap:12px}.arkynButton.xs{border-radius:4px;height:24px;padding:0 16px;font-size:10px;font-weight:600;line-height:10px}.arkynButton.xs .arkynButtonContent,.arkynButton.xs .arkynButtonSpinner{gap:8px}.arkynButton .arkynButtonSpinner>svg{animation:2s linear infinite spin}.arkynButton.loadingTextFalse .arkynButtonSpinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynButton.loadingTextTrue .arkynButtonSpinner{max-height:0}.arkynButton.loadingTrue .arkynButtonContent{opacity:0;max-height:0}.arkynButton.loadingTrue .arkynButtonSpinner{opacity:1;max-height:unset}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}}
16
+
17
+ @layer arkyn{.arkynInput{border:1px solid #0000;border-radius:8px;outline:1px solid #0000;align-items:center;gap:8px;width:100%;padding:0 16px;display:flex;position:relative}.arkynInput:hover{cursor:text}.arkynInput input{width:100%;color:var(--text-heading);background:0 0;border:none;outline:none;line-height:100%}.arkynInput input:disabled{-webkit-user-select:none;user-select:none}.arkynInput .prefix,.arkynInput .suffix{color:var(--text-body);background:var(--border);justify-content:center;align-items:center;font-weight:400;line-height:100%;display:flex;position:absolute}.arkynInput .prefix{border-right:1px solid var(--border);border-radius:7px 0 0 7px;top:0;bottom:0;left:0}.arkynInput .suffix{border-left:1px solid var(--border);border-radius:0 7px 7px 0;top:0;bottom:0;right:0}.arkynInput input::placeholder{color:var(--text-muted);line-height:100%}.arkynInput svg{color:var(--text-muted)}.arkynInput.errored svg{color:rgb(var(--spotlight-danger))}.arkynInput:not(.opacity).focused svg{color:rgb(var(--spotlight-primary))}.arkynInput.opacity{opacity:.5}.arkynInput.solid{border-color:var(--border);background-color:var(--input-background)}.arkynInput.solid.errored{border-color:rgb(var(--spotlight-danger));outline-color:rgb(var(--spotlight-danger))}.arkynInput:not(.opacity).solid.focused{border-color:rgb(var(--spotlight-primary));outline-color:rgb(var(--spotlight-primary))}.arkynInput.outline{border-color:var(--border);background-color:var(--background-foreground)}.arkynInput.outline.errored{border-color:rgb(var(--spotlight-danger));outline-color:rgb(var(--spotlight-danger))}.arkynInput:not(.opacity).outline.focused{border-color:rgb(var(--spotlight-primary));outline-color:rgb(var(--spotlight-primary))}.arkynInput.underline{border-top:none;border-left:none;border-right:none;border-color:var(--border);border-radius:0;outline:none}.arkynInput.underline .suffix,.arkynInput.underline .prefix{display:none}.arkynInput.underline:before{content:" ";background:0 0;height:1px;position:absolute;bottom:-2px;left:0;right:0}.arkynInput.underline.errored{border-color:rgb(var(--spotlight-danger))}.arkynInput.underline.errored:before{background:rgb(var(--spotlight-danger))}.arkynInput:not(.opacity).underline.focused{border-color:rgb(var(--spotlight-primary))}.arkynInput:not(.opacity).underline.focused:before{background:rgb(var(--spotlight-primary))}.arkynInput.md input{min-height:38px;max-height:38px;font-size:14px;font-weight:400;line-height:14px}.arkynInput.md input::placeholder{font-size:14px;font-weight:400;line-height:14px}.arkynInput.md.hasPrefix{padding-left:60px}.arkynInput.md.hasSuffix{padding-right:60px}.arkynInput.md .prefix,.arkynInput.md .suffix{width:44px;height:38px;font-size:14px}.arkynInput.lg input{min-height:44px;max-height:44px;font-size:16px;font-weight:400;line-height:16px}.arkynInput.lg input::placeholder{font-size:16px;font-weight:400;line-height:16px}.arkynInput.lg .prefix,.arkynInput.lg .suffix{width:48px;height:44px;font-size:16px}.arkynInput.lg.hasPrefix{padding-left:64px}.arkynInput.lg.hasSuffix{padding-right:64px}.arkynInput .spinner{animation:2s linear infinite spin}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}}
18
+
19
+ @layer arkyn{.arkynFieldError{color:rgb(var(--spotlight-danger));font-size:12px;font-weight:600;line-height:12px}}
20
+
21
+ @layer arkyn{.arkynFieldLabel{color:var(--text-body);font-size:14px;font-weight:600;line-height:19.07px}.arkynFieldLabel.asteriskTrue:before{content:"* ";text-align:left;color:rgb(var(--spotlight-danger));font-size:12px;font-weight:600;line-height:16.34px}}
22
+
23
+ @layer arkyn{.arkynFieldWrapper{gap:6px;height:max-content;display:flex}.arkynFieldWrapper.horizontal{flex-direction:row;align-items:center}.arkynFieldWrapper.horizontalReverse{flex-direction:row-reverse;align-items:center;margin-right:auto}.arkynFieldWrapper.vertical{flex-direction:column;align-items:flex-start}}
24
+
25
+ @layer arkyn{.arkynInput{border:1px solid #0000;border-radius:8px;outline:1px solid #0000;align-items:center;gap:8px;width:100%;padding:0 16px;display:flex;position:relative}.arkynInput:hover{cursor:text}.arkynInput input{width:100%;color:var(--text-heading);background:0 0;border:none;outline:none;line-height:100%}.arkynInput input:disabled{-webkit-user-select:none;user-select:none}.arkynInput .prefix,.arkynInput .suffix{color:var(--text-body);background:var(--border);justify-content:center;align-items:center;font-weight:400;line-height:100%;display:flex;position:absolute}.arkynInput .prefix{border-right:1px solid var(--border);border-radius:7px 0 0 7px;top:0;bottom:0;left:0}.arkynInput .suffix{border-left:1px solid var(--border);border-radius:0 7px 7px 0;top:0;bottom:0;right:0}.arkynInput input::placeholder{color:var(--text-muted);line-height:100%}.arkynInput svg{color:var(--text-muted)}.arkynInput.errored svg{color:rgb(var(--spotlight-danger))}.arkynInput:not(.opacity).focused svg{color:rgb(var(--spotlight-primary))}.arkynInput.opacity{opacity:.5}.arkynInput.solid{border-color:var(--border);background-color:var(--input-background)}.arkynInput.solid.errored{border-color:rgb(var(--spotlight-danger));outline-color:rgb(var(--spotlight-danger))}.arkynInput:not(.opacity).solid.focused{border-color:rgb(var(--spotlight-primary));outline-color:rgb(var(--spotlight-primary))}.arkynInput.outline{border-color:var(--border);background-color:var(--background-foreground)}.arkynInput.outline.errored{border-color:rgb(var(--spotlight-danger));outline-color:rgb(var(--spotlight-danger))}.arkynInput:not(.opacity).outline.focused{border-color:rgb(var(--spotlight-primary));outline-color:rgb(var(--spotlight-primary))}.arkynInput.underline{border-top:none;border-left:none;border-right:none;border-color:var(--border);border-radius:0;outline:none}.arkynInput.underline .suffix,.arkynInput.underline .prefix{display:none}.arkynInput.underline:before{content:" ";background:0 0;height:1px;position:absolute;bottom:-2px;left:0;right:0}.arkynInput.underline.errored{border-color:rgb(var(--spotlight-danger))}.arkynInput.underline.errored:before{background:rgb(var(--spotlight-danger))}.arkynInput:not(.opacity).underline.focused{border-color:rgb(var(--spotlight-primary))}.arkynInput:not(.opacity).underline.focused:before{background:rgb(var(--spotlight-primary))}.arkynInput.md input{min-height:38px;max-height:38px;font-size:14px;font-weight:400;line-height:14px}.arkynInput.md input::placeholder{font-size:14px;font-weight:400;line-height:14px}.arkynInput.md.hasPrefix{padding-left:60px}.arkynInput.md.hasSuffix{padding-right:60px}.arkynInput.md .prefix,.arkynInput.md .suffix{width:44px;height:38px;font-size:14px}.arkynInput.lg input{min-height:44px;max-height:44px;font-size:16px;font-weight:400;line-height:16px}.arkynInput.lg input::placeholder{font-size:16px;font-weight:400;line-height:16px}.arkynInput.lg .prefix,.arkynInput.lg .suffix{width:48px;height:44px;font-size:16px}.arkynInput.lg.hasPrefix{padding-left:64px}.arkynInput.lg.hasSuffix{padding-right:64px}.arkynInput .spinner{animation:2s linear infinite spin}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}}
26
+
27
+ @layer arkyn{.arkynImageUpload{border-width:1px;border-color:var(--border);background:var(--input-background);border-radius:8px;outline:1px solid #0000;width:100%;max-width:475px;height:174px}.arkynImageUpload.hasImage{border-style:solid}.arkynImageUpload.noHasImage{border-style:dashed}.arkynImageUpload.hasError{border-color:rgb(var(--spotlight-danger));outline-color:rgb(var(--spotlight-danger))}}
28
+
29
+ @layer arkyn{.arkynFieldError{color:rgb(var(--spotlight-danger));font-size:12px;font-weight:600;line-height:12px}}
30
+
31
+ @layer arkyn{.arkynFieldLabel{color:var(--text-body);font-size:14px;font-weight:600;line-height:19.07px}.arkynFieldLabel.asteriskTrue:before{content:"* ";text-align:left;color:rgb(var(--spotlight-danger));font-size:12px;font-weight:600;line-height:16.34px}}
32
+
33
+ @layer arkyn{.arkynFieldWrapper{gap:6px;height:max-content;display:flex}.arkynFieldWrapper.horizontal{flex-direction:row;align-items:center}.arkynFieldWrapper.horizontalReverse{flex-direction:row-reverse;align-items:center;margin-right:auto}.arkynFieldWrapper.vertical{flex-direction:column;align-items:flex-start}}
34
+
35
+ @layer arkyn{.arkynImageUploadHasFileContent{background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:6px;justify-content:end;align-items:end;gap:8px;width:100%;height:100%;padding:6px;display:flex}}
36
+
37
+ @layer arkyn{.arkynButton{background:0 0;border:1px solid #0000;outline:1px solid #0000;position:relative}.arkynButton:hover{cursor:pointer;filter:brightness(.95);transition:all .3s}html.dark .arkynButton:hover{cursor:pointer;filter:brightness(1.2)}.arkynButton:disabled{cursor:not-allowed;opacity:.5}.arkynButton .arkynButtonContent{white-space:nowrap;justify-content:center;align-items:center;display:flex}.arkynButton .arkynButtonSpinner{white-space:nowrap;opacity:0;justify-content:center;align-items:center;display:flex}.arkynButton.solid{color:var(--white)}.arkynButton.solid.primary{background-color:rgb(var(--spotlight-primary))}.arkynButton.solid.secondary{background-color:rgb(var(--spotlight-secondary))}.arkynButton.solid.danger{background-color:rgb(var(--spotlight-danger))}.arkynButton.solid.success{background-color:rgb(var(--spotlight-success))}.arkynButton.solid.warning{background-color:rgb(var(--spotlight-warning))}.arkynButton.solid.info{background-color:rgb(var(--spotlight-info))}.arkynButton.outline{background-color:var(--background-underground);border-color:var(--border)}.arkynButton.outline.primary{color:rgb(var(--spotlight-primary))}.arkynButton.outline.secondary{color:rgb(var(--spotlight-secondary))}.arkynButton.outline.danger{color:rgb(var(--spotlight-danger))}.arkynButton.outline.success{color:rgb(var(--spotlight-success))}.arkynButton.outline.warning{color:rgb(var(--spotlight-warning))}.arkynButton.outline.info{color:rgb(var(--spotlight-info))}.arkynButton.ghost.primary{color:rgb(var(--spotlight-primary));background-color:rgb(var(--spotlight-primary-foreground))}.arkynButton.ghost.secondary{color:rgb(var(--spotlight-secondary));background-color:rgb(var(--spotlight-secondary-foreground))}.arkynButton.ghost.danger{color:rgb(var(--spotlight-danger));background-color:rgb(var(--spotlight-danger-foreground))}.arkynButton.ghost.success{color:rgb(var(--spotlight-success));background-color:rgb(var(--spotlight-success-foreground))}.arkynButton.ghost.warning{color:rgb(var(--spotlight-warning));background-color:rgb(var(--spotlight-warning-foreground))}.arkynButton.ghost.info{color:rgb(var(--spotlight-info));background-color:rgb(var(--spotlight-info-foreground))}.arkynButton.invisible.primary{color:rgb(var(--spotlight-primary))}.arkynButton.invisible.secondary{color:rgb(var(--spotlight-secondary))}.arkynButton.invisible.danger{color:rgb(var(--spotlight-danger))}.arkynButton.invisible.success{color:rgb(var(--spotlight-success))}.arkynButton.invisible.warning{color:rgb(var(--spotlight-warning))}.arkynButton.invisible.info{color:rgb(var(--spotlight-info))}.arkynButton.lg{border-radius:8px;height:44px;padding:0 20px;font-size:14px;font-weight:600;line-height:14px}.arkynButton.lg .arkynButtonContent,.arkynButton.lg .arkynButtonSpinner{gap:16px}.arkynButton.md{border-radius:8px;gap:16px;height:40px;padding:0 16px;font-size:14px;font-weight:600;line-height:14px}.arkynButton.md .arkynButtonContent,.arkynButton.md .arkynButtonSpinner{gap:14px}.arkynButton.sm{border-radius:6px;height:32px;padding:0 16px;font-size:12px;font-weight:600;line-height:12px}.arkynButton.sm .arkynButtonContent,.arkynButton.sm .arkynButtonSpinner{gap:12px}.arkynButton.xs{border-radius:4px;height:24px;padding:0 16px;font-size:10px;font-weight:600;line-height:10px}.arkynButton.xs .arkynButtonContent,.arkynButton.xs .arkynButtonSpinner{gap:8px}.arkynButton .arkynButtonSpinner>svg{animation:2s linear infinite spin}.arkynButton.loadingTextFalse .arkynButtonSpinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynButton.loadingTextTrue .arkynButtonSpinner{max-height:0}.arkynButton.loadingTrue .arkynButtonContent{opacity:0;max-height:0}.arkynButton.loadingTrue .arkynButtonSpinner{opacity:1;max-height:unset}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}}
38
+
39
+ @layer arkyn{.arkynIconButton{background:0 0;border:1px solid #0000;outline:1px solid #0000;position:relative}.arkynIconButton:hover{cursor:pointer;filter:brightness(.9);transition:all .15s ease-out}html.dark .arkynIconButton:hover{cursor:pointer;filter:brightness(1.2)}.arkynIconButton:disabled{cursor:not-allowed;opacity:.5}.arkynIconButtonContent{justify-content:center;align-items:center;display:flex}.arkynIconButton.solid{color:var(--white)}.arkynIconButton.solid.primary{background-color:rgb(var(--spotlight-primary))}.arkynIconButton.solid.secondary{background-color:rgb(var(--spotlight-secondary))}.arkynIconButton.solid.danger{background-color:rgb(var(--spotlight-danger))}.arkynIconButton.solid.success{background-color:rgb(var(--spotlight-success))}.arkynIconButton.solid.warning{background-color:rgb(var(--spotlight-warning))}.arkynIconButton.solid.info{background-color:rgb(var(--spotlight-info))}.arkynIconButton.outline{background-color:var(--background-underground);border-color:var(--border)}.arkynIconButton.outline.primary{color:rgb(var(--spotlight-primary))}.arkynIconButton.outline.secondary{color:rgb(var(--spotlight-secondary))}.arkynIconButton.outline.danger{color:rgb(var(--spotlight-danger))}.arkynIconButton.outline.success{color:rgb(var(--spotlight-success))}.arkynIconButton.outline.warning{color:rgb(var(--spotlight-warning))}.arkynIconButton.outline.info{color:rgb(var(--spotlight-info))}.arkynIconButton.ghost:hover{filter:brightness(.8)}.arkynIconButton.ghost.primary{color:rgb(var(--spotlight-primary));background-color:rgb(var(--spotlight-primary-foreground))}.arkynIconButton.ghost.secondary{color:rgb(var(--spotlight-secondary));background-color:rgb(var(--spotlight-secondary-foreground))}.arkynIconButton.ghost.danger{color:rgb(var(--spotlight-danger));background-color:rgb(var(--spotlight-danger-foreground))}.arkynIconButton.ghost.success{color:rgb(var(--spotlight-success));background-color:rgb(var(--spotlight-success-foreground))}.arkynIconButton.ghost.warning{color:rgb(var(--spotlight-warning));background-color:rgb(var(--spotlight-warning-foreground))}.arkynIconButton.ghost.info{color:rgb(var(--spotlight-info));background-color:rgb(var(--spotlight-info-foreground))}.arkynIconButton.invisible.primary{color:rgb(var(--spotlight-primary))}.arkynIconButton.invisible.secondary{color:rgb(var(--spotlight-secondary))}.arkynIconButton.invisible.danger{color:rgb(var(--spotlight-danger))}.arkynIconButton.invisible.success{color:rgb(var(--spotlight-success))}.arkynIconButton.invisible.warning{color:rgb(var(--spotlight-warning))}.arkynIconButton.invisible.info{color:rgb(var(--spotlight-info))}.arkynIconButton.lg{border-radius:6px;width:44px;height:44px}.arkynIconButton.md{border-radius:6px;width:40px;height:40px}.arkynIconButton.sm{border-radius:6px;width:32px;height:32px}.arkynIconButton.xs{border-radius:4px;width:24px;height:24px}.arkynIconButtonSpinner{opacity:0;justify-content:center;align-items:center;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynIconButtonSpinner>svg{animation:2s linear infinite spin}.arkynIconButton.loadingTrue .arkynIconButtonSpinner{opacity:1}.arkynIconButton.loadingTrue .arkynIconButtonContent{opacity:0}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}}
40
+
41
+ @layer arkyn{.arkynTooltip{display:block;position:relative}.arkynTooltipText{visibility:hidden;opacity:0;white-space:nowrap;color:var(--tooltip-text);background-color:var(--tooltip-background);z-index:9999;border-radius:4px;justify-content:center;align-items:center;font-weight:400;transition:all .15s ease-out;display:flex;position:absolute;transform:translate(-50%,-50%)}.arkynTooltip.lg .arkynTooltipText{padding:8px 12px;font-size:14px;line-height:130%}.arkynTooltip.md .arkynTooltipText{padding:8px 12px;font-size:12px;line-height:130%}.arkynTooltip:hover .arkynTooltipText{opacity:1;visibility:visible}.arkynTooltip.top .arkynTooltipText{bottom:calc(100% + 10px);left:50%;transform:translate(-50%)}.arkynTooltip.top .arkynTooltipText:before{content:"";border-style:solid;border-color:var(--tooltip-background) transparent;border-width:6px 6px 0;position:absolute;top:100%;bottom:20px;left:50%;transform:translate(-50%)}.arkynTooltip.left .arkynTooltipText{top:50%;right:calc(100% + 10px);transform:translateY(-50%)}.arkynTooltip.left .arkynTooltipText:before{content:"";border-style:solid;border-color:transparent var(--tooltip-background);border-width:6px 0 6px 6px;position:absolute;top:50%;left:100%;transform:translateY(-50%)}.arkynTooltip.right .arkynTooltipText{top:50%;left:calc(100% + 10px);transform:translateY(-50%)}.arkynTooltip.right .arkynTooltipText:before{content:"";border-style:solid;border-color:transparent var(--tooltip-background);border-width:6px 6px 6px 0;position:absolute;top:50%;left:0;transform:translate(-100%,-50%)}.arkynTooltip.bottom .arkynTooltipText{top:calc(100% + 10px);left:50%;transform:translate(-50%)}.arkynTooltip.bottom .arkynTooltipText:before{content:"";border-style:solid;border-color:var(--tooltip-background) transparent;border-width:0 6px 6px;position:absolute;top:0;left:50%;transform:translate(-50%,-100%)}}
42
+
43
+ @layer arkyn{.arkynImageUploadNoFileContent{flex-direction:column;justify-content:center;align-items:center;gap:8px;width:100%;height:100%;display:flex}.arkynImageUploadNoFileContent>p{text-align:center;white-space:nowrap;color:var(--text-body);padding:0 24px;font-size:12px;font-weight:400;line-height:12px}}
44
+
45
+ @layer arkyn{.arkynImageUploadHasFileContent{background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:6px;justify-content:end;align-items:end;gap:8px;width:100%;height:100%;padding:6px;display:flex}}
46
+
47
+ @layer arkyn{.arkynIconButton{background:0 0;border:1px solid #0000;outline:1px solid #0000;position:relative}.arkynIconButton:hover{cursor:pointer;filter:brightness(.9);transition:all .15s ease-out}html.dark .arkynIconButton:hover{cursor:pointer;filter:brightness(1.2)}.arkynIconButton:disabled{cursor:not-allowed;opacity:.5}.arkynIconButtonContent{justify-content:center;align-items:center;display:flex}.arkynIconButton.solid{color:var(--white)}.arkynIconButton.solid.primary{background-color:rgb(var(--spotlight-primary))}.arkynIconButton.solid.secondary{background-color:rgb(var(--spotlight-secondary))}.arkynIconButton.solid.danger{background-color:rgb(var(--spotlight-danger))}.arkynIconButton.solid.success{background-color:rgb(var(--spotlight-success))}.arkynIconButton.solid.warning{background-color:rgb(var(--spotlight-warning))}.arkynIconButton.solid.info{background-color:rgb(var(--spotlight-info))}.arkynIconButton.outline{background-color:var(--background-underground);border-color:var(--border)}.arkynIconButton.outline.primary{color:rgb(var(--spotlight-primary))}.arkynIconButton.outline.secondary{color:rgb(var(--spotlight-secondary))}.arkynIconButton.outline.danger{color:rgb(var(--spotlight-danger))}.arkynIconButton.outline.success{color:rgb(var(--spotlight-success))}.arkynIconButton.outline.warning{color:rgb(var(--spotlight-warning))}.arkynIconButton.outline.info{color:rgb(var(--spotlight-info))}.arkynIconButton.ghost:hover{filter:brightness(.8)}.arkynIconButton.ghost.primary{color:rgb(var(--spotlight-primary));background-color:rgb(var(--spotlight-primary-foreground))}.arkynIconButton.ghost.secondary{color:rgb(var(--spotlight-secondary));background-color:rgb(var(--spotlight-secondary-foreground))}.arkynIconButton.ghost.danger{color:rgb(var(--spotlight-danger));background-color:rgb(var(--spotlight-danger-foreground))}.arkynIconButton.ghost.success{color:rgb(var(--spotlight-success));background-color:rgb(var(--spotlight-success-foreground))}.arkynIconButton.ghost.warning{color:rgb(var(--spotlight-warning));background-color:rgb(var(--spotlight-warning-foreground))}.arkynIconButton.ghost.info{color:rgb(var(--spotlight-info));background-color:rgb(var(--spotlight-info-foreground))}.arkynIconButton.invisible.primary{color:rgb(var(--spotlight-primary))}.arkynIconButton.invisible.secondary{color:rgb(var(--spotlight-secondary))}.arkynIconButton.invisible.danger{color:rgb(var(--spotlight-danger))}.arkynIconButton.invisible.success{color:rgb(var(--spotlight-success))}.arkynIconButton.invisible.warning{color:rgb(var(--spotlight-warning))}.arkynIconButton.invisible.info{color:rgb(var(--spotlight-info))}.arkynIconButton.lg{border-radius:6px;width:44px;height:44px}.arkynIconButton.md{border-radius:6px;width:40px;height:40px}.arkynIconButton.sm{border-radius:6px;width:32px;height:32px}.arkynIconButton.xs{border-radius:4px;width:24px;height:24px}.arkynIconButtonSpinner{opacity:0;justify-content:center;align-items:center;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynIconButtonSpinner>svg{animation:2s linear infinite spin}.arkynIconButton.loadingTrue .arkynIconButtonSpinner{opacity:1}.arkynIconButton.loadingTrue .arkynIconButtonContent{opacity:0}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}}
48
+
49
+ @layer arkyn{.arkynTooltip{display:block;position:relative}.arkynTooltipText{visibility:hidden;opacity:0;white-space:nowrap;color:var(--tooltip-text);background-color:var(--tooltip-background);z-index:9999;border-radius:4px;justify-content:center;align-items:center;font-weight:400;transition:all .15s ease-out;display:flex;position:absolute;transform:translate(-50%,-50%)}.arkynTooltip.lg .arkynTooltipText{padding:8px 12px;font-size:14px;line-height:130%}.arkynTooltip.md .arkynTooltipText{padding:8px 12px;font-size:12px;line-height:130%}.arkynTooltip:hover .arkynTooltipText{opacity:1;visibility:visible}.arkynTooltip.top .arkynTooltipText{bottom:calc(100% + 10px);left:50%;transform:translate(-50%)}.arkynTooltip.top .arkynTooltipText:before{content:"";border-style:solid;border-color:var(--tooltip-background) transparent;border-width:6px 6px 0;position:absolute;top:100%;bottom:20px;left:50%;transform:translate(-50%)}.arkynTooltip.left .arkynTooltipText{top:50%;right:calc(100% + 10px);transform:translateY(-50%)}.arkynTooltip.left .arkynTooltipText:before{content:"";border-style:solid;border-color:transparent var(--tooltip-background);border-width:6px 0 6px 6px;position:absolute;top:50%;left:100%;transform:translateY(-50%)}.arkynTooltip.right .arkynTooltipText{top:50%;left:calc(100% + 10px);transform:translateY(-50%)}.arkynTooltip.right .arkynTooltipText:before{content:"";border-style:solid;border-color:transparent var(--tooltip-background);border-width:6px 6px 6px 0;position:absolute;top:50%;left:0;transform:translate(-100%,-50%)}.arkynTooltip.bottom .arkynTooltipText{top:calc(100% + 10px);left:50%;transform:translate(-50%)}.arkynTooltip.bottom .arkynTooltipText:before{content:"";border-style:solid;border-color:var(--tooltip-background) transparent;border-width:0 6px 6px;position:absolute;top:0;left:50%;transform:translate(-50%,-100%)}}
50
+
51
+ @layer arkyn{.arkynImageUploadNoFileContent{flex-direction:column;justify-content:center;align-items:center;gap:8px;width:100%;height:100%;display:flex}.arkynImageUploadNoFileContent>p{text-align:center;white-space:nowrap;color:var(--text-body);padding:0 24px;font-size:12px;font-weight:400;line-height:12px}}
52
+
53
+ @layer arkyn{.arkynModalContainer{z-index:9999;justify-content:center;align-items:start;padding:10vh 0 2rem;display:flex;position:fixed;inset:0;overflow:auto}.arkynModalContainerOverlay{z-index:9997;background:#00000080;animation:.24s cubic-bezier(.22,1,.36,1) forwards modalOverlayIn;position:fixed;inset:0}.arkynModalContainerOverlay:hover{cursor:pointer}.arkynModalContainer.exiting>.arkynModalContainerOverlay{animation:.24s cubic-bezier(.22,1,.36,1) forwards modalOverlayOut}.arkynModalContainerContent{z-index:9999;background:var(--background-foreground);transform-origin:50%;will-change:transform, opacity;border-radius:8px;animation:.24s cubic-bezier(.22,1,.36,1) forwards modalContentIn;position:relative}.arkynModalContainer.exiting>.arkynModalContainerContent{animation:.24s cubic-bezier(.22,1,.36,1) forwards modalContentOut}@keyframes modalOverlayIn{0%{opacity:0}to{opacity:1}}@keyframes modalOverlayOut{0%{opacity:1}to{opacity:0}}@keyframes modalContentIn{0%{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}@keyframes modalContentOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.92)}}}
54
+
55
+ @layer arkyn{.arkynModalFooter{border-top:1px solid var(--border);align-items:center;gap:16px;padding:16px;display:flex}.arkynModalFooter.left{justify-content:flex-start}.arkynModalFooter.right{justify-content:flex-end}.arkynModalFooter.center{justify-content:center}.arkynModalFooter.between{justify-content:space-between}.arkynModalFooter.around{justify-content:space-around}}
56
+
57
+ @layer arkyn{.arkynModalHeader{height:56px;color:var(--text-heading);border-bottom:1px solid var(--border);align-items:center;padding:16px;font-size:16px;font-weight:600;line-height:20px;display:flex}.arkynModalHeaderCloseButton{color:var(--text-body);background:0 0;background-color:var(--background-foreground);border:none;border-radius:4px;justify-content:center;align-items:center;margin-left:auto;padding:2px;display:flex}.arkynModalHeaderCloseButton:hover{cursor:pointer;filter:brightness(.9);transition:all .15s ease-out}}
58
+
59
+ @layer arkyn{.arkynTabButton{color:var(--text-muted);background-color:#0000;border:none;justify-content:center;align-items:center;padding:8px 16px;font-size:16px;font-weight:600;line-height:100%;display:flex;position:relative}.arkynTabButton.isDisabled{cursor:not-allowed;opacity:.2}.arkynTabButton:hover{cursor:pointer}.arkynTabButton.isActive{color:rgb(var(--spotlight-primary))}.arkynTabButton.isActive:after{content:"";background-color:rgb(var(--spotlight-primary));height:1px;position:absolute;bottom:-1px;left:0;right:0}}
60
+
61
+ @layer arkyn{.arkynTabContainer{border-bottom:1px solid var(--border);justify-content:start;align-items:center;gap:4px;display:flex;position:relative}}
62
+
63
+ @layer arkyn{.arkynRichTextInsertVideo{background-color:var(--card-foreground-secondary);border:none;border-radius:4px;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.arkynRichTextInsertVideo svg{width:20px;height:20px;color:var(--text-heading)}.arkynRichTextInsertVideo:hover{cursor:pointer;filter:brightness(.98)}.arkynRichTextInsertVideoModalContent{flex-direction:column;gap:16px;width:500px;padding:16px;display:flex}.arkynRichTextInsertVideoModalPreviewVideo{border-radius:var(--rounded-cards);width:100%}.arkynRichTextInsertVideoModalContent .arkynVideoUpload{min-height:174px}html.dark .arkynRichTextInsertVideo:hover{cursor:pointer;filter:brightness(.9)}}
64
+
65
+ @layer arkyn{.arkynRichTextMarkButton{background-color:var(--card-foreground-secondary);border:none;border-radius:4px;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.arkynRichTextMarkButton svg{width:20px;height:20px;color:var(--text-heading)}.arkynRichTextMarkButton:hover{cursor:pointer;filter:brightness(.97)}html.dark .arkynRichTextMarkButton:hover{cursor:pointer;filter:brightness(.9)}.arkynRichTextMarkButton.activeTrue{filter:brightness(.97)}html.dark .arkynRichTextMarkButton.activeTrue{filter:brightness(.9)}.arkynRichTextMarkButton.activeTrue svg{color:rgba(var(--spotlight-primary), 1)}}
66
+
67
+ @layer arkyn{.arkynRichTextToolbar{background-color:var(--card-foreground-secondary);border-bottom:1px solid var(--border);border-radius:8px 8px 0 0;flex-wrap:wrap;align-items:center;gap:12px 24px;padding:12px 16px;display:flex}}
@@ -9,3 +9,5 @@ function t({ children: t }) {
9
9
  }
10
10
  //#endregion
11
11
  export { t as Toolbar };
12
+
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/richText/toolbar/index.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport \"./styles.css\";\n\ntype ToolbarProps = {\n\tchildren: ReactNode;\n};\n\nfunction Toolbar({ children }: ToolbarProps) {\n\treturn <div className=\"arkynRichTextToolbar\">{children}</div>;\n}\n\nexport { Toolbar };\n"],"mappings":";;;AAOA,SAAS,EAAQ,EAAE,eAA0B;CAC5C,OAAO,kBAAC,OAAD;EAAK,WAAU;EAAwB;CAAc,CAAA;AAC7D"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynRichTextToolbar{background-color:var(--card-foreground-secondary);border-bottom:1px solid var(--border);border-radius:8px 8px 0 0;flex-wrap:wrap;align-items:center;gap:12px 24px;padding:12px 16px;display:flex}}
@@ -56,3 +56,5 @@ function i(i) {
56
56
  }
57
57
  //#endregion
58
58
  export { i as SearchPlaces };
59
+
60
+ //# sourceMappingURL=searchPlaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchPlaces.js","names":[],"sources":["../../../src/components/searchPlaces.tsx"],"sourcesContent":["import type { StandaloneSearchBoxProps } from \"@react-google-maps/api\";\nimport { StandaloneSearchBox } from \"@react-google-maps/api\";\nimport { type JSX, useState } from \"react\";\nimport { Input, type InputProps } from \"./input\";\n\ntype AddressComponentsType = {\n\tlong_name: string;\n\tshort_name: string;\n\ttypes: string[];\n}[];\n\n/** Structured address data extracted from a Google Places result. */\ntype PlaceData = {\n\t/** Street name (e.g. `\"Rua Exemplo\"`). */\n\tstreet: string;\n\t/** City name (e.g. `\"São Paulo\"`). */\n\tcity: string;\n\t/** Full state name (e.g. `\"São Paulo\"`). */\n\tstate: string;\n\t/** Neighborhood / district name. */\n\tneighborhood: string;\n\t/** Postal / ZIP code. */\n\tpostalCode: string;\n\t/** State abbreviation (e.g. `\"SP\"`). */\n\tstateShortName: string;\n\t/** Street number (e.g. `\"123\"`). */\n\tstreetNumber: string;\n\t/** Geographic coordinates of the place. */\n\tcoordinates: { lat: number; lng: number };\n};\n\ntype SearchPlacesProps = {\n\t/** Google Maps `StandaloneSearchBox` options (e.g. `componentRestrictions`, `bounds`). */\n\toptions?: StandaloneSearchBoxProps[\"options\"];\n\t/** Callback fired every time the input text changes. Receives the current string value. */\n\tonChange?: (e: string) => void;\n\t/**\n\t * Callback fired when the user selects a place from the autocomplete suggestions.\n\t * Receives a structured {@link PlaceData} object.\n\t */\n\tonPlaceChanged?: (e: PlaceData) => void;\n} & Omit<InputProps, \"onLoad\" | \"onChange\" | \"type\">;\n\n/**\n * SearchPlaces — text input with Google Places autocomplete that returns structured address data.\n *\n * Requires the Google Maps JavaScript API with the Places library to be loaded.\n * Built on `@react-google-maps/api`'s `StandaloneSearchBox`.\n *\n * @param props.options - Google Maps search box options (e.g. restrict by country).\n * @param props.onChange - Fires on every keystroke — receives the current text value.\n * @param props.onPlaceChanged - Fires when the user selects a suggestion — receives structured address data.\n *\n * **...Other valid `Input` properties (except `onLoad`, `onChange`, `type`)**\n *\n * @returns SearchPlaces JSX element (an `Input` wrapped in `StandaloneSearchBox`).\n *\n * @example\n * ```tsx\n * <SearchPlaces\n * name=\"address\"\n * label=\"Address\"\n * placeholder=\"Start typing an address…\"\n * options={{ componentRestrictions: { country: \"br\" } }}\n * onChange={(v) => setRawAddress(v)}\n * onPlaceChanged={(place) => {\n * setAddress({\n * street: place.street,\n * city: place.city,\n * state: place.state,\n * postalCode: place.postalCode,\n * coordinates: place.coordinates,\n * });\n * }}\n * />\n * ```\n */\n\nfunction SearchPlaces(props: SearchPlacesProps): JSX.Element {\n\tconst { onChange, onPlaceChanged, options, ...rest } = props;\n\n\t// biome-ignore lint/suspicious/noExplicitAny: intentional\n\tconst [searchBox, setSearchBox] = useState<any>(null);\n\t// biome-ignore lint/suspicious/noExplicitAny: intentional\n\tconst handleLoad = (ref: any) => setSearchBox(ref);\n\n\tconst handlePlacesChanged = () => {\n\t\tconst places = searchBox?.getPlaces();\n\t\tconst place = places ? places[0] : null;\n\n\t\tconst address_components =\n\t\t\tplace?.address_components as AddressComponentsType;\n\n\t\tfunction findData(key: string) {\n\t\t\tconst data = address_components.find((item) => item.types[0] === key);\n\t\t\tif (data) return data.long_name;\n\t\t\treturn \"\";\n\t\t}\n\n\t\tfunction findDataShort(key: string) {\n\t\t\tconst data = address_components.find((item) => item.types[0] === key);\n\t\t\tif (data) return data.short_name;\n\t\t\treturn \"\";\n\t\t}\n\n\t\tfunction findDataByMultipleTypes(keys: string[]) {\n\t\t\tfor (const key of keys) {\n\t\t\t\tconst data = address_components.find((item) =>\n\t\t\t\t\titem.types.includes(key),\n\t\t\t\t);\n\t\t\t\tif (data) return data.long_name;\n\t\t\t}\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (place) {\n\t\t\tconst street = findData(\"route\");\n\t\t\tconst streetNumber = findData(\"street_number\");\n\t\t\tconst neighborhood = findDataByMultipleTypes([\n\t\t\t\t\"sublocality_level_1\",\n\t\t\t\t\"sublocality\",\n\t\t\t\t\"neighborhood\",\n\t\t\t]);\n\t\t\tconst city = findData(\"administrative_area_level_2\");\n\t\t\tconst state = findData(\"administrative_area_level_1\");\n\t\t\tconst stateShortName = findDataShort(\"administrative_area_level_1\");\n\t\t\tconst postalCode = findDataByMultipleTypes([\n\t\t\t\t\"postal_code\",\n\t\t\t\t\"postal_code_prefix\",\n\t\t\t]);\n\n\t\t\tconst lat = place.geometry?.location?.lat();\n\t\t\tconst lng = place.geometry?.location?.lng();\n\n\t\t\tconst sendPlace = {\n\t\t\t\tstreet,\n\t\t\t\tcity,\n\t\t\t\tstate,\n\t\t\t\tneighborhood,\n\t\t\t\tpostalCode,\n\t\t\t\tstreetNumber,\n\t\t\t\tstateShortName,\n\t\t\t\tcoordinates: { lat, lng },\n\t\t\t};\n\n\t\t\tonPlaceChanged?.(sendPlace);\n\t\t}\n\t};\n\n\treturn (\n\t\t<StandaloneSearchBox\n\t\t\tonLoad={handleLoad}\n\t\t\tonPlacesChanged={handlePlacesChanged}\n\t\t\toptions={options}\n\t\t>\n\t\t\t<Input\n\t\t\t\ttype=\"text\"\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tonChange={(e) => onChange?.(e.target.value)}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</StandaloneSearchBox>\n\t);\n}\n\nexport { SearchPlaces };\n"],"mappings":";;;;;AA8EA,SAAS,EAAa,GAAuC;CAC5D,IAAM,EAAE,aAAU,mBAAgB,YAAS,GAAG,MAAS,GAGjD,CAAC,GAAW,KAAgB,EAAc,IAAI;CAmEpD,OACC,kBAAC,GAAD;EACC,SAnEkB,MAAa,EAAa,CAAG;EAoE/C,uBAlEgC;GACjC,IAAM,IAAS,GAAW,UAAU,GAC9B,IAAQ,IAAS,EAAO,KAAK,MAE7B,IACL,GAAO;GAER,SAAS,EAAS,GAAa;IAC9B,IAAM,IAAO,EAAmB,MAAM,MAAS,EAAK,MAAM,OAAO,CAAG;IAEpE,OADI,IAAa,EAAK,YACf;GACR;GAEA,SAAS,EAAc,GAAa;IACnC,IAAM,IAAO,EAAmB,MAAM,MAAS,EAAK,MAAM,OAAO,CAAG;IAEpE,OADI,IAAa,EAAK,aACf;GACR;GAEA,SAAS,EAAwB,GAAgB;IAChD,KAAK,IAAM,KAAO,GAAM;KACvB,IAAM,IAAO,EAAmB,MAAM,MACrC,EAAK,MAAM,SAAS,CAAG,CACxB;KACA,IAAI,GAAM,OAAO,EAAK;IACvB;IACA,OAAO;GACR;GAEA,IAAI,GAAO;IACV,IAAM,IAAS,EAAS,OAAO,GACzB,IAAe,EAAS,eAAe,GACvC,IAAe,EAAwB;KAC5C;KACA;KACA;IACD,CAAC,GACK,IAAO,EAAS,6BAA6B,GAC7C,IAAQ,EAAS,6BAA6B,GAC9C,IAAiB,EAAc,6BAA6B,GAS5D,IAAY;KACjB;KACA;KACA;KACA;KACA,YAbkB,EAAwB,CAC1C,eACA,oBACD,CAUC;KACA;KACA;KACA,aAAa;MAAE,KAXJ,EAAM,UAAU,UAAU,IAAI;MAWrB,KAVT,EAAM,UAAU,UAAU,IAAI;KAUjB;IACzB;IAEA,IAAiB,CAAS;GAC3B;EACD;EAMW;YAET,kBAAC,GAAD;GACC,MAAK;GACL,cAAa;GACb,WAAW,MAAM,IAAW,EAAE,OAAO,KAAK;GAC1C,GAAI;EACJ,CAAA;CACmB,CAAA;AAEvB"}
@@ -111,3 +111,5 @@ function p(p) {
111
111
  }
112
112
  //#endregion
113
113
  export { p as Select };
114
+
115
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/select/index.tsx"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport { type FocusEvent, useId, useRef, useState } from \"react\";\n\nimport { useForm } from \"../../hooks/useForm\";\nimport { FieldTemplate } from \"../../services/fieldTemplate\";\nimport { IconRenderer } from \"../../services/iconRenderer\";\n\nimport { SelectChevron } from \"./selectChevron\";\nimport { SelectContainer } from \"./selectContainer\";\nimport { SelectContent } from \"./selectContent\";\nimport { SelectOption } from \"./selectOption\";\nimport { SelectOptionsContainer } from \"./selectOptionsContainer\";\nimport { SelectOverlay } from \"./selectOverlay\";\nimport { SelectSpinner } from \"./selectSpinner\";\n\ntype SelectProps = {\n\t/** Field name for form submission. Required. */\n\tname: string;\n\t/** Array of selectable options. Required. */\n\toptions: { label: string; value: string }[];\n\t/** Optional HTML id for the underlying hidden input. */\n\tid?: string;\n\t/** Controlled selected value. */\n\tvalue?: string;\n\t/** Uncontrolled default selected value. @default \"\" */\n\tdefaultValue?: string;\n\t/** Displays an asterisk on the label to signal a required field. */\n\tshowAsterisk?: boolean;\n\t/** Optional label text displayed above the select. */\n\tlabel?: string;\n\t/** Validation error message displayed below the select. */\n\terrorMessage?: string;\n\t/** Placeholder text shown when no option is selected. @default \"Selecione...\" */\n\tplaceholder?: string;\n\t/** Text shown when no options match the search query. @default \"Sem opções disponíveis\" */\n\tnotFoundText?: string;\n\t/** Additional CSS class applied to the wrapper element. */\n\tclassName?: string;\n\t/** Disables all interactions. @default false */\n\tdisabled?: boolean;\n\t/** Prevents value changes while keeping the current value visible. @default false */\n\treadOnly?: boolean;\n\t/** Shows a loading spinner and disables interactions. @default false */\n\tisLoading?: boolean;\n\t/** Enables search/filter within the dropdown. @default false */\n\tisSearchable?: boolean;\n\t/** Closes the dropdown after an option is selected. @default true */\n\tcloseOnSelect?: boolean;\n\t/** Callback fired when the search query changes. Use for async option loading. */\n\tonSearch?: (value: string) => void;\n\t/** Callback fired when the selected value changes. */\n\tonChange?: (value: string) => void;\n\t/** Callback fired when the select gains focus. */\n\tonFocus?: () => void;\n\t/** Callback fired when the select loses focus. */\n\tonBlur?: (e: FocusEvent<HTMLDivElement>) => void;\n\t/**\n\t * Select size.\n\t * @default \"md\"\n\t */\n\tsize?: \"md\" | \"lg\";\n\t/**\n\t * Visual style variant.\n\t * - `solid`: filled background.\n\t * - `outline`: bordered, transparent background.\n\t * - `underline`: bottom border only.\n\t * @default \"solid\"\n\t */\n\tvariant?: \"solid\" | \"outline\" | \"underline\";\n\t/** Text or icon rendered at the far left, outside the select area. */\n\tprefix?: string | LucideIcon;\n\t/** Lucide icon rendered inside the select on the left. */\n\tleftIcon?: LucideIcon;\n\t/** Maximum height (in px) of the options dropdown. */\n\toptionMaxHeight?: number;\n\t/** When true, skips `FieldTemplate` wrapper (label and error text). @default false */\n\tunShowFieldTemplate?: boolean;\n\t/**\n\t * Layout direction forwarded to `FieldTemplate`.\n\t * @default \"horizontal\"\n\t */\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n};\n\n/**\n * Select — single-option dropdown with optional search, label, validation, and form integration.\n *\n * Integrates with `useForm` to display validation errors by field name.\n *\n * @param props.name - Field name for form submission. Required.\n * @param props.options - Array of selectable options (`{ label, value }`). Required.\n * @param props.value - Controlled selected value.\n * @param props.defaultValue - Uncontrolled default value. Default: \"\"\n * @param props.label - Label text displayed above the select.\n * @param props.placeholder - Placeholder shown when nothing is selected. Default: \"Selecione...\"\n * @param props.errorMessage - Validation error message.\n * @param props.isSearchable - Enables search/filter within the dropdown. Default: false\n * @param props.isLoading - Shows a loading spinner and disables interactions. Default: false\n * @param props.closeOnSelect - Closes the dropdown after selecting. Default: true\n * @param props.onChange - Callback fired when the selected value changes.\n * @param props.onSearch - Callback fired when the search query changes.\n * @param props.size - Select size (`md` | `lg`). Default: \"md\"\n * @param props.variant - Visual style variant. Default: \"solid\"\n * @param props.orientation - Layout direction. Default: \"horizontal\"\n * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false\n *\n * @returns Select JSX element wrapped in `FieldTemplate`.\n *\n * @example\n * ```tsx\n * // Basic\n * <Select\n * name=\"category\"\n * options={[\n * { label: \"Technology\", value: \"tech\" },\n * { label: \"Design\", value: \"design\" },\n * ]}\n * />\n *\n * // With label, validation, and searchable\n * <Select\n * name=\"country\"\n * label=\"Country\"\n * showAsterisk\n * isSearchable\n * options={countryOptions}\n * errorMessage={errors.country}\n * notFoundText=\"No countries found\"\n * />\n *\n * // Controlled with async search\n * <Select\n * name=\"tag\"\n * label=\"Tag\"\n * value={selectedTag}\n * onChange={setSelectedTag}\n * onSearch={fetchTagOptions}\n * isLoading={isLoadingTags}\n * options={tagOptions}\n * />\n * ```\n */\n\nfunction Select(props: SelectProps) {\n\tconst {\n\t\tname,\n\t\toptions,\n\t\tclassName: wrapperClassName = \"\",\n\t\tplaceholder = \"Selecione...\",\n\t\tcloseOnSelect = true,\n\t\tdefaultValue = \"\",\n\t\terrorMessage: baseErrorMessage,\n\t\tisLoading = false,\n\t\treadOnly = false,\n\t\tisSearchable = false,\n\t\tid,\n\t\tlabel,\n\t\tshowAsterisk,\n\t\tleftIcon: LeftIcon,\n\t\tonSearch,\n\t\tonChange,\n\t\tonBlur,\n\t\tnotFoundText = \"Sem opções disponíveis\",\n\t\tonFocus,\n\t\tdisabled: baseDisabled = false,\n\t\tprefix,\n\t\tsize = \"md\",\n\t\tvalue,\n\t\tvariant = \"solid\",\n\t\torientation = \"vertical\",\n\t\tunShowFieldTemplate = false,\n\t} = props;\n\n\tconst { fieldErrors } = useForm();\n\n\tconst selectRef = useRef<HTMLInputElement>(null);\n\tconst generatedId = useId();\n\tconst selectId = id || generatedId;\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = !!errorMessage;\n\tconst disabled = baseDisabled || isLoading || readOnly;\n\n\tconst iconSizes = { md: 20, lg: 20 };\n\tconst iconSize = iconSizes[size];\n\n\tconst [search, setSearch] = useState(\"\");\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [selectedOption, setSelectedOption] = useState(defaultValue);\n\n\tconst forceSelectedOptions = value || selectedOption;\n\n\tfunction optionHasSelected(value: string) {\n\t\treturn forceSelectedOptions === value;\n\t}\n\n\tfunction getOptionLabel(value: string) {\n\t\tconst option = options.find((option) => option.value === value);\n\t\treturn option?.label || \"\";\n\t}\n\n\tfunction handleContainerFocus() {\n\t\tif (disabled || !selectRef?.current || isFocused) return;\n\t\tsetIsFocused(true);\n\t\tselectRef.current.focus();\n\t\tonFocus?.();\n\t}\n\n\tfunction handleBlur() {\n\t\tsetIsFocused(false);\n\t\tif (onBlur && selectRef.current) selectRef.current.blur();\n\t}\n\n\tfunction handleSearch(value: string) {\n\t\tsetSearch(value);\n\t\tif (onSearch) onSearch(value);\n\t}\n\n\tfunction handleChangeValue(value: string) {\n\t\tif (optionHasSelected(value)) {\n\t\t\tsetSelectedOption(\"\");\n\t\t\tif (onChange) onChange(\"\");\n\t\t} else {\n\t\t\tsetSelectedOption(value);\n\t\t\tif (onChange) onChange(value);\n\t\t}\n\n\t\tif (closeOnSelect) handleBlur();\n\t}\n\n\tconst mappedOptions = options.filter((option) => {\n\t\tif (props.onSearch) return true;\n\t\tif (!props.isSearchable) return true;\n\t\tif (option.label.toLowerCase().includes(search.toLowerCase())) return true;\n\t\treturn false;\n\t});\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<SelectContainer\n\t\t\t\thandleContainerFocus={handleContainerFocus}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tisError={isError}\n\t\t\t\tisFocused={isFocused}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\tsize={size}\n\t\t\t\tvariant={variant}\n\t\t\t\tprefixExists={!!prefix}\n\t\t\t\tid={selectId}\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tref={selectRef}\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={forceSelectedOptions}\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t/>\n\n\t\t\t\t<IconRenderer iconSize={iconSize} icon={prefix} className=\"prefix\" />\n\n\t\t\t\t{LeftIcon && <LeftIcon size={iconSize} strokeWidth={2.5} />}\n\n\t\t\t\t<SelectContent size={size}>\n\t\t\t\t\t{forceSelectedOptions !== \"\" && (\n\t\t\t\t\t\t<p className=\"hasValue\">{getOptionLabel(forceSelectedOptions)}</p>\n\t\t\t\t\t)}\n\t\t\t\t\t{forceSelectedOptions === \"\" && <p>{placeholder}</p>}\n\t\t\t\t</SelectContent>\n\n\t\t\t\t<SelectOptionsContainer\n\t\t\t\t\tisFocused={isFocused}\n\t\t\t\t\tisSearchable={isSearchable}\n\t\t\t\t\tsearch={search}\n\t\t\t\t\tonSearch={handleSearch}\n\t\t\t\t>\n\t\t\t\t\t{mappedOptions.map(({ label, value }) => (\n\t\t\t\t\t\t<SelectOption\n\t\t\t\t\t\t\tkey={value}\n\t\t\t\t\t\t\tlabel={label}\n\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\thandleChangeValue={handleChangeValue}\n\t\t\t\t\t\t\toptionHasSelected={optionHasSelected}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\n\t\t\t\t\t{mappedOptions.length <= 0 && <p>{notFoundText}</p>}\n\t\t\t\t</SelectOptionsContainer>\n\n\t\t\t\t<SelectChevron\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tisFocused={isFocused}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\ticonSize={iconSize}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t/>\n\n\t\t\t\t<SelectSpinner iconSize={iconSize} isLoading={isLoading} />\n\t\t\t\t<SelectOverlay handleBlur={handleBlur} isFocused={isFocused} />\n\t\t\t</SelectContainer>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { Select };\n"],"mappings":";;;;;;;;;;;;;AA+IA,SAAS,EAAO,GAAoB;CACnC,IAAM,EACL,SACA,YACA,WAAW,IAAmB,IAC9B,iBAAc,gBACd,mBAAgB,IAChB,kBAAe,IACf,cAAc,GACd,eAAY,IACZ,cAAW,IACX,mBAAe,IACf,QACA,WACA,iBACA,UAAU,GACV,aACA,aACA,WACA,kBAAe,0BACf,YACA,UAAU,IAAe,IACzB,WACA,UAAO,MACP,UACA,aAAU,SACV,iBAAc,YACd,yBAAsB,OACnB,GAEE,EAAE,mBAAgB,EAAQ,GAE1B,IAAY,EAAyB,IAAI,GACzC,KAAc,EAAM,GACpB,IAAW,MAAM,IAEjB,IAAe,KAAoB,IAAc,IACjD,IAAU,CAAC,CAAC,GACZ,IAAW,KAAgB,KAAa,GAGxC,IAAW;EADG,IAAI;EAAI,IAAI;CACf,EAAU,IAErB,CAAC,GAAQ,KAAa,EAAS,EAAE,GACjC,CAAC,GAAW,KAAgB,EAAS,EAAK,GAC1C,CAAC,GAAgB,KAAqB,EAAS,CAAY,GAE3D,IAAuB,KAAS;CAEtC,SAAS,EAAkB,GAAe;EACzC,OAAO,MAAyB;CACjC;CAEA,SAAS,GAAe,GAAe;EAEtC,OADe,EAAQ,MAAM,MAAW,EAAO,UAAU,CAClD,CAAA,EAAQ,SAAS;CACzB;CAEA,SAAS,KAAuB;EAC3B,KAAY,CAAC,GAAW,WAAW,MACvC,EAAa,EAAI,GACjB,EAAU,QAAQ,MAAM,GACxB,IAAU;CACX;CAEA,SAAS,IAAa;EAErB,AADA,EAAa,EAAK,GACd,KAAU,EAAU,WAAS,EAAU,QAAQ,KAAK;CACzD;CAEA,SAAS,GAAa,GAAe;EAEpC,AADA,EAAU,CAAK,GACX,KAAU,EAAS,CAAK;CAC7B;CAEA,SAAS,GAAkB,GAAe;EASzC,AARI,EAAkB,CAAK,KAC1B,EAAkB,EAAE,GAChB,KAAU,EAAS,EAAE,MAEzB,EAAkB,CAAK,GACnB,KAAU,EAAS,CAAK,IAGzB,KAAe,EAAW;CAC/B;CAEA,IAAM,IAAgB,EAAQ,QAAQ,MAGrC,GAFI,EAAM,YACN,CAAC,EAAM,gBACP,EAAO,MAAM,YAAY,CAAC,CAAC,SAAS,EAAO,YAAY,CAAC,EAE5D;CAED,OACC,kBAAC,GAAD;EACO;EACC;EACO;EACd,WAAW;EACG;EACO;EACR;YAEb,kBAAC,GAAD;GACuB;GACZ;GACD;GACE;GACA;GACD;GACJ;GACG;GACT,cAAc,CAAC,CAAC;GAChB,IAAI;aAVL;IAYC,kBAAC,SAAD;KACC,KAAK;KACC;KACN,OAAO;KACP,MAAK;IACL,CAAA;IAED,kBAAC,GAAD;KAAwB;KAAU,MAAM;KAAQ,WAAU;IAAU,CAAA;IAEnE,KAAY,kBAAC,GAAD;KAAU,MAAM;KAAU,aAAa;IAAM,CAAA;IAE1D,kBAAC,GAAD;KAAqB;eAArB,CACE,MAAyB,MACzB,kBAAC,KAAD;MAAG,WAAU;gBAAY,GAAe,CAAoB;KAAK,CAAA,GAEjE,MAAyB,MAAM,kBAAC,KAAD,EAAA,UAAI,EAAe,CAAA,CACrC;;IAEf,kBAAC,GAAD;KACY;KACG;KACN;KACR,UAAU;eAJX,CAME,EAAc,KAAK,EAAE,UAAO,eAC5B,kBAAC,GAAD;MAEQ;MACA;MACD;MACa;MACA;KACnB,GANK,CAML,CACD,GAEA,EAAc,UAAU,KAAK,kBAAC,KAAD,EAAA,UAAI,EAAgB,CAAA,CAC3B;;IAExB,kBAAC,GAAD;KACW;KACC;KACD;KACA;KACC;IACX,CAAA;IAED,kBAAC,IAAD;KAAyB;KAAqB;IAAY,CAAA;IAC1D,kBAAC,IAAD;KAA2B;KAAuB;IAAY,CAAA;GAC9C;;CACH,CAAA;AAEjB"}
@@ -17,3 +17,5 @@ function n(n) {
17
17
  }
18
18
  //#endregion
19
19
  export { n as SelectChevron };
20
+
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/select/selectChevron/index.tsx"],"sourcesContent":["import { ChevronDown } from \"lucide-react\";\nimport \"./styles.css\";\n\ntype SelectChevronProps = {\n\tisLoading: boolean;\n\ticonSize: number;\n\tdisabled: boolean;\n\treadOnly: boolean;\n\tisFocused: boolean;\n};\n\nfunction SelectChevron(props: SelectChevronProps) {\n\tconst { iconSize, isLoading, disabled, readOnly, isFocused } = props;\n\n\tconst notAnimate = disabled || readOnly ? \"notAnimate\" : \"\";\n\tconst focused = isFocused ? \"focused\" : \"\";\n\n\tconst className = `arkynSelectChevron ${notAnimate} ${focused}`;\n\n\tif (isLoading) return null;\n\treturn (\n\t\t<ChevronDown\n\t\t\tclassName={className}\n\t\t\tstrokeWidth={2.5}\n\t\t\tstyle={{\n\t\t\t\tminWidth: iconSize,\n\t\t\t\tminHeight: iconSize,\n\t\t\t\tmaxWidth: iconSize,\n\t\t\t\tmaxHeight: iconSize,\n\t\t\t}}\n\t\t/>\n\t);\n}\n\nexport { SelectChevron };\n"],"mappings":";;;;AAWA,SAAS,EAAc,GAA2B;CACjD,IAAM,EAAE,aAAU,cAAW,aAAU,aAAU,iBAAc;CAQ/D,OADI,IAAkB,OAErB,kBAAC,GAAD;EACY,iCARM,KAAY,IAAW,eAAe,GAGN,GAFnC,IAAY,YAAY;EAQtC,aAAa;EACb,OAAO;GACN,UAAU;GACV,WAAW;GACX,UAAU;GACV,WAAW;EACZ;CACA,CAAA;AAEH"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynSelectChevron{color:var(--text-muted);transition:all .15s ease-in-out}.arkynSelectChevron:not(.notAnimate).focused{transform:rotate(180deg)}}
@@ -12,3 +12,5 @@ function t(t) {
12
12
  }
13
13
  //#endregion
14
14
  export { t as SelectContainer };
15
+
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/select/selectContainer/index.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport \"./styles.css\";\n\ntype SelectContainerProps = {\n\tchildren: ReactNode;\n\thandleContainerFocus: () => void;\n\tprefixExists: boolean;\n\tisError: boolean;\n\tdisabled: boolean;\n\treadOnly: boolean;\n\tisLoading: boolean;\n\tisFocused: boolean;\n\tclassName?: string;\n\tid: string;\n\tvariant: \"solid\" | \"outline\" | \"underline\";\n\tsize: \"md\" | \"lg\";\n};\n\nfunction SelectContainer(props: SelectContainerProps) {\n\tconst {\n\t\tchildren,\n\t\thandleContainerFocus,\n\t\tdisabled,\n\t\tisError,\n\t\tisLoading,\n\t\tisFocused,\n\t\tclassName,\n\t\treadOnly,\n\t\tvariant,\n\t\tsize,\n\t\tid,\n\t\tprefixExists,\n\t} = props;\n\n\tconst hasPrefix = prefixExists ? \"hasPrefix\" : \"\";\n\tconst errored = isError ? \"errored\" : \"\";\n\tconst opacity = disabled || readOnly || isLoading ? \"opacity\" : \"\";\n\tconst focused = isFocused ? \"focused\" : \"\";\n\n\treturn (\n\t\t<section\n\t\t\tid={id}\n\t\t\tclassName={`arkynSelectContainer ${hasPrefix} ${variant} ${size} ${opacity} ${errored} ${focused} ${className}`}\n\t\t\tonClick={handleContainerFocus}\n\t\t>\n\t\t\t{children}\n\t\t</section>\n\t);\n}\n\nexport { SelectContainer };\n"],"mappings":";;;AAkBA,SAAS,EAAgB,GAA6B;CACrD,IAAM,EACL,aACA,yBACA,aACA,YACA,cACA,cACA,cACA,aACA,YACA,SACA,OACA,oBACG;CAOJ,OACC,kBAAC,WAAD;EACK;EACJ,WAAW,wBARK,IAAe,cAAc,GAQA,GAAG,EAAQ,GAAG,EAAK,GANlD,KAAY,KAAY,IAAY,YAAY,GAMa,GAP7D,IAAU,YAAY,GAOkD,GALxE,IAAY,YAAY,GAK2D,GAAG;EACpG,SAAS;EAER;CACO,CAAA;AAEX"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynSelectContainer{border:1px solid #0000;border-radius:8px;outline:1px solid #0000;align-items:center;gap:8px;width:100%;padding:0 16px;display:flex;position:relative}.arkynSelectContainer:hover{cursor:pointer}.arkynSelectContainer.opacity{opacity:.5}.arkynSelectContainer .prefix{color:var(--text-body);background:var(--border);border-right:1px solid var(--border);border-radius:5px 0 0 5px;justify-content:center;align-items:center;font-weight:400;display:flex;position:absolute;top:0;bottom:0;left:0}.arkynSelectContainer>svg{color:var(--text-muted)}.arkynSelectContainer.errored>svg{color:rgb(var(--spotlight-danger))}.arkynSelectContainer:not(.opacity).focused>svg{color:rgb(var(--spotlight-primary))}.arkynSelectContainer.solid{border-color:var(--border);background-color:var(--input-background)}.arkynSelectContainer.solid.errored{border-color:rgb(var(--spotlight-danger));outline-color:rgb(var(--spotlight-danger))}.arkynSelectContainer:not(.opacity).solid.focused{border-color:rgb(var(--spotlight-primary));outline-color:rgb(var(--spotlight-primary))}.arkynSelectContainer.outline{border-color:var(--border);background-color:var(--background-foreground)}.arkynSelectContainer.outline.errored{border-color:rgb(var(--spotlight-danger));outline-color:rgb(var(--spotlight-danger))}.arkynSelectContainer:not(.opacity).outline.focused{border-color:rgb(var(--spotlight-primary));outline-color:rgb(var(--spotlight-primary))}.arkynSelectContainer.underline{border-top:none;border-left:none;border-right:none;border-color:var(--border);border-radius:0;outline:none}.arkynSelectContainer.underline .prefix{display:none}.arkynSelectContainer.underline:before{content:" ";background:0 0;height:1px;position:absolute;bottom:-2px;left:0;right:0}.arkynSelectContainer.underline.errored{border-color:rgba(var(--spotlight-danger))}.arkynSelectContainer.underline.errored:before{background:rgba(var(--spotlight-danger))}.arkynSelectContainer:not(.opacity).underline.focused{border-color:rgba(var(--spotlight-primary))}.arkynSelectContainer:not(.opacity).underline.focused:before{background:rgba(var(--spotlight-primary))}.arkynSelectContainer.md{min-height:40px}.arkynSelectContainer.md.hasPrefix{padding-left:60px}.arkynSelectContainer.md .prefix{width:44px;height:40px;font-size:14px}.arkynSelectContainer.lg{min-height:44px}.arkynSelectContainer.lg .prefix{width:48px;height:44px;font-size:16px}.arkynSelectContainer.lg.hasPrefix{padding-left:64px}}
@@ -10,3 +10,5 @@ function t(t) {
10
10
  }
11
11
  //#endregion
12
12
  export { t as SelectContent };
13
+
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/select/selectContent/index.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport \"./styles.css\";\n\ntype SelectContentProps = {\n\tchildren: ReactNode;\n\tsize: \"md\" | \"lg\";\n};\n\nfunction SelectContent(props: SelectContentProps) {\n\tconst { children, size } = props;\n\tconst className = `arkynSelectContent ${size}`;\n\treturn <div className={className}>{children}</div>;\n}\n\nexport { SelectContent };\n"],"mappings":";;;AAQA,SAAS,EAAc,GAA2B;CACjD,IAAM,EAAE,aAAU,YAAS;CAE3B,OAAO,kBAAC,OAAD;EAAgB,WAAA,sBADiB;EACL;CAAc,CAAA;AAClD"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynSelectContent{flex-wrap:wrap;flex:1;align-items:start;gap:4px;display:flex}.arkynSelectContent>p{color:var(--text-muted);-webkit-user-select:none;user-select:none;font-weight:400}.arkynSelectContent>p.hasValue{color:var(--text-body)}.arkynSelectContent.md>p{font-size:14px;line-height:14px}.arkynSelectContent.lg>p{font-size:16px;line-height:16px}}
@@ -16,3 +16,5 @@ function r(r) {
16
16
  }
17
17
  //#endregion
18
18
  export { r as SelectOption };
19
+
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/select/selectOption/index.tsx"],"sourcesContent":["import { Check } from \"lucide-react\";\nimport \"./styles.css\";\n\ntype SelectOptionProps = {\n\tvalue: string;\n\tlabel: string;\n\tsize: \"md\" | \"lg\";\n\toptionHasSelected: (value: string) => boolean;\n\thandleChangeValue: (value: string) => void;\n};\n\nfunction SelectOption(props: SelectOptionProps) {\n\tconst { label, optionHasSelected, handleChangeValue, value, size } = props;\n\n\tconst hasActive = optionHasSelected(value) ? \"active\" : \"\";\n\tconst className = `arkynSelectOption ${size} ${hasActive}`;\n\n\treturn (\n\t\t<div onClick={() => handleChangeValue(value)} className={className}>\n\t\t\t{label} <Check />\n\t\t</div>\n\t);\n}\n\nexport { SelectOption };\n"],"mappings":";;;;AAWA,SAAS,EAAa,GAA0B;CAC/C,IAAM,EAAE,UAAO,sBAAmB,sBAAmB,UAAO,YAAS;CAKrE,OACC,kBAAC,OAAD;EAAK,eAAe,EAAkB,CAAK;EAAc,WAAA,qBAHnB,EAAK,GAD1B,EAAkB,CAAK,IAAI,WAAW;YAIvD;GACE;GAAM;GAAC,kBAAC,GAAD,CAAQ,CAAA;EACZ;;AAEP"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynSelectOption{color:var(--text-body);background-color:inherit;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;font-weight:400;line-height:21.79px;display:flex}.arkynSelectOption.md{padding:8px 16px;font-size:14px}.arkynSelectOption.lg{padding:8px 16px;font-size:16px}.arkynSelectOption svg{width:20px;height:20px;color:rgb(var(--spotlight-primary));display:none}.arkynSelectOption:hover{cursor:pointer;filter:brightness(.98)}.arkynSelectOption.active{color:var(--text-heading);filter:brightness(.95);font-weight:600}.arkynSelectOption.active svg{display:unset}html.dark .arkynSelectOption:hover,html.dark .arkynSelectOption.active{filter:brightness(1.2)}}
@@ -34,3 +34,5 @@ function c(c) {
34
34
  }
35
35
  //#endregion
36
36
  export { c as SelectOptionsContainer };
37
+
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/select/selectOptionsContainer/index.tsx"],"sourcesContent":["import { Search } from \"lucide-react\";\nimport {\n\ttype ChangeEvent,\n\ttype ReactNode,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n} from \"react\";\n\nimport { useScrollLock } from \"../../../hooks/useScrollLock\";\nimport { Input } from \"../../input\";\n\nimport \"./styles.css\";\n\ntype SelectOptionsContainerProps = {\n\tisFocused: boolean;\n\tisSearchable: boolean;\n\tchildren: ReactNode;\n\tsearch: string;\n\tonSearch: (value: string) => void;\n};\n\nfunction SelectOptionsContainer(props: SelectOptionsContainerProps) {\n\tconst { children, isFocused, isSearchable, search, onSearch } = props;\n\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst [position, setPosition] = useState<\"bottom\" | \"top\">(\"bottom\");\n\n\tuseScrollLock(isFocused);\n\n\tuseEffect(() => {\n\t\tif (!isFocused) return;\n\n\t\tconst checkContainerPosition = () => {\n\t\t\tif (!containerRef.current) return;\n\n\t\t\tconst parentElement = containerRef.current.parentElement;\n\t\t\tif (!parentElement) return;\n\n\t\t\tconst parentRect = parentElement.getBoundingClientRect();\n\t\t\tconst viewportHeight = window.innerHeight;\n\n\t\t\tconst estimatedContainerHeight = 300;\n\t\t\tconst spaceBelow = viewportHeight - parentRect.bottom;\n\n\t\t\tif (\n\t\t\t\tspaceBelow < estimatedContainerHeight &&\n\t\t\t\tparentRect.top > estimatedContainerHeight\n\t\t\t) {\n\t\t\t\tsetPosition(\"top\");\n\t\t\t} else {\n\t\t\t\tsetPosition(\"bottom\");\n\t\t\t}\n\t\t};\n\n\t\tcheckContainerPosition();\n\t}, [isFocused]);\n\n\tfunction handleSearch(e: ChangeEvent<HTMLInputElement>) {\n\t\tif (!isSearchable) return;\n\t\tonSearch(e.target.value);\n\t}\n\n\tif (!isFocused) return null;\n\n\treturn (\n\t\t<div\n\t\t\tref={containerRef}\n\t\t\tclassName={`arkynSelectOptionsContainer ${position}`}\n\t\t>\n\t\t\t{isSearchable && (\n\t\t\t\t<Input\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\tname=\"search-select\"\n\t\t\t\t\tvariant=\"underline\"\n\t\t\t\t\tleftIcon={Search}\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonChange={handleSearch}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { SelectOptionsContainer };\n"],"mappings":";;;;;;;AAsBA,SAAS,EAAuB,GAAoC;CACnE,IAAM,EAAE,aAAU,cAAW,iBAAc,WAAQ,gBAAa,GAE1D,IAAe,EAAuB,IAAI,GAC1C,CAAC,GAAU,KAAe,EAA2B,QAAQ;CAInE,AAFA,EAAc,CAAS,GAEvB,QAAgB;EACV,YAEgC;GACpC,IAAI,CAAC,EAAa,SAAS;GAE3B,IAAM,IAAgB,EAAa,QAAQ;GAC3C,IAAI,CAAC,GAAe;GAEpB,IAAM,IAAa,EAAc,sBAAsB;GAMvD,AALuB,OAAO,cAGM,EAAW,SAGjC,OACb,EAAW,MAAM,MAEjB,EAAY,KAAK,IAEjB,EAAY,QAAQ;EAEtB,EAEA,CAAuB;CACxB,GAAG,CAAC,CAAS,CAAC;CAEd,SAAS,EAAa,GAAkC;EAClD,KACL,EAAS,EAAE,OAAO,KAAK;CACxB;CAIA,OAFK,IAGJ,kBAAC,OAAD;EACC,KAAK;EACL,WAAW,+BAA+B;YAF3C,CAIE,KACA,kBAAC,GAAD;GACC,MAAK;GACL,MAAK;GACL,SAAQ;GACR,UAAU;GACV,OAAO;GACP,UAAU;EACV,CAAA,GAGD,CACG;MAnBiB;AAqBxB"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynSelectOptionsContainer{z-index:7;border:1px solid var(--border);background-color:var(--background-foreground);border-radius:6px;flex-direction:column;flex:1;height:max-content;max-height:300px;list-style:none;display:flex;position:absolute;left:-2px;right:-2px;overflow:auto;box-shadow:0 4px 8px #0000001a}.arkynSelectOptionsContainer.bottom{top:calc(100% + 5px)}.arkynSelectOptionsContainer.top{bottom:calc(100% + 5px)}.arkynSelectOptionsContainer>p{text-align:center;color:var(--text-body);padding:16px;font-size:14px;font-weight:400;line-height:21.79px}}
@@ -10,3 +10,5 @@ function t(t) {
10
10
  }
11
11
  //#endregion
12
12
  export { t as SelectOverlay };
13
+
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/select/selectOverlay/index.tsx"],"sourcesContent":["import \"./styles.css\";\n\ntype SelectOverlayProps = {\n\tisFocused: boolean;\n\thandleBlur: () => void;\n};\n\nfunction SelectOverlay(props: SelectOverlayProps) {\n\tconst { isFocused, handleBlur } = props;\n\tif (!isFocused) return null;\n\treturn <aside className=\"arkynSelectOverlay\" onClick={handleBlur} />;\n}\n\nexport { SelectOverlay };\n"],"mappings":";;;AAOA,SAAS,EAAc,GAA2B;CACjD,IAAM,EAAE,cAAW,kBAAe;CAElC,OADK,IACE,kBAAC,SAAD;EAAO,WAAU;EAAqB,SAAS;CAAa,CAAA,IAD5C;AAExB"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynSelectOverlay{z-index:5;position:fixed;inset:0}}
@@ -12,3 +12,5 @@ function n(n) {
12
12
  }
13
13
  //#endregion
14
14
  export { n as SelectSpinner };
15
+
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/select/selectSpinner/index.tsx"],"sourcesContent":["import { Loader2 } from \"lucide-react\";\nimport \"./styles.css\";\n\ntype SelectSpinnerProps = {\n\ticonSize: number;\n\tisLoading: boolean;\n};\n\nfunction SelectSpinner(props: SelectSpinnerProps) {\n\tconst { iconSize, isLoading } = props;\n\n\tif (!isLoading) return null;\n\treturn (\n\t\t<Loader2 className=\"arkynSelectSpinner\" size={iconSize} strokeWidth={2.5} />\n\t);\n}\n\nexport { SelectSpinner };\n"],"mappings":";;;;AAQA,SAAS,EAAc,GAA2B;CACjD,IAAM,EAAE,aAAU,iBAAc;CAGhC,OADK,IAEJ,kBAAC,GAAD;EAAS,WAAU;EAAqB,MAAM;EAAU,aAAa;CAAM,CAAA,IAFrD;AAIxB"}
@@ -0,0 +1 @@
1
+ @layer arkyn{.arkynSelectSpinner{animation:2s linear infinite spin}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}}