@antscorp/antsomi-ui 1.3.3-beta.7 → 1.3.3-beta.8

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.
Files changed (38) hide show
  1. package/es/components/atoms/Button/index.d.ts +1 -8
  2. package/es/components/atoms/Flex/Flex.d.ts +2 -0
  3. package/es/components/atoms/Flex/Flex.js +1 -0
  4. package/es/components/atoms/Flex/index.d.ts +1 -0
  5. package/es/components/atoms/Flex/index.js +1 -0
  6. package/es/components/atoms/Input/Input.d.ts +11 -3
  7. package/es/components/atoms/Input/Input.js +3 -0
  8. package/es/components/atoms/Popover/Popover.d.ts +1 -1
  9. package/es/components/atoms/Popover/styled.d.ts +1 -1
  10. package/es/components/atoms/Progress/Progress.d.ts +1 -1
  11. package/es/components/atoms/Radio/index.d.ts +3 -3
  12. package/es/components/atoms/Space/Space.d.ts +1 -1
  13. package/es/components/atoms/Spin/styled.d.ts +1 -1
  14. package/es/components/atoms/Statistic/Statistic.d.ts +1 -4
  15. package/es/components/atoms/index.d.ts +1 -0
  16. package/es/components/atoms/index.js +1 -0
  17. package/es/components/common/ConfigProvider/GlobalStyle.js +38 -1
  18. package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
  19. package/es/components/molecules/Collapse/Collapse.js +9 -0
  20. package/es/components/molecules/ColorSetting/styled.d.ts +1 -8
  21. package/es/components/molecules/Form/Form.d.ts +1 -0
  22. package/es/components/molecules/Form/Form.js +1 -0
  23. package/es/components/molecules/Form/index.d.ts +1 -0
  24. package/es/components/molecules/Form/index.js +1 -0
  25. package/es/components/molecules/IconSelection/styled.d.ts +1 -8
  26. package/es/components/molecules/Modal/Modal.d.ts +2 -2
  27. package/es/components/molecules/Modal/styled.d.ts +1 -1
  28. package/es/components/molecules/Popconfirm/Popconfirm.d.ts +1 -1
  29. package/es/components/molecules/Select/Select.d.ts +6 -4
  30. package/es/components/molecules/Select/Select.js +23 -2
  31. package/es/components/molecules/TreeSelect/TreeSelect.d.ts +3 -4
  32. package/es/components/molecules/index.d.ts +1 -0
  33. package/es/components/molecules/index.js +1 -0
  34. package/es/components/organism/Help/styled.d.ts +6 -16
  35. package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +1 -0
  36. package/es/constants/theme.js +25 -3
  37. package/es/test.js +141 -50
  38. package/package.json +1 -1
@@ -1,11 +1,4 @@
1
1
  /// <reference types="react" />
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>> & {
2
+ export declare const Button: import("react").ForwardRefExoticComponent<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>> & {
10
3
  Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
11
4
  };
@@ -0,0 +1,2 @@
1
+ export { Flex } from 'antd';
2
+ export type { FlexProps } from 'antd';
@@ -0,0 +1 @@
1
+ export { Flex } from 'antd';
@@ -0,0 +1 @@
1
+ export * from './Flex';
@@ -0,0 +1 @@
1
+ export * from './Flex';
@@ -1,5 +1,6 @@
1
+ /// <reference types="hoist-non-react-statics" />
1
2
  import React, { ReactNode } from 'react';
2
- import { InputProps as AntdInputProps } from 'antd';
3
+ import { InputProps as AntdInputProps, Input as AntdInput } from 'antd';
3
4
  export interface InputProps extends AntdInputProps {
4
5
  noborder?: 'true' | 'false' | boolean;
5
6
  debounce?: number;
@@ -11,10 +12,17 @@ export interface InputProps extends AntdInputProps {
11
12
  errorMsg?: string;
12
13
  disableUndo?: boolean;
13
14
  }
14
- export declare const Input: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<AntdInputProps & React.RefAttributes<import("antd").InputRef>> & {
15
+ export declare const Input: string & import("styled-components").StyledComponentBase<React.ForwardRefExoticComponent<AntdInputProps & React.RefAttributes<import("antd").InputRef>> & {
15
16
  Group: React.FC<import("antd/es/input").GroupProps>;
16
17
  Search: React.ForwardRefExoticComponent<import("antd/es/input").SearchProps & React.RefAttributes<import("antd").InputRef>>;
17
18
  TextArea: React.ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & React.RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>;
18
19
  Password: React.ForwardRefExoticComponent<import("antd/es/input").PasswordProps & React.RefAttributes<import("antd").InputRef>>;
19
- }, any, InputProps, never>;
20
+ }, any, InputProps, never> & import("hoist-non-react-statics").NonReactStatics<React.ForwardRefExoticComponent<AntdInputProps & React.RefAttributes<import("antd").InputRef>> & {
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
+ };
20
28
  export declare const TextArea: React.ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & React.RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>;
@@ -13,6 +13,8 @@ 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';
16
18
  // Components
17
19
  import { RequiredLabel, Text } from '@antscorp/antsomi-ui/es/components/atoms';
18
20
  // Utils
@@ -89,4 +91,5 @@ OriginInput.defaultProps = {
89
91
  };
90
92
  export const Input = OriginInput;
91
93
  Input.TextArea = StyledInput.TextArea;
94
+ Input.DefaultInput = AntdInput;
92
95
  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: typeof import("antd/es/popover/PurePanel").default;
3
+ _InternalPanelDoNotUseOrYouWillBeFired: import("react").FC<import("antd/es/popover/PurePanel").PurePanelProps>;
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: typeof import("antd/es/popover/PurePanel").default;
3
+ _InternalPanelDoNotUseOrYouWillBeFired: import("react").FC<import("antd/es/popover/PurePanel").PurePanelProps>;
4
4
  }, any, {}, never>;
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export declare const Progress: import("react").FC<import("antd").ProgressProps>;
2
+ export declare const Progress: import("react").ForwardRefExoticComponent<import("antd").ProgressProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -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<HTMLElement>> & {
2
+ export declare const Radio: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").RadioProps & import("react").RefAttributes<import("rc-checkbox").CheckboxRef>> & {
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<any>>;
4
+ Button: import("react").ForwardRefExoticComponent<import("antd/es/radio/radioButton").RadioButtonProps & import("react").RefAttributes<import("rc-checkbox").CheckboxRef>>;
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<any>>, any, {}, never>;
6
+ export declare const RadioButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/radio/radioButton").RadioButtonProps & import("react").RefAttributes<import("rc-checkbox").CheckboxRef>>, 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.FC<SpaceProps> & {
4
+ export declare const Space: React.ForwardRefExoticComponent<SpaceProps & React.RefAttributes<HTMLDivElement>> & {
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").SpinFCType, any, {}, never>;
1
+ export declare const StyledSpin: import("styled-components").StyledComponent<import("antd/es/spin").SpinType, any, {}, never>;
@@ -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
- };
1
+ export declare const Statistic: import("antd/es/statistic").CompoundedStatistic;
@@ -30,4 +30,5 @@ export { Spin } from './Spin';
30
30
  export { Alert } from './Alert';
31
31
  export { ScrollBox } from './ScrollBox';
32
32
  export { Rate } from './Rate';
33
+ export * from './Flex';
33
34
  export type { SliderProps } from './Slider';
@@ -30,3 +30,4 @@ export { Spin } from './Spin';
30
30
  export { Alert } from './Alert';
31
31
  export { ScrollBox } from './ScrollBox';
32
32
  export { Rate } from './Rate';
33
+ export * from './Flex';
@@ -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, _31, _32, _33;
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,5 +486,42 @@ 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
+
518
+ /* Tabs */
519
+ .antsomi-tabs {
520
+ .antsomi-tabs-tab {
521
+ &.antsomi-tabs-tab-active {
522
+ font-weight: bold;
523
+ }
524
+ }
525
+ }
489
526
  ` }));
490
527
  };
@@ -1,4 +1,4 @@
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>>;
1
+ import React from 'react';
2
+ export declare const Collapse: React.ForwardRefExoticComponent<import("antd").CollapseProps & React.RefAttributes<HTMLDivElement>> & {
3
+ Panel: React.ForwardRefExoticComponent<import("antd").CollapsePanelProps & React.RefAttributes<HTMLDivElement>>;
4
4
  };
@@ -1,2 +1,11 @@
1
+ // Libraries
2
+ import React from 'react';
1
3
  import { Collapse as AntdCollapse } from 'antd';
4
+ // Icons
5
+ import { Icon } from '../../atoms';
2
6
  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,14 +1,7 @@
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<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>> & {
4
+ export declare const ButtonPreset: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>> & {
12
5
  Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
13
6
  }, any, {}, never>;
14
7
  export declare const PresetWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1 @@
1
+ export { Form } from 'antd';
@@ -0,0 +1 @@
1
+ export { Form } from 'antd';
@@ -0,0 +1 @@
1
+ export { Form } from './Form';
@@ -0,0 +1 @@
1
+ export { Form } from './Form';
@@ -2,14 +2,7 @@
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<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>> & {
5
+ export declare const CustomButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>> & {
13
6
  Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
14
7
  }, any, {}, never>;
15
8
  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: React.FC<import("antd/es/modal/PurePanel").PurePanelProps>;
17
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) => React.JSX.Element;
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: React.FC<import("antd/es/modal/PurePanel").PurePanelProps>;
22
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) => React.JSX.Element;
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: import("react").FC<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>;
@@ -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: typeof import("antd/es/popconfirm/PurePanel").default;
3
+ _InternalPanelDoNotUseOrYouWillBeFired: import("react").FC<import("antd/es/popconfirm/PurePanel").PurePanelProps>;
4
4
  };
@@ -1,15 +1,17 @@
1
1
  import { SelectProps as AntdSelectProps } from 'antd';
2
2
  import React from 'react';
3
+ import { TextProps } from '../../atoms/Text';
3
4
  export interface SelectProps extends AntdSelectProps {
5
+ label?: string | React.ReactNode;
6
+ labelProps?: TextProps;
4
7
  }
5
8
  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> & {
6
9
  children?: React.ReactNode;
7
- } & {
8
- ref?: React.Ref<import("antd").RefSelectProps> | undefined;
9
- }) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
10
+ } & React.RefAttributes<import("antd").RefSelectProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
11
+ displayName?: string | undefined;
10
12
  SECRET_COMBOBOX_MODE_DO_NOT_USE: string;
11
13
  Option: import("rc-select/lib/Option").OptionFC;
12
14
  OptGroup: import("rc-select/lib/OptGroup").OptionGroupFC;
13
- _InternalPanelDoNotUseOrYouWillBeFired: any;
15
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) => React.JSX.Element;
14
16
  } & React.FC<SelectProps>;
15
17
  export { Select };
@@ -1,11 +1,26 @@
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
+ };
1
12
  var _a;
2
13
  // Libraries
3
14
  import { Select as AntdSelect } from 'antd';
4
15
  import React from 'react';
16
+ // Components
17
+ import { Flex } from '@antscorp/antsomi-ui/es/components/atoms';
18
+ import { Text } from '../../atoms/Text';
5
19
  // Icons
6
20
  import Icon from '@antscorp/icons';
7
21
  // Constants
8
- import { THEME } from '../../../constants';
22
+ import { THEME } from '@antscorp/antsomi-ui/es/constants';
23
+ // Styled
9
24
  import { StyledTag, TagCloseBtn } from './styled';
10
25
  const tagRender = (props) => {
11
26
  const { label, closable, onClose } = props;
@@ -18,11 +33,17 @@ const tagRender = (props) => {
18
33
  fontSize: 10,
19
34
  } })) }, label));
20
35
  };
21
- const CustomSelect = props => React.createElement(AntdSelect, Object.assign({}, props));
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
+ };
22
42
  const Select = CustomSelect;
23
43
  Select.OptGroup = AntdSelect.OptGroup;
24
44
  Select.Option = AntdSelect.Option;
25
45
  Select.defaultProps = {
46
+ labelProps: { color: '#66666' },
26
47
  suffixIcon: (React.createElement(Icon, { type: "icon-ants-expand-more", style: { fontSize: 16, color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.bw10 } })),
27
48
  tagRender,
28
49
  };
@@ -1,12 +1,11 @@
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
- ref?: import("react").Ref<import("antd").RefSelectProps> | undefined;
6
- }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
4
+ } & import("react").RefAttributes<import("antd").RefSelectProps>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
5
+ displayName?: string | undefined;
7
6
  TreeNode: import("react").FC<import("rc-tree-select/lib/TreeNode").TreeNodeProps>;
8
7
  SHOW_ALL: "SHOW_ALL";
9
8
  SHOW_PARENT: "SHOW_PARENT";
10
9
  SHOW_CHILD: "SHOW_CHILD";
11
- _InternalPanelDoNotUseOrYouWillBeFired: any;
10
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) => React.JSX.Element;
12
11
  };
@@ -31,6 +31,7 @@ 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';
34
35
  export type { AdvancedPickerProps, TAdvancedPickerOption, TAdvancedRangePickerTimeRange, } from './DatePicker';
35
36
  export type { ColorPickerProps } from './ColorPicker';
36
37
  export type { AlignEditProps, AlignSettingProps } from './AlignSetting';
@@ -31,3 +31,4 @@ 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,16 +1,10 @@
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
+ } & {
3
5
  Button: import("react").FC<import("antd/es/dropdown").DropdownButtonProps>;
4
- _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd").DropDownProps) => JSX.Element;
5
6
  }, any, {}, never>;
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>> & {
7
+ export declare const ButtonFeedback: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>> & {
14
8
  Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
15
9
  }, any, {
16
10
  height?: number | undefined;
@@ -21,7 +15,7 @@ export declare const Overlay: import("styled-components").StyledComponent<"div",
21
15
  export declare const Text: import("styled-components").StyledComponent<"span", any, {}, never>;
22
16
  export declare const Label: import("styled-components").StyledComponent<"span", any, {}, never>;
23
17
  export declare const SendFeedback: import("styled-components").StyledComponent<"div", any, {}, never>;
24
- export declare const ControlGroup: import("styled-components").StyledComponent<import("react").FC<import("antd").SpaceProps> & {
18
+ export declare const ControlGroup: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").SpaceProps & import("react").RefAttributes<HTMLDivElement>> & {
25
19
  Compact: import("react").FC<import("antd/es/space/Compact").SpaceCompactProps>;
26
20
  }, any, {}, never>;
27
21
  export declare const ControlLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
@@ -64,15 +58,11 @@ export declare const TitleSearch: import("styled-components").StyledComponent<"s
64
58
  export declare const WrapperSearch: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/input").SearchProps & import("react").RefAttributes<import("antd").InputRef>>, any, {}, never>;
65
59
  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> & {
66
60
  children?: import("react").ReactNode;
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>>) & {
61
+ } & import("react").RefAttributes<import("rc-tree/lib/Tree").default<import("antd").TreeDataNode>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
70
62
  TreeNode: import("react").FC<import("rc-tree").TreeNodeProps<import("antd").TreeDataNode>>;
71
63
  DirectoryTree: (<T_1 extends import("rc-tree").BasicDataNode | import("antd").TreeDataNode = import("antd").TreeDataNode>(props: import("antd/es/tree").DirectoryTreeProps<T_1> & {
72
64
  children?: import("react").ReactNode;
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>>) & {
65
+ } & import("react").RefAttributes<import("rc-tree/lib/Tree").default<import("antd").TreeDataNode>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
76
66
  displayName?: string | undefined;
77
67
  };
78
68
  }, any, {}, never>;
@@ -1,4 +1,5 @@
1
1
  export declare const StyledTable: import("styled-components").StyledComponent<import("antd/es/table/interface").RefTable & {
2
+ displayName?: string | undefined;
2
3
  SELECTION_COLUMN: {};
3
4
  EXPAND_COLUMN: {};
4
5
  SELECTION_ALL: "SELECT_ALL";
@@ -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: 10,
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
- margin: 20,
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.js CHANGED
@@ -2,9 +2,7 @@
2
2
  import React, { useState } from 'react';
3
3
  import { createRoot } from 'react-dom/client';
4
4
  import '@antscorp/icons/main.css';
5
- import { ConfigProvider, EdgeSetting, GradientSetting, IconSelection, PositionSetting, SettingWrapper,
6
- // Slider,
7
- SliderWithInputNumber, Space, UploadImage, } from './components';
5
+ import { ConfigProvider, GradientSetting, Tabs, } from './components';
8
6
  // import { Slider } from 'antd';
9
7
  import { Slider } from '@antscorp/antsomi-ui/es/components/atoms/Slider';
10
8
  import { Rate } from './components/atoms/Rate';
@@ -86,54 +84,147 @@ export const App = () => {
86
84
  // );
87
85
  // ---------------------------- Test Helps End ------------------------------
88
86
  // ------------------------ Media template components test start -------------------------
89
- return (React.createElement(ConfigProvider, null,
90
- React.createElement("div", { style: {
91
- width: 500,
92
- height: 1000,
93
- border: '1px solid black',
94
- margin: '0 auto',
95
- padding: 12,
96
- borderRadius: '10px',
97
- marginTop: 12,
98
- } },
99
- React.createElement("h2", { style: { textAlign: 'center' } }, "Test component of media template"),
100
- React.createElement(Space, { size: 20, direction: "vertical" },
101
- React.createElement(SettingWrapper, { vertical: true, label: "Color Setting" },
102
- React.createElement(GradientSetting, null)),
103
- React.createElement(SliderWithInputNumber, { label: "Size (px)", labelStyling: { marginTop: 10 }, min: 0, max: 100, value: sliderValue, onAfterChange: handleChangeSlider }),
104
- React.createElement(EdgeSetting, { label: "Notification Spacing", unit: "px", linked: false, values: edge,
105
- // edgeLabels={[t(translations.column.title), t(translations.row.title)]}
106
- onChange: ({ values, linked, unit }) => {
107
- setEdge(values);
108
- // onUpdateSettings({
109
- // gapX: values[0] + unit,
110
- // gapY: values[1] + unit,
111
- // gapSuffix: unit,
112
- // linkedGapInput: linked,
113
- // });
114
- } }),
115
- React.createElement(PositionSetting, { settings: { linkedPositionInput: false, positionSuffix: 'px' }, styles: { top: '10px', right: '20px', bottom: '30', left: '40' }, onChange: () => { } })),
116
- React.createElement(Space, { size: 10, direction: "vertical" },
117
- React.createElement(SettingWrapper, { vertical: true, label: "Background Image", containerStyle: { gap: '20px' } },
118
- React.createElement(UploadImage, { domainMedia: "https://sandbox-media-template.antsomi.com", slug: "cdp/api/v1", labelButtonSelect: "Select Toggle from Computor", labelHeadingModal: "Toggle Selection", searchPlaceholder: "Search toggle", paramConfigs: {
119
- token: '5474r2x214z294b423a4y474d4j5q274p4g494f4k5p5',
120
- userId: '1600084695',
121
- accountId: '1600084695',
122
- },
123
- // title="Background Image"
124
- selectedImage: {
125
- url: 'https://th.bing.com/th?id=OSK.8664d1b5838c79a3d74a3e97739978b5&w=148&h=148&c=7&o=6&dpr=2&pid=SANGAM',
126
- }, onChangeImage: image => { }, onRemoveImage: () => {
127
- // onChangeSettings('backgroundImageObj', {
128
- // name: '',
129
- // previewUrl: '',
130
- // });
131
- } })),
132
- React.createElement(SettingWrapper, { vertical: true, label: "Icon" },
133
- React.createElement(IconSelection, { isOpen: false, labelHeadingModal: "Toggle Selection", searchPlaceholder: "Search for toggle...", icon: icon, onChange: handleSetIcon, iconTypes: ['cus', 'font-awesome'], onChangeSvg: value => {
134
- console.log('onChangeSvg', value);
135
- } }))))));
87
+ // return (
88
+ // <ConfigProvider>
89
+ // <div
90
+ // style={{
91
+ // width: 500,
92
+ // height: 1000,
93
+ // border: '1px solid black',
94
+ // margin: '0 auto',
95
+ // padding: 12,
96
+ // borderRadius: '10px',
97
+ // marginTop: 12,
98
+ // }}
99
+ // >
100
+ // <h2 style={{ textAlign: 'center' }}>Test component of media template</h2>
101
+ // <Space size={20} direction="vertical">
102
+ // {/* <SettingWrapper vertical label="Color Setting">
103
+ // <ColorSetting
104
+ // label="Background Color"
105
+ // labelStyling={{ color: THEME.token?.colorIcon }}
106
+ // color={colorSettingState.color}
107
+ // customColors={colorSettingState.customColors}
108
+ // callback={callbackColorSetting}
109
+ // onChange={handleChangeColorSetting}
110
+ // />
111
+ // </SettingWrapper>
112
+ // <SettingWrapper vertical label="Input number with unit">
113
+ // <InputNumberWithUnit
114
+ // unit="px"
115
+ // min={0}
116
+ // max={2000}
117
+ // value={700}
118
+ // onChange={value => {
119
+ // console.log('onChange:: ', value);
120
+ // }}
121
+ // onChangeUnit={unit => {
122
+ // console.log('onChangeUnit:: ', unit);
123
+ // }}
124
+ // />
125
+ // </SettingWrapper>
126
+ // <SettingWrapper label="Radio Group">
127
+ // <RadioGroup
128
+ // options={Object.values(BACKGROUND_COLOR_STYLE)}
129
+ // value={radioValue}
130
+ // onChange={e => handleChangeRadio(e)}
131
+ // />
132
+ // </SettingWrapper> */}
133
+ // <SettingWrapper vertical label="Color Setting">
134
+ // <GradientSetting />
135
+ // </SettingWrapper>
136
+ // <SliderWithInputNumber
137
+ // label="Size (px)"
138
+ // labelStyling={{ marginTop: 10 }}
139
+ // min={0}
140
+ // max={100}
141
+ // value={sliderValue}
142
+ // onAfterChange={handleChangeSlider}
143
+ // />
144
+ // <EdgeSetting
145
+ // label="Notification Spacing"
146
+ // unit="px"
147
+ // linked={false}
148
+ // values={edge}
149
+ // // edgeLabels={[t(translations.column.title), t(translations.row.title)]}
150
+ // onChange={({ values, linked, unit }) => {
151
+ // setEdge(values);
152
+ // // onUpdateSettings({
153
+ // // gapX: values[0] + unit,
154
+ // // gapY: values[1] + unit,
155
+ // // gapSuffix: unit,
156
+ // // linkedGapInput: linked,
157
+ // // });
158
+ // }}
159
+ // />
160
+ // <PositionSetting
161
+ // settings={{ linkedPositionInput: false, positionSuffix: 'px' }}
162
+ // styles={{ top: '10px', right: '20px', bottom: '30', left: '40' }}
163
+ // onChange={() => {}}
164
+ // />
165
+ // </Space>
166
+ // <Space size={10} direction="vertical">
167
+ // <SettingWrapper vertical label="Background Image" containerStyle={{ gap: '20px' }}>
168
+ // <UploadImage
169
+ // domainMedia="https://sandbox-media-template.antsomi.com"
170
+ // slug="cdp/api/v1"
171
+ // labelButtonSelect="Select Toggle from Computor"
172
+ // labelHeadingModal="Toggle Selection"
173
+ // searchPlaceholder="Search toggle"
174
+ // paramConfigs={{
175
+ // token: '5474r2x214z294b423a4y474d4j5q274p4g494f4k5p5',
176
+ // userId: '1600084695',
177
+ // accountId: '1600084695',
178
+ // }}
179
+ // // title="Background Image"
180
+ // selectedImage={{
181
+ // url: 'https://th.bing.com/th?id=OSK.8664d1b5838c79a3d74a3e97739978b5&w=148&h=148&c=7&o=6&dpr=2&pid=SANGAM',
182
+ // }}
183
+ // onChangeImage={image =>
184
+ // // onChangeSettings('backgroundImageObj', {
185
+ // // name: image.name,
186
+ // // previewUrl: image.url,
187
+ // // })
188
+ // {}
189
+ // }
190
+ // onRemoveImage={() => {
191
+ // // onChangeSettings('backgroundImageObj', {
192
+ // // name: '',
193
+ // // previewUrl: '',
194
+ // // });
195
+ // }}
196
+ // />
197
+ // </SettingWrapper>
198
+ // <SettingWrapper vertical label="Icon">
199
+ // <IconSelection
200
+ // isOpen={false}
201
+ // labelHeadingModal="Toggle Selection"
202
+ // searchPlaceholder="Search for toggle..."
203
+ // icon={icon}
204
+ // onChange={handleSetIcon}
205
+ // iconTypes={['cus', 'font-awesome']}
206
+ // onChangeSvg={value => {
207
+ // console.log('onChangeSvg', value);
208
+ // }}
209
+ // />
210
+ // </SettingWrapper>
211
+ // </Space>
212
+ // </div>
213
+ // </ConfigProvider>
214
+ // );
136
215
  // ------------------------ Media template components test end -------------------------
216
+ return (React.createElement(Tabs, { items: [
217
+ {
218
+ key: '1',
219
+ label: 'Tab 1',
220
+ children: React.createElement("div", null, "hello"),
221
+ },
222
+ {
223
+ key: '2',
224
+ label: 'Tab 2',
225
+ children: React.createElement("div", null, "hello 2"),
226
+ },
227
+ ] }));
137
228
  return (React.createElement("div", { style: { width: '500px', margin: '32px' } },
138
229
  React.createElement(GradientSetting, { onChange: e => console.log('gradient change') }),
139
230
  React.createElement("br", null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.3-beta.7",
3
+ "version": "1.3.3-beta.8",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",