@antscorp/antsomi-ui 1.3.4 → 1.3.5
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/assets/css/main.scss +4 -0
- package/es/components/atoms/Flex/Flex.d.ts +2 -0
- package/es/components/atoms/Flex/Flex.js +1 -0
- package/es/components/atoms/Flex/index.d.ts +1 -0
- package/es/components/atoms/Flex/index.js +1 -0
- package/es/components/atoms/Input/Input.d.ts +11 -3
- package/es/components/atoms/Input/Input.js +3 -0
- package/es/components/atoms/Slider/index.d.ts +2 -1
- package/es/components/atoms/Slider/index.js +9 -16
- package/es/components/atoms/SliderV2/index.d.ts +5 -0
- package/es/components/atoms/SliderV2/index.js +23 -0
- package/es/components/atoms/Spin/Spin.d.ts +2 -1
- package/es/components/atoms/index.d.ts +3 -0
- package/es/components/atoms/index.js +3 -0
- package/es/components/common/ConfigProvider/ConfigProvider.d.ts +1 -0
- package/es/components/common/ConfigProvider/ConfigProvider.js +1 -0
- package/es/components/common/ConfigProvider/GlobalStyle.js +38 -1
- package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
- package/es/components/icons/AudioRecordIcon.d.ts +2 -1
- package/es/components/icons/BugIcon.d.ts +2 -1
- package/es/components/icons/CameraIcon.d.ts +2 -1
- package/es/components/icons/CaptureIcon.d.ts +2 -1
- package/es/components/icons/CheckSlimIcon.d.ts +2 -1
- package/es/components/icons/CloseIcon.d.ts +2 -1
- package/es/components/icons/CommentIcon.d.ts +2 -1
- package/es/components/icons/EventIcon.d.ts +2 -1
- package/es/components/icons/FreeDrawIcon.d.ts +2 -1
- package/es/components/icons/GPTIcon.d.ts +2 -1
- package/es/components/icons/GPTIconV2.d.ts +2 -1
- package/es/components/icons/GPTIconV3.d.ts +2 -1
- package/es/components/icons/HighlightIcon.d.ts +2 -1
- package/es/components/icons/IdeaIcon.d.ts +2 -1
- package/es/components/icons/InvisibleIcon.d.ts +2 -1
- package/es/components/icons/MuteIcon.d.ts +2 -1
- package/es/components/icons/OpenUrlIcon.d.ts +2 -1
- package/es/components/icons/PauseIcon.d.ts +2 -1
- package/es/components/icons/PlaneIcon.d.ts +2 -1
- package/es/components/icons/RequestIcon.d.ts +2 -1
- package/es/components/icons/StopRecordIcon.d.ts +2 -1
- package/es/components/icons/UserIcon.d.ts +2 -1
- package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
- package/es/components/icons/WarningIcon.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +2 -1
- package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
- package/es/components/molecules/Collapse/Collapse.js +9 -0
- package/es/components/molecules/ColorPicker/CustomPicker/index.js +9 -18
- package/es/components/molecules/ColorPicker/CustomPicker/styled.d.ts +5 -1
- package/es/components/molecules/ColorPicker/CustomPicker/styled.js +14 -3
- package/es/components/molecules/ColorPicker/index.js +3 -3
- package/es/components/molecules/ColorSetting/index.js +3 -3
- package/es/components/molecules/FontFamilySelect/constants.d.ts +307 -0
- package/es/components/molecules/FontFamilySelect/constants.js +257 -0
- package/es/components/molecules/FontFamilySelect/index.d.ts +17 -0
- package/es/components/molecules/FontFamilySelect/index.js +53 -0
- package/es/components/molecules/FontSetting/constants.d.ts +3 -0
- package/es/components/molecules/FontSetting/constants.js +22 -0
- package/es/components/molecules/FontSetting/index.d.ts +24 -0
- package/es/components/molecules/FontSetting/index.js +54 -0
- package/es/components/molecules/FontSetting/types.d.ts +22 -0
- package/es/components/molecules/FontSetting/types.js +1 -0
- package/es/components/molecules/FontWeightSelect/constants.d.ts +28 -0
- package/es/components/molecules/FontWeightSelect/constants.js +11 -0
- package/es/components/molecules/FontWeightSelect/index.d.ts +9 -0
- package/es/components/molecules/FontWeightSelect/index.js +39 -0
- package/es/components/molecules/Form/Form.d.ts +1 -0
- package/es/components/molecules/Form/Form.js +1 -0
- package/es/components/molecules/Form/index.d.ts +1 -0
- package/es/components/molecules/Form/index.js +1 -0
- package/es/components/molecules/GradientSetting/index.d.ts +19 -2
- package/es/components/molecules/GradientSetting/index.js +52 -30
- package/es/components/molecules/GradientSetting/styled.d.ts +1 -0
- package/es/components/molecules/GradientSetting/styled.js +59 -0
- package/es/components/molecules/InputNumber/index.js +2 -2
- package/es/components/molecules/Modal/styled.d.ts +1 -1
- package/es/components/molecules/Select/Select.d.ts +3 -0
- package/es/components/molecules/Select/Select.js +23 -2
- package/es/components/molecules/Select/Test.d.ts +2 -1
- package/es/components/molecules/SettingWrapper/index.d.ts +1 -2
- package/es/components/molecules/SettingWrapperPopover/index.d.ts +16 -0
- package/es/components/molecules/SettingWrapperPopover/index.js +17 -0
- package/es/components/molecules/TextDecorationSelect/constants.d.ts +19 -0
- package/es/components/molecules/TextDecorationSelect/constants.js +26 -0
- package/es/components/molecules/TextDecorationSelect/index.d.ts +15 -0
- package/es/components/molecules/TextDecorationSelect/index.js +45 -0
- package/es/components/molecules/TextTransformSelect/constants.d.ts +13 -0
- package/es/components/molecules/TextTransformSelect/constants.js +19 -0
- package/es/components/molecules/TextTransformSelect/index.d.ts +9 -0
- package/es/components/molecules/TextTransformSelect/index.js +39 -0
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +1 -1
- package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -1
- package/es/components/molecules/index.d.ts +8 -0
- package/es/components/molecules/index.js +7 -0
- package/es/constants/storybook.d.ts +2 -1
- package/es/constants/theme.js +25 -3
- package/es/test.d.ts +2 -1
- package/es/test.js +26 -39
- package/package.json +5 -5
- package/dist/0173b5993573afa04880.woff +0 -0
- package/dist/0dfb9214dfd945cd7290.png +0 -1
- package/dist/2883cad25a2b4e87ce5f.eot +0 -0
- package/dist/4f54a37971347e3d7122.png +0 -1
- package/dist/574b7bee0563a9fe9a29.png +0 -1
- package/dist/6b586356e837581204dc.svg +0 -1
- package/dist/72eec5c1c786b45a667f.ttf +0 -0
- package/dist/bc6bf11c6f5e6743aa4c.png +0 -1
- package/dist/dbc405edd6e0806efbc9.svg +0 -1
- package/dist/e32f09119052a55cce3c.png +0 -1
- package/dist/e3851b9384a984c6fdb5.png +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.LICENSE.txt +0 -69
- package/dist/main.css +0 -68
- package/dist/public/icons/2d496b55d85a9545d7311c073af442bb.png +0 -0
- package/dist/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png +0 -0
- package/dist/public/icons/725a52bd91a3ce534b10833df510e5fa.png +0 -0
- package/dist/public/icons/7d037e0b378e87a82804443636cd0e13.svg +0 -346
- package/dist/public/icons/90553767e0a05b9585a54797cfd9ce51.png +0 -0
- package/dist/public/icons/bb64e23a1ff390a416d765ee556096ab.svg +0 -87
- package/dist/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png +0 -0
- package/dist/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png +0 -0
- package/dist/public/icons/placeholder-image.png +0 -0
- package/dist/public/icons/transparent.svg +0 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
13
|
+
import { Select } from '../Select';
|
|
14
|
+
import { OPTION_TEXT_DECORATION } from './constants';
|
|
15
|
+
import { SettingWrapper } from '../SettingWrapper';
|
|
16
|
+
/**
|
|
17
|
+
* Generates a function comment for the given function body.
|
|
18
|
+
*
|
|
19
|
+
* @param {TextDecorationSelectProps} props - the props for the TextDecorationSelect component
|
|
20
|
+
* @return {React.FC<TextDecorationSelectProps>} the TextDecorationSelect component
|
|
21
|
+
*/
|
|
22
|
+
export const TextDecorationSelect = (props) => {
|
|
23
|
+
const { defaultValue, label, value, showOptions, onChange } = props, selectProps = __rest(props, ["defaultValue", "label", "value", "showOptions", "onChange"]);
|
|
24
|
+
const [selected, setSelected] = useState(defaultValue || value);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
setSelected(value === null || value === void 0 ? void 0 : value.toString());
|
|
27
|
+
}, [value]);
|
|
28
|
+
const textDecorationOptions = useMemo(() => {
|
|
29
|
+
let draftFontFamily = [...OPTION_TEXT_DECORATION];
|
|
30
|
+
if (showOptions === null || showOptions === void 0 ? void 0 : showOptions.length) {
|
|
31
|
+
draftFontFamily = OPTION_TEXT_DECORATION.filter(({ label }) => showOptions.some(font => font === label));
|
|
32
|
+
}
|
|
33
|
+
return draftFontFamily;
|
|
34
|
+
}, [showOptions]);
|
|
35
|
+
const handleChange = (value) => {
|
|
36
|
+
if (onChange && typeof onChange === 'function') {
|
|
37
|
+
onChange(value);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return (React.createElement(SettingWrapper, { label: label !== null && label !== void 0 ? label : '', containerStyle: { width: '100%' }, vertical: true },
|
|
41
|
+
React.createElement(Select, Object.assign({ value: selected, options: [...textDecorationOptions], style: { width: '100%' }, onChange: select => {
|
|
42
|
+
setSelected(select);
|
|
43
|
+
handleChange(select);
|
|
44
|
+
}, showSearch: true }, selectProps))));
|
|
45
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const OPTION_TEXT_TRANSFORM: readonly [{
|
|
2
|
+
readonly label: "None";
|
|
3
|
+
readonly value: "none";
|
|
4
|
+
}, {
|
|
5
|
+
readonly label: "Capitalize";
|
|
6
|
+
readonly value: "capitalize";
|
|
7
|
+
}, {
|
|
8
|
+
readonly label: "Uppercase";
|
|
9
|
+
readonly value: "uppercase";
|
|
10
|
+
}, {
|
|
11
|
+
readonly label: "Lowercase";
|
|
12
|
+
readonly value: "lowercase";
|
|
13
|
+
}];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// export const LABEL_TEXT_TRANSFORM = 'None' || 'Capitalize' || 'Uppercase' || 'Lowercase';
|
|
2
|
+
export const OPTION_TEXT_TRANSFORM = [
|
|
3
|
+
{
|
|
4
|
+
label: 'None',
|
|
5
|
+
value: 'none',
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
label: 'Capitalize',
|
|
9
|
+
value: 'capitalize',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
label: 'Uppercase',
|
|
13
|
+
value: 'uppercase',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: 'Lowercase',
|
|
17
|
+
value: 'lowercase',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectProps } from '../Select';
|
|
3
|
+
import { OPTION_TEXT_TRANSFORM } from './constants';
|
|
4
|
+
export type TextTransformSelectProps = Omit<SelectProps, 'onChange'> & {
|
|
5
|
+
label?: string;
|
|
6
|
+
showOptions?: (typeof OPTION_TEXT_TRANSFORM)[number]['label'][];
|
|
7
|
+
onChange?: (textTransform: (typeof OPTION_TEXT_TRANSFORM)[number]['value']) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const TextTransformSelect: React.FC<TextTransformSelectProps>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
13
|
+
import { Select } from '../Select';
|
|
14
|
+
import { SettingWrapper } from '../SettingWrapper';
|
|
15
|
+
import { OPTION_TEXT_TRANSFORM } from './constants';
|
|
16
|
+
export const TextTransformSelect = (props) => {
|
|
17
|
+
const { defaultValue, label, value, showOptions, onChange } = props, selectProps = __rest(props, ["defaultValue", "label", "value", "showOptions", "onChange"]);
|
|
18
|
+
const [selected, setSelected] = useState(defaultValue || value);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
setSelected(value === null || value === void 0 ? void 0 : value.toString());
|
|
21
|
+
}, [value]);
|
|
22
|
+
const textTransformOptions = useMemo(() => {
|
|
23
|
+
let draftFontFamily = [...OPTION_TEXT_TRANSFORM];
|
|
24
|
+
if (showOptions === null || showOptions === void 0 ? void 0 : showOptions.length) {
|
|
25
|
+
draftFontFamily = OPTION_TEXT_TRANSFORM.filter(({ label }) => showOptions.some(font => font === label));
|
|
26
|
+
}
|
|
27
|
+
return draftFontFamily;
|
|
28
|
+
}, [showOptions]);
|
|
29
|
+
const handleChange = (value) => {
|
|
30
|
+
if (onChange && typeof onChange === 'function') {
|
|
31
|
+
onChange(value);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return (React.createElement(SettingWrapper, { label: label !== null && label !== void 0 ? label : '', containerStyle: { width: '100%' }, vertical: true },
|
|
35
|
+
React.createElement(Select, Object.assign({ value: selected, options: [...textTransformOptions], style: { width: '100%' }, onChange: select => {
|
|
36
|
+
setSelected(select);
|
|
37
|
+
handleChange(select);
|
|
38
|
+
}, showSearch: true }, selectProps))));
|
|
39
|
+
};
|
|
@@ -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) => import("react").JSX.Element;
|
|
11
11
|
};
|
|
@@ -25,6 +25,14 @@ export { InputNumberWithUnit } from './InputNumberWithUnit';
|
|
|
25
25
|
export { GradientSetting } from './GradientSetting';
|
|
26
26
|
export { Collapse } from './Collapse';
|
|
27
27
|
export { Drawer } from './Drawer';
|
|
28
|
+
export { SettingWrapperPopover } from './SettingWrapperPopover';
|
|
29
|
+
export { FontWeightSelect } from './FontWeightSelect';
|
|
30
|
+
export { FontFamilySelect } from './FontFamilySelect';
|
|
31
|
+
export { TextDecorationSelect } from './TextDecorationSelect';
|
|
32
|
+
export { TextTransformSelect } from './TextTransformSelect';
|
|
33
|
+
export { FontSetting, FontSettingEdit } from './FontSetting';
|
|
34
|
+
export { Form } from './Form';
|
|
28
35
|
export type { AdvancedPickerProps, TAdvancedPickerOption, TAdvancedRangePickerTimeRange, } from './DatePicker';
|
|
29
36
|
export type { ColorPickerProps } from './ColorPicker';
|
|
30
37
|
export type { AlignEditProps, AlignSettingProps } from './AlignSetting';
|
|
38
|
+
export type { TFontSettingProps, TFontSettingEditProps } from './FontSetting';
|
|
@@ -25,3 +25,10 @@ export { InputNumberWithUnit } from './InputNumberWithUnit';
|
|
|
25
25
|
export { GradientSetting } from './GradientSetting';
|
|
26
26
|
export { Collapse } from './Collapse';
|
|
27
27
|
export { Drawer } from './Drawer';
|
|
28
|
+
export { SettingWrapperPopover } from './SettingWrapperPopover';
|
|
29
|
+
export { FontWeightSelect } from './FontWeightSelect';
|
|
30
|
+
export { FontFamilySelect } from './FontFamilySelect';
|
|
31
|
+
export { TextDecorationSelect } from './TextDecorationSelect';
|
|
32
|
+
export { TextTransformSelect } from './TextTransformSelect';
|
|
33
|
+
export { FontSetting, FontSettingEdit } from './FontSetting';
|
|
34
|
+
export { Form } from './Form';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export declare const TABLE_API_COLUMNS: ({
|
|
2
3
|
title: string;
|
|
3
4
|
dataIndex: string;
|
|
@@ -7,5 +8,5 @@ export declare const TABLE_API_COLUMNS: ({
|
|
|
7
8
|
title: string;
|
|
8
9
|
dataIndex: string;
|
|
9
10
|
key: string;
|
|
10
|
-
render: (text: any) => JSX.Element;
|
|
11
|
+
render: (text: any) => React.JSX.Element;
|
|
11
12
|
})[];
|
package/es/constants/theme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
2
2
|
// Types
|
|
3
3
|
import { theme } from 'antd';
|
|
4
4
|
// Variables
|
|
@@ -64,6 +64,7 @@ export const THEME = {
|
|
|
64
64
|
accent2: '#dddddd',
|
|
65
65
|
accent3: '#d2d2d2',
|
|
66
66
|
accent5: '#999999',
|
|
67
|
+
gray5: '#d9d9d9',
|
|
67
68
|
gold1,
|
|
68
69
|
gold6,
|
|
69
70
|
},
|
|
@@ -128,7 +129,9 @@ THEME.components = {
|
|
|
128
129
|
controlHeight: 31,
|
|
129
130
|
},
|
|
130
131
|
Divider: {
|
|
131
|
-
marginLG:
|
|
132
|
+
marginLG: 15,
|
|
133
|
+
marginXL: 15,
|
|
134
|
+
colorSplit: (_r = THEME.token) === null || _r === void 0 ? void 0 : _r.accent3,
|
|
132
135
|
},
|
|
133
136
|
Checkbox: {
|
|
134
137
|
controlInteractiveSize: 18,
|
|
@@ -141,6 +144,25 @@ THEME.components = {
|
|
|
141
144
|
},
|
|
142
145
|
Tabs: {
|
|
143
146
|
colorPrimary: '#1F5FAC',
|
|
144
|
-
|
|
147
|
+
horizontalItemPadding: '10px 20px',
|
|
148
|
+
horizontalItemGutter: 0,
|
|
149
|
+
lineWidthBold: 3,
|
|
150
|
+
titleFontSize: 14,
|
|
151
|
+
titleFontSizeLG: 14,
|
|
152
|
+
titleFontSizeSM: 14,
|
|
153
|
+
horizontalMargin: '0px',
|
|
154
|
+
},
|
|
155
|
+
Collapse: {
|
|
156
|
+
headerBg: '#FFF',
|
|
157
|
+
borderRadiusLG: 0,
|
|
158
|
+
headerPadding: '15px 10px',
|
|
159
|
+
},
|
|
160
|
+
Switch: {
|
|
161
|
+
colorTextQuaternary: (_s = THEME.token) === null || _s === void 0 ? void 0 : _s.bw0,
|
|
162
|
+
colorTextTertiary: (_t = THEME.token) === null || _t === void 0 ? void 0 : _t.bw0,
|
|
163
|
+
handleSize: 12,
|
|
164
|
+
handleSizeSM: 7,
|
|
165
|
+
trackMinWidth: 30,
|
|
166
|
+
handleBg: (_u = THEME.token) === null || _u === void 0 ? void 0 : _u.colorPrimary,
|
|
145
167
|
},
|
|
146
168
|
};
|
package/es/test.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import '@antscorp/icons/main.css';
|
|
2
3
|
export declare const BACKGROUND_COLOR_STYLE: {
|
|
3
4
|
SOLID: {
|
|
@@ -10,4 +11,4 @@ export declare const BACKGROUND_COLOR_STYLE: {
|
|
|
10
11
|
};
|
|
11
12
|
};
|
|
12
13
|
export declare const customColors: string[];
|
|
13
|
-
export declare const App: () => JSX.Element;
|
|
14
|
+
export declare const App: () => React.JSX.Element;
|
package/es/test.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { createRoot } from 'react-dom/client';
|
|
4
4
|
import '@antscorp/icons/main.css';
|
|
5
|
-
import {
|
|
6
|
-
//
|
|
7
|
-
|
|
5
|
+
import { ConfigProvider, EdgeSetting, GradientSetting, IconSelection, PositionSetting, SettingWrapper,
|
|
6
|
+
// Slider,
|
|
7
|
+
SliderWithInputNumber, Space, UploadImage, } from './components';
|
|
8
|
+
// import { Slider } from 'antd';
|
|
9
|
+
import { Slider } from '@antscorp/antsomi-ui/es/components/atoms/Slider';
|
|
10
|
+
import { Rate } from './components/atoms/Rate';
|
|
8
11
|
export const BACKGROUND_COLOR_STYLE = {
|
|
9
12
|
SOLID: {
|
|
10
13
|
value: 'color',
|
|
@@ -28,7 +31,6 @@ export const customColors = [
|
|
|
28
31
|
'#57b8c2',
|
|
29
32
|
];
|
|
30
33
|
export const App = () => {
|
|
31
|
-
var _a;
|
|
32
34
|
const [state, setState] = useState({
|
|
33
35
|
option: {
|
|
34
36
|
dateType: 'today',
|
|
@@ -97,15 +99,7 @@ export const App = () => {
|
|
|
97
99
|
React.createElement("h2", { style: { textAlign: 'center' } }, "Test component of media template"),
|
|
98
100
|
React.createElement(Space, { size: 20, direction: "vertical" },
|
|
99
101
|
React.createElement(SettingWrapper, { vertical: true, label: "Color Setting" },
|
|
100
|
-
React.createElement(
|
|
101
|
-
React.createElement(SettingWrapper, { vertical: true, label: "Input number with unit" },
|
|
102
|
-
React.createElement(InputNumberWithUnit, { unit: "px", min: 0, max: 2000, value: 700, onChange: value => {
|
|
103
|
-
console.log('onChange:: ', value);
|
|
104
|
-
}, onChangeUnit: unit => {
|
|
105
|
-
console.log('onChangeUnit:: ', unit);
|
|
106
|
-
} })),
|
|
107
|
-
React.createElement(SettingWrapper, { label: "Radio Group" },
|
|
108
|
-
React.createElement(RadioGroup, { options: Object.values(BACKGROUND_COLOR_STYLE), value: radioValue, onChange: e => handleChangeRadio(e) })),
|
|
102
|
+
React.createElement(GradientSetting, null)),
|
|
109
103
|
React.createElement(SliderWithInputNumber, { label: "Size (px)", labelStyling: { marginTop: 10 }, min: 0, max: 100, value: sliderValue, onAfterChange: handleChangeSlider }),
|
|
110
104
|
React.createElement(EdgeSetting, { label: "Notification Spacing", unit: "px", linked: false, values: edge,
|
|
111
105
|
// edgeLabels={[t(translations.column.title), t(translations.row.title)]}
|
|
@@ -140,29 +134,22 @@ export const App = () => {
|
|
|
140
134
|
console.log('onChangeSvg', value);
|
|
141
135
|
} }))))));
|
|
142
136
|
// ------------------------ Media template components test end -------------------------
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
// date: '',
|
|
157
|
-
// calculationDate: 'days',
|
|
158
|
-
// value: 1,
|
|
159
|
-
// calculationType: 'minus',
|
|
160
|
-
// dateType: 'today',
|
|
161
|
-
// },
|
|
162
|
-
// }}
|
|
163
|
-
// />
|
|
164
|
-
// );
|
|
137
|
+
return (React.createElement("div", { style: { width: '500px', margin: '32px' } },
|
|
138
|
+
React.createElement(GradientSetting, { onChange: e => console.log('gradient change') }),
|
|
139
|
+
React.createElement("br", null),
|
|
140
|
+
React.createElement("br", null),
|
|
141
|
+
React.createElement("br", null),
|
|
142
|
+
React.createElement("br", null),
|
|
143
|
+
React.createElement(Slider, { className: "test-classname", min: -10, max: 10, onChange: e => console.log('slider change', e) }),
|
|
144
|
+
React.createElement("br", null),
|
|
145
|
+
React.createElement("br", null),
|
|
146
|
+
React.createElement(Rate, null),
|
|
147
|
+
React.createElement("br", null),
|
|
148
|
+
React.createElement("br", null),
|
|
149
|
+
React.createElement(Slider, { className: "test-classname" })));
|
|
165
150
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
151
|
+
const container = document.getElementById('root');
|
|
152
|
+
const root = createRoot(container);
|
|
153
|
+
root.render(React.createElement(React.StrictMode, null,
|
|
154
|
+
React.createElement(ConfigProvider, { locale: "en" },
|
|
155
|
+
React.createElement(App, null))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antscorp/antsomi-ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "An enterprise-class UI design language and React UI library.",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"dist/*",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@fortawesome/free-solid-svg-icons": "6.1.1",
|
|
67
67
|
"@fortawesome/react-fontawesome": "0.2.0",
|
|
68
68
|
"@tinymce/tinymce-react": "^3.7.0",
|
|
69
|
-
"antd": "
|
|
69
|
+
"antd": "5.12.6",
|
|
70
70
|
"axios": "^1.4.0",
|
|
71
71
|
"babel-plugin-file-loader": "^2.0.0",
|
|
72
72
|
"dayjs": "^1.11.7",
|
|
@@ -74,6 +74,8 @@
|
|
|
74
74
|
"highlight.js": "^11.8.0",
|
|
75
75
|
"html-to-image": "^1.11.11",
|
|
76
76
|
"html2canvas": "^1.4.1",
|
|
77
|
+
"i18next": "21.6.16",
|
|
78
|
+
"i18next-browser-languagedetector": "6.1.2",
|
|
77
79
|
"lodash": "^4.17.21",
|
|
78
80
|
"moment": "2.29.2",
|
|
79
81
|
"qs": "6.10.3",
|
|
@@ -84,9 +86,7 @@
|
|
|
84
86
|
"rehype-highlight": "^6.0.0",
|
|
85
87
|
"remark-gfm": "^3.0.1",
|
|
86
88
|
"ts-dedent": "^2.2.0",
|
|
87
|
-
"tui-image-editor": "^3.15.3"
|
|
88
|
-
"i18next": "21.6.16",
|
|
89
|
-
"i18next-browser-languagedetector": "6.1.2"
|
|
89
|
+
"tui-image-editor": "^3.15.3"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@ant-design/cssinjs": "^1.6.2",
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default __webpack_public_path__ + "/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png";
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default __webpack_public_path__ + "/public/icons/725a52bd91a3ce534b10833df510e5fa.png";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default __webpack_public_path__ + "/public/icons/2d496b55d85a9545d7311c073af442bb.png";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default __webpack_public_path__ + "/public/icons/bb64e23a1ff390a416d765ee556096ab.svg";
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default __webpack_public_path__ + "/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default __webpack_public_path__ + "/public/icons/7d037e0b378e87a82804443636cd0e13.svg";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default __webpack_public_path__ + "/public/icons/90553767e0a05b9585a54797cfd9ce51.png";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default __webpack_public_path__ + "/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png";
|