@antscorp/antsomi-ui 1.3.3-beta.11 → 1.3.3-beta.13
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/es/components/atoms/SliderV2/index.d.ts +3 -2
- package/es/components/atoms/SliderV2/index.js +9 -11
- package/es/components/atoms/Spin/Spin.d.ts +1 -2
- package/es/components/icons/ArrowGrowIcon.d.ts +1 -2
- package/es/components/icons/AudioRecordIcon.d.ts +1 -2
- package/es/components/icons/BugIcon.d.ts +1 -2
- package/es/components/icons/CameraIcon.d.ts +1 -2
- package/es/components/icons/CaptureIcon.d.ts +1 -2
- package/es/components/icons/CheckSlimIcon.d.ts +1 -2
- package/es/components/icons/CloseIcon.d.ts +1 -2
- package/es/components/icons/CommentIcon.d.ts +1 -2
- package/es/components/icons/EventIcon.d.ts +1 -2
- package/es/components/icons/FreeDrawIcon.d.ts +1 -2
- package/es/components/icons/GPTIcon.d.ts +1 -2
- package/es/components/icons/GPTIconV2.d.ts +1 -2
- package/es/components/icons/GPTIconV3.d.ts +1 -2
- package/es/components/icons/HighlightIcon.d.ts +1 -2
- package/es/components/icons/IdeaIcon.d.ts +1 -2
- package/es/components/icons/InvisibleIcon.d.ts +1 -2
- package/es/components/icons/MuteIcon.d.ts +1 -2
- package/es/components/icons/OpenUrlIcon.d.ts +1 -2
- package/es/components/icons/PauseIcon.d.ts +1 -2
- package/es/components/icons/PlaneIcon.d.ts +1 -2
- package/es/components/icons/RequestIcon.d.ts +1 -2
- package/es/components/icons/StopRecordIcon.d.ts +1 -2
- package/es/components/icons/UserIcon.d.ts +1 -2
- package/es/components/icons/VerticalDotsIcon.d.ts +1 -2
- package/es/components/icons/WarningIcon.d.ts +1 -2
- package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +1 -2
- package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +1 -2
- package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +1 -2
- package/es/components/molecules/Modal/styled.d.ts +1 -1
- package/es/components/molecules/Select/Test.d.ts +1 -2
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +1 -1
- package/es/components/molecules/UploadImage/MediaIcon.d.ts +1 -2
- package/es/constants/storybook.d.ts +1 -2
- package/es/test.d.ts +1 -2
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SliderRangeProps, SliderSingleProps } from 'antd/es/slider';
|
|
3
|
-
export interface SliderProps
|
|
3
|
+
export interface SliderProps {
|
|
4
|
+
defaultSliderTrack?: boolean;
|
|
4
5
|
}
|
|
5
|
-
export declare const SliderV2: React.FC<SliderProps | SliderRangeProps>;
|
|
6
|
+
export declare const SliderV2: React.FC<(SliderSingleProps & SliderProps) | (SliderRangeProps & SliderProps)>;
|
|
@@ -4,20 +4,18 @@ import React, { useState } from 'react';
|
|
|
4
4
|
import { Slider as AntdSlider } from 'antd';
|
|
5
5
|
// React.FC<SliderProps>
|
|
6
6
|
export const SliderV2 = props => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// const max = props.max || 100;
|
|
11
|
-
const { min, max, onChange, styles, range } = props;
|
|
12
|
-
if (min && max && min < 0 && max > 0 && !range) {
|
|
7
|
+
const { min, max, onChange, styles, range, value, defaultValue, marks, defaultSliderTrack } = props;
|
|
8
|
+
const [valueInternal, setValueInternal] = useState(defaultValue || min || 0);
|
|
9
|
+
if (min && max && min < 0 && max > 0 && !range && !defaultSliderTrack) {
|
|
13
10
|
const sliderWidth = max - min;
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
const calcValue = value || valueInternal;
|
|
12
|
+
const leftTrackPosition = `${(Math.abs(calcValue > 0 ? min : min - calcValue) / sliderWidth) * 100}%`;
|
|
13
|
+
const sliderTrackWidth = `${(Math.abs(calcValue) / sliderWidth) * 100}%`;
|
|
14
|
+
return (React.createElement(AntdSlider, Object.assign({ value: value || valueInternal, onChange: value => {
|
|
15
|
+
setValueInternal(value);
|
|
18
16
|
if (onChange)
|
|
19
17
|
onChange(value);
|
|
20
|
-
}, styles: Object.assign({ track: Object.assign({ left: leftTrackPosition, width: sliderTrackWidth }, styles === null || styles === void 0 ? void 0 : styles.track) }, styles), marks: { 0: ' ' } }, props)));
|
|
18
|
+
}, styles: Object.assign({ track: Object.assign({ left: leftTrackPosition, width: sliderTrackWidth }, styles === null || styles === void 0 ? void 0 : styles.track) }, styles), marks: marks || { 0: ' ' } }, props)));
|
|
21
19
|
}
|
|
22
20
|
return React.createElement(AntdSlider, Object.assign({}, props));
|
|
23
21
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { SpinProps as AntdSpinProps } from 'antd';
|
|
3
2
|
export interface TSpinProps extends AntdSpinProps {
|
|
4
3
|
indicatorSize?: number;
|
|
5
4
|
children?: any;
|
|
6
5
|
}
|
|
7
6
|
export declare const Spin: {
|
|
8
|
-
(props: TSpinProps):
|
|
7
|
+
(props: TSpinProps): JSX.Element;
|
|
9
8
|
defaultProps: {};
|
|
10
9
|
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ArrowGrowIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const ArrowGrowIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const AudioRecordIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const AudioRecordIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const BugIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const BugIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const CameraIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const CameraIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const CaptureIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const CaptureIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const CheckSlimIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const CheckSlimIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const CommentIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const CommentIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const FreeDrawIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const FreeDrawIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const GPTIcon: () => React.JSX.Element;
|
|
1
|
+
export declare const GPTIcon: () => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const GPTIconV2: () => React.JSX.Element;
|
|
1
|
+
export declare const GPTIconV2: () => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const GPTIconV3: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const GPTIconV3: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const HighlightIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const HighlightIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const IdeaIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const IdeaIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const InvisibleIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const InvisibleIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const MuteIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const MuteIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const OpenUrlIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const OpenUrlIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const PauseIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const PauseIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const PlaneIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const PlaneIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const RequestIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const RequestIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const StopRecordIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const StopRecordIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const UserIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const UserIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const VerticalDotsIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const VerticalDotsIcon: (props: any) => JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const WarningIcon: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const WarningIcon: (props: any) => JSX.Element;
|
|
@@ -10,6 +10,6 @@ export declare const StyledModal: import("styled-components").StyledComponent<im
|
|
|
10
10
|
useModal: typeof import("antd/es/modal/useModal").default;
|
|
11
11
|
destroyAll: () => void;
|
|
12
12
|
config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
|
|
13
|
-
_InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) =>
|
|
13
|
+
_InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) => React.JSX.Element;
|
|
14
14
|
}, any, CustomModalProps, never>;
|
|
15
15
|
export declare const WrapperSpin: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -7,5 +7,5 @@ export declare const TreeSelect: (<ValueType = any, OptionType extends import("r
|
|
|
7
7
|
SHOW_ALL: "SHOW_ALL";
|
|
8
8
|
SHOW_PARENT: "SHOW_PARENT";
|
|
9
9
|
SHOW_CHILD: "SHOW_CHILD";
|
|
10
|
-
_InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) =>
|
|
10
|
+
_InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) => React.JSX.Element;
|
|
11
11
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export declare const TABLE_API_COLUMNS: ({
|
|
3
2
|
title: string;
|
|
4
3
|
dataIndex: string;
|
|
@@ -8,5 +7,5 @@ export declare const TABLE_API_COLUMNS: ({
|
|
|
8
7
|
title: string;
|
|
9
8
|
dataIndex: string;
|
|
10
9
|
key: string;
|
|
11
|
-
render: (text: any) =>
|
|
10
|
+
render: (text: any) => JSX.Element;
|
|
12
11
|
})[];
|
package/es/test.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import '@antscorp/icons/main.css';
|
|
3
2
|
export declare const BACKGROUND_COLOR_STYLE: {
|
|
4
3
|
SOLID: {
|
|
@@ -11,4 +10,4 @@ export declare const BACKGROUND_COLOR_STYLE: {
|
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
export declare const customColors: string[];
|
|
14
|
-
export declare const App: () =>
|
|
13
|
+
export declare const App: () => JSX.Element;
|