@ainias42/react-bootstrap-mobile 1.0.4 → 1.0.6
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/dist/Components/ActionSheet/ActionSheet.d.ts +2 -2
- package/dist/Components/ActionSheet/ActionSheet.stories.d.ts +3 -3
- package/dist/Components/Card/Card.d.ts +1 -1
- package/dist/Components/Card/Card.stories.d.ts +2 -2
- package/dist/Components/Clickable/Clickable.d.ts +2 -2
- package/dist/Components/Dialog/AlertDialog.stories.d.ts +1 -1
- package/dist/Components/Dialog/ButtonDialog.d.ts +2 -2
- package/dist/Components/Dialog/ConfirmDialog.stories.d.ts +2 -2
- package/dist/Components/Dialog/Dialog.d.ts +1 -1
- package/dist/Components/Dialog/DialogBackground.d.ts +1 -1
- package/dist/Components/Dialog/DialogContainer.d.ts +1 -1
- package/dist/Components/Dialog/DialogContext.d.ts +1 -1
- package/dist/Components/DragAndDrop/DragItem.d.ts +1 -1
- package/dist/Components/DragAndDrop/DropArea.d.ts +1 -1
- package/dist/Components/FormElements/Button/Button.d.ts +9 -6
- package/dist/Components/FormElements/Button/Button.stories.d.ts +12 -6
- package/dist/Components/FormElements/CheckBox/Checkbox.d.ts +2 -2
- package/dist/Components/FormElements/CheckBox/Checkbox.stories.d.ts +1 -1
- package/dist/Components/FormElements/ColorInput/ColorInput.d.ts +1 -1
- package/dist/Components/FormElements/ColorInput/ColorInput.stories.d.ts +1 -1
- package/dist/Components/FormElements/Controller/ColorInputController.d.ts +1 -1
- package/dist/Components/FormElements/Controller/FileInputController.d.ts +1 -1
- package/dist/Components/FormElements/Controller/InputController.d.ts +1 -1
- package/dist/Components/FormElements/Controller/MultipleFileInputController.d.ts +1 -1
- package/dist/Components/FormElements/Controller/PasswordInputController.d.ts +1 -1
- package/dist/Components/FormElements/Controller/SelectController.d.ts +1 -1
- package/dist/Components/FormElements/Controller/SliderController.d.ts +1 -1
- package/dist/Components/FormElements/Controller/SwitchController.d.ts +1 -1
- package/dist/Components/FormElements/Controller/TextareaController.d.ts +1 -1
- package/dist/Components/FormElements/Error/FormError.stories.d.ts +1 -1
- package/dist/Components/FormElements/Form.stories.d.ts +1 -1
- package/dist/Components/FormElements/Input/FileInput/FileInput.d.ts +5 -5
- package/dist/Components/FormElements/Input/FileInput/MultipleFileInput.d.ts +4 -4
- package/dist/Components/FormElements/Input/HiddenInput.d.ts +1 -1
- package/dist/Components/FormElements/Input/HiddenInput.stories.d.ts +1 -1
- package/dist/Components/FormElements/Input/Input.d.ts +3 -3
- package/dist/Components/FormElements/Input/Input.stories.d.ts +1 -1
- package/dist/Components/FormElements/Input/PasswordInput/PasswordInput.d.ts +2 -2
- package/dist/Components/FormElements/Input/PasswordInput/PasswordInput.stories.d.ts +1 -1
- package/dist/Components/FormElements/SearchSelectInput/SearchSelectInput.d.ts +3 -3
- package/dist/Components/FormElements/SearchSelectInput/SearchSelectInput.stories.d.ts +1 -1
- package/dist/Components/FormElements/Select/Select.d.ts +3 -3
- package/dist/Components/FormElements/Select/Select.stories.d.ts +1 -1
- package/dist/Components/FormElements/Slider/Slider.d.ts +3 -3
- package/dist/Components/FormElements/Slider/Slider.stories.d.ts +1 -1
- package/dist/Components/FormElements/Switch/Switch.d.ts +3 -3
- package/dist/Components/FormElements/Switch/Switch.stories.d.ts +1 -1
- package/dist/Components/FormElements/Textarea/Textarea.d.ts +3 -3
- package/dist/Components/FormElements/Textarea/Textarea.stories.d.ts +1 -1
- package/dist/Components/FullScreen/FullScreen.d.ts +2 -2
- package/dist/Components/Icon/BaseIcon.d.ts +15 -0
- package/dist/Components/Icon/DoubleIcon.d.ts +1 -1
- package/dist/Components/Icon/DoubleIcon.stories.d.ts +1 -1
- package/dist/Components/Icon/Icon.d.ts +4 -13
- package/dist/Components/Icon/Icon.stories.d.ts +1 -1
- package/dist/Components/Image/Image.d.ts +2 -2
- package/dist/Components/Image/Image.stories.d.ts +1 -1
- package/dist/Components/InViewport/InViewport.d.ts +1 -1
- package/dist/Components/Layout/BaseBlock.d.ts +10 -0
- package/dist/Components/Layout/BaseInlineBlock.d.ts +10 -0
- package/dist/Components/Layout/Block.d.ts +4 -10
- package/dist/Components/Layout/Container.d.ts +1 -1
- package/dist/Components/Layout/Flex.d.ts +8 -3
- package/dist/Components/Layout/Grid/Grid.d.ts +1 -1
- package/dist/Components/Layout/Grid/GridItem.d.ts +1 -1
- package/dist/Components/Layout/Grow.d.ts +1 -1
- package/dist/Components/Layout/Inline.d.ts +2 -2
- package/dist/Components/Layout/InlineBlock.d.ts +4 -10
- package/dist/Components/Layout/View.d.ts +4 -4
- package/dist/Components/Layout/ViewWithoutListeners.d.ts +1 -1
- package/dist/Components/LoadingArea/LoadingArea.d.ts +1 -1
- package/dist/Components/LoadingArea/LoadingArea.stories.d.ts +2 -2
- package/dist/Components/LoadingCircle/LoadingCircle.d.ts +2 -2
- package/dist/Components/LoadingCircle/LoadingCircle.stories.d.ts +2 -2
- package/dist/Components/Menu/HoverMenu.d.ts +1 -1
- package/dist/Components/Menu/HoverMenu.stories.d.ts +1 -1
- package/dist/Components/Menu/Menu.d.ts +2 -2
- package/dist/Components/Menu/Menu.stories.d.ts +1 -1
- package/dist/Components/Menu/MenuItem.d.ts +2 -2
- package/dist/Components/Menu/MenuItem.stories.d.ts +1 -1
- package/dist/Components/Menu/Submenu.d.ts +2 -2
- package/dist/Components/Menu/Submenu.stories.d.ts +1 -1
- package/dist/Components/Menu/useHoverMenu.d.ts +17 -0
- package/dist/Components/Menu/useMenu.d.ts +1 -1
- package/dist/Components/RbmComponentProps.d.ts +1 -1
- package/dist/Components/SizeCalculator/SizeCalculator.d.ts +1 -1
- package/dist/Components/SpoilerList/Spoiler/Spoiler.d.ts +3 -3
- package/dist/Components/SpoilerList/Spoiler/Spoiler.stories.d.ts +1 -1
- package/dist/Components/SpoilerList/SpoilerList.d.ts +1 -1
- package/dist/Components/TabBar/TabBar.d.ts +2 -2
- package/dist/Components/TabBar/TabBar.stories.d.ts +1 -1
- package/dist/Components/TabBar/TabBarButton.d.ts +2 -2
- package/dist/Components/Table/Table.d.ts +1 -1
- package/dist/Components/Text/Heading.d.ts +2 -2
- package/dist/Components/Text/Text.d.ts +2 -2
- package/dist/Components/Text/Text.stories.d.ts +1 -1
- package/dist/Components/Title/HoverTitle.d.ts +9 -0
- package/dist/Components/Title/Title.stories.d.ts +11 -0
- package/dist/Components/Title/withTitle.d.ts +6 -0
- package/dist/Components/Toast/Toast.d.ts +2 -2
- package/dist/Components/Toast/Toast.stories.d.ts +1 -1
- package/dist/Components/Toast/ToastContainer.d.ts +2 -2
- package/dist/Components/TopBar/MoreButton.d.ts +1 -1
- package/dist/Components/TopBar/TopBar.d.ts +2 -2
- package/dist/Components/TopBar/TopBar.stories.d.ts +1 -1
- package/dist/Components/TopBar/TopBarButton.d.ts +1 -1
- package/dist/helper/withMemo.d.ts +1 -1
- package/dist/helper/withRestrictedChildren.d.ts +1 -1
- package/dist/index.css +4 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +420 -205
- package/dist/index.js.map +1 -1
- package/eslint.config.js +1 -0
- package/package.json +1 -1
- package/src/Components/ActionSheet/ActionSheet.stories.tsx +3 -4
- package/src/Components/ActionSheet/ActionSheet.tsx +20 -18
- package/src/Components/Card/Card.stories.tsx +3 -4
- package/src/Components/Card/Card.tsx +3 -3
- package/src/Components/Clickable/Clickable.tsx +6 -6
- package/src/Components/Colors.stories.tsx +11 -12
- package/src/Components/Dialog/AlertDialog.stories.tsx +2 -2
- package/src/Components/Dialog/AlertDialog.tsx +2 -2
- package/src/Components/Dialog/ButtonDialog.tsx +15 -15
- package/src/Components/Dialog/ConfirmDialog.stories.tsx +3 -4
- package/src/Components/Dialog/ConfirmDialog.tsx +2 -2
- package/src/Components/Dialog/Dialog.tsx +10 -10
- package/src/Components/Dialog/DialogBackground.tsx +12 -12
- package/src/Components/Dialog/DialogContainer.tsx +7 -7
- package/src/Components/Dialog/DialogContext.ts +1 -1
- package/src/Components/Dialog/useAlertDialog.ts +2 -2
- package/src/Components/Dialog/useConfirmDialog.ts +2 -2
- package/src/Components/DragAndDrop/DragItem.tsx +2 -2
- package/src/Components/DragAndDrop/DropArea.tsx +3 -3
- package/src/Components/ErrorBoundary.tsx +5 -5
- package/src/Components/FormElements/Button/Button.stories.tsx +6 -6
- package/src/Components/FormElements/Button/Button.tsx +9 -9
- package/src/Components/FormElements/CheckBox/Checkbox.stories.tsx +1 -1
- package/src/Components/FormElements/CheckBox/Checkbox.tsx +6 -6
- package/src/Components/FormElements/ColorInput/ColorInput.stories.tsx +1 -1
- package/src/Components/FormElements/ColorInput/ColorInput.tsx +8 -8
- package/src/Components/FormElements/Controller/ColorInputController.ts +2 -2
- package/src/Components/FormElements/Controller/FileInputController.tsx +4 -4
- package/src/Components/FormElements/Controller/HookForm.tsx +4 -4
- package/src/Components/FormElements/Controller/InputController.ts +2 -2
- package/src/Components/FormElements/Controller/MultipleFileInputController.ts +2 -2
- package/src/Components/FormElements/Controller/PasswordInputController.ts +2 -2
- package/src/Components/FormElements/Controller/SelectController.ts +2 -2
- package/src/Components/FormElements/Controller/SliderController.ts +2 -2
- package/src/Components/FormElements/Controller/SwitchController.ts +2 -2
- package/src/Components/FormElements/Controller/TextareaController.ts +2 -2
- package/src/Components/FormElements/Controller/withHookController.tsx +2 -2
- package/src/Components/FormElements/Error/FormError.stories.tsx +1 -1
- package/src/Components/FormElements/Error/FormError.tsx +9 -9
- package/src/Components/FormElements/Form.stories.tsx +1 -1
- package/src/Components/FormElements/Input/FileInput/FileInput.tsx +8 -8
- package/src/Components/FormElements/Input/FileInput/MultipleFileInput.tsx +21 -21
- package/src/Components/FormElements/Input/HiddenInput.stories.tsx +1 -1
- package/src/Components/FormElements/Input/HiddenInput.tsx +4 -4
- package/src/Components/FormElements/Input/Input.stories.tsx +1 -1
- package/src/Components/FormElements/Input/Input.tsx +11 -11
- package/src/Components/FormElements/Input/PasswordInput/PasswordInput.stories.tsx +1 -1
- package/src/Components/FormElements/Input/PasswordInput/PasswordInput.tsx +10 -10
- package/src/Components/FormElements/SearchSelectInput/SearchSelectInput.stories.tsx +2 -2
- package/src/Components/FormElements/SearchSelectInput/SearchSelectInput.tsx +19 -19
- package/src/Components/FormElements/Select/Select.stories.tsx +1 -1
- package/src/Components/FormElements/Select/Select.tsx +7 -7
- package/src/Components/FormElements/Slider/Slider.stories.tsx +1 -1
- package/src/Components/FormElements/Slider/Slider.tsx +7 -7
- package/src/Components/FormElements/Switch/Switch.stories.tsx +1 -1
- package/src/Components/FormElements/Switch/Switch.tsx +7 -7
- package/src/Components/FormElements/Textarea/Textarea.stories.tsx +1 -1
- package/src/Components/FormElements/Textarea/Textarea.tsx +9 -9
- package/src/Components/FullScreen/FullScreen.tsx +4 -4
- package/src/Components/Hooks/useBreakpoint.ts +1 -1
- package/src/Components/Hooks/useDelayed.ts +5 -4
- package/src/Components/Hooks/useDelayedState.ts +1 -1
- package/src/Components/Hooks/useKeyListener.ts +1 -1
- package/src/Components/Hooks/useMousePosition.ts +1 -1
- package/src/Components/Hooks/useWindowDimensions.ts +1 -1
- package/src/Components/Icon/{Icon.tsx → BaseIcon.tsx} +10 -8
- package/src/Components/Icon/DoubleIcon.stories.tsx +1 -1
- package/src/Components/Icon/DoubleIcon.tsx +9 -9
- package/src/Components/Icon/Icon.stories.tsx +3 -3
- package/src/Components/Icon/Icon.ts +4 -0
- package/src/Components/Image/Image.stories.tsx +1 -1
- package/src/Components/Image/Image.tsx +4 -4
- package/src/Components/InViewport/InViewport.tsx +3 -3
- package/src/Components/Layout/{Block.tsx → BaseBlock.tsx} +8 -9
- package/src/Components/Layout/{InlineBlock.tsx → BaseInlineBlock.tsx} +6 -6
- package/src/Components/Layout/Block.ts +4 -0
- package/src/Components/Layout/Container.tsx +3 -3
- package/src/Components/Layout/Flex.tsx +21 -5
- package/src/Components/Layout/Grid/Grid.tsx +6 -6
- package/src/Components/Layout/Grid/GridItem.tsx +6 -6
- package/src/Components/Layout/Grow.tsx +3 -3
- package/src/Components/Layout/Inline.tsx +5 -5
- package/src/Components/Layout/InlineBlock.ts +4 -0
- package/src/Components/Layout/View.tsx +4 -4
- package/src/Components/Layout/ViewWithoutListeners.tsx +3 -3
- package/src/Components/Layout/layout.module.scss +13 -0
- package/src/Components/LoadingArea/LoadingArea.stories.tsx +5 -5
- package/src/Components/LoadingArea/LoadingArea.tsx +5 -5
- package/src/Components/LoadingCircle/LoadingCircle.stories.tsx +2 -2
- package/src/Components/LoadingCircle/LoadingCircle.tsx +4 -4
- package/src/Components/Menu/HoverMenu.stories.tsx +5 -5
- package/src/Components/Menu/HoverMenu.tsx +13 -33
- package/src/Components/Menu/Menu.stories.tsx +5 -5
- package/src/Components/Menu/Menu.tsx +12 -12
- package/src/Components/Menu/MenuDivider.tsx +4 -4
- package/src/Components/Menu/MenuItem.stories.tsx +1 -1
- package/src/Components/Menu/MenuItem.tsx +12 -12
- package/src/Components/Menu/Submenu.stories.tsx +3 -3
- package/src/Components/Menu/Submenu.tsx +16 -16
- package/src/Components/Menu/menu.module.scss +3 -2
- package/src/Components/Menu/useHoverMenu.ts +36 -0
- package/src/Components/Menu/useMenu.ts +1 -1
- package/src/Components/RbmComponentProps.ts +1 -1
- package/src/Components/SizeCalculator/SizeCalculator.tsx +5 -5
- package/src/Components/SpoilerList/Spoiler/Spoiler.stories.tsx +1 -1
- package/src/Components/SpoilerList/Spoiler/Spoiler.tsx +18 -18
- package/src/Components/SpoilerList/SpoilerList.tsx +7 -7
- package/src/Components/TabBar/TabBar.stories.tsx +1 -1
- package/src/Components/TabBar/TabBar.tsx +11 -11
- package/src/Components/TabBar/TabBarButton.tsx +5 -5
- package/src/Components/Table/Table.tsx +2 -2
- package/src/Components/Text/Heading.tsx +5 -5
- package/src/Components/Text/Text.stories.tsx +1 -1
- package/src/Components/Text/Text.tsx +6 -6
- package/src/Components/Title/HoverTitle.tsx +97 -0
- package/src/Components/Title/Title.stories.tsx +95 -0
- package/src/Components/Title/hoverTitle.module.scss +8 -0
- package/src/Components/Title/withTitle.module.scss +7 -0
- package/src/Components/Title/withTitle.tsx +48 -0
- package/src/Components/Toast/Toast.stories.tsx +1 -1
- package/src/Components/Toast/Toast.tsx +6 -6
- package/src/Components/Toast/ToastContainer.tsx +7 -7
- package/src/Components/TopBar/MoreButton.tsx +7 -8
- package/src/Components/TopBar/TopBar.stories.tsx +1 -1
- package/src/Components/TopBar/TopBar.tsx +18 -18
- package/src/Components/TopBar/TopBarButton.tsx +3 -3
- package/src/WrongChildError.ts +1 -0
- package/src/helper/nonEmptyString.ts +1 -1
- package/src/helper/withMemo.ts +3 -3
- package/src/helper/withRestrictedChildren.tsx +5 -3
- package/src/index.ts +6 -0
- package/tsconfig.json +2 -8
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FormError } from '
|
|
3
|
-
import { Menu } from '
|
|
2
|
+
import { FormError } from '../Error/FormError';
|
|
3
|
+
import { Menu } from '../../Menu/Menu';
|
|
4
4
|
import { Sketch } from '@uiw/react-color';
|
|
5
5
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
6
|
-
import { useClientLayoutEffect } from '
|
|
7
|
-
import { useListener } from '
|
|
8
|
-
import { useSharedSelectedColor } from '
|
|
9
|
-
import { withMemo } from '
|
|
6
|
+
import { useClientLayoutEffect } from '../../Hooks/useClientLayoutEffect';
|
|
7
|
+
import { useListener } from '../../Hooks/useListener';
|
|
8
|
+
import { useSharedSelectedColor } from './sharedSelectedColor';
|
|
9
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
|
-
import styles from '
|
|
11
|
+
import styles from './colorInput.module.scss';
|
|
12
12
|
import type { ColorResult } from '@uiw/react-color';
|
|
13
13
|
import type { MouseEvent } from 'react';
|
|
14
|
-
import type { OptionalListener } from '
|
|
14
|
+
import type { OptionalListener } from '../../Hooks/useListener';
|
|
15
15
|
|
|
16
16
|
export type ColorInputProps<OnChangeData> = {
|
|
17
17
|
defaultValue?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColorInput } from '
|
|
2
|
-
import { withHookController } from '
|
|
1
|
+
import { ColorInput } from '../ColorInput/ColorInput';
|
|
2
|
+
import { withHookController } from './withHookController';
|
|
3
3
|
|
|
4
4
|
export const ColorInputController = withHookController(ColorInput, 'onChangeColor');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FileInput } from '
|
|
1
|
+
import { FileInput } from '../Input/FileInput/FileInput';
|
|
2
2
|
import { useController, useFormContext, useFormState } from 'react-hook-form';
|
|
3
|
-
import { withMemo } from '
|
|
3
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import type { FieldPath, FieldValues } from 'react-hook-form';
|
|
6
|
-
import type { FileInputProps } from '
|
|
7
|
-
import type { FileType } from '
|
|
6
|
+
import type { FileInputProps } from '../Input/FileInput/FileInput';
|
|
7
|
+
import type { FileType } from '../Input/FileInput/FileType';
|
|
8
8
|
|
|
9
9
|
type Props<Values extends FieldValues, Name extends FieldPath<Values> = FieldPath<Values>> = Omit<
|
|
10
10
|
FileInputProps<unknown>,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FormError } from '
|
|
1
|
+
import { FormError } from '../Error/FormError';
|
|
2
2
|
import { FormProvider } from 'react-hook-form';
|
|
3
|
-
import { LoadingArea } from '
|
|
4
|
-
import { SendFormContext } from '
|
|
5
|
-
import { withMemo } from '
|
|
3
|
+
import { LoadingArea } from '../../LoadingArea/LoadingArea';
|
|
4
|
+
import { SendFormContext } from './SendFormContext';
|
|
5
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
6
6
|
import React, { useCallback, useEffect } from 'react';
|
|
7
7
|
import type { Awaitable } from '@ainias42/js-helper';
|
|
8
8
|
import type { FieldPath, FormProviderProps, Path } from 'react-hook-form';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Input } from '
|
|
2
|
-
import { withHookController } from '
|
|
1
|
+
import { Input } from '../Input/Input';
|
|
2
|
+
import { withHookController } from './withHookController';
|
|
3
3
|
|
|
4
4
|
export const InputController = withHookController(Input, 'onChangeText');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MultipleFileInput } from '
|
|
2
|
-
import { withHookController } from '
|
|
1
|
+
import { MultipleFileInput } from '../Input/FileInput/MultipleFileInput';
|
|
2
|
+
import { withHookController } from './withHookController';
|
|
3
3
|
|
|
4
4
|
export const MultipleFileInputController = withHookController(MultipleFileInput, 'onChangeFiles');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PasswordInput } from '
|
|
2
|
-
import { withHookController } from '
|
|
1
|
+
import { PasswordInput } from '../Input/PasswordInput/PasswordInput';
|
|
2
|
+
import { withHookController } from './withHookController';
|
|
3
3
|
|
|
4
4
|
export const PasswordInputController = withHookController(PasswordInput, 'onChangeText');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Select } from '
|
|
2
|
-
import { withHookController } from '
|
|
1
|
+
import { Select } from '../Select/Select';
|
|
2
|
+
import { withHookController } from './withHookController';
|
|
3
3
|
|
|
4
4
|
export const SelectController = withHookController(Select, 'onChangeValue');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Slider } from '
|
|
2
|
-
import { withHookController } from '
|
|
1
|
+
import { Slider } from '../Slider/Slider';
|
|
2
|
+
import { withHookController } from './withHookController';
|
|
3
3
|
|
|
4
4
|
export const SliderController = withHookController(Slider, 'onChangeValue');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Switch } from '
|
|
2
|
-
import { withHookController } from '
|
|
1
|
+
import { Switch } from '../Switch/Switch';
|
|
2
|
+
import { withHookController } from './withHookController';
|
|
3
3
|
|
|
4
4
|
export const SwitchController = withHookController(Switch, 'onChangeChecked');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Textarea } from '
|
|
2
|
-
import { withHookController } from '
|
|
1
|
+
import { Textarea } from '../Textarea/Textarea';
|
|
2
|
+
import { withHookController } from './withHookController';
|
|
3
3
|
|
|
4
4
|
export const TextareaController = withHookController(Textarea, 'onChangeText');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useComposedRef } from '
|
|
1
|
+
import { useComposedRef } from '../../Hooks/useComposedRef';
|
|
2
2
|
import { useController, useFormContext } from 'react-hook-form';
|
|
3
|
-
import { withMemo } from '
|
|
3
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import type { ComponentProps, ComponentRef, ComponentType, ForwardedRef } from 'react';
|
|
6
6
|
import type { FieldPath, FieldValues } from 'react-hook-form';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { TEXT_SIZE, Text } from '
|
|
4
|
-
import { withMemo } from '
|
|
1
|
+
import { BaseBlock } from '../../Layout/BaseBlock';
|
|
2
|
+
import { BaseInlineBlock } from '../../Layout/BaseInlineBlock';
|
|
3
|
+
import { TEXT_SIZE, Text } from '../../Text/Text';
|
|
4
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import styles from '
|
|
6
|
+
import styles from './formError.module.scss';
|
|
7
7
|
|
|
8
8
|
export type FormErrorProps = { error?: string; inline?: boolean };
|
|
9
9
|
|
|
@@ -28,15 +28,15 @@ export const FormError = withMemo(function FormError({ error, inline }: FormErro
|
|
|
28
28
|
|
|
29
29
|
if (inline) {
|
|
30
30
|
return (
|
|
31
|
-
<
|
|
31
|
+
<BaseInlineBlock className={styles.error}>
|
|
32
32
|
<Text size={TEXT_SIZE.small}>{error}</Text>
|
|
33
|
-
</
|
|
33
|
+
</BaseInlineBlock>
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
|
-
<
|
|
38
|
+
<BaseBlock className={styles.error}>
|
|
39
39
|
<Text size={TEXT_SIZE.small}>{error}</Text>
|
|
40
|
-
</
|
|
40
|
+
</BaseBlock>
|
|
41
41
|
);
|
|
42
42
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { MultipleFileInput } from '
|
|
2
|
+
import { MultipleFileInput } from './MultipleFileInput';
|
|
3
3
|
import { useCallback, useMemo } from 'react';
|
|
4
|
-
import { useListenerWithExtractedProps } from '
|
|
5
|
-
import { withMemo } from '
|
|
6
|
-
import type { FileType } from '
|
|
7
|
-
import type { Listener } from '
|
|
8
|
-
import type { MultipleFileInputProps } from '
|
|
9
|
-
import type { Override } from '
|
|
10
|
-
import type { RbmComponentProps } from '
|
|
4
|
+
import { useListenerWithExtractedProps } from '../../../Hooks/useListener';
|
|
5
|
+
import { withMemo } from '../../../../helper/withMemo';
|
|
6
|
+
import type { FileType } from './FileType';
|
|
7
|
+
import type { Listener } from '../../../Hooks/useListener';
|
|
8
|
+
import type { MultipleFileInputProps } from './MultipleFileInput';
|
|
9
|
+
import type { Override } from '../../../../TypeHelpers';
|
|
10
|
+
import type { RbmComponentProps } from '../../../RbmComponentProps';
|
|
11
11
|
|
|
12
12
|
export type FileInputProps<OnChangeFileData> = RbmComponentProps<
|
|
13
13
|
Override<
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { Image } from '
|
|
9
|
-
import { Inline } from '
|
|
10
|
-
import { Text } from '
|
|
2
|
+
import { BaseBlock } from '../../../Layout/BaseBlock';
|
|
3
|
+
import { BaseIcon } from '../../../Icon/BaseIcon';
|
|
4
|
+
import { Clickable } from '../../../Clickable/Clickable';
|
|
5
|
+
import { Flex } from '../../../Layout/Flex';
|
|
6
|
+
import { FormError } from '../../Error/FormError';
|
|
7
|
+
import { Grow } from '../../../Layout/Grow';
|
|
8
|
+
import { Image } from '../../../Image/Image';
|
|
9
|
+
import { Inline } from '../../../Layout/Inline';
|
|
10
|
+
import { Text } from '../../../Text/Text';
|
|
11
11
|
import { faFile, faPlus, faTimesCircle } from '@fortawesome/free-solid-svg-icons';
|
|
12
12
|
import { useCallback, useRef } from 'react';
|
|
13
|
-
import { useListenerWithExtractedProps } from '
|
|
14
|
-
import { withMemo } from '
|
|
13
|
+
import { useListenerWithExtractedProps } from '../../../Hooks/useListener';
|
|
14
|
+
import { withMemo } from '../../../../helper/withMemo';
|
|
15
15
|
import classNames from 'classnames';
|
|
16
|
-
import styles from '
|
|
16
|
+
import styles from './fileInput.module.scss';
|
|
17
17
|
import type { ChangeEventHandler, DragEvent, InputHTMLAttributes } from 'react';
|
|
18
|
-
import type { FileType } from '
|
|
19
|
-
import type { Listener } from '
|
|
20
|
-
import type { Override } from '
|
|
21
|
-
import type { RbmComponentProps } from '
|
|
18
|
+
import type { FileType } from './FileType';
|
|
19
|
+
import type { Listener } from '../../../Hooks/useListener';
|
|
20
|
+
import type { Override } from '../../../../TypeHelpers';
|
|
21
|
+
import type { RbmComponentProps } from '../../../RbmComponentProps';
|
|
22
22
|
|
|
23
23
|
export type MultipleFileInputProps<OnChangeFilesData> = RbmComponentProps<
|
|
24
24
|
Override<
|
|
@@ -211,10 +211,10 @@ export const MultipleFileInput = withMemo(function MultipleImageInput<OnChangeDa
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
return (
|
|
214
|
-
<
|
|
215
|
-
<
|
|
214
|
+
<BaseBlock className={styles.previewText}>
|
|
215
|
+
<BaseIcon icon={faFile} className={styles.previewTextIcon} />
|
|
216
216
|
<Text>{file.name}</Text>
|
|
217
|
-
</
|
|
217
|
+
</BaseBlock>
|
|
218
218
|
);
|
|
219
219
|
};
|
|
220
220
|
|
|
@@ -256,7 +256,7 @@ export const MultipleFileInput = withMemo(function MultipleImageInput<OnChangeDa
|
|
|
256
256
|
onClick={removeFile}
|
|
257
257
|
onClickData={index}
|
|
258
258
|
>
|
|
259
|
-
<
|
|
259
|
+
<BaseIcon icon={faTimesCircle} />
|
|
260
260
|
</Clickable>
|
|
261
261
|
)}
|
|
262
262
|
</Clickable>
|
|
@@ -275,7 +275,7 @@ export const MultipleFileInput = withMemo(function MultipleImageInput<OnChangeDa
|
|
|
275
275
|
onClick={clickOnFile}
|
|
276
276
|
__allowChildren="html"
|
|
277
277
|
>
|
|
278
|
-
<
|
|
278
|
+
<BaseIcon icon={faPlus} />
|
|
279
279
|
<input
|
|
280
280
|
{...props}
|
|
281
281
|
ref={inputRef}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Input } from '
|
|
3
|
-
import { withMemo } from '
|
|
2
|
+
import { Input } from './Input';
|
|
3
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import styles from '
|
|
6
|
-
import type { InputProps } from '
|
|
5
|
+
import styles from './input.module.scss';
|
|
6
|
+
import type { InputProps } from './Input';
|
|
7
7
|
|
|
8
8
|
export type HiddenInputProps<OnChangeType, OnBlurData, OnChangeEndData> = InputProps<
|
|
9
9
|
OnChangeType,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FormError } from '
|
|
2
|
+
import { FormError } from '../Error/FormError';
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
4
|
-
import { useComposedRef } from '
|
|
5
|
-
import { useDebounced } from '
|
|
6
|
-
import { useListenerWithExtractedProps } from '
|
|
7
|
-
import { useOnChangeDone } from '
|
|
8
|
-
import { useSendFormContext } from '
|
|
9
|
-
import { withMemo } from '
|
|
4
|
+
import { useComposedRef } from '../../Hooks/useComposedRef';
|
|
5
|
+
import { useDebounced } from '../../Hooks/useDebounced';
|
|
6
|
+
import { useListenerWithExtractedProps } from '../../Hooks/useListener';
|
|
7
|
+
import { useOnChangeDone } from '../hooks/useOnChangeDone';
|
|
8
|
+
import { useSendFormContext } from '../Controller/SendFormContext';
|
|
9
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
|
-
import styles from '
|
|
11
|
+
import styles from './input.module.scss';
|
|
12
12
|
import type { ChangeEvent, ForwardedRef, InputHTMLAttributes, KeyboardEvent } from 'react';
|
|
13
|
-
import type { OptionalListener } from '
|
|
14
|
-
import type { Override } from '
|
|
15
|
-
import type { RbmComponentProps } from '
|
|
13
|
+
import type { OptionalListener } from '../../Hooks/useListener';
|
|
14
|
+
import type { Override } from '../../../TypeHelpers';
|
|
15
|
+
import type { RbmComponentProps } from '../../RbmComponentProps';
|
|
16
16
|
|
|
17
17
|
export type InputProps<OnChangeData, OnBlurData, OnChangeDoneData> = RbmComponentProps<
|
|
18
18
|
Override<
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Input } from '
|
|
1
|
+
import { BaseIcon } from '../../../Icon/BaseIcon';
|
|
2
|
+
import { Clickable } from '../../../Clickable/Clickable';
|
|
3
|
+
import { Flex } from '../../../Layout/Flex';
|
|
4
|
+
import { Grow } from '../../../Layout/Grow';
|
|
5
|
+
import { Input } from '../Input';
|
|
6
6
|
import { faEye, faEyeSlash } from '@fortawesome/free-solid-svg-icons';
|
|
7
|
-
import { withMemo } from '
|
|
7
|
+
import { withMemo } from '../../../../helper/withMemo';
|
|
8
8
|
import React, { useCallback, useState } from 'react';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
|
-
import styles from '
|
|
11
|
-
import type { DistributiveOmit } from '
|
|
10
|
+
import styles from './passwordInput.module.scss';
|
|
11
|
+
import type { DistributiveOmit } from '../../../../helper/DistributiveOmit';
|
|
12
12
|
import type { ForwardedRef } from 'react';
|
|
13
|
-
import type { InputProps } from '
|
|
13
|
+
import type { InputProps } from '../Input';
|
|
14
14
|
|
|
15
15
|
export type PasswordInputProps<OnChangeData, OnBlurData, OnChangeEndData> = DistributiveOmit<
|
|
16
16
|
InputProps<OnChangeData, OnBlurData, OnChangeEndData>,
|
|
@@ -50,7 +50,7 @@ export const PasswordInput = withMemo(function PasswordInput<OnChangeData, OnBlu
|
|
|
50
50
|
<Input {...props} type={isVisible ? 'text' : 'password'} ref={ref} />
|
|
51
51
|
</Grow>
|
|
52
52
|
<Clickable onClick={toggleVisible} className={styles.showButton} interactable={false}>
|
|
53
|
-
<
|
|
53
|
+
<BaseIcon icon={isVisible ? faEye : faEyeSlash} />
|
|
54
54
|
</Clickable>
|
|
55
55
|
</Flex>
|
|
56
56
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SearchSelectInput } from '
|
|
1
|
+
import { SearchSelectInput } from './SearchSelectInput';
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
4
|
-
import type { SearchSelectInputProps } from '
|
|
4
|
+
import type { SearchSelectInputProps } from './SearchSelectInput';
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
7
|
component: SearchSelectInput,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ArrayHelper } from '@ainias42/js-helper';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { TEXT_SIZE, Text } from '
|
|
3
|
+
import { BaseBlock } from '../../Layout/BaseBlock';
|
|
4
|
+
import { BaseInlineBlock } from '../../Layout/BaseInlineBlock';
|
|
5
|
+
import { Clickable } from '../../Clickable/Clickable';
|
|
6
|
+
import { Flex } from '../../Layout/Flex';
|
|
7
|
+
import { Grow } from '../../Layout/Grow';
|
|
8
|
+
import { TEXT_SIZE, Text } from '../../Text/Text';
|
|
9
9
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
10
|
-
import { useWindow } from '
|
|
11
|
-
import { withMemo } from '
|
|
10
|
+
import { useWindow } from '../../../WindowContext/WindowContext';
|
|
11
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
12
12
|
import classNames from 'classnames';
|
|
13
|
-
import styles from '
|
|
13
|
+
import styles from './seachSelectInput.module.scss';
|
|
14
14
|
import type { ChangeEventHandler, KeyboardEvent, ReactNode } from 'react';
|
|
15
|
-
import type { OptionalListener } from '
|
|
16
|
-
import type { RbmComponentProps } from '
|
|
17
|
-
import type { SelectOption } from '
|
|
15
|
+
import type { OptionalListener } from '../../Hooks/useListener';
|
|
16
|
+
import type { RbmComponentProps } from '../../RbmComponentProps';
|
|
17
|
+
import type { SelectOption } from '../Select/Select';
|
|
18
18
|
|
|
19
19
|
export type SearchSelectInputProps<OnChangeData> = RbmComponentProps<
|
|
20
20
|
{
|
|
@@ -159,9 +159,9 @@ export const SearchSelectInput = withMemo(function SearchSelectInput<OnChangeDat
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
const element = renderSelectedOption?.(option) ?? (
|
|
162
|
-
<
|
|
162
|
+
<BaseInlineBlock className={styles.tag}>
|
|
163
163
|
<Text size={TEXT_SIZE.xSmall}>{indexedOptions[value]?.label}</Text>
|
|
164
|
-
</
|
|
164
|
+
</BaseInlineBlock>
|
|
165
165
|
);
|
|
166
166
|
|
|
167
167
|
const onClickProps = allowDeselect ? { onClick: toggleOption, onClickData: value } : {};
|
|
@@ -175,9 +175,9 @@ export const SearchSelectInput = withMemo(function SearchSelectInput<OnChangeDat
|
|
|
175
175
|
const renderSelectableOption = (opt: SelectOption, index: number) => {
|
|
176
176
|
const isActive = index === selectedIndex;
|
|
177
177
|
const element = renderSelectableOptions?.(opt, isActive, index, selectedIndex) ?? (
|
|
178
|
-
<
|
|
178
|
+
<BaseBlock className={classNames(styles.selectableOption, { [styles.active]: index === selectedIndex })}>
|
|
179
179
|
<Text>{opt.label}</Text>
|
|
180
|
-
</
|
|
180
|
+
</BaseBlock>
|
|
181
181
|
);
|
|
182
182
|
|
|
183
183
|
return (
|
|
@@ -192,7 +192,7 @@ export const SearchSelectInput = withMemo(function SearchSelectInput<OnChangeDat
|
|
|
192
192
|
<label className={classNames(styles.input, className)} style={style} ref={containerRef}>
|
|
193
193
|
{label ? <span className={styles.label}>{label}</span> : null}
|
|
194
194
|
<Flex className={styles.inputContainer} horizontal={true}>
|
|
195
|
-
<
|
|
195
|
+
<BaseInlineBlock>{values.map(renderOption)}</BaseInlineBlock>
|
|
196
196
|
<Grow __allowChildren="html">
|
|
197
197
|
<input
|
|
198
198
|
ref={inputRef}
|
|
@@ -204,9 +204,9 @@ export const SearchSelectInput = withMemo(function SearchSelectInput<OnChangeDat
|
|
|
204
204
|
/>
|
|
205
205
|
</Grow>
|
|
206
206
|
</Flex>
|
|
207
|
-
<
|
|
207
|
+
<BaseInlineBlock className={styles.selectableOptionContainer} style={suggestionsPosition}>
|
|
208
208
|
{selectableOptions.map(renderSelectableOption)}
|
|
209
|
-
</
|
|
209
|
+
</BaseInlineBlock>
|
|
210
210
|
</label>
|
|
211
211
|
);
|
|
212
212
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
-
import { useListenerWithExtractedProps } from '
|
|
3
|
+
import { useListenerWithExtractedProps } from '../../Hooks/useListener';
|
|
4
4
|
import type { ChangeEventHandler, SelectHTMLAttributes } from 'react';
|
|
5
|
-
import type { Override } from '
|
|
6
|
-
import type { RbmComponentProps } from '
|
|
5
|
+
import type { Override } from '../../../TypeHelpers';
|
|
6
|
+
import type { RbmComponentProps } from '../../RbmComponentProps';
|
|
7
7
|
|
|
8
|
-
import { FormError } from '
|
|
9
|
-
import { withMemo } from '
|
|
8
|
+
import { FormError } from '../Error/FormError';
|
|
9
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
|
-
import styles from '
|
|
12
|
-
import type { OptionalListener } from '
|
|
11
|
+
import styles from './select.module.scss';
|
|
12
|
+
import type { OptionalListener } from '../../Hooks/useListener';
|
|
13
13
|
|
|
14
14
|
export type SelectOption<ValueType = string> = {
|
|
15
15
|
label: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
-
import { useListenerWithExtractedProps } from '
|
|
4
|
-
import { useOnChangeDone } from '
|
|
5
|
-
import { withMemo } from '
|
|
3
|
+
import { useListenerWithExtractedProps } from '../../Hooks/useListener';
|
|
4
|
+
import { useOnChangeDone } from '../hooks/useOnChangeDone';
|
|
5
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
-
import styles from '
|
|
7
|
+
import styles from './slider.module.scss';
|
|
8
8
|
import type { ChangeEventHandler, InputHTMLAttributes, MutableRefObject } from 'react';
|
|
9
|
-
import type { OptionalListener } from '
|
|
10
|
-
import type { Override } from '
|
|
11
|
-
import type { RbmComponentProps } from '
|
|
9
|
+
import type { OptionalListener } from '../../Hooks/useListener';
|
|
10
|
+
import type { Override } from '../../../TypeHelpers';
|
|
11
|
+
import type { RbmComponentProps } from '../../RbmComponentProps';
|
|
12
12
|
|
|
13
13
|
export type SliderProps<OnChangeData, OnChangeValueData, OnChangeDoneData> = RbmComponentProps<
|
|
14
14
|
Override<
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FormError } from '
|
|
2
|
+
import { FormError } from '../Error/FormError';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
|
-
import { useListenerWithExtractedProps } from '
|
|
5
|
-
import { withMemo } from '
|
|
4
|
+
import { useListenerWithExtractedProps } from '../../Hooks/useListener';
|
|
5
|
+
import { withMemo } from '../../../helper/withMemo';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
-
import styles from '
|
|
7
|
+
import styles from './switch.module.scss';
|
|
8
8
|
import type { ChangeEventHandler, InputHTMLAttributes, MouseEvent } from 'react';
|
|
9
|
-
import type { OptionalListener } from '
|
|
10
|
-
import type { Override } from '
|
|
11
|
-
import type { RbmComponentProps } from '
|
|
9
|
+
import type { OptionalListener } from '../../Hooks/useListener';
|
|
10
|
+
import type { Override } from '../../../TypeHelpers';
|
|
11
|
+
import type { RbmComponentProps } from '../../RbmComponentProps';
|
|
12
12
|
|
|
13
13
|
export type SwitchProps<OnChangeCheckedData> = RbmComponentProps<
|
|
14
14
|
Override<
|