assui 2.0.2 → 2.0.6
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/button-drawer/index.d.ts +10 -0
- package/es/button-drawer/index.js +116 -0
- package/es/button-drawer/style/index.d.ts +1 -0
- package/es/button-drawer/style/index.js +1 -0
- package/es/button-modal/index.d.ts +14 -0
- package/es/button-modal/index.js +131 -0
- package/es/button-modal/style/index.d.ts +1 -0
- package/es/button-modal/style/index.js +1 -0
- package/es/condition-input/index.d.ts +15 -0
- package/es/condition-input/index.js +108 -0
- package/es/condition-input/parse2RegexOption.d.ts +13 -0
- package/es/condition-input/parse2RegexOption.js +57 -0
- package/es/condition-input/style/index.d.ts +1 -0
- package/es/condition-input/style/index.js +1 -0
- package/es/copy-to-clipboard/index.d.ts +22 -0
- package/es/copy-to-clipboard/index.js +95 -0
- package/es/copy-to-clipboard/style/index.css +249 -0
- package/es/copy-to-clipboard/style/index.d.ts +1 -0
- package/es/copy-to-clipboard/style/index.js +1 -0
- package/es/copy-to-clipboard/style/index.less +1 -0
- package/es/highlight-textarea/HighlighedContents.d.ts +7 -0
- package/es/highlight-textarea/HighlighedContents.js +15 -0
- package/es/highlight-textarea/extractSpansOfClasses.d.ts +15 -0
- package/es/highlight-textarea/extractSpansOfClasses.js +159 -0
- package/es/highlight-textarea/getRanges.d.ts +2 -0
- package/es/highlight-textarea/getRanges.js +142 -0
- package/es/highlight-textarea/getType.d.ts +2 -0
- package/es/highlight-textarea/getType.js +29 -0
- package/es/highlight-textarea/index.d.ts +12 -0
- package/es/highlight-textarea/index.js +132 -0
- package/es/highlight-textarea/style/index.css +38 -0
- package/es/highlight-textarea/style/index.d.ts +2 -0
- package/es/highlight-textarea/style/index.js +2 -0
- package/es/highlight-textarea/style/index.less +42 -0
- package/es/highlight-textarea/types.d.ts +16 -0
- package/es/highlight-textarea/types.js +0 -0
- package/es/highlight-words/index.d.ts +3 -0
- package/es/highlight-words/index.js +2 -0
- package/es/highlight-words/style/index.d.ts +1 -0
- package/es/highlight-words/style/index.js +0 -0
- package/es/icon/demo/svg/check-circle-filled.svg +6 -0
- package/es/icon/demo/svg/coin-circle.svg +9 -0
- package/es/icon/index.d.ts +27 -0
- package/es/icon/index.js +95 -0
- package/es/icon/style/index.d.ts +1 -0
- package/es/icon/style/index.js +0 -0
- package/es/icon/utils.d.ts +6 -0
- package/es/icon/utils.js +22 -0
- package/es/img-crop/EasyCrop.d.ts +6 -0
- package/es/img-crop/EasyCrop.js +113 -0
- package/es/img-crop/getCroppedImg.d.ts +6 -0
- package/es/img-crop/getCroppedImg.js +199 -0
- package/es/img-crop/index.d.ts +53 -0
- package/es/img-crop/index.js +531 -0
- package/es/img-crop/style/index.css +52 -0
- package/es/img-crop/style/index.d.ts +3 -0
- package/es/img-crop/style/index.js +3 -0
- package/es/img-crop/style/index.less +54 -0
- package/es/index.d.ts +34 -2
- package/es/index.js +18 -2
- package/es/keep-tab/demo/index.modules.less +66 -0
- package/es/keep-tab/index.d.ts +29 -0
- package/es/keep-tab/index.js +129 -0
- package/es/keep-tab/style/index.css +1129 -0
- package/es/keep-tab/style/index.d.ts +2 -0
- package/es/keep-tab/style/index.js +2 -0
- package/es/keep-tab/style/index.less +2 -0
- package/es/number-input/index.d.ts +22 -7
- package/es/number-input/index.js +22 -11
- package/es/number-input/style/index.d.ts +1 -1
- package/es/number-input/style/index.js +1 -1
- package/es/number-input/utils.d.ts +10 -11
- package/es/number-input/utils.js +7 -7
- package/es/rc-echart/core.d.ts +32 -0
- package/es/rc-echart/core.js +136 -0
- package/es/rc-echart/index.d.ts +21 -0
- package/es/rc-echart/index.js +27 -0
- package/es/rc-echart/style/index.d.ts +1 -0
- package/es/rc-echart/style/index.js +0 -0
- package/es/rc-motion/demo/CSSMotion.less +91 -0
- package/es/rc-motion/index.d.ts +2 -0
- package/es/rc-motion/index.js +2 -0
- package/es/rc-motion/style/index.d.ts +1 -0
- package/es/rc-motion/style/index.js +0 -0
- package/es/rc-qrcode/index.d.ts +20 -0
- package/es/rc-qrcode/index.js +57 -0
- package/es/rc-qrcode/style/index.d.ts +1 -0
- package/es/rc-qrcode/style/index.js +0 -0
- package/es/rc-qrcode/useQrcode.d.ts +4 -0
- package/es/rc-qrcode/useQrcode.js +50 -0
- package/es/rc-transition-group/index.d.ts +2 -0
- package/es/rc-transition-group/index.js +2 -0
- package/es/rc-transition-group/style/index.d.ts +1 -0
- package/es/rc-transition-group/style/index.js +0 -0
- package/es/single-img-upload/index.d.ts +19 -0
- package/es/single-img-upload/index.js +199 -0
- package/es/single-img-upload/style/index.css +74 -0
- package/es/single-img-upload/style/index.d.ts +3 -0
- package/es/single-img-upload/style/index.js +3 -0
- package/es/single-img-upload/style/index.less +85 -0
- package/es/sortable-hoc/demo/VerticalListBase/index.modules.less +63 -0
- package/es/sortable-hoc/demo/index.modules.less +248 -0
- package/es/sortable-hoc/index.d.ts +2 -0
- package/es/sortable-hoc/index.js +2 -0
- package/es/sortable-hoc/style/index.d.ts +1 -0
- package/es/sortable-hoc/style/index.js +0 -0
- package/es/split-pane/index.d.ts +59 -0
- package/es/split-pane/index.js +21 -0
- package/es/split-pane/style/index.css +41 -0
- package/es/split-pane/style/index.d.ts +1 -0
- package/es/split-pane/style/index.js +1 -0
- package/es/split-pane/style/index.less +49 -0
- package/es/text-area/index.d.ts +12 -0
- package/es/text-area/index.js +96 -0
- package/es/text-area/style/index.d.ts +1 -0
- package/es/text-area/style/index.js +1 -0
- package/es/text-input/index.d.ts +5 -0
- package/es/text-input/index.js +85 -0
- package/es/{number-input → text-input}/style/index.css +0 -3
- package/es/text-input/style/index.d.ts +1 -0
- package/es/text-input/style/index.js +1 -0
- package/es/{number-input → text-input}/style/index.less +0 -4
- package/lib/button-drawer/index.d.ts +10 -0
- package/lib/button-drawer/index.js +164 -0
- package/lib/button-drawer/style/index.d.ts +1 -0
- package/lib/button-drawer/style/index.js +7 -0
- package/lib/button-modal/index.d.ts +14 -0
- package/lib/button-modal/index.js +178 -0
- package/lib/button-modal/style/index.d.ts +1 -0
- package/lib/button-modal/style/index.js +7 -0
- package/lib/condition-input/index.d.ts +15 -0
- package/lib/condition-input/index.js +158 -0
- package/lib/condition-input/parse2RegexOption.d.ts +13 -0
- package/lib/condition-input/parse2RegexOption.js +72 -0
- package/lib/condition-input/style/index.d.ts +1 -0
- package/lib/condition-input/style/index.js +7 -0
- package/lib/copy-to-clipboard/index.d.ts +22 -0
- package/lib/copy-to-clipboard/index.js +143 -0
- package/lib/copy-to-clipboard/style/index.css +249 -0
- package/lib/copy-to-clipboard/style/index.d.ts +1 -0
- package/lib/copy-to-clipboard/style/index.js +7 -0
- package/lib/copy-to-clipboard/style/index.less +1 -0
- package/lib/highlight-textarea/HighlighedContents.d.ts +7 -0
- package/lib/highlight-textarea/HighlighedContents.js +29 -0
- package/lib/highlight-textarea/extractSpansOfClasses.d.ts +15 -0
- package/lib/highlight-textarea/extractSpansOfClasses.js +173 -0
- package/lib/highlight-textarea/getRanges.d.ts +2 -0
- package/lib/highlight-textarea/getRanges.js +156 -0
- package/lib/highlight-textarea/getType.d.ts +2 -0
- package/lib/highlight-textarea/getType.js +37 -0
- package/lib/highlight-textarea/index.d.ts +12 -0
- package/lib/highlight-textarea/index.js +183 -0
- package/lib/highlight-textarea/style/index.css +38 -0
- package/lib/highlight-textarea/style/index.d.ts +2 -0
- package/lib/highlight-textarea/style/index.js +9 -0
- package/lib/highlight-textarea/style/index.less +42 -0
- package/lib/highlight-textarea/types.d.ts +16 -0
- package/lib/highlight-textarea/types.js +5 -0
- package/lib/highlight-words/index.d.ts +3 -0
- package/lib/highlight-words/index.js +15 -0
- package/lib/highlight-words/style/index.d.ts +1 -0
- package/lib/highlight-words/style/index.js +0 -0
- package/lib/icon/demo/svg/check-circle-filled.svg +6 -0
- package/lib/icon/demo/svg/coin-circle.svg +9 -0
- package/lib/icon/index.d.ts +27 -0
- package/lib/icon/index.js +143 -0
- package/lib/icon/style/index.d.ts +1 -0
- package/lib/icon/style/index.js +0 -0
- package/lib/icon/utils.d.ts +6 -0
- package/lib/icon/utils.js +32 -0
- package/lib/img-crop/EasyCrop.d.ts +6 -0
- package/lib/img-crop/EasyCrop.js +160 -0
- package/lib/img-crop/getCroppedImg.d.ts +6 -0
- package/lib/img-crop/getCroppedImg.js +205 -0
- package/lib/img-crop/index.d.ts +53 -0
- package/lib/img-crop/index.js +582 -0
- package/lib/img-crop/style/index.css +52 -0
- package/lib/img-crop/style/index.d.ts +3 -0
- package/lib/img-crop/style/index.js +11 -0
- package/lib/img-crop/style/index.less +54 -0
- package/lib/index.d.ts +34 -2
- package/lib/index.js +160 -9
- package/lib/keep-tab/demo/index.modules.less +66 -0
- package/lib/keep-tab/index.d.ts +29 -0
- package/lib/keep-tab/index.js +181 -0
- package/lib/keep-tab/style/index.css +1129 -0
- package/lib/keep-tab/style/index.d.ts +2 -0
- package/lib/keep-tab/style/index.js +9 -0
- package/lib/keep-tab/style/index.less +2 -0
- package/lib/number-input/index.d.ts +22 -7
- package/lib/number-input/index.js +22 -11
- package/lib/number-input/style/index.d.ts +1 -1
- package/lib/number-input/style/index.js +1 -1
- package/lib/number-input/utils.d.ts +10 -11
- package/lib/number-input/utils.js +8 -8
- package/lib/rc-echart/core.d.ts +32 -0
- package/lib/rc-echart/core.js +185 -0
- package/lib/rc-echart/index.d.ts +21 -0
- package/lib/rc-echart/index.js +75 -0
- package/lib/rc-echart/style/index.d.ts +1 -0
- package/lib/rc-echart/style/index.js +0 -0
- package/lib/rc-motion/demo/CSSMotion.less +91 -0
- package/lib/rc-motion/index.d.ts +2 -0
- package/lib/rc-motion/index.js +43 -0
- package/lib/rc-motion/style/index.d.ts +1 -0
- package/lib/rc-motion/style/index.js +0 -0
- package/lib/rc-qrcode/index.d.ts +20 -0
- package/lib/rc-qrcode/index.js +108 -0
- package/lib/rc-qrcode/style/index.d.ts +1 -0
- package/lib/rc-qrcode/style/index.js +0 -0
- package/lib/rc-qrcode/useQrcode.d.ts +4 -0
- package/lib/rc-qrcode/useQrcode.js +66 -0
- package/lib/rc-transition-group/index.d.ts +2 -0
- package/lib/rc-transition-group/index.js +43 -0
- package/lib/rc-transition-group/style/index.d.ts +1 -0
- package/lib/rc-transition-group/style/index.js +0 -0
- package/lib/single-img-upload/index.d.ts +19 -0
- package/lib/single-img-upload/index.js +250 -0
- package/lib/single-img-upload/style/index.css +74 -0
- package/lib/single-img-upload/style/index.d.ts +3 -0
- package/lib/single-img-upload/style/index.js +11 -0
- package/lib/single-img-upload/style/index.less +85 -0
- package/lib/sortable-hoc/demo/VerticalListBase/index.modules.less +63 -0
- package/lib/sortable-hoc/demo/index.modules.less +248 -0
- package/lib/sortable-hoc/index.d.ts +2 -0
- package/lib/sortable-hoc/index.js +43 -0
- package/lib/sortable-hoc/style/index.d.ts +1 -0
- package/lib/sortable-hoc/style/index.js +0 -0
- package/lib/split-pane/index.d.ts +59 -0
- package/lib/split-pane/index.js +69 -0
- package/lib/split-pane/style/index.css +41 -0
- package/lib/split-pane/style/index.d.ts +1 -0
- package/lib/split-pane/style/index.js +7 -0
- package/lib/split-pane/style/index.less +49 -0
- package/lib/text-area/index.d.ts +12 -0
- package/lib/text-area/index.js +144 -0
- package/lib/text-area/style/index.d.ts +1 -0
- package/lib/text-area/style/index.js +7 -0
- package/lib/text-input/index.d.ts +5 -0
- package/lib/text-input/index.js +99 -0
- package/lib/{number-input → text-input}/style/index.css +0 -3
- package/lib/text-input/style/index.d.ts +1 -0
- package/lib/text-input/style/index.js +7 -0
- package/lib/{number-input → text-input}/style/index.less +0 -4
- package/package.json +20 -3
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.highlight-textarea {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
-webkit-text-size-adjust: none;
|
|
8
|
+
}
|
|
9
|
+
.highlight-textarea-backdrop {
|
|
10
|
+
overflow-x: hidden;
|
|
11
|
+
overflow-y: scroll;
|
|
12
|
+
color: transparent;
|
|
13
|
+
white-space: pre-wrap;
|
|
14
|
+
word-wrap: break-word;
|
|
15
|
+
border: 1px solid;
|
|
16
|
+
border-color: transparent;
|
|
17
|
+
}
|
|
18
|
+
.highlight-textarea-input.highlight-content {
|
|
19
|
+
z-index: 100;
|
|
20
|
+
overflow-x: hidden;
|
|
21
|
+
overflow-y: scroll;
|
|
22
|
+
font: inherit;
|
|
23
|
+
resize: none;
|
|
24
|
+
}
|
|
25
|
+
.highlight-textarea .highlight-content {
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 0;
|
|
28
|
+
right: 0;
|
|
29
|
+
bottom: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
padding: 2px 5px 0 5px;
|
|
32
|
+
background: none transparent !important;
|
|
33
|
+
}
|
|
34
|
+
.highlight-textarea .highlight-content mark {
|
|
35
|
+
padding: 0;
|
|
36
|
+
color: inherit;
|
|
37
|
+
background-color: #a3daff;
|
|
38
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.highlight-textarea {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
-webkit-text-size-adjust: none;
|
|
8
|
+
|
|
9
|
+
&-backdrop {
|
|
10
|
+
overflow-x: hidden;
|
|
11
|
+
overflow-y: scroll;
|
|
12
|
+
color: transparent;
|
|
13
|
+
white-space: pre-wrap;
|
|
14
|
+
word-wrap: break-word;
|
|
15
|
+
border: 1px solid;
|
|
16
|
+
border-color: transparent;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-input.highlight-content {
|
|
20
|
+
z-index: 100;
|
|
21
|
+
overflow-x: hidden;
|
|
22
|
+
overflow-y: scroll;
|
|
23
|
+
font: inherit;
|
|
24
|
+
resize: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.highlight-content {
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
right: 0;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
left: 0;
|
|
33
|
+
padding: 2px 5px 0 5px;
|
|
34
|
+
background: none transparent !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.highlight-content mark {
|
|
38
|
+
padding: 0;
|
|
39
|
+
color: inherit;
|
|
40
|
+
background-color: #a3daff;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare type StringType = string;
|
|
2
|
+
export declare type NumberArrayType = number[];
|
|
3
|
+
export declare type RegExpType = RegExp;
|
|
4
|
+
export declare type FuncType = (input: string) => string;
|
|
5
|
+
export declare type HighlightInstanceType = StringType | NumberArrayType | RegExpType | FuncType;
|
|
6
|
+
export declare type AdmixArrayType = HighlightInstanceType[];
|
|
7
|
+
export declare type ObjectType = {
|
|
8
|
+
highlight: HighlightInstanceType;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare type CustomArrayArrayType = ObjectType[];
|
|
12
|
+
export declare type RangesType = (number | {
|
|
13
|
+
className?: string;
|
|
14
|
+
})[][];
|
|
15
|
+
export declare type HighlightType = StringType | NumberArrayType | RegExpType | FuncType | HighlightInstanceType | AdmixArrayType | ObjectType | CustomArrayArrayType;
|
|
16
|
+
export declare type TypeList = 'falsely' | 'range' | 'array' | 'regexp' | 'custom' | 'other' | 'function' | 'string';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
"default": mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var react_highlight_words_1 = __importDefault(require("react-highlight-words"));
|
|
14
|
+
|
|
15
|
+
exports["default"] = react_highlight_words_1["default"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
|
2
|
+
y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
|
3
|
+
<circle fill="currentColor" cx="8" cy="8" r="8" />
|
|
4
|
+
<path fill="inherit" class="st0" d="M12.5,4.4c-0.2-0.2-0.5-0.2-0.7,0l-5,5c0,0,0,0,0,0c-0.2,0.2-0.5,0.2-0.7,0l-2-2C4,7.2,3.7,7.2,3.5,7.4L2.8,8.2
|
|
5
|
+
c-0.2,0.2-0.2,0.5,0,0.7l3.3,3.3c0.2,0.2,0.6,0.2,0.8,0l6.3-6.3c0.2-0.2,0.2-0.5,0-0.7L12.5,4.4z" />
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
|
2
|
+
y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
|
3
|
+
<path fill="currentColor" d="M8,9.9c-2,0-3.7-0.6-3.7-1.7v1c0,1,1.7,1.9,3.7,1.9s3.7-0.8,3.7-1.9v-1C11.7,9.2,10,9.9,8,9.9z M8,11.7
|
|
4
|
+
c-2,0-3.7-0.6-3.7-1.7v1c0,1,1.7,1.9,3.7,1.9s3.7-0.8,3.7-1.9v-1C11.7,11.1,10,11.7,8,11.7L8,11.7z M8,8C6,8,4.3,7.4,4.3,6.3v1
|
|
5
|
+
c0,1,1.7,1.9,3.7,1.9s3.7-0.8,3.7-1.9v-1C11.7,7.4,10,8,8,8z M8,3.1c-2,0-3.7,0.8-3.7,1.9v0.6c0,1,1.7,1.9,3.7,1.9s3.7-0.8,3.7-1.9
|
|
6
|
+
V4.9C11.7,3.9,10,3.1,8,3.1z" />
|
|
7
|
+
<path fill="currentColor" d="M8,0.8c4,0,7.3,3.3,7.3,7.2S12,15.3,8,15.3S0.7,12,0.7,8S4,0.8,8,0.8 M8,0C3.6,0,0,3.6,0,8c0,4.4,3.6,8,8,8s8-3.6,8-8
|
|
8
|
+
C16,3.6,12.4,0,8,0L8,0z" />
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface IconBaseProps extends React.HTMLProps<HTMLSpanElement> {
|
|
3
|
+
spin?: boolean;
|
|
4
|
+
rotate?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface CustomIconComponentProps {
|
|
7
|
+
width?: string | number;
|
|
8
|
+
height?: string | number;
|
|
9
|
+
fill?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
viewBox?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IconProps extends IconBaseProps {
|
|
15
|
+
className?: string;
|
|
16
|
+
component?: React.ComponentType<CustomIconComponentProps | React.SVGProps<SVGSVGElement>>;
|
|
17
|
+
viewBox?: string;
|
|
18
|
+
tabIndex?: number;
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
declare const Icon: {
|
|
24
|
+
(props: IconProps): JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export default Icon;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __assign = this && this.__assign || function () {
|
|
4
|
+
__assign = Object.assign || function (t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
|
|
8
|
+
for (var p in s) {
|
|
9
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
return __assign.apply(this, arguments);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
Object.defineProperty(o, k2, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return m[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
} : function (o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
33
|
+
Object.defineProperty(o, "default", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
value: v
|
|
36
|
+
});
|
|
37
|
+
} : function (o, v) {
|
|
38
|
+
o["default"] = v;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var __importStar = this && this.__importStar || function (mod) {
|
|
42
|
+
if (mod && mod.__esModule) return mod;
|
|
43
|
+
var result = {};
|
|
44
|
+
if (mod != null) for (var k in mod) {
|
|
45
|
+
if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
__setModuleDefault(result, mod);
|
|
49
|
+
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
54
|
+
var t = {};
|
|
55
|
+
|
|
56
|
+
for (var p in s) {
|
|
57
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
61
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
62
|
+
}
|
|
63
|
+
return t;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
67
|
+
return mod && mod.__esModule ? mod : {
|
|
68
|
+
"default": mod
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
Object.defineProperty(exports, "__esModule", {
|
|
73
|
+
value: true
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
var React = __importStar(require("react"));
|
|
77
|
+
|
|
78
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
79
|
+
|
|
80
|
+
var utils_1 = require("./utils");
|
|
81
|
+
|
|
82
|
+
var Icon = function Icon(props) {
|
|
83
|
+
var className = props.className,
|
|
84
|
+
Component = props.component,
|
|
85
|
+
viewBox = props.viewBox,
|
|
86
|
+
spin = props.spin,
|
|
87
|
+
rotate = props.rotate,
|
|
88
|
+
tabIndex = props.tabIndex,
|
|
89
|
+
onClick = props.onClick,
|
|
90
|
+
children = props.children,
|
|
91
|
+
restProps = __rest(props, ["className", "component", "viewBox", "spin", "rotate", "tabIndex", "onClick", "children"]);
|
|
92
|
+
|
|
93
|
+
utils_1.useInsertStyles();
|
|
94
|
+
var classString = classnames_1["default"]('spotecicon', className);
|
|
95
|
+
var svgClassString = classnames_1["default"]({
|
|
96
|
+
'spotecicon-spin': !!spin
|
|
97
|
+
});
|
|
98
|
+
var svgStyle = rotate ? {
|
|
99
|
+
msTransform: "rotate(" + rotate + "deg)",
|
|
100
|
+
transform: "rotate(" + rotate + "deg)"
|
|
101
|
+
} : undefined;
|
|
102
|
+
|
|
103
|
+
var innerSvgProps = __assign(__assign({}, utils_1.svgBaseProps), {
|
|
104
|
+
className: svgClassString,
|
|
105
|
+
style: svgStyle,
|
|
106
|
+
viewBox: viewBox
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
if (!viewBox) {
|
|
110
|
+
delete innerSvgProps.viewBox;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
var renderInnerNode = function renderInnerNode() {
|
|
114
|
+
if (Component) {
|
|
115
|
+
return React.createElement(Component, __assign({}, innerSvgProps), children);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (children) {
|
|
119
|
+
return React.createElement("svg", __assign({}, innerSvgProps, {
|
|
120
|
+
viewBox: viewBox
|
|
121
|
+
}), children);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return null;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
var iconTabIndex = tabIndex;
|
|
128
|
+
|
|
129
|
+
if (iconTabIndex === undefined && onClick) {
|
|
130
|
+
iconTabIndex = -1;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return React.createElement("span", __assign({
|
|
134
|
+
role: "img"
|
|
135
|
+
}, restProps, {
|
|
136
|
+
tabIndex: iconTabIndex,
|
|
137
|
+
onClick: onClick,
|
|
138
|
+
className: classString
|
|
139
|
+
}), renderInnerNode());
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
Icon.displayName = 'SpotecIcon';
|
|
143
|
+
exports["default"] = Icon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const svgBaseProps: {
|
|
2
|
+
'aria-hidden': string;
|
|
3
|
+
focusable: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const iconStyles = "\n.spotecicon {\n display: inline-block;\n width: 16px;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.spotecicon > * {\n line-height: 1;\n}\n\n.spotecicon svg {\n display: inline-block;\n}\n\n.spotecicon::before {\n display: none;\n}\n\n.spotecicon .spotecicon-icon {\n display: block;\n}\n\n.spotecicon[tabindex] {\n cursor: pointer;\n}\n\n.spotecicon-spin::before,\n.spotecicon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
|
|
6
|
+
export declare const useInsertStyles: (styleStr?: string) => void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useInsertStyles = exports.iconStyles = exports.svgBaseProps = void 0;
|
|
7
|
+
|
|
8
|
+
var react_1 = require("react");
|
|
9
|
+
|
|
10
|
+
var insert_css_1 = require("insert-css");
|
|
11
|
+
|
|
12
|
+
exports.svgBaseProps = {
|
|
13
|
+
'aria-hidden': 'true',
|
|
14
|
+
focusable: 'false'
|
|
15
|
+
};
|
|
16
|
+
exports.iconStyles = "\n.spotecicon {\n display: inline-block;\n width: 16px;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.spotecicon > * {\n line-height: 1;\n}\n\n.spotecicon svg {\n display: inline-block;\n}\n\n.spotecicon::before {\n display: none;\n}\n\n.spotecicon .spotecicon-icon {\n display: block;\n}\n\n.spotecicon[tabindex] {\n cursor: pointer;\n}\n\n.spotecicon-spin::before,\n.spotecicon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
|
|
17
|
+
var cssInjectedFlag = false;
|
|
18
|
+
|
|
19
|
+
exports.useInsertStyles = function (styleStr) {
|
|
20
|
+
if (styleStr === void 0) {
|
|
21
|
+
styleStr = exports.iconStyles;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
react_1.useEffect(function () {
|
|
25
|
+
if (!cssInjectedFlag) {
|
|
26
|
+
insert_css_1.insertCss(styleStr, {
|
|
27
|
+
prepend: true
|
|
28
|
+
});
|
|
29
|
+
cssInjectedFlag = true;
|
|
30
|
+
}
|
|
31
|
+
}, []);
|
|
32
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CropperProps } from 'react-easy-crop';
|
|
2
|
+
export interface EasyCropProps extends Omit<CropperProps, 'onCropChange' | 'mediaProps' | 'crop' | 'zoomSpeed' | 'restrictPosition' | 'style'> {
|
|
3
|
+
onComplete: (value: any) => void;
|
|
4
|
+
}
|
|
5
|
+
declare const EasyCrop: (props: EasyCropProps) => JSX.Element;
|
|
6
|
+
export default EasyCrop;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __assign = this && this.__assign || function () {
|
|
4
|
+
__assign = Object.assign || function (t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
|
|
8
|
+
for (var p in s) {
|
|
9
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
return __assign.apply(this, arguments);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
Object.defineProperty(o, k2, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return m[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
} : function (o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
33
|
+
Object.defineProperty(o, "default", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
value: v
|
|
36
|
+
});
|
|
37
|
+
} : function (o, v) {
|
|
38
|
+
o["default"] = v;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var __importStar = this && this.__importStar || function (mod) {
|
|
42
|
+
if (mod && mod.__esModule) return mod;
|
|
43
|
+
var result = {};
|
|
44
|
+
if (mod != null) for (var k in mod) {
|
|
45
|
+
if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
__setModuleDefault(result, mod);
|
|
49
|
+
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
54
|
+
var t = {};
|
|
55
|
+
|
|
56
|
+
for (var p in s) {
|
|
57
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
61
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
62
|
+
}
|
|
63
|
+
return t;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var __read = this && this.__read || function (o, n) {
|
|
67
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
68
|
+
if (!m) return o;
|
|
69
|
+
var i = m.call(o),
|
|
70
|
+
r,
|
|
71
|
+
ar = [],
|
|
72
|
+
e;
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
76
|
+
ar.push(r.value);
|
|
77
|
+
}
|
|
78
|
+
} catch (error) {
|
|
79
|
+
e = {
|
|
80
|
+
error: error
|
|
81
|
+
};
|
|
82
|
+
} finally {
|
|
83
|
+
try {
|
|
84
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
85
|
+
} finally {
|
|
86
|
+
if (e) throw e.error;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return ar;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
94
|
+
return mod && mod.__esModule ? mod : {
|
|
95
|
+
"default": mod
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
Object.defineProperty(exports, "__esModule", {
|
|
100
|
+
value: true
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
var React = __importStar(require("react"));
|
|
104
|
+
|
|
105
|
+
var react_easy_crop_1 = __importDefault(require("react-easy-crop"));
|
|
106
|
+
|
|
107
|
+
var EasyCrop = function EasyCrop(props) {
|
|
108
|
+
var aspect = props.aspect,
|
|
109
|
+
minZoom = props.minZoom,
|
|
110
|
+
maxZoom = props.maxZoom,
|
|
111
|
+
onComplete = props.onComplete,
|
|
112
|
+
restProps = __rest(props, ["aspect", "minZoom", "maxZoom", "onComplete"]);
|
|
113
|
+
|
|
114
|
+
var _a = __read(React.useState({
|
|
115
|
+
x: 0,
|
|
116
|
+
y: 0
|
|
117
|
+
}), 2),
|
|
118
|
+
crop = _a[0],
|
|
119
|
+
setCrop = _a[1];
|
|
120
|
+
|
|
121
|
+
var _b = __read(React.useState({
|
|
122
|
+
width: 0,
|
|
123
|
+
height: 0
|
|
124
|
+
}), 2),
|
|
125
|
+
cropSize = _b[0],
|
|
126
|
+
setCropSize = _b[1];
|
|
127
|
+
|
|
128
|
+
var onCropComplete = React.useCallback(function (_, croppedAreaPixels) {
|
|
129
|
+
onComplete(croppedAreaPixels);
|
|
130
|
+
}, [onComplete]);
|
|
131
|
+
var onMediaLoaded = React.useCallback(function (mediaSize) {
|
|
132
|
+
var width = mediaSize.width,
|
|
133
|
+
height = mediaSize.height;
|
|
134
|
+
var ratioWidth = height * aspect;
|
|
135
|
+
|
|
136
|
+
if (width > ratioWidth) {
|
|
137
|
+
setCropSize({
|
|
138
|
+
width: ratioWidth,
|
|
139
|
+
height: height
|
|
140
|
+
});
|
|
141
|
+
} else {
|
|
142
|
+
setCropSize({
|
|
143
|
+
width: width,
|
|
144
|
+
height: width / aspect
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}, [aspect]);
|
|
148
|
+
return React.createElement(react_easy_crop_1["default"], __assign({}, restProps, {
|
|
149
|
+
crop: crop,
|
|
150
|
+
cropSize: cropSize,
|
|
151
|
+
onCropChange: setCrop,
|
|
152
|
+
aspect: aspect,
|
|
153
|
+
minZoom: minZoom,
|
|
154
|
+
maxZoom: maxZoom,
|
|
155
|
+
onCropComplete: onCropComplete,
|
|
156
|
+
onMediaLoaded: onMediaLoaded
|
|
157
|
+
}));
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
exports["default"] = EasyCrop;
|