@antscorp/antsomi-ui 1.3.3 → 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.
Files changed (138) hide show
  1. package/es/assets/css/main.scss +4 -0
  2. package/es/components/atoms/Button/index.d.ts +1 -8
  3. package/es/components/atoms/Flex/Flex.d.ts +2 -0
  4. package/es/components/atoms/Flex/Flex.js +1 -0
  5. package/es/components/atoms/Flex/index.d.ts +1 -0
  6. package/es/components/atoms/Flex/index.js +1 -0
  7. package/es/components/atoms/Input/Input.d.ts +11 -3
  8. package/es/components/atoms/Input/Input.js +3 -0
  9. package/es/components/atoms/Popover/Popover.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/Slider/index.d.ts +2 -1
  13. package/es/components/atoms/Slider/index.js +9 -16
  14. package/es/components/atoms/SliderV2/index.d.ts +5 -0
  15. package/es/components/atoms/SliderV2/index.js +23 -0
  16. package/es/components/atoms/Space/Space.d.ts +1 -1
  17. package/es/components/atoms/Spin/Spin.d.ts +2 -1
  18. package/es/components/atoms/Spin/styled.d.ts +1 -1
  19. package/es/components/atoms/Statistic/Statistic.d.ts +1 -4
  20. package/es/components/atoms/index.d.ts +3 -0
  21. package/es/components/atoms/index.js +3 -0
  22. package/es/components/common/ConfigProvider/ConfigProvider.d.ts +1 -0
  23. package/es/components/common/ConfigProvider/ConfigProvider.js +1 -0
  24. package/es/components/common/ConfigProvider/GlobalStyle.js +38 -1
  25. package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
  26. package/es/components/icons/AudioRecordIcon.d.ts +2 -1
  27. package/es/components/icons/BugIcon.d.ts +2 -1
  28. package/es/components/icons/CameraIcon.d.ts +2 -1
  29. package/es/components/icons/CaptureIcon.d.ts +2 -1
  30. package/es/components/icons/CheckSlimIcon.d.ts +2 -1
  31. package/es/components/icons/CloseIcon.d.ts +2 -1
  32. package/es/components/icons/CommentIcon.d.ts +2 -1
  33. package/es/components/icons/EventIcon.d.ts +2 -1
  34. package/es/components/icons/FreeDrawIcon.d.ts +2 -1
  35. package/es/components/icons/GPTIcon.d.ts +2 -1
  36. package/es/components/icons/GPTIconV2.d.ts +2 -1
  37. package/es/components/icons/GPTIconV3.d.ts +2 -1
  38. package/es/components/icons/HighlightIcon.d.ts +2 -1
  39. package/es/components/icons/IdeaIcon.d.ts +2 -1
  40. package/es/components/icons/InvisibleIcon.d.ts +2 -1
  41. package/es/components/icons/MuteIcon.d.ts +2 -1
  42. package/es/components/icons/OpenUrlIcon.d.ts +2 -1
  43. package/es/components/icons/PauseIcon.d.ts +2 -1
  44. package/es/components/icons/PlaneIcon.d.ts +2 -1
  45. package/es/components/icons/RequestIcon.d.ts +2 -1
  46. package/es/components/icons/StopRecordIcon.d.ts +2 -1
  47. package/es/components/icons/UserIcon.d.ts +2 -1
  48. package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
  49. package/es/components/icons/WarningIcon.d.ts +2 -1
  50. package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +2 -1
  51. package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +2 -1
  52. package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +2 -1
  53. package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
  54. package/es/components/molecules/Collapse/Collapse.js +9 -0
  55. package/es/components/molecules/ColorPicker/CustomPicker/index.js +9 -18
  56. package/es/components/molecules/ColorPicker/CustomPicker/styled.d.ts +5 -1
  57. package/es/components/molecules/ColorPicker/CustomPicker/styled.js +14 -3
  58. package/es/components/molecules/ColorPicker/index.js +3 -3
  59. package/es/components/molecules/ColorSetting/index.js +3 -3
  60. package/es/components/molecules/ColorSetting/styled.d.ts +1 -8
  61. package/es/components/molecules/FontFamilySelect/constants.d.ts +307 -0
  62. package/es/components/molecules/FontFamilySelect/constants.js +257 -0
  63. package/es/components/molecules/FontFamilySelect/index.d.ts +17 -0
  64. package/es/components/molecules/FontFamilySelect/index.js +53 -0
  65. package/es/components/molecules/FontSetting/constants.d.ts +3 -0
  66. package/es/components/molecules/FontSetting/constants.js +22 -0
  67. package/es/components/molecules/FontSetting/index.d.ts +24 -0
  68. package/es/components/molecules/FontSetting/index.js +54 -0
  69. package/es/components/molecules/FontSetting/types.d.ts +22 -0
  70. package/es/components/molecules/FontSetting/types.js +1 -0
  71. package/es/components/molecules/FontWeightSelect/constants.d.ts +28 -0
  72. package/es/components/molecules/FontWeightSelect/constants.js +11 -0
  73. package/es/components/molecules/FontWeightSelect/index.d.ts +9 -0
  74. package/es/components/molecules/FontWeightSelect/index.js +39 -0
  75. package/es/components/molecules/Form/Form.d.ts +1 -0
  76. package/es/components/molecules/Form/Form.js +1 -0
  77. package/es/components/molecules/Form/index.d.ts +1 -0
  78. package/es/components/molecules/Form/index.js +1 -0
  79. package/es/components/molecules/GradientSetting/index.d.ts +19 -2
  80. package/es/components/molecules/GradientSetting/index.js +52 -30
  81. package/es/components/molecules/GradientSetting/styled.d.ts +1 -0
  82. package/es/components/molecules/GradientSetting/styled.js +59 -0
  83. package/es/components/molecules/IconSelection/styled.d.ts +1 -8
  84. package/es/components/molecules/InputNumber/index.js +2 -2
  85. package/es/components/molecules/Modal/Modal.d.ts +2 -2
  86. package/es/components/molecules/Modal/styled.d.ts +1 -1
  87. package/es/components/molecules/Popconfirm/Popconfirm.d.ts +1 -1
  88. package/es/components/molecules/Select/Select.d.ts +6 -4
  89. package/es/components/molecules/Select/Select.js +23 -2
  90. package/es/components/molecules/Select/Test.d.ts +2 -1
  91. package/es/components/molecules/SettingWrapper/index.d.ts +1 -2
  92. package/es/components/molecules/SettingWrapperPopover/index.d.ts +16 -0
  93. package/es/components/molecules/SettingWrapperPopover/index.js +17 -0
  94. package/es/components/molecules/TextDecorationSelect/constants.d.ts +19 -0
  95. package/es/components/molecules/TextDecorationSelect/constants.js +26 -0
  96. package/es/components/molecules/TextDecorationSelect/index.d.ts +15 -0
  97. package/es/components/molecules/TextDecorationSelect/index.js +45 -0
  98. package/es/components/molecules/TextTransformSelect/constants.d.ts +13 -0
  99. package/es/components/molecules/TextTransformSelect/constants.js +19 -0
  100. package/es/components/molecules/TextTransformSelect/index.d.ts +9 -0
  101. package/es/components/molecules/TextTransformSelect/index.js +39 -0
  102. package/es/components/molecules/TreeSelect/TreeSelect.d.ts +3 -4
  103. package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -1
  104. package/es/components/molecules/index.d.ts +8 -0
  105. package/es/components/molecules/index.js +7 -0
  106. package/es/components/organism/Help/styled.d.ts +6 -16
  107. package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +1 -0
  108. package/es/constants/storybook.d.ts +2 -1
  109. package/es/constants/theme.js +25 -3
  110. package/es/test.d.ts +2 -1
  111. package/es/test.js +26 -39
  112. package/package.json +6 -5
  113. package/dist/0173b5993573afa04880.woff +0 -0
  114. package/dist/0dfb9214dfd945cd7290.png +0 -1
  115. package/dist/2883cad25a2b4e87ce5f.eot +0 -0
  116. package/dist/4f54a37971347e3d7122.png +0 -1
  117. package/dist/574b7bee0563a9fe9a29.png +0 -1
  118. package/dist/6b586356e837581204dc.svg +0 -1
  119. package/dist/72eec5c1c786b45a667f.ttf +0 -0
  120. package/dist/bc6bf11c6f5e6743aa4c.png +0 -1
  121. package/dist/dbc405edd6e0806efbc9.svg +0 -1
  122. package/dist/e32f09119052a55cce3c.png +0 -1
  123. package/dist/e3851b9384a984c6fdb5.png +0 -1
  124. package/dist/index.js +0 -2
  125. package/dist/index.js.LICENSE.txt +0 -69
  126. package/dist/main.css +0 -68
  127. package/dist/public/icons/2d496b55d85a9545d7311c073af442bb.png +0 -0
  128. package/dist/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png +0 -0
  129. package/dist/public/icons/725a52bd91a3ce534b10833df510e5fa.png +0 -0
  130. package/dist/public/icons/7d037e0b378e87a82804443636cd0e13.svg +0 -346
  131. package/dist/public/icons/90553767e0a05b9585a54797cfd9ce51.png +0 -0
  132. package/dist/public/icons/bb64e23a1ff390a416d765ee556096ab.svg +0 -87
  133. package/dist/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png +0 -0
  134. package/dist/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png +0 -0
  135. package/dist/public/icons/placeholder-image.png +0 -0
  136. package/dist/public/icons/transparent.svg +0 -1
  137. package/es/components/atoms/Popover/styled.d.ts +0 -4
  138. package/es/components/atoms/Popover/styled.js +0 -5
@@ -0,0 +1,4 @@
1
+ :root {
2
+ --primary-color: #005fb8;
3
+ --text-base-color: #222222;
4
+ }
@@ -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,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,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { SliderRangeProps, SliderSingleProps } from 'antd/es/slider';
3
- export interface SliderProps extends SliderSingleProps {
3
+ export interface SliderProps extends Omit<SliderSingleProps, 'tooltipVisible'> {
4
+ tooltipVisible?: boolean | 'default';
4
5
  }
5
6
  export declare const Slider: React.FC<SliderProps | SliderRangeProps>;
@@ -1,30 +1,23 @@
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
  // Libraries
13
2
  import React, { memo, useMemo } from 'react';
14
3
  // Antd Components
15
4
  import { Slider as AntdSlider } from 'antd';
16
5
  // Styled
17
6
  import { SliderWrapper } from './styled';
7
+ import { omit } from 'lodash';
18
8
  export const Slider = memo(props => {
19
- const { range, value, min = 0, max = 0 } = props, restOf = __rest(props, ["range", "value", "min", "max"]);
9
+ const { range, value, min = 0, max = 0, className, tooltipVisible } = props;
20
10
  const isNegative = useMemo(() => !!(!range && min < 0), [range, min]);
21
11
  const calculateWidth = useMemo(() => ((value || 0) * 100) / (Math.abs(max) + Math.abs(min) || 1), [min, max, value]);
12
+ const restProps = tooltipVisible === 'default' ? omit(props, ['tooltipVisible']) : props;
22
13
  if (isNegative) {
23
- return (React.createElement(SliderWrapper, { isNegative: true, width: calculateWidth },
24
- React.createElement(AntdSlider, Object.assign({ min: min, max: max, value: value }, restOf, { marks: { 0: ' ' } }))));
14
+ return (React.createElement(SliderWrapper, { isNegative: true, width: calculateWidth, className: className },
15
+ React.createElement(AntdSlider, Object.assign({}, omit(restProps, ['marks', 'className']), { marks: {
16
+ 0: ' ',
17
+ } }))));
25
18
  }
26
- return (React.createElement(SliderWrapper, null,
27
- React.createElement(AntdSlider, Object.assign({}, props))));
19
+ return (React.createElement(SliderWrapper, { className: className },
20
+ React.createElement(AntdSlider, Object.assign({}, restProps))));
28
21
  });
29
22
  Slider.defaultProps = {
30
23
  tooltipVisible: false,
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { SliderRangeProps, SliderSingleProps } from 'antd/es/slider';
3
+ export interface SliderProps extends SliderSingleProps {
4
+ }
5
+ export declare const SliderV2: React.FC<SliderProps | SliderRangeProps>;
@@ -0,0 +1,23 @@
1
+ // Libraries
2
+ import React, { useState } from 'react';
3
+ // Antd Components
4
+ import { Slider as AntdSlider } from 'antd';
5
+ // React.FC<SliderProps>
6
+ export const SliderV2 = props => {
7
+ const [value, setValue] = useState(0);
8
+ // console.log('sliderRef:: ', sliderRef);
9
+ // const min = props.min || 0;
10
+ // const max = props.max || 100;
11
+ const { min, max, onChange, styles, range } = props;
12
+ if (min && max && min < 0 && max > 0 && !range) {
13
+ const sliderWidth = max - min;
14
+ const leftTrackPosition = `${(Math.abs(value > 0 ? min : min - value) / sliderWidth) * 100}%`;
15
+ const sliderTrackWidth = `${(Math.abs(value) / sliderWidth) * 100}%`;
16
+ return (React.createElement(AntdSlider, Object.assign({ value: value, onChange: value => {
17
+ setValue(value);
18
+ if (onChange)
19
+ onChange(value);
20
+ }, styles: Object.assign({ track: Object.assign({ left: leftTrackPosition, width: sliderTrackWidth }, styles === null || styles === void 0 ? void 0 : styles.track) }, styles), marks: { 0: ' ' } }, props)));
21
+ }
22
+ return React.createElement(AntdSlider, Object.assign({}, props));
23
+ };
@@ -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,9 +1,10 @@
1
+ import React from 'react';
1
2
  import { SpinProps as AntdSpinProps } from 'antd';
2
3
  export interface TSpinProps extends AntdSpinProps {
3
4
  indicatorSize?: number;
4
5
  children?: any;
5
6
  }
6
7
  export declare const Spin: {
7
- (props: TSpinProps): JSX.Element;
8
+ (props: TSpinProps): React.JSX.Element;
8
9
  defaultProps: {};
9
10
  };
@@ -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;
@@ -29,4 +29,7 @@ export { Slider } from './Slider';
29
29
  export { Spin } from './Spin';
30
30
  export { Alert } from './Alert';
31
31
  export { ScrollBox } from './ScrollBox';
32
+ export { Rate } from './Rate';
33
+ export { SliderV2 } from './SliderV2';
34
+ export * from './Flex';
32
35
  export type { SliderProps } from './Slider';
@@ -29,3 +29,6 @@ export { Slider } from './Slider';
29
29
  export { Spin } from './Spin';
30
30
  export { Alert } from './Alert';
31
31
  export { ScrollBox } from './ScrollBox';
32
+ export { Rate } from './Rate';
33
+ export { SliderV2 } from './SliderV2';
34
+ export * from './Flex';
@@ -1,5 +1,6 @@
1
1
  import { ConfigProviderProps as AntdConfigProviderProps } from 'antd/es/config-provider';
2
2
  import React, { ReactNode } from 'react';
3
+ import '@antscorp/antsomi-ui/es/assets/css/main.scss';
3
4
  import { TLocale } from '@antscorp/antsomi-ui/es/types';
4
5
  interface ConfigProviderProps extends Omit<AntdConfigProviderProps, 'locale'> {
5
6
  children?: ReactNode;
@@ -17,6 +17,7 @@ import React, { useEffect } from 'react';
17
17
  import { THEME } from '@antscorp/antsomi-ui/es/constants';
18
18
  // Style
19
19
  import { GlobalStyle } from './GlobalStyle';
20
+ import '@antscorp/antsomi-ui/es/assets/css/main.scss';
20
21
  // Initialize languages
21
22
  // import '@antscorp/antsomi-ui/es/locales/i18n';
22
23
  import i18next from '@antscorp/antsomi-ui/es/locales/i18n';
@@ -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 +1,2 @@
1
- export declare const ArrowGrowIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const ArrowGrowIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const AudioRecordIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const AudioRecordIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const BugIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const BugIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const CameraIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const CameraIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const CaptureIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const CaptureIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const CheckSlimIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const CheckSlimIcon: (props: any) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  export declare const CloseIcon: ({ ...props }: {
2
3
  [x: string]: any;
3
- }) => JSX.Element;
4
+ }) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const CommentIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const CommentIcon: (props: any) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  export declare const EventIcon: ({ ...props }: {
2
3
  [x: string]: any;
3
- }) => JSX.Element;
4
+ }) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const FreeDrawIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const FreeDrawIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const GPTIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const GPTIcon: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const GPTIconV2: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const GPTIconV2: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const GPTIconV3: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const GPTIconV3: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const HighlightIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const HighlightIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const IdeaIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const IdeaIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const InvisibleIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const InvisibleIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const MuteIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const MuteIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const OpenUrlIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const OpenUrlIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const PauseIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const PauseIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const PlaneIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const PlaneIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const RequestIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const RequestIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const StopRecordIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const StopRecordIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const UserIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const UserIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const VerticalDotsIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const VerticalDotsIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const WarningIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const WarningIcon: (props: any) => React.JSX.Element;
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  import { IImageEditorProps } from './types';
2
3
  declare const CaptureScreen: {
3
- (props: IImageEditorProps): JSX.Element;
4
+ (props: IImageEditorProps): React.JSX.Element;
4
5
  defaultProps: {
5
6
  isOpen: boolean;
6
7
  src: string;
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  import { CommentBoxProps } from './types';
2
3
  declare const CommentBox: {
3
- (props: CommentBoxProps): JSX.Element;
4
+ (props: CommentBoxProps): React.JSX.Element;
4
5
  defaultProps: {
5
6
  info: {
6
7
  id: string;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { CursorProps } from './types';
2
- declare const Cursor: (props: CursorProps) => JSX.Element | null;
3
+ declare const Cursor: (props: CursorProps) => React.JSX.Element | null;
3
4
  export { Cursor };
@@ -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
+ };
@@ -16,10 +16,8 @@ import { CustomPicker as CustomPickerHOC } from 'react-color';
16
16
  import { Saturation, Hue, Alpha, EditableInput } from 'react-color/lib/components/common';
17
17
  // Atoms
18
18
  import { Button, Divider, Icon, Text } from '@antscorp/antsomi-ui/es/components/atoms';
19
- // Molecules
20
- import { InputNumber } from '../../InputNumber';
21
19
  // Styled
22
- import { CustomPickerWrapper, HuePointer, PreviewColorPoint, SaturationPointer, EditableInputWrapper, } from './styled';
20
+ import { CustomPickerWrapper, HuePointer, PreviewColorPoint, SaturationPointer, EditableInputWrapper, InputNumberWrapper, } from './styled';
23
21
  // Utils
24
22
  import { handleError } from '@antscorp/antsomi-ui/es/utils';
25
23
  const PATH = '@antscorp/antsomi-ui/es/components/molecules/ColorPicker/CustomPicker/index.tsx';
@@ -41,14 +39,15 @@ const rgbaInputStyling = {
41
39
  const wrapperStyling = {
42
40
  display: 'flex',
43
41
  alignItems: 'center',
44
- margin: '15px 8px 0',
42
+ // margin: '15px 8px 0',
43
+ marginTop: '15px',
45
44
  width: '100%',
46
45
  };
47
46
  const styleContainAlpha = {
48
47
  display: 'flex',
49
48
  flexDirection: 'column',
50
49
  marginLeft: 10,
51
- marginRight: 10,
50
+ // marginRight: 10,
52
51
  width: '100%',
53
52
  };
54
53
  const CustomPicker = props => {
@@ -79,15 +78,7 @@ const CustomPicker = props => {
79
78
  } },
80
79
  React.createElement(Saturation, Object.assign({}, restOf, { pointer: SaturationPointer, onChange: onChange }))),
81
80
  React.createElement("div", { style: wrapperStyling },
82
- React.createElement(PreviewColorPoint, null,
83
- React.createElement("div", { style: {
84
- backgroundColor: props.color,
85
- position: 'absolute',
86
- top: '0px',
87
- right: '0px',
88
- bottom: '0px',
89
- left: '0px',
90
- } })),
81
+ React.createElement(PreviewColorPoint, { "$color": props.color }),
91
82
  React.createElement("div", { style: styleContainAlpha },
92
83
  React.createElement("div", { style: { position: 'relative', width: '100%', height: 12 } },
93
84
  React.createElement(Hue, Object.assign({}, restOf, { pointer: HuePointer, onChange: onChange }))),
@@ -102,16 +93,16 @@ const CustomPicker = props => {
102
93
  React.createElement(Icon, { type: "icon-ants-unfold-more", style: { cursor: 'pointer', fontSize: '20px' }, onClick: () => setShowRgbaInput(!isShowRgbaInput) }),
103
94
  isShowRgbaInput ? (React.createElement("div", { style: rgbaInputStyling },
104
95
  React.createElement("div", { style: rgbaStyling },
105
- React.createElement(InputNumber, { value: (_a = props.rgb) === null || _a === void 0 ? void 0 : _a.r, controls: false, width: "auto !important", onChange: value => onChangeRgbaColor('r', value) }),
96
+ React.createElement(InputNumberWrapper, { value: (_a = props.rgb) === null || _a === void 0 ? void 0 : _a.r, controls: false, onChange: value => onChangeRgbaColor('r', value) }),
106
97
  React.createElement(Text, { style: { position: 'absolute', bottom: '-20px' } }, "R")),
107
98
  React.createElement("div", { style: rgbaStyling },
108
- React.createElement(InputNumber, { value: (_b = props.rgb) === null || _b === void 0 ? void 0 : _b.g, controls: false, width: "auto !important", onChange: value => onChangeRgbaColor('g', value) }),
99
+ React.createElement(InputNumberWrapper, { value: (_b = props.rgb) === null || _b === void 0 ? void 0 : _b.g, controls: false, onChange: value => onChangeRgbaColor('g', value) }),
109
100
  React.createElement(Text, { style: { position: 'absolute', bottom: '-20px' } }, "G")),
110
101
  React.createElement("div", { style: rgbaStyling },
111
- React.createElement(InputNumber, { value: (_c = props.rgb) === null || _c === void 0 ? void 0 : _c.b, controls: false, width: "auto !important", onChange: value => onChangeRgbaColor('b', value) }),
102
+ React.createElement(InputNumberWrapper, { value: (_c = props.rgb) === null || _c === void 0 ? void 0 : _c.b, controls: false, onChange: value => onChangeRgbaColor('b', value) }),
112
103
  React.createElement(Text, { style: { position: 'absolute', bottom: '-20px' } }, "B")),
113
104
  React.createElement("div", { style: rgbaStyling },
114
- React.createElement(InputNumber, { value: (_d = props.rgb) === null || _d === void 0 ? void 0 : _d.a, controls: false, width: "auto !important", onChange: value => onChangeRgbaColor('a', value) }),
105
+ React.createElement(InputNumberWrapper, { value: (_d = props.rgb) === null || _d === void 0 ? void 0 : _d.a, controls: false, onChange: value => onChangeRgbaColor('a', value) }),
115
106
  React.createElement(Text, { style: { position: 'absolute', bottom: '-20px' } }, "A")))) : (React.createElement(EditableInputWrapper, null,
116
107
  React.createElement(EditableInput, { value: props.color, onChange: onChange }),
117
108
  React.createElement(Text, { style: { position: 'absolute', bottom: '-20px' } }, "HEX"))),
@@ -1,5 +1,9 @@
1
+ /// <reference types="react" />
1
2
  export declare const CustomPickerWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
3
  export declare const SaturationPointer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
4
  export declare const HuePointer: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const PreviewColorPoint: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const PreviewColorPoint: import("styled-components").StyledComponent<"div", any, {
6
+ $color?: string | undefined;
7
+ }, never>;
5
8
  export declare const EditableInputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
9
+ export declare const InputNumberWrapper: import("styled-components").StyledComponent<import("react").FC<import("../../InputNumber").InputNumberProps>, any, {}, never>;