@antscorp/antsomi-ui 1.3.3-beta.79 → 1.3.3-beta.80

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 (60) hide show
  1. package/dist/{d3417d490adac30d16b5.woff → 0173b5993573afa04880.woff} +0 -0
  2. package/dist/{3656b6632a4b02049b69.ttf → 2883cad25a2b4e87ce5f.eot} +0 -0
  3. package/dist/4f54a37971347e3d7122.png +1 -0
  4. package/dist/{e8c74d57c63c7fb3be7f.eot → 72eec5c1c786b45a667f.ttf} +0 -0
  5. package/dist/dbc405edd6e0806efbc9.svg +1 -0
  6. package/dist/index.js +1 -1
  7. package/dist/main.css +1 -1
  8. package/dist/public/icons/725a52bd91a3ce534b10833df510e5fa.png +0 -0
  9. package/dist/public/icons/{8a549849ed1d12e8a6136d610bde7b5c.svg → 7d037e0b378e87a82804443636cd0e13.svg} +2 -21
  10. package/es/components/atoms/Input/Input.d.ts +3 -11
  11. package/es/components/atoms/Input/Input.js +0 -3
  12. package/es/components/atoms/Pagination/index.d.ts +0 -1
  13. package/es/components/atoms/Popover/styled.d.ts +4 -0
  14. package/es/components/atoms/Popover/styled.js +5 -0
  15. package/es/components/atoms/index.d.ts +0 -2
  16. package/es/components/atoms/index.js +0 -1
  17. package/es/components/common/ConfigProvider/GlobalStyle.js +2 -69
  18. package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
  19. package/es/components/molecules/Collapse/Collapse.js +0 -9
  20. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +1 -1
  21. package/es/components/molecules/Drawer/Drawer.d.ts +1 -5
  22. package/es/components/molecules/Drawer/Drawer.js +1 -3
  23. package/es/components/molecules/Drawer/index.d.ts +0 -1
  24. package/es/components/molecules/Modal/index.d.ts +0 -1
  25. package/es/components/molecules/Select/Select.d.ts +0 -3
  26. package/es/components/molecules/Select/Select.js +2 -23
  27. package/es/components/molecules/index.d.ts +1 -5
  28. package/es/components/molecules/index.js +1 -4
  29. package/es/constants/storybook.d.ts +0 -5
  30. package/es/constants/storybook.js +0 -12
  31. package/es/constants/theme.js +3 -30
  32. package/es/locales/en/translation.json +1 -2
  33. package/es/locales/i18n.d.ts +0 -2
  34. package/es/locales/translations.d.ts +0 -1
  35. package/es/locales/vi/translation.json +1 -2
  36. package/es/test.js +50 -141
  37. package/package.json +5 -5
  38. package/dist/d781410d62449757525d.svg +0 -1
  39. package/dist/f422f99dc05cb0013092.png +0 -1
  40. package/dist/public/icons/97210ba7dc321670f4a144c1b40e88d8.png +0 -0
  41. package/es/components/atoms/Flex/Flex.d.ts +0 -2
  42. package/es/components/atoms/Flex/Flex.js +0 -1
  43. package/es/components/atoms/Flex/index.d.ts +0 -1
  44. package/es/components/atoms/Flex/index.js +0 -1
  45. package/es/components/molecules/Form/Form.d.ts +0 -1
  46. package/es/components/molecules/Form/Form.js +0 -1
  47. package/es/components/molecules/Form/index.d.ts +0 -1
  48. package/es/components/molecules/Form/index.js +0 -1
  49. package/es/components/molecules/ModalV2/ModalV2.d.ts +0 -5
  50. package/es/components/molecules/ModalV2/ModalV2.js +0 -26
  51. package/es/components/molecules/ModalV2/index.d.ts +0 -2
  52. package/es/components/molecules/ModalV2/index.js +0 -1
  53. package/es/components/molecules/ModalV2/styled.d.ts +0 -7
  54. package/es/components/molecules/ModalV2/styled.js +0 -22
  55. package/es/components/molecules/PreviewModal/PreviewModal.d.ts +0 -7
  56. package/es/components/molecules/PreviewModal/PreviewModal.js +0 -30
  57. package/es/components/molecules/PreviewModal/index.d.ts +0 -2
  58. package/es/components/molecules/PreviewModal/index.js +0 -1
  59. package/es/components/molecules/PreviewModal/styled.d.ts +0 -4
  60. package/es/components/molecules/PreviewModal/styled.js +0 -39
@@ -1,9 +1,6 @@
1
1
  import { SelectProps as AntdSelectProps } from 'antd';
2
2
  import React from 'react';
3
- import { TextProps } from '../../atoms/Text';
4
3
  export interface SelectProps extends AntdSelectProps {
5
- label?: string | React.ReactNode;
6
- labelProps?: TextProps;
7
4
  }
8
5
  declare const Select: (<ValueType = any, OptionType extends import("rc-select/lib/Select").DefaultOptionType | import("rc-select/lib/Select").BaseOptionType = import("rc-select/lib/Select").DefaultOptionType>(props: AntdSelectProps<ValueType, OptionType> & {
9
6
  children?: React.ReactNode;
@@ -1,26 +1,11 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  var _a;
13
2
  // Libraries
14
3
  import { Select as AntdSelect } from 'antd';
15
4
  import React from 'react';
16
- // Components
17
- import { Flex } from '@antscorp/antsomi-ui/es/components/atoms';
18
- import { Text } from '../../atoms/Text';
19
5
  // Icons
20
6
  import Icon from '@antscorp/icons';
21
7
  // Constants
22
- import { THEME } from '@antscorp/antsomi-ui/es/constants';
23
- // Styled
8
+ import { THEME } from '../../../constants';
24
9
  import { StyledTag, TagCloseBtn } from './styled';
25
10
  const tagRender = (props) => {
26
11
  const { label, closable, onClose } = props;
@@ -33,17 +18,11 @@ const tagRender = (props) => {
33
18
  fontSize: 10,
34
19
  } })) }, label));
35
20
  };
36
- const CustomSelect = props => {
37
- const { label, labelProps } = props, rest = __rest(props, ["label", "labelProps"]);
38
- return (React.createElement(Flex, { vertical: true, gap: 4 },
39
- typeof label === 'string' ? React.createElement(Text, Object.assign({}, labelProps), label) : label,
40
- React.createElement(AntdSelect, Object.assign({}, rest))));
41
- };
21
+ const CustomSelect = props => React.createElement(AntdSelect, Object.assign({}, props));
42
22
  const Select = CustomSelect;
43
23
  Select.OptGroup = AntdSelect.OptGroup;
44
24
  Select.Option = AntdSelect.Option;
45
25
  Select.defaultProps = {
46
- labelProps: { color: '#66666' },
47
26
  suffixIcon: (React.createElement(Icon, { type: "icon-ants-expand-more", style: { fontSize: 16, color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.bw10 } })),
48
27
  tagRender,
49
28
  };
@@ -24,18 +24,14 @@ export { Card } from './Card';
24
24
  export { InputNumberWithUnit } from './InputNumberWithUnit';
25
25
  export { GradientSetting } from './GradientSetting';
26
26
  export { Collapse } from './Collapse';
27
+ export { Drawer } from './Drawer';
27
28
  export { SettingWrapperPopover } from './SettingWrapperPopover';
28
29
  export { FontWeightSelect } from './FontWeightSelect';
29
30
  export { FontFamilySelect } from './FontFamilySelect';
30
31
  export { TextDecorationSelect } from './TextDecorationSelect';
31
32
  export { TextTransformSelect } from './TextTransformSelect';
32
33
  export { FontSetting, FontSettingEdit } from './FontSetting';
33
- export { Form } from './Form';
34
- export { ModalV2 } from './ModalV2';
35
- export * from './PreviewModal';
36
- export * from './Drawer';
37
34
  export type { AdvancedPickerProps, TAdvancedPickerOption, TAdvancedRangePickerTimeRange, } from './DatePicker';
38
35
  export type { ColorPickerProps } from './ColorPicker';
39
36
  export type { AlignEditProps, AlignSettingProps } from './AlignSetting';
40
37
  export type { TFontSettingProps, TFontSettingEditProps } from './FontSetting';
41
- export type { ModalProps } from './ModalV2';
@@ -24,13 +24,10 @@ export { Card } from './Card';
24
24
  export { InputNumberWithUnit } from './InputNumberWithUnit';
25
25
  export { GradientSetting } from './GradientSetting';
26
26
  export { Collapse } from './Collapse';
27
+ export { Drawer } from './Drawer';
27
28
  export { SettingWrapperPopover } from './SettingWrapperPopover';
28
29
  export { FontWeightSelect } from './FontWeightSelect';
29
30
  export { FontFamilySelect } from './FontFamilySelect';
30
31
  export { TextDecorationSelect } from './TextDecorationSelect';
31
32
  export { TextTransformSelect } from './TextTransformSelect';
32
33
  export { FontSetting, FontSettingEdit } from './FontSetting';
33
- export { Form } from './Form';
34
- export { ModalV2 } from './ModalV2';
35
- export * from './PreviewModal';
36
- export * from './Drawer';
@@ -10,8 +10,3 @@ export declare const TABLE_API_COLUMNS: ({
10
10
  key: string;
11
11
  render: (text: any) => React.JSX.Element;
12
12
  })[];
13
- export declare const TABLE_TYPE_COLUMNS: {
14
- title: string;
15
- dataIndex: string;
16
- key: string;
17
- }[];
@@ -22,15 +22,3 @@ export const TABLE_API_COLUMNS = [
22
22
  key: 'default',
23
23
  },
24
24
  ];
25
- export const TABLE_TYPE_COLUMNS = [
26
- {
27
- title: 'Value',
28
- dataIndex: 'value',
29
- key: 'value',
30
- },
31
- {
32
- title: 'Label',
33
- dataIndex: 'label',
34
- key: 'label',
35
- },
36
- ];
@@ -1,4 +1,4 @@
1
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
1
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
2
2
  // Types
3
3
  import { theme } from 'antd';
4
4
  // Variables
@@ -64,12 +64,8 @@ export const THEME = {
64
64
  accent2: '#dddddd',
65
65
  accent3: '#d2d2d2',
66
66
  accent5: '#999999',
67
- accent6: '#f2f2f2',
68
- accent7: '#cccccc',
69
- gray5: '#d9d9d9',
70
67
  gold1,
71
68
  gold6,
72
- scrollBarSize: '8px',
73
69
  },
74
70
  };
75
71
  THEME.components = {
@@ -132,42 +128,19 @@ THEME.components = {
132
128
  controlHeight: 31,
133
129
  },
134
130
  Divider: {
135
- marginLG: 15,
136
- marginXL: 15,
137
- colorSplit: (_r = THEME.token) === null || _r === void 0 ? void 0 : _r.accent3,
131
+ marginLG: 10,
138
132
  },
139
133
  Checkbox: {
140
134
  controlInteractiveSize: 18,
141
135
  },
142
136
  Modal: {
143
- titleFontSize: 16,
144
137
  borderRadiusSM: 3,
145
- fontSizeLG: 18,
146
138
  paddingContentHorizontalLG: 0,
147
139
  paddingLG: 0,
148
140
  paddingMD: 0,
149
141
  },
150
142
  Tabs: {
151
143
  colorPrimary: '#1F5FAC',
152
- horizontalItemPadding: '10px 20px',
153
- horizontalItemGutter: 0,
154
- lineWidthBold: 3,
155
- titleFontSize: 14,
156
- titleFontSizeLG: 14,
157
- titleFontSizeSM: 14,
158
- horizontalMargin: '0px',
159
- },
160
- Collapse: {
161
- headerBg: '#FFF',
162
- borderRadiusLG: 0,
163
- headerPadding: '15px 10px',
164
- },
165
- Switch: {
166
- colorTextQuaternary: (_s = THEME.token) === null || _s === void 0 ? void 0 : _s.bw0,
167
- colorTextTertiary: (_t = THEME.token) === null || _t === void 0 ? void 0 : _t.bw0,
168
- handleSize: 12,
169
- handleSizeSM: 7,
170
- trackMinWidth: 30,
171
- handleBg: (_u = THEME.token) === null || _u === void 0 ? void 0 : _u.colorPrimary,
144
+ margin: 20,
172
145
  },
173
146
  };
@@ -62,6 +62,5 @@
62
62
  "eighth": "Eighth",
63
63
  "ninth": "Ninth",
64
64
  "tenth": "Tenth"
65
- },
66
- "close": "Close"
65
+ }
67
66
  }
@@ -65,7 +65,6 @@ export declare const translationsJson: {
65
65
  ninth: string;
66
66
  tenth: string;
67
67
  };
68
- close: string;
69
68
  };
70
69
  };
71
70
  vi: {
@@ -134,7 +133,6 @@ export declare const translationsJson: {
134
133
  ninth: string;
135
134
  tenth: string;
136
135
  };
137
- close: string;
138
136
  };
139
137
  };
140
138
  };
@@ -65,7 +65,6 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
65
65
  ninth: string;
66
66
  tenth: string;
67
67
  };
68
- close: string;
69
68
  }>, current?: string) => void;
70
69
  export declare const t: (id: string, ...rest: any[]) => [string, ...any[]];
71
70
  export declare const getTranslateMessage: (id: string, defaultMessage?: string, value?: Record<string, unknown>) => string;
@@ -62,6 +62,5 @@
62
62
  "eighth": "thứ tám",
63
63
  "ninth": "thứ chín",
64
64
  "tenth": "thứ mười"
65
- },
66
- "close": "Đóng"
65
+ }
67
66
  }
package/es/test.js CHANGED
@@ -2,7 +2,9 @@
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, GradientSetting, Tabs, } from './components';
5
+ import { ConfigProvider, EdgeSetting, GradientSetting, IconSelection, PositionSetting, SettingWrapper,
6
+ // Slider,
7
+ SliderWithInputNumber, Space, UploadImage, } from './components';
6
8
  // import { Slider } from 'antd';
7
9
  import { Slider } from '@antscorp/antsomi-ui/es/components/atoms/Slider';
8
10
  import { Rate } from './components/atoms/Rate';
@@ -84,147 +86,54 @@ export const App = () => {
84
86
  // );
85
87
  // ---------------------------- Test Helps End ------------------------------
86
88
  // ------------------------ Media template components test start -------------------------
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
- // );
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
+ } }))))));
215
136
  // ------------------------ 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
- ] }));
228
137
  return (React.createElement("div", { style: { width: '500px', margin: '32px' } },
229
138
  React.createElement(GradientSetting, { onChange: e => console.log('gradient change') }),
230
139
  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.79",
3
+ "version": "1.3.3-beta.80",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -66,7 +66,7 @@
66
66
  "@fortawesome/free-solid-svg-icons": "6.1.1",
67
67
  "@fortawesome/react-fontawesome": "0.2.0",
68
68
  "@tinymce/tinymce-react": "^3.7.0",
69
- "antd": "5.12.6",
69
+ "antd": "^5.3.2",
70
70
  "axios": "^1.4.0",
71
71
  "babel-plugin-file-loader": "^2.0.0",
72
72
  "dayjs": "^1.11.7",
@@ -74,8 +74,6 @@
74
74
  "highlight.js": "^11.8.0",
75
75
  "html-to-image": "^1.11.11",
76
76
  "html2canvas": "^1.4.1",
77
- "i18next": "21.6.16",
78
- "i18next-browser-languagedetector": "6.1.2",
79
77
  "lodash": "^4.17.21",
80
78
  "moment": "2.29.2",
81
79
  "qs": "6.10.3",
@@ -86,7 +84,9 @@
86
84
  "rehype-highlight": "^6.0.0",
87
85
  "remark-gfm": "^3.0.1",
88
86
  "ts-dedent": "^2.2.0",
89
- "tui-image-editor": "^3.15.3"
87
+ "tui-image-editor": "^3.15.3",
88
+ "i18next": "21.6.16",
89
+ "i18next-browser-languagedetector": "6.1.2"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@ant-design/cssinjs": "^1.6.2",
@@ -1 +0,0 @@
1
- export default __webpack_public_path__ + "/public/icons/8a549849ed1d12e8a6136d610bde7b5c.svg";
@@ -1 +0,0 @@
1
- export default __webpack_public_path__ + "/public/icons/97210ba7dc321670f4a144c1b40e88d8.png";
@@ -1,2 +0,0 @@
1
- export { Flex } from 'antd';
2
- export type { FlexProps } from 'antd';
@@ -1 +0,0 @@
1
- export { Flex } from 'antd';
@@ -1 +0,0 @@
1
- export * from './Flex';
@@ -1 +0,0 @@
1
- export * from './Flex';
@@ -1 +0,0 @@
1
- export { Form } from 'antd';
@@ -1 +0,0 @@
1
- export { Form } from 'antd';
@@ -1 +0,0 @@
1
- export { Form } from './Form';
@@ -1 +0,0 @@
1
- export { Form } from './Form';
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { ModalProps } from 'antd';
3
- export interface ModalV2Props extends ModalProps {
4
- }
5
- export declare const ModalV2: React.FC<ModalV2Props>;
@@ -1,26 +0,0 @@
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
- // Libraries
13
- import React from 'react';
14
- import { StyledModal } from './styled';
15
- // Components
16
- import { Button, Flex } from '../../atoms';
17
- export const ModalV2 = props => {
18
- const { okButtonProps, cancelButtonProps, okText, cancelText, onCancel, onOk } = props;
19
- const restOfProps = __rest(props, []);
20
- return (React.createElement(StyledModal, Object.assign({ footer: React.createElement(Flex, { gap: 10, align: "center" },
21
- React.createElement(Button, Object.assign({ type: "primary", onClick: onOk }, okButtonProps), okText || 'OK'),
22
- React.createElement(Button, Object.assign({ onClick: onCancel }, cancelButtonProps), cancelText || 'Cancel')) }, restOfProps)));
23
- };
24
- ModalV2.defaultProps = {
25
- // footer,
26
- };
@@ -1,2 +0,0 @@
1
- export * from './ModalV2';
2
- export type { ModalProps } from 'antd';
@@ -1 +0,0 @@
1
- export * from './ModalV2';
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const StyledModal: import("styled-components").StyledComponent<import("react").FC<import("antd").ModalProps> & import("antd/es/modal/confirm").ModalStaticFunctions & {
3
- useModal: typeof import("antd/es/modal/useModal").default;
4
- destroyAll: () => void;
5
- config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
6
- _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) => import("react").JSX.Element;
7
- }, any, {}, never>;
@@ -1,22 +0,0 @@
1
- // Libraries
2
- import { Modal } from 'antd';
3
- import styled from 'styled-components';
4
- export const StyledModal = styled(Modal) `
5
- .antsomi-modal-content {
6
- .antsomi-modal-close {
7
- position: absolute;
8
- top: 10px !important;
9
- right: 10px !important;
10
- width: 24px !important;
11
- height: 24px !important;
12
- }
13
-
14
- .antsomi-modal-body {
15
- padding: 15px;
16
- }
17
-
18
- .antsomi-modal-header {
19
- padding: 15px 15px 0px 15px;
20
- }
21
- }
22
- `;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { ModalProps } from '../ModalV2';
3
- export interface PreviewModalProps extends ModalProps {
4
- modalHeaderClassName?: string;
5
- modalBodyClassName?: string;
6
- }
7
- export declare const PreviewModal: React.FC<PreviewModalProps>;
@@ -1,30 +0,0 @@
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
- // Libraries
13
- import React from 'react';
14
- import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
15
- import { Button, Icon } from '../../atoms';
16
- // Styled
17
- import { ModalBody, ModalHeader, StyledModal } from './styled';
18
- // Utils
19
- import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
20
- export const PreviewModal = props => {
21
- const { onCancel } = props;
22
- const { children, modalHeaderClassName, modalBodyClassName } = props, restProps = __rest(props, ["children", "modalHeaderClassName", "modalBodyClassName"]);
23
- const { t } = i18nInstance;
24
- return (React.createElement(StyledModal, Object.assign({}, restProps, { centered: true, closeIcon: null, footer: null, width: "100vw" }),
25
- React.createElement(ModalHeader, { className: modalHeaderClassName },
26
- React.createElement(Button, { className: "close-btn", onClick: onCancel },
27
- React.createElement(Icon, { type: "icon-ants-remove-slim", size: 12 }),
28
- t(translations.close))),
29
- React.createElement(ModalBody, { className: modalBodyClassName }, children)));
30
- };
@@ -1,2 +0,0 @@
1
- export { PreviewModal } from './PreviewModal';
2
- export type { PreviewModalProps } from './PreviewModal';
@@ -1 +0,0 @@
1
- export { PreviewModal } from './PreviewModal';
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const StyledModal: import("styled-components").StyledComponent<import("react").FC<import("../ModalV2").ModalV2Props>, any, {}, never>;
3
- export declare const ModalHeader: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
4
- export declare const ModalBody: import("styled-components").StyledComponent<"div", any, {}, never>;