@antscorp/antsomi-ui 1.3.3-beta.34 → 1.3.3-beta.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/atoms/Alert/Alert.js +6 -13
- package/es/components/atoms/Button/index.js +1 -1
- package/es/components/atoms/Button/test.js +6 -6
- package/es/components/atoms/DividerPure/DividerPure.js +15 -4
- package/es/components/atoms/DividerPure/styled.js +6 -36
- package/es/components/atoms/Empty/Empty.js +1 -1
- package/es/components/atoms/FloatButton/index.js +1 -1
- package/es/components/atoms/Grid/Grid.js +2 -2
- package/es/components/atoms/Icon/index.js +15 -28
- package/es/components/atoms/Input/Input.js +32 -21
- package/es/components/atoms/Input/styled.js +12 -102
- package/es/components/atoms/InputDynamic/EditCaretPositioning.js +13 -13
- package/es/components/atoms/InputDynamic/InputDynamic.js +97 -83
- package/es/components/atoms/InputDynamic/PopupShortLink.js +21 -20
- package/es/components/atoms/InputDynamic/styled.js +13 -275
- package/es/components/atoms/InputDynamic/utils.js +114 -104
- package/es/components/atoms/InputNumber/InputNumber.js +14 -3
- package/es/components/atoms/MobileFrame/MobileFrame.js +14 -3
- package/es/components/atoms/MobileFrame/constants.js +1 -1
- package/es/components/atoms/MobileFrame/styled.js +8 -29
- package/es/components/atoms/Pagination/Pagination.js +1 -1
- package/es/components/atoms/Popover/Popover.js +1 -1
- package/es/components/atoms/Popover/styled.js +6 -1
- package/es/components/atoms/PreviewTabs/PreviewTabs.js +31 -20
- package/es/components/atoms/PreviewTabs/styled.js +10 -71
- package/es/components/atoms/Progress/Progress.js +1 -1
- package/es/components/atoms/Radio/index.js +8 -18
- package/es/components/atoms/Rate/Rate.js +1 -1
- package/es/components/atoms/RateV2/RateV2.js +30 -24
- package/es/components/atoms/RequiredLabel/index.js +14 -3
- package/es/components/atoms/RequiredLabel/styled.js +7 -5
- package/es/components/atoms/ScrollBox/index.js +25 -14
- package/es/components/atoms/Segmented/Segmented.js +1 -1
- package/es/components/atoms/Skeleton/Skeleton.js +1 -1
- package/es/components/atoms/Slider/index.js +18 -7
- package/es/components/atoms/Slider/styled.js +10 -38
- package/es/components/atoms/SliderV2/index.js +21 -10
- package/es/components/atoms/Space/Space.js +7 -6
- package/es/components/atoms/Spin/Spin.js +14 -3
- package/es/components/atoms/Spin/styled.js +6 -3
- package/es/components/atoms/Statistic/Statistic.js +1 -1
- package/es/components/atoms/Steps/Steps.js +1 -1
- package/es/components/atoms/Switch/Switch.js +1 -1
- package/es/components/atoms/Text/index.js +15 -4
- package/es/components/atoms/Text/styled.js +11 -40
- package/es/components/atoms/Timeline/Timeline.js +1 -1
- package/es/components/atoms/Watermark/Watermark.js +1 -1
- package/es/components/common/ConfigProvider/ConfigProvider.js +15 -4
- package/es/components/common/ConfigProvider/GlobalStyle.js +8 -569
- package/es/components/icons/AccountCircle.js +13 -2
- package/es/components/icons/AddShoppingCart.js +13 -2
- package/es/components/icons/ArrowGrowIcon.js +13 -2
- package/es/components/icons/AssignmentInd.js +13 -2
- package/es/components/icons/AudioRecordIcon.js +13 -2
- package/es/components/icons/BugIcon.js +13 -2
- package/es/components/icons/Call.js +13 -2
- package/es/components/icons/CameraIcon.js +13 -2
- package/es/components/icons/CaptureIcon.js +13 -2
- package/es/components/icons/Category.js +13 -2
- package/es/components/icons/ChatBubbleOutline.js +13 -2
- package/es/components/icons/CheckSlimIcon.js +13 -2
- package/es/components/icons/CircleNotifications.js +13 -2
- package/es/components/icons/CloseIcon.js +13 -2
- package/es/components/icons/CommentIcon.js +13 -2
- package/es/components/icons/ConfirmationNumber.js +13 -2
- package/es/components/icons/DesktopWindows.js +13 -2
- package/es/components/icons/EventIcon.js +13 -2
- package/es/components/icons/FactCheck.js +13 -2
- package/es/components/icons/FreeDrawIcon.js +13 -2
- package/es/components/icons/GPTIcon.js +2 -2
- package/es/components/icons/GPTIconV2.js +2 -2
- package/es/components/icons/GPTIconV3.js +13 -2
- package/es/components/icons/HighlightIcon.js +13 -2
- package/es/components/icons/HightlightAlt.js +13 -2
- package/es/components/icons/HowToReg.js +13 -2
- package/es/components/icons/IdeaIcon.js +13 -2
- package/es/components/icons/Interactive.js +13 -2
- package/es/components/icons/InvisibleIcon.js +13 -2
- package/es/components/icons/List.js +13 -2
- package/es/components/icons/LocalMallIcon.js +13 -2
- package/es/components/icons/MobileFriendly.js +13 -2
- package/es/components/icons/MuteIcon.js +13 -2
- package/es/components/icons/NotificationsActive.js +13 -2
- package/es/components/icons/OpenUrlIcon.js +13 -2
- package/es/components/icons/PauseIcon.js +13 -2
- package/es/components/icons/Payment.js +13 -2
- package/es/components/icons/PersonAddDisabled.js +13 -2
- package/es/components/icons/PhoneCallback.js +13 -2
- package/es/components/icons/PlaneIcon.js +13 -2
- package/es/components/icons/Preview.js +13 -2
- package/es/components/icons/Redeem.js +13 -2
- package/es/components/icons/RemoveRedEye.js +13 -2
- package/es/components/icons/RemoveShoppingCart.js +13 -2
- package/es/components/icons/RequestIcon.js +13 -2
- package/es/components/icons/Search.js +13 -2
- package/es/components/icons/ShoppingBag.js +13 -2
- package/es/components/icons/ShoppingCart.js +13 -2
- package/es/components/icons/StopRecordIcon.js +13 -2
- package/es/components/icons/Store.js +13 -2
- package/es/components/icons/UserIcon.js +13 -2
- package/es/components/icons/VerticalDotsIcon.js +13 -2
- package/es/components/icons/WarningIcon.js +13 -2
- package/es/components/icons/Web.js +13 -2
- package/es/components/icons/WebAsset.js +13 -2
- package/es/components/molecules/AlignSetting/index.js +20 -9
- package/es/components/molecules/AlignSetting/styled.js +6 -5
- package/es/components/molecules/AlignSetting/utils.js +2 -2
- package/es/components/molecules/CaptureScreen/CaptureScreen.js +269 -240
- package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.js +36 -25
- package/es/components/molecules/CaptureScreen/components/CommentBox/styled.js +15 -129
- package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.js +2 -2
- package/es/components/molecules/CaptureScreen/components/Cursor/styled.js +10 -73
- package/es/components/molecules/CaptureScreen/constants.js +7 -7
- package/es/components/molecules/CaptureScreen/hooks/useImageEditor.d.ts +1 -1
- package/es/components/molecules/CaptureScreen/hooks/useImageEditor.js +23 -23
- package/es/components/molecules/CaptureScreen/styled.js +28 -247
- package/es/components/molecules/CaptureScreen/themes/black.js +1 -1
- package/es/components/molecules/CaptureScreen/themes/white.js +1 -1
- package/es/components/molecules/CaptureScreen/utils.js +32 -29
- package/es/components/molecules/Card/Card.js +1 -1
- package/es/components/molecules/ChatBox/ChatBox.js +147 -81
- package/es/components/molecules/ChatBox/MessageItem.js +22 -20
- package/es/components/molecules/ChatBox/constants.js +2 -2
- package/es/components/molecules/ChatBox/styled.js +13 -275
- package/es/components/molecules/Collapse/Collapse.js +4 -3
- package/es/components/molecules/ColorPicker/ChromePicker/index.js +1 -1
- package/es/components/molecules/ColorPicker/ChromePicker/styled.js +6 -11
- package/es/components/molecules/ColorPicker/CustomPicker/index.js +33 -21
- package/es/components/molecules/ColorPicker/CustomPicker/styled.js +14 -95
- package/es/components/molecules/ColorPicker/SketchPicker/index.js +12 -1
- package/es/components/molecules/ColorPicker/SketchPicker/styled.js +6 -6
- package/es/components/molecules/ColorPicker/index.js +17 -17
- package/es/components/molecules/ColorPicker/styled.js +6 -8
- package/es/components/molecules/ColorSetting/index.js +35 -15
- package/es/components/molecules/ColorSetting/styled.js +9 -36
- package/es/components/molecules/DatePicker/DatePicker.js +1 -1
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +146 -112
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +10 -10
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +12 -45
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +8 -3
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +28 -9
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.js +1 -1
- package/es/components/molecules/Drawer/Drawer.js +1 -1
- package/es/components/molecules/EdgeSetting/index.js +69 -45
- package/es/components/molecules/EdgeSetting/styled.js +8 -13
- package/es/components/molecules/FontFamilySelect/constants.js +1 -1
- package/es/components/molecules/FontFamilySelect/index.js +33 -10
- package/es/components/molecules/FontSetting/constants.js +2 -2
- package/es/components/molecules/FontSetting/index.js +36 -22
- package/es/components/molecules/FontWeightSelect/constants.js +1 -1
- package/es/components/molecules/FontWeightSelect/index.js +32 -9
- package/es/components/molecules/GradientSetting/index.js +55 -35
- package/es/components/molecules/GradientSetting/styled.js +6 -58
- package/es/components/molecules/IconSelection/components/Icon/index.js +19 -8
- package/es/components/molecules/IconSelection/constants.js +37 -31
- package/es/components/molecules/IconSelection/index.js +56 -43
- package/es/components/molecules/IconSelection/styled.js +10 -74
- package/es/components/molecules/IconSelection/types.js +3 -1
- package/es/components/molecules/IconSelection/utils.js +3 -3
- package/es/components/molecules/InputNumber/index.js +23 -12
- package/es/components/molecules/InputNumberWithUnit/index.js +19 -5
- package/es/components/molecules/InputNumberWithUnit/styled.js +6 -15
- package/es/components/molecules/InputSearch/index.js +14 -3
- package/es/components/molecules/InputSearch/styled.js +6 -43
- package/es/components/molecules/Modal/Modal.js +23 -8
- package/es/components/molecules/Modal/styled.js +17 -69
- package/es/components/molecules/ModalV2/ModalV2.js +17 -6
- package/es/components/molecules/ModalV2/styled.js +6 -19
- package/es/components/molecules/Popconfirm/Popconfirm.js +1 -1
- package/es/components/molecules/PopupDraggable/PopupDraggable.js +25 -13
- package/es/components/molecules/PopupDraggable/styled.js +11 -47
- package/es/components/molecules/PreviewModal/PreviewModal.js +16 -5
- package/es/components/molecules/PreviewModal/styled.js +9 -30
- package/es/components/molecules/RadioGroup/index.js +14 -3
- package/es/components/molecules/RadioGroup/styled.js +7 -11
- package/es/components/molecules/ResizeGrid/ResizeGrid.js +338 -275
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +37 -23
- package/es/components/molecules/ResizeGrid/components/Cell/styled.js +6 -78
- package/es/components/molecules/ResizeGrid/constant.js +37 -26
- package/es/components/molecules/ResizeGrid/styled.js +9 -54
- package/es/components/molecules/Result/Result.js +1 -1
- package/es/components/molecules/RichMenuBlock/RichMenuBlock.js +34 -23
- package/es/components/molecules/RichMenuBlock/RichMenuCell/index.js +11 -11
- package/es/components/molecules/RichMenuBlock/RichMenuCell/styled.js +18 -34
- package/es/components/molecules/RichMenuBlock/constants.js +1 -1
- package/es/components/molecules/RichMenuBlock/styled.js +16 -15
- package/es/components/molecules/RichMenuChatBar/RichMenuChatBar.js +17 -6
- package/es/components/molecules/RichMenuChatBar/TypingChat/index.js +3 -3
- package/es/components/molecules/RichMenuChatBar/TypingChat/styled.js +8 -43
- package/es/components/molecules/RichMenuChatBar/styled.js +10 -25
- package/es/components/molecules/RichMenuMobileView/RichMenuMobileView.js +22 -7
- package/es/components/molecules/RichMenuMobileView/styled.js +11 -18
- package/es/components/molecules/Select/Select.js +20 -9
- package/es/components/molecules/Select/Test.js +2 -2
- package/es/components/molecules/Select/styled.js +7 -34
- package/es/components/molecules/SettingWrapper/index.js +2 -2
- package/es/components/molecules/SettingWrapper/styled.js +9 -15
- package/es/components/molecules/SettingWrapperPopover/index.js +16 -4
- package/es/components/molecules/SliderWithInputNumber/index.js +19 -8
- package/es/components/molecules/SliderWithInputNumber/styled.js +6 -3
- package/es/components/molecules/TextDecorationSelect/constants.js +1 -1
- package/es/components/molecules/TextDecorationSelect/index.js +32 -9
- package/es/components/molecules/TextTransformSelect/constants.js +1 -1
- package/es/components/molecules/TextTransformSelect/index.js +32 -9
- package/es/components/molecules/TreeSelect/TreeSelect.js +1 -1
- package/es/components/molecules/UploadImage/MediaIcon.js +2 -2
- package/es/components/molecules/UploadImage/index.js +280 -182
- package/es/components/molecules/UploadImage/styled.js +16 -129
- package/es/components/organism/Help/Help.js +530 -422
- package/es/components/organism/Help/constants.js +12 -11
- package/es/components/organism/Help/styled.js +48 -257
- package/es/components/organism/Help/utils.js +11 -11
- package/es/components/organism/PositionSetting/config.js +2 -2
- package/es/components/organism/PositionSetting/index.js +27 -15
- package/es/components/organism/PositionSetting/styled.js +6 -1
- package/es/components/organism/Table/CrossTabTable/CrossTabTable.js +10 -10
- package/es/components/organism/Table/CrossTabTable/components/CustomCell/CustomCell.js +6 -6
- package/es/components/organism/Table/CrossTabTable/components/CustomCell/styled.js +6 -12
- package/es/components/organism/Table/CrossTabTable/constants.js +3 -3
- package/es/components/organism/Table/CrossTabTable/styled.js +6 -12
- package/es/components/organism/Table/CrossTabTable/utils.js +1 -1
- package/es/components/organism/Table/ExplorePivotTable/ExplorePivotTable.js +23 -12
- package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/CustomCell.js +8 -8
- package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/styled.js +8 -20
- package/es/components/organism/Table/ExplorePivotTable/constants.js +2 -2
- package/es/components/organism/Table/ExplorePivotTable/styled.js +7 -13
- package/es/components/organism/Table/ExplorePivotTable/utils.js +72 -52
- package/es/constants/gradientSetting.js +4 -4
- package/es/constants/keyCode.js +387 -387
- package/es/constants/richMenu.js +2 -2
- package/es/constants/storybook.js +2 -2
- package/es/constants/theme.js +6 -6
- package/es/hooks/index.js +1 -1
- package/es/hooks/useDebounce.js +5 -5
- package/es/hooks/useDeepCompareEffect.js +1 -1
- package/es/locales/i18n.js +2 -2
- package/es/locales/translations.js +23 -7
- package/es/models/SavedImage.js +68 -23
- package/es/models/Upload.js +64 -19
- package/es/models/model.js +5 -3
- package/es/services/MediaTemplateDesign/UploadFile/index.js +102 -46
- package/es/services/Ticket.js +89 -48
- package/es/services/constants.js +3 -3
- package/es/services/index.js +30 -19
- package/es/test.js +36 -25
- package/es/utils/color.js +22 -22
- package/es/utils/common.js +88 -75
- package/es/utils/handleError.js +49 -8
- package/es/utils/loadable.js +18 -6
- package/es/utils/web.js +26 -20
- package/package.json +3 -3
- package/dist/02028cc6be94478e1f13.svg +0 -1
- package/dist/0dfb9214dfd945cd7290.png +0 -1
- package/dist/19a777928d8a4fb24864.svg +0 -1
- package/dist/256cc472918edbfc13f3.ttf +0 -0
- package/dist/42deb30bedf71d95ec56.woff +0 -0
- package/dist/574b7bee0563a9fe9a29.png +0 -1
- package/dist/a772098db05052e4b517.eot +0 -0
- package/dist/bc6bf11c6f5e6743aa4c.png +0 -1
- package/dist/e32f09119052a55cce3c.png +0 -1
- package/dist/e3851b9384a984c6fdb5.png +0 -1
- package/dist/f422f99dc05cb0013092.png +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.LICENSE.txt +0 -69
- package/dist/main.css +0 -69
- package/dist/public/icons/2d496b55d85a9545d7311c073af442bb.png +0 -0
- package/dist/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png +0 -0
- package/dist/public/icons/84d7dd910e6235dc6ce60657dd3bb062.svg +0 -87
- package/dist/public/icons/90553767e0a05b9585a54797cfd9ce51.png +0 -0
- package/dist/public/icons/97210ba7dc321670f4a144c1b40e88d8.png +0 -0
- package/dist/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png +0 -0
- package/dist/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png +0 -0
- package/dist/public/icons/fe347d51ab67ec846138b9a565b3071b.svg +0 -361
- package/dist/public/icons/iphone-top-bar.png +0 -0
- package/dist/public/icons/iphone.png +0 -0
- package/dist/public/icons/placeholder-image.png +0 -0
- package/dist/public/icons/stars_slider.png +0 -0
- package/dist/public/icons/transparent.svg +0 -1
|
@@ -1,19 +1,12 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
1
5
|
var _a, _b, _c, _d;
|
|
2
6
|
// Libraries
|
|
3
7
|
import styled from 'styled-components';
|
|
4
8
|
import { Alert as AntdAlert } from 'antd';
|
|
5
9
|
// Constants
|
|
6
10
|
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
font-size: ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.fontSize}px;
|
|
10
|
-
|
|
11
|
-
.antsomi-alert-message {
|
|
12
|
-
color: ${(_b = THEME.token) === null || _b === void 0 ? void 0 : _b.colorTextBase} !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&.antsomi-alert-info {
|
|
16
|
-
background-color: ${(_c = THEME.token) === null || _c === void 0 ? void 0 : _c.bw1};
|
|
17
|
-
border-color: ${(_d = THEME.token) === null || _d === void 0 ? void 0 : _d.bw1};
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
11
|
+
export var Alert = styled(AntdAlert)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 10px;\n font-size: ", "px;\n\n .antsomi-alert-message {\n color: ", " !important;\n }\n\n &.antsomi-alert-info {\n background-color: ", ";\n border-color: ", ";\n }\n"], ["\n padding: 10px;\n font-size: ", "px;\n\n .antsomi-alert-message {\n color: ", " !important;\n }\n\n &.antsomi-alert-info {\n background-color: ", ";\n border-color: ", ";\n }\n"])), (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.fontSize, (_b = THEME.token) === null || _b === void 0 ? void 0 : _b.colorTextBase, (_c = THEME.token) === null || _c === void 0 ? void 0 : _c.bw1, (_d = THEME.token) === null || _d === void 0 ? void 0 : _d.bw1);
|
|
12
|
+
var templateObject_1;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Button as AntdButton } from './Button';
|
|
2
|
-
export
|
|
2
|
+
export var Button = AntdButton;
|
|
@@ -3,15 +3,15 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import Icon from '@antscorp/icons';
|
|
4
4
|
// Components
|
|
5
5
|
import { Button, Divider, Radio, Space, Modal } from '../../index';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
var TestIcon = function () { return React.createElement(Icon, { type: "icon-ants-toggle-on" }); };
|
|
7
|
+
var TestButton = function () {
|
|
8
|
+
var _a = useState('large'), size = _a[0], setSize = _a[1]; // default is 'middle'
|
|
9
|
+
var _b = Modal.useModal(), api = _b[0], context = _b[1];
|
|
10
10
|
return (React.createElement(React.Fragment, null,
|
|
11
11
|
context,
|
|
12
12
|
React.createElement(Space, { direction: "vertical", size: 20 },
|
|
13
13
|
React.createElement(Space, { wrap: true },
|
|
14
|
-
React.createElement(Button, { type: "primary", onClick: ()
|
|
14
|
+
React.createElement(Button, { type: "primary", onClick: function () {
|
|
15
15
|
api.confirm({
|
|
16
16
|
title: 'hello',
|
|
17
17
|
content: 'this is me',
|
|
@@ -40,7 +40,7 @@ const TestButton = () => {
|
|
|
40
40
|
React.createElement(Button, { type: "dashed" }, "Dashed Button"),
|
|
41
41
|
React.createElement(Button, { type: "text" }, "Text Button"),
|
|
42
42
|
React.createElement(Button, { type: "link" }, "Link Button")),
|
|
43
|
-
React.createElement(Radio.Group, { value: size, onChange: e
|
|
43
|
+
React.createElement(Radio.Group, { value: size, onChange: function (e) { return setSize(e.target.value); } },
|
|
44
44
|
React.createElement(Radio.Button, { value: "large" }, "Large"),
|
|
45
45
|
React.createElement(Radio.Button, { value: "default" }, "Default"),
|
|
46
46
|
React.createElement(Radio.Button, { value: "small" }, "Small")),
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
13
|
var t = {};
|
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -14,12 +25,12 @@ import classNames from 'classnames';
|
|
|
14
25
|
import * as React from 'react';
|
|
15
26
|
// Styled
|
|
16
27
|
import { Wrapper } from './styled';
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
return (React.createElement(Wrapper,
|
|
28
|
+
export var DividerPure = function (props) {
|
|
29
|
+
var type = props.type, dot = props.dot, dashed = props.dashed, className = props.className, style = props.style, width = props.width, height = props.height, children = props.children, restOf = __rest(props, ["type", "dot", "dashed", "className", "style", "width", "height", "children"]);
|
|
30
|
+
return (React.createElement(Wrapper, __assign({ className: classNames("--".concat(type), className, {
|
|
20
31
|
'--dot': dot,
|
|
21
32
|
'--dashed': dashed,
|
|
22
|
-
}), style:
|
|
33
|
+
}), style: __assign(__assign({}, style), { height: height, width: width }) }, restOf)));
|
|
23
34
|
};
|
|
24
35
|
DividerPure.defaultProps = {
|
|
25
36
|
type: 'horizontal',
|
|
@@ -1,41 +1,11 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
1
5
|
var _a, _b;
|
|
2
6
|
// Libraries
|
|
3
7
|
import styled from 'styled-components';
|
|
4
8
|
// Constants
|
|
5
9
|
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
border-top-width: 1px;
|
|
9
|
-
border-color: '#e3eef1';
|
|
10
|
-
width: 100%;
|
|
11
|
-
margin-top: 20px;
|
|
12
|
-
margin-bottom: 20px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&.--vertical {
|
|
16
|
-
border-right-width: 1px;
|
|
17
|
-
border-color: '#e3eef1';
|
|
18
|
-
min-height: 30px;
|
|
19
|
-
width: max-content;
|
|
20
|
-
margin-left: 14px;
|
|
21
|
-
margin-right: 14px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.--dot {
|
|
25
|
-
border-style: dotted;
|
|
26
|
-
border-color: ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.accent3};
|
|
27
|
-
|
|
28
|
-
&.--vertical {
|
|
29
|
-
border-right-width: 2px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&.--dashed {
|
|
34
|
-
border-style: dashed;
|
|
35
|
-
border-color: ${(_b = THEME.token) === null || _b === void 0 ? void 0 : _b.accent3};
|
|
36
|
-
|
|
37
|
-
&.--vertical {
|
|
38
|
-
border-right-width: 2px;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
10
|
+
export var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.--horizontal {\n border-top-width: 1px;\n border-color: '#e3eef1';\n width: 100%;\n margin-top: 20px;\n margin-bottom: 20px;\n }\n\n &.--vertical {\n border-right-width: 1px;\n border-color: '#e3eef1';\n min-height: 30px;\n width: max-content;\n margin-left: 14px;\n margin-right: 14px;\n }\n\n &.--dot {\n border-style: dotted;\n border-color: ", ";\n\n &.--vertical {\n border-right-width: 2px;\n }\n }\n\n &.--dashed {\n border-style: dashed;\n border-color: ", ";\n\n &.--vertical {\n border-right-width: 2px;\n }\n }\n"], ["\n &.--horizontal {\n border-top-width: 1px;\n border-color: '#e3eef1';\n width: 100%;\n margin-top: 20px;\n margin-bottom: 20px;\n }\n\n &.--vertical {\n border-right-width: 1px;\n border-color: '#e3eef1';\n min-height: 30px;\n width: max-content;\n margin-left: 14px;\n margin-right: 14px;\n }\n\n &.--dot {\n border-style: dotted;\n border-color: ", ";\n\n &.--vertical {\n border-right-width: 2px;\n }\n }\n\n &.--dashed {\n border-style: dashed;\n border-color: ", ";\n\n &.--vertical {\n border-right-width: 2px;\n }\n }\n"])), (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.accent3, (_b = THEME.token) === null || _b === void 0 ? void 0 : _b.accent3);
|
|
11
|
+
var templateObject_1;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Empty as AntdEmpty } from 'antd';
|
|
2
|
-
export
|
|
2
|
+
export var Empty = AntdEmpty;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FloatButton as AntdFloatButton } from './FloatButton';
|
|
2
|
-
export
|
|
2
|
+
export var FloatButton = AntdFloatButton;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Row as AntdRow, Col as AntdCol } from 'antd';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export var Row = AntdRow;
|
|
3
|
+
export var Col = AntdCol;
|
|
@@ -1,36 +1,23 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
1
5
|
// Libraries
|
|
2
6
|
import styled, { css } from 'styled-components';
|
|
3
7
|
// Components
|
|
4
8
|
import AntsIcon from '@antscorp/icons';
|
|
5
9
|
// Constants
|
|
6
10
|
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`
|
|
16
|
-
: css `
|
|
17
|
-
font-size: 20px;
|
|
18
|
-
line-height: 1;
|
|
19
|
-
`}
|
|
20
|
-
|
|
21
|
-
${p => p.color
|
|
22
|
-
? css `
|
|
23
|
-
color: ${p.color} !important;
|
|
24
|
-
`
|
|
25
|
-
: null}
|
|
26
|
-
|
|
27
|
-
${p => {
|
|
11
|
+
var DraftAntsIcon = AntsIcon;
|
|
12
|
+
export var Icon = styled(DraftAntsIcon)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n ", "\n\n ", "\n\n ", "\n"], ["\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (p) { return (p.style ? css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["style"], ["style"]))) : null); }, function (p) {
|
|
13
|
+
return p.size
|
|
14
|
+
? css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", "px !important;\n height: ", "px !important;\n font-size: ", "px !important;\n "], ["\n width: ", "px !important;\n height: ", "px !important;\n font-size: ", "px !important;\n "])), p.width || p.size, p.height || p.size, p.size) : css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 20px;\n line-height: 1;\n "], ["\n font-size: 20px;\n line-height: 1;\n "])));
|
|
15
|
+
}, function (p) {
|
|
16
|
+
return p.color
|
|
17
|
+
? css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", " !important;\n "], ["\n color: ", " !important;\n "])), p.color) : null;
|
|
18
|
+
}, function (p) {
|
|
28
19
|
var _a;
|
|
29
20
|
return p.disabled
|
|
30
|
-
? css
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
`
|
|
34
|
-
: null;
|
|
35
|
-
}}
|
|
36
|
-
`;
|
|
21
|
+
? css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n cursor: not-allowed !important;\n color: ", " !important;\n "], ["\n cursor: not-allowed !important;\n color: ", " !important;\n "])), (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorTextDisabled) : null;
|
|
22
|
+
});
|
|
23
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
13
|
var t = {};
|
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -21,41 +32,41 @@ import { RequiredLabel, Text } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
|
21
32
|
import { handleError } from '@antscorp/antsomi-ui/es/utils';
|
|
22
33
|
import { getPreventKeyboardAction } from '@antscorp/antsomi-ui/es/utils/web';
|
|
23
34
|
import { StyledInput } from './styled';
|
|
24
|
-
|
|
25
|
-
|
|
35
|
+
var PATH = '@antscorp/antsomi-ui/es/components/atoms/Input/Input.tsx';
|
|
36
|
+
var OriginInput = function (props) {
|
|
26
37
|
// Props
|
|
27
|
-
|
|
38
|
+
var debounce = props.debounce, errorArchive = props.errorArchive, required = props.required, labelColor = props.labelColor, isReverseMask = props.isReverseMask, isHideErrMessage = props.isHideErrMessage, focused = props.focused, label = props.label, onAfterChange = props.onAfterChange, onChange = props.onChange, errorMsg = props.errorMsg, restProps = __rest(props, ["debounce", "errorArchive", "required", "labelColor", "isReverseMask", "isHideErrMessage", "focused", "label", "onAfterChange", "onChange", "errorMsg"]);
|
|
28
39
|
// State
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
var _a = useState(props.value), value = _a[0], setValue = _a[1];
|
|
41
|
+
var _b = useState(false), isFocused = _b[0], setFocused = _b[1];
|
|
42
|
+
var requiredMsg = useMemo(function () {
|
|
43
|
+
var msg = '';
|
|
44
|
+
var isEmptyValue = !props.value || (Array.isArray(props.value) && !props.value.length);
|
|
34
45
|
if (required && isEmptyValue && isFocused) {
|
|
35
46
|
msg = 'This field is required';
|
|
36
47
|
}
|
|
37
48
|
return msg;
|
|
38
49
|
}, [props.value, required, isFocused]);
|
|
39
50
|
// Ref
|
|
40
|
-
|
|
41
|
-
useEffect(()
|
|
51
|
+
var timeoutAfterChange = useRef(null);
|
|
52
|
+
useEffect(function () {
|
|
42
53
|
setValue(props.value);
|
|
43
54
|
}, [props.value]);
|
|
44
|
-
useEffect(()
|
|
55
|
+
useEffect(function () {
|
|
45
56
|
if (focused) {
|
|
46
57
|
setFocused(focused);
|
|
47
58
|
}
|
|
48
59
|
}, [focused]);
|
|
49
|
-
|
|
60
|
+
var onChangeInput = function (event) {
|
|
50
61
|
try {
|
|
51
|
-
|
|
52
|
-
setValue(
|
|
62
|
+
var value_1 = event.target.value;
|
|
63
|
+
setValue(value_1);
|
|
53
64
|
onChange && onChange(event);
|
|
54
65
|
if (timeoutAfterChange) {
|
|
55
66
|
clearTimeout(timeoutAfterChange.current);
|
|
56
67
|
}
|
|
57
|
-
timeoutAfterChange.current = setTimeout(()
|
|
58
|
-
onAfterChange && onAfterChange(
|
|
68
|
+
timeoutAfterChange.current = setTimeout(function () {
|
|
69
|
+
onAfterChange && onAfterChange(value_1);
|
|
59
70
|
}, debounce);
|
|
60
71
|
}
|
|
61
72
|
catch (error) {
|
|
@@ -66,19 +77,19 @@ const OriginInput = props => {
|
|
|
66
77
|
});
|
|
67
78
|
}
|
|
68
79
|
};
|
|
69
|
-
|
|
80
|
+
var renderRequiredLabel = function (label) {
|
|
70
81
|
if (required) {
|
|
71
82
|
return (React.createElement(RequiredLabel, { isReverseMask: isReverseMask, color: labelColor || '#666666', style: { marginBottom: 5 } }, label));
|
|
72
83
|
}
|
|
73
84
|
return (React.createElement(Text, { color: "#666666", style: { marginBottom: 5 } }, label));
|
|
74
85
|
};
|
|
75
|
-
|
|
86
|
+
var listDisableActions = [];
|
|
76
87
|
if (props.disableUndo) {
|
|
77
88
|
listDisableActions.push('undo');
|
|
78
89
|
}
|
|
79
90
|
return (React.createElement("div", { className: "input__wrapper" },
|
|
80
91
|
label && renderRequiredLabel(label),
|
|
81
|
-
React.createElement(StyledInput,
|
|
92
|
+
React.createElement(StyledInput, __assign({}, restProps, { value: value, onBlur: function (e) {
|
|
82
93
|
if (!isFocused) {
|
|
83
94
|
setFocused(true);
|
|
84
95
|
}
|
|
@@ -90,7 +101,7 @@ OriginInput.defaultProps = {
|
|
|
90
101
|
debounce: 400,
|
|
91
102
|
isHideErrMessage: false,
|
|
92
103
|
};
|
|
93
|
-
export
|
|
104
|
+
export var Input = OriginInput;
|
|
94
105
|
Input.TextArea = StyledInput.TextArea;
|
|
95
106
|
Input.DefaultInput = AntdInput;
|
|
96
|
-
export
|
|
107
|
+
export var TextArea = StyledInput.TextArea;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
1
5
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2
6
|
// Styled
|
|
3
7
|
import styled, { css } from 'styled-components';
|
|
@@ -5,105 +9,11 @@ import styled, { css } from 'styled-components';
|
|
|
5
9
|
import { Input as InputAntd } from 'antd';
|
|
6
10
|
// Constants
|
|
7
11
|
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
border-radius: 0px
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
font-size: ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.fontSize}px;
|
|
17
|
-
--tw-shadow: 0 1px 0 0 #e0e0e0;
|
|
18
|
-
--tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);
|
|
19
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
|
|
20
|
-
var(--tw-shadow);
|
|
21
|
-
|
|
22
|
-
&::placeholder {
|
|
23
|
-
color: ${(_b = THEME.token) === null || _b === void 0 ? void 0 : _b.accent5};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&:hover {
|
|
27
|
-
background-color: ${(_c = THEME.token) === null || _c === void 0 ? void 0 : _c.blue0};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
transition-property: all;
|
|
31
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
32
|
-
transition-duration: 150ms;
|
|
33
|
-
|
|
34
|
-
${({ noborder }) => noborder &&
|
|
35
|
-
css `
|
|
36
|
-
--tw-shadow: 0 0 #0000;
|
|
37
|
-
--tw-shadow-colored: 0 0 #0000;
|
|
38
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
|
|
39
|
-
var(--tw-shadow);
|
|
40
|
-
padding-left: 0;
|
|
41
|
-
padding-right: 0;
|
|
42
|
-
`}
|
|
43
|
-
|
|
44
|
-
&:active,
|
|
45
|
-
&:focus {
|
|
46
|
-
background-color: ${(_d = THEME.token) === null || _d === void 0 ? void 0 : _d.blue0};
|
|
47
|
-
--tw-shadow: 0 1px 0 0 #194e8d;
|
|
48
|
-
--tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);
|
|
49
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
|
|
50
|
-
var(--tw-shadow);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&:disabled {
|
|
54
|
-
background-color: ${(_e = THEME.token) === null || _e === void 0 ? void 0 : _e.accent1};
|
|
55
|
-
color: ${(_f = THEME.token) === null || _f === void 0 ? void 0 : _f.accent5};
|
|
56
|
-
--tw-shadow: 0 1px 0 0 #e0e0e0;
|
|
57
|
-
--tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);
|
|
58
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
|
|
59
|
-
var(--tw-shadow);
|
|
60
|
-
} */
|
|
61
|
-
`;
|
|
62
|
-
export const TextArea = styled(InputAntd.TextArea) `
|
|
63
|
-
height: 30px;
|
|
64
|
-
border-style: none;
|
|
65
|
-
border-radius: 0px;
|
|
66
|
-
padding-left: 5px;
|
|
67
|
-
padding-right: 5px;
|
|
68
|
-
font-family: 'Roboto';
|
|
69
|
-
font-size: ${(_g = THEME.token) === null || _g === void 0 ? void 0 : _g.fontSize}px;
|
|
70
|
-
--tw-shadow: 0 1px 0 0 #e0e0e0;
|
|
71
|
-
--tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);
|
|
72
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
|
|
73
|
-
var(--tw-shadow);
|
|
74
|
-
|
|
75
|
-
&::placeholder {
|
|
76
|
-
color: ${(_h = THEME.token) === null || _h === void 0 ? void 0 : _h.accent5};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&:hover {
|
|
80
|
-
background-color: ${(_j = THEME.token) === null || _j === void 0 ? void 0 : _j.blue0};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
transition-property: all;
|
|
84
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
85
|
-
transition-duration: 150ms;
|
|
86
|
-
|
|
87
|
-
&:active,
|
|
88
|
-
&:focus {
|
|
89
|
-
background-color: ${(_k = THEME.token) === null || _k === void 0 ? void 0 : _k.blue0};
|
|
90
|
-
--tw-shadow: 0 1px 0 0 #194e8d;
|
|
91
|
-
--tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);
|
|
92
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
|
|
93
|
-
var(--tw-shadow);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&:disabled {
|
|
97
|
-
background-color: ${(_l = THEME.token) === null || _l === void 0 ? void 0 : _l.accent1};
|
|
98
|
-
color: ${(_m = THEME.token) === null || _m === void 0 ? void 0 : _m.accent5};
|
|
99
|
-
--tw-shadow: 0 1px 0 0 #e0e0e0;
|
|
100
|
-
--tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);
|
|
101
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
|
|
102
|
-
var(--tw-shadow);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
${props => props.showBorder &&
|
|
106
|
-
css `
|
|
107
|
-
border: 1px solid #e0e0e0;
|
|
108
|
-
`}
|
|
109
|
-
`;
|
|
12
|
+
export var StyledInput = styled(InputAntd)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* height: 30px;\n height: 30px;\n border-style: none;\n border-radius: 0px;\n padding-left: 5px;\n padding-right: 5px;\n font-family: 'Roboto';\n font-size: ", "px;\n --tw-shadow: 0 1px 0 0 #e0e0e0;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n\n &::placeholder {\n color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n\n ", "\n\n &:active,\n &:focus {\n background-color: ", ";\n --tw-shadow: 0 1px 0 0 #194e8d;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n --tw-shadow: 0 1px 0 0 #e0e0e0;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n } */\n"], ["\n /* height: 30px;\n height: 30px;\n border-style: none;\n border-radius: 0px;\n padding-left: 5px;\n padding-right: 5px;\n font-family: 'Roboto';\n font-size: ", "px;\n --tw-shadow: 0 1px 0 0 #e0e0e0;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n\n &::placeholder {\n color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n\n ", "\n\n &:active,\n &:focus {\n background-color: ", ";\n --tw-shadow: 0 1px 0 0 #194e8d;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n --tw-shadow: 0 1px 0 0 #e0e0e0;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n } */\n"])), (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.fontSize, (_b = THEME.token) === null || _b === void 0 ? void 0 : _b.accent5, (_c = THEME.token) === null || _c === void 0 ? void 0 : _c.blue0, function (_a) {
|
|
13
|
+
var noborder = _a.noborder;
|
|
14
|
+
return noborder && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n padding-left: 0;\n padding-right: 0;\n "], ["\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n padding-left: 0;\n padding-right: 0;\n "])));
|
|
15
|
+
}, (_d = THEME.token) === null || _d === void 0 ? void 0 : _d.blue0, (_e = THEME.token) === null || _e === void 0 ? void 0 : _e.accent1, (_f = THEME.token) === null || _f === void 0 ? void 0 : _f.accent5);
|
|
16
|
+
export var TextArea = styled(InputAntd.TextArea)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 30px;\n border-style: none;\n border-radius: 0px;\n padding-left: 5px;\n padding-right: 5px;\n font-family: 'Roboto';\n font-size: ", "px;\n --tw-shadow: 0 1px 0 0 #e0e0e0;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n\n &::placeholder {\n color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n\n &:active,\n &:focus {\n background-color: ", ";\n --tw-shadow: 0 1px 0 0 #194e8d;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n --tw-shadow: 0 1px 0 0 #e0e0e0;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n }\n\n ", "\n"], ["\n height: 30px;\n border-style: none;\n border-radius: 0px;\n padding-left: 5px;\n padding-right: 5px;\n font-family: 'Roboto';\n font-size: ", "px;\n --tw-shadow: 0 1px 0 0 #e0e0e0;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n\n &::placeholder {\n color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n\n &:active,\n &:focus {\n background-color: ", ";\n --tw-shadow: 0 1px 0 0 #194e8d;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n --tw-shadow: 0 1px 0 0 #e0e0e0;\n --tw-shadow-colored: 0 1px 0 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n }\n\n ", "\n"])), (_g = THEME.token) === null || _g === void 0 ? void 0 : _g.fontSize, (_h = THEME.token) === null || _h === void 0 ? void 0 : _h.accent5, (_j = THEME.token) === null || _j === void 0 ? void 0 : _j.blue0, (_k = THEME.token) === null || _k === void 0 ? void 0 : _k.blue0, (_l = THEME.token) === null || _l === void 0 ? void 0 : _l.accent1, (_m = THEME.token) === null || _m === void 0 ? void 0 : _m.accent5, function (props) {
|
|
17
|
+
return props.showBorder && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border: 1px solid #e0e0e0;\n "], ["\n border: 1px solid #e0e0e0;\n "])));
|
|
18
|
+
});
|
|
19
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
/* eslint-disable func-names */
|
|
5
5
|
/* eslint-disable object-shorthand */
|
|
6
6
|
/* eslint-disable prefer-const */
|
|
7
|
-
|
|
7
|
+
var EditCaretPositioning = {};
|
|
8
8
|
if (window.getSelection && document.createRange) {
|
|
9
9
|
// saves caret position(s)
|
|
10
10
|
EditCaretPositioning.saveSelection = function (containerEl) {
|
|
11
11
|
var _a;
|
|
12
12
|
try {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
var range = (_a = window === null || window === void 0 ? void 0 : window.getSelection()) === null || _a === void 0 ? void 0 : _a.getRangeAt(0);
|
|
14
|
+
var preSelectionRange = range === null || range === void 0 ? void 0 : range.cloneRange();
|
|
15
15
|
preSelectionRange === null || preSelectionRange === void 0 ? void 0 : preSelectionRange.selectNodeContents(containerEl);
|
|
16
16
|
preSelectionRange === null || preSelectionRange === void 0 ? void 0 : preSelectionRange.setEnd(range === null || range === void 0 ? void 0 : range.startContainer, range === null || range === void 0 ? void 0 : range.startOffset);
|
|
17
|
-
|
|
17
|
+
var start = preSelectionRange === null || preSelectionRange === void 0 ? void 0 : preSelectionRange.toString().length;
|
|
18
18
|
return {
|
|
19
19
|
start: start,
|
|
20
20
|
end: start + (range === null || range === void 0 ? void 0 : range.toString().length),
|
|
@@ -31,13 +31,13 @@ if (window.getSelection && document.createRange) {
|
|
|
31
31
|
};
|
|
32
32
|
// restores caret position(s)
|
|
33
33
|
EditCaretPositioning.restoreSelection = function (containerEl, savedSel) {
|
|
34
|
-
|
|
34
|
+
var charIndex = 0, range = document.createRange();
|
|
35
35
|
range.setStart(containerEl, 0);
|
|
36
36
|
range.collapse(true);
|
|
37
|
-
|
|
37
|
+
var nodeStack = [containerEl], node, foundStart = false, stop = false;
|
|
38
38
|
while (!stop && (node = nodeStack.pop())) {
|
|
39
39
|
if (node.nodeType === 3) {
|
|
40
|
-
|
|
40
|
+
var nextCharIndex = charIndex + node.length;
|
|
41
41
|
if (!foundStart &&
|
|
42
42
|
savedSel &&
|
|
43
43
|
savedSel.start >= charIndex &&
|
|
@@ -52,13 +52,13 @@ if (window.getSelection && document.createRange) {
|
|
|
52
52
|
charIndex = nextCharIndex;
|
|
53
53
|
}
|
|
54
54
|
else {
|
|
55
|
-
|
|
55
|
+
var i = node.childNodes.length;
|
|
56
56
|
while (i--) {
|
|
57
57
|
nodeStack.push(node.childNodes[i]);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
var sel = window.getSelection();
|
|
62
62
|
sel === null || sel === void 0 ? void 0 : sel.removeAllRanges();
|
|
63
63
|
sel === null || sel === void 0 ? void 0 : sel.addRange(range);
|
|
64
64
|
};
|
|
@@ -66,11 +66,11 @@ if (window.getSelection && document.createRange) {
|
|
|
66
66
|
else if (document.selection && document.body.createTextRange) {
|
|
67
67
|
// saves caret position(s)
|
|
68
68
|
EditCaretPositioning.saveSelection = function (containerEl) {
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
var selectedTextRange = document.selection.createRange();
|
|
70
|
+
var preSelectionTextRange = document.body.createTextRange();
|
|
71
71
|
preSelectionTextRange.moveToElementText(containerEl);
|
|
72
72
|
preSelectionTextRange.setEndPoint('EndToStart', selectedTextRange);
|
|
73
|
-
|
|
73
|
+
var start = preSelectionTextRange.text.length;
|
|
74
74
|
return {
|
|
75
75
|
start: start,
|
|
76
76
|
end: start + selectedTextRange.text.length,
|
|
@@ -78,7 +78,7 @@ else if (document.selection && document.body.createTextRange) {
|
|
|
78
78
|
};
|
|
79
79
|
// restores caret position(s)
|
|
80
80
|
EditCaretPositioning.restoreSelection = function (containerEl, savedSel) {
|
|
81
|
-
|
|
81
|
+
var textRange = document.body.createTextRange();
|
|
82
82
|
textRange.moveToElementText(containerEl);
|
|
83
83
|
textRange.collapse(true);
|
|
84
84
|
textRange.moveEnd('character', savedSel.end);
|