@codeleap/web 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/dist/components/ActivityIndicator/index.js +28 -0
  2. package/dist/components/ActivityIndicator/index.js.map +1 -0
  3. package/dist/components/ActivityIndicator/styles.js +2 -0
  4. package/dist/components/ActivityIndicator/styles.js.map +1 -0
  5. package/dist/components/ActivityIndicator/types.js +2 -0
  6. package/dist/components/ActivityIndicator/types.js.map +1 -0
  7. package/dist/components/Badge/index.js +68 -0
  8. package/dist/components/Badge/index.js.map +1 -0
  9. package/dist/components/Badge/styles.js +2 -0
  10. package/dist/components/Badge/styles.js.map +1 -0
  11. package/dist/components/Badge/types.js +2 -0
  12. package/dist/components/Badge/types.js.map +1 -0
  13. package/dist/components/Button/index.js +52 -0
  14. package/dist/components/Button/index.js.map +1 -0
  15. package/dist/components/Button/styles.js +2 -0
  16. package/dist/components/Button/styles.js.map +1 -0
  17. package/dist/components/Button/types.js +2 -0
  18. package/dist/components/Button/types.js.map +1 -0
  19. package/dist/components/Calendar/index.js +50 -0
  20. package/dist/components/Calendar/index.js.map +1 -0
  21. package/dist/components/Calendar/styles.js +2 -0
  22. package/dist/components/Calendar/styles.js.map +1 -0
  23. package/dist/components/Calendar/types.js +2 -0
  24. package/dist/components/Calendar/types.js.map +1 -0
  25. package/dist/components/Carousel/index.js +129 -0
  26. package/dist/components/Carousel/index.js.map +1 -0
  27. package/dist/components/Carousel/styles.js +2 -0
  28. package/dist/components/Carousel/styles.js.map +1 -0
  29. package/dist/components/Carousel/types.js +2 -0
  30. package/dist/components/Carousel/types.js.map +1 -0
  31. package/dist/components/Checkbox/index.js +44 -0
  32. package/dist/components/Checkbox/index.js.map +1 -0
  33. package/dist/components/Checkbox/styles.js +2 -0
  34. package/dist/components/Checkbox/styles.js.map +1 -0
  35. package/dist/components/Checkbox/types.js +2 -0
  36. package/dist/components/Checkbox/types.js.map +1 -0
  37. package/dist/components/Collapse/index.js +27 -0
  38. package/dist/components/Collapse/index.js.map +1 -0
  39. package/dist/components/Collapse/styles.js +2 -0
  40. package/dist/components/Collapse/styles.js.map +1 -0
  41. package/dist/components/Collapse/types.js +2 -0
  42. package/dist/components/Collapse/types.js.map +1 -0
  43. package/dist/components/ColorPicker/index.js +65 -0
  44. package/dist/components/ColorPicker/index.js.map +1 -0
  45. package/dist/components/ColorPicker/styles.js +2 -0
  46. package/dist/components/ColorPicker/styles.js.map +1 -0
  47. package/dist/components/ColorPicker/types.js +2 -0
  48. package/dist/components/ColorPicker/types.js.map +1 -0
  49. package/dist/components/CropPicker/hooks.js +130 -0
  50. package/dist/components/CropPicker/hooks.js.map +1 -0
  51. package/dist/components/CropPicker/index.js +38 -0
  52. package/dist/components/CropPicker/index.js.map +1 -0
  53. package/dist/components/CropPicker/styles.js +2 -0
  54. package/dist/components/CropPicker/styles.js.map +1 -0
  55. package/dist/components/CropPicker/types.js +2 -0
  56. package/dist/components/CropPicker/types.js.map +1 -0
  57. package/dist/components/CropPicker/utils.js +70 -0
  58. package/dist/components/CropPicker/utils.js.map +1 -0
  59. package/dist/components/DatePicker/index.js +70 -0
  60. package/dist/components/DatePicker/index.js.map +1 -0
  61. package/dist/components/DatePicker/styles.js +2 -0
  62. package/dist/components/DatePicker/styles.js.map +1 -0
  63. package/dist/components/DatePicker/types.js +2 -0
  64. package/dist/components/DatePicker/types.js.map +1 -0
  65. package/dist/components/Drawer/index.js +50 -0
  66. package/dist/components/Drawer/index.js.map +1 -0
  67. package/dist/components/Drawer/styles.js +2 -0
  68. package/dist/components/Drawer/styles.js.map +1 -0
  69. package/dist/components/Drawer/types.js +2 -0
  70. package/dist/components/Drawer/types.js.map +1 -0
  71. package/dist/components/Dropzone/context.js +39 -0
  72. package/dist/components/Dropzone/context.js.map +1 -0
  73. package/dist/components/Dropzone/elements.js +51 -0
  74. package/dist/components/Dropzone/elements.js.map +1 -0
  75. package/dist/components/Dropzone/index.js +71 -0
  76. package/dist/components/Dropzone/index.js.map +1 -0
  77. package/dist/components/Dropzone/styles.js +2 -0
  78. package/dist/components/Dropzone/styles.js.map +1 -0
  79. package/dist/components/Dropzone/types.js +2 -0
  80. package/dist/components/Dropzone/types.js.map +1 -0
  81. package/dist/components/Dropzone/useDropzone.js +17 -0
  82. package/dist/components/Dropzone/useDropzone.js.map +1 -0
  83. package/dist/components/EmptyPlaceholder/index.js +65 -0
  84. package/dist/components/EmptyPlaceholder/index.js.map +1 -0
  85. package/dist/components/EmptyPlaceholder/styles.js +2 -0
  86. package/dist/components/EmptyPlaceholder/styles.js.map +1 -0
  87. package/dist/components/EmptyPlaceholder/types.js +2 -0
  88. package/dist/components/EmptyPlaceholder/types.js.map +1 -0
  89. package/dist/components/Field/context.js +52 -0
  90. package/dist/components/Field/context.js.map +1 -0
  91. package/dist/components/Field/elements.js +84 -0
  92. package/dist/components/Field/elements.js.map +1 -0
  93. package/dist/components/Field/index.js +37 -0
  94. package/dist/components/Field/index.js.map +1 -0
  95. package/dist/components/Field/styles.js +2 -0
  96. package/dist/components/Field/styles.js.map +1 -0
  97. package/dist/components/Field/types.js +2 -0
  98. package/dist/components/Field/types.js.map +1 -0
  99. package/dist/components/Field/useFieldInput.js +47 -0
  100. package/dist/components/Field/useFieldInput.js.map +1 -0
  101. package/dist/components/FileInput/index.js +55 -0
  102. package/dist/components/FileInput/index.js.map +1 -0
  103. package/dist/components/FileInput/types.js +2 -0
  104. package/dist/components/FileInput/types.js.map +1 -0
  105. package/dist/components/Icon/index.js +51 -0
  106. package/dist/components/Icon/index.js.map +1 -0
  107. package/dist/components/Icon/styles.js +2 -0
  108. package/dist/components/Icon/styles.js.map +1 -0
  109. package/dist/components/Icon/types.js +2 -0
  110. package/dist/components/Icon/types.js.map +1 -0
  111. package/dist/components/List/context.js +76 -0
  112. package/dist/components/List/context.js.map +1 -0
  113. package/dist/components/List/elements.js +123 -0
  114. package/dist/components/List/elements.js.map +1 -0
  115. package/dist/components/List/index.js +35 -0
  116. package/dist/components/List/index.js.map +1 -0
  117. package/dist/components/List/scroll.js +75 -0
  118. package/dist/components/List/scroll.js.map +1 -0
  119. package/dist/components/List/styles.js +2 -0
  120. package/dist/components/List/styles.js.map +1 -0
  121. package/dist/components/List/types.js +2 -0
  122. package/dist/components/List/types.js.map +1 -0
  123. package/dist/components/LoadingOverlay/index.js +32 -0
  124. package/dist/components/LoadingOverlay/index.js.map +1 -0
  125. package/dist/components/LoadingOverlay/styles.js +2 -0
  126. package/dist/components/LoadingOverlay/styles.js.map +1 -0
  127. package/dist/components/LoadingOverlay/types.js +2 -0
  128. package/dist/components/LoadingOverlay/types.js.map +1 -0
  129. package/dist/components/MaskedTextInput/index.js +34 -0
  130. package/dist/components/MaskedTextInput/index.js.map +1 -0
  131. package/dist/components/MaskedTextInput/mask.js +34 -0
  132. package/dist/components/MaskedTextInput/mask.js.map +1 -0
  133. package/dist/components/MaskedTextInput/types.js +2 -0
  134. package/dist/components/MaskedTextInput/types.js.map +1 -0
  135. package/dist/components/Modal/context.js +36 -0
  136. package/dist/components/Modal/context.js.map +1 -0
  137. package/dist/components/Modal/elements.js +66 -0
  138. package/dist/components/Modal/elements.js.map +1 -0
  139. package/dist/components/Modal/index.js +34 -0
  140. package/dist/components/Modal/index.js.map +1 -0
  141. package/dist/components/Modal/styles.js +2 -0
  142. package/dist/components/Modal/styles.js.map +1 -0
  143. package/dist/components/Modal/types.js +2 -0
  144. package/dist/components/Modal/types.js.map +1 -0
  145. package/dist/components/NumberIncrement/index.js +65 -0
  146. package/dist/components/NumberIncrement/index.js.map +1 -0
  147. package/dist/components/NumberIncrement/styles.js +2 -0
  148. package/dist/components/NumberIncrement/styles.js.map +1 -0
  149. package/dist/components/NumberIncrement/types.js +2 -0
  150. package/dist/components/NumberIncrement/types.js.map +1 -0
  151. package/dist/components/NumberIncrement/useNumberIncrement.js +113 -0
  152. package/dist/components/NumberIncrement/useNumberIncrement.js.map +1 -0
  153. package/dist/components/Overlay/index.js +44 -0
  154. package/dist/components/Overlay/index.js.map +1 -0
  155. package/dist/components/Overlay/styles.js +2 -0
  156. package/dist/components/Overlay/styles.js.map +1 -0
  157. package/dist/components/Overlay/types.js +2 -0
  158. package/dist/components/Overlay/types.js.map +1 -0
  159. package/dist/components/PaginationButtons/index.js +100 -0
  160. package/dist/components/PaginationButtons/index.js.map +1 -0
  161. package/dist/components/PaginationButtons/styles.js +2 -0
  162. package/dist/components/PaginationButtons/styles.js.map +1 -0
  163. package/dist/components/PaginationButtons/types.js +2 -0
  164. package/dist/components/PaginationButtons/types.js.map +1 -0
  165. package/dist/components/PaginationIndicator/index.js +41 -0
  166. package/dist/components/PaginationIndicator/index.js.map +1 -0
  167. package/dist/components/PaginationIndicator/styles.js +2 -0
  168. package/dist/components/PaginationIndicator/styles.js.map +1 -0
  169. package/dist/components/PaginationIndicator/types.js +2 -0
  170. package/dist/components/PaginationIndicator/types.js.map +1 -0
  171. package/dist/components/Progress/Bar/Segmented.js +37 -0
  172. package/dist/components/Progress/Bar/Segmented.js.map +1 -0
  173. package/dist/components/Progress/Bar/index.js +44 -0
  174. package/dist/components/Progress/Bar/index.js.map +1 -0
  175. package/dist/components/Progress/Bar/styles.js +2 -0
  176. package/dist/components/Progress/Bar/styles.js.map +1 -0
  177. package/dist/components/Progress/Bar/types.js +2 -0
  178. package/dist/components/Progress/Bar/types.js.map +1 -0
  179. package/dist/components/Progress/Circle/Segmented.js +60 -0
  180. package/dist/components/Progress/Circle/Segmented.js.map +1 -0
  181. package/dist/components/Progress/Circle/index.js +65 -0
  182. package/dist/components/Progress/Circle/index.js.map +1 -0
  183. package/dist/components/Progress/Circle/styles.js +2 -0
  184. package/dist/components/Progress/Circle/styles.js.map +1 -0
  185. package/dist/components/Progress/Circle/types.js +2 -0
  186. package/dist/components/Progress/Circle/types.js.map +1 -0
  187. package/dist/components/Progress/index.js +3 -0
  188. package/dist/components/Progress/index.js.map +1 -0
  189. package/dist/components/Progress/utils.js +4 -0
  190. package/dist/components/Progress/utils.js.map +1 -0
  191. package/dist/components/RadioInput/index.js +47 -0
  192. package/dist/components/RadioInput/index.js.map +1 -0
  193. package/dist/components/RadioInput/styles.js +2 -0
  194. package/dist/components/RadioInput/styles.js.map +1 -0
  195. package/dist/components/RadioInput/types.js +2 -0
  196. package/dist/components/RadioInput/types.js.map +1 -0
  197. package/dist/components/SearchInput/index.js +61 -0
  198. package/dist/components/SearchInput/index.js.map +1 -0
  199. package/dist/components/SectionFilters/index.js +148 -0
  200. package/dist/components/SectionFilters/index.js.map +1 -0
  201. package/dist/components/SectionFilters/styles.js +2 -0
  202. package/dist/components/SectionFilters/styles.js.map +1 -0
  203. package/dist/components/SectionFilters/types.js +2 -0
  204. package/dist/components/SectionFilters/types.js.map +1 -0
  205. package/dist/components/Select/context.js +156 -0
  206. package/dist/components/Select/context.js.map +1 -0
  207. package/dist/components/Select/elements.js +47 -0
  208. package/dist/components/Select/elements.js.map +1 -0
  209. package/dist/components/Select/index.js +53 -0
  210. package/dist/components/Select/index.js.map +1 -0
  211. package/dist/components/Select/styles.js +2 -0
  212. package/dist/components/Select/styles.js.map +1 -0
  213. package/dist/components/Select/types.js +2 -0
  214. package/dist/components/Select/types.js.map +1 -0
  215. package/dist/components/Select/useTriggerWidth.js +27 -0
  216. package/dist/components/Select/useTriggerWidth.js.map +1 -0
  217. package/dist/components/Slider/index.js +139 -0
  218. package/dist/components/Slider/index.js.map +1 -0
  219. package/dist/components/Slider/styles.js +2 -0
  220. package/dist/components/Slider/styles.js.map +1 -0
  221. package/dist/components/Slider/types.js +2 -0
  222. package/dist/components/Slider/types.js.map +1 -0
  223. package/dist/components/Switch/index.js +48 -0
  224. package/dist/components/Switch/index.js.map +1 -0
  225. package/dist/components/Switch/styles.js +2 -0
  226. package/dist/components/Switch/styles.js.map +1 -0
  227. package/dist/components/Switch/types.js +2 -0
  228. package/dist/components/Switch/types.js.map +1 -0
  229. package/dist/components/Tag/index.js +53 -0
  230. package/dist/components/Tag/index.js.map +1 -0
  231. package/dist/components/Tag/styles.js +2 -0
  232. package/dist/components/Tag/styles.js.map +1 -0
  233. package/dist/components/Tag/types.js +2 -0
  234. package/dist/components/Tag/types.js.map +1 -0
  235. package/dist/components/Text/index.js +94 -0
  236. package/dist/components/Text/index.js.map +1 -0
  237. package/dist/components/Text/styles.js +2 -0
  238. package/dist/components/Text/styles.js.map +1 -0
  239. package/dist/components/Text/types.js +2 -0
  240. package/dist/components/Text/types.js.map +1 -0
  241. package/dist/components/TextEditor/index.js +90 -0
  242. package/dist/components/TextEditor/index.js.map +1 -0
  243. package/dist/components/TextEditor/styles.js +2 -0
  244. package/dist/components/TextEditor/styles.js.map +1 -0
  245. package/dist/components/TextEditor/types.js +2 -0
  246. package/dist/components/TextEditor/types.js.map +1 -0
  247. package/dist/components/TextInput/index.js +65 -0
  248. package/dist/components/TextInput/index.js.map +1 -0
  249. package/dist/components/TextInput/styles.js +2 -0
  250. package/dist/components/TextInput/styles.js.map +1 -0
  251. package/dist/components/TextInput/types.js +2 -0
  252. package/dist/components/TextInput/types.js.map +1 -0
  253. package/dist/components/TextInput/useTextInput.js +64 -0
  254. package/dist/components/TextInput/useTextInput.js.map +1 -0
  255. package/dist/components/Tooltip/index.js +94 -0
  256. package/dist/components/Tooltip/index.js.map +1 -0
  257. package/dist/components/Tooltip/styles.js +2 -0
  258. package/dist/components/Tooltip/styles.js.map +1 -0
  259. package/dist/components/Tooltip/types.js +2 -0
  260. package/dist/components/Tooltip/types.js.map +1 -0
  261. package/dist/components/Touchable/index.js +80 -0
  262. package/dist/components/Touchable/index.js.map +1 -0
  263. package/dist/components/Touchable/styles.js +2 -0
  264. package/dist/components/Touchable/styles.js.map +1 -0
  265. package/dist/components/Touchable/types.js +2 -0
  266. package/dist/components/Touchable/types.js.map +1 -0
  267. package/dist/components/View/index.js +39 -0
  268. package/dist/components/View/index.js.map +1 -0
  269. package/dist/components/View/styles.js +2 -0
  270. package/dist/components/View/styles.js.map +1 -0
  271. package/dist/components/View/types.js +2 -0
  272. package/dist/components/View/types.js.map +1 -0
  273. package/dist/components/components.js +42 -0
  274. package/dist/components/components.js.map +1 -0
  275. package/dist/index.js +5 -0
  276. package/dist/index.js.map +1 -0
  277. package/dist/lib/ListMasonry.js +86 -0
  278. package/dist/lib/ListMasonry.js.map +1 -0
  279. package/dist/lib/ThemeVariables.js +22 -0
  280. package/dist/lib/ThemeVariables.js.map +1 -0
  281. package/dist/lib/WebStyleRegistry.js +69 -0
  282. package/dist/lib/WebStyleRegistry.js.map +1 -0
  283. package/dist/lib/hooks/index.js +23 -0
  284. package/dist/lib/hooks/index.js.map +1 -0
  285. package/dist/lib/hooks/useAnimatedStyle.js +23 -0
  286. package/dist/lib/hooks/useAnimatedStyle.js.map +1 -0
  287. package/dist/lib/hooks/useAnimatedVariantStyles.js +20 -0
  288. package/dist/lib/hooks/useAnimatedVariantStyles.js.map +1 -0
  289. package/dist/lib/hooks/useAsyncSelect.js +57 -0
  290. package/dist/lib/hooks/useAsyncSelect.js.map +1 -0
  291. package/dist/lib/hooks/useBreakpointMatch.js +108 -0
  292. package/dist/lib/hooks/useBreakpointMatch.js.map +1 -0
  293. package/dist/lib/hooks/useClick.js +38 -0
  294. package/dist/lib/hooks/useClick.js.map +1 -0
  295. package/dist/lib/hooks/useClickOutside.js +31 -0
  296. package/dist/lib/hooks/useClickOutside.js.map +1 -0
  297. package/dist/lib/hooks/useFileInput.js +17 -0
  298. package/dist/lib/hooks/useFileInput.js.map +1 -0
  299. package/dist/lib/hooks/useIsomorphicEffect.js +7 -0
  300. package/dist/lib/hooks/useIsomorphicEffect.js.map +1 -0
  301. package/dist/lib/hooks/useKeydown.js +39 -0
  302. package/dist/lib/hooks/useKeydown.js.map +1 -0
  303. package/dist/lib/hooks/useListFocus.js +46 -0
  304. package/dist/lib/hooks/useListFocus.js.map +1 -0
  305. package/dist/lib/hooks/useMediaQuery.js +25 -0
  306. package/dist/lib/hooks/useMediaQuery.js.map +1 -0
  307. package/dist/lib/hooks/usePageExitBlocker.js +44 -0
  308. package/dist/lib/hooks/usePageExitBlocker.js.map +1 -0
  309. package/dist/lib/hooks/usePagination.js +90 -0
  310. package/dist/lib/hooks/usePagination.js.map +1 -0
  311. package/dist/lib/hooks/usePopState.js +31 -0
  312. package/dist/lib/hooks/usePopState.js.map +1 -0
  313. package/dist/lib/hooks/usePopoverDismiss.js +32 -0
  314. package/dist/lib/hooks/usePopoverDismiss.js.map +1 -0
  315. package/dist/lib/hooks/useRefresh.js +67 -0
  316. package/dist/lib/hooks/useRefresh.js.map +1 -0
  317. package/dist/lib/hooks/useScrollEffect.js +19 -0
  318. package/dist/lib/hooks/useScrollEffect.js.map +1 -0
  319. package/dist/lib/hooks/useSearchParams.js +48 -0
  320. package/dist/lib/hooks/useSearchParams.js.map +1 -0
  321. package/dist/lib/hooks/useStaticAnimationStyles.js +16 -0
  322. package/dist/lib/hooks/useStaticAnimationStyles.js.map +1 -0
  323. package/dist/lib/hooks/useStylesFor.js +36 -0
  324. package/dist/lib/hooks/useStylesFor.js.map +1 -0
  325. package/dist/lib/hooks/useTouchableEvents.js +34 -0
  326. package/dist/lib/hooks/useTouchableEvents.js.map +1 -0
  327. package/dist/lib/hooks/useWindowFocus.js +30 -0
  328. package/dist/lib/hooks/useWindowFocus.js.map +1 -0
  329. package/dist/lib/hooks/useWindowSize.js +29 -0
  330. package/dist/lib/hooks/useWindowSize.js.map +1 -0
  331. package/dist/lib/index.js +7 -0
  332. package/dist/lib/index.js.map +1 -0
  333. package/dist/lib/tools/index.js +4 -0
  334. package/dist/lib/tools/index.js.map +1 -0
  335. package/dist/lib/tools/localStorage.js +155 -0
  336. package/dist/lib/tools/localStorage.js.map +1 -0
  337. package/dist/lib/tools/mediaQuery.js +33 -0
  338. package/dist/lib/tools/mediaQuery.js.map +1 -0
  339. package/dist/lib/tools/modal.js +55 -0
  340. package/dist/lib/tools/modal.js.map +1 -0
  341. package/dist/lib/utils/attributes.js +23 -0
  342. package/dist/lib/utils/attributes.js.map +1 -0
  343. package/dist/lib/utils/cache.js +10 -0
  344. package/dist/lib/utils/cache.js.map +1 -0
  345. package/dist/lib/utils/index.js +6 -0
  346. package/dist/lib/utils/index.js.map +1 -0
  347. package/dist/lib/utils/pollyfils/scroll.js +66 -0
  348. package/dist/lib/utils/pollyfils/scroll.js.map +1 -0
  349. package/dist/lib/utils/stopPropagation.js +19 -0
  350. package/dist/lib/utils/stopPropagation.js.map +1 -0
  351. package/dist/lib/utils/test.js +14 -0
  352. package/dist/lib/utils/test.js.map +1 -0
  353. package/dist/types/index.js +2 -0
  354. package/dist/types/index.js.map +1 -0
  355. package/dist/types/utility.js +2 -0
  356. package/dist/types/utility.js.map +1 -0
  357. package/package.json +18 -18
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
+ import { View } from '../View';
3
+ import { useStylesFor } from '../../lib/hooks/useStylesFor';
4
+ import { WebStyleRegistry } from '../../lib/WebStyleRegistry';
5
+ export * from './styles';
6
+ export * from './types';
7
+ /**
8
+ * Loading spinner whose visual appearance is delegated entirely to style
9
+ * composition; ships no built-in spinner markup.
10
+ * Uses: `useStylesFor`, `WebStyleRegistry`
11
+ */
12
+ export const ActivityIndicator = (props) => {
13
+ const { style, component: Component, size, ...rest } = {
14
+ ...ActivityIndicator.defaultProps,
15
+ ...props,
16
+ };
17
+ const styles = useStylesFor(ActivityIndicator.styleRegistryName, style);
18
+ return (_jsx(Component, { ...rest, css: styles.wrapper }));
19
+ };
20
+ ActivityIndicator.styleRegistryName = 'ActivityIndicator';
21
+ ActivityIndicator.elements = ['wrapper'];
22
+ ActivityIndicator.rootElement = 'wrapper';
23
+ ActivityIndicator.defaultProps = {
24
+ component: View,
25
+ size: null,
26
+ };
27
+ WebStyleRegistry.registerComponent(ActivityIndicator);
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ActivityIndicator/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAI9B,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAG7D,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAE,EAAE;IACjE,MAAM,EACJ,KAAK,EACL,SAAS,EAAE,SAAS,EACpB,IAAI,EACJ,GAAG,IAAI,EACR,GAAG;QACF,GAAG,iBAAiB,CAAC,YAAY;QACjC,GAAG,KAAK;KACT,CAAA;IAED,MAAM,MAAM,GAAG,YAAY,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAA;IAEvE,OAAO,CACL,KAAC,SAAS,OACJ,IAAI,EACR,GAAG,EAAE,MAAM,CAAC,OAAO,GACnB,CACH,CAAA;AACH,CAAC,CAAA;AAED,iBAAiB,CAAC,iBAAiB,GAAG,mBAAmB,CAAA;AACzD,iBAAiB,CAAC,QAAQ,GAAG,CAAC,SAAS,CAAC,CAAA;AACxC,iBAAiB,CAAC,WAAW,GAAG,SAAS,CAAA;AAIzC,iBAAiB,CAAC,YAAY,GAAG;IAC/B,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;CACwB,CAAA;AAEpC,gBAAgB,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/ActivityIndicator/styles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/ActivityIndicator/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
+ import { TypeGuards } from '@codeleap/types';
3
+ import { Text } from '../Text';
4
+ import { View } from '../View';
5
+ import { useStylesFor } from '../../lib/hooks/useStylesFor';
6
+ import { WebStyleRegistry } from '../../lib/WebStyleRegistry';
7
+ export * from './styles';
8
+ export * from './types';
9
+ const defaultGetBadgeContent = ({ count, maxCount }) => {
10
+ if (Number(count) > maxCount) {
11
+ return `${maxCount}+`;
12
+ }
13
+ else {
14
+ return String(count);
15
+ }
16
+ };
17
+ /**
18
+ * Conditional count or presence badge that handles max/min count thresholds
19
+ * and supports a fully custom content renderer.
20
+ * Renders nothing when `badge` is `false` or absent.
21
+ * Uses: `View`, `Text`, `useStylesFor`, `WebStyleRegistry`
22
+ */
23
+ export const Badge = (props) => {
24
+ const { debugName, innerWrapperProps, textProps, maxCount, minCount, getBadgeContent, renderBadgeContent, disabled, style, badge, ...rest } = {
25
+ ...Badge.defaultProps,
26
+ ...props,
27
+ };
28
+ const styles = useStylesFor(Badge.styleRegistryName, style);
29
+ const visible = (TypeGuards.isBoolean(badge) && badge === true) || TypeGuards.isNumber(badge);
30
+ if (!visible)
31
+ return null;
32
+ const wrapperStyles = [
33
+ styles?.wrapper,
34
+ (disabled && styles?.['wrapper:disabled']),
35
+ ];
36
+ const innerWrapperStyles = [
37
+ styles?.innerWrapper,
38
+ (disabled && styles?.['innerWrapper:disabled']),
39
+ innerWrapperProps?.style,
40
+ ];
41
+ const countStyles = [
42
+ styles?.count,
43
+ (disabled && styles?.['count:disabled']),
44
+ textProps?.style,
45
+ ];
46
+ const count = TypeGuards.isNumber(badge) ? badge : null;
47
+ const content = getBadgeContent({ ...props, maxCount, minCount, count });
48
+ const showContent = TypeGuards.isNumber(count) && count >= minCount;
49
+ const BadgeContent = TypeGuards.isNil(renderBadgeContent) ? () => _jsx(Text, { text: content, ...textProps }) : renderBadgeContent;
50
+ return (_jsx(View, { ...rest, style: wrapperStyles, children: _jsx(View, { ...innerWrapperProps, style: innerWrapperStyles, children: showContent
51
+ ? _jsx(BadgeContent, { ...props, style: countStyles, maxCount: maxCount, minCount: minCount, count: count, getBadgeContent: getBadgeContent, content: content })
52
+ : null }) }));
53
+ };
54
+ Badge.styleRegistryName = 'Badge';
55
+ Badge.elements = ['wrapper', 'innerWrapper', 'count'];
56
+ Badge.rootElement = 'wrapper';
57
+ Badge.withVariantTypes = (styles) => {
58
+ return Badge;
59
+ };
60
+ Badge.defaultProps = {
61
+ maxCount: 9,
62
+ minCount: 1,
63
+ getBadgeContent: defaultGetBadgeContent,
64
+ disabled: false,
65
+ badge: true,
66
+ };
67
+ WebStyleRegistry.registerComponent(Badge);
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Badge/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAG7D,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB,MAAM,sBAAsB,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAgB,EAAE,EAAE;IACnE,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,EAAE,CAAC;QAC7B,OAAO,GAAG,QAAQ,GAAG,CAAA;IACvB,CAAC;SAAM,CAAC;QACN,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC;AACH,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAiB,EAAE,EAAE;IACzC,MAAM,EACJ,SAAS,EACT,iBAAi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CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,OAAO,KAAM,SAAS,GAAI,CAAC,CAAC,CAAC,kBAAkB,CAAA;IAE7H,OAAO,CACL,KAAC,IAAI,OAAK,IAAI,EAAE,KAAK,EAAE,aAAa,YAClC,KAAC,IAAI,OAAK,iBAAiB,EAAE,KAAK,EAAE,kBAAkB,YACnD,WAAW;gBACV,CAAC,CAAC,KAAC,YAAY,OACT,KAAK,EACT,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,OAAO,GAChB;gBACF,CAAC,CAAC,IAAI,GAEH,GACF,CACR,CAAA;AACH,CAAC,CAAA;AAED,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAA;AACjC,KAAK,CAAC,QAAQ,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC,CAAA;AACrD,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;AAE7B,KAAK,CAAC,gBAAgB,GAAG,CAAsB,MAAS,EAAE,EAAE;IAC1D,OAAO,KAAyE,CAAA;AAClF,CAAC,CAAA;AAED,KAAK,CAAC,YAAY,GAAG;IACnB,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,eAAe,EAAE,sBAAsB;IACvC,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,IAAI;CACW,CAAA;AAExB,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Badge/styles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Badge/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
+ import { TypeGuards } from '@codeleap/types';
3
+ import { Text } from '../Text';
4
+ import { Touchable } from '../Touchable';
5
+ import { Icon } from '../Icon';
6
+ import { ActivityIndicator } from '../ActivityIndicator';
7
+ import { useStylesFor } from '../../lib/hooks/useStylesFor';
8
+ import { WebStyleRegistry } from '../../lib/WebStyleRegistry';
9
+ import { mergeStyles } from '@codeleap/styles';
10
+ import { toDataAttrs } from '../../lib';
11
+ export * from './styles';
12
+ export * from './types';
13
+ export function Button(buttonProps) {
14
+ const allProps = {
15
+ ...Button.defaultProps,
16
+ ...buttonProps,
17
+ };
18
+ const { children, icon, text, loading, loadingShowText, onPress, disabled, rightIcon, selected, loaderProps, debugName, style, context, ...props } = allProps;
19
+ const styles = useStylesFor(Button.styleRegistryName, style);
20
+ const getStyles = (key, partialStyle = null) => mergeStyles([
21
+ partialStyle,
22
+ styles?.[key],
23
+ ]);
24
+ const iconStyles = getStyles('icon');
25
+ const componentStyles = {
26
+ wrapper: getStyles('wrapper'),
27
+ text: getStyles('text'),
28
+ loader: getStyles('loader'),
29
+ leftIcon: getStyles('leftIcon', iconStyles),
30
+ rightIcon: getStyles('rightIcon', iconStyles),
31
+ };
32
+ // TODO - This is a hack to hide the icon with display: none
33
+ const isLeftIconHide = componentStyles?.leftIcon?.display === 'none';
34
+ const shouldRenderLeftIcon = !loading && !isLeftIconHide && !!icon;
35
+ const _hideTextOnLoading = !loadingShowText && loading;
36
+ const attrs = toDataAttrs([{ selected, loading }, context]);
37
+ return (_jsxs(Touchable, { component: 'button', debugComponent: 'Button', disabled: disabled, "aria-pressed": selected || undefined, "aria-busy": loading || undefined, onPress: onPress, debugName: debugName, ...props, ...attrs, style: componentStyles.wrapper, className: 'button__wrapper', children: [shouldRenderLeftIcon ? _jsx(Icon, { debugName: debugName, icon: icon, style: componentStyles.leftIcon, className: 'button__icon button__left_icon' }) : null, TypeGuards.isString(text) && !_hideTextOnLoading ? _jsx(Text.Span, { debugName: debugName, text: text, style: componentStyles.text, className: 'button__text' }) : null, children, loading ? _jsx(ActivityIndicator, { debugName: `${debugName} loader`, ...loaderProps, style: componentStyles.loader, className: 'button__loader' }) : null, !!rightIcon ? _jsx(Icon, { debugName: debugName, icon: rightIcon, style: componentStyles.rightIcon, className: 'button__icon button__right_icon' }) : null] }));
38
+ }
39
+ function TabButton(buttonProps) {
40
+ // @ts-ignore
41
+ return _jsx(Button, { ...buttonProps, role: 'tab', "aria-pressed": undefined, "aria-selected": buttonProps?.selected || undefined });
42
+ }
43
+ Button.Tab = TabButton;
44
+ Button.styleRegistryName = 'Button';
45
+ Button.elements = ['wrapper', 'text', 'icon', 'leftIcon', 'rightIcon', `loader`];
46
+ Button.rootElement = 'wrapper';
47
+ Button.defaultProps = {
48
+ debounce: 600,
49
+ loadingShowText: false,
50
+ };
51
+ WebStyleRegistry.registerComponent(Button);
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAY,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAmB,WAAW,EAAwB,MAAM,kBAAkB,CAAA;AAErF,OAAO,EAAE,WA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AAS,SAAS,CAAwD,WAA2B;IACnG,aAAa;IACb,OAAO,KAAC,MAAM,OACR,WAAW,EACf,IAAI,EAAC,KAAK,kBACI,SAAS,mBACR,WAAW,EAAE,QAAQ,IAAI,SAAS,GACjD,CAAA;AACJ,CAAC;AACD,MAAM,CAAC,GAAG,GAAG,SAAS,CAAA;AAEtB,MAAM,CAAC,iBAAiB,GAAG,QAAQ,CAAA;AACnC,MAAM,CAAC,QAAQ,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAA;AAChF,MAAM,CAAC,WAAW,GAAG,SAAS,CAAA;AAG9B,MAAM,CAAC,YAAY,GAAG;IACpB,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,KAAK;CACM,CAAA;AAE9B,gBAAgB,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Button/styles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Button/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,50 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
+ import { Calendar as AriaCalendar, CalendarGrid, CalendarGridHeader as AriaCalendarGridHeader, CalendarGridBody, CalendarHeaderCell, CalendarCell, Heading, useContextProps, ButtonContext, } from 'react-aria-components';
3
+ import { useStylesFor } from '../../lib/hooks/useStylesFor';
4
+ import { WebStyleRegistry } from '../../lib/WebStyleRegistry';
5
+ import { View } from '../View';
6
+ export * from './styles';
7
+ export * from './types';
8
+ function SlotForwader(allProps) {
9
+ let { ref: providedRef, context, render, ...actualProps } = allProps;
10
+ let [props, ref] = useContextProps(actualProps, providedRef, context);
11
+ return render(props, ref);
12
+ }
13
+ /**
14
+ * Accessible month-grid calendar built on `react-aria-components` with styled header navigation and a fully themeable cell grid.
15
+ * Navigation buttons are wired through `SlotForwader` so they receive `ButtonContext` props from the aria library; provide `renderNext`/`renderPrevious` to render them.
16
+ * First day of week defaults to Sunday (`'sun'`).
17
+ * Uses: `View`, `Icon`
18
+ */
19
+ export function Calendar(calendarProps) {
20
+ const { style, prevIcon, nextIcon, debugName, renderNext, renderPrevious, ...props } = {
21
+ ...Calendar.defaultProps,
22
+ ...calendarProps,
23
+ };
24
+ const styles = useStylesFor(Calendar.styleRegistryName, style);
25
+ const s = styles;
26
+ return (_jsxs(AriaCalendar, { ...props, css: s.wrapper, children: [_jsxs(View, { component: 'header', style: styles.header, children: [_jsx(SlotForwader, { context: ButtonContext, slot: 'previous', css: styles.prevButton, render: renderPrevious ?? (() => _jsx(_Fragment, {})) }), _jsx(Heading, { css: s.heading }), _jsx(SlotForwader, { context: ButtonContext, slot: 'next', css: styles.nextButton, render: renderNext ?? (() => _jsx(_Fragment, {})) })] }), _jsxs(CalendarGrid, { css: s.grid, children: [_jsx(AriaCalendarGridHeader, { children: (day) => _jsx(CalendarHeaderCell, { css: s.gridHeaderCell, children: day }) }), _jsx(CalendarGridBody, { children: (date) => _jsx(CalendarCell, { date: date, css: s.cell }) })] })] }));
27
+ }
28
+ Calendar.styleRegistryName = 'Calendar';
29
+ Calendar.elements = [
30
+ 'wrapper',
31
+ 'header',
32
+ 'heading',
33
+ 'prevButton',
34
+ 'nextButton',
35
+ 'prevButtonIcon',
36
+ 'nextButtonIcon',
37
+ 'grid',
38
+ 'gridHeaderCell',
39
+ 'cell',
40
+ 'errorMessage',
41
+ ];
42
+ Calendar.rootElement = 'wrapper';
43
+ Calendar.defaultProps = {
44
+ debugName: 'Calendar',
45
+ prevIcon: 'chevronLeft',
46
+ nextIcon: 'chevronRight',
47
+ firstDayOfWeek: 'sun'
48
+ };
49
+ WebStyleRegistry.registerComponent(Calendar);
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Calendar/index.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,IAAI,YAAY,EACxB,YAAY,EACZ,kBAAkB,IAAI,sBAAsB,EAC5C,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,OAAO,EAIP,eAAe,EAIf,aAAa,GACd,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAI7D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAG9B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AASvB,SAAS,YAAY,CAA4C,QAAkC;IACjG,IAAI,EAAE,GAAG,EAAC,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAC,GAAG,QAAQ,CAAA;IAElE,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,eAAe,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;IAGrE,OAAO,MAAM,CAAC,KAAc,EAAE,GAAG,CAAC,CAAA;AAEpC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAkC,aAA+B;IACvF,MAAM,EAAE,KAAK,EAAI,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAC,GAAG,KAAK,EAAE,GAAG;QACtF,GAAG,QAAQ,CAAC,YAAY;QACxB,GAAG,aAAa;KACG,CAAA;IAErB,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAA;IAE9D,MAAM,CAAC,GAAG,MAAa,CAAA;IAEvB,OAAO,CACL,MAAC,YA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B,QAAQ,EAAE,aAAwB;IAClC,QAAQ,EAAE,cAAyB;IACnC,cAAc,EAAE,KAAK;CACI,CAAA;AAE3B,gBAAgB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Calendar/styles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Calendar/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,129 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
+ import { onUpdate } from '@codeleap/hooks';
3
+ import React, { forwardRef, useCallback, useImperativeHandle, useEffect, useState, useMemo } from 'react';
4
+ import useEmblaCarousel from 'embla-carousel-react';
5
+ import Autoplay from 'embla-carousel-autoplay';
6
+ import { View } from '../View';
7
+ import { Touchable } from '../Touchable';
8
+ import { WebStyleRegistry } from '../../lib/WebStyleRegistry';
9
+ import { useStylesFor } from '../../lib/hooks/useStylesFor';
10
+ export * from './styles';
11
+ export * from './types';
12
+ const Dots = (params) => {
13
+ const { page, childArray, onPress, styles, dotsDisabled } = params;
14
+ return (_jsx(View, { style: styles.dots, children: childArray.map((_, index) => {
15
+ const isSelected = index === page;
16
+ const style = [
17
+ styles.dot,
18
+ isSelected && styles['dot:selected'],
19
+ dotsDisabled && styles['dot:disabled'],
20
+ ];
21
+ return (_jsx(Touchable, { onPress: () => onPress?.(index), style: style, disabled: dotsDisabled, debugName: 'dots' }, index));
22
+ }) }));
23
+ };
24
+ /**
25
+ * Swipeable slide carousel backed by Embla Carousel, with optional dot navigation, autoplay, multi-slide view, and a `ref` for imperative control.
26
+ * The `page` prop is semi-controlled — it syncs to Embla whenever it changes but internal swipe still updates the active index independently.
27
+ * Uses: `Touchable`
28
+ */
29
+ export const Carousel = forwardRef((props, ref) => {
30
+ const { style, children, renderSlideWrapper: SlideWrapper, page, dots, dotsDisabled, infinite, disableSwipe, onChange, footer, dotsProps, slideWrapperProps, autoplay, autoplayDelay, spaceBetween, slidesPerView, ...rest } = {
31
+ ...Carousel.defaultProps,
32
+ ...props,
33
+ };
34
+ const styles = useStylesFor(Carousel.styleRegistryName, style);
35
+ const childArray = React.Children.toArray(children);
36
+ const [currentIndex, setCurrentIndex] = useState(0);
37
+ const plugins = useMemo(() => {
38
+ const pluginList = [];
39
+ if (autoplay) {
40
+ pluginList.push(Autoplay({ delay: autoplayDelay, stopOnInteraction: false }));
41
+ }
42
+ return pluginList;
43
+ }, [autoplay, autoplayDelay]);
44
+ const [emblaRef, emblaApi] = useEmblaCarousel({
45
+ loop: infinite,
46
+ dragFree: false,
47
+ containScroll: 'trimSnaps',
48
+ align: 'start',
49
+ slidesToScroll: 1,
50
+ ...(disableSwipe && { watchDrag: false }),
51
+ }, plugins);
52
+ const goTo = useCallback((index) => {
53
+ if (emblaApi) {
54
+ emblaApi.scrollTo(index);
55
+ }
56
+ }, [emblaApi]);
57
+ const next = useCallback(() => {
58
+ if (emblaApi) {
59
+ emblaApi.scrollNext();
60
+ }
61
+ }, [emblaApi]);
62
+ const prev = useCallback(() => {
63
+ if (emblaApi) {
64
+ emblaApi.scrollPrev();
65
+ }
66
+ }, [emblaApi]);
67
+ useImperativeHandle(ref, () => ({
68
+ goTo,
69
+ next,
70
+ prev,
71
+ emblaApi,
72
+ }), [goTo, next, prev, emblaApi]);
73
+ useEffect(() => {
74
+ if (!emblaApi)
75
+ return;
76
+ const onSelect = () => {
77
+ const index = emblaApi.selectedScrollSnap();
78
+ setCurrentIndex(index);
79
+ onChange?.(index);
80
+ };
81
+ emblaApi.on('select', onSelect);
82
+ onSelect();
83
+ return () => {
84
+ emblaApi.off('select', onSelect);
85
+ };
86
+ }, [emblaApi, onChange]);
87
+ onUpdate(() => {
88
+ if (page !== undefined && page !== currentIndex && emblaApi) {
89
+ goTo(page);
90
+ }
91
+ }, [page]);
92
+ return (_jsxs(View, { style: styles.wrapper, children: [_jsx(View, { ref: emblaRef, style: {
93
+ overflow: 'hidden',
94
+ }, children: _jsx(View, { style: {
95
+ display: 'flex',
96
+ flexDirection: 'row',
97
+ gap: spaceBetween,
98
+ }, children: childArray.map((child, index) => {
99
+ return (_jsx(View, { style: {
100
+ flex: slidesPerView === 1 ? '0 0 100%' : slidesPerView === 'auto' ? '0 0 auto' : `0 0 ${100 / slidesPerView}%`,
101
+ minWidth: 0,
102
+ }, children: _jsx(SlideWrapper, { style: styles.slideWrapper, ...slideWrapperProps, children: child }) }, index));
103
+ }) }) }), _jsxs(View, { style: styles.footerWrapper, children: [footer, dots ? (_jsx(Dots, { page: currentIndex, onPress: goTo, childArray: childArray, styles: styles, dotsDisabled: dotsDisabled, ...dotsProps })) : null] })] }));
104
+ });
105
+ Carousel.styleRegistryName = 'Carousel';
106
+ Carousel.elements = [
107
+ 'wrapper',
108
+ 'dot',
109
+ 'dots',
110
+ 'slideWrapper',
111
+ 'footerWrapper',
112
+ ];
113
+ Carousel.rootElement = 'wrapper';
114
+ Carousel.withVariantTypes = (styles) => {
115
+ return Carousel;
116
+ };
117
+ Carousel.defaultProps = {
118
+ dots: false,
119
+ dotsDisabled: false,
120
+ infinite: false,
121
+ disableSwipe: false,
122
+ renderSlideWrapper: View,
123
+ autoplay: false,
124
+ autoplayDelay: 3000,
125
+ spaceBetween: 0,
126
+ slidesPerView: 1,
127
+ };
128
+ WebStyleRegistry.registerComponent(Carousel);
129
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Carousel/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,m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AG,UAAU,CAAA;AAEvC,QAAQ,CAAC,QAAQ,GAAG;IAClB,SAAS;IACT,KAAK;IACL,MAAM;IACN,cAAc;IACd,eAAe;CAChB,CAAA;AAED,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAA;AAEhC,QAAQ,CAAC,gBAAgB,GAAG,CAAsB,MAAS,EAAE,EAAE;IAC7D,OAAO,QAA+E,CAAA;AACxF,CAAC,CAAA;AAED,QAAQ,CAAC,YAAY,GAAG;IACtB,IAAI,EAAE,KAAK;IACX,YAAY,EAAE,KAAK;IACnB,QAAQ,EAAE,KAAK;IACf,YAAY,EAAE,KAAK;IACnB,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE,KAAK;IACf,aAAa,EAAE,IAAI;IACnB,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,CAAC;CACS,CAAA;AAE3B,gBAAgB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Carousel/styles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Carousel/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
+ import { WebStyleRegistry } from '../../lib/WebStyleRegistry';
3
+ import { useStylesFor } from '../../lib/hooks/useStylesFor';
4
+ import { useFieldInput } from '../Field';
5
+ import { fields } from '@codeleap/form';
6
+ import { Field } from '../Field';
7
+ import { toDataAttrs } from '../../lib';
8
+ import { Touchable } from '../Touchable';
9
+ import { View } from '../View';
10
+ import { Icon } from '../Icon';
11
+ export * from './styles';
12
+ export * from './types';
13
+ /**
14
+ * Boolean checkbox with a `Touchable` tick box and `Field` layout (label, helper, sections).
15
+ * Toggles on press or Space keypress; `disabled` suppresses both.
16
+ * Uses: `Field.Provider`, `Field.Wrapper`, `Field.Heading`, `Field.Helper`, `Touchable`, `View`, `Icon`
17
+ */
18
+ export const Checkbox = (props) => {
19
+ const { style, disabled, label, helper, leftSection, rightSection, value, onValueChange, checkboxOnLeft, checkIcon, field, debugName, } = { ...Checkbox.defaultProps, ...props };
20
+ const { wrapperRef, inputValue, onInputValueChange, validation } = useFieldInput(field, fields.boolean, { value, onValueChange });
21
+ const fieldContext = {
22
+ disabled: !!disabled,
23
+ hasValue: !!inputValue,
24
+ error: !!validation?.showError,
25
+ focused: false,
26
+ checkboxOnLeft: !!checkboxOnLeft,
27
+ };
28
+ const styles = useStylesFor(Checkbox.styleRegistryName, style, fieldContext);
29
+ const stateAttrs = toDataAttrs({
30
+ value: !!inputValue,
31
+ disabled: !!disabled,
32
+ checkboxOnLeft: !!checkboxOnLeft,
33
+ });
34
+ return (_jsxs(Field.Provider, { context: fieldContext, label: label, helper: validation?.showError ? validation?.message : helper, leftSection: leftSection, rightSection: rightSection, componentName: 'checkbox', children: [_jsxs(Field.Wrapper, { ref: wrapperRef, style: styles.wrapper, children: [_jsx(Touchable, { debugName: `${debugName} checkbox`, style: styles.box, onPress: () => onInputValueChange?.(!inputValue), onKeyDown: (e) => { if (!disabled && e?.keyCode === 32)
35
+ onInputValueChange?.(!inputValue); }, disabled: !!disabled, ...stateAttrs, children: _jsx(View, { style: styles.checkmarkWrapper, ...stateAttrs, children: _jsx(Icon, { debugName: debugName, icon: checkIcon, style: styles.checkmark }) }) }), _jsx(Field.Heading, { style: styles.heading })] }), _jsx(Field.Helper, { style: styles.helper })] }));
36
+ };
37
+ Checkbox.styleRegistryName = 'Checkbox';
38
+ Checkbox.elements = [...Field.elements, 'box', 'checkmarkWrapper', 'checkmark'];
39
+ Checkbox.rootElement = 'wrapper';
40
+ Checkbox.defaultProps = {
41
+ checkIcon: 'check',
42
+ };
43
+ WebStyleRegistry.registerComponent(Checkbox);
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAG9B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC/C,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,WAAW,EACX,YAAY,EACZ,KAAK,EACL,aAAa,EACb,cAAc,EACd,SAAS,EACT,KAAK,EACL,SAAS,GACV,GAAG,EAAE,GAAG,QAAQ,CAAC,YAAY,EAAE,GAAG,KAAK,EAAE,CAAA;IAE1C,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,UAAU,EAAE,GAC9D,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAA;IAEhE,MAAM,YAAY,GAAyB;QACzC,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,QAAQ,EAAE,CAAC,CAAC,UAAU;QACtB,KAAK,EAA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,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,GAAI,GACnE,GACG,EACZ,KAAC,KAAK,CAAC,OAAO,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,GAAI,IAE1B,EAChB,KAAC,KAAK,CAAC,MAAM,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,GAAI,IACvB,CAClB,CAAA;AACH,CAAC,CAAA;AAED,QAAQ,CAAC,iBAAiB,GAAG,UAAU,CAAA;AACvC,QAAQ,CAAC,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,kBAAkB,EAAE,WAAW,CAAC,CAAA;AAC/E,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAA;AAChC,QAAQ,CAAC,YAAY,GAAG;IACtB,SAAS,EAAE,OAAkB;CACJ,CAAA;AAE3B,gBAAgB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Checkbox/styles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Checkbox/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
+ import { useStylesFor } from '../../lib/hooks/useStylesFor';
3
+ import { WebStyleRegistry } from '../../lib/WebStyleRegistry';
4
+ import { motion } from 'motion/react';
5
+ export * from './styles';
6
+ export * from './types';
7
+ /**
8
+ * Animates a content region between zero height (collapsed) and its natural height (expanded) using Framer Motion.
9
+ * Fully controlled — pass `open` from the caller; the component owns no toggle state of its own.
10
+ */
11
+ export const Collapse = (props) => {
12
+ const { open, children, style, ...rest } = {
13
+ ...Collapse.defaultProps,
14
+ ...props,
15
+ };
16
+ const styles = useStylesFor(Collapse.styleRegistryName, style);
17
+ return (_jsx(motion.div, { initial: false, animate: { height: open ? 'auto' : 0, opacity: open ? 1 : 0 }, transition: { duration: 0.2 }, ...rest, style: open ? styles?.['wrapper:open'] : styles?.['wrapper:closed'], css: [styles.wrapper, open ? styles?.['wrapper:open'] : styles?.['wrapper:closed']], children: children }));
18
+ };
19
+ Collapse.styleRegistryName = 'Collapse';
20
+ Collapse.elements = ['wrapper'];
21
+ Collapse.rootElement = 'wrapper';
22
+ Collapse.withVariantTypes = (styles) => {
23
+ return Collapse;
24
+ };
25
+ Collapse.defaultProps = {};
26
+ WebStyleRegistry.registerComponent(Collapse);
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Collapse/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC/C,MAAM,EACJ,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,GAAG,IAAI,EACR,GAAG;QACF,GAAG,QAAQ,CAAC,YAAY;QACxB,GAAG,KAAK;KACT,CAAA;IAED,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAA;IAE9D,OAAO,CACL,KAAC,MAAM,CAAC,GAAG,IACT,OAAO,EAAE,KAAK,EACd,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAC7D,UAAU,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,KACzB,IAAI,EACR,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,CAAC,EACnE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,CAAC,CAAC,YAElF,QAAQ,GACE,CACd,CAAA;AACH,CAAC,CAAA;AAED,QAAQ,CAAC,iBAAiB,GAAG,UAAU,CAAA;AACvC,QAAQ,CAAC,QAAQ,GAAG,CAAC,SAAS,CAAC,CAAA;AAC/B,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAA;AAEhC,QAAQ,CAAC,gBAAgB,GAAG,CAAsB,MAAS,EAAE,EAAE;IAC7D,OAAO,QAA+E,CAAA;AACxF,CAAC,CAAA;AAED,QAAQ,CAAC,YAAY,GAAG,EAA4B,CAAA;AAEpD,gBAAgB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Collapse/styles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Collapse/types.ts"],"names":[],"mappings":""}