@ebscn/ui 1.0.3-beta.2 → 1.0.3-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/images/delete_dark.png +0 -0
- package/assets/images/keybord_keybord_dark.png +0 -0
- package/assets/images/keybord_shift2.png +0 -0
- package/assets/images/keybord_shift2_dark.png +0 -0
- package/assets/images/keybord_shift_dark.png +0 -0
- package/assets/images/loading.gif +0 -0
- package/cjs/assets/images/delete_dark.png +0 -0
- package/cjs/assets/images/keybord_keybord_dark.png +0 -0
- package/cjs/assets/images/keybord_shift2.png +0 -0
- package/cjs/assets/images/keybord_shift2_dark.png +0 -0
- package/cjs/assets/images/keybord_shift_dark.png +0 -0
- package/cjs/assets/images/loading.gif +0 -0
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.css +108 -43
- package/cjs/components/alphabet-keyboard/alphabet-keyboard.js +1 -2
- package/cjs/components/button/selectorButton.css +2 -0
- package/cjs/components/button/selectorButton.js +1 -5
- package/cjs/components/card/card.css +1 -1
- package/cjs/components/card/card.js +2 -2
- package/cjs/components/checkbox/checkbox.css +8 -3
- package/cjs/components/date-range-picker/date-range-picker.css +31 -7
- package/cjs/components/date-range-picker/date-range-picker.d.ts +1 -0
- package/cjs/components/date-range-picker/date-range-picker.js +18 -9
- package/cjs/components/divider/divider.css +4 -3
- package/cjs/components/header/header.css +7 -1
- package/cjs/components/header/header.js +4 -2
- package/cjs/components/icons/back-icon.js +1 -0
- package/cjs/components/icons/clear-icon.js +1 -0
- package/cjs/components/icons/close-icon.js +2 -1
- package/cjs/components/icons/down-icon.d.ts +4 -0
- package/cjs/components/icons/down-icon.js +26 -0
- package/cjs/components/icons/dustbin-icon.d.ts +4 -0
- package/cjs/components/icons/dustbin-icon.js +26 -0
- package/cjs/components/icons/index.d.ts +3 -0
- package/cjs/components/icons/index.js +21 -0
- package/cjs/components/icons/notice-icon.js +2 -2
- package/cjs/components/icons/right-icon.js +1 -0
- package/cjs/components/icons/search-icon.js +2 -1
- package/cjs/components/icons/up-icon.d.ts +4 -0
- package/cjs/components/icons/up-icon.js +26 -0
- package/cjs/components/icons/warning-icon.js +2 -1
- package/cjs/components/infinite-scroll/index.d.ts +4 -0
- package/cjs/components/infinite-scroll/index.js +9 -0
- package/cjs/components/infinite-scroll/infinite-scroll.css +27 -0
- package/cjs/components/infinite-scroll/infinite-scroll.d.ts +11 -0
- package/cjs/components/infinite-scroll/infinite-scroll.js +278 -0
- package/cjs/components/input/input.css +27 -27
- package/cjs/components/input/input.js +1 -1
- package/cjs/components/list/index.d.ts +16 -0
- package/cjs/components/list/index.js +13 -0
- package/cjs/components/list/list-item.d.ts +15 -0
- package/cjs/components/list/list-item.js +38 -0
- package/cjs/components/list/list.css +102 -0
- package/cjs/components/list/list.d.ts +20 -0
- package/cjs/components/list/list.js +38 -0
- package/cjs/components/number-keyboard/number-keyboard.css +55 -42
- package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -0
- package/cjs/components/number-keyboard/number-keyboard.js +2 -1
- package/cjs/components/picker-view/picker-view.css +3 -2
- package/cjs/components/popover/arrow.d.ts +3 -0
- package/cjs/components/popover/arrow.js +19 -0
- package/cjs/components/popover/index.d.ts +31 -0
- package/cjs/components/popover/index.js +14 -0
- package/cjs/components/popover/normalize-placement.d.ts +2 -0
- package/cjs/components/popover/normalize-placement.js +20 -0
- package/cjs/components/popover/popover-menu.css +65 -0
- package/cjs/components/popover/popover-menu.d.ts +20 -0
- package/cjs/components/popover/popover-menu.js +74 -0
- package/cjs/components/popover/popover.css +68 -0
- package/cjs/components/popover/popover.d.ts +41 -0
- package/cjs/components/popover/popover.js +280 -0
- package/cjs/components/popover/wrapper.d.ts +10 -0
- package/cjs/components/popover/wrapper.js +53 -0
- package/cjs/components/protocol/protocol.js +1 -2
- package/cjs/components/pull-to-refresh/pull-to-refresh.css +10 -1
- package/cjs/components/pull-to-refresh/pull-to-refresh.d.ts +1 -1
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +5 -5
- package/cjs/components/radio/radio.css +5 -0
- package/cjs/components/selector/selector.css +1 -1
- package/cjs/components/skeleton/skeleton.css +4 -4
- package/cjs/components/squared-grid/squared-grid.css +1 -2
- package/cjs/components/squared-grid/squared-grid.d.ts +2 -1
- package/cjs/components/squared-grid/squared-grid.js +11 -2
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.css +48 -41
- package/cjs/components/stock-count-keyboard/stock-count-keyboard.js +1 -1
- package/cjs/components/stock-keyboard/alphabet-keyboard.css +186 -0
- package/cjs/components/stock-keyboard/alphabet-keyboard.d.ts +11 -0
- package/cjs/components/stock-keyboard/alphabet-keyboard.js +106 -0
- package/cjs/components/stock-keyboard/index.d.ts +1 -0
- package/cjs/components/stock-keyboard/index.js +1 -0
- package/cjs/components/stock-keyboard/stock-keyboard.css +135 -76
- package/cjs/components/stock-keyboard/stock-keyboard.d.ts +2 -2
- package/cjs/components/stock-keyboard/stock-keyboard.js +40 -8
- package/cjs/components/switch/switch.css +2 -3
- package/cjs/components/tabs/tabs.css +5 -3
- package/cjs/components/tabs/tabs.js +5 -5
- package/cjs/components/tabs/tabs.patch.css +1 -0
- package/cjs/components/toast/index.d.ts +9 -0
- package/cjs/components/toast/index.js +14 -0
- package/cjs/components/toast/methods.d.ts +8 -0
- package/cjs/components/toast/methods.js +72 -0
- package/cjs/components/toast/toast.css +45 -0
- package/cjs/components/toast/toast.d.ts +18 -0
- package/cjs/components/toast/toast.js +85 -0
- package/cjs/components/toast/toast.patch.css +11 -0
- package/cjs/global/global.css +20 -5
- package/cjs/global/theme-dark.css +11 -3
- package/cjs/global/theme-default.css +9 -2
- package/cjs/index.d.ts +4 -4
- package/cjs/index.js +32 -32
- package/es/assets/images/delete_dark.png +0 -0
- package/es/assets/images/keybord_keybord_dark.png +0 -0
- package/es/assets/images/keybord_shift2.png +0 -0
- package/es/assets/images/keybord_shift2_dark.png +0 -0
- package/es/assets/images/keybord_shift_dark.png +0 -0
- package/es/assets/images/loading.gif +0 -0
- package/es/components/alphabet-keyboard/alphabet-keyboard.css +108 -43
- package/es/components/alphabet-keyboard/alphabet-keyboard.js +2 -4
- package/es/components/button/selectorButton.css +2 -0
- package/es/components/button/selectorButton.js +1 -5
- package/es/components/card/card.css +1 -1
- package/es/components/card/card.js +2 -2
- package/es/components/checkbox/checkbox.css +8 -3
- package/es/components/date-range-picker/date-range-picker.css +31 -7
- package/es/components/date-range-picker/date-range-picker.d.ts +1 -0
- package/es/components/date-range-picker/date-range-picker.js +17 -9
- package/es/components/divider/divider.css +4 -3
- package/es/components/header/header.css +7 -1
- package/es/components/header/header.js +4 -2
- package/es/components/icons/back-icon.js +1 -0
- package/es/components/icons/clear-icon.js +1 -0
- package/es/components/icons/close-icon.js +2 -1
- package/es/components/icons/down-icon.d.ts +4 -0
- package/es/components/icons/down-icon.js +18 -0
- package/es/components/icons/dustbin-icon.d.ts +4 -0
- package/es/components/icons/dustbin-icon.js +18 -0
- package/es/components/icons/index.d.ts +3 -0
- package/es/components/icons/index.js +3 -0
- package/es/components/icons/notice-icon.js +2 -2
- package/es/components/icons/right-icon.js +1 -0
- package/es/components/icons/search-icon.js +2 -1
- package/es/components/icons/up-icon.d.ts +4 -0
- package/es/components/icons/up-icon.js +18 -0
- package/es/components/icons/warning-icon.js +2 -1
- package/es/components/infinite-scroll/index.d.ts +4 -0
- package/es/components/infinite-scroll/index.js +3 -0
- package/es/components/infinite-scroll/infinite-scroll.css +27 -0
- package/es/components/infinite-scroll/infinite-scroll.d.ts +11 -0
- package/es/components/infinite-scroll/infinite-scroll.js +268 -0
- package/es/components/input/input.css +27 -27
- package/es/components/input/input.js +1 -1
- package/es/components/list/index.d.ts +16 -0
- package/es/components/list/index.js +7 -0
- package/es/components/list/list-item.d.ts +15 -0
- package/es/components/list/list-item.js +30 -0
- package/es/components/list/list.css +102 -0
- package/es/components/list/list.d.ts +20 -0
- package/es/components/list/list.js +29 -0
- package/es/components/number-keyboard/number-keyboard.css +55 -42
- package/es/components/number-keyboard/number-keyboard.d.ts +1 -0
- package/es/components/number-keyboard/number-keyboard.js +2 -1
- package/es/components/picker-view/picker-view.css +3 -2
- package/es/components/popover/arrow.d.ts +3 -0
- package/es/components/popover/arrow.js +11 -0
- package/es/components/popover/index.d.ts +31 -0
- package/es/components/popover/index.js +8 -0
- package/es/components/popover/normalize-placement.d.ts +2 -0
- package/es/components/popover/normalize-placement.js +14 -0
- package/es/components/popover/popover-menu.css +65 -0
- package/es/components/popover/popover-menu.d.ts +20 -0
- package/es/components/popover/popover-menu.js +65 -0
- package/es/components/popover/popover.css +68 -0
- package/es/components/popover/popover.d.ts +41 -0
- package/es/components/popover/popover.js +271 -0
- package/es/components/popover/wrapper.d.ts +10 -0
- package/es/components/popover/wrapper.js +47 -0
- package/es/components/protocol/protocol.js +1 -2
- package/es/components/pull-to-refresh/pull-to-refresh.css +10 -1
- package/es/components/pull-to-refresh/pull-to-refresh.d.ts +1 -1
- package/es/components/pull-to-refresh/pull-to-refresh.js +5 -5
- package/es/components/radio/radio.css +5 -0
- package/es/components/selector/selector.css +1 -1
- package/es/components/skeleton/skeleton.css +4 -4
- package/es/components/squared-grid/squared-grid.css +1 -2
- package/es/components/squared-grid/squared-grid.d.ts +2 -1
- package/es/components/squared-grid/squared-grid.js +11 -2
- package/es/components/stock-count-keyboard/stock-count-keyboard.css +48 -41
- package/es/components/stock-count-keyboard/stock-count-keyboard.js +1 -1
- package/es/components/stock-keyboard/alphabet-keyboard.css +186 -0
- package/es/components/stock-keyboard/alphabet-keyboard.d.ts +11 -0
- package/es/components/stock-keyboard/alphabet-keyboard.js +98 -0
- package/es/components/stock-keyboard/index.d.ts +1 -0
- package/es/components/stock-keyboard/index.js +1 -0
- package/es/components/stock-keyboard/stock-keyboard.css +135 -76
- package/es/components/stock-keyboard/stock-keyboard.d.ts +2 -2
- package/es/components/stock-keyboard/stock-keyboard.js +42 -11
- package/es/components/switch/switch.css +2 -3
- package/es/components/tabs/tabs.css +5 -3
- package/es/components/tabs/tabs.js +5 -5
- package/es/components/tabs/tabs.patch.css +1 -0
- package/es/components/toast/index.d.ts +9 -0
- package/es/components/toast/index.js +8 -0
- package/es/components/toast/methods.d.ts +8 -0
- package/es/components/toast/methods.js +63 -0
- package/es/components/toast/toast.css +45 -0
- package/es/components/toast/toast.d.ts +18 -0
- package/es/components/toast/toast.js +75 -0
- package/es/components/toast/toast.patch.css +11 -0
- package/es/global/global.css +20 -5
- package/es/global/theme-dark.css +11 -3
- package/es/global/theme-default.css +9 -2
- package/es/index.d.ts +4 -4
- package/es/index.js +8 -4
- package/package.json +2 -11
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
height: calc(var(--height) - 2 * var(--border-width));
|
|
45
45
|
border-radius: calc(var(--height) - 2 * var(--border-width));
|
|
46
46
|
box-sizing: border-box;
|
|
47
|
-
background: #
|
|
47
|
+
background: #d8d8d8;
|
|
48
48
|
z-index: 1;
|
|
49
49
|
transition: all 200ms;
|
|
50
50
|
transform: scale(1);
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
top: var(--border-width);
|
|
63
63
|
left: var(--border-width);
|
|
64
64
|
transition: all 200ms;
|
|
65
|
-
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.2), 0 2px 11.5px 0 rgba(0, 0, 0, 0.08), -1px 2px 2px 0 rgba(0, 0, 0, 0.1);
|
|
66
65
|
color: var(--ebscn-color-primary);
|
|
67
66
|
}
|
|
68
67
|
.ebscn-switch-inner {
|
|
@@ -95,7 +94,7 @@
|
|
|
95
94
|
opacity: 0.4;
|
|
96
95
|
}
|
|
97
96
|
.ebscn-switch.ebscn-switch-disabled:before {
|
|
98
|
-
background-color: #
|
|
97
|
+
background-color: #e9e9ea;
|
|
99
98
|
}
|
|
100
99
|
.ebscn-switch-spin-icon {
|
|
101
100
|
width: 14px;
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
}
|
|
11
11
|
.ebscn-tabs-header {
|
|
12
12
|
position: relative;
|
|
13
|
-
border-bottom: solid 1px var(--ebscn-color-border);
|
|
14
13
|
}
|
|
15
14
|
.ebscn-tabs-tab-list {
|
|
15
|
+
padding: 0 6px;
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-wrap: nowrap;
|
|
18
18
|
justify-content: flex-start;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
display: none;
|
|
26
26
|
}
|
|
27
27
|
.ebscn-tabs-tab-wrapper {
|
|
28
|
-
padding: 0
|
|
28
|
+
padding: 0 10px;
|
|
29
29
|
}
|
|
30
30
|
.ebscn-tabs-tab-wrapper-stretch {
|
|
31
31
|
flex: auto;
|
|
@@ -36,11 +36,13 @@
|
|
|
36
36
|
width: -webkit-min-content;
|
|
37
37
|
width: min-content;
|
|
38
38
|
margin: 0 auto;
|
|
39
|
-
font-size:
|
|
39
|
+
font-size: 16px;
|
|
40
40
|
position: relative;
|
|
41
41
|
cursor: pointer;
|
|
42
|
+
color: var(--ebscn-color-text-secondary);
|
|
42
43
|
}
|
|
43
44
|
.ebscn-tabs-tab-active {
|
|
45
|
+
font-weight: 500;
|
|
44
46
|
color: var(--active-title-color);
|
|
45
47
|
}
|
|
46
48
|
.ebscn-tabs-tab-disabled {
|
|
@@ -17,7 +17,7 @@ export var Tab = function () {
|
|
|
17
17
|
};
|
|
18
18
|
var defaultProps = {
|
|
19
19
|
activeMode: 'underline',
|
|
20
|
-
activeLineMode: '
|
|
20
|
+
activeLineMode: 'fixed',
|
|
21
21
|
stretch: true,
|
|
22
22
|
direction: 'ltr'
|
|
23
23
|
};
|
|
@@ -122,13 +122,13 @@ export var Tabs = function (p) {
|
|
|
122
122
|
var x = 0;
|
|
123
123
|
var width = 0;
|
|
124
124
|
if (props.activeLineMode === 'auto') {
|
|
125
|
-
x = activeTabLeft;
|
|
125
|
+
x = activeTabLeft - 6;
|
|
126
126
|
width = activeTabWidth;
|
|
127
127
|
} else if (props.activeLineMode === 'full') {
|
|
128
|
-
x = activeTabWrapperLeft;
|
|
128
|
+
x = activeTabWrapperLeft - 6;
|
|
129
129
|
width = activeTabWrapperWidth;
|
|
130
130
|
} else {
|
|
131
|
-
x = activeTabLeft + (activeTabWidth - activeLineWidth) / 2;
|
|
131
|
+
x = activeTabLeft + (activeTabWidth - activeLineWidth) / 2 - 6;
|
|
132
132
|
}
|
|
133
133
|
if (isRTL) {
|
|
134
134
|
/**
|
|
@@ -242,7 +242,7 @@ export var Tabs = function (p) {
|
|
|
242
242
|
ref: activeLineRef,
|
|
243
243
|
className: "".concat(classPrefix, "-tab-line"),
|
|
244
244
|
style: {
|
|
245
|
-
width: props.activeLineMode === 'fixed' ? 'var(--fixed-active-line-width,
|
|
245
|
+
width: props.activeLineMode === 'fixed' ? 'var(--fixed-active-line-width, 14px)' : width,
|
|
246
246
|
x: x
|
|
247
247
|
}
|
|
248
248
|
}), panes.map(function (pane) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ToastProps } from './toast';
|
|
2
|
+
export type ToastShowProps = Omit<ToastProps, 'visible'>;
|
|
3
|
+
export type ToastHandler = {
|
|
4
|
+
close: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function show(p: ToastShowProps | string): ToastHandler;
|
|
7
|
+
export declare function clear(): void;
|
|
8
|
+
export declare function config(val: Pick<ToastProps, 'duration' | 'position' | 'maskClickable'>): void;
|
|
@@ -0,0 +1,63 @@
|
|
|
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)) t[p] = s[p];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
return __assign.apply(this, arguments);
|
|
10
|
+
};
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { InternalToast } from './toast';
|
|
13
|
+
import { mergeProps } from '../../utils/with-default-props';
|
|
14
|
+
import { renderImperatively } from '../../utils/render-imperatively';
|
|
15
|
+
var currentHandler = null;
|
|
16
|
+
var currentTimeout = null;
|
|
17
|
+
var defaultProps = {
|
|
18
|
+
duration: 2000,
|
|
19
|
+
position: 'center',
|
|
20
|
+
maskClickable: true
|
|
21
|
+
};
|
|
22
|
+
var ToastInner = function (props) {
|
|
23
|
+
return React.createElement(InternalToast, __assign({}, props));
|
|
24
|
+
};
|
|
25
|
+
export function show(p) {
|
|
26
|
+
var props = mergeProps(defaultProps, typeof p === 'string' ? {
|
|
27
|
+
content: p
|
|
28
|
+
} : p);
|
|
29
|
+
var element = React.createElement(ToastInner, __assign({}, props, {
|
|
30
|
+
onClose: function () {
|
|
31
|
+
currentHandler = null;
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
if (currentHandler) {
|
|
35
|
+
currentHandler.replace(element);
|
|
36
|
+
} else {
|
|
37
|
+
currentHandler = renderImperatively(element);
|
|
38
|
+
}
|
|
39
|
+
if (currentTimeout) {
|
|
40
|
+
window.clearTimeout(currentTimeout);
|
|
41
|
+
}
|
|
42
|
+
if (props.duration !== 0) {
|
|
43
|
+
currentTimeout = window.setTimeout(function () {
|
|
44
|
+
clear();
|
|
45
|
+
}, props.duration);
|
|
46
|
+
}
|
|
47
|
+
return currentHandler;
|
|
48
|
+
}
|
|
49
|
+
export function clear() {
|
|
50
|
+
currentHandler === null || currentHandler === void 0 ? void 0 : currentHandler.close();
|
|
51
|
+
currentHandler = null;
|
|
52
|
+
}
|
|
53
|
+
export function config(val) {
|
|
54
|
+
if (val.duration !== undefined) {
|
|
55
|
+
defaultProps.duration = val.duration;
|
|
56
|
+
}
|
|
57
|
+
if (val.position !== undefined) {
|
|
58
|
+
defaultProps.position = val.position;
|
|
59
|
+
}
|
|
60
|
+
if (val.maskClickable !== undefined) {
|
|
61
|
+
defaultProps.maskClickable = val.maskClickable;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.ebscn-toast-mask .ebscn-toast-wrap {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
text-align: center;
|
|
8
|
+
}
|
|
9
|
+
.ebscn-toast-mask .ebscn-toast-main {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
position: relative;
|
|
12
|
+
top: 50%;
|
|
13
|
+
transform: translateY(-50%);
|
|
14
|
+
width: auto;
|
|
15
|
+
max-width: 204px;
|
|
16
|
+
max-height: 70%;
|
|
17
|
+
overflow: auto;
|
|
18
|
+
color: white;
|
|
19
|
+
word-break: break-all;
|
|
20
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
21
|
+
border-radius: 8px;
|
|
22
|
+
pointer-events: all;
|
|
23
|
+
font-size: var(--ebscn-font-size-7);
|
|
24
|
+
line-height: 1.5;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
text-align: initial;
|
|
27
|
+
}
|
|
28
|
+
.ebscn-toast-mask .ebscn-toast-main-text {
|
|
29
|
+
padding: 12px;
|
|
30
|
+
min-width: 0px;
|
|
31
|
+
}
|
|
32
|
+
.ebscn-toast-mask .ebscn-toast-main-icon {
|
|
33
|
+
padding: 35px 12px;
|
|
34
|
+
min-width: 150px;
|
|
35
|
+
}
|
|
36
|
+
.ebscn-toast-mask .ebscn-toast-main-icon .ebscn-toast-icon {
|
|
37
|
+
text-align: center;
|
|
38
|
+
margin-bottom: 8px;
|
|
39
|
+
font-size: 36px;
|
|
40
|
+
line-height: 1;
|
|
41
|
+
}
|
|
42
|
+
.ebscn-toast-loading {
|
|
43
|
+
--size: 48px;
|
|
44
|
+
margin: 0 auto 8px;
|
|
45
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import type { MaskProps } from '../mask';
|
|
3
|
+
import { PropagationEvent } from '../../utils/with-stop-propagation';
|
|
4
|
+
import { GetContainer } from '../../utils/render-to-container';
|
|
5
|
+
export interface ToastProps {
|
|
6
|
+
afterClose?: () => void;
|
|
7
|
+
maskStyle?: MaskProps['style'];
|
|
8
|
+
maskClassName?: string;
|
|
9
|
+
maskClickable?: boolean;
|
|
10
|
+
content?: ReactNode;
|
|
11
|
+
icon?: 'success' | 'fail' | ReactNode;
|
|
12
|
+
duration?: number;
|
|
13
|
+
position?: 'top' | 'bottom' | 'center';
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
getContainer?: GetContainer;
|
|
16
|
+
stopPropagation?: PropagationEvent[];
|
|
17
|
+
}
|
|
18
|
+
export declare const InternalToast: FC<ToastProps>;
|
|
@@ -0,0 +1,75 @@
|
|
|
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)) t[p] = s[p];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
return __assign.apply(this, arguments);
|
|
10
|
+
};
|
|
11
|
+
import React, { useMemo } from 'react';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import { CloseIcon as CloseOutline, CheckOnlyIcon as CheckOutline } from '../icons';
|
|
14
|
+
import Mask from '../mask';
|
|
15
|
+
import { mergeProps } from '../../utils/with-default-props';
|
|
16
|
+
import AutoCenter from '../auto-center';
|
|
17
|
+
var classPrefix = "ebscn-toast";
|
|
18
|
+
var defaultProps = {
|
|
19
|
+
maskClickable: true,
|
|
20
|
+
stopPropagation: ['click']
|
|
21
|
+
};
|
|
22
|
+
export var InternalToast = function (p) {
|
|
23
|
+
var props = mergeProps(defaultProps, p);
|
|
24
|
+
var maskClickable = props.maskClickable,
|
|
25
|
+
content = props.content,
|
|
26
|
+
icon = props.icon,
|
|
27
|
+
position = props.position;
|
|
28
|
+
var iconElement = useMemo(function () {
|
|
29
|
+
if (icon === null || icon === undefined) return null;
|
|
30
|
+
switch (icon) {
|
|
31
|
+
case 'success':
|
|
32
|
+
return React.createElement(CheckOutline, {
|
|
33
|
+
className: "".concat(classPrefix, "-icon-success")
|
|
34
|
+
});
|
|
35
|
+
case 'fail':
|
|
36
|
+
return React.createElement(CloseOutline, {
|
|
37
|
+
className: "".concat(classPrefix, "-icon-fail")
|
|
38
|
+
});
|
|
39
|
+
default:
|
|
40
|
+
return icon;
|
|
41
|
+
}
|
|
42
|
+
}, [icon]);
|
|
43
|
+
var top = useMemo(function () {
|
|
44
|
+
switch (position) {
|
|
45
|
+
case 'top':
|
|
46
|
+
return '20%';
|
|
47
|
+
case 'bottom':
|
|
48
|
+
return '80%';
|
|
49
|
+
default:
|
|
50
|
+
return '50%';
|
|
51
|
+
}
|
|
52
|
+
}, [position]);
|
|
53
|
+
return React.createElement(Mask, {
|
|
54
|
+
visible: props.visible,
|
|
55
|
+
destroyOnClose: true,
|
|
56
|
+
opacity: 0,
|
|
57
|
+
disableBodyScroll: !maskClickable,
|
|
58
|
+
getContainer: props.getContainer,
|
|
59
|
+
afterClose: props.afterClose,
|
|
60
|
+
style: __assign({
|
|
61
|
+
pointerEvents: maskClickable ? 'none' : 'auto'
|
|
62
|
+
}, props.maskStyle),
|
|
63
|
+
className: classNames("".concat(classPrefix, "-mask"), props.maskClassName),
|
|
64
|
+
stopPropagation: props.stopPropagation
|
|
65
|
+
}, React.createElement("div", {
|
|
66
|
+
className: classNames("".concat(classPrefix, "-wrap"))
|
|
67
|
+
}, React.createElement("div", {
|
|
68
|
+
style: {
|
|
69
|
+
top: top
|
|
70
|
+
},
|
|
71
|
+
className: classNames("".concat(classPrefix, "-main"), icon ? "".concat(classPrefix, "-main-icon") : "".concat(classPrefix, "-main-text"))
|
|
72
|
+
}, iconElement && React.createElement("div", {
|
|
73
|
+
className: "".concat(classPrefix, "-icon")
|
|
74
|
+
}, iconElement), React.createElement(AutoCenter, null, content))));
|
|
75
|
+
};
|
package/es/global/global.css
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
--ebscn-color-warning: #ff8f1f;
|
|
22
22
|
--ebscn-color-danger: #ff3141;
|
|
23
23
|
--ebscn-color-yellow: #ff9f18;
|
|
24
|
-
--ebscn-color-wathet: #
|
|
24
|
+
--ebscn-color-wathet: #fef4f2;
|
|
25
25
|
--ebscn-color-text: #333333;
|
|
26
26
|
--ebscn-color-text-secondary: #666666;
|
|
27
27
|
--ebscn-color-weak: #999999;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
--ebscn-color-background: #ffffff;
|
|
31
31
|
--ebscn-color-highlight: var(--ebscn-color-danger);
|
|
32
32
|
--ebscn-color-white: #ffffff;
|
|
33
|
-
--ebscn-color-box: #
|
|
33
|
+
--ebscn-color-box: #f8f9fc;
|
|
34
34
|
--ebscn-color-text-light-solid: var(--ebscn-color-white);
|
|
35
35
|
--ebscn-color-text-dark-solid: #000000;
|
|
36
36
|
--ebscn-color-fill-content: var(--ebscn-color-box);
|
|
@@ -45,24 +45,39 @@
|
|
|
45
45
|
--ebscn-color-golden: #b47816;
|
|
46
46
|
--ebscn-color-grey: rgba(0, 0, 0, 0.7);
|
|
47
47
|
--ebscn-color-split-line: #EBEBEB;
|
|
48
|
+
--ebscn-color-keyboard-bg: #d3d5d8;
|
|
49
|
+
--ebscn-color-keyboard-key-bg: #fff;
|
|
50
|
+
--ebscn-color-keyboard-fckey-bg: #adb3bd;
|
|
51
|
+
--ebscn-color-keyboard-key-bg-active: #e5e5e5;
|
|
52
|
+
--ebscn-color-keyboard-fckey-bg-active: #9ba1aa;
|
|
53
|
+
--ebscn-color-keyboard-fckey-border: #888;
|
|
54
|
+
--ebscn-color-keyboard-key-border: #888;
|
|
48
55
|
}
|
|
49
56
|
html[data-prefers-color-scheme='dark'] {
|
|
50
|
-
--ebscn-color-
|
|
57
|
+
--ebscn-color-blue: #4c7cf1;
|
|
51
58
|
--ebscn-color-success: #34b368;
|
|
52
59
|
--ebscn-color-warning: #ffa930;
|
|
53
60
|
--ebscn-color-danger: #ff4a58;
|
|
54
61
|
--ebscn-color-yellow: #ffa930;
|
|
55
62
|
--ebscn-color-orange: #e65a2b;
|
|
56
63
|
--ebscn-color-wathet: #0d2543;
|
|
57
|
-
--ebscn-color-text: #
|
|
64
|
+
--ebscn-color-text: #ebebeb;
|
|
58
65
|
--ebscn-color-text-secondary: #b3b3b3;
|
|
59
|
-
--ebscn-color-weak: #
|
|
66
|
+
--ebscn-color-weak: #7a7a7a;
|
|
60
67
|
--ebscn-color-light: #4d4d4d;
|
|
61
68
|
--ebscn-color-border: #2b2b2b;
|
|
62
69
|
--ebscn-color-box: #0a0a0a;
|
|
63
70
|
--ebscn-color-background: #1a1a1a;
|
|
64
71
|
--ebscn-color-background-body: var(--ebscn-color-background);
|
|
65
72
|
--ebscn-border-color: var(--ebscn-color-border);
|
|
73
|
+
--ebscn-color-split-line: #2B2B2B;
|
|
74
|
+
--ebscn-color-keyboard-bg: #1a1a1a;
|
|
75
|
+
--ebscn-color-keyboard-key-bg: #474747;
|
|
76
|
+
--ebscn-color-keyboard-fckey-bg: #292929;
|
|
77
|
+
--ebscn-color-keyboard-key-bg-active: #323232;
|
|
78
|
+
--ebscn-color-keyboard-fckey-bg-active: #252525;
|
|
79
|
+
--ebscn-color-keyboard-fckey-border: #111;
|
|
80
|
+
--ebscn-color-keyboard-key-border: #333;
|
|
66
81
|
}
|
|
67
82
|
:root {
|
|
68
83
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
package/es/global/theme-dark.css
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
html[data-prefers-color-scheme='dark'] {
|
|
2
|
-
--ebscn-color-
|
|
2
|
+
--ebscn-color-blue: #4c7cf1;
|
|
3
3
|
--ebscn-color-success: #34b368;
|
|
4
4
|
--ebscn-color-warning: #ffa930;
|
|
5
5
|
--ebscn-color-danger: #ff4a58;
|
|
6
6
|
--ebscn-color-yellow: #ffa930;
|
|
7
7
|
--ebscn-color-orange: #e65a2b;
|
|
8
8
|
--ebscn-color-wathet: #0d2543;
|
|
9
|
-
--ebscn-color-text: #
|
|
9
|
+
--ebscn-color-text: #ebebeb;
|
|
10
10
|
--ebscn-color-text-secondary: #b3b3b3;
|
|
11
|
-
--ebscn-color-weak: #
|
|
11
|
+
--ebscn-color-weak: #7a7a7a;
|
|
12
12
|
--ebscn-color-light: #4d4d4d;
|
|
13
13
|
--ebscn-color-border: #2b2b2b;
|
|
14
14
|
--ebscn-color-box: #0a0a0a;
|
|
15
15
|
--ebscn-color-background: #1a1a1a;
|
|
16
16
|
--ebscn-color-background-body: var(--ebscn-color-background);
|
|
17
17
|
--ebscn-border-color: var(--ebscn-color-border);
|
|
18
|
+
--ebscn-color-split-line: #2B2B2B;
|
|
19
|
+
--ebscn-color-keyboard-bg: #1a1a1a;
|
|
20
|
+
--ebscn-color-keyboard-key-bg: #474747;
|
|
21
|
+
--ebscn-color-keyboard-fckey-bg: #292929;
|
|
22
|
+
--ebscn-color-keyboard-key-bg-active: #323232;
|
|
23
|
+
--ebscn-color-keyboard-fckey-bg-active: #252525;
|
|
24
|
+
--ebscn-color-keyboard-fckey-border: #111;
|
|
25
|
+
--ebscn-color-keyboard-key-border: #333;
|
|
18
26
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
--ebscn-color-warning: #ff8f1f;
|
|
22
22
|
--ebscn-color-danger: #ff3141;
|
|
23
23
|
--ebscn-color-yellow: #ff9f18;
|
|
24
|
-
--ebscn-color-wathet: #
|
|
24
|
+
--ebscn-color-wathet: #fef4f2;
|
|
25
25
|
--ebscn-color-text: #333333;
|
|
26
26
|
--ebscn-color-text-secondary: #666666;
|
|
27
27
|
--ebscn-color-weak: #999999;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
--ebscn-color-background: #ffffff;
|
|
31
31
|
--ebscn-color-highlight: var(--ebscn-color-danger);
|
|
32
32
|
--ebscn-color-white: #ffffff;
|
|
33
|
-
--ebscn-color-box: #
|
|
33
|
+
--ebscn-color-box: #f8f9fc;
|
|
34
34
|
--ebscn-color-text-light-solid: var(--ebscn-color-white);
|
|
35
35
|
--ebscn-color-text-dark-solid: #000000;
|
|
36
36
|
--ebscn-color-fill-content: var(--ebscn-color-box);
|
|
@@ -45,4 +45,11 @@
|
|
|
45
45
|
--ebscn-color-golden: #b47816;
|
|
46
46
|
--ebscn-color-grey: rgba(0, 0, 0, 0.7);
|
|
47
47
|
--ebscn-color-split-line: #EBEBEB;
|
|
48
|
+
--ebscn-color-keyboard-bg: #d3d5d8;
|
|
49
|
+
--ebscn-color-keyboard-key-bg: #fff;
|
|
50
|
+
--ebscn-color-keyboard-fckey-bg: #adb3bd;
|
|
51
|
+
--ebscn-color-keyboard-key-bg-active: #e5e5e5;
|
|
52
|
+
--ebscn-color-keyboard-fckey-bg-active: #9ba1aa;
|
|
53
|
+
--ebscn-color-keyboard-fckey-border: #888;
|
|
54
|
+
--ebscn-color-keyboard-key-border: #888;
|
|
48
55
|
}
|
package/es/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { default as PickerView } from './components/picker-view';
|
|
|
20
20
|
export { default as Popup } from './components/popup';
|
|
21
21
|
export { default as ProSelector } from './components/pro-selector';
|
|
22
22
|
export { default as Protocal } from './components/protocol';
|
|
23
|
+
export { default as Popover } from './components/popover';
|
|
23
24
|
export { default as PullToRefresh } from './components/pull-to-refresh';
|
|
24
25
|
export { default as Radio } from './components/radio';
|
|
25
26
|
export { default as SafeArea } from './components/safe-area';
|
|
@@ -35,8 +36,7 @@ export { default as Switch } from './components/switch';
|
|
|
35
36
|
export { default as Tabs } from './components/tabs';
|
|
36
37
|
export { default as Tip } from './components/tip';
|
|
37
38
|
export { default as ToastLoading } from './components/toastLoading';
|
|
38
|
-
export { default as PayInput } from './components/pay-input';
|
|
39
|
-
export { default as MoneyInput } from './components/money-input';
|
|
40
|
-
export { default as FeneInput } from './components/fene-input';
|
|
41
39
|
export { default as Input } from './components/input';
|
|
42
|
-
export { default as
|
|
40
|
+
export { default as InfiniteScroll } from './components/infinite-scroll';
|
|
41
|
+
export { default as List } from './components/list';
|
|
42
|
+
export { default as Toast } from './components/toast';
|
package/es/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export { default as PickerView } from './components/picker-view';
|
|
|
22
22
|
export { default as Popup } from './components/popup';
|
|
23
23
|
export { default as ProSelector } from './components/pro-selector';
|
|
24
24
|
export { default as Protocal } from './components/protocol';
|
|
25
|
+
export { default as Popover } from './components/popover';
|
|
25
26
|
export { default as PullToRefresh } from './components/pull-to-refresh';
|
|
26
27
|
export { default as Radio } from './components/radio';
|
|
27
28
|
export { default as SafeArea } from './components/safe-area';
|
|
@@ -37,8 +38,11 @@ export { default as Switch } from './components/switch';
|
|
|
37
38
|
export { default as Tabs } from './components/tabs';
|
|
38
39
|
export { default as Tip } from './components/tip';
|
|
39
40
|
export { default as ToastLoading } from './components/toastLoading';
|
|
40
|
-
export { default as PayInput } from './components/pay-input';
|
|
41
|
-
export { default as MoneyInput } from './components/money-input';
|
|
42
|
-
export { default as FeneInput } from './components/fene-input';
|
|
43
41
|
export { default as Input } from './components/input';
|
|
44
|
-
export { default as
|
|
42
|
+
export { default as InfiniteScroll } from './components/infinite-scroll';
|
|
43
|
+
export { default as List } from './components/list';
|
|
44
|
+
export { default as Toast } from './components/toast';
|
|
45
|
+
// export { default as PayInput} from './components/pay-input';
|
|
46
|
+
// export { default as MoneyInput } from './components/money-input';
|
|
47
|
+
// export { default as FeneInput } from './components/fene-input';
|
|
48
|
+
// export { default as CommonInput } from './components/common-input';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebscn/ui",
|
|
3
|
-
"version": "1.0.3-beta.
|
|
3
|
+
"version": "1.0.3-beta.20",
|
|
4
4
|
"description": "ebscn react library",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./es/index.d.ts",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"@react-spring/web": "^9.7.3",
|
|
40
40
|
"@use-gesture/react": "^10.3.0",
|
|
41
41
|
"ahooks": "^3.7.10",
|
|
42
|
-
"antd-mobile": "^5.34.0",
|
|
43
42
|
"lodash": "^4.17.21",
|
|
44
43
|
"lorem-ipsum": "^2.0.8",
|
|
45
44
|
"pdfh5": "^1.4.2",
|
|
@@ -47,13 +46,5 @@
|
|
|
47
46
|
"react-is": "^18.2.0",
|
|
48
47
|
"react-photo-view": "^1.2.4",
|
|
49
48
|
"use-sync-external-store": "^1.2.0"
|
|
50
|
-
}
|
|
51
|
-
"sideEffects": [
|
|
52
|
-
"**/*.css",
|
|
53
|
-
"**/*.less",
|
|
54
|
-
"./es/index.js",
|
|
55
|
-
"./src/index.ts",
|
|
56
|
-
"./es/global/index.js",
|
|
57
|
-
"./src/global/index.ts"
|
|
58
|
-
]
|
|
49
|
+
}
|
|
59
50
|
}
|