@ainias42/react-bootstrap-mobile 1.0.0 → 1.0.2

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 (412) hide show
  1. package/.ctirc +114 -0
  2. package/.prettierrc +1 -5
  3. package/.storybook/main.ts +31 -0
  4. package/.storybook/preview.ts +36 -0
  5. package/bin/release.sh +1 -37
  6. package/bin/updatePackages.sh +3 -0
  7. package/dist/{src/Components → Components}/ActionSheet/ActionSheet.d.ts +5 -5
  8. package/dist/Components/ActionSheet/ActionSheet.stories.d.ts +9 -0
  9. package/dist/Components/Card/Card.d.ts +12 -0
  10. package/dist/Components/Card/Card.stories.d.ts +16 -0
  11. package/dist/{src/Components → Components}/Clickable/Clickable.d.ts +3 -3
  12. package/dist/Components/Colors.stories.d.ts +5 -0
  13. package/dist/Components/Dialog/AlertDialog.d.ts +8 -0
  14. package/dist/Components/Dialog/AlertDialog.stories.d.ts +14 -0
  15. package/dist/{src/Components → Components}/Dialog/ButtonDialog.d.ts +3 -3
  16. package/dist/Components/Dialog/ConfirmDialog.d.ts +9 -0
  17. package/dist/Components/Dialog/ConfirmDialog.stories.d.ts +15 -0
  18. package/dist/{src/Components → Components}/Dialog/Dialog.d.ts +2 -2
  19. package/dist/{src/Components → Components}/Dialog/DialogBackground.d.ts +2 -2
  20. package/dist/{src/Components → Components}/Dialog/DialogContainer.d.ts +3 -3
  21. package/dist/{src/Components → Components}/Dialog/DialogContext.d.ts +3 -2
  22. package/dist/{src/Components → Components}/DragAndDrop/DragItem.d.ts +2 -2
  23. package/dist/{src/Components → Components}/DragAndDrop/DropArea.d.ts +2 -2
  24. package/dist/{src/Components → Components}/FormElements/Button/Button.d.ts +8 -8
  25. package/dist/Components/FormElements/Button/Button.stories.d.ts +43 -0
  26. package/dist/Components/FormElements/CheckBox/Checkbox.d.ts +12 -0
  27. package/dist/Components/FormElements/CheckBox/Checkbox.stories.d.ts +17 -0
  28. package/dist/{src/Components → Components}/FormElements/ColorInput/ColorInput.d.ts +3 -5
  29. package/dist/Components/FormElements/ColorInput/ColorInput.stories.d.ts +8 -0
  30. package/dist/{src/Components → Components}/FormElements/Controller/ColorInputController.d.ts +1 -1
  31. package/dist/{src/Components → Components}/FormElements/Controller/FileInputController.d.ts +4 -4
  32. package/dist/Components/FormElements/Controller/HookForm.d.ts +15 -0
  33. package/dist/{src/Components → Components}/FormElements/Controller/InputController.d.ts +1 -1
  34. package/dist/{src/Components → Components}/FormElements/Controller/MultipleFileInputController.d.ts +1 -1
  35. package/dist/{src/Components → Components}/FormElements/Controller/PasswordInputController.d.ts +1 -1
  36. package/dist/{src/Components → Components}/FormElements/Controller/SelectController.d.ts +1 -1
  37. package/dist/Components/FormElements/Controller/SliderController.d.ts +5 -0
  38. package/dist/{src/Components → Components}/FormElements/Controller/SwitchController.d.ts +1 -1
  39. package/dist/{src/Components → Components}/FormElements/Controller/TextareaController.d.ts +1 -1
  40. package/dist/{src/Components → Components}/FormElements/Controller/useYupResolver.d.ts +1 -1
  41. package/dist/{src/Components → Components}/FormElements/Controller/withHookController.d.ts +3 -2
  42. package/dist/Components/FormElements/Error/FormError.d.ts +6 -0
  43. package/dist/Components/FormElements/Error/FormError.stories.d.ts +7 -0
  44. package/dist/Components/FormElements/Form.stories.d.ts +7 -0
  45. package/dist/Components/FormElements/Input/FileInput/FileInput.d.ts +13 -0
  46. package/dist/{src/Components → Components}/FormElements/Input/FileInput/MultipleFileInput.d.ts +6 -6
  47. package/dist/Components/FormElements/Input/HiddenInput.d.ts +6 -0
  48. package/dist/Components/FormElements/Input/HiddenInput.stories.d.ts +9 -0
  49. package/dist/{src/Components → Components}/FormElements/Input/Input.d.ts +4 -4
  50. package/dist/Components/FormElements/Input/Input.stories.d.ts +18 -0
  51. package/dist/{src/Components → Components}/FormElements/Input/PasswordInput/PasswordInput.d.ts +5 -4
  52. package/dist/Components/FormElements/Input/PasswordInput/PasswordInput.stories.d.ts +8 -0
  53. package/dist/{src/Components → Components}/FormElements/SearchSelectInput/SearchSelectInput.d.ts +4 -4
  54. package/dist/Components/FormElements/SearchSelectInput/SearchSelectInput.stories.d.ts +9 -0
  55. package/dist/{src/Components → Components}/FormElements/Select/Select.d.ts +4 -4
  56. package/dist/Components/FormElements/Select/Select.stories.d.ts +8 -0
  57. package/dist/{src/Components → Components}/FormElements/Slider/Slider.d.ts +4 -4
  58. package/dist/Components/FormElements/Slider/Slider.stories.d.ts +7 -0
  59. package/dist/{src/Components → Components}/FormElements/Switch/Switch.d.ts +5 -5
  60. package/dist/Components/FormElements/Switch/Switch.stories.d.ts +11 -0
  61. package/dist/{src/Components → Components}/FormElements/Textarea/Textarea.d.ts +4 -4
  62. package/dist/Components/FormElements/Textarea/Textarea.stories.d.ts +9 -0
  63. package/dist/{src/Components → Components}/FormElements/hooks/useOnChangeDone.d.ts +1 -1
  64. package/dist/{src/Components → Components}/FullScreen/FullScreen.d.ts +4 -4
  65. package/dist/{src/Components → Components}/Hooks/useClientLayoutEffect.d.ts +1 -1
  66. package/dist/{src/Components → Components}/Hooks/useComposedRef.d.ts +1 -1
  67. package/dist/{src/Components → Components}/Hooks/useDelayedState.d.ts +1 -1
  68. package/dist/{src/Components → Components}/Hooks/useInViewport.d.ts +1 -1
  69. package/dist/{src/Components → Components}/Icon/DoubleIcon.d.ts +1 -1
  70. package/dist/Components/Icon/DoubleIcon.stories.d.ts +23 -0
  71. package/dist/{src/Components → Components}/Icon/Icon.d.ts +5 -5
  72. package/dist/Components/Icon/Icon.stories.d.ts +17 -0
  73. package/dist/Components/Image/Image.d.ts +10 -0
  74. package/dist/Components/Image/Image.stories.d.ts +7 -0
  75. package/dist/{src/Components → Components}/InViewport/InViewport.d.ts +1 -1
  76. package/dist/{src/Components → Components}/Layout/Block.d.ts +4 -4
  77. package/dist/{src/Components → Components}/Layout/Container.d.ts +1 -1
  78. package/dist/{src/Components → Components}/Layout/Flex.d.ts +3 -3
  79. package/dist/{src/Components → Components}/Layout/Grid/Grid.d.ts +3 -3
  80. package/dist/{src/Components → Components}/Layout/Grid/GridItem.d.ts +1 -1
  81. package/dist/Components/Layout/Grow.d.ts +10 -0
  82. package/dist/{src/Components → Components}/Layout/Inline.d.ts +3 -3
  83. package/dist/{src/Components → Components}/Layout/InlineBlock.d.ts +3 -3
  84. package/dist/{src/Components → Components}/Layout/View.d.ts +4 -4
  85. package/dist/{src/Components → Components}/Layout/ViewWithoutListeners.d.ts +3 -3
  86. package/dist/Components/LoadingArea/LoadingArea.d.ts +9 -0
  87. package/dist/Components/LoadingArea/LoadingArea.stories.d.ts +9 -0
  88. package/dist/Components/LoadingCircle/LoadingCircle.d.ts +7 -0
  89. package/dist/Components/LoadingCircle/LoadingCircle.stories.d.ts +26 -0
  90. package/dist/{src/Components → Components}/Menu/HoverMenu.d.ts +3 -3
  91. package/dist/Components/Menu/HoverMenu.stories.d.ts +16 -0
  92. package/dist/{src/Components → Components}/Menu/Menu.d.ts +2 -2
  93. package/dist/Components/Menu/Menu.stories.d.ts +14 -0
  94. package/dist/{src/Components → Components}/Menu/MenuCloseContext.d.ts +1 -1
  95. package/dist/{src/Components → Components}/Menu/MenuDivider.d.ts +1 -1
  96. package/dist/{src/Components → Components}/Menu/MenuItem.d.ts +4 -3
  97. package/dist/Components/Menu/MenuItem.stories.d.ts +21 -0
  98. package/dist/{src/Components → Components}/Menu/Submenu.d.ts +3 -3
  99. package/dist/Components/Menu/Submenu.stories.d.ts +10 -0
  100. package/dist/{src/Components → Components}/Menu/useMenu.d.ts +2 -2
  101. package/dist/{src/Components → Components}/RbmComponentProps.d.ts +4 -4
  102. package/dist/{src/Components → Components}/SizeCalculator/SizeCalculator.d.ts +1 -1
  103. package/dist/Components/SpoilerList/Spoiler/Spoiler.d.ts +16 -0
  104. package/dist/Components/SpoilerList/Spoiler/Spoiler.stories.d.ts +7 -0
  105. package/dist/{src/Components → Components}/SpoilerList/SpoilerList.d.ts +3 -5
  106. package/dist/{src/Components → Components}/TabBar/TabBar.d.ts +4 -6
  107. package/dist/Components/TabBar/TabBar.stories.d.ts +10 -0
  108. package/dist/Components/TabBar/TabBarButton.d.ts +7 -0
  109. package/dist/{src/Components → Components}/Table/Table.d.ts +3 -3
  110. package/dist/{src/Components → Components}/Text/Heading.d.ts +2 -2
  111. package/dist/{src/Components → Components}/Text/Text.d.ts +3 -3
  112. package/dist/Components/Text/Text.stories.d.ts +35 -0
  113. package/dist/Components/Toast/Toast.d.ts +12 -0
  114. package/dist/Components/Toast/Toast.stories.d.ts +8 -0
  115. package/dist/{src/Components → Components}/Toast/ToastContainer.d.ts +2 -2
  116. package/dist/Components/TopBar/MoreButton.d.ts +7 -0
  117. package/dist/{src/Components → Components}/TopBar/TopBar.d.ts +4 -6
  118. package/dist/Components/TopBar/TopBar.stories.d.ts +7 -0
  119. package/dist/Components/TopBar/TopBarButton.d.ts +7 -0
  120. package/dist/helper/useDeepShallow.d.ts +1 -0
  121. package/dist/helper/withMemo.d.ts +3 -0
  122. package/dist/{src/helper → helper}/withRenderBrowserOnly.d.ts +1 -1
  123. package/dist/helper/withRestrictedChildren.d.ts +7 -0
  124. package/dist/index.css +36 -0
  125. package/dist/index.css.map +1 -0
  126. package/dist/index.d.ts +116 -0
  127. package/dist/index.js +5357 -0
  128. package/dist/index.js.map +1 -0
  129. package/dist/treeshakeTest.d.ts +1 -0
  130. package/eslint.config.js +17 -0
  131. package/package.json +40 -90
  132. package/react-bootstrap-mobile.scss +6 -6
  133. package/src/Components/ActionSheet/ActionSheet.stories.tsx +55 -0
  134. package/src/Components/ActionSheet/ActionSheet.tsx +37 -24
  135. package/src/Components/ActionSheet/actionSheet.module.scss +198 -0
  136. package/src/Components/Card/Card.stories.tsx +41 -0
  137. package/src/Components/Card/Card.tsx +6 -9
  138. package/src/Components/Card/card.module.scss +74 -0
  139. package/src/Components/Clickable/Clickable.tsx +73 -63
  140. package/src/Components/Clickable/clickable.module.scss +14 -0
  141. package/src/Components/Colors.stories.tsx +77 -0
  142. package/src/Components/Dialog/AlertDialog.stories.tsx +28 -0
  143. package/src/Components/Dialog/AlertDialog.tsx +10 -9
  144. package/src/Components/Dialog/ButtonDialog.tsx +15 -13
  145. package/src/Components/Dialog/ConfirmDialog.stories.tsx +29 -0
  146. package/src/Components/Dialog/ConfirmDialog.tsx +11 -9
  147. package/src/Components/Dialog/Dialog.tsx +10 -10
  148. package/src/Components/Dialog/DialogBackground.tsx +32 -21
  149. package/src/Components/Dialog/DialogContainer.tsx +23 -18
  150. package/src/Components/Dialog/DialogContext.ts +7 -6
  151. package/src/Components/Dialog/{buttonDialog.scss → buttonDialog.module.scss} +29 -21
  152. package/src/Components/Dialog/dialog.module.scss +30 -0
  153. package/src/Components/Dialog/dialogBackground.module.scss +17 -0
  154. package/src/Components/Dialog/useAlertDialog.ts +3 -3
  155. package/src/Components/Dialog/useConfirmDialog.ts +3 -3
  156. package/src/Components/DragAndDrop/DragItem.tsx +7 -6
  157. package/src/Components/DragAndDrop/DropArea.tsx +5 -4
  158. package/src/Components/Flavor.ts +4 -4
  159. package/src/Components/FormElements/Button/Button.stories.tsx +79 -0
  160. package/src/Components/FormElements/Button/Button.tsx +49 -36
  161. package/src/Components/FormElements/Button/ButtonType.ts +2 -2
  162. package/src/Components/FormElements/Button/button.module.scss +87 -0
  163. package/src/Components/FormElements/CheckBox/Checkbox.stories.tsx +50 -0
  164. package/src/Components/FormElements/CheckBox/Checkbox.tsx +13 -14
  165. package/src/Components/FormElements/CheckBox/{checkbox.scss → checkbox.module.scss} +30 -11
  166. package/src/Components/FormElements/ColorInput/ColorInput.stories.tsx +24 -0
  167. package/src/Components/FormElements/ColorInput/ColorInput.tsx +55 -59
  168. package/src/Components/FormElements/ColorInput/{colorInput.scss → colorInput.module.scss} +17 -19
  169. package/src/Components/FormElements/ColorInput/sharedSelectedColor.ts +19 -10
  170. package/src/Components/FormElements/Controller/ColorInputController.ts +3 -3
  171. package/src/Components/FormElements/Controller/FileInputController.tsx +29 -20
  172. package/src/Components/FormElements/Controller/HookForm.tsx +128 -24
  173. package/src/Components/FormElements/Controller/InputController.ts +3 -3
  174. package/src/Components/FormElements/Controller/MultipleFileInputController.ts +2 -3
  175. package/src/Components/FormElements/Controller/PasswordInputController.ts +3 -3
  176. package/src/Components/FormElements/Controller/SelectController.ts +3 -3
  177. package/src/Components/FormElements/Controller/SendFormContext.ts +3 -3
  178. package/src/Components/FormElements/Controller/SliderController.ts +4 -0
  179. package/src/Components/FormElements/Controller/SwitchController.ts +3 -3
  180. package/src/Components/FormElements/Controller/TextareaController.ts +2 -2
  181. package/src/Components/FormElements/Controller/useYupResolver.ts +10 -8
  182. package/src/Components/FormElements/Controller/withHookController.tsx +21 -18
  183. package/src/Components/FormElements/Error/FormError.stories.tsx +16 -0
  184. package/src/Components/FormElements/Error/FormError.tsx +42 -0
  185. package/src/Components/FormElements/Error/formError.module.scss +9 -0
  186. package/src/Components/FormElements/Form.stories.tsx +16 -0
  187. package/src/Components/FormElements/Input/FileInput/FileInput.tsx +52 -32
  188. package/src/Components/FormElements/Input/FileInput/MultipleFileInput.tsx +234 -231
  189. package/src/Components/FormElements/Input/FileInput/{fileInput.scss → fileInput.module.scss} +10 -12
  190. package/src/Components/FormElements/Input/HiddenInput.stories.tsx +44 -0
  191. package/src/Components/FormElements/Input/HiddenInput.tsx +6 -8
  192. package/src/Components/FormElements/Input/Input.stories.tsx +59 -0
  193. package/src/Components/FormElements/Input/Input.tsx +173 -172
  194. package/src/Components/FormElements/Input/PasswordInput/PasswordInput.stories.tsx +31 -0
  195. package/src/Components/FormElements/Input/PasswordInput/PasswordInput.tsx +20 -16
  196. package/src/Components/FormElements/Input/input.module.scss +95 -0
  197. package/src/Components/FormElements/SearchSelectInput/SearchSelectInput.stories.tsx +49 -0
  198. package/src/Components/FormElements/SearchSelectInput/SearchSelectInput.tsx +178 -166
  199. package/src/Components/FormElements/SearchSelectInput/seachSelectInput.module.scss +112 -0
  200. package/src/Components/FormElements/Select/Select.stories.tsx +49 -0
  201. package/src/Components/FormElements/Select/Select.tsx +34 -24
  202. package/src/Components/FormElements/Select/select.module.scss +63 -0
  203. package/src/Components/FormElements/Slider/Slider.stories.tsx +15 -0
  204. package/src/Components/FormElements/Slider/Slider.tsx +29 -20
  205. package/src/Components/FormElements/Slider/slider.module.scss +93 -0
  206. package/src/Components/FormElements/Switch/Switch.stories.tsx +65 -0
  207. package/src/Components/FormElements/Switch/Switch.tsx +72 -63
  208. package/src/Components/FormElements/Switch/switch.module.scss +157 -0
  209. package/src/Components/FormElements/Textarea/Textarea.stories.tsx +37 -0
  210. package/src/Components/FormElements/Textarea/Textarea.tsx +46 -45
  211. package/src/Components/FormElements/Textarea/textarea.module.scss +34 -0
  212. package/src/Components/FormElements/hooks/useOnChangeDone.ts +6 -2
  213. package/src/Components/FullScreen/FullScreen.tsx +16 -16
  214. package/src/Components/Hooks/useBreakpoint.ts +13 -7
  215. package/src/Components/Hooks/useClientLayoutEffect.ts +1 -1
  216. package/src/Components/Hooks/useComposedRef.ts +2 -1
  217. package/src/Components/Hooks/useDebounced.ts +2 -2
  218. package/src/Components/Hooks/useDelayed.ts +2 -3
  219. package/src/Components/Hooks/useDelayedEffect.ts +3 -3
  220. package/src/Components/Hooks/useDelayedState.ts +18 -10
  221. package/src/Components/Hooks/useInViewport.ts +3 -2
  222. package/src/Components/Hooks/useKeyListener.ts +9 -6
  223. package/src/Components/Hooks/useListener.ts +4 -4
  224. package/src/Components/Hooks/useMousePosition.ts +2 -2
  225. package/src/Components/Hooks/useRerender.ts +17 -14
  226. package/src/Components/Hooks/useWindowDimensions.ts +11 -12
  227. package/src/Components/Icon/DoubleIcon.stories.tsx +38 -0
  228. package/src/Components/Icon/DoubleIcon.tsx +22 -17
  229. package/src/Components/Icon/Icon.stories.tsx +37 -0
  230. package/src/Components/Icon/Icon.tsx +39 -17
  231. package/src/Components/Icon/{icon.scss → icon.module.scss} +2 -0
  232. package/src/Components/Image/Image.stories.tsx +17 -0
  233. package/src/Components/Image/Image.tsx +7 -12
  234. package/src/Components/InViewport/InViewport.tsx +5 -6
  235. package/src/Components/Layout/Block.tsx +18 -12
  236. package/src/Components/Layout/Container.tsx +5 -6
  237. package/src/Components/Layout/Flex.tsx +17 -9
  238. package/src/Components/Layout/Grid/Grid.tsx +20 -10
  239. package/src/Components/Layout/Grid/GridItem.tsx +5 -6
  240. package/src/Components/Layout/Grid/{grid.scss → grid.module.scss} +19 -26
  241. package/src/Components/Layout/Grow.tsx +18 -8
  242. package/src/Components/Layout/Inline.tsx +15 -12
  243. package/src/Components/Layout/InlineBlock.tsx +17 -12
  244. package/src/Components/Layout/View.tsx +20 -9
  245. package/src/Components/Layout/ViewWithoutListeners.tsx +24 -15
  246. package/src/Components/Layout/container.module.scss +54 -0
  247. package/src/Components/LoadingArea/LoadingArea.stories.tsx +35 -0
  248. package/src/Components/LoadingArea/LoadingArea.tsx +10 -15
  249. package/src/Components/LoadingArea/{loadingArea.scss → loadingArea.module.scss} +8 -5
  250. package/src/Components/LoadingCircle/LoadingCircle.stories.tsx +58 -0
  251. package/src/Components/LoadingCircle/LoadingCircle.tsx +26 -13
  252. package/src/Components/LoadingCircle/{loadingCircle.scss → loadingCircle.module.scss} +14 -5
  253. package/src/Components/Menu/HoverMenu.stories.tsx +32 -0
  254. package/src/Components/Menu/HoverMenu.tsx +61 -45
  255. package/src/Components/Menu/Menu.stories.tsx +69 -0
  256. package/src/Components/Menu/Menu.tsx +67 -58
  257. package/src/Components/Menu/MenuCloseContext.ts +1 -1
  258. package/src/Components/Menu/MenuDivider.tsx +6 -6
  259. package/src/Components/Menu/MenuItem.stories.tsx +35 -0
  260. package/src/Components/Menu/MenuItem.tsx +66 -55
  261. package/src/Components/Menu/Submenu.stories.tsx +37 -0
  262. package/src/Components/Menu/Submenu.tsx +72 -58
  263. package/src/Components/Menu/{menu.scss → menu.module.scss} +23 -11
  264. package/src/Components/Menu/useMenu.ts +4 -3
  265. package/src/Components/RbmComponentProps.ts +6 -7
  266. package/src/Components/SizeCalculator/SizeCalculator.tsx +3 -3
  267. package/src/Components/SpoilerList/Spoiler/Spoiler.stories.tsx +21 -0
  268. package/src/Components/SpoilerList/Spoiler/Spoiler.tsx +49 -48
  269. package/src/Components/SpoilerList/Spoiler/{spoiler.scss → spoiler.module.scss} +46 -30
  270. package/src/Components/SpoilerList/SpoilerList.tsx +8 -12
  271. package/src/Components/SpoilerList/useSpoilerGroup.ts +2 -2
  272. package/src/Components/TabBar/TabBar.stories.tsx +32 -0
  273. package/src/Components/TabBar/TabBar.tsx +16 -18
  274. package/src/Components/TabBar/TabBarButton.tsx +13 -10
  275. package/src/Components/TabBar/tabBar.module.scss +128 -0
  276. package/src/Components/Table/Table.tsx +16 -15
  277. package/src/Components/Text/Heading.tsx +6 -7
  278. package/src/Components/Text/Text.stories.tsx +121 -0
  279. package/src/Components/Text/Text.tsx +19 -10
  280. package/src/Components/Text/{text.scss → text.module.scss} +3 -8
  281. package/src/Components/Toast/Toast.stories.tsx +25 -0
  282. package/src/Components/Toast/Toast.tsx +15 -17
  283. package/src/Components/Toast/ToastContainer.tsx +72 -54
  284. package/src/Components/Toast/ToastContext.ts +9 -3
  285. package/src/Components/Toast/toast.module.scss +65 -0
  286. package/src/Components/TopBar/MoreButton.tsx +9 -11
  287. package/src/Components/TopBar/TopBar.stories.tsx +63 -0
  288. package/src/Components/TopBar/TopBar.tsx +49 -40
  289. package/src/Components/TopBar/TopBarButton.tsx +20 -10
  290. package/src/Components/TopBar/{topBar.scss → topBar.module.scss} +40 -23
  291. package/src/Size.ts +1 -2
  292. package/src/WrongChildError.ts +1 -1
  293. package/src/helper/EmptyProps.ts +1 -1
  294. package/src/helper/nonEmptyString.ts +1 -1
  295. package/src/helper/useDeepShallow.ts +10 -0
  296. package/src/helper/withMemo.ts +7 -8
  297. package/src/helper/withRenderBrowserOnly.tsx +2 -1
  298. package/src/helper/withRestrictedChildren.tsx +11 -14
  299. package/src/index.ts +116 -0
  300. package/src/scss/_colors.scss +32 -19
  301. package/src/scss/_default.scss +5 -5
  302. package/src/scss/_flavorMixin.scss +3 -0
  303. package/src/scss/_variables.scss +19 -19
  304. package/src/scss/_vars.scss +12 -0
  305. package/src/scss/baseClasses.module.scss +23 -0
  306. package/src/scss/breakpoints.scss +79 -0
  307. package/src/treeshakeTest.ts +3 -0
  308. package/src/types/{react-table-config.d.ts → reactTableConfig.d.ts} +2 -43
  309. package/stylelint.config.mjs +4 -0
  310. package/tsconfig.build.json +7 -0
  311. package/tsconfig.json +16 -48
  312. package/webpack.config.ts +6 -0
  313. package/.eslintrc.json +0 -191
  314. package/.npnignore +0 -5
  315. package/LICENSE +0 -21
  316. package/README.md +0 -1
  317. package/babel.config.js +0 -22
  318. package/bin/build.js +0 -60
  319. package/bin/updateCopies.js +0 -94
  320. package/bootstrapReactMobile.ts +0 -119
  321. package/dist/bootstrapReactMobile.d.ts +0 -119
  322. package/dist/bootstrapReactMobile.js +0 -14091
  323. package/dist/bootstrapReactMobile.js.map +0 -1
  324. package/dist/src/Components/Card/Card.d.ts +0 -14
  325. package/dist/src/Components/Dialog/AlertDialog.d.ts +0 -10
  326. package/dist/src/Components/Dialog/ConfirmDialog.d.ts +0 -11
  327. package/dist/src/Components/FormElements/CheckBox/Checkbox.d.ts +0 -14
  328. package/dist/src/Components/FormElements/Controller/HookForm.d.ts +0 -8
  329. package/dist/src/Components/FormElements/FormError.d.ts +0 -5
  330. package/dist/src/Components/FormElements/Input/FileInput/FileInput.d.ts +0 -13
  331. package/dist/src/Components/FormElements/Input/HiddenInput.d.ts +0 -8
  332. package/dist/src/Components/Image/Image.d.ts +0 -12
  333. package/dist/src/Components/Layout/Grow.d.ts +0 -9
  334. package/dist/src/Components/List/BulletList/BulletList.d.ts +0 -8
  335. package/dist/src/Components/List/BulletList/ListItem.d.ts +0 -7
  336. package/dist/src/Components/List/InfiniteList.d.ts +0 -7
  337. package/dist/src/Components/List/List.d.ts +0 -15
  338. package/dist/src/Components/LoadingArea/LoadingArea.d.ts +0 -12
  339. package/dist/src/Components/LoadingCircle/LoadingCircle.d.ts +0 -8
  340. package/dist/src/Components/SpoilerList/Spoiler/Spoiler.d.ts +0 -18
  341. package/dist/src/Components/TabBar/TabBarButton.d.ts +0 -9
  342. package/dist/src/Components/Toast/Toast.d.ts +0 -13
  343. package/dist/src/Components/TopBar/MoreButton.d.ts +0 -9
  344. package/dist/src/Components/TopBar/TopBarButton.d.ts +0 -9
  345. package/dist/src/ListRow/ListRow.d.ts +0 -1
  346. package/dist/src/StyleProvider.d.ts +0 -2
  347. package/dist/src/helper/withMemo.d.ts +0 -3
  348. package/dist/src/helper/withRestrictedChildren.d.ts +0 -6
  349. package/scripts/getPackageJson.js +0 -25
  350. package/src/Components/ActionSheet/actionSheet.scss +0 -153
  351. package/src/Components/Card/card.scss +0 -76
  352. package/src/Components/Clickable/clickable.scss +0 -8
  353. package/src/Components/Dialog/dialog.scss +0 -30
  354. package/src/Components/Dialog/dialogBackground.scss +0 -11
  355. package/src/Components/FormElements/Button/button.scss +0 -73
  356. package/src/Components/FormElements/FormError.tsx +0 -29
  357. package/src/Components/FormElements/Input/input.scss +0 -83
  358. package/src/Components/FormElements/SearchSelectInput/seachSelectInput.scss +0 -97
  359. package/src/Components/FormElements/Select/select.scss +0 -61
  360. package/src/Components/FormElements/Slider/slider.scss +0 -92
  361. package/src/Components/FormElements/Switch/switch.scss +0 -152
  362. package/src/Components/FormElements/Textarea/textarea.scss +0 -31
  363. package/src/Components/FormElements/formError.scss +0 -4
  364. package/src/Components/Layout/container.scss +0 -12
  365. package/src/Components/List/BulletList/BulletList.tsx +0 -33
  366. package/src/Components/List/BulletList/ListItem.tsx +0 -34
  367. package/src/Components/List/InfiniteList.tsx +0 -56
  368. package/src/Components/List/List.tsx +0 -95
  369. package/src/Components/List/list.scss +0 -30
  370. package/src/Components/TabBar/tabBar.scss +0 -108
  371. package/src/Components/Toast/toast.scss +0 -55
  372. package/src/ListRow/ListRow.tsx +0 -20
  373. package/src/StyleProvider.ts +0 -4
  374. package/src/scss/_baseClasses.scss +0 -23
  375. package/src/types/isomorphic-style-loader.d.ts +0 -3
  376. package/webpack.config.js +0 -94
  377. /package/dist/{src/Components → Components}/Dialog/useAlertDialog.d.ts +0 -0
  378. /package/dist/{src/Components → Components}/Dialog/useConfirmDialog.d.ts +0 -0
  379. /package/dist/{src/Components → Components}/DragAndDrop/useStrictEnabled.d.ts +0 -0
  380. /package/dist/{src/Components → Components}/Flavor.d.ts +0 -0
  381. /package/dist/{src/Components → Components}/FormElements/Button/ButtonType.d.ts +0 -0
  382. /package/dist/{src/Components → Components}/FormElements/ColorInput/sharedSelectedColor.d.ts +0 -0
  383. /package/dist/{src/Components → Components}/FormElements/Controller/SendFormContext.d.ts +0 -0
  384. /package/dist/{src/Components → Components}/FormElements/Input/FileInput/FileType.d.ts +0 -0
  385. /package/dist/{src/Components → Components}/Hooks/useBreakpoint.d.ts +0 -0
  386. /package/dist/{src/Components → Components}/Hooks/useDebounced.d.ts +0 -0
  387. /package/dist/{src/Components → Components}/Hooks/useDelayed.d.ts +0 -0
  388. /package/dist/{src/Components → Components}/Hooks/useDelayedEffect.d.ts +0 -0
  389. /package/dist/{src/Components → Components}/Hooks/useKeyListener.d.ts +0 -0
  390. /package/dist/{src/Components → Components}/Hooks/useListener.d.ts +0 -0
  391. /package/dist/{src/Components → Components}/Hooks/useMousePosition.d.ts +0 -0
  392. /package/dist/{src/Components → Components}/Hooks/useOnMount.d.ts +0 -0
  393. /package/dist/{src/Components → Components}/Hooks/useOnce.d.ts +0 -0
  394. /package/dist/{src/Components → Components}/Hooks/useRerender.d.ts +0 -0
  395. /package/dist/{src/Components → Components}/Hooks/useWindowDimensions.d.ts +0 -0
  396. /package/dist/{src/Components → Components}/SpoilerList/useSpoilerGroup.d.ts +0 -0
  397. /package/dist/{src/Components → Components}/Toast/ToastContext.d.ts +0 -0
  398. /package/dist/{src/Size.d.ts → Size.d.ts} +0 -0
  399. /package/dist/{src/TypeHelpers.d.ts → TypeHelpers.d.ts} +0 -0
  400. /package/dist/{src/WindowContext → WindowContext}/WindowContext.d.ts +0 -0
  401. /package/dist/{src/WrongChildError.d.ts → WrongChildError.d.ts} +0 -0
  402. /package/dist/{src/helper → helper}/Characters.d.ts +0 -0
  403. /package/dist/{src/helper → helper}/DistributiveOmit.d.ts +0 -0
  404. /package/dist/{src/helper → helper}/EmptyProps.d.ts +0 -0
  405. /package/dist/{src/helper → helper}/memoComparator.d.ts +0 -0
  406. /package/dist/{src/helper → helper}/nonEmptyString.d.ts +0 -0
  407. /package/src/Components/FormElements/Input/PasswordInput/{passwordInput.scss → passwordInput.module.scss} +0 -0
  408. /package/src/Components/Image/{image.scss → image.module.scss} +0 -0
  409. /package/src/Components/InViewport/{inViewport.scss → inViewport.module.scss} +0 -0
  410. /package/src/Components/Layout/{layout.scss → layout.module.scss} +0 -0
  411. /package/src/Components/Text/{heading.scss → heading.module.scss} +0 -0
  412. /package/src/types/{scss-module.d.ts → scss.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ export declare function treeshakeTest(): void;
@@ -0,0 +1,17 @@
1
+ import defaultConfig from '@ainias42/config/eslint.config.js';
2
+ import path from 'path';
3
+
4
+ export default [
5
+ ...defaultConfig,
6
+ {
7
+ rules: {
8
+ 'import/no-extraneous-dependencies': [
9
+ 'error',
10
+ {
11
+ devDependencies: ['src/**/*.stories.ts', 'src/**/*.stories.tsx', '.storybook/**/*.ts'],
12
+ packageDir: ['./', path.join(process.cwd(), '../..')],
13
+ },
14
+ ],
15
+ },
16
+ },
17
+ ];
package/package.json CHANGED
@@ -1,107 +1,57 @@
1
1
  {
2
2
  "name": "@ainias42/react-bootstrap-mobile",
3
- "version": "1.0.0",
4
- "description": "Mobile React Components using Bootstrap",
5
- "main": "dist/bootstrapReactMobile",
3
+ "version": "1.0.2",
4
+ "description": "Mobile React Components",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "license": "MIT",
9
+ "main": "dist/index.js",
6
10
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1",
8
- "build": "node bin/build.js && webpack",
9
- "build:production": "node bin/build.js && webpack --env production",
10
- "update packages": "node bin/updateCopies.js",
11
- "typecheck": "tsc --noEmit",
12
- "lint:noCache": "eslint \"src/{**/*,*}.{js,jsx,tsx,ts}\" --max-warnings 0",
11
+ "build": "ctix build && webpack --env production",
12
+ "lint:noCache": "eslint \"{src,.storybook}/{**/*,*}.{js,jsx,tsx,ts}\" --max-warnings 0",
13
13
  "lint": "npm run lint:noCache -- --cache",
14
- "lint:fix": "npm run lint -- --fix"
14
+ "lint:fix": "npm run lint -- --fix",
15
+ "typecheck": "tsc --noEmit",
16
+ "prettier": "npm run prettier:list -- --write",
17
+ "prettier:list": "prettier --list-different \"{src,.storybook}/**/*.{ts,tsx,js,jsx,json}\"",
18
+ "stylelint": "stylelint --allow-empty-input \"{src,.storybook}/**/*.{css,scss}\"",
19
+ "stylelint:fix": "npm run stylelint -- --fix",
20
+ "storybook": "storybook dev -p 6006",
21
+ "build-storybook": "storybook build"
15
22
  },
23
+ "author": "",
16
24
  "repository": {
17
25
  "type": "git",
18
- "url": "git+https://github.com/Ainias/Bootstrap-React-Mobile.git"
19
- },
20
- "keywords": [
21
- "bootstrap",
22
- "react",
23
- "mobile"
24
- ],
25
- "author": "Silas Günther",
26
- "license": "MIT",
27
- "bugs": {
28
- "url": "https://github.com/Ainias/Bootstrap-React-Mobile/issues"
26
+ "url": "gitea@git.silas.link:Ainias/libraries.git"
29
27
  },
30
- "publishConfig": {
31
- "access": "public"
32
- },
33
- "homepage": "https://github.com/Ainias/Bootstrap-React-Mobile#readme",
34
28
  "peerDependencies": {
35
- "@fortawesome/fontawesome-svg-core": "^6.5.2",
36
- "@fortawesome/free-regular-svg-icons": "^6.5.2",
37
- "@fortawesome/free-solid-svg-icons": "^6.5.2",
38
- "@fortawesome/react-fontawesome": "^0.2.2",
39
- "bootstrap": "^5.3.3",
40
- "react": "^19.1.1",
41
- "react-beautiful-dnd": "^13.1.1",
42
- "react-hook-form": "^7.53.0"
43
- },
44
- "devDependencies": {
45
- "@babel/core": "^7.24.6",
46
- "@babel/plugin-proposal-class-properties": "^7.18.6",
47
- "@babel/plugin-transform-typescript": "^7.24.6",
48
- "@babel/preset-env": "^7.24.6",
49
- "@babel/preset-react": "^7.24.6",
50
- "@babel/preset-typescript": "^7.24.6",
51
- "@fortawesome/fontawesome-svg-core": "^6.5.2",
52
- "@fortawesome/free-regular-svg-icons": "^6.5.2",
53
- "@fortawesome/free-solid-svg-icons": "^6.5.2",
54
- "@fortawesome/react-fontawesome": "^0.2.2",
55
- "@types/react": "^19.1.11",
56
- "@types/react-beautiful-dnd": "^13.1.8",
57
- "@types/react-dom": "^19.1.7",
58
- "@types/react-table": "^7.7.20",
59
- "@types/react-window": "^1.8.8",
60
- "@types/react-window-infinite-loader": "^1.0.9",
61
- "@typescript-eslint/eslint-plugin": "^7.11.0",
62
- "@typescript-eslint/parser": "^7.11.0",
63
- "ajv": "^8.14.0",
64
- "babel-loader": "^9.1.3",
65
- "bootstrap": "^5.3.3",
66
- "css-layering-webpack-plugin": "^0.3.0",
67
- "css-loader": "^7.1.2",
68
- "eslint": "^8.57.0",
69
- "eslint-config-airbnb": "^19.0.4",
70
- "eslint-config-airbnb-typescript": "^18.0.0",
71
- "eslint-config-prettier": "^9.1.0",
72
- "eslint-import-resolver-typescript": "^3.6.1",
73
- "eslint-plugin-import": "^2.29.1",
74
- "eslint-plugin-jsx-a11y": "^6.8.0",
75
- "eslint-plugin-react": "^7.34.2",
76
- "eslint-plugin-react-hooks": "^4.6.2",
77
- "html-webpack-plugin": "^5.6.0",
78
- "loader-utils": "3.2.1",
79
- "mini-css-extract-plugin": "^2.9.0",
80
- "prettier": "^3.2.5",
81
- "react": "^19.1.1",
82
- "react-beautiful-dnd": "^13.1.1",
83
- "react-dom": "^19.1.1",
84
- "react-hook-form": "^7.53.0",
85
- "sass": "^1.77.2",
86
- "sass-loader": "^14.2.1",
87
- "terser-webpack-plugin": "^5.3.10",
88
- "ts-loader": "^9.5.1",
89
- "typescript": "^5.9.2",
90
- "webpack": "^5.91.0",
91
- "webpack-cli": "^5.1.4",
92
- "webpack-dev-server": "^5.0.4"
29
+ "@fortawesome/fontawesome-svg-core": "^6.7.2",
30
+ "@fortawesome/free-regular-svg-icons": "^6.7.2",
31
+ "@fortawesome/free-solid-svg-icons": "^6.7.2",
32
+ "@fortawesome/react-fontawesome": "^3.0.2",
33
+ "react": "^19.1.0",
34
+ "react-dom": "^19.1.0",
35
+ "react-hook-form": "^7.62.0"
93
36
  },
94
37
  "dependencies": {
38
+ "@ainias42/config": "*",
95
39
  "@ainias42/js-helper": ">=0.8.16",
96
- "@types/react-virtualized-auto-sizer": "^1.0.4",
40
+ "@hello-pangea/dnd": "^18.0.1",
97
41
  "@uiw/react-color": "^2.5.5",
98
42
  "classnames": "^2.5.1",
99
- "isomorphic-style-loader": "^5.3.2",
100
- "react-color": "^2.19.3",
101
43
  "react-table": "^7.8.0",
102
- "react-virtualized-auto-sizer": "^1.0.24",
103
- "react-window": "^1.8.10",
104
- "react-window-infinite-loader": "^1.0.9",
105
- "yup": "^1.6.1"
44
+ "yup": "^1.7.0"
45
+ },
46
+ "devDependencies": {
47
+ "@ainias42/webpack-config": "*",
48
+ "@storybook/addon-docs": "^9.1.5",
49
+ "@storybook/addon-onboarding": "^9.1.5",
50
+ "@storybook/react-vite": "^9.1.5",
51
+ "@storybook/addon-themes": "^9.1.5",
52
+ "eslint-plugin-storybook": "^9.1.5",
53
+ "storybook": "^9.1.5",
54
+ "vite": "^7.1.4",
55
+ "vite-tsconfig-paths": "^5.1.4"
106
56
  }
107
57
  }
@@ -1,6 +1,6 @@
1
- @import "src/scss/variables";
2
- @import "src/scss/designMixin";
3
- @import "src/scss/flavorMixin";
4
- @import "src/scss/default";
5
- @import "src/scss/baseClasses";
6
- @import "src/scss/colors";
1
+ @use "src/scss/variables" as *;
2
+ @use "src/scss/designMixin" as *;
3
+ @use "src/scss/flavorMixin" as *;
4
+ @use "src/scss/breakpoints" as *;
5
+ @use "src/scss/default" as *;
6
+ @use "src/scss/colors" as *;
@@ -0,0 +1,55 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { ActionSheet } from '@/Components/ActionSheet/ActionSheet';
4
+ import { faCog, faHouse, faTrash, faUser } from '@fortawesome/free-solid-svg-icons';
5
+ import { fn } from 'storybook/test';
6
+ import React, { useEffect, useRef } from 'react';
7
+ import type { ActionSheetHandle } from '@/Components/ActionSheet/ActionSheet';
8
+
9
+ const meta = {
10
+ component: ActionSheet,
11
+ render: (args) => {
12
+ // eslint-disable-next-line react-hooks/rules-of-hooks
13
+ const ref = useRef<ActionSheetHandle | null>(null);
14
+
15
+ // eslint-disable-next-line react-hooks/rules-of-hooks
16
+ useEffect(() => {
17
+ ref.current?.show();
18
+ }, []);
19
+
20
+ return <ActionSheet {...args} ref={ref} />;
21
+ },
22
+ } satisfies Meta<typeof ActionSheet>;
23
+
24
+ export default meta;
25
+
26
+ type Story = StoryObj<typeof meta>;
27
+
28
+ export const Default: Story = {
29
+ args: {
30
+ title: 'Action Sheet Title',
31
+ actions: [
32
+ {
33
+ name: 'Action 1',
34
+ icon: faCog,
35
+ action: fn(),
36
+ },
37
+ {
38
+ name: 'Action 2',
39
+ icon: faHouse,
40
+ action: fn(),
41
+ },
42
+ {
43
+ name: 'Action 3',
44
+ icon: faUser,
45
+ action: fn(),
46
+ },
47
+ {
48
+ name: 'Delete Action',
49
+ icon: faTrash,
50
+ action: fn(),
51
+ isDestructive: true,
52
+ },
53
+ ],
54
+ },
55
+ };
@@ -1,24 +1,27 @@
1
1
  import * as React from 'react';
2
- import { RbmComponentProps } from '../RbmComponentProps';
3
- import { ForwardedRef, useCallback, useImperativeHandle, useState } from 'react';
4
- import { Clickable } from '../Clickable/Clickable';
5
- import { Container } from '../Layout/Container';
2
+ import { Block } from '@/Components/Layout/Block';
3
+ import { Clickable } from '@/Components/Clickable/Clickable';
4
+ import { Container } from '@/Components/Layout/Container';
5
+ import { Flex } from '@/Components/Layout/Flex';
6
+ import { Icon } from '@/Components/Icon/Icon';
7
+ import { InlineBlock } from '@/Components/Layout/InlineBlock';
8
+ import { Text } from '@/Components/Text/Text';
6
9
  import { faTimes } from '@fortawesome/free-solid-svg-icons';
7
- import { Icon, IconSource } from '../Icon/Icon';
8
- import styles from './actionSheet.scss';
10
+ import { useCallback, useImperativeHandle, useState } from 'react';
11
+ import { withMemo } from '@/helper/withMemo';
12
+ import baseStyles from '@/scss/baseClasses.module.scss';
9
13
  import classNames from 'classnames';
10
- import { InlineBlock } from '../Layout/InlineBlock';
11
- import { Text } from '../Text/Text';
12
- import { Flex } from '../Layout/Flex';
13
- import { Block } from '../Layout/Block';
14
- import { withMemo } from "../../helper/withMemo";
14
+ import styles from '@/Components/ActionSheet/actionSheet.module.scss';
15
+ import type { ForwardedRef } from 'react';
16
+ import type { IconSource } from '@/Components/Icon/Icon';
17
+ import type { RbmComponentProps } from '@/Components/RbmComponentProps';
15
18
 
16
19
  export type ActionSheetAction<ActionData> = {
17
20
  name: string;
18
21
  icon?: IconSource;
19
22
  action: (data?: ActionData) => void;
20
23
  actionData?: ActionData;
21
- isDeleteAction?: boolean;
24
+ isDestructive?: boolean;
22
25
  };
23
26
 
24
27
  export type ActionSheetHandle = {
@@ -26,18 +29,23 @@ export type ActionSheetHandle = {
26
29
  hide: () => void;
27
30
  };
28
31
 
29
-
30
32
  export type ActionSheetProps = RbmComponentProps<{
31
33
  title?: string;
32
34
  actions: ActionSheetAction<any>[];
33
35
  cancelText?: string;
34
36
  onClose?: () => void;
35
- ref?: ForwardedRef<ActionSheetHandle>
37
+ ref?: ForwardedRef<ActionSheetHandle>;
36
38
  }>;
37
39
 
38
- export const ActionSheet = withMemo(function ActionSheet(
39
- { title, actions, cancelText = 'Cancel', className, onClose, style, ref }: ActionSheetProps,
40
- ) {
40
+ export const ActionSheet = withMemo(function ActionSheet({
41
+ title,
42
+ actions,
43
+ cancelText = 'Cancel',
44
+ className,
45
+ onClose,
46
+ style,
47
+ ref,
48
+ }: ActionSheetProps) {
41
49
  const [isOpen, setIsOpen] = useState(false);
42
50
 
43
51
  // Variables
@@ -58,7 +66,7 @@ export const ActionSheet = withMemo(function ActionSheet(
58
66
  close();
59
67
  action?.action(action.actionData);
60
68
  },
61
- [close]
69
+ [close],
62
70
  );
63
71
 
64
72
  useImperativeHandle(
@@ -67,7 +75,7 @@ export const ActionSheet = withMemo(function ActionSheet(
67
75
  show: () => setIsOpen(true),
68
76
  hide: close,
69
77
  }),
70
- [setIsOpen, close]
78
+ [setIsOpen, close],
71
79
  );
72
80
 
73
81
  // Effects
@@ -75,9 +83,14 @@ export const ActionSheet = withMemo(function ActionSheet(
75
83
  // Other
76
84
 
77
85
  const renderAction = (action: ActionSheetAction<any>) => (
78
- <Clickable key={action.name} className={styles.action} onClick={onActionClick} onClickData={action}>
86
+ <Clickable
87
+ key={action.name}
88
+ className={classNames(styles.action, { [styles.destructive]: action.isDestructive })}
89
+ onClick={onActionClick}
90
+ onClickData={action}
91
+ >
79
92
  <InlineBlock className={styles.actionIcon}>{action.icon ? <Icon icon={action.icon} /> : null}</InlineBlock>
80
- <Text>{action.name}</Text>
93
+ <Text className={styles.actionName}>{action.name}</Text>
81
94
  </Clickable>
82
95
  );
83
96
 
@@ -87,10 +100,10 @@ export const ActionSheet = withMemo(function ActionSheet(
87
100
  onClick={close}
88
101
  style={style}
89
102
  >
90
- <Container fluid="xxl" className="full-height">
103
+ <Container fluid="xxl" className={baseStyles.fullHeight}>
91
104
  <Flex className={styles.content}>
92
105
  {title ? (
93
- <Block>
106
+ <Block className={styles.title}>
94
107
  <Text>{title}</Text>
95
108
  </Block>
96
109
  ) : null}
@@ -109,4 +122,4 @@ export const ActionSheet = withMemo(function ActionSheet(
109
122
  </Container>
110
123
  </Clickable>
111
124
  );
112
- }, styles);
125
+ });
@@ -0,0 +1,198 @@
1
+ @use "../../scss/variables" as variables;
2
+ @use "../../scss/designMixin" as mixin;
3
+ @use "../../scss/vars" as *;
4
+
5
+ @include vars {
6
+ --action-sheet-background-color: var(--curtain-light);
7
+ --action-sheet-action-background-color: var(--foreground-primary);
8
+ --action-sheet-title-color: var(--text-secondary);
9
+ }
10
+
11
+ @include mixin.design(variables.$material) {
12
+ --action-sheet-action-text-color: var(--text-secondary);
13
+ }
14
+
15
+ @include mixin.design(variables.$flat) {
16
+ --action-sheet-action-text-color: var(--flavor-accent);
17
+ --action-sheet-action-background-image: linear-gradient(0deg, var(--curtain-light), var(--curtain-light) 100%);
18
+ --action-sheet-action-destructive-text-color: var(--flavor-destructive)
19
+ }
20
+
21
+ .actionSheet {
22
+ position: fixed;
23
+ inset: 100% 0 0;
24
+ overflow: hidden;
25
+ background-color: var(--action-sheet-background-color);
26
+ z-index: var(--action-sheet-z-index);
27
+ transition-duration: 0s;
28
+ transition-delay: 0.25s;
29
+
30
+ &.open {
31
+ transition-delay: 0s;
32
+ top: 0;
33
+
34
+ > :global(.full-height) {;
35
+ top: 0
36
+ }
37
+ }
38
+
39
+ > :global(.full-height) {
40
+ position: absolute;
41
+ inset: 100% 0 0;
42
+ }
43
+
44
+ .content {
45
+ bottom: 0;
46
+ height: 100%;
47
+ display: flex;
48
+ flex-direction: column;
49
+ justify-content: end;
50
+
51
+ .title, .action {
52
+ width: 100%;
53
+ background-color: var(--action-sheet-action-background-color);
54
+ border-radius: 0;
55
+ display: block;
56
+ text-overflow: ellipsis;
57
+ overflow: hidden;
58
+ white-space: nowrap;
59
+ }
60
+
61
+ .title {
62
+ --text-primary-default-color: var(--action-sheet-title-color);
63
+
64
+ color: var(--action-sheet-title-color);
65
+ }
66
+
67
+ .action {
68
+ --text-primary-default-color: var(--action-sheet-action-text-color);
69
+
70
+ color: var(--action-sheet-action-text-color);
71
+ background-color: var(--action-sheet-action-background-color);
72
+
73
+ .actionName {
74
+ font-size: 20px;
75
+ }
76
+ }
77
+
78
+ .cancel {
79
+ --text-primary-default-color: var(--action-sheet-action-text-color);
80
+
81
+ color: var(--action-sheet-action-text-color);
82
+ width: 100%;
83
+ font-size: 20px;
84
+ background-color: var(--action-sheet-action-background-color);
85
+ display: block;
86
+ text-overflow: ellipsis;
87
+ overflow: hidden;
88
+ white-space: nowrap;
89
+ }
90
+ }
91
+
92
+ @include mixin.design(variables.$material) {
93
+ > .full-height {
94
+ padding: 0;
95
+ }
96
+
97
+ .content {
98
+ text-align: left;
99
+
100
+ .action {
101
+ height: 30px;
102
+ }
103
+
104
+ .title {
105
+ height: 40px;
106
+ line-height: 40px;
107
+ }
108
+
109
+ .action, .title {
110
+ font-size: 1rem;
111
+
112
+ .actionName {
113
+ font-size: 1rem;
114
+ }
115
+
116
+ padding: 0 0 0 16px;
117
+
118
+ .actionIcon {
119
+ display: inline-block;
120
+ float: left;
121
+ margin-right: 24px;
122
+ font-size: 16px;
123
+ text-align: center;
124
+ width: 0.8em;
125
+ height: 30px;
126
+ }
127
+ }
128
+
129
+ .cancel {
130
+ height: 35px;
131
+ line-height: 30px;
132
+ padding: 0 0 0 16px;
133
+ color: var(--action-sheet-action-text-color);
134
+ font-size: 1rem;
135
+
136
+ .actionIcon {
137
+ display: inline-block;
138
+ float: left;
139
+ margin-right: 24px;
140
+ font-size: 1rem;
141
+ text-align: center;
142
+ width: 0.8em;
143
+ height: 30px;
144
+ }
145
+ }
146
+ }
147
+ }
148
+
149
+ @include mixin.design(variables.$flat) {
150
+ .content {
151
+ text-align: center;
152
+ padding-right: 10px;
153
+ padding-left: 10px;
154
+ padding-bottom: 10px;
155
+
156
+ .action, .title {
157
+ height: 56px;
158
+ line-height: 56px;
159
+ background-size: 100% 1px;
160
+ background-repeat: no-repeat;
161
+ background-position: bottom;
162
+ background-image: var(--action-sheet-action-background-image);
163
+
164
+ &:first-child {
165
+ border-top-right-radius: 12px;
166
+ border-top-left-radius: 12px;
167
+ }
168
+
169
+ &:nth-last-child(2) {
170
+ border-bottom-right-radius: 12px;
171
+ border-bottom-left-radius: 12px;
172
+ }
173
+
174
+ .actionIcon {
175
+ display: none;
176
+ }
177
+
178
+ &.destructive {
179
+ --text-primary-default-color: var(--action-sheet-action-destructive-text-color);
180
+
181
+ color: var(--action-sheet-action-destructive-text-color);
182
+ }
183
+ }
184
+
185
+ .cancel {
186
+ height: 56px;
187
+ line-height: 56px;
188
+ border-radius: 12px;
189
+ margin: 8px 0 0;
190
+ font-weight: 600;
191
+
192
+ .actionIcon {
193
+ display: none;
194
+ }
195
+ }
196
+ }
197
+ }
198
+ }
@@ -0,0 +1,41 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import { Card } from '@/Components/Card/Card';
4
+ import { Text } from '@/Components/Text/Text';
5
+ import React from 'react';
6
+
7
+ const meta = {
8
+ component: Card,
9
+ argTypes: {
10
+ children: {
11
+ control: false,
12
+ },
13
+ },
14
+ args: {
15
+ children: (
16
+ <Text>
17
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
18
+ labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et
19
+ ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum
20
+ dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore
21
+ magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
22
+ clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
23
+ </Text>
24
+ ),
25
+ },
26
+ } satisfies Meta<typeof Card>;
27
+
28
+ export default meta;
29
+
30
+ type Story = StoryObj<typeof meta>;
31
+
32
+ export const Default: Story = {
33
+ args: {
34
+ title: 'Title Card',
35
+ fullHeight: false,
36
+ noMargin: false,
37
+ noPadding: false,
38
+ noPaddingHeight: false,
39
+ noPaddingWidth: false,
40
+ },
41
+ };
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { RbmComponentProps } from '../RbmComponentProps';
3
- import styles from './card.scss';
4
- import { withMemo } from '../../helper/withMemo';
2
+ import { withMemo } from '@/helper/withMemo';
5
3
  import classNames from 'classnames';
6
- import { ReactElement } from 'react';
4
+ import styles from '@/Components/Card/card.module.scss';
5
+ import type { RbmComponentProps } from '@/Components/RbmComponentProps';
6
+ import type { ReactElement } from 'react';
7
7
 
8
8
  export type CardProps = RbmComponentProps<{
9
9
  title?: string | ReactElement;
@@ -14,7 +14,7 @@ export type CardProps = RbmComponentProps<{
14
14
  noMargin?: boolean;
15
15
  }>;
16
16
 
17
- function Card({
17
+ export const Card = withMemo(function Card({
18
18
  title,
19
19
  children,
20
20
  fullHeight = false,
@@ -39,7 +39,4 @@ function Card({
39
39
  <div className={styles.content}>{children}</div>
40
40
  </div>
41
41
  );
42
- }
43
-
44
- const CardMemo = withMemo(Card, styles);
45
- export { CardMemo as Card };
42
+ });