@ainias42/react-bootstrap-mobile 1.0.1 → 1.0.3
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.
- package/.ctirc +114 -0
- package/.prettierrc +1 -5
- package/.storybook/main.ts +31 -0
- package/.storybook/preview.ts +36 -0
- package/bin/release.sh +1 -37
- package/bin/updatePackages.sh +3 -0
- package/dist/{src/Components → Components}/ActionSheet/ActionSheet.d.ts +5 -5
- package/dist/Components/ActionSheet/ActionSheet.stories.d.ts +9 -0
- package/dist/Components/Card/Card.d.ts +12 -0
- package/dist/Components/Card/Card.stories.d.ts +16 -0
- package/dist/{src/Components → Components}/Clickable/Clickable.d.ts +3 -3
- package/dist/Components/Colors.stories.d.ts +5 -0
- package/dist/Components/Dialog/AlertDialog.d.ts +8 -0
- package/dist/Components/Dialog/AlertDialog.stories.d.ts +14 -0
- package/dist/{src/Components → Components}/Dialog/ButtonDialog.d.ts +3 -3
- package/dist/Components/Dialog/ConfirmDialog.d.ts +9 -0
- package/dist/Components/Dialog/ConfirmDialog.stories.d.ts +15 -0
- package/dist/{src/Components → Components}/Dialog/Dialog.d.ts +2 -2
- package/dist/{src/Components → Components}/Dialog/DialogBackground.d.ts +2 -2
- package/dist/{src/Components → Components}/Dialog/DialogContainer.d.ts +3 -3
- package/dist/{src/Components → Components}/Dialog/DialogContext.d.ts +3 -2
- package/dist/{src/Components → Components}/DragAndDrop/DragItem.d.ts +2 -2
- package/dist/{src/Components → Components}/DragAndDrop/DropArea.d.ts +2 -2
- package/dist/{src/Components → Components}/FormElements/Button/Button.d.ts +8 -8
- package/dist/Components/FormElements/Button/Button.stories.d.ts +43 -0
- package/dist/Components/FormElements/CheckBox/Checkbox.d.ts +12 -0
- package/dist/Components/FormElements/CheckBox/Checkbox.stories.d.ts +17 -0
- package/dist/{src/Components → Components}/FormElements/ColorInput/ColorInput.d.ts +3 -5
- package/dist/Components/FormElements/ColorInput/ColorInput.stories.d.ts +8 -0
- package/dist/{src/Components → Components}/FormElements/Controller/ColorInputController.d.ts +1 -1
- package/dist/{src/Components → Components}/FormElements/Controller/FileInputController.d.ts +4 -4
- package/dist/Components/FormElements/Controller/HookForm.d.ts +15 -0
- package/dist/{src/Components → Components}/FormElements/Controller/InputController.d.ts +1 -1
- package/dist/{src/Components → Components}/FormElements/Controller/MultipleFileInputController.d.ts +1 -1
- package/dist/{src/Components → Components}/FormElements/Controller/PasswordInputController.d.ts +1 -1
- package/dist/{src/Components → Components}/FormElements/Controller/SelectController.d.ts +1 -1
- package/dist/Components/FormElements/Controller/SliderController.d.ts +5 -0
- package/dist/{src/Components → Components}/FormElements/Controller/SwitchController.d.ts +1 -1
- package/dist/{src/Components → Components}/FormElements/Controller/TextareaController.d.ts +1 -1
- package/dist/{src/Components → Components}/FormElements/Controller/useYupResolver.d.ts +1 -1
- package/dist/{src/Components → Components}/FormElements/Controller/withHookController.d.ts +3 -2
- package/dist/Components/FormElements/Error/FormError.d.ts +6 -0
- package/dist/Components/FormElements/Error/FormError.stories.d.ts +7 -0
- package/dist/Components/FormElements/Form.stories.d.ts +7 -0
- package/dist/Components/FormElements/Input/FileInput/FileInput.d.ts +13 -0
- package/dist/{src/Components → Components}/FormElements/Input/FileInput/MultipleFileInput.d.ts +6 -6
- package/dist/Components/FormElements/Input/HiddenInput.d.ts +6 -0
- package/dist/Components/FormElements/Input/HiddenInput.stories.d.ts +9 -0
- package/dist/{src/Components → Components}/FormElements/Input/Input.d.ts +4 -4
- package/dist/Components/FormElements/Input/Input.stories.d.ts +18 -0
- package/dist/{src/Components → Components}/FormElements/Input/PasswordInput/PasswordInput.d.ts +5 -4
- package/dist/Components/FormElements/Input/PasswordInput/PasswordInput.stories.d.ts +8 -0
- package/dist/{src/Components → Components}/FormElements/SearchSelectInput/SearchSelectInput.d.ts +4 -4
- package/dist/Components/FormElements/SearchSelectInput/SearchSelectInput.stories.d.ts +9 -0
- package/dist/{src/Components → Components}/FormElements/Select/Select.d.ts +4 -4
- package/dist/Components/FormElements/Select/Select.stories.d.ts +8 -0
- package/dist/{src/Components → Components}/FormElements/Slider/Slider.d.ts +4 -4
- package/dist/Components/FormElements/Slider/Slider.stories.d.ts +7 -0
- package/dist/{src/Components → Components}/FormElements/Switch/Switch.d.ts +5 -5
- package/dist/Components/FormElements/Switch/Switch.stories.d.ts +11 -0
- package/dist/{src/Components → Components}/FormElements/Textarea/Textarea.d.ts +4 -4
- package/dist/Components/FormElements/Textarea/Textarea.stories.d.ts +9 -0
- package/dist/{src/Components → Components}/FormElements/hooks/useOnChangeDone.d.ts +1 -1
- package/dist/{src/Components → Components}/FullScreen/FullScreen.d.ts +4 -4
- package/dist/{src/Components → Components}/Hooks/useClientLayoutEffect.d.ts +1 -1
- package/dist/{src/Components → Components}/Hooks/useComposedRef.d.ts +1 -1
- package/dist/{src/Components → Components}/Hooks/useDelayedState.d.ts +1 -1
- package/dist/{src/Components → Components}/Hooks/useInViewport.d.ts +1 -1
- package/dist/{src/Components → Components}/Icon/DoubleIcon.d.ts +1 -1
- package/dist/Components/Icon/DoubleIcon.stories.d.ts +23 -0
- package/dist/{src/Components → Components}/Icon/Icon.d.ts +5 -5
- package/dist/Components/Icon/Icon.stories.d.ts +17 -0
- package/dist/Components/Image/Image.d.ts +10 -0
- package/dist/Components/Image/Image.stories.d.ts +7 -0
- package/dist/{src/Components → Components}/InViewport/InViewport.d.ts +1 -1
- package/dist/{src/Components → Components}/Layout/Block.d.ts +4 -4
- package/dist/{src/Components → Components}/Layout/Container.d.ts +1 -1
- package/dist/{src/Components → Components}/Layout/Flex.d.ts +3 -3
- package/dist/{src/Components → Components}/Layout/Grid/Grid.d.ts +3 -3
- package/dist/{src/Components → Components}/Layout/Grid/GridItem.d.ts +1 -1
- package/dist/Components/Layout/Grow.d.ts +10 -0
- package/dist/{src/Components → Components}/Layout/Inline.d.ts +3 -3
- package/dist/{src/Components → Components}/Layout/InlineBlock.d.ts +3 -3
- package/dist/{src/Components → Components}/Layout/View.d.ts +4 -4
- package/dist/{src/Components → Components}/Layout/ViewWithoutListeners.d.ts +3 -3
- package/dist/Components/LoadingArea/LoadingArea.d.ts +9 -0
- package/dist/Components/LoadingArea/LoadingArea.stories.d.ts +9 -0
- package/dist/Components/LoadingCircle/LoadingCircle.d.ts +7 -0
- package/dist/Components/LoadingCircle/LoadingCircle.stories.d.ts +26 -0
- package/dist/{src/Components → Components}/Menu/HoverMenu.d.ts +3 -3
- package/dist/Components/Menu/HoverMenu.stories.d.ts +16 -0
- package/dist/{src/Components → Components}/Menu/Menu.d.ts +2 -2
- package/dist/Components/Menu/Menu.stories.d.ts +14 -0
- package/dist/{src/Components → Components}/Menu/MenuCloseContext.d.ts +1 -1
- package/dist/{src/Components → Components}/Menu/MenuDivider.d.ts +1 -1
- package/dist/{src/Components → Components}/Menu/MenuItem.d.ts +4 -3
- package/dist/Components/Menu/MenuItem.stories.d.ts +21 -0
- package/dist/{src/Components → Components}/Menu/Submenu.d.ts +3 -3
- package/dist/Components/Menu/Submenu.stories.d.ts +10 -0
- package/dist/{src/Components → Components}/Menu/useMenu.d.ts +2 -2
- package/dist/{src/Components → Components}/RbmComponentProps.d.ts +4 -4
- package/dist/{src/Components → Components}/SizeCalculator/SizeCalculator.d.ts +1 -1
- package/dist/Components/SpoilerList/Spoiler/Spoiler.d.ts +16 -0
- package/dist/Components/SpoilerList/Spoiler/Spoiler.stories.d.ts +7 -0
- package/dist/{src/Components → Components}/SpoilerList/SpoilerList.d.ts +3 -5
- package/dist/{src/Components → Components}/TabBar/TabBar.d.ts +4 -6
- package/dist/Components/TabBar/TabBar.stories.d.ts +10 -0
- package/dist/Components/TabBar/TabBarButton.d.ts +7 -0
- package/dist/{src/Components → Components}/Table/Table.d.ts +3 -3
- package/dist/{src/Components → Components}/Text/Heading.d.ts +2 -2
- package/dist/{src/Components → Components}/Text/Text.d.ts +3 -3
- package/dist/Components/Text/Text.stories.d.ts +35 -0
- package/dist/Components/Toast/Toast.d.ts +12 -0
- package/dist/Components/Toast/Toast.stories.d.ts +8 -0
- package/dist/{src/Components → Components}/Toast/ToastContainer.d.ts +2 -2
- package/dist/Components/TopBar/MoreButton.d.ts +7 -0
- package/dist/{src/Components → Components}/TopBar/TopBar.d.ts +4 -6
- package/dist/Components/TopBar/TopBar.stories.d.ts +7 -0
- package/dist/Components/TopBar/TopBarButton.d.ts +7 -0
- package/dist/helper/useDeepShallow.d.ts +1 -0
- package/dist/helper/withMemo.d.ts +3 -0
- package/dist/{src/helper → helper}/withRenderBrowserOnly.d.ts +1 -1
- package/dist/helper/withRestrictedChildren.d.ts +7 -0
- package/dist/index.css +36 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.js +5357 -0
- package/dist/index.js.map +1 -0
- package/dist/treeshakeTest.d.ts +1 -0
- package/eslint.config.js +17 -0
- package/package.json +41 -90
- package/react-bootstrap-mobile.scss +6 -6
- package/src/Components/ActionSheet/ActionSheet.stories.tsx +55 -0
- package/src/Components/ActionSheet/ActionSheet.tsx +37 -24
- package/src/Components/ActionSheet/actionSheet.module.scss +198 -0
- package/src/Components/Card/Card.stories.tsx +41 -0
- package/src/Components/Card/Card.tsx +6 -9
- package/src/Components/Card/card.module.scss +74 -0
- package/src/Components/Clickable/Clickable.tsx +73 -63
- package/src/Components/Clickable/clickable.module.scss +14 -0
- package/src/Components/Colors.stories.tsx +77 -0
- package/src/Components/Dialog/AlertDialog.stories.tsx +28 -0
- package/src/Components/Dialog/AlertDialog.tsx +10 -9
- package/src/Components/Dialog/ButtonDialog.tsx +15 -13
- package/src/Components/Dialog/ConfirmDialog.stories.tsx +29 -0
- package/src/Components/Dialog/ConfirmDialog.tsx +11 -9
- package/src/Components/Dialog/Dialog.tsx +10 -10
- package/src/Components/Dialog/DialogBackground.tsx +32 -21
- package/src/Components/Dialog/DialogContainer.tsx +23 -18
- package/src/Components/Dialog/DialogContext.ts +7 -6
- package/src/Components/Dialog/{buttonDialog.scss → buttonDialog.module.scss} +29 -21
- package/src/Components/Dialog/dialog.module.scss +30 -0
- package/src/Components/Dialog/dialogBackground.module.scss +17 -0
- package/src/Components/Dialog/useAlertDialog.ts +3 -3
- package/src/Components/Dialog/useConfirmDialog.ts +3 -3
- package/src/Components/DragAndDrop/DragItem.tsx +7 -6
- package/src/Components/DragAndDrop/DropArea.tsx +5 -4
- package/src/Components/Flavor.ts +4 -4
- package/src/Components/FormElements/Button/Button.stories.tsx +79 -0
- package/src/Components/FormElements/Button/Button.tsx +49 -36
- package/src/Components/FormElements/Button/ButtonType.ts +2 -2
- package/src/Components/FormElements/Button/button.module.scss +87 -0
- package/src/Components/FormElements/CheckBox/Checkbox.stories.tsx +50 -0
- package/src/Components/FormElements/CheckBox/Checkbox.tsx +13 -14
- package/src/Components/FormElements/CheckBox/{checkbox.scss → checkbox.module.scss} +30 -11
- package/src/Components/FormElements/ColorInput/ColorInput.stories.tsx +24 -0
- package/src/Components/FormElements/ColorInput/ColorInput.tsx +55 -59
- package/src/Components/FormElements/ColorInput/{colorInput.scss → colorInput.module.scss} +17 -19
- package/src/Components/FormElements/ColorInput/sharedSelectedColor.ts +19 -10
- package/src/Components/FormElements/Controller/ColorInputController.ts +3 -3
- package/src/Components/FormElements/Controller/FileInputController.tsx +29 -20
- package/src/Components/FormElements/Controller/HookForm.tsx +128 -24
- package/src/Components/FormElements/Controller/InputController.ts +3 -3
- package/src/Components/FormElements/Controller/MultipleFileInputController.ts +2 -3
- package/src/Components/FormElements/Controller/PasswordInputController.ts +3 -3
- package/src/Components/FormElements/Controller/SelectController.ts +3 -3
- package/src/Components/FormElements/Controller/SendFormContext.ts +3 -3
- package/src/Components/FormElements/Controller/SliderController.ts +4 -0
- package/src/Components/FormElements/Controller/SwitchController.ts +3 -3
- package/src/Components/FormElements/Controller/TextareaController.ts +2 -2
- package/src/Components/FormElements/Controller/useYupResolver.ts +10 -8
- package/src/Components/FormElements/Controller/withHookController.tsx +21 -18
- package/src/Components/FormElements/Error/FormError.stories.tsx +16 -0
- package/src/Components/FormElements/Error/FormError.tsx +42 -0
- package/src/Components/FormElements/Error/formError.module.scss +9 -0
- package/src/Components/FormElements/Form.stories.tsx +16 -0
- package/src/Components/FormElements/Input/FileInput/FileInput.tsx +52 -32
- package/src/Components/FormElements/Input/FileInput/MultipleFileInput.tsx +234 -231
- package/src/Components/FormElements/Input/FileInput/{fileInput.scss → fileInput.module.scss} +10 -12
- package/src/Components/FormElements/Input/HiddenInput.stories.tsx +44 -0
- package/src/Components/FormElements/Input/HiddenInput.tsx +6 -8
- package/src/Components/FormElements/Input/Input.stories.tsx +59 -0
- package/src/Components/FormElements/Input/Input.tsx +173 -172
- package/src/Components/FormElements/Input/PasswordInput/PasswordInput.stories.tsx +31 -0
- package/src/Components/FormElements/Input/PasswordInput/PasswordInput.tsx +20 -16
- package/src/Components/FormElements/Input/input.module.scss +95 -0
- package/src/Components/FormElements/SearchSelectInput/SearchSelectInput.stories.tsx +49 -0
- package/src/Components/FormElements/SearchSelectInput/SearchSelectInput.tsx +178 -166
- package/src/Components/FormElements/SearchSelectInput/seachSelectInput.module.scss +112 -0
- package/src/Components/FormElements/Select/Select.stories.tsx +49 -0
- package/src/Components/FormElements/Select/Select.tsx +34 -24
- package/src/Components/FormElements/Select/select.module.scss +63 -0
- package/src/Components/FormElements/Slider/Slider.stories.tsx +15 -0
- package/src/Components/FormElements/Slider/Slider.tsx +29 -20
- package/src/Components/FormElements/Slider/slider.module.scss +93 -0
- package/src/Components/FormElements/Switch/Switch.stories.tsx +65 -0
- package/src/Components/FormElements/Switch/Switch.tsx +72 -63
- package/src/Components/FormElements/Switch/switch.module.scss +157 -0
- package/src/Components/FormElements/Textarea/Textarea.stories.tsx +37 -0
- package/src/Components/FormElements/Textarea/Textarea.tsx +46 -45
- package/src/Components/FormElements/Textarea/textarea.module.scss +34 -0
- package/src/Components/FormElements/hooks/useOnChangeDone.ts +6 -2
- package/src/Components/FullScreen/FullScreen.tsx +16 -16
- package/src/Components/Hooks/useBreakpoint.ts +13 -7
- package/src/Components/Hooks/useClientLayoutEffect.ts +1 -1
- package/src/Components/Hooks/useComposedRef.ts +2 -1
- package/src/Components/Hooks/useDebounced.ts +2 -2
- package/src/Components/Hooks/useDelayed.ts +2 -3
- package/src/Components/Hooks/useDelayedEffect.ts +3 -3
- package/src/Components/Hooks/useDelayedState.ts +18 -10
- package/src/Components/Hooks/useInViewport.ts +3 -2
- package/src/Components/Hooks/useKeyListener.ts +9 -6
- package/src/Components/Hooks/useListener.ts +4 -4
- package/src/Components/Hooks/useMousePosition.ts +2 -2
- package/src/Components/Hooks/useRerender.ts +17 -14
- package/src/Components/Hooks/useWindowDimensions.ts +11 -12
- package/src/Components/Icon/DoubleIcon.stories.tsx +38 -0
- package/src/Components/Icon/DoubleIcon.tsx +22 -17
- package/src/Components/Icon/Icon.stories.tsx +37 -0
- package/src/Components/Icon/Icon.tsx +39 -17
- package/src/Components/Icon/{icon.scss → icon.module.scss} +2 -0
- package/src/Components/Image/Image.stories.tsx +17 -0
- package/src/Components/Image/Image.tsx +7 -12
- package/src/Components/InViewport/InViewport.tsx +5 -6
- package/src/Components/Layout/Block.tsx +18 -12
- package/src/Components/Layout/Container.tsx +5 -6
- package/src/Components/Layout/Flex.tsx +17 -9
- package/src/Components/Layout/Grid/Grid.tsx +20 -10
- package/src/Components/Layout/Grid/GridItem.tsx +5 -6
- package/src/Components/Layout/Grid/{grid.scss → grid.module.scss} +19 -26
- package/src/Components/Layout/Grow.tsx +18 -8
- package/src/Components/Layout/Inline.tsx +15 -12
- package/src/Components/Layout/InlineBlock.tsx +17 -12
- package/src/Components/Layout/View.tsx +20 -9
- package/src/Components/Layout/ViewWithoutListeners.tsx +24 -15
- package/src/Components/Layout/container.module.scss +54 -0
- package/src/Components/LoadingArea/LoadingArea.stories.tsx +35 -0
- package/src/Components/LoadingArea/LoadingArea.tsx +10 -15
- package/src/Components/LoadingArea/{loadingArea.scss → loadingArea.module.scss} +8 -5
- package/src/Components/LoadingCircle/LoadingCircle.stories.tsx +58 -0
- package/src/Components/LoadingCircle/LoadingCircle.tsx +26 -13
- package/src/Components/LoadingCircle/{loadingCircle.scss → loadingCircle.module.scss} +14 -5
- package/src/Components/Menu/HoverMenu.stories.tsx +32 -0
- package/src/Components/Menu/HoverMenu.tsx +61 -45
- package/src/Components/Menu/Menu.stories.tsx +69 -0
- package/src/Components/Menu/Menu.tsx +67 -58
- package/src/Components/Menu/MenuCloseContext.ts +1 -1
- package/src/Components/Menu/MenuDivider.tsx +6 -6
- package/src/Components/Menu/MenuItem.stories.tsx +35 -0
- package/src/Components/Menu/MenuItem.tsx +66 -55
- package/src/Components/Menu/Submenu.stories.tsx +37 -0
- package/src/Components/Menu/Submenu.tsx +72 -58
- package/src/Components/Menu/{menu.scss → menu.module.scss} +23 -11
- package/src/Components/Menu/useMenu.ts +4 -3
- package/src/Components/RbmComponentProps.ts +6 -7
- package/src/Components/SizeCalculator/SizeCalculator.tsx +3 -3
- package/src/Components/SpoilerList/Spoiler/Spoiler.stories.tsx +21 -0
- package/src/Components/SpoilerList/Spoiler/Spoiler.tsx +49 -48
- package/src/Components/SpoilerList/Spoiler/{spoiler.scss → spoiler.module.scss} +46 -30
- package/src/Components/SpoilerList/SpoilerList.tsx +8 -12
- package/src/Components/SpoilerList/useSpoilerGroup.ts +2 -2
- package/src/Components/TabBar/TabBar.stories.tsx +32 -0
- package/src/Components/TabBar/TabBar.tsx +16 -18
- package/src/Components/TabBar/TabBarButton.tsx +13 -10
- package/src/Components/TabBar/tabBar.module.scss +128 -0
- package/src/Components/Table/Table.tsx +16 -15
- package/src/Components/Text/Heading.tsx +6 -7
- package/src/Components/Text/Text.stories.tsx +121 -0
- package/src/Components/Text/Text.tsx +19 -10
- package/src/Components/Text/{text.scss → text.module.scss} +3 -8
- package/src/Components/Toast/Toast.stories.tsx +25 -0
- package/src/Components/Toast/Toast.tsx +15 -17
- package/src/Components/Toast/ToastContainer.tsx +72 -54
- package/src/Components/Toast/ToastContext.ts +9 -3
- package/src/Components/Toast/toast.module.scss +65 -0
- package/src/Components/TopBar/MoreButton.tsx +9 -11
- package/src/Components/TopBar/TopBar.stories.tsx +63 -0
- package/src/Components/TopBar/TopBar.tsx +49 -40
- package/src/Components/TopBar/TopBarButton.tsx +20 -10
- package/src/Components/TopBar/{topBar.scss → topBar.module.scss} +40 -23
- package/src/Size.ts +1 -2
- package/src/WrongChildError.ts +1 -1
- package/src/helper/EmptyProps.ts +1 -1
- package/src/helper/nonEmptyString.ts +1 -1
- package/src/helper/useDeepShallow.ts +10 -0
- package/src/helper/withMemo.ts +7 -8
- package/src/helper/withRenderBrowserOnly.tsx +2 -1
- package/src/helper/withRestrictedChildren.tsx +11 -14
- package/src/index.ts +116 -0
- package/src/scss/_colors.scss +32 -19
- package/src/scss/_default.scss +5 -5
- package/src/scss/_flavorMixin.scss +3 -0
- package/src/scss/_variables.scss +19 -19
- package/src/scss/_vars.scss +12 -0
- package/src/scss/baseClasses.module.scss +23 -0
- package/src/scss/breakpoints.scss +79 -0
- package/src/treeshakeTest.ts +3 -0
- package/src/types/{react-table-config.d.ts → reactTableConfig.d.ts} +2 -43
- package/stylelint.config.mjs +4 -0
- package/tsconfig.build.json +7 -0
- package/tsconfig.json +16 -48
- package/webpack.config.ts +6 -0
- package/.eslintrc.json +0 -191
- package/.npnignore +0 -5
- package/LICENSE +0 -21
- package/README.md +0 -1
- package/babel.config.js +0 -22
- package/bin/build.js +0 -60
- package/bin/updateCopies.js +0 -94
- package/bootstrapReactMobile.ts +0 -119
- package/dist/bootstrapReactMobile.d.ts +0 -119
- package/dist/bootstrapReactMobile.js +0 -14043
- package/dist/bootstrapReactMobile.js.map +0 -1
- package/dist/src/Components/Card/Card.d.ts +0 -14
- package/dist/src/Components/Dialog/AlertDialog.d.ts +0 -10
- package/dist/src/Components/Dialog/ConfirmDialog.d.ts +0 -11
- package/dist/src/Components/FormElements/CheckBox/Checkbox.d.ts +0 -14
- package/dist/src/Components/FormElements/Controller/HookForm.d.ts +0 -8
- package/dist/src/Components/FormElements/FormError.d.ts +0 -5
- package/dist/src/Components/FormElements/Input/FileInput/FileInput.d.ts +0 -13
- package/dist/src/Components/FormElements/Input/HiddenInput.d.ts +0 -8
- package/dist/src/Components/Image/Image.d.ts +0 -12
- package/dist/src/Components/Layout/Grow.d.ts +0 -9
- package/dist/src/Components/List/BulletList/BulletList.d.ts +0 -8
- package/dist/src/Components/List/BulletList/ListItem.d.ts +0 -7
- package/dist/src/Components/List/InfiniteList.d.ts +0 -7
- package/dist/src/Components/List/List.d.ts +0 -15
- package/dist/src/Components/LoadingArea/LoadingArea.d.ts +0 -12
- package/dist/src/Components/LoadingCircle/LoadingCircle.d.ts +0 -8
- package/dist/src/Components/SpoilerList/Spoiler/Spoiler.d.ts +0 -18
- package/dist/src/Components/TabBar/TabBarButton.d.ts +0 -9
- package/dist/src/Components/Toast/Toast.d.ts +0 -13
- package/dist/src/Components/TopBar/MoreButton.d.ts +0 -9
- package/dist/src/Components/TopBar/TopBarButton.d.ts +0 -9
- package/dist/src/ListRow/ListRow.d.ts +0 -1
- package/dist/src/StyleProvider.d.ts +0 -2
- package/dist/src/helper/withMemo.d.ts +0 -3
- package/dist/src/helper/withRestrictedChildren.d.ts +0 -6
- package/scripts/getPackageJson.js +0 -25
- package/src/Components/ActionSheet/actionSheet.scss +0 -153
- package/src/Components/Card/card.scss +0 -76
- package/src/Components/Clickable/clickable.scss +0 -8
- package/src/Components/Dialog/dialog.scss +0 -30
- package/src/Components/Dialog/dialogBackground.scss +0 -11
- package/src/Components/FormElements/Button/button.scss +0 -73
- package/src/Components/FormElements/FormError.tsx +0 -29
- package/src/Components/FormElements/Input/input.scss +0 -83
- package/src/Components/FormElements/SearchSelectInput/seachSelectInput.scss +0 -97
- package/src/Components/FormElements/Select/select.scss +0 -61
- package/src/Components/FormElements/Slider/slider.scss +0 -92
- package/src/Components/FormElements/Switch/switch.scss +0 -152
- package/src/Components/FormElements/Textarea/textarea.scss +0 -31
- package/src/Components/FormElements/formError.scss +0 -4
- package/src/Components/Layout/container.scss +0 -12
- package/src/Components/List/BulletList/BulletList.tsx +0 -33
- package/src/Components/List/BulletList/ListItem.tsx +0 -34
- package/src/Components/List/InfiniteList.tsx +0 -56
- package/src/Components/List/List.tsx +0 -95
- package/src/Components/List/list.scss +0 -30
- package/src/Components/TabBar/tabBar.scss +0 -108
- package/src/Components/Toast/toast.scss +0 -55
- package/src/ListRow/ListRow.tsx +0 -20
- package/src/StyleProvider.ts +0 -4
- package/src/scss/_baseClasses.scss +0 -23
- package/src/types/isomorphic-style-loader.d.ts +0 -3
- package/webpack.config.js +0 -95
- /package/dist/{src/Components → Components}/Dialog/useAlertDialog.d.ts +0 -0
- /package/dist/{src/Components → Components}/Dialog/useConfirmDialog.d.ts +0 -0
- /package/dist/{src/Components → Components}/DragAndDrop/useStrictEnabled.d.ts +0 -0
- /package/dist/{src/Components → Components}/Flavor.d.ts +0 -0
- /package/dist/{src/Components → Components}/FormElements/Button/ButtonType.d.ts +0 -0
- /package/dist/{src/Components → Components}/FormElements/ColorInput/sharedSelectedColor.d.ts +0 -0
- /package/dist/{src/Components → Components}/FormElements/Controller/SendFormContext.d.ts +0 -0
- /package/dist/{src/Components → Components}/FormElements/Input/FileInput/FileType.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useBreakpoint.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useDebounced.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useDelayed.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useDelayedEffect.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useKeyListener.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useListener.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useMousePosition.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useOnMount.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useOnce.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useRerender.d.ts +0 -0
- /package/dist/{src/Components → Components}/Hooks/useWindowDimensions.d.ts +0 -0
- /package/dist/{src/Components → Components}/SpoilerList/useSpoilerGroup.d.ts +0 -0
- /package/dist/{src/Components → Components}/Toast/ToastContext.d.ts +0 -0
- /package/dist/{src/Size.d.ts → Size.d.ts} +0 -0
- /package/dist/{src/TypeHelpers.d.ts → TypeHelpers.d.ts} +0 -0
- /package/dist/{src/WindowContext → WindowContext}/WindowContext.d.ts +0 -0
- /package/dist/{src/WrongChildError.d.ts → WrongChildError.d.ts} +0 -0
- /package/dist/{src/helper → helper}/Characters.d.ts +0 -0
- /package/dist/{src/helper → helper}/DistributiveOmit.d.ts +0 -0
- /package/dist/{src/helper → helper}/EmptyProps.d.ts +0 -0
- /package/dist/{src/helper → helper}/memoComparator.d.ts +0 -0
- /package/dist/{src/helper → helper}/nonEmptyString.d.ts +0 -0
- /package/src/Components/FormElements/Input/PasswordInput/{passwordInput.scss → passwordInput.module.scss} +0 -0
- /package/src/Components/Image/{image.scss → image.module.scss} +0 -0
- /package/src/Components/InViewport/{inViewport.scss → inViewport.module.scss} +0 -0
- /package/src/Components/Layout/{layout.scss → layout.module.scss} +0 -0
- /package/src/Components/Text/{heading.scss → heading.module.scss} +0 -0
- /package/src/types/{scss-module.d.ts → scss.d.ts} +0 -0
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
xxs: 0,
|
|
6
|
-
xs: 320px,
|
|
7
|
-
sm: 576px,
|
|
8
|
-
md: 768px,
|
|
9
|
-
lg: 992px,
|
|
10
|
-
xl: 1200px,
|
|
11
|
-
xxl: 1400px
|
|
12
|
-
);
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:list";
|
|
3
|
+
@use "../../../scss/variables" as *;
|
|
4
|
+
@use "../../../scss/breakpoints" as *;
|
|
13
5
|
|
|
14
6
|
$columns: 12;
|
|
15
7
|
$breakpoints: $grid-breakpoints;
|
|
@@ -73,12 +65,13 @@ $containerBreakpoints: $grid-breakpoints;
|
|
|
73
65
|
&.useContainerWidth {
|
|
74
66
|
container-type: inline-size;
|
|
75
67
|
|
|
76
|
-
@each $breakpoint in map
|
|
68
|
+
@each $breakpoint in map.keys($containerBreakpoints) {
|
|
77
69
|
$min: breakpoint-min($breakpoint, $containerBreakpoints);
|
|
70
|
+
|
|
78
71
|
@if $min {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
@container (min-width: #{$min}) {
|
|
73
|
+
@include contentMin($breakpoint);
|
|
74
|
+
}
|
|
82
75
|
} @else {
|
|
83
76
|
@include contentMin($breakpoint);
|
|
84
77
|
}
|
|
@@ -89,17 +82,17 @@ $containerBreakpoints: $grid-breakpoints;
|
|
|
89
82
|
$max: breakpoint-max($next, $containerBreakpoints);
|
|
90
83
|
|
|
91
84
|
@if $min != null and $max != null {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
85
|
+
@container (min-width: #{$min}) and (max-width: #{$max}) {
|
|
86
|
+
@include contentOnly($breakpoint);
|
|
87
|
+
}
|
|
95
88
|
} @else if $max == null {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
89
|
+
@container (min-width: #{$min}) {
|
|
90
|
+
@include contentOnly($breakpoint);
|
|
91
|
+
}
|
|
99
92
|
} @else if $min == null {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
93
|
+
@container (max-width: #{$max}) {
|
|
94
|
+
@include contentOnly($breakpoint);
|
|
95
|
+
}
|
|
103
96
|
}
|
|
104
97
|
}
|
|
105
98
|
|
|
@@ -107,7 +100,7 @@ $containerBreakpoints: $grid-breakpoints;
|
|
|
107
100
|
}
|
|
108
101
|
|
|
109
102
|
&:not(.useContainerWidth) {
|
|
110
|
-
@each $breakpoint in map
|
|
103
|
+
@each $breakpoint in map.keys($breakpoints) {
|
|
111
104
|
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
|
112
105
|
@for $i from 1 through $columns {
|
|
113
106
|
> .item-#{$breakpoint}-#{$i} {
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import styles from './layout.scss';
|
|
2
|
+
import { withMemo } from '@/helper/withMemo';
|
|
4
3
|
import classNames from 'classnames';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
4
|
+
import styles from '@/Components/Layout/layout.module.scss';
|
|
5
|
+
import type { ForwardedRef } from 'react';
|
|
6
|
+
import type { RbmComponentProps } from '@/Components/RbmComponentProps';
|
|
7
7
|
|
|
8
8
|
export type GrowProps = RbmComponentProps<{
|
|
9
9
|
center?: boolean;
|
|
10
10
|
weight?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
11
|
-
ref?: ForwardedRef<HTMLDivElement
|
|
11
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
12
|
+
id?: string;
|
|
12
13
|
}>;
|
|
13
14
|
|
|
14
|
-
export const Grow = withMemo(function Grow({
|
|
15
|
+
export const Grow = withMemo(function Grow({
|
|
16
|
+
id,
|
|
17
|
+
className,
|
|
18
|
+
children,
|
|
19
|
+
center = false,
|
|
20
|
+
style,
|
|
21
|
+
weight = 1,
|
|
22
|
+
ref,
|
|
23
|
+
}: GrowProps) {
|
|
15
24
|
// Variables
|
|
16
25
|
|
|
17
26
|
// States
|
|
@@ -27,6 +36,7 @@ export const Grow = withMemo(function Grow({ className, children, center = false
|
|
|
27
36
|
// Render Functions
|
|
28
37
|
return (
|
|
29
38
|
<div
|
|
39
|
+
id={id}
|
|
30
40
|
ref={ref}
|
|
31
41
|
className={classNames(
|
|
32
42
|
styles.grow,
|
|
@@ -40,11 +50,11 @@ export const Grow = withMemo(function Grow({ className, children, center = false
|
|
|
40
50
|
[styles.weight5]: weight === 5,
|
|
41
51
|
[styles.weight6]: weight === 6,
|
|
42
52
|
},
|
|
43
|
-
className
|
|
53
|
+
className,
|
|
44
54
|
)}
|
|
45
55
|
style={style}
|
|
46
56
|
>
|
|
47
57
|
{children}
|
|
48
58
|
</div>
|
|
49
59
|
);
|
|
50
|
-
}
|
|
60
|
+
});
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import { ViewWithoutListeners } from '@/Components/Layout/ViewWithoutListeners';
|
|
4
|
+
import { withMemo } from '@/helper/withMemo';
|
|
3
5
|
import classNames from 'classnames';
|
|
4
|
-
import styles from '
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import styles from '@/Components/Layout/layout.module.scss';
|
|
7
|
+
import type { RbmComponentProps } from '@/Components/RbmComponentProps';
|
|
8
|
+
import type { ViewWithoutListenersProps } from '@/Components/Layout/ViewWithoutListeners';
|
|
9
|
+
|
|
8
10
|
import IntrinsicElements = JSX.IntrinsicElements;
|
|
9
11
|
|
|
10
|
-
export type InlineProps<AsType extends keyof IntrinsicElements> = RbmComponentProps<
|
|
11
|
-
ViewWithoutListenersProps<AsType>
|
|
12
|
-
>;
|
|
12
|
+
export type InlineProps<AsType extends keyof IntrinsicElements> = RbmComponentProps<ViewWithoutListenersProps<AsType>>;
|
|
13
13
|
|
|
14
|
-
export const Inline = withMemo(function Inline<AsType extends keyof JSX.IntrinsicElements = 'span'>(
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
export const Inline = withMemo(function Inline<AsType extends keyof JSX.IntrinsicElements = 'span'>({
|
|
15
|
+
children,
|
|
16
|
+
as = 'span' as AsType,
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: InlineProps<AsType>) {
|
|
17
20
|
// Variables
|
|
18
21
|
|
|
19
22
|
// Refs
|
|
@@ -39,4 +42,4 @@ export const Inline = withMemo(function Inline<AsType extends keyof JSX.Intrinsi
|
|
|
39
42
|
{children}
|
|
40
43
|
</ViewWithoutListeners>
|
|
41
44
|
);
|
|
42
|
-
}
|
|
45
|
+
});
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import { ViewWithoutListeners } from '@/Components/Layout/ViewWithoutListeners';
|
|
4
|
+
import { withMemo } from '@/helper/withMemo';
|
|
3
5
|
import classNames from 'classnames';
|
|
4
|
-
import styles from '
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
6
|
+
import styles from '@/Components/Layout/layout.module.scss';
|
|
7
|
+
import type { RbmComponentProps } from '@/Components/RbmComponentProps';
|
|
8
|
+
import type { ViewWithoutListenersProps } from '@/Components/Layout/ViewWithoutListeners';
|
|
9
|
+
|
|
7
10
|
import IntrinsicElements = JSX.IntrinsicElements;
|
|
8
|
-
import { withMemo } from "../../helper/withMemo";
|
|
9
11
|
|
|
10
12
|
export type InlineBlockProps<AsType extends keyof IntrinsicElements> = RbmComponentProps<
|
|
11
13
|
ViewWithoutListenersProps<AsType> & {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
14
|
+
id?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
}
|
|
15
17
|
>;
|
|
16
18
|
|
|
17
|
-
export const InlineBlock = withMemo(function InlineBlock<AsType extends keyof JSX.IntrinsicElements = 'span'>(
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
export const InlineBlock = withMemo(function InlineBlock<AsType extends keyof JSX.IntrinsicElements = 'span'>({
|
|
20
|
+
children,
|
|
21
|
+
as = 'span' as AsType,
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
}: InlineBlockProps<AsType>) {
|
|
20
25
|
// Variables
|
|
21
26
|
|
|
22
27
|
// Refs
|
|
@@ -42,4 +47,4 @@ export const InlineBlock = withMemo(function InlineBlock<AsType extends keyof JS
|
|
|
42
47
|
{children}
|
|
43
48
|
</ViewWithoutListeners>
|
|
44
49
|
);
|
|
45
|
-
}
|
|
50
|
+
});
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import { withMemo } from '@/helper/withMemo';
|
|
4
|
+
import type { ComponentRef, ForwardedRef, PropsWithChildren } from 'react';
|
|
5
|
+
import type { Override } from '@/TypeHelpers';
|
|
6
|
+
|
|
5
7
|
import IntrinsicElements = JSX.IntrinsicElements;
|
|
6
|
-
import { withMemo } from "../../helper/withMemo";
|
|
7
8
|
|
|
8
9
|
export type ViewProps<AsType extends keyof IntrinsicElements> = PropsWithChildren<
|
|
9
|
-
Override<
|
|
10
|
+
Override<
|
|
11
|
+
React.ComponentPropsWithoutRef<AsType>,
|
|
12
|
+
{
|
|
13
|
+
as?: AsType;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
ref?: ForwardedRef<ComponentRef<AsType>>;
|
|
16
|
+
}
|
|
17
|
+
>
|
|
10
18
|
>;
|
|
11
19
|
|
|
12
|
-
export const View = withMemo(function View<AsType extends keyof JSX.IntrinsicElements>(
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
export const View = withMemo(function View<AsType extends keyof JSX.IntrinsicElements>({
|
|
21
|
+
children,
|
|
22
|
+
as,
|
|
23
|
+
ref,
|
|
24
|
+
...otherProps
|
|
25
|
+
}: ViewProps<AsType>) {
|
|
15
26
|
// Variables
|
|
16
27
|
|
|
17
28
|
// Refs
|
|
@@ -33,4 +44,4 @@ export const View = withMemo(function View<AsType extends keyof JSX.IntrinsicEle
|
|
|
33
44
|
ref,
|
|
34
45
|
};
|
|
35
46
|
return React.createElement(element, props, children);
|
|
36
|
-
},
|
|
47
|
+
}, 'all');
|
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { View
|
|
4
|
-
import {
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import { View } from '@/Components/Layout/View';
|
|
4
|
+
import { withMemo } from '@/helper/withMemo';
|
|
5
|
+
import type { DOMAttributes, ForwardedRef } from 'react';
|
|
6
|
+
import type { ViewProps } from '@/Components/Layout/View';
|
|
7
|
+
|
|
5
8
|
import IntrinsicElements = JSX.IntrinsicElements;
|
|
6
|
-
import { withMemo } from "../../helper/withMemo";
|
|
7
9
|
|
|
8
10
|
export type ViewWithoutListenersProps<AsType extends keyof IntrinsicElements> = Omit<
|
|
9
11
|
ViewProps<AsType>,
|
|
10
12
|
keyof DOMAttributes<AsType>
|
|
11
|
-
> & {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
> & {
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
dangerouslySetInnerHTML?:
|
|
16
|
+
| {
|
|
17
|
+
// Should be InnerHTML['innerHTML'].
|
|
18
|
+
// But unfortunately we're mixing renderer-specific type declarations.
|
|
19
|
+
__html: string | TrustedHTML;
|
|
20
|
+
}
|
|
21
|
+
| undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const ViewWithoutListeners = withMemo(function ViewWithoutListeners<AsType extends keyof JSX.IntrinsicElements>({
|
|
25
|
+
children,
|
|
26
|
+
ref,
|
|
27
|
+
...props
|
|
28
|
+
}: ViewWithoutListenersProps<AsType>) {
|
|
20
29
|
// Variables
|
|
21
30
|
|
|
22
31
|
// Refs
|
|
@@ -33,8 +42,8 @@ export const ViewWithoutListeners = withMemo(function ViewWithoutListeners<AsTyp
|
|
|
33
42
|
|
|
34
43
|
// Render Functions
|
|
35
44
|
return (
|
|
36
|
-
<View {...props} ref={ref as ForwardedRef<SVGElement|HTMLElement>}>
|
|
45
|
+
<View {...props} ref={ref as ForwardedRef<SVGElement | HTMLElement>}>
|
|
37
46
|
{children}
|
|
38
47
|
</View>
|
|
39
48
|
);
|
|
40
|
-
},
|
|
49
|
+
}, 'all');
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../../scss/variables" as *;
|
|
3
|
+
@use "../../scss/breakpoints" as *;
|
|
4
|
+
|
|
5
|
+
@mixin make-container() {
|
|
6
|
+
--gutter-x: 1.5rem;
|
|
7
|
+
--gutter-y: 0;
|
|
8
|
+
|
|
9
|
+
width: 100%;
|
|
10
|
+
padding-right: calc(var(--gutter-x) * .5);
|
|
11
|
+
padding-left: calc(var(--gutter-x) * .5);
|
|
12
|
+
margin-right: auto;
|
|
13
|
+
margin-left: auto;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.container,
|
|
17
|
+
.container-fluid {
|
|
18
|
+
@include make-container;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Responsive containers that are 100% wide until a breakpoint
|
|
22
|
+
@each $breakpoint, $container-max-width in $container-max-widths {
|
|
23
|
+
.container-#{$breakpoint} {
|
|
24
|
+
@include make-container;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
|
|
28
|
+
%responsive-container-#{$breakpoint} {
|
|
29
|
+
max-width: $container-max-width;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Extend each breakpoint which is smaller or equal to the current breakpoint
|
|
33
|
+
$extend-breakpoint: true;
|
|
34
|
+
|
|
35
|
+
@each $name, $width in $grid-breakpoints {
|
|
36
|
+
@if $extend-breakpoint {
|
|
37
|
+
.container#{breakpoint-infix($name, $grid-breakpoints)} {
|
|
38
|
+
@extend %responsive-container-#{$breakpoint};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Once the current breakpoint is reached, stop extending
|
|
42
|
+
@if $breakpoint == $name {
|
|
43
|
+
$extend-breakpoint: false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (width >= 1400px) {
|
|
51
|
+
.container-xxl {
|
|
52
|
+
max-width: 1400px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { Block } from '@/Components/Layout/Block';
|
|
4
|
+
import { LoadingArea } from '@/Components/LoadingArea/LoadingArea';
|
|
5
|
+
import { Text } from '@/Components/Text/Text';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
component: LoadingArea,
|
|
10
|
+
render: (args) => (
|
|
11
|
+
<LoadingArea {...args}>
|
|
12
|
+
<Block
|
|
13
|
+
style={{
|
|
14
|
+
height: '200px',
|
|
15
|
+
background: 'gray',
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
<Text>Content goes here Error within Story. Normally it would only cover the content and not more</Text>
|
|
19
|
+
</Block>
|
|
20
|
+
</LoadingArea>
|
|
21
|
+
),
|
|
22
|
+
} satisfies Meta<typeof LoadingArea>;
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
|
|
28
|
+
export const Default: Story = {
|
|
29
|
+
args: {
|
|
30
|
+
loading: true,
|
|
31
|
+
fullSize: false,
|
|
32
|
+
fullWidth: false,
|
|
33
|
+
fullHeight: false,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import styles from './loadingArea.scss';
|
|
6
|
-
import { withMemo } from '../../helper/withMemo';
|
|
2
|
+
import { LoadingCircle } from '@/Components/LoadingCircle/LoadingCircle';
|
|
3
|
+
import { withMemo } from '@/helper/withMemo';
|
|
4
|
+
import baseStyles from '@/scss/baseClasses.module.scss';
|
|
7
5
|
import classNames from 'classnames';
|
|
6
|
+
import styles from '@/Components/LoadingArea/loadingArea.module.scss';
|
|
7
|
+
import type { RbmComponentProps } from '@/Components/RbmComponentProps';
|
|
8
8
|
|
|
9
9
|
export type LoadingAreaProps = RbmComponentProps<{
|
|
10
|
-
opacity?: number;
|
|
11
10
|
loading: boolean;
|
|
12
11
|
fullWidth?: boolean;
|
|
13
12
|
fullHeight?: boolean;
|
|
14
13
|
fullSize?: boolean;
|
|
15
14
|
}>;
|
|
16
15
|
|
|
17
|
-
function LoadingArea({
|
|
16
|
+
export const LoadingArea = withMemo(function LoadingArea({
|
|
18
17
|
loading,
|
|
19
18
|
fullWidth = false,
|
|
20
19
|
fullSize = false,
|
|
21
20
|
fullHeight = false,
|
|
22
|
-
opacity = 0.65,
|
|
23
21
|
className,
|
|
24
22
|
style,
|
|
25
23
|
children,
|
|
@@ -45,20 +43,17 @@ function LoadingArea({
|
|
|
45
43
|
return (
|
|
46
44
|
<span
|
|
47
45
|
className={classNames(styles.loadingArea, className, {
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
[baseStyles.fullHeight]: fullHeight,
|
|
47
|
+
[baseStyles.fullWidth]: fullWidth,
|
|
50
48
|
})}
|
|
51
49
|
style={style}
|
|
52
50
|
>
|
|
53
51
|
{children}
|
|
54
52
|
{loading ? (
|
|
55
|
-
<span className={styles.curtain}
|
|
53
|
+
<span className={styles.curtain}>
|
|
56
54
|
<LoadingCircle />
|
|
57
55
|
</span>
|
|
58
56
|
) : null}
|
|
59
57
|
</span>
|
|
60
58
|
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const LoadingAreaMemo = withMemo(LoadingArea, styles);
|
|
64
|
-
export { LoadingAreaMemo as LoadingArea };
|
|
59
|
+
});
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
@use "../../scss/vars" as *;
|
|
2
|
+
|
|
3
|
+
@include vars {
|
|
4
|
+
--loading-area-background-color: var(--curtain-light);
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
.loadingArea {
|
|
2
8
|
height: fit-content;
|
|
3
9
|
width: fit-content;
|
|
@@ -7,13 +13,10 @@
|
|
|
7
13
|
.curtain {
|
|
8
14
|
z-index: 1;
|
|
9
15
|
position: absolute;
|
|
10
|
-
|
|
11
|
-
left: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
right: 0;
|
|
16
|
+
inset: 0;
|
|
14
17
|
display: flex;
|
|
15
18
|
justify-content: center;
|
|
16
19
|
align-items: center;
|
|
17
|
-
background-color:
|
|
20
|
+
background-color: var(--loading-area-background-color);
|
|
18
21
|
}
|
|
19
22
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { LoadingCircle } from '@/Components/LoadingCircle/LoadingCircle';
|
|
4
|
+
import { Size } from '@/Size';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
component: LoadingCircle,
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: { type: 'select' },
|
|
12
|
+
options: ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'],
|
|
13
|
+
mapping: {
|
|
14
|
+
'x-small': Size.xSmall,
|
|
15
|
+
small: Size.small,
|
|
16
|
+
medium: Size.medium,
|
|
17
|
+
large: Size.large,
|
|
18
|
+
'x-large': Size.xLarge,
|
|
19
|
+
'xx-large': Size.xxLarge,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
} satisfies Meta<typeof LoadingCircle>;
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
|
|
29
|
+
export const Default: Story = {
|
|
30
|
+
args: {
|
|
31
|
+
size: Size.medium,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const AllSizes: Story = {
|
|
36
|
+
render: () => (
|
|
37
|
+
<div>
|
|
38
|
+
<div>
|
|
39
|
+
<LoadingCircle size={Size.xSmall} />
|
|
40
|
+
</div>
|
|
41
|
+
<div>
|
|
42
|
+
<LoadingCircle size={Size.small} />
|
|
43
|
+
</div>
|
|
44
|
+
<div>
|
|
45
|
+
<LoadingCircle size={Size.medium} />
|
|
46
|
+
</div>
|
|
47
|
+
<div>
|
|
48
|
+
<LoadingCircle size={Size.large} />
|
|
49
|
+
</div>
|
|
50
|
+
<div>
|
|
51
|
+
<LoadingCircle size={Size.xLarge} />
|
|
52
|
+
</div>
|
|
53
|
+
<div>
|
|
54
|
+
<LoadingCircle size={Size.xxLarge} />
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
),
|
|
58
|
+
};
|
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import { withMemo } from '../../helper/withMemo';
|
|
2
|
+
import { Size } from '@/Size';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { withMemo } from '@/helper/withMemo';
|
|
6
5
|
import classNames from 'classnames';
|
|
6
|
+
import styles from '@/Components/LoadingCircle/loadingCircle.module.scss';
|
|
7
|
+
import type { RbmComponentProps } from '@/Components/RbmComponentProps';
|
|
7
8
|
|
|
8
9
|
export type LoadingCircleProps = RbmComponentProps<{
|
|
9
|
-
size?:
|
|
10
|
+
size?: Size;
|
|
10
11
|
}>;
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
export const LoadingCircle = withMemo(function LoadingCircle({
|
|
14
|
+
size = Size.medium,
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
}: LoadingCircleProps) {
|
|
13
18
|
// Variables
|
|
14
19
|
|
|
15
20
|
// States
|
|
21
|
+
const sizeInNumber = useMemo(() => {
|
|
22
|
+
const sizeMapping: Record<Size, number> = {
|
|
23
|
+
[Size.xSmall]: 8,
|
|
24
|
+
[Size.small]: 16,
|
|
25
|
+
[Size.medium]: 32,
|
|
26
|
+
[Size.large]: 64,
|
|
27
|
+
[Size.xLarge]: 128,
|
|
28
|
+
[Size.xxLarge]: 256,
|
|
29
|
+
};
|
|
30
|
+
return sizeMapping[size];
|
|
31
|
+
}, [size]);
|
|
16
32
|
|
|
17
33
|
// Refs
|
|
18
34
|
|
|
@@ -27,15 +43,12 @@ function LoadingCircle({ size = 32, className, style }: LoadingCircleProps) {
|
|
|
27
43
|
return (
|
|
28
44
|
<svg
|
|
29
45
|
className={classNames(styles.loadingCircle, className)}
|
|
30
|
-
viewBox={`0 0 ${
|
|
31
|
-
width={
|
|
32
|
-
height={
|
|
46
|
+
viewBox={`0 0 ${sizeInNumber} ${sizeInNumber}`}
|
|
47
|
+
width={sizeInNumber}
|
|
48
|
+
height={sizeInNumber}
|
|
33
49
|
style={style}
|
|
34
50
|
>
|
|
35
51
|
<circle cx="50%" cy="50%" r="40%" fill="none" className={styles.spinner} />
|
|
36
52
|
</svg>
|
|
37
53
|
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const LoadingCircleMemo = withMemo(LoadingCircle, styles);
|
|
41
|
-
export { LoadingCircleMemo as LoadingCircle };
|
|
54
|
+
});
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use "../../scss/variables" as variables;
|
|
2
|
+
@use "../../scss/designMixin" as mixin;
|
|
3
|
+
@use "../../scss/vars" as *;
|
|
4
|
+
|
|
5
|
+
@include vars {
|
|
6
|
+
--loading-circle-color: var(--flavor-accent);
|
|
7
|
+
}
|
|
3
8
|
|
|
4
9
|
@keyframes loadingCircle {
|
|
5
10
|
0% {
|
|
6
11
|
stroke-dasharray: 10%, 241.32%;
|
|
7
12
|
stroke-dashoffset: 0;
|
|
8
13
|
}
|
|
14
|
+
|
|
9
15
|
50% {
|
|
10
16
|
stroke-dasharray: 201%, 50.322%;
|
|
11
17
|
stroke-dashoffset: -100%;
|
|
12
18
|
}
|
|
19
|
+
|
|
13
20
|
100% {
|
|
14
21
|
stroke-dasharray: 10%, 241.32%;
|
|
15
22
|
stroke-dashoffset: -251.32%;
|
|
@@ -20,6 +27,7 @@
|
|
|
20
27
|
from {
|
|
21
28
|
transform: rotate(0);
|
|
22
29
|
}
|
|
30
|
+
|
|
23
31
|
to {
|
|
24
32
|
transform: rotate(360deg);
|
|
25
33
|
}
|
|
@@ -30,12 +38,13 @@
|
|
|
30
38
|
stroke-miterlimit: 10;
|
|
31
39
|
transform-origin: 50%;
|
|
32
40
|
animation: loadingCircle 2s ease-in-out infinite, loadingCircleRotate 1.5s linear infinite;
|
|
33
|
-
stroke: var(--
|
|
41
|
+
stroke: var(--loading-circle-color);
|
|
34
42
|
|
|
35
|
-
@include design(
|
|
43
|
+
@include mixin.design(variables.$material) {
|
|
36
44
|
stroke-width: 9%;
|
|
37
45
|
}
|
|
38
|
-
|
|
46
|
+
|
|
47
|
+
@include mixin.design(variables.$flat) {
|
|
39
48
|
stroke-width: 5%;
|
|
40
49
|
}
|
|
41
50
|
}
|