@antscorp/antsomi-ui 1.3.3-beta.4 → 1.3.3-beta.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/es/components/atoms/Button/index.d.ts +8 -1
- package/es/components/atoms/Input/Input.d.ts +3 -11
- package/es/components/atoms/Input/Input.js +0 -3
- package/es/components/atoms/Popover/Popover.d.ts +1 -1
- package/es/components/atoms/Popover/styled.d.ts +1 -1
- package/es/components/atoms/Progress/Progress.d.ts +1 -1
- package/es/components/atoms/Radio/index.d.ts +3 -3
- package/es/components/atoms/Space/Space.d.ts +1 -1
- package/es/components/atoms/Spin/styled.d.ts +1 -1
- package/es/components/atoms/Statistic/Statistic.d.ts +4 -1
- package/es/components/atoms/index.d.ts +0 -1
- package/es/components/atoms/index.js +0 -1
- package/es/components/common/ConfigProvider/GlobalStyle.js +1 -29
- package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
- package/es/components/molecules/Collapse/Collapse.js +0 -9
- package/es/components/molecules/ColorSetting/styled.d.ts +8 -1
- 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 +10 -4
- package/es/components/molecules/FontSetting/index.js +36 -35
- package/es/components/molecules/FontSetting/types.d.ts +1 -1
- package/es/components/molecules/IconSelection/styled.d.ts +8 -1
- package/es/components/molecules/Modal/Modal.d.ts +2 -2
- package/es/components/molecules/Modal/styled.d.ts +1 -1
- package/es/components/molecules/Popconfirm/Popconfirm.d.ts +1 -1
- package/es/components/molecules/Select/Select.d.ts +4 -6
- package/es/components/molecules/Select/Select.js +2 -23
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +4 -3
- package/es/components/molecules/index.d.ts +0 -1
- package/es/components/molecules/index.js +0 -1
- package/es/components/organism/Help/styled.d.ts +16 -6
- package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +0 -1
- package/es/constants/theme.js +2 -18
- package/package.json +2 -1
- 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 -69
- 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
- package/es/components/atoms/Flex/Flex.d.ts +0 -2
- package/es/components/atoms/Flex/Flex.js +0 -1
- package/es/components/atoms/Flex/index.d.ts +0 -1
- package/es/components/atoms/Flex/index.js +0 -1
- package/es/components/molecules/Form/Form.d.ts +0 -1
- package/es/components/molecules/Form/Form.js +0 -1
- package/es/components/molecules/Form/index.d.ts +0 -1
- package/es/components/molecules/Form/index.js +0 -1
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Button: import("react").ForwardRefExoticComponent<
|
|
2
|
+
export declare const Button: import("react").ForwardRefExoticComponent<Partial<{
|
|
3
|
+
href: string;
|
|
4
|
+
target?: string | undefined;
|
|
5
|
+
onClick?: import("react").MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
6
|
+
} & import("antd/es/button/button").BaseButtonProps & Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "type" | "onClick"> & {
|
|
7
|
+
htmlType?: "button" | "reset" | "submit" | undefined;
|
|
8
|
+
onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
9
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick">> & import("react").RefAttributes<HTMLElement>> & {
|
|
3
10
|
Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
|
|
4
11
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="hoist-non-react-statics" />
|
|
2
1
|
import React, { ReactNode } from 'react';
|
|
3
|
-
import { InputProps as AntdInputProps
|
|
2
|
+
import { InputProps as AntdInputProps } from 'antd';
|
|
4
3
|
export interface InputProps extends AntdInputProps {
|
|
5
4
|
noborder?: 'true' | 'false' | boolean;
|
|
6
5
|
debounce?: number;
|
|
@@ -12,17 +11,10 @@ export interface InputProps extends AntdInputProps {
|
|
|
12
11
|
errorMsg?: string;
|
|
13
12
|
disableUndo?: boolean;
|
|
14
13
|
}
|
|
15
|
-
export declare const Input:
|
|
14
|
+
export declare const Input: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<AntdInputProps & React.RefAttributes<import("antd").InputRef>> & {
|
|
16
15
|
Group: React.FC<import("antd/es/input").GroupProps>;
|
|
17
16
|
Search: React.ForwardRefExoticComponent<import("antd/es/input").SearchProps & React.RefAttributes<import("antd").InputRef>>;
|
|
18
17
|
TextArea: React.ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & React.RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>;
|
|
19
18
|
Password: React.ForwardRefExoticComponent<import("antd/es/input").PasswordProps & React.RefAttributes<import("antd").InputRef>>;
|
|
20
|
-
}, any, InputProps, never
|
|
21
|
-
Group: React.FC<import("antd/es/input").GroupProps>;
|
|
22
|
-
Search: React.ForwardRefExoticComponent<import("antd/es/input").SearchProps & React.RefAttributes<import("antd").InputRef>>;
|
|
23
|
-
TextArea: React.ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & React.RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>;
|
|
24
|
-
Password: React.ForwardRefExoticComponent<import("antd/es/input").PasswordProps & React.RefAttributes<import("antd").InputRef>>;
|
|
25
|
-
}, {}> & {
|
|
26
|
-
DefaultInput: typeof AntdInput;
|
|
27
|
-
};
|
|
19
|
+
}, any, InputProps, never>;
|
|
28
20
|
export declare const TextArea: React.ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & React.RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>;
|
|
@@ -13,8 +13,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
13
13
|
/* eslint-disable react/destructuring-assignment */
|
|
14
14
|
// Libraries
|
|
15
15
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
16
|
-
// Types
|
|
17
|
-
import { Input as AntdInput } from 'antd';
|
|
18
16
|
// Components
|
|
19
17
|
import { RequiredLabel, Text } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
20
18
|
// Utils
|
|
@@ -91,5 +89,4 @@ OriginInput.defaultProps = {
|
|
|
91
89
|
};
|
|
92
90
|
export const Input = OriginInput;
|
|
93
91
|
Input.TextArea = StyledInput.TextArea;
|
|
94
|
-
Input.DefaultInput = AntdInput;
|
|
95
92
|
export const { TextArea } = StyledInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Popover: import("react").ForwardRefExoticComponent<import("antd").PopoverProps & import("react").RefAttributes<unknown>> & {
|
|
3
|
-
_InternalPanelDoNotUseOrYouWillBeFired: import("
|
|
3
|
+
_InternalPanelDoNotUseOrYouWillBeFired: typeof import("antd/es/popover/PurePanel").default;
|
|
4
4
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const PopoverWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").PopoverProps & import("react").RefAttributes<unknown>> & {
|
|
3
|
-
_InternalPanelDoNotUseOrYouWillBeFired: import("
|
|
3
|
+
_InternalPanelDoNotUseOrYouWillBeFired: typeof import("antd/es/popover/PurePanel").default;
|
|
4
4
|
}, any, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Progress: import("react").
|
|
2
|
+
export declare const Progress: import("react").FC<import("antd").ProgressProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Radio: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").RadioProps & import("react").RefAttributes<
|
|
2
|
+
export declare const Radio: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").RadioProps & import("react").RefAttributes<HTMLElement>> & {
|
|
3
3
|
Group: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("antd").RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
4
|
-
Button: import("react").ForwardRefExoticComponent<import("antd/es/radio/radioButton").RadioButtonProps & import("react").RefAttributes<
|
|
4
|
+
Button: import("react").ForwardRefExoticComponent<import("antd/es/radio/radioButton").RadioButtonProps & import("react").RefAttributes<any>>;
|
|
5
5
|
}, any, {}, never>;
|
|
6
|
-
export declare const RadioButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/radio/radioButton").RadioButtonProps & import("react").RefAttributes<
|
|
6
|
+
export declare const RadioButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/radio/radioButton").RadioButtonProps & import("react").RefAttributes<any>>, any, {}, never>;
|
|
7
7
|
export declare const RadioGroupSub: import("styled-components").StyledComponent<import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("antd").RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>>, any, {}, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SpaceProps } from 'antd';
|
|
3
3
|
export declare const OriginSpace: React.FC<SpaceProps>;
|
|
4
|
-
export declare const Space: React.
|
|
4
|
+
export declare const Space: React.FC<SpaceProps> & {
|
|
5
5
|
Compact: React.FC<import("antd/es/space/Compact").SpaceCompactProps>;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const StyledSpin: import("styled-components").StyledComponent<import("antd/es/spin").
|
|
1
|
+
export declare const StyledSpin: import("styled-components").StyledComponent<import("antd/es/spin").SpinFCType, any, {}, never>;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Statistic: import("react").FC<import("antd").StatisticProps> & {
|
|
3
|
+
Countdown: import("react").NamedExoticComponent<import("antd").CountdownProps>;
|
|
4
|
+
};
|
|
@@ -10,7 +10,7 @@ import { far } from '@fortawesome/free-regular-svg-icons';
|
|
|
10
10
|
import { fab } from '@fortawesome/free-brands-svg-icons';
|
|
11
11
|
library.add(fas, far, fab);
|
|
12
12
|
export const GlobalStyle = () => {
|
|
13
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30
|
|
13
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30;
|
|
14
14
|
return (React.createElement(Global, { styles: css `
|
|
15
15
|
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap');
|
|
16
16
|
|
|
@@ -486,33 +486,5 @@ export const GlobalStyle = () => {
|
|
|
486
486
|
.ant-message {
|
|
487
487
|
z-index: 999999 !important;
|
|
488
488
|
}
|
|
489
|
-
|
|
490
|
-
/* Collapse */
|
|
491
|
-
.antsomi-collapse-header {
|
|
492
|
-
font-size: 14px;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
.antsomi-collapse {
|
|
496
|
-
&.antsomi-collapse-borderless {
|
|
497
|
-
border-bottom: 1px solid ${(_31 = THEME.token) === null || _31 === void 0 ? void 0 : _31.gray5};
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
> .antsomi-collapse-item > .antsomi-collapse-header .antsomi-collapse-arrow {
|
|
501
|
-
transition: all 200ms;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
/* Switch */
|
|
506
|
-
.antsomi-switch {
|
|
507
|
-
border: 2px solid ${(_32 = THEME.token) === null || _32 === void 0 ? void 0 : _32.colorPrimary} !important;
|
|
508
|
-
|
|
509
|
-
&.antsomi-switch-checked {
|
|
510
|
-
> .antsomi-switch-handle {
|
|
511
|
-
&::before {
|
|
512
|
-
background-color: ${(_33 = THEME.token) === null || _33 === void 0 ? void 0 : _33.bw0} !important;
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
489
|
` }));
|
|
518
490
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Collapse:
|
|
3
|
-
Panel:
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Collapse: import("react").ForwardRefExoticComponent<import("antd").CollapseProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
|
+
Panel: import("react").ForwardRefExoticComponent<import("antd").CollapsePanelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
4
|
};
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
// Libraries
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { Collapse as AntdCollapse } from 'antd';
|
|
4
|
-
// Icons
|
|
5
|
-
import { Icon } from '../../atoms';
|
|
6
2
|
export const Collapse = AntdCollapse;
|
|
7
|
-
Collapse.defaultProps = {
|
|
8
|
-
expandIcon({ isActive }) {
|
|
9
|
-
return (React.createElement(Icon, { type: "icon-ants-expand-more", size: 24, style: { transform: `rotate(${isActive ? -180 : 0}deg)`, color: '#666' } }));
|
|
10
|
-
},
|
|
11
|
-
};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const ColorSettingWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const PresetColor: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare const ButtonPreset: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
4
|
+
export declare const ButtonPreset: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Partial<{
|
|
5
|
+
href: string;
|
|
6
|
+
target?: string | undefined;
|
|
7
|
+
onClick?: import("react").MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
8
|
+
} & import("antd/es/button/button").BaseButtonProps & Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "type" | "onClick"> & {
|
|
9
|
+
htmlType?: "button" | "reset" | "submit" | undefined;
|
|
10
|
+
onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
11
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick">> & import("react").RefAttributes<HTMLElement>> & {
|
|
5
12
|
Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
|
|
6
13
|
}, any, {}, never>;
|
|
7
14
|
export declare const PresetWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const FONT_SETTING_DEFAULT = {
|
|
2
|
+
fontColor: '#000000',
|
|
3
|
+
fontFamily: 'Roboto',
|
|
4
|
+
fontItalic: false,
|
|
5
|
+
fontSize: 14,
|
|
6
|
+
fontWeight: '400',
|
|
7
|
+
letterSpacing: 2,
|
|
8
|
+
lineHeight: 1.5,
|
|
9
|
+
textTransform: 'none',
|
|
10
|
+
textDecoration: 'none',
|
|
11
|
+
};
|
|
12
|
+
export const FONT_STYLE_DEFAULT = {
|
|
13
|
+
color: '#000000',
|
|
14
|
+
fontFamily: 'Roboto',
|
|
15
|
+
fontSize: 14,
|
|
16
|
+
fontWeight: '400',
|
|
17
|
+
lineHeight: 1.5,
|
|
18
|
+
letterSpacing: 2,
|
|
19
|
+
textTransform: 'none',
|
|
20
|
+
textDecoration: 'none',
|
|
21
|
+
fontStyle: 'normal',
|
|
22
|
+
};
|
|
@@ -2,17 +2,23 @@ import React from 'react';
|
|
|
2
2
|
import { PopoverProps } from 'antd';
|
|
3
3
|
import { SettingWrapperProps } from '../SettingWrapper';
|
|
4
4
|
import { TFontSettings, TFontStyles } from './types';
|
|
5
|
+
type TFontSettingOptions = 'fontFamily' | 'color' | 'fontSize' | 'fontWeight' | 'textTransform' | 'textDecoration' | 'italic' | 'lineHeight' | 'letterSpacing';
|
|
5
6
|
export type TFontSettingProps = {
|
|
6
7
|
label?: string;
|
|
7
|
-
settings: TFontSettings
|
|
8
|
+
settings: Partial<TFontSettings>;
|
|
9
|
+
styles: Partial<TFontStyles>;
|
|
10
|
+
showSettings?: TFontSettingOptions[];
|
|
8
11
|
wrapperProps?: Omit<SettingWrapperProps, 'label'>;
|
|
9
12
|
popoverProps?: Omit<PopoverProps, 'content'>;
|
|
10
13
|
childrenProps?: Omit<TFontSettingEditProps, 'settings' | 'styles' | 'onChange'>;
|
|
11
|
-
onChange?:
|
|
14
|
+
onChange?: (settings: Partial<TFontSettings>, styles: Partial<TFontStyles>) => void;
|
|
12
15
|
};
|
|
13
16
|
export type TFontSettingEditProps = {
|
|
14
|
-
settings: TFontSettings
|
|
15
|
-
|
|
17
|
+
settings: Partial<TFontSettings>;
|
|
18
|
+
styles: Partial<TFontStyles>;
|
|
19
|
+
showSettings?: TFontSettingOptions[];
|
|
20
|
+
onChange?: (settings: Partial<TFontSettings>, styles: Partial<TFontStyles>) => void;
|
|
16
21
|
};
|
|
17
22
|
export declare const FontSettingEdit: React.FC<TFontSettingEditProps>;
|
|
18
23
|
export declare const FontSetting: React.FC<TFontSettingProps>;
|
|
24
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
/* Components */
|
|
3
3
|
import { Space, Switch } from '../../atoms';
|
|
4
4
|
import { ColorSetting } from '../ColorSetting';
|
|
@@ -9,45 +9,46 @@ import { FontFamilySelect } from '../FontFamilySelect';
|
|
|
9
9
|
import { FontWeightSelect } from '../FontWeightSelect';
|
|
10
10
|
import { TextTransformSelect } from '../TextTransformSelect';
|
|
11
11
|
import { TextDecorationSelect } from '../TextDecorationSelect';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
fontFamily: settings.fontFamily,
|
|
16
|
-
fontColor: settings.fontColor,
|
|
17
|
-
fontSize: settings.fontSize,
|
|
18
|
-
fontWeight: settings.fontWeight,
|
|
19
|
-
lineHeight: settings.lineHeight,
|
|
20
|
-
letterSpacing: settings.letterSpacing,
|
|
21
|
-
textTransform: settings.textTransform,
|
|
22
|
-
textDecoration: settings.textDecoration,
|
|
23
|
-
fontStyle: settings.fontItalic ? 'italic' : 'normal',
|
|
24
|
-
});
|
|
25
|
-
const handleChange = (setting) => {
|
|
12
|
+
import { FONT_SETTING_DEFAULT, FONT_STYLE_DEFAULT } from './constants';
|
|
13
|
+
export const FontSettingEdit = ({ settings, styles, showSettings, onChange, }) => {
|
|
14
|
+
const handleChange = (setting, style) => {
|
|
26
15
|
if (typeof onChange === 'function') {
|
|
27
16
|
const newSettings = Object.assign(Object.assign({}, settings), setting);
|
|
28
|
-
const newStyles =
|
|
17
|
+
const newStyles = Object.assign(Object.assign({}, styles), style);
|
|
29
18
|
onChange(newSettings, newStyles);
|
|
30
19
|
}
|
|
31
20
|
};
|
|
32
|
-
|
|
33
|
-
React.createElement(FontFamilySelect, { label: "Font Family", value: settings === null || settings === void 0 ? void 0 : settings.fontFamily, onChange:
|
|
34
|
-
React.createElement(ColorSetting, { label: "Font Color", color: settings === null || settings === void 0 ? void 0 : settings.fontColor, onChange: fontColor => handleChange({ fontColor }) }),
|
|
35
|
-
React.createElement(SettingWrapper, { label: "Font Size", vertical: true },
|
|
36
|
-
React.createElement(SliderWithInputNumber, { value: typeof (settings === null || settings === void 0 ? void 0 : settings.fontSize) !== 'undefined' ? +settings.fontSize : 0, onAfterChange: fontSize => handleChange({ fontSize }) })),
|
|
37
|
-
React.createElement(FontWeightSelect, { label: "Font Weight", value: settings === null || settings === void 0 ? void 0 : settings.fontWeight,
|
|
38
|
-
React.createElement(SettingWrapper, { label: "Line Height", vertical: true },
|
|
39
|
-
React.createElement(SliderWithInputNumber, { defaultValue: typeof (settings === null || settings === void 0 ? void 0 : settings.lineHeight) !== 'undefined' ? +settings.lineHeight : 0, min: 1, max: 5, step: 0.1, onAfterChange: lineHeight => handleChange({ lineHeight }) })),
|
|
40
|
-
React.createElement(SettingWrapper, { label: "Letter Spacing", vertical: true },
|
|
41
|
-
React.createElement(SliderWithInputNumber, { defaultValue: typeof (settings === null || settings === void 0 ? void 0 : settings.letterSpacing) !== 'undefined' ? +settings.letterSpacing : 0, min: -10, max: 10, onAfterChange: letterSpacing => handleChange({ letterSpacing }) })),
|
|
42
|
-
React.createElement(TextTransformSelect, { label: "Text Transform", value: settings === null || settings === void 0 ? void 0 : settings.textTransform, onChange: textTransform => handleChange({ textTransform }) }),
|
|
43
|
-
React.createElement(TextDecorationSelect, { label: "Text Decoration", value: settings === null || settings === void 0 ? void 0 : settings.textDecoration, onChange: textDecoration => handleChange({ textDecoration }) }),
|
|
44
|
-
React.createElement(SettingWrapper, { label: "Font Style Italic" },
|
|
45
|
-
React.createElement(Switch, { checked: settings === null || settings === void 0 ? void 0 : settings.fontItalic, onChange: fontItalic => handleChange({ fontItalic }) })))
|
|
21
|
+
const settingMap = useMemo(() => ({
|
|
22
|
+
fontFamily: (React.createElement(FontFamilySelect, { label: "Font Family", value: settings === null || settings === void 0 ? void 0 : settings.fontFamily, onChange: fontFamily => handleChange({ fontFamily }, { fontFamily }) })),
|
|
23
|
+
color: (React.createElement(ColorSetting, { label: "Font Color", color: settings === null || settings === void 0 ? void 0 : settings.fontColor, onChange: fontColor => handleChange({ fontColor }, { color: fontColor }) })),
|
|
24
|
+
fontSize: (React.createElement(SettingWrapper, { label: "Font Size", vertical: true },
|
|
25
|
+
React.createElement(SliderWithInputNumber, { value: typeof (settings === null || settings === void 0 ? void 0 : settings.fontSize) !== 'undefined' ? +settings.fontSize : 0, onAfterChange: fontSize => handleChange({ fontSize }, { fontSize }) }))),
|
|
26
|
+
fontWeight: (React.createElement(FontWeightSelect, { label: "Font Weight", value: settings === null || settings === void 0 ? void 0 : settings.fontWeight, onChange: fontWeight => handleChange({ fontWeight }, { fontWeight }) })),
|
|
27
|
+
lineHeight: (React.createElement(SettingWrapper, { label: "Line Height", vertical: true },
|
|
28
|
+
React.createElement(SliderWithInputNumber, { defaultValue: typeof (settings === null || settings === void 0 ? void 0 : settings.lineHeight) !== 'undefined' ? +settings.lineHeight : 0, min: 1, max: 5, step: 0.1, onAfterChange: lineHeight => handleChange({ lineHeight }, { lineHeight }) }))),
|
|
29
|
+
letterSpacing: (React.createElement(SettingWrapper, { label: "Letter Spacing", vertical: true },
|
|
30
|
+
React.createElement(SliderWithInputNumber, { defaultValue: typeof (settings === null || settings === void 0 ? void 0 : settings.letterSpacing) !== 'undefined' ? +settings.letterSpacing : 0, min: -10, max: 10, onAfterChange: letterSpacing => handleChange({ letterSpacing }, { letterSpacing }) }))),
|
|
31
|
+
textTransform: (React.createElement(TextTransformSelect, { label: "Text Transform", value: settings === null || settings === void 0 ? void 0 : settings.textTransform, onChange: textTransform => handleChange({ textTransform }, { textTransform }) })),
|
|
32
|
+
textDecoration: (React.createElement(TextDecorationSelect, { label: "Text Decoration", value: settings === null || settings === void 0 ? void 0 : settings.textDecoration, onChange: textDecoration => handleChange({ textDecoration }, { textDecoration }) })),
|
|
33
|
+
italic: (React.createElement(SettingWrapper, { label: "Font Style Italic" },
|
|
34
|
+
React.createElement(Switch, { checked: settings === null || settings === void 0 ? void 0 : settings.fontItalic, onChange: fontItalic => handleChange({ fontItalic }, { fontStyle: fontItalic ? 'italic' : 'normal' }) }))),
|
|
35
|
+
}),
|
|
36
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
|
+
[settings]);
|
|
38
|
+
const filteredSetting = useMemo(() => {
|
|
39
|
+
if (!showSettings || (showSettings === null || showSettings === void 0 ? void 0 : showSettings.length) === 0) {
|
|
40
|
+
return Object.keys(settingMap).map(keySetting => settingMap[keySetting]);
|
|
41
|
+
}
|
|
42
|
+
return showSettings.map(keySetting => settingMap[keySetting]);
|
|
43
|
+
}, [showSettings, settingMap]);
|
|
44
|
+
return React.createElement(Space, { direction: "vertical" }, filteredSetting);
|
|
46
45
|
};
|
|
47
46
|
export const FontSetting = (props) => {
|
|
48
|
-
const { label, settings, wrapperProps, popoverProps, childrenProps, onChange } = props;
|
|
49
|
-
return (React.createElement(SettingWrapperPopover, { label: label !== null && label !== void 0 ? label : 'Font Settings',
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
const { label, settings, styles, wrapperProps, popoverProps, childrenProps, showSettings, onChange, } = props;
|
|
48
|
+
return (React.createElement(SettingWrapperPopover, { label: label !== null && label !== void 0 ? label : 'Font Settings', popoverProps: Object.assign({ overlayStyle: { top: 0 }, placement: 'bottomRight' }, popoverProps), wrapperProps: Object.assign({ containerStyle: { minWidth: '288px' } }, wrapperProps) },
|
|
49
|
+
React.createElement(FontSettingEdit, Object.assign({ settings: settings, styles: styles, showSettings: showSettings, onChange: onChange }, childrenProps))));
|
|
50
|
+
};
|
|
51
|
+
FontSetting.defaultProps = {
|
|
52
|
+
settings: FONT_SETTING_DEFAULT,
|
|
53
|
+
styles: FONT_STYLE_DEFAULT,
|
|
53
54
|
};
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
export declare const IconSelectionWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const WrapperListRender: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const WrapperListItemRender: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export declare const CustomButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
5
|
+
export declare const CustomButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Partial<{
|
|
6
|
+
href: string;
|
|
7
|
+
target?: string | undefined;
|
|
8
|
+
onClick?: import("react").MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
9
|
+
} & import("antd/es/button/button").BaseButtonProps & Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "type" | "onClick"> & {
|
|
10
|
+
htmlType?: "button" | "reset" | "submit" | undefined;
|
|
11
|
+
onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
12
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick">> & import("react").RefAttributes<HTMLElement>> & {
|
|
6
13
|
Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
|
|
7
14
|
}, any, {}, never>;
|
|
8
15
|
export declare const Overlay: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -14,10 +14,10 @@ export declare const Modal: string & import("styled-components").StyledComponent
|
|
|
14
14
|
useModal: typeof import("antd/es/modal/useModal").default;
|
|
15
15
|
destroyAll: () => void;
|
|
16
16
|
config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
|
|
17
|
-
_InternalPanelDoNotUseOrYouWillBeFired:
|
|
17
|
+
_InternalPanelDoNotUseOrYouWillBeFired: React.FC<import("antd/es/modal/PurePanel").PurePanelProps>;
|
|
18
18
|
}, any, import("./styled").CustomModalProps, never> & import("hoist-non-react-statics").NonReactStatics<React.FC<AntdModalProps> & import("antd/es/modal/confirm").ModalStaticFunctions & {
|
|
19
19
|
useModal: typeof import("antd/es/modal/useModal").default;
|
|
20
20
|
destroyAll: () => void;
|
|
21
21
|
config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
|
|
22
|
-
_InternalPanelDoNotUseOrYouWillBeFired:
|
|
22
|
+
_InternalPanelDoNotUseOrYouWillBeFired: React.FC<import("antd/es/modal/PurePanel").PurePanelProps>;
|
|
23
23
|
}, {}> & React.FC<ModalProps>;
|
|
@@ -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: (
|
|
13
|
+
_InternalPanelDoNotUseOrYouWillBeFired: import("react").FC<import("antd/es/modal/PurePanel").PurePanelProps>;
|
|
14
14
|
}, any, CustomModalProps, never>;
|
|
15
15
|
export declare const WrapperSpin: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Popconfirm: import("react").ForwardRefExoticComponent<import("antd").PopconfirmProps & import("react").RefAttributes<unknown>> & {
|
|
3
|
-
_InternalPanelDoNotUseOrYouWillBeFired: import("
|
|
3
|
+
_InternalPanelDoNotUseOrYouWillBeFired: typeof import("antd/es/popconfirm/PurePanel").default;
|
|
4
4
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { SelectProps as AntdSelectProps } from 'antd';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { TextProps } from '../../atoms/Text';
|
|
4
3
|
export interface SelectProps extends AntdSelectProps {
|
|
5
|
-
label?: string | React.ReactNode;
|
|
6
|
-
labelProps?: TextProps;
|
|
7
4
|
}
|
|
8
5
|
declare const Select: (<ValueType = any, OptionType extends import("rc-select/lib/Select").DefaultOptionType | import("rc-select/lib/Select").BaseOptionType = import("rc-select/lib/Select").DefaultOptionType>(props: AntdSelectProps<ValueType, OptionType> & {
|
|
9
6
|
children?: React.ReactNode;
|
|
10
|
-
} &
|
|
11
|
-
|
|
7
|
+
} & {
|
|
8
|
+
ref?: React.Ref<import("antd").RefSelectProps> | undefined;
|
|
9
|
+
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
12
10
|
SECRET_COMBOBOX_MODE_DO_NOT_USE: string;
|
|
13
11
|
Option: import("rc-select/lib/Option").OptionFC;
|
|
14
12
|
OptGroup: import("rc-select/lib/OptGroup").OptionGroupFC;
|
|
15
|
-
_InternalPanelDoNotUseOrYouWillBeFired:
|
|
13
|
+
_InternalPanelDoNotUseOrYouWillBeFired: any;
|
|
16
14
|
} & React.FC<SelectProps>;
|
|
17
15
|
export { Select };
|
|
@@ -1,26 +1,11 @@
|
|
|
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
1
|
var _a;
|
|
13
2
|
// Libraries
|
|
14
3
|
import { Select as AntdSelect } from 'antd';
|
|
15
4
|
import React from 'react';
|
|
16
|
-
// Components
|
|
17
|
-
import { Flex } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
18
|
-
import { Text } from '../../atoms/Text';
|
|
19
5
|
// Icons
|
|
20
6
|
import Icon from '@antscorp/icons';
|
|
21
7
|
// Constants
|
|
22
|
-
import { THEME } from '
|
|
23
|
-
// Styled
|
|
8
|
+
import { THEME } from '../../../constants';
|
|
24
9
|
import { StyledTag, TagCloseBtn } from './styled';
|
|
25
10
|
const tagRender = (props) => {
|
|
26
11
|
const { label, closable, onClose } = props;
|
|
@@ -33,17 +18,11 @@ const tagRender = (props) => {
|
|
|
33
18
|
fontSize: 10,
|
|
34
19
|
} })) }, label));
|
|
35
20
|
};
|
|
36
|
-
const CustomSelect = props => {
|
|
37
|
-
const { label, labelProps } = props, rest = __rest(props, ["label", "labelProps"]);
|
|
38
|
-
return (React.createElement(Flex, { vertical: true, gap: 4 },
|
|
39
|
-
typeof label === 'string' ? React.createElement(Text, Object.assign({}, labelProps), label) : label,
|
|
40
|
-
React.createElement(AntdSelect, Object.assign({}, rest))));
|
|
41
|
-
};
|
|
21
|
+
const CustomSelect = props => React.createElement(AntdSelect, Object.assign({}, props));
|
|
42
22
|
const Select = CustomSelect;
|
|
43
23
|
Select.OptGroup = AntdSelect.OptGroup;
|
|
44
24
|
Select.Option = AntdSelect.Option;
|
|
45
25
|
Select.defaultProps = {
|
|
46
|
-
labelProps: { color: '#66666' },
|
|
47
26
|
suffixIcon: (React.createElement(Icon, { type: "icon-ants-expand-more", style: { fontSize: 16, color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.bw10 } })),
|
|
48
27
|
tagRender,
|
|
49
28
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const TreeSelect: (<ValueType = any, OptionType extends import("rc-tree-select/lib/TreeSelect").BaseOptionType | import("rc-tree-select/lib/TreeSelect").DefaultOptionType = import("rc-tree-select/lib/TreeSelect").DefaultOptionType>(props: import("antd").TreeSelectProps<ValueType, OptionType> & {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
} &
|
|
5
|
-
|
|
4
|
+
} & {
|
|
5
|
+
ref?: import("react").Ref<import("antd").RefSelectProps> | undefined;
|
|
6
|
+
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
|
|
6
7
|
TreeNode: import("react").FC<import("rc-tree-select/lib/TreeNode").TreeNodeProps>;
|
|
7
8
|
SHOW_ALL: "SHOW_ALL";
|
|
8
9
|
SHOW_PARENT: "SHOW_PARENT";
|
|
9
10
|
SHOW_CHILD: "SHOW_CHILD";
|
|
10
|
-
_InternalPanelDoNotUseOrYouWillBeFired:
|
|
11
|
+
_InternalPanelDoNotUseOrYouWillBeFired: any;
|
|
11
12
|
};
|
|
@@ -31,7 +31,6 @@ export { FontFamilySelect } from './FontFamilySelect';
|
|
|
31
31
|
export { TextDecorationSelect } from './TextDecorationSelect';
|
|
32
32
|
export { TextTransformSelect } from './TextTransformSelect';
|
|
33
33
|
export { FontSetting, FontSettingEdit } from './FontSetting';
|
|
34
|
-
export { Form } from './Form';
|
|
35
34
|
export type { AdvancedPickerProps, TAdvancedPickerOption, TAdvancedRangePickerTimeRange, } from './DatePicker';
|
|
36
35
|
export type { ColorPickerProps } from './ColorPicker';
|
|
37
36
|
export type { AlignEditProps, AlignSettingProps } from './AlignSetting';
|
|
@@ -31,4 +31,3 @@ export { FontFamilySelect } from './FontFamilySelect';
|
|
|
31
31
|
export { TextDecorationSelect } from './TextDecorationSelect';
|
|
32
32
|
export { TextTransformSelect } from './TextTransformSelect';
|
|
33
33
|
export { FontSetting, FontSettingEdit } from './FontSetting';
|
|
34
|
-
export { Form } from './Form';
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const DropDown: import("styled-components").StyledComponent<import("react").FC<import("antd").DropDownProps> & {
|
|
3
|
-
_InternalPanelDoNotUseOrYouWillBeFired: import("react").FC<import("antd").DropDownProps>;
|
|
4
|
-
} & {
|
|
5
3
|
Button: import("react").FC<import("antd/es/dropdown").DropdownButtonProps>;
|
|
4
|
+
_InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd").DropDownProps) => JSX.Element;
|
|
6
5
|
}, any, {}, never>;
|
|
7
|
-
export declare const ButtonFeedback: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
6
|
+
export declare const ButtonFeedback: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Partial<{
|
|
7
|
+
href: string;
|
|
8
|
+
target?: string | undefined;
|
|
9
|
+
onClick?: import("react").MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
10
|
+
} & import("antd/es/button/button").BaseButtonProps & Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "type" | "onClick"> & {
|
|
11
|
+
htmlType?: "button" | "reset" | "submit" | undefined;
|
|
12
|
+
onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
13
|
+
} & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick">> & import("react").RefAttributes<HTMLElement>> & {
|
|
8
14
|
Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
|
|
9
15
|
}, any, {
|
|
10
16
|
height?: number | undefined;
|
|
@@ -15,7 +21,7 @@ export declare const Overlay: import("styled-components").StyledComponent<"div",
|
|
|
15
21
|
export declare const Text: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
16
22
|
export declare const Label: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
17
23
|
export declare const SendFeedback: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
18
|
-
export declare const ControlGroup: import("styled-components").StyledComponent<import("react").
|
|
24
|
+
export declare const ControlGroup: import("styled-components").StyledComponent<import("react").FC<import("antd").SpaceProps> & {
|
|
19
25
|
Compact: import("react").FC<import("antd/es/space/Compact").SpaceCompactProps>;
|
|
20
26
|
}, any, {}, never>;
|
|
21
27
|
export declare const ControlLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
@@ -58,11 +64,15 @@ export declare const TitleSearch: import("styled-components").StyledComponent<"s
|
|
|
58
64
|
export declare const WrapperSearch: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/input").SearchProps & import("react").RefAttributes<import("antd").InputRef>>, any, {}, never>;
|
|
59
65
|
export declare const TreeContent: import("styled-components").StyledComponent<(<T extends import("rc-tree").BasicDataNode | import("antd").TreeDataNode = import("antd").TreeDataNode>(props: import("antd").TreeProps<T> & {
|
|
60
66
|
children?: import("react").ReactNode;
|
|
61
|
-
} &
|
|
67
|
+
} & {
|
|
68
|
+
ref?: import("react").Ref<import("rc-tree/lib/Tree").default<import("antd").TreeDataNode>> | undefined;
|
|
69
|
+
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
|
|
62
70
|
TreeNode: import("react").FC<import("rc-tree").TreeNodeProps<import("antd").TreeDataNode>>;
|
|
63
71
|
DirectoryTree: (<T_1 extends import("rc-tree").BasicDataNode | import("antd").TreeDataNode = import("antd").TreeDataNode>(props: import("antd/es/tree").DirectoryTreeProps<T_1> & {
|
|
64
72
|
children?: import("react").ReactNode;
|
|
65
|
-
} &
|
|
73
|
+
} & {
|
|
74
|
+
ref?: import("react").Ref<import("rc-tree/lib/Tree").default<import("antd").TreeDataNode>> | undefined;
|
|
75
|
+
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
|
|
66
76
|
displayName?: string | undefined;
|
|
67
77
|
};
|
|
68
78
|
}, any, {}, never>;
|