@antscorp/antsomi-ui 1.3.3-beta.2 → 1.3.3-beta.20

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 (133) hide show
  1. package/es/assets/images/stars_slider.png +0 -0
  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/RateV2/RateV2.d.ts +18 -0
  9. package/es/components/atoms/RateV2/RateV2.js +73 -0
  10. package/es/components/atoms/RateV2/index.d.ts +1 -0
  11. package/es/components/atoms/RateV2/index.js +1 -0
  12. package/es/components/atoms/Slider/index.d.ts +2 -1
  13. package/es/components/atoms/Slider/index.js +7 -14
  14. package/es/components/atoms/SliderV2/index.d.ts +6 -0
  15. package/es/components/atoms/SliderV2/index.js +21 -0
  16. package/es/components/atoms/Spin/Spin.d.ts +2 -1
  17. package/es/components/atoms/index.d.ts +3 -0
  18. package/es/components/atoms/index.js +3 -0
  19. package/es/components/common/ConfigProvider/GlobalStyle.js +38 -1
  20. package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
  21. package/es/components/icons/AudioRecordIcon.d.ts +2 -1
  22. package/es/components/icons/BugIcon.d.ts +2 -1
  23. package/es/components/icons/CameraIcon.d.ts +2 -1
  24. package/es/components/icons/CaptureIcon.d.ts +2 -1
  25. package/es/components/icons/CheckSlimIcon.d.ts +2 -1
  26. package/es/components/icons/CloseIcon.d.ts +2 -1
  27. package/es/components/icons/CommentIcon.d.ts +2 -1
  28. package/es/components/icons/EventIcon.d.ts +2 -1
  29. package/es/components/icons/FreeDrawIcon.d.ts +2 -1
  30. package/es/components/icons/GPTIcon.d.ts +2 -1
  31. package/es/components/icons/GPTIconV2.d.ts +2 -1
  32. package/es/components/icons/GPTIconV3.d.ts +2 -1
  33. package/es/components/icons/HighlightIcon.d.ts +2 -1
  34. package/es/components/icons/IdeaIcon.d.ts +2 -1
  35. package/es/components/icons/InvisibleIcon.d.ts +2 -1
  36. package/es/components/icons/MuteIcon.d.ts +2 -1
  37. package/es/components/icons/OpenUrlIcon.d.ts +2 -1
  38. package/es/components/icons/PauseIcon.d.ts +2 -1
  39. package/es/components/icons/PlaneIcon.d.ts +2 -1
  40. package/es/components/icons/RequestIcon.d.ts +2 -1
  41. package/es/components/icons/StopRecordIcon.d.ts +2 -1
  42. package/es/components/icons/UserIcon.d.ts +2 -1
  43. package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
  44. package/es/components/icons/WarningIcon.d.ts +2 -1
  45. package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +2 -1
  46. package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +2 -1
  47. package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +2 -1
  48. package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
  49. package/es/components/molecules/Collapse/Collapse.js +9 -0
  50. package/es/components/molecules/FontFamilySelect/constants.d.ts +307 -0
  51. package/es/components/molecules/FontFamilySelect/constants.js +257 -0
  52. package/es/components/molecules/FontFamilySelect/index.d.ts +17 -0
  53. package/es/components/molecules/FontFamilySelect/index.js +53 -0
  54. package/es/components/molecules/FontSetting/constants.d.ts +3 -0
  55. package/es/components/molecules/FontSetting/constants.js +22 -0
  56. package/es/components/molecules/FontSetting/index.d.ts +24 -0
  57. package/es/components/molecules/FontSetting/index.js +54 -0
  58. package/es/components/molecules/FontSetting/types.d.ts +22 -0
  59. package/es/components/molecules/FontSetting/types.js +1 -0
  60. package/es/components/molecules/FontWeightSelect/constants.d.ts +28 -0
  61. package/es/components/molecules/FontWeightSelect/constants.js +11 -0
  62. package/es/components/molecules/FontWeightSelect/index.d.ts +9 -0
  63. package/es/components/molecules/FontWeightSelect/index.js +39 -0
  64. package/es/components/molecules/Form/Form.d.ts +1 -0
  65. package/es/components/molecules/Form/Form.js +1 -0
  66. package/es/components/molecules/Form/index.d.ts +1 -0
  67. package/es/components/molecules/Form/index.js +1 -0
  68. package/es/components/molecules/Modal/styled.d.ts +1 -1
  69. package/es/components/molecules/ResizeGrid/ResizeGrid.d.ts +3 -0
  70. package/es/components/molecules/ResizeGrid/ResizeGrid.js +353 -0
  71. package/es/components/molecules/ResizeGrid/components/Cell/Cell.d.ts +3 -0
  72. package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +67 -0
  73. package/es/components/molecules/ResizeGrid/components/Cell/index.d.ts +1 -0
  74. package/es/components/molecules/ResizeGrid/components/Cell/index.js +1 -0
  75. package/es/components/molecules/ResizeGrid/components/Cell/styled.d.ts +3 -0
  76. package/es/components/molecules/ResizeGrid/components/Cell/styled.js +62 -0
  77. package/es/components/molecules/ResizeGrid/constant.d.ts +34 -0
  78. package/es/components/molecules/ResizeGrid/constant.js +108 -0
  79. package/es/components/molecules/ResizeGrid/index.d.ts +2 -0
  80. package/es/components/molecules/ResizeGrid/index.js +1 -0
  81. package/es/components/molecules/ResizeGrid/styled.d.ts +3 -0
  82. package/es/components/molecules/ResizeGrid/styled.js +20 -0
  83. package/es/components/molecules/ResizeGrid/types.d.ts +128 -0
  84. package/es/components/molecules/ResizeGrid/types.js +1 -0
  85. package/es/components/molecules/Select/Select.d.ts +3 -0
  86. package/es/components/molecules/Select/Select.js +23 -2
  87. package/es/components/molecules/Select/Test.d.ts +2 -1
  88. package/es/components/molecules/SettingWrapper/index.d.ts +1 -2
  89. package/es/components/molecules/SettingWrapperPopover/index.d.ts +16 -0
  90. package/es/components/molecules/SettingWrapperPopover/index.js +17 -0
  91. package/es/components/molecules/TextDecorationSelect/constants.d.ts +19 -0
  92. package/es/components/molecules/TextDecorationSelect/constants.js +26 -0
  93. package/es/components/molecules/TextDecorationSelect/index.d.ts +15 -0
  94. package/es/components/molecules/TextDecorationSelect/index.js +45 -0
  95. package/es/components/molecules/TextTransformSelect/constants.d.ts +13 -0
  96. package/es/components/molecules/TextTransformSelect/constants.js +19 -0
  97. package/es/components/molecules/TextTransformSelect/index.d.ts +9 -0
  98. package/es/components/molecules/TextTransformSelect/index.js +39 -0
  99. package/es/components/molecules/TreeSelect/TreeSelect.d.ts +1 -1
  100. package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -1
  101. package/es/components/molecules/index.d.ts +10 -0
  102. package/es/components/molecules/index.js +8 -0
  103. package/es/constants/storybook.d.ts +2 -1
  104. package/es/constants/theme.js +25 -3
  105. package/es/hooks/useDeepCompareEffect.d.ts +1 -0
  106. package/es/hooks/useDeepCompareEffect.js +21 -0
  107. package/es/test.d.ts +2 -1
  108. package/es/test.js +8 -1
  109. package/package.json +6 -5
  110. package/dist/0173b5993573afa04880.woff +0 -0
  111. package/dist/0dfb9214dfd945cd7290.png +0 -1
  112. package/dist/2883cad25a2b4e87ce5f.eot +0 -0
  113. package/dist/4f54a37971347e3d7122.png +0 -1
  114. package/dist/574b7bee0563a9fe9a29.png +0 -1
  115. package/dist/6b586356e837581204dc.svg +0 -1
  116. package/dist/72eec5c1c786b45a667f.ttf +0 -0
  117. package/dist/bc6bf11c6f5e6743aa4c.png +0 -1
  118. package/dist/dbc405edd6e0806efbc9.svg +0 -1
  119. package/dist/e32f09119052a55cce3c.png +0 -1
  120. package/dist/e3851b9384a984c6fdb5.png +0 -1
  121. package/dist/index.js +0 -2
  122. package/dist/index.js.LICENSE.txt +0 -69
  123. package/dist/main.css +0 -69
  124. package/dist/public/icons/2d496b55d85a9545d7311c073af442bb.png +0 -0
  125. package/dist/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png +0 -0
  126. package/dist/public/icons/725a52bd91a3ce534b10833df510e5fa.png +0 -0
  127. package/dist/public/icons/7d037e0b378e87a82804443636cd0e13.svg +0 -346
  128. package/dist/public/icons/90553767e0a05b9585a54797cfd9ce51.png +0 -0
  129. package/dist/public/icons/bb64e23a1ff390a416d765ee556096ab.svg +0 -87
  130. package/dist/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png +0 -0
  131. package/dist/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png +0 -0
  132. package/dist/public/icons/placeholder-image.png +0 -0
  133. package/dist/public/icons/transparent.svg +0 -1
@@ -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;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ interface RateContinuousProps {
3
+ count?: number;
4
+ className?: string;
5
+ defaultValue?: number;
6
+ /**
7
+ * @description number of star
8
+ */
9
+ value?: number;
10
+ type?: 'full' | 'half' | 'continuous';
11
+ /**
12
+ * @param value current number of stars are selected
13
+ * @description number of stars = fillWidth / STAR_WIDTH
14
+ */
15
+ onChange?: (value: number) => void;
16
+ }
17
+ export declare const RateV2: React.FC<RateContinuousProps>;
18
+ export {};
@@ -0,0 +1,73 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import StarImage from '@antscorp/antsomi-ui/es/assets/images/stars_slider.png';
3
+ const STAR_WIDTH = 30;
4
+ const parseNumDecimals = (input, decimals) => +Number.parseFloat(input === null || input === void 0 ? void 0 : input.toString()).toFixed(decimals);
5
+ const roundHalf = (num) => {
6
+ const multiplier = 1 / 0.5;
7
+ return Math.round(num * multiplier) / multiplier;
8
+ };
9
+ /**
10
+ *
11
+ * @param width width measure from the left edge of star container
12
+ * @param type type of star - 'full' | 'half' | 'continuous'
13
+ * @default type 'full'
14
+ * @returns
15
+ */
16
+ const getWidth = (width, type = 'full') => {
17
+ const numberOfStar = width / STAR_WIDTH;
18
+ return type === 'full'
19
+ ? Math.ceil(numberOfStar) * STAR_WIDTH
20
+ : type === 'half'
21
+ ? roundHalf(numberOfStar) * STAR_WIDTH
22
+ : width;
23
+ };
24
+ export const RateV2 = ({ count = 5, className, defaultValue = 0, value, type = 'full', onChange, }) => {
25
+ const fullWidth = count * STAR_WIDTH;
26
+ // The width is calculated when move mouse => change the UI, not change the real value
27
+ const [fillWidth, setFillWidth] = useState(() => defaultValue ? getWidth(defaultValue * STAR_WIDTH, type) : 0);
28
+ // The real current value that will be return to parent component by onChange function
29
+ // currWidth = value * STAR_WIDTH
30
+ const [currWidth, setCurrWidth] = useState(0);
31
+ const handleMouseMove = e => {
32
+ const rect = e.currentTarget.getBoundingClientRect();
33
+ const x = e.clientX - rect.left;
34
+ const hoverWidth = Math.round(x);
35
+ setFillWidth(getWidth(hoverWidth, type));
36
+ };
37
+ const handleClick = () => {
38
+ // If have no value => auto set current value; if have value => must control value with onChange props
39
+ if (!value)
40
+ setCurrWidth(fillWidth);
41
+ if (onChange)
42
+ onChange(parseNumDecimals(fillWidth / STAR_WIDTH, 2));
43
+ };
44
+ useEffect(() => {
45
+ if (typeof value === 'number') {
46
+ const width = getWidth(value * STAR_WIDTH, type);
47
+ setCurrWidth(width);
48
+ setFillWidth(width);
49
+ }
50
+ }, [value]);
51
+ return (React.createElement("div", { className: `antsomi-rate-continuous${className ? ` ${className}` : ''}`, style: {
52
+ position: 'relative',
53
+ width: `${fullWidth}px`,
54
+ backgroundPosition: '-27px',
55
+ height: '28px',
56
+ }, onMouseMove: handleMouseMove, onMouseLeave: () => setFillWidth(currWidth || 0), onClick: handleClick },
57
+ React.createElement("div", { className: "custom-rate custom-rate--fill", style: {
58
+ position: 'absolute',
59
+ background: `url(${StarImage}) 0px 0px`,
60
+ width: `${fillWidth}px`,
61
+ height: '26px',
62
+ zIndex: 1,
63
+ } }),
64
+ React.createElement("div", { className: "custom-rate custom-rate--empty", style: {
65
+ position: 'absolute',
66
+ top: '0px',
67
+ left: '0px',
68
+ backgroundImage: 'none',
69
+ background: `transparent url(${StarImage}) 0px -26px`,
70
+ width: `${fullWidth}px`,
71
+ height: '26px',
72
+ } })));
73
+ };
@@ -0,0 +1 @@
1
+ export { RateV2 } from './RateV2';
@@ -0,0 +1 @@
1
+ export { RateV2 } from './RateV2';
@@ -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, className } = props, restOf = __rest(props, ["range", "value", "min", "max", "className"]);
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
14
  return (React.createElement(SliderWrapper, { isNegative: true, width: calculateWidth, className: className },
24
- React.createElement(AntdSlider, Object.assign({ min: min, max: max, value: value }, restOf, { marks: { 0: ' ' } }))));
15
+ React.createElement(AntdSlider, Object.assign({}, omit(restProps, ['marks', 'className']), { marks: {
16
+ 0: ' ',
17
+ } }))));
25
18
  }
26
19
  return (React.createElement(SliderWrapper, { className: className },
27
- React.createElement(AntdSlider, Object.assign({}, props))));
20
+ React.createElement(AntdSlider, Object.assign({}, restProps))));
28
21
  });
29
22
  Slider.defaultProps = {
30
23
  tooltipVisible: false,
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { SliderRangeProps, SliderSingleProps } from 'antd/es/slider';
3
+ export interface SliderProps {
4
+ defaultSliderTrack?: boolean;
5
+ }
6
+ export declare const SliderV2: React.FC<(SliderSingleProps & SliderProps) | (SliderRangeProps & SliderProps)>;
@@ -0,0 +1,21 @@
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 { min, max, onChange, styles, range, value, defaultValue, marks, defaultSliderTrack } = props;
8
+ const [valueInternal, setValueInternal] = useState(defaultValue || min || 0);
9
+ if (min && max && min < 0 && max > 0 && !range && !defaultSliderTrack) {
10
+ const sliderWidth = max - min;
11
+ const calcValue = value || valueInternal;
12
+ const leftTrackPosition = `${(Math.abs(calcValue > 0 ? min : min - calcValue) / sliderWidth) * 100}%`;
13
+ const sliderTrackWidth = `${(Math.abs(calcValue) / sliderWidth) * 100}%`;
14
+ return (React.createElement(AntdSlider, Object.assign({ value: value || valueInternal, onChange: value => {
15
+ setValueInternal(value);
16
+ if (onChange)
17
+ onChange(value);
18
+ }, styles: Object.assign({ track: Object.assign({ left: leftTrackPosition, width: sliderTrackWidth }, styles === null || styles === void 0 ? void 0 : styles.track) }, styles), marks: marks || { 0: ' ' } }, props)));
19
+ }
20
+ return React.createElement(AntdSlider, Object.assign({}, props));
21
+ };
@@ -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
  };
@@ -30,4 +30,7 @@ export { Spin } from './Spin';
30
30
  export { Alert } from './Alert';
31
31
  export { ScrollBox } from './ScrollBox';
32
32
  export { Rate } from './Rate';
33
+ export { SliderV2 } from './SliderV2';
34
+ export * from './Flex';
35
+ export * from './RateV2';
33
36
  export type { SliderProps } from './Slider';
@@ -30,3 +30,6 @@ export { Spin } from './Spin';
30
30
  export { Alert } from './Alert';
31
31
  export { ScrollBox } from './ScrollBox';
32
32
  export { Rate } from './Rate';
33
+ export { SliderV2 } from './SliderV2';
34
+ export * from './Flex';
35
+ export * from './RateV2';
@@ -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
+ };