@itcase/ui 1.9.52 → 1.9.53
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/{Avatar_cjs_CvbURI0f.js → Avatar_cjs_BIHJrAbQ.js} +1 -1
- package/dist/{Avatar_es_CV-ffIJu.js → Avatar_es_CtP68jPM.js} +1 -1
- package/dist/{Button_cjs_BSfL-20W.js → Button_cjs_B8cIJYbm.js} +6 -6
- package/dist/{Button_es_Dk6_9N-r.js → Button_es_DQGp8Ipn.js} +6 -6
- package/dist/{ChipsGroup_cjs_CE-nNENH.js → ChipsGroup_cjs_C27x9x9O.js} +1 -1
- package/dist/{ChipsGroup_es_CxqwFgoo.js → ChipsGroup_es_BTe1MYhV.js} +1 -1
- package/dist/{DatePicker_cjs_BJzVpk0o.js → DatePicker_cjs_CY5UAP1l.js} +3 -3
- package/dist/{DatePicker_es_BP0iWHMt.js → DatePicker_es_Cze2Bv6w.js} +3 -3
- package/dist/{DropdownItem_cjs_pJblsTmA.js → DropdownItem_cjs_k28TIoDU.js} +1 -1
- package/dist/{DropdownItem_es_Xq7G5-UI.js → DropdownItem_es_DjPgbwtU.js} +1 -1
- package/dist/{Icon_cjs_CuqEv1jm.js → Icon_cjs_DTvdhr8B.js} +33 -4
- package/dist/{Icon_es_BYViOa6l.js → Icon_es_kewxGRUB.js} +33 -4
- package/dist/{Label_cjs_DsuCRIyo.js → Label_cjs_RI5tFcPt.js} +1 -1
- package/dist/{Label_es_BPQhW13g.js → Label_es_CNRTIAWo.js} +1 -1
- package/dist/{Loader_cjs_DMIUN6_q.js → Loader_cjs_CJpdLndn.js} +19 -4
- package/dist/{Loader_es_DLb2P-Sk.js → Loader_es_CqlLujBJ.js} +19 -4
- package/dist/{SelectContainer_cjs_qWAMLIkz.js → SelectContainer_cjs_DXYUcpco.js} +2 -2
- package/dist/{SelectContainer_es_kRH4DsEh.js → SelectContainer_es_De_XL0im.js} +2 -2
- package/dist/cjs/components/Accordion.js +2 -2
- package/dist/cjs/components/Avatar.js +6 -5
- package/dist/cjs/components/AvatarStack.js +3 -3
- package/dist/cjs/components/Badge.js +6 -5
- package/dist/cjs/components/Breadcrumbs.js +2 -1
- package/dist/cjs/components/Button.js +8 -8
- package/dist/cjs/components/Cell.js +3 -3
- package/dist/cjs/components/Checkmark.js +4 -3
- package/dist/cjs/components/Chips.js +5 -4
- package/dist/cjs/components/Choice.js +4 -3
- package/dist/cjs/components/CookiesWarning.js +7 -7
- package/dist/cjs/components/DatePeriod.js +8 -8
- package/dist/cjs/components/DatePicker.js +10 -10
- package/dist/cjs/components/Drawer.js +3 -2
- package/dist/cjs/components/Dropdown.js +5 -4
- package/dist/cjs/components/Dropzone.js +1751 -0
- package/dist/cjs/components/HeroTitle.js +4 -3
- package/dist/cjs/components/Icon.js +6 -5
- package/dist/cjs/components/InputNumber.js +8 -8
- package/dist/cjs/components/InputPassword.js +5 -4
- package/dist/cjs/components/Label.js +5 -4
- package/dist/cjs/components/Loader.js +2 -2
- package/dist/cjs/components/MenuItem.js +2 -1
- package/dist/cjs/components/Modal.js +4 -4
- package/dist/cjs/components/ModalSheetBottom.js +4 -3
- package/dist/cjs/components/Notification.js +12 -12
- package/dist/cjs/components/Pagination.js +4 -3
- package/dist/cjs/components/Response.js +5 -5
- package/dist/cjs/components/Search.js +3 -2
- package/dist/cjs/components/Segmented.js +5 -4
- package/dist/cjs/components/Select.js +4 -4
- package/dist/cjs/components/Swiper.js +3 -2
- package/dist/cjs/components/Tab.js +1 -1
- package/dist/cjs/components/Tile.js +2 -2
- package/dist/cjs/components/Title.js +6 -5
- package/dist/cjs/components/Tooltip.js +6 -5
- package/dist/cjs/components/Warning.js +3 -2
- package/dist/cjs/hooks/useDropzoneFieldFiles.js +20769 -0
- package/dist/components/Accordion.js +2 -2
- package/dist/components/Avatar.js +6 -5
- package/dist/components/AvatarStack.js +3 -3
- package/dist/components/Badge.js +6 -5
- package/dist/components/Breadcrumbs.js +2 -1
- package/dist/components/Button.js +8 -8
- package/dist/components/Cell.js +3 -3
- package/dist/components/Checkmark.js +4 -3
- package/dist/components/Chips.js +5 -4
- package/dist/components/Choice.js +4 -3
- package/dist/components/CookiesWarning.js +7 -7
- package/dist/components/DatePeriod.js +8 -8
- package/dist/components/DatePicker.js +10 -10
- package/dist/components/Drawer.js +3 -2
- package/dist/components/Dropdown.js +5 -4
- package/dist/components/Dropzone.js +1749 -0
- package/dist/components/HeroTitle.js +4 -3
- package/dist/components/Icon.js +6 -5
- package/dist/components/InputNumber.js +8 -8
- package/dist/components/InputPassword.js +5 -4
- package/dist/components/Label.js +5 -4
- package/dist/components/Loader.js +2 -2
- package/dist/components/MenuItem.js +2 -1
- package/dist/components/Modal.js +4 -4
- package/dist/components/ModalSheetBottom.js +4 -3
- package/dist/components/Notification.js +12 -12
- package/dist/components/Pagination.js +4 -3
- package/dist/components/Response.js +5 -5
- package/dist/components/Search.js +3 -2
- package/dist/components/Segmented.js +5 -4
- package/dist/components/Select.js +4 -4
- package/dist/components/Swiper.js +3 -2
- package/dist/components/Tab.js +1 -1
- package/dist/components/Tile.js +2 -2
- package/dist/components/Title.js +6 -5
- package/dist/components/Tooltip.js +6 -5
- package/dist/components/Warning.js +3 -2
- package/dist/css/styles/bundles.css +338 -110
- package/dist/hooks/useDropzoneFieldFiles.js +20767 -0
- package/dist/stories/DropzoneOverview.mdx +11 -0
- package/dist/stories/DropzonePlayground.mdx +10 -0
- package/dist/types/components/Button/Button.d.ts +3 -2
- package/dist/types/components/Button/Button.interface.d.ts +4 -4
- package/dist/types/components/Button/stories/ButtonDefault.stories.d.ts +3 -2
- package/dist/types/components/Button/stories/ButtonDemo.stories.d.ts +3 -2
- package/dist/types/components/Button/stories/ButtonIcon.stories.d.ts +3 -2
- package/dist/types/components/Button/stories/ButtonLabel.stories.d.ts +3 -2
- package/dist/types/components/Button/stories/ButtonLoading.stories.d.ts +3 -2
- package/dist/types/components/Button/stories/ButtonMuted.stories.d.ts +3 -2
- package/dist/types/components/Button/stories/ButtonMutedIcon.stories.d.ts +3 -2
- package/dist/types/components/Button/stories/ButtonShape.stories.d.ts +3 -2
- package/dist/types/components/Button/stories/ButtonSize.stories.d.ts +3 -2
- package/dist/types/components/Dropzone/Dropzone.appearance.d.ts +3 -0
- package/dist/types/components/Dropzone/Dropzone.d.ts +4 -0
- package/dist/types/components/Dropzone/Dropzone.interface.d.ts +82 -0
- package/dist/types/components/Dropzone/appearance/dropzoneDefault.d.ts +3 -0
- package/dist/types/components/Dropzone/appearance/dropzoneDisabled.d.ts +3 -0
- package/dist/types/components/Dropzone/appearance/dropzoneError.d.ts +3 -0
- package/dist/types/components/Dropzone/appearance/dropzoneRequire.d.ts +3 -0
- package/dist/types/components/Dropzone/appearance/dropzoneShape.d.ts +3 -0
- package/dist/types/components/Dropzone/appearance/dropzoneSuccess.d.ts +3 -0
- package/dist/types/components/Dropzone/index.d.ts +1 -0
- package/dist/types/components/Dropzone/stories/DropzoneDefault.stories.d.ts +42 -0
- package/dist/types/components/Dropzone/stories/DropzoneDemo.stories.d.ts +19 -0
- package/dist/types/components/Icon/Icon.interface.d.ts +3 -2
- package/dist/types/components/Loader/Loader.interface.d.ts +1 -1
- package/dist/types/components/Loader/stories/LoaderAppearance.stories.d.ts +3 -0
- package/dist/types/components/Loader/stories/LoaderText.stories.d.ts +25 -0
- package/dist/types/components/Loader/stories/LoaderType.stories.d.ts +25 -0
- package/dist/types/hooks/useDropzoneFieldFiles.d.ts +14 -0
- package/package.json +7 -6
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
import * as DropzoneStories from '../stories/DropzoneDemo.stories.tsx'
|
|
4
|
+
|
|
5
|
+
<Meta title="Molecules / Dropzone / Overview" />
|
|
6
|
+
|
|
7
|
+
# Dropzone
|
|
8
|
+
|
|
9
|
+
`Dropzone` — компонент, позволяющий загружать изображения путем перетаскивания их в область компонента или клика на сам компонент.
|
|
10
|
+
|
|
11
|
+
<Story of={DropzoneStories.Default} />
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
import * as DropzoneStories from '../stories/DropzoneDemo.stories.tsx'
|
|
4
|
+
|
|
5
|
+
<Meta title="Molecules / Dropzone / Playground" />
|
|
6
|
+
|
|
7
|
+
# Playground
|
|
8
|
+
|
|
9
|
+
<Canvas sourceState="shown" of={DropzoneStories.Default} />
|
|
10
|
+
<Controls of={DropzoneStories.Default} />
|
|
@@ -54,7 +54,7 @@ declare const Button: React.ForwardRefExoticComponent<{
|
|
|
54
54
|
wrap?: import("@itcase/types-ui").WrapProps;
|
|
55
55
|
zeroGap?: boolean;
|
|
56
56
|
zeroPadding?: boolean;
|
|
57
|
-
} &
|
|
57
|
+
} & import("../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
|
|
58
58
|
after?: string;
|
|
59
59
|
appearance?: import("@itcase/types-ui").CompositeAppearanceKey;
|
|
60
60
|
Badge?: React.ReactNode;
|
|
@@ -74,7 +74,8 @@ declare const Button: React.ForwardRefExoticComponent<{
|
|
|
74
74
|
labelTextTruncate?: import("../Text/Text.interface").TextProps["textTruncate"];
|
|
75
75
|
labelTextWidth?: import("../Text/Text.interface").TextProps["width"];
|
|
76
76
|
link?: import("../Link/Link.interface").LinkWrapperProps["href"];
|
|
77
|
-
onClick?: () => void;
|
|
77
|
+
onClick?: (event?: MouseEvent) => void;
|
|
78
|
+
onHoldComplete?: () => void;
|
|
78
79
|
onMouseDown?: () => void;
|
|
79
80
|
rel?: import("../Link/Link.interface").LinkWrapperProps["rel"];
|
|
80
81
|
style?: React.CSSProperties;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { AlignProps, AppearanceIconSizeKey, AppearanceKeysDefault, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, BorderColorProps, BorderTypeProps, BorderWidthProps, CompositeAppearanceKey, ElevationProps, FillHoverProps, FillProps, ShapeProps, ShapeStrengthProps, SizeProps, WrapProps } from '@itcase/types-ui';
|
|
3
|
-
import { UseHoldProgressOptions } from 'src/hooks/useHoldProgress';
|
|
4
|
-
import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
|
|
5
3
|
import { IconProps } from 'src/components/Icon/Icon.interface';
|
|
6
4
|
import { LinkWrapperProps } from 'src/components/Link/Link.interface';
|
|
7
5
|
import { LoaderProps } from 'src/components/Loader/Loader.interface';
|
|
8
6
|
import { TextProps } from 'src/components/Text/Text.interface';
|
|
7
|
+
import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
|
|
9
8
|
type ButtonAppearanceProps = {
|
|
10
9
|
align?: AlignProps;
|
|
11
10
|
borderColor?: BorderColorProps;
|
|
@@ -60,7 +59,7 @@ type ButtonAppearanceProps = {
|
|
|
60
59
|
zeroGap?: boolean;
|
|
61
60
|
zeroPadding?: boolean;
|
|
62
61
|
};
|
|
63
|
-
type ButtonProps = ButtonAppearanceProps &
|
|
62
|
+
type ButtonProps = ButtonAppearanceProps & StyleAttributes & {
|
|
64
63
|
after?: string;
|
|
65
64
|
appearance?: CompositeAppearanceKey;
|
|
66
65
|
Badge?: ReactNode;
|
|
@@ -80,7 +79,8 @@ type ButtonProps = ButtonAppearanceProps & Pick<UseHoldProgressOptions, 'onHoldC
|
|
|
80
79
|
labelTextTruncate?: TextProps['textTruncate'];
|
|
81
80
|
labelTextWidth?: TextProps['width'];
|
|
82
81
|
link?: LinkWrapperProps['href'];
|
|
83
|
-
onClick?: () => void;
|
|
82
|
+
onClick?: (event?: MouseEvent) => void;
|
|
83
|
+
onHoldComplete?: () => void;
|
|
84
84
|
onMouseDown?: () => void;
|
|
85
85
|
rel?: LinkWrapperProps['rel'];
|
|
86
86
|
style?: CSSProperties;
|
|
@@ -54,7 +54,7 @@ declare const meta: {
|
|
|
54
54
|
wrap?: import("@itcase/types-ui").WrapProps;
|
|
55
55
|
zeroGap?: boolean;
|
|
56
56
|
zeroPadding?: boolean;
|
|
57
|
-
} &
|
|
57
|
+
} & import("../../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
|
|
58
58
|
after?: string;
|
|
59
59
|
appearance?: import("@itcase/types-ui").CompositeAppearanceKey;
|
|
60
60
|
Badge?: import("react").ReactNode;
|
|
@@ -74,7 +74,8 @@ declare const meta: {
|
|
|
74
74
|
labelTextTruncate?: import("../../Text/Text.interface").TextProps["textTruncate"];
|
|
75
75
|
labelTextWidth?: import("../../Text/Text.interface").TextProps["width"];
|
|
76
76
|
link?: import("../../Link/Link.interface").LinkWrapperProps["href"];
|
|
77
|
-
onClick?: () => void;
|
|
77
|
+
onClick?: (event?: MouseEvent) => void;
|
|
78
|
+
onHoldComplete?: () => void;
|
|
78
79
|
onMouseDown?: () => void;
|
|
79
80
|
rel?: import("../../Link/Link.interface").LinkWrapperProps["rel"];
|
|
80
81
|
style?: import("react").CSSProperties;
|
|
@@ -54,7 +54,7 @@ declare const meta: {
|
|
|
54
54
|
wrap?: import("@itcase/types-ui").WrapProps;
|
|
55
55
|
zeroGap?: boolean;
|
|
56
56
|
zeroPadding?: boolean;
|
|
57
|
-
} &
|
|
57
|
+
} & import("../../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
|
|
58
58
|
after?: string;
|
|
59
59
|
appearance?: import("@itcase/types-ui").CompositeAppearanceKey;
|
|
60
60
|
Badge?: import("react").ReactNode;
|
|
@@ -74,7 +74,8 @@ declare const meta: {
|
|
|
74
74
|
labelTextTruncate?: import("../../Text/Text.interface").TextProps["textTruncate"];
|
|
75
75
|
labelTextWidth?: import("../../Text/Text.interface").TextProps["width"];
|
|
76
76
|
link?: import("../../Link/Link.interface").LinkWrapperProps["href"];
|
|
77
|
-
onClick?: () => void;
|
|
77
|
+
onClick?: (event?: MouseEvent) => void;
|
|
78
|
+
onHoldComplete?: () => void;
|
|
78
79
|
onMouseDown?: () => void;
|
|
79
80
|
rel?: import("../../Link/Link.interface").LinkWrapperProps["rel"];
|
|
80
81
|
style?: import("react").CSSProperties;
|
|
@@ -54,7 +54,7 @@ declare const meta: {
|
|
|
54
54
|
wrap?: import("@itcase/types-ui").WrapProps;
|
|
55
55
|
zeroGap?: boolean;
|
|
56
56
|
zeroPadding?: boolean;
|
|
57
|
-
} &
|
|
57
|
+
} & import("../../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
|
|
58
58
|
after?: string;
|
|
59
59
|
appearance?: import("@itcase/types-ui").CompositeAppearanceKey;
|
|
60
60
|
Badge?: import("react").ReactNode;
|
|
@@ -74,7 +74,8 @@ declare const meta: {
|
|
|
74
74
|
labelTextTruncate?: import("../../Text/Text.interface").TextProps["textTruncate"];
|
|
75
75
|
labelTextWidth?: import("../../Text/Text.interface").TextProps["width"];
|
|
76
76
|
link?: import("../../Link/Link.interface").LinkWrapperProps["href"];
|
|
77
|
-
onClick?: () => void;
|
|
77
|
+
onClick?: (event?: MouseEvent) => void;
|
|
78
|
+
onHoldComplete?: () => void;
|
|
78
79
|
onMouseDown?: () => void;
|
|
79
80
|
rel?: import("../../Link/Link.interface").LinkWrapperProps["rel"];
|
|
80
81
|
style?: import("react").CSSProperties;
|
|
@@ -54,7 +54,7 @@ declare const meta: {
|
|
|
54
54
|
wrap?: import("@itcase/types-ui").WrapProps;
|
|
55
55
|
zeroGap?: boolean;
|
|
56
56
|
zeroPadding?: boolean;
|
|
57
|
-
} &
|
|
57
|
+
} & import("../../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
|
|
58
58
|
after?: string;
|
|
59
59
|
appearance?: import("@itcase/types-ui").CompositeAppearanceKey;
|
|
60
60
|
Badge?: import("react").ReactNode;
|
|
@@ -74,7 +74,8 @@ declare const meta: {
|
|
|
74
74
|
labelTextTruncate?: import("../../Text/Text.interface").TextProps["textTruncate"];
|
|
75
75
|
labelTextWidth?: import("../../Text/Text.interface").TextProps["width"];
|
|
76
76
|
link?: import("../../Link/Link.interface").LinkWrapperProps["href"];
|
|
77
|
-
onClick?: () => void;
|
|
77
|
+
onClick?: (event?: MouseEvent) => void;
|
|
78
|
+
onHoldComplete?: () => void;
|
|
78
79
|
onMouseDown?: () => void;
|
|
79
80
|
rel?: import("../../Link/Link.interface").LinkWrapperProps["rel"];
|
|
80
81
|
style?: import("react").CSSProperties;
|
|
@@ -54,7 +54,7 @@ declare const meta: {
|
|
|
54
54
|
wrap?: import("@itcase/types-ui").WrapProps;
|
|
55
55
|
zeroGap?: boolean;
|
|
56
56
|
zeroPadding?: boolean;
|
|
57
|
-
} &
|
|
57
|
+
} & import("../../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
|
|
58
58
|
after?: string;
|
|
59
59
|
appearance?: import("@itcase/types-ui").CompositeAppearanceKey;
|
|
60
60
|
Badge?: import("react").ReactNode;
|
|
@@ -74,7 +74,8 @@ declare const meta: {
|
|
|
74
74
|
labelTextTruncate?: import("../../Text/Text.interface").TextProps["textTruncate"];
|
|
75
75
|
labelTextWidth?: import("../../Text/Text.interface").TextProps["width"];
|
|
76
76
|
link?: import("../../Link/Link.interface").LinkWrapperProps["href"];
|
|
77
|
-
onClick?: () => void;
|
|
77
|
+
onClick?: (event?: MouseEvent) => void;
|
|
78
|
+
onHoldComplete?: () => void;
|
|
78
79
|
onMouseDown?: () => void;
|
|
79
80
|
rel?: import("../../Link/Link.interface").LinkWrapperProps["rel"];
|
|
80
81
|
style?: import("react").CSSProperties;
|
|
@@ -54,7 +54,7 @@ declare const meta: {
|
|
|
54
54
|
wrap?: import("@itcase/types-ui").WrapProps;
|
|
55
55
|
zeroGap?: boolean;
|
|
56
56
|
zeroPadding?: boolean;
|
|
57
|
-
} &
|
|
57
|
+
} & import("../../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
|
|
58
58
|
after?: string;
|
|
59
59
|
appearance?: import("@itcase/types-ui").CompositeAppearanceKey;
|
|
60
60
|
Badge?: import("react").ReactNode;
|
|
@@ -74,7 +74,8 @@ declare const meta: {
|
|
|
74
74
|
labelTextTruncate?: import("../../Text/Text.interface").TextProps["textTruncate"];
|
|
75
75
|
labelTextWidth?: import("../../Text/Text.interface").TextProps["width"];
|
|
76
76
|
link?: import("../../Link/Link.interface").LinkWrapperProps["href"];
|
|
77
|
-
onClick?: () => void;
|
|
77
|
+
onClick?: (event?: MouseEvent) => void;
|
|
78
|
+
onHoldComplete?: () => void;
|
|
78
79
|
onMouseDown?: () => void;
|
|
79
80
|
rel?: import("../../Link/Link.interface").LinkWrapperProps["rel"];
|
|
80
81
|
style?: import("react").CSSProperties;
|
|
@@ -54,7 +54,7 @@ declare const meta: {
|
|
|
54
54
|
wrap?: import("@itcase/types-ui").WrapProps;
|
|
55
55
|
zeroGap?: boolean;
|
|
56
56
|
zeroPadding?: boolean;
|
|
57
|
-
} &
|
|
57
|
+
} & import("../../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
|
|
58
58
|
after?: string;
|
|
59
59
|
appearance?: import("@itcase/types-ui").CompositeAppearanceKey;
|
|
60
60
|
Badge?: import("react").ReactNode;
|
|
@@ -74,7 +74,8 @@ declare const meta: {
|
|
|
74
74
|
labelTextTruncate?: import("../../Text/Text.interface").TextProps["textTruncate"];
|
|
75
75
|
labelTextWidth?: import("../../Text/Text.interface").TextProps["width"];
|
|
76
76
|
link?: import("../../Link/Link.interface").LinkWrapperProps["href"];
|
|
77
|
-
onClick?: () => void;
|
|
77
|
+
onClick?: (event?: MouseEvent) => void;
|
|
78
|
+
onHoldComplete?: () => void;
|
|
78
79
|
onMouseDown?: () => void;
|
|
79
80
|
rel?: import("../../Link/Link.interface").LinkWrapperProps["rel"];
|
|
80
81
|
style?: import("react").CSSProperties;
|
|
@@ -54,7 +54,7 @@ declare const meta: {
|
|
|
54
54
|
wrap?: import("@itcase/types-ui").WrapProps;
|
|
55
55
|
zeroGap?: boolean;
|
|
56
56
|
zeroPadding?: boolean;
|
|
57
|
-
} &
|
|
57
|
+
} & import("../../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
|
|
58
58
|
after?: string;
|
|
59
59
|
appearance?: import("@itcase/types-ui").CompositeAppearanceKey;
|
|
60
60
|
Badge?: import("react").ReactNode;
|
|
@@ -74,7 +74,8 @@ declare const meta: {
|
|
|
74
74
|
labelTextTruncate?: import("../../Text/Text.interface").TextProps["textTruncate"];
|
|
75
75
|
labelTextWidth?: import("../../Text/Text.interface").TextProps["width"];
|
|
76
76
|
link?: import("../../Link/Link.interface").LinkWrapperProps["href"];
|
|
77
|
-
onClick?: () => void;
|
|
77
|
+
onClick?: (event?: MouseEvent) => void;
|
|
78
|
+
onHoldComplete?: () => void;
|
|
78
79
|
onMouseDown?: () => void;
|
|
79
80
|
rel?: import("../../Link/Link.interface").LinkWrapperProps["rel"];
|
|
80
81
|
style?: import("react").CSSProperties;
|
|
@@ -54,7 +54,7 @@ declare const meta: {
|
|
|
54
54
|
wrap?: import("@itcase/types-ui").WrapProps;
|
|
55
55
|
zeroGap?: boolean;
|
|
56
56
|
zeroPadding?: boolean;
|
|
57
|
-
} &
|
|
57
|
+
} & import("../../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
|
|
58
58
|
after?: string;
|
|
59
59
|
appearance?: import("@itcase/types-ui").CompositeAppearanceKey;
|
|
60
60
|
Badge?: import("react").ReactNode;
|
|
@@ -74,7 +74,8 @@ declare const meta: {
|
|
|
74
74
|
labelTextTruncate?: import("../../Text/Text.interface").TextProps["textTruncate"];
|
|
75
75
|
labelTextWidth?: import("../../Text/Text.interface").TextProps["width"];
|
|
76
76
|
link?: import("../../Link/Link.interface").LinkWrapperProps["href"];
|
|
77
|
-
onClick?: () => void;
|
|
77
|
+
onClick?: (event?: MouseEvent) => void;
|
|
78
|
+
onHoldComplete?: () => void;
|
|
78
79
|
onMouseDown?: () => void;
|
|
79
80
|
rel?: import("../../Link/Link.interface").LinkWrapperProps["rel"];
|
|
80
81
|
style?: import("react").CSSProperties;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { AppearanceKeysDefault, AppearanceShapeKey, AppearanceSizeKey, AppearanceStateKeysDefault, BorderColorHoverProps, BorderColorProps, BorderTypeProps, BorderWidthProps, CompositeAppearanceKey, DirectionProps, FillHoverProps, FillProps, ShapeProps, ShapeStrengthProps } from '@itcase/types-ui';
|
|
2
|
+
import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
|
|
3
|
+
import { ButtonProps } from '../Button/Button.interface';
|
|
4
|
+
import { TextProps } from '../Text/Text.interface';
|
|
5
|
+
type DropzoneAppearanceProps = {
|
|
6
|
+
borderColor?: BorderColorProps;
|
|
7
|
+
borderColorHover?: BorderColorHoverProps;
|
|
8
|
+
borderType?: BorderTypeProps;
|
|
9
|
+
borderWidth?: BorderWidthProps;
|
|
10
|
+
errorMessageTextColor?: TextProps['textColor'];
|
|
11
|
+
errorMessageTextSize?: TextProps['size'];
|
|
12
|
+
errorMessageTextWeight?: TextProps['textWeight'];
|
|
13
|
+
fill?: FillProps;
|
|
14
|
+
fillHover?: FillHoverProps;
|
|
15
|
+
hintDescriptionTextColor?: TextProps['textColor'];
|
|
16
|
+
hintDescriptionTextSize?: TextProps['size'];
|
|
17
|
+
hintDescriptionTextWeight?: TextProps['textWeight'];
|
|
18
|
+
hintDescriptionTextWrap?: TextProps['textWrap'];
|
|
19
|
+
hintTitle?: string;
|
|
20
|
+
hintTitleTextColor?: TextProps['textColor'];
|
|
21
|
+
hintTitleTextSize?: TextProps['size'];
|
|
22
|
+
hintTitleTextWeight?: TextProps['textWeight'];
|
|
23
|
+
hintTitleTextWrap?: TextProps['textWrap'];
|
|
24
|
+
removeThumbAppearance?: ButtonProps['appearance'];
|
|
25
|
+
removeThumbShape?: ButtonProps['shape'];
|
|
26
|
+
removeThumbText?: ButtonProps['label'];
|
|
27
|
+
removeThumbTextColor?: TextProps['textColor'];
|
|
28
|
+
removeThumbTextHoverColor?: TextProps['textColorHover'];
|
|
29
|
+
removeThumbTextWeight?: ButtonProps['labelTextWeight'];
|
|
30
|
+
shape?: ShapeProps;
|
|
31
|
+
shapeStrength?: ShapeStrengthProps;
|
|
32
|
+
size?: AppearanceSizeKey;
|
|
33
|
+
thumbBorderColor?: BorderColorProps;
|
|
34
|
+
thumbBorderColorHover?: BorderColorHoverProps;
|
|
35
|
+
thumbBorderType?: BorderTypeProps;
|
|
36
|
+
thumbBorderWidth?: BorderWidthProps;
|
|
37
|
+
thumbDirection?: DirectionProps;
|
|
38
|
+
thumbNameTextColor?: TextProps['textColor'];
|
|
39
|
+
thumbNameTextSize?: TextProps['size'];
|
|
40
|
+
thumbNameTextWeight?: TextProps['textWeight'];
|
|
41
|
+
thumbNameTextWrap?: TextProps['textWrap'];
|
|
42
|
+
};
|
|
43
|
+
type FileItem = {
|
|
44
|
+
id: string;
|
|
45
|
+
dataURL: string;
|
|
46
|
+
error: string;
|
|
47
|
+
file: null | (File & {
|
|
48
|
+
error?: string;
|
|
49
|
+
});
|
|
50
|
+
image?: string;
|
|
51
|
+
isNew: boolean;
|
|
52
|
+
name: string;
|
|
53
|
+
preview: string;
|
|
54
|
+
};
|
|
55
|
+
type DropzoneProps = DropzoneAppearanceProps & StyleAttributes & {
|
|
56
|
+
appearance?: CompositeAppearanceKey;
|
|
57
|
+
dropzoneProps?: Record<string, unknown>;
|
|
58
|
+
fieldValuesList?: FileItem[] | null;
|
|
59
|
+
fileErrorText?: React.ReactNode;
|
|
60
|
+
hintDescription?: React.ReactNode;
|
|
61
|
+
hintTitle?: React.ReactNode;
|
|
62
|
+
inputName: string;
|
|
63
|
+
isPreviews?: boolean;
|
|
64
|
+
isSkeleton?: boolean;
|
|
65
|
+
maxFiles?: number;
|
|
66
|
+
maxSize?: number;
|
|
67
|
+
onAddFiles?: (newFiles: FileItem[], inputName: string) => void;
|
|
68
|
+
onChangeFiles?: (newFiles: FileItem[]) => void;
|
|
69
|
+
onClickPreview?: (fileItem: FileItem, event: React.MouseEvent<HTMLImageElement, MouseEvent>) => void;
|
|
70
|
+
onDeleteFile?: (deletedFile: FileItem, inputName: string) => void;
|
|
71
|
+
showFilename?: boolean;
|
|
72
|
+
thumbColumn?: number;
|
|
73
|
+
};
|
|
74
|
+
type DropzoneAppearanceKey = AppearanceShapeKey | AppearanceSizeKey | (AppearanceKeysDefault | AppearanceStateKeysDefault);
|
|
75
|
+
type DropzoneAppearance = {
|
|
76
|
+
[key in DropzoneAppearanceKey]?: DropzoneAppearanceProps;
|
|
77
|
+
};
|
|
78
|
+
type DropzoneConfig = {
|
|
79
|
+
appearance: DropzoneAppearance;
|
|
80
|
+
setAppearance: (appearanceConfig: DropzoneAppearance) => void;
|
|
81
|
+
};
|
|
82
|
+
export type { DropzoneAppearance, DropzoneConfig, DropzoneProps, FileItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dropzone } from './Dropzone';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DropzoneProps } from '../Dropzone.interface';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").NamedExoticComponent<DropzoneProps>;
|
|
5
|
+
args: {
|
|
6
|
+
inputName: string;
|
|
7
|
+
};
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export declare const Default: {
|
|
14
|
+
args: {
|
|
15
|
+
appearance: string;
|
|
16
|
+
};
|
|
17
|
+
render: (args: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
};
|
|
19
|
+
export declare const Require: {
|
|
20
|
+
args: {
|
|
21
|
+
appearance: string;
|
|
22
|
+
};
|
|
23
|
+
render: (args: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
};
|
|
25
|
+
export declare const Error: {
|
|
26
|
+
args: {
|
|
27
|
+
appearance: string;
|
|
28
|
+
};
|
|
29
|
+
render: (args: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
};
|
|
31
|
+
export declare const Success: {
|
|
32
|
+
args: {
|
|
33
|
+
appearance: string;
|
|
34
|
+
};
|
|
35
|
+
render: (args: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
};
|
|
37
|
+
export declare const Disabled: {
|
|
38
|
+
args: {
|
|
39
|
+
appearance: string;
|
|
40
|
+
};
|
|
41
|
+
render: (args: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DropzoneProps } from '../Dropzone.interface';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").NamedExoticComponent<DropzoneProps>;
|
|
5
|
+
args: {
|
|
6
|
+
appearance: string;
|
|
7
|
+
inputName: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export declare const Default: {
|
|
12
|
+
render: (args: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
export declare const Skeleton: {
|
|
15
|
+
args: {
|
|
16
|
+
isSkeleton: boolean;
|
|
17
|
+
};
|
|
18
|
+
render: (args: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
|
-
import { AlignmentProps, AlignProps, AppearanceIconSizeKey, AppearanceKeysDefault, AppearanceShapeKey, AppearanceStyleKey, BorderColorHoverProps, BorderColorProps, BorderTypeProps, BorderWidthProps, CenteringProps, CompositeAppearanceDefaultStyleShapeKey, CompositeAppearanceIconKeys, DirectionProps, FillActiveHoverProps, FillActiveProps, FillDisabledProps, FillHoverProps, FillProps, FillSizeProps, IconFillSizeProps, IconSizeProps, ItemFillProps, ShapeProps, ShapeStrengthProps, SizePXProps, TextColorProps, TextSizeProps } from '@itcase/types-ui';
|
|
3
|
-
import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
|
|
2
|
+
import { AlignmentProps, AlignProps, AppearanceIconSizeKey, AppearanceKeysDefault, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, BorderColorHoverProps, BorderColorProps, BorderTypeProps, BorderWidthProps, CenteringProps, CompositeAppearanceDefaultStyleShapeKey, CompositeAppearanceIconKeys, DirectionProps, FillActiveHoverProps, FillActiveProps, FillDisabledProps, FillHoverProps, FillProps, FillSizeProps, IconFillSizeProps, IconSizeProps, ItemFillProps, ShapeProps, ShapeStrengthProps, SizePXProps, TextColorProps, TextSizeProps } from '@itcase/types-ui';
|
|
4
3
|
import { BadgeProps } from 'src/components/Badge/Badge.interface';
|
|
5
4
|
import { LinkWrapperProps } from 'src/components/Link/Link.interface';
|
|
6
5
|
import { TitleProps } from 'src/components/Title/Title.interface';
|
|
7
6
|
import { TooltipProps } from 'src/components/Tooltip/Tooltip.interface';
|
|
7
|
+
import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
|
|
8
8
|
type IconAppearanceProps = {
|
|
9
9
|
alignment?: AlignmentProps;
|
|
10
10
|
badgeAppearance?: BadgeProps['appearance'];
|
|
11
|
+
badgeAppearanceSize?: AppearanceSizeKey;
|
|
11
12
|
badgeShape?: BadgeProps['shape'];
|
|
12
13
|
badgeSize?: BadgeProps['size'];
|
|
13
14
|
badgeTextColor?: BadgeProps['textColor'];
|
|
@@ -22,7 +22,7 @@ type LoaderProps = LoaderAppearanceProps & StyleAttributes & {
|
|
|
22
22
|
shapeStrength?: ShapeStrengthProps;
|
|
23
23
|
style?: CSSProperties;
|
|
24
24
|
text?: string;
|
|
25
|
-
type?: 'circular' | 'dot'
|
|
25
|
+
type?: 'circular' | 'dot';
|
|
26
26
|
};
|
|
27
27
|
type LoaderAppearanceKey = AppearanceKeysDefault | AppearanceShapeKey | AppearanceSizeKey | AppearanceStyleKey;
|
|
28
28
|
type LoaderAppearance = {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Loader } from '../Loader';
|
|
2
|
+
import { LoaderProps } from '../Loader.interface';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Loader;
|
|
6
|
+
args: {
|
|
7
|
+
appearance: string;
|
|
8
|
+
};
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
export declare const Text: {
|
|
15
|
+
args: {
|
|
16
|
+
text: string;
|
|
17
|
+
};
|
|
18
|
+
render: (args: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
};
|
|
20
|
+
export declare const NoText: {
|
|
21
|
+
args: {
|
|
22
|
+
text: string;
|
|
23
|
+
};
|
|
24
|
+
render: (args: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Loader } from '../Loader';
|
|
2
|
+
import { LoaderProps } from '../Loader.interface';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Loader;
|
|
6
|
+
args: {
|
|
7
|
+
appearance: string;
|
|
8
|
+
};
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
export declare const Dot: {
|
|
15
|
+
args: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
render: (args: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
};
|
|
20
|
+
export declare const Circular: {
|
|
21
|
+
args: {
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
render: (args: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DropzoneProps, FileItem } from 'src/components/Dropzone/Dropzone.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Hook for file and state management in "react-dropzone".
|
|
4
|
+
* @param {Array} fieldValuesList - value from "react-final-form"
|
|
5
|
+
* @param {boolean} isPreviews - marker for create previews for files
|
|
6
|
+
* @returns {Object} data with states and functions for working with files
|
|
7
|
+
*/
|
|
8
|
+
declare function useDropzoneFieldFiles(fieldValuesList: DropzoneProps['fieldValuesList'], isPreviews?: boolean): {
|
|
9
|
+
convertValueFilesToDropzoneItems: (currentFilesList: File[] | FileItem[], isSilent?: boolean) => Promise<FileItem[]>;
|
|
10
|
+
fileIsLoading: boolean;
|
|
11
|
+
fileRejectedMessage: string;
|
|
12
|
+
setFileRejectedMessage: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
13
|
+
};
|
|
14
|
+
export { useDropzoneFieldFiles };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.53",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"prepare": "husky",
|
|
79
79
|
"prepack": "NODE_ENV=production npm run build",
|
|
80
80
|
"semantic-release": "semantic-release",
|
|
81
|
-
"typecheck": "tsc --noEmit",
|
|
81
|
+
"typecheck": "tsc --noEmit --pretty",
|
|
82
82
|
"storybook": "rm -rf node_modules/.cache/ && STORYBOOK=true storybook dev -p 6006 --disable-telemetry",
|
|
83
83
|
"build-storybook": "STORYBOOK=true storybook build"
|
|
84
84
|
},
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
"react-dadata": "^2.27.4",
|
|
120
120
|
"react-datepicker": "^9.1.0",
|
|
121
121
|
"react-dom": "^18.3.1",
|
|
122
|
+
"react-dropzone": "^14.4.0",
|
|
122
123
|
"react-indiana-drag-scroll": "^3.0.3-alpha",
|
|
123
124
|
"react-inlinesvg": "^4.2.0",
|
|
124
125
|
"react-modal-sheet": "5.2.1",
|
|
@@ -136,8 +137,8 @@
|
|
|
136
137
|
"devDependencies": {
|
|
137
138
|
"@babel/core": "^7.28.6",
|
|
138
139
|
"@babel/preset-react": "^7.28.5",
|
|
139
|
-
"@commitlint/cli": "^20.
|
|
140
|
-
"@commitlint/config-conventional": "^20.
|
|
140
|
+
"@commitlint/cli": "^20.4.0",
|
|
141
|
+
"@commitlint/config-conventional": "^20.4.0",
|
|
141
142
|
"@itcase/config": "^1.6.45",
|
|
142
143
|
"@itcase/lint": "^1.1.95",
|
|
143
144
|
"@itcase/types-core": "^1.1.30",
|
|
@@ -168,13 +169,13 @@
|
|
|
168
169
|
"husky": "^9.1.7",
|
|
169
170
|
"lint-staged": "^16.2.7",
|
|
170
171
|
"prettier": "^3.8.1",
|
|
171
|
-
"rollup": "4.57.
|
|
172
|
+
"rollup": "4.57.1",
|
|
172
173
|
"rollup-plugin-copy": "^3.5.0",
|
|
173
174
|
"rollup-plugin-dts": "^6.3.0",
|
|
174
175
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
175
176
|
"rollup-preserve-directives": "^1.1.3",
|
|
176
177
|
"semantic-release": "^25.0.2",
|
|
177
|
-
"storybook": "^10.2.
|
|
178
|
+
"storybook": "^10.2.2",
|
|
178
179
|
"stylelint": "^17.0.0",
|
|
179
180
|
"typescript": "^5.9.3"
|
|
180
181
|
}
|