foxit-component 0.0.1-alpha.4 → 0.0.1-alpha.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/Button.d.ts +2 -1
- package/es/Button/Button.js +4 -4
- package/es/Checkbox/Checkbox.js +0 -1
- package/es/Empty/Empty.js +0 -1
- package/es/Form/Form.js +0 -1
- package/es/Form/FormItem.js +0 -1
- package/es/Form/FormProvider.js +95 -107
- package/es/Input/Input.js +3 -3
- package/es/Menu/Menu.js +0 -1
- package/es/Modal/Modal.js +49 -7
- package/es/Modal/ModalTemp.js +0 -1
- package/es/Pagination/Pagination.js +0 -1
- package/es/Radio/Radio.js +0 -1
- package/es/Select/Select.d.ts +2 -0
- package/es/Select/Select.js +13 -10
- package/es/Table/Table.js +4 -2
- package/es/Tabs/Tabs.js +0 -1
- package/es/Tag/Tag.js +0 -1
- package/es/Toast/Toast.js +0 -1
- package/es/Toast/ToastContainer.js +0 -1
- package/es/Tooltip/Tooltip.js +0 -1
- package/es/index.css +1 -0
- package/es/node_modules/tslib/tslib.es6.js +39 -1
- package/package.json +1 -1
- package/es/Button/button.css.js +0 -6
- package/es/Checkbox/checkbox.css.js +0 -6
- package/es/Empty/empty.css.js +0 -6
- package/es/Form/form.css.js +0 -6
- package/es/Input/input.css.js +0 -6
- package/es/Menu/menu.css.js +0 -6
- package/es/Modal/modal.css.js +0 -6
- package/es/Pagination/pagination.css.js +0 -6
- package/es/Radio/radio.css.js +0 -6
- package/es/Table/table.css.js +0 -6
- package/es/Tabs/tabs.css.js +0 -6
- package/es/Tag/tag.css.js +0 -6
- package/es/Toast/toast.css.js +0 -6
- package/es/Tooltip/tooltip.css.js +0 -6
- package/es/node_modules/style-inject/dist/style-inject.es.js +0 -28
package/es/Button/Button.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export interface ButtonProps {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
10
|
[key: string]: unknown;
|
|
11
|
+
loading?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare const Button: ({ primary, size, children, className, style, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const Button: ({ primary, size, children, className, style, loading, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
package/es/Button/Button.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __rest, __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import '
|
|
4
|
+
import { Icon } from '../Icon/index.js';
|
|
5
5
|
|
|
6
6
|
var Button = function (_a) {
|
|
7
|
-
var _b = _a.primary, primary = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, _d = _a.children, children = _d === void 0 ? '' : _d, className = _a.className, style = _a.style, props = __rest(_a, ["primary", "size", "children", "className", "style"]);
|
|
7
|
+
var _b = _a.primary, primary = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, _d = _a.children, children = _d === void 0 ? '' : _d, className = _a.className, style = _a.style, loading = _a.loading, props = __rest(_a, ["primary", "size", "children", "className", "style", "loading"]);
|
|
8
8
|
var mode = primary ? 'foxit-button-primary' : 'foxit-button-secondary';
|
|
9
|
-
return (
|
|
9
|
+
return (jsxs("button", __assign({ type: "button", className: classNames('foxit-button', "foxit-button-".concat(size), mode, className), style: style }, props, { children: [loading && jsx(Icon, { name: "LoadingOutlined", className: "foxit-button-loading" }), children] })));
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export { Button };
|
package/es/Checkbox/Checkbox.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState } from 'react';
|
|
4
|
-
import './checkbox.css.js';
|
|
5
4
|
|
|
6
5
|
var Checkbox = function (_a) {
|
|
7
6
|
var onChange = _a.onChange, checked = _a.checked, _b = _a.disabled, disabled = _b === void 0 ? false : _b, children = _a.children;
|
package/es/Empty/Empty.js
CHANGED
package/es/Form/Form.js
CHANGED
|
@@ -3,7 +3,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { forwardRef, useRef, useCallback, useImperativeHandle } from 'react';
|
|
4
4
|
import FormProvider from './FormProvider.js';
|
|
5
5
|
import './FormContext.js';
|
|
6
|
-
import './form.css.js';
|
|
7
6
|
|
|
8
7
|
var Form = function (_a, ref) {
|
|
9
8
|
var children = _a.children, onFinish = _a.onFinish, initialValues = _a.initialValues;
|
package/es/Form/FormItem.js
CHANGED
|
@@ -2,7 +2,6 @@ import { __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React, { useContext, useEffect, useCallback } from 'react';
|
|
4
4
|
import { FormContext } from './FormContext.js';
|
|
5
|
-
import './form.css.js';
|
|
6
5
|
|
|
7
6
|
var FormItem = function (_a) {
|
|
8
7
|
var _b, _c, _d;
|
package/es/Form/FormProvider.js
CHANGED
|
@@ -1,43 +1,39 @@
|
|
|
1
1
|
import { __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { forwardRef,
|
|
3
|
+
import { forwardRef, useRef, useState, useEffect, useCallback, useImperativeHandle } from 'react';
|
|
4
4
|
import { FormContext } from './FormContext.js';
|
|
5
5
|
|
|
6
6
|
var FormProvider = function (_a, ref) {
|
|
7
7
|
var children = _a.children, _b = _a.initialValues, initialValues = _b === void 0 ? {} : _b;
|
|
8
|
-
var
|
|
8
|
+
var formFieldsRef = useRef({});
|
|
9
|
+
var _c = useState({}), forceUpdate = _c[1]; // Used to force re-render when ref changes
|
|
9
10
|
var formInstanceRef = useRef({});
|
|
10
11
|
// 初始值的设置
|
|
11
12
|
useEffect(function () {
|
|
12
13
|
if (Object.keys(initialValues).length > 0) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
newFields[key] = { value: initialValues[key], rules: [] };
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
newFields[key] = __assign(__assign({}, newFields[key]), { value: initialValues[key] });
|
|
21
|
-
}
|
|
14
|
+
formFieldsRef.current = __assign({}, formFieldsRef.current); // Create a new object
|
|
15
|
+
for (var key in initialValues) {
|
|
16
|
+
if (!formFieldsRef.current[key]) {
|
|
17
|
+
formFieldsRef.current[key] = { value: initialValues[key], rules: [] };
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
else {
|
|
20
|
+
formFieldsRef.current[key] = __assign(__assign({}, formFieldsRef.current[key]), { value: initialValues[key] });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
forceUpdate({}); // Trigger re-render
|
|
25
24
|
}
|
|
26
25
|
}, [initialValues]);
|
|
27
26
|
// 注册字段
|
|
28
27
|
var registerField = useCallback(function (name, rules) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
28
|
+
formFieldsRef.current = __assign({}, formFieldsRef.current); // Create a new object
|
|
29
|
+
formFieldsRef.current[name] = __assign(__assign({}, formFieldsRef.current[name]), { rules: rules || [] });
|
|
30
|
+
forceUpdate({}); // Trigger re-render
|
|
33
31
|
}, []);
|
|
34
32
|
// 销毁字段
|
|
35
33
|
var unregisterField = useCallback(function (name) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return newFields;
|
|
40
|
-
});
|
|
34
|
+
formFieldsRef.current = __assign({}, formFieldsRef.current); // Create a new object
|
|
35
|
+
delete formFieldsRef.current[name];
|
|
36
|
+
forceUpdate({}); // Trigger re-render
|
|
41
37
|
}, []);
|
|
42
38
|
// 验证字段
|
|
43
39
|
var validateField = useCallback(function (name, value, rules) {
|
|
@@ -77,78 +73,74 @@ var FormProvider = function (_a, ref) {
|
|
|
77
73
|
}, []);
|
|
78
74
|
// 设置字段值
|
|
79
75
|
var setFieldsValue = useCallback(function (values) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (validation) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
else if (validation.type === 'warning') {
|
|
95
|
-
newFields[key] = __assign(__assign({}, newFields[key]), { warning: validation.message, error: undefined // Clear any previous errors
|
|
96
|
-
});
|
|
97
|
-
}
|
|
76
|
+
var _a;
|
|
77
|
+
formFieldsRef.current = __assign({}, formFieldsRef.current); // Create a new object
|
|
78
|
+
for (var key in values) {
|
|
79
|
+
if (Object.prototype.hasOwnProperty.call(values, key)) {
|
|
80
|
+
var newValue = values[key];
|
|
81
|
+
formFieldsRef.current[key] = __assign(__assign({}, formFieldsRef.current[key]), { value: newValue });
|
|
82
|
+
// 验证字段
|
|
83
|
+
var validation = validateField(key, newValue, ((_a = formFieldsRef.current[key]) === null || _a === void 0 ? void 0 : _a.rules) || []);
|
|
84
|
+
if (validation) {
|
|
85
|
+
if (validation.type === 'error') {
|
|
86
|
+
formFieldsRef.current[key] = __assign(__assign({}, formFieldsRef.current[key]), { error: validation.message, warning: undefined // Clear any previous warnings
|
|
87
|
+
});
|
|
98
88
|
}
|
|
99
|
-
else {
|
|
100
|
-
|
|
89
|
+
else if (validation.type === 'warning') {
|
|
90
|
+
formFieldsRef.current[key] = __assign(__assign({}, formFieldsRef.current[key]), { warning: validation.message, error: undefined // Clear any previous errors
|
|
91
|
+
});
|
|
101
92
|
}
|
|
102
93
|
}
|
|
94
|
+
else {
|
|
95
|
+
formFieldsRef.current[key] = __assign(__assign({}, formFieldsRef.current[key]), { error: undefined, warning: undefined });
|
|
96
|
+
}
|
|
103
97
|
}
|
|
104
|
-
|
|
105
|
-
});
|
|
106
|
-
}, [
|
|
98
|
+
}
|
|
99
|
+
forceUpdate({}); // Trigger re-render
|
|
100
|
+
}, [validateField]);
|
|
107
101
|
// 获取字段值
|
|
108
102
|
var getFieldsValue = useCallback(function (names) {
|
|
109
103
|
if (!names) {
|
|
110
|
-
return Object.keys(
|
|
111
|
-
acc[key] =
|
|
104
|
+
return Object.keys(formFieldsRef.current).reduce(function (acc, key) {
|
|
105
|
+
acc[key] = formFieldsRef.current[key].value;
|
|
112
106
|
return acc;
|
|
113
107
|
}, {});
|
|
114
108
|
}
|
|
115
109
|
return names.reduce(function (acc, key) {
|
|
116
110
|
var _a;
|
|
117
|
-
acc[key] = (_a =
|
|
111
|
+
acc[key] = (_a = formFieldsRef.current[key]) === null || _a === void 0 ? void 0 : _a.value;
|
|
118
112
|
return acc;
|
|
119
113
|
}, {});
|
|
120
|
-
}, [
|
|
114
|
+
}, []);
|
|
121
115
|
// 重置字段
|
|
122
116
|
var resetFields = useCallback(function (names) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
});
|
|
143
|
-
}, [formFields, initialValues]);
|
|
117
|
+
formFieldsRef.current = __assign({}, formFieldsRef.current); // Create a new object
|
|
118
|
+
if (names) {
|
|
119
|
+
names.forEach(function (name) {
|
|
120
|
+
if (formFieldsRef.current[name]) {
|
|
121
|
+
formFieldsRef.current[name].value = initialValues[name] || '';
|
|
122
|
+
formFieldsRef.current[name].error = undefined;
|
|
123
|
+
formFieldsRef.current[name].warning = undefined;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
Object.keys(formFieldsRef.current).forEach(function (key) {
|
|
129
|
+
formFieldsRef.current[key].value = initialValues[key] || '';
|
|
130
|
+
formFieldsRef.current[key].error = undefined;
|
|
131
|
+
formFieldsRef.current[key].warning = undefined;
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
forceUpdate({}); // Trigger re-render
|
|
135
|
+
}, [initialValues]);
|
|
144
136
|
var validateFields = useCallback(function (names) {
|
|
145
137
|
return new Promise(function (resolve, reject) {
|
|
146
|
-
var fieldsToValidate = names || Object.keys(
|
|
138
|
+
var fieldsToValidate = names || Object.keys(formFieldsRef.current);
|
|
147
139
|
var values = getFieldsValue(fieldsToValidate);
|
|
148
140
|
var errors = {};
|
|
149
141
|
for (var _i = 0, fieldsToValidate_1 = fieldsToValidate; _i < fieldsToValidate_1.length; _i++) {
|
|
150
142
|
var key = fieldsToValidate_1[_i];
|
|
151
|
-
var field =
|
|
143
|
+
var field = formFieldsRef.current[key];
|
|
152
144
|
if (!field)
|
|
153
145
|
continue; // Skip if field is not registered
|
|
154
146
|
var validation = validateField(key, values[key], field.rules || []);
|
|
@@ -162,55 +154,49 @@ var FormProvider = function (_a, ref) {
|
|
|
162
154
|
}
|
|
163
155
|
}
|
|
164
156
|
if (Object.keys(errors).length > 0) {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return newFields;
|
|
171
|
-
});
|
|
157
|
+
formFieldsRef.current = __assign({}, formFieldsRef.current); // Create a new object
|
|
158
|
+
for (var key in errors) {
|
|
159
|
+
formFieldsRef.current[key] = __assign(__assign({}, formFieldsRef.current[key]), { error: errors[key] });
|
|
160
|
+
}
|
|
161
|
+
forceUpdate({}); // Trigger re-render
|
|
172
162
|
reject(errors);
|
|
173
163
|
}
|
|
174
164
|
else {
|
|
175
165
|
resolve(values);
|
|
176
166
|
}
|
|
177
167
|
});
|
|
178
|
-
}, [
|
|
168
|
+
}, [getFieldsValue, validateField]);
|
|
179
169
|
var setFieldsStatus = useCallback(function (status) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
if (newFields[n]) {
|
|
187
|
-
// Only update if field exists
|
|
188
|
-
if (type === 'error') {
|
|
189
|
-
newFields[n] = __assign(__assign({}, newFields[n]), { error: message });
|
|
190
|
-
}
|
|
191
|
-
else if (type === 'warning') {
|
|
192
|
-
newFields[n] = __assign(__assign({}, newFields[n]), { warning: message });
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
if (newFields[name]) {
|
|
170
|
+
formFieldsRef.current = __assign({}, formFieldsRef.current); // Create a new object
|
|
171
|
+
status.forEach(function (_a) {
|
|
172
|
+
var type = _a.type, name = _a.name, message = _a.message;
|
|
173
|
+
if (Array.isArray(name)) {
|
|
174
|
+
name.forEach(function (n) {
|
|
175
|
+
if (formFieldsRef.current[n]) {
|
|
199
176
|
// Only update if field exists
|
|
200
177
|
if (type === 'error') {
|
|
201
|
-
|
|
178
|
+
formFieldsRef.current[n] = __assign(__assign({}, formFieldsRef.current[n]), { error: message });
|
|
202
179
|
}
|
|
203
180
|
else if (type === 'warning') {
|
|
204
|
-
|
|
181
|
+
formFieldsRef.current[n] = __assign(__assign({}, formFieldsRef.current[n]), { warning: message });
|
|
205
182
|
}
|
|
206
183
|
}
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
if (formFieldsRef.current[name]) {
|
|
188
|
+
// Only update if field exists
|
|
189
|
+
if (type === 'error') {
|
|
190
|
+
formFieldsRef.current[name] = __assign(__assign({}, formFieldsRef.current[name]), { error: message });
|
|
191
|
+
}
|
|
192
|
+
else if (type === 'warning') {
|
|
193
|
+
formFieldsRef.current[name] = __assign(__assign({}, formFieldsRef.current[name]), { warning: message });
|
|
194
|
+
}
|
|
207
195
|
}
|
|
208
|
-
}
|
|
209
|
-
return newFields;
|
|
196
|
+
}
|
|
210
197
|
});
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
useImperativeHandle(ref, function () { return (__assign({}, formInstanceRef.current)); });
|
|
198
|
+
forceUpdate({}); // Trigger re-render
|
|
199
|
+
}, []);
|
|
214
200
|
formInstanceRef.current = {
|
|
215
201
|
setFieldsValue: setFieldsValue,
|
|
216
202
|
getFieldsValue: getFieldsValue,
|
|
@@ -220,7 +206,9 @@ var FormProvider = function (_a, ref) {
|
|
|
220
206
|
registerField: registerField,
|
|
221
207
|
unregisterField: unregisterField
|
|
222
208
|
};
|
|
223
|
-
|
|
209
|
+
// 暴露给外部的方法
|
|
210
|
+
useImperativeHandle(ref, function () { return (__assign({}, formInstanceRef.current)); });
|
|
211
|
+
return (jsx(FormContext.Provider, __assign({ value: { form: formInstanceRef.current, formFields: formFieldsRef.current } }, { children: children })));
|
|
224
212
|
};
|
|
225
213
|
var FormProvider$1 = forwardRef(FormProvider);
|
|
226
214
|
|
package/es/Input/Input.js
CHANGED
|
@@ -2,7 +2,6 @@ import { __rest, __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import './input.css.js';
|
|
6
5
|
import { Icon } from '../Icon/index.js';
|
|
7
6
|
|
|
8
7
|
var Input = function (_a) {
|
|
@@ -11,12 +10,13 @@ var Input = function (_a) {
|
|
|
11
10
|
};
|
|
12
11
|
var SearchInput = function (_a) {
|
|
13
12
|
var onSearch = _a.onSearch, rest = __rest(_a, ["onSearch"]);
|
|
13
|
+
var _b = useState(rest.value || ''), value = _b[0], setValue = _b[1];
|
|
14
14
|
var handleSearch = function () {
|
|
15
15
|
if (onSearch) {
|
|
16
|
-
onSearch(
|
|
16
|
+
onSearch(value);
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
return (jsx(Input, __assign({}, rest, { addonAfter: jsx("div", __assign({ style: { display: 'flex' }, onClick: handleSearch }, { children: jsx(Icon, { name: "SearchOutlined" }) })) })));
|
|
19
|
+
return (jsx(Input, __assign({}, rest, { onChange: function (e) { return setValue(e.target.value); }, addonAfter: jsx("div", __assign({ style: { display: 'flex' }, onClick: handleSearch }, { children: jsx(Icon, { name: "SearchOutlined" }) })) })));
|
|
20
20
|
};
|
|
21
21
|
var PasswordInput = function (props) {
|
|
22
22
|
var _a = useState(false), visible = _a[0], setVisible = _a[1];
|
package/es/Menu/Menu.js
CHANGED
|
@@ -2,7 +2,6 @@ import { __assign, __spreadArray } from '../node_modules/tslib/tslib.es6.js';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Icon } from '../Icon/index.js';
|
|
5
|
-
import './menu.css.js';
|
|
6
5
|
|
|
7
6
|
var getItem = function (label, key, icon, children, type) {
|
|
8
7
|
return {
|
package/es/Modal/Modal.js
CHANGED
|
@@ -1,17 +1,45 @@
|
|
|
1
|
-
import { __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
1
|
+
import { __assign, __awaiter, __generator } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useState } from 'react';
|
|
3
4
|
import { Icon } from '../Icon/index.js';
|
|
4
5
|
import { createRoot } from 'react-dom/client';
|
|
5
6
|
import { Modal as Modal$1 } from './ModalTemp.js';
|
|
6
7
|
import { Button } from '../Button/Button.js';
|
|
7
|
-
import './modal.css.js';
|
|
8
8
|
|
|
9
9
|
var ModalContent = function (_a) {
|
|
10
10
|
var title = _a.title, onCancel = _a.onCancel, _b = _a.onCancelText, onCancelText = _b === void 0 ? undefined : _b, onOk = _a.onOk, _c = _a.onOkText, onOkText = _c === void 0 ? undefined : _c, children = _a.children, _d = _a.width, width = _d === void 0 ? '400px' : _d;
|
|
11
|
+
var _e = useState(false), okLoading = _e[0], setOkLoading = _e[1];
|
|
12
|
+
var handleOk = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
13
|
+
var result;
|
|
14
|
+
return __generator(this, function (_a) {
|
|
15
|
+
switch (_a.label) {
|
|
16
|
+
case 0:
|
|
17
|
+
if (!onOk) return [3 /*break*/, 6];
|
|
18
|
+
_a.label = 1;
|
|
19
|
+
case 1:
|
|
20
|
+
_a.trys.push([1, , 5, 6]);
|
|
21
|
+
result = onOk();
|
|
22
|
+
if (!(result instanceof Promise)) return [3 /*break*/, 3];
|
|
23
|
+
setOkLoading(true);
|
|
24
|
+
return [4 /*yield*/, result];
|
|
25
|
+
case 2:
|
|
26
|
+
_a.sent();
|
|
27
|
+
return [3 /*break*/, 4];
|
|
28
|
+
case 3:
|
|
29
|
+
onOk();
|
|
30
|
+
_a.label = 4;
|
|
31
|
+
case 4: return [3 /*break*/, 6];
|
|
32
|
+
case 5:
|
|
33
|
+
setOkLoading(false);
|
|
34
|
+
return [7 /*endfinally*/];
|
|
35
|
+
case 6: return [2 /*return*/];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}); };
|
|
11
39
|
return (jsxs("div", __assign({ className: "foxit-modal-content-container", style: {
|
|
12
40
|
maxWidth: width,
|
|
13
41
|
width: width
|
|
14
|
-
} }, { children: [jsxs("div", __assign({ className: "foxit-modal-head" }, { children: [jsx("div", __assign({ className: "foxit-modal-title" }, { children: title })), jsx("div", __assign({ onClick: onCancel, className: "foxit-modal-close-button" }, { children: jsx(Icon, { name: "CloseOutlined" }) }))] })), jsx("div", { children: children }), jsxs("div", __assign({ className: "foxit-modal-footer" }, { children: [onCancelText && (jsx(Button, __assign({ size: "medium", onClick: onCancel }, { children: onCancelText }))), onOkText && (jsx(Button, __assign({ primary: true, size: "medium", onClick:
|
|
42
|
+
} }, { children: [jsxs("div", __assign({ className: "foxit-modal-head" }, { children: [jsx("div", __assign({ className: "foxit-modal-title" }, { children: title })), jsx("div", __assign({ onClick: onCancel, className: "foxit-modal-close-button" }, { children: jsx(Icon, { name: "CloseOutlined" }) }))] })), jsx("div", { children: children }), jsxs("div", __assign({ className: "foxit-modal-footer" }, { children: [onCancelText && (jsx(Button, __assign({ size: "medium", onClick: onCancel }, { children: onCancelText }))), onOkText && (jsx(Button, __assign({ primary: true, size: "medium", onClick: handleOk, loading: okLoading }, { children: onOkText })))] }))] })));
|
|
15
43
|
};
|
|
16
44
|
var Modal = function (_a) {
|
|
17
45
|
var title = _a.title, opened = _a.opened, onOk = _a.onOk, onOkText = _a.onOkText, onCancel = _a.onCancel, onCancelText = _a.onCancelText, maskClosable = _a.maskClosable, children = _a.children, width = _a.width;
|
|
@@ -30,10 +58,24 @@ Modal.confirm = function (_a) {
|
|
|
30
58
|
root.render(jsx(Modal$1, __assign({ opened: true, onClose: handleClose, maskClosable: maskClosable, position: "top" }, { children: jsx(ModalContent, __assign({ title: title, width: width, onCancel: function () {
|
|
31
59
|
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
32
60
|
handleClose();
|
|
33
|
-
}, onCancelText: onCancelText, onOk:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
61
|
+
}, onCancelText: onCancelText, onOk:
|
|
62
|
+
// 判断传进来的onOk是否为async函数
|
|
63
|
+
onOk instanceof Function && onOk.constructor.name === 'AsyncFunction' ?
|
|
64
|
+
function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
|
+
return __generator(this, function (_a) {
|
|
66
|
+
switch (_a.label) {
|
|
67
|
+
case 0: return [4 /*yield*/, onOk()];
|
|
68
|
+
case 1:
|
|
69
|
+
_a.sent();
|
|
70
|
+
handleClose();
|
|
71
|
+
return [2 /*return*/];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}); } :
|
|
75
|
+
function () {
|
|
76
|
+
onOk === null || onOk === void 0 ? void 0 : onOk();
|
|
77
|
+
handleClose();
|
|
78
|
+
}, onOkText: onOkText }, { children: content })) })));
|
|
37
79
|
};
|
|
38
80
|
|
|
39
81
|
export { Modal };
|
package/es/Modal/ModalTemp.js
CHANGED
|
@@ -4,7 +4,6 @@ import { useState, useEffect, useRef } from 'react';
|
|
|
4
4
|
import { CSSTransition } from 'react-transition-group';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
-
import './modal.css.js';
|
|
8
7
|
|
|
9
8
|
var contentAnimation = {
|
|
10
9
|
enter: 'foxit-modal-opacity-0 foxit-modal-scale-0',
|
package/es/Radio/Radio.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { createContext, useContext, useState } from 'react';
|
|
4
|
-
import './radio.css.js';
|
|
5
4
|
|
|
6
5
|
var RadioContext = createContext({});
|
|
7
6
|
var Radio = function (_a) {
|
package/es/Select/Select.d.ts
CHANGED
package/es/Select/Select.js
CHANGED
|
@@ -5,15 +5,18 @@ import classNames from 'classnames';
|
|
|
5
5
|
import { Icon } from '../Icon/index.js';
|
|
6
6
|
|
|
7
7
|
var Select = function (_a) {
|
|
8
|
-
var options = _a.options, className = _a.className, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, isClearable = _a.isClearable, isSearchable = _a.isSearchable, isMulti = _a.isMulti, _b = _a.placeholder, placeholder = _b === void 0 ? 'Select...' : _b, preIcon = _a.preIcon, rest = __rest(_a, ["options", "className", "defaultValue", "isDisabled", "isClearable", "isSearchable", "isMulti", "placeholder", "preIcon"]);
|
|
8
|
+
var options = _a.options, className = _a.className, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, isClearable = _a.isClearable, isSearchable = _a.isSearchable, isMulti = _a.isMulti, _b = _a.placeholder, placeholder = _b === void 0 ? 'Select...' : _b, preIcon = _a.preIcon, value = _a.value, onChange = _a.onChange, rest = __rest(_a, ["options", "className", "defaultValue", "isDisabled", "isClearable", "isSearchable", "isMulti", "placeholder", "preIcon", "value", "onChange"]);
|
|
9
9
|
var customStyles = {
|
|
10
|
-
control: function (styles
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
control: function (styles, _a) {
|
|
11
|
+
var isDisabled = _a.isDisabled;
|
|
12
|
+
return (__assign(__assign({}, styles), { backgroundColor: isDisabled ? '#f8f8f8' : 'white',
|
|
13
|
+
// minWidth: 200,
|
|
14
|
+
height: 48, paddingLeft: 8, borderRadius: 10, fontSize: 14, boxShadow: 'none', border: '1px solid #D9D9D9', ':hover': {
|
|
15
|
+
border: '1px solid #757575'
|
|
16
|
+
}, ':focus-within': {
|
|
17
|
+
border: '1px solid #FF5F00'
|
|
18
|
+
} }));
|
|
19
|
+
},
|
|
17
20
|
option: function (styles, _a) {
|
|
18
21
|
var isSelected = _a.isSelected, isFocused = _a.isFocused;
|
|
19
22
|
return __assign(__assign({}, styles), { backgroundColor: isFocused ? '#FFF6F0' : 'white', color: isSelected ? '#FF5F00' : '#666', ':hover': {
|
|
@@ -26,7 +29,7 @@ var Select = function (_a) {
|
|
|
26
29
|
};
|
|
27
30
|
var CustomControl = function (props) { return (jsxs(components.Control, __assign({}, props, { children: [preIcon && (jsx("div", __assign({ style: {
|
|
28
31
|
display: 'flex',
|
|
29
|
-
paddingLeft:
|
|
32
|
+
paddingLeft: 8,
|
|
30
33
|
marginRight: -4,
|
|
31
34
|
color: props.hasValue ? '#525252' : '#B3B3B3'
|
|
32
35
|
} }, { children: preIcon }))), props.children] }))); };
|
|
@@ -36,7 +39,7 @@ var Select = function (_a) {
|
|
|
36
39
|
return Array.isArray(defaultValue) &&
|
|
37
40
|
defaultValue.includes(option.value);
|
|
38
41
|
})
|
|
39
|
-
: options.find(function (option) { return option.value === defaultValue; }), isDisabled: isDisabled, isClearable: isClearable, isSearchable: isSearchable, isMulti: isMulti, components: { Control: CustomControl, Option: CustomOptionComp } }, rest)));
|
|
42
|
+
: options.find(function (option) { return option.value === defaultValue; }), isDisabled: isDisabled, isClearable: isClearable, isSearchable: isSearchable, isMulti: isMulti, components: { Control: CustomControl, Option: CustomOptionComp } }, rest, { onChange: onChange, value: options.find(function (option) { return option.value === value; }) })));
|
|
40
43
|
};
|
|
41
44
|
|
|
42
45
|
export { Select as default };
|
package/es/Table/Table.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import './table.css.js';
|
|
4
3
|
|
|
5
4
|
var Table = function (_a) {
|
|
6
5
|
var columns = _a.columns, data = _a.data;
|
|
@@ -9,7 +8,10 @@ var Table = function (_a) {
|
|
|
9
8
|
textAlign: column.align || 'left'
|
|
10
9
|
} }, { children: column.title }), index)); }) }) }), jsx("tbody", { children: data.map(function (record, rowIndex) { return (jsx("tr", __assign({ className: rowIndex % 2 === 0 ? 'foxit-even-row' : 'foxit-odd-row' }, { children: columns.map(function (column, colIndex) { return (jsx("td", __assign({ style: { textAlign: column.align || 'left' } }, { children: column.render
|
|
11
10
|
? column.render(record[column.dataIndex], record)
|
|
12
|
-
: record[column.dataIndex]
|
|
11
|
+
: (typeof record[column.dataIndex] === 'object'
|
|
12
|
+
? JSON.stringify(record[column.dataIndex]) // 将对象转换为字符串
|
|
13
|
+
: String(record[column.dataIndex])) // 确保它是一个字符串
|
|
14
|
+
}), colIndex)); }) }), rowIndex)); }) })] })) })));
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export { Table as default };
|
package/es/Tabs/Tabs.js
CHANGED
package/es/Tag/Tag.js
CHANGED
package/es/Toast/Toast.js
CHANGED
|
@@ -3,7 +3,6 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useState, useRef, useEffect } from 'react';
|
|
4
4
|
import { CSSTransition } from 'react-transition-group';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
import './toast.css.js';
|
|
7
6
|
import { Icon } from '../Icon/index.js';
|
|
8
7
|
|
|
9
8
|
var Toast = function (_a) {
|
|
@@ -2,7 +2,6 @@ import { __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
|
2
2
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { createRoot } from 'react-dom/client';
|
|
5
|
-
import './toast.css.js';
|
|
6
5
|
import Toast from './Toast.js';
|
|
7
6
|
|
|
8
7
|
var createToastContainer = function (toastManager, duration, unique) {
|
package/es/Tooltip/Tooltip.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __assign } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useRef } from 'react';
|
|
4
|
-
import './tooltip.css.js';
|
|
5
4
|
|
|
6
5
|
var Tooltip = function (_a) {
|
|
7
6
|
var title = _a.title, children = _a.children;
|
package/es/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.foxit-checkbox-container{cursor:pointer;display:inline-block;padding-left:25px;position:relative;-webkit-user-select:none;user-select:none}.foxit-checkbox-container input{cursor:pointer;opacity:0;position:absolute}.foxit-checkbox-checkmark{background-color:#fff;border:1px solid #b3b3b3;border-radius:4px;height:20px;left:0;position:absolute;top:0;width:20px}.foxit-checkbox-content{line-height:20px}.foxit-checkbox-container input:checked~.foxit-checkbox-checkmark{background-color:#ff5f00;border:none}.foxit-checkbox-checkmark:after{content:"";display:none;position:absolute}.foxit-checkbox-container input:checked~.foxit-checkbox-checkmark:after{display:block}.foxit-checkbox-container .foxit-checkbox-checkmark:after{border:solid #fff;border-width:0 2px 2px 0;height:10px;left:7px;top:4px;transform:rotate(45deg);width:6px}.foxit-checkbox-container.disabled{color:#00000040;cursor:not-allowed;opacity:.6}.foxit-checkbox-checkmark.disabled{background-color:#f5f5f5;border:1px solid #d9d9d9}.foxit-empty{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:20px;text-align:center}.foxit-empty-image{margin-bottom:16px}.foxit-empty-description{color:#757575;font-size:14px}.foxit-form-item{margin-bottom:16px}.foxit-form-item label{color:#525252;display:block;font-size:14px;font-weight:500;margin-bottom:8px}.foxit-form-error-text{color:#e22727;font-size:12px;margin-top:8px}.foxit-form-warning-text{color:orange;margin-top:8px}.foxit-form-item>.foxit-form-error-component .foxit-checkbox-container,.foxit-form-item>.foxit-form-error-component .foxit-input-wrapper,.foxit-form-item>.foxit-form-error-component .foxit-radio-container,.foxit-form-item>.foxit-form-error-component .foxit-select-wrapper>:nth-child(3){border:1px solid #e22727!important}.foxit-form-item>.foxit-form-warning-component .foxit-checkbox-container,.foxit-form-item>.foxit-form-warning-component .foxit-input-wrapper,.foxit-form-item>.foxit-form-warning-component .foxit-radio-container,.foxit-form-item>.foxit-form-warning-component .foxit-select-wrapper>:nth-child(3){border-color:orange!important}.foxit-input-wrapper{align-items:center;border:1px solid #d9d9d9;border-radius:10px;display:flex;font-size:14px;font-weight:400;padding:11px 16px;transition:border-color .3s}.foxit-input-wrapper:focus-within{border-color:#ff5f00!important}.foxit-input-wrapper:hover{border-color:#757575}.foxit-input-element{border:none;color:#525252;flex:1;line-height:24px;outline:none}.foxit-input-element::placeholder{color:#b3b3b3}.foxit-input-addon{align-items:center;color:#b3b3b3;cursor:pointer;display:flex;padding:0 8px;transition:color .3s}.foxit-input-wrapper:focus-within .foxit-input-addon{color:#ff5f00!important}.foxit-input-wrapper:hover .foxit-input-addon{color:#757575}.foxit-input-wrapper :disabled,.foxit-input-wrapper-disabled{background-color:#f8f8f8}.foxit-input-wrapper-disabled:hover{border-color:#d9d9d9}.foxit-input-wrapper-disabled .foxit-input-element{color:#b3b3b3}.foxit-pagination-container{align-items:center;display:flex;justify-content:center}.foxit-pagination-button,.foxit-pagination-next,.foxit-pagination-prev{background-color:initial;border:none;border-radius:10px;color:#757575;cursor:pointer;font-size:16px;font-weight:500;height:48px;margin:0 4px;min-width:48px;padding:0 12px;transition:background-color .3s ease,color .3s ease}.foxit-pagination-next:hover,.foxit-pagination-prev:hover{color:#ff5f00}.foxit-pagination-button:hover{background-color:#ff5f001a}.foxit-pagination-button:disabled{background-color:#ff5f00;color:#fff;cursor:default}.foxit-radio-container{cursor:pointer;display:inline-block;padding-left:25px;position:relative;-webkit-user-select:none;user-select:none}.foxit-radio-container input{cursor:pointer;opacity:0;position:absolute}.foxit-radio-checkmark{background-color:#fff;border:1px solid #b3b3b3;border-radius:50%;height:20px;left:0;position:absolute;top:0;width:20px}.foxit-radio-content{line-height:20px}.foxit-radio-container input:checked~.foxit-radio-checkmark{background-color:#fff;border:1px solid #ff5f00}.foxit-radio-checkmark:after{content:"";display:none;position:absolute}.foxit-radio-container input:checked~.foxit-radio-checkmark:after{display:block}.foxit-radio-container .foxit-radio-checkmark:after{background:#ff5f00;border-radius:50%;height:10px;left:4px;top:4px;width:10px}.foxit-radio-container.disabled{cursor:not-allowed;opacity:.6}.foxit-table{border:1px solid #ff5f00;border-radius:10px;color:#373737;overflow:hidden}.foxit-table-container{border-collapse:collapse;width:100%}.foxit-table-container td,.foxit-table-container th{height:70px;min-height:70px;padding:24px}.foxit-table-container th{background-color:#fff6f0;font-size:16px;font-weight:700}.foxit-table-container td{font-size:14px;font-weight:400}.foxit-table-container .foxit-even-row{background-color:#fff}.foxit-table-container .foxit-odd-row{background-color:#fff6f0}.foxit-tabs{display:flex;gap:8px}.foxit-tab-item{background-color:#f1f3f4;border:none;border-radius:10px;color:#757575;cursor:pointer;font-weight:600;padding:14px 20px;transition:background-color .3s,color .3s}.foxit-tab-item.active{background-color:#ff5f00;color:#fff}.foxit-tab-item:hover:not(.active){background-color:#e0e0e0}.foxit-tab-content{margin-top:16px}.foxit-tag{border-radius:5px;display:inline-block;font-size:12px;font-weight:600;height:24px;min-height:24px;padding:4px 8px;white-space:nowrap}.foxit-tag-active{background-color:#edfafa;color:#0f8b8d}.foxit-tag-canceled{background-color:#ffecec;color:#e22727}.foxit-tag-pending{background-color:#fbf4d0;color:#9b8827}.foxit-tag-offline{background-color:#edecff;color:#6462c6}.foxit-tag-trial{background-color:#e4f4fe;color:#2288ce}.foxit-tag-expired{background-color:#ececec;color:#757575}.foxit-toast-container{left:50%;pointer-events:none;position:fixed;top:0;transform:translateX(-50%);transition-delay:0s;transition-duration:.5s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%;z-index:2000}.foxit-toast-loading{animation:spin 1s linear infinite;color:#ff5f00}.foxit-toast-loading-overlay{background-color:#000;height:100vh;inset:0;opacity:.15;pointer-events:auto;position:fixed;z-index:10}.foxit-toast-item{align-items:center;background-color:#fff;border:none;border-radius:50px;color:#525252;display:flex;flex-direction:row;gap:8px;justify-content:center;margin-bottom:16px;margin-left:auto;margin-right:auto;padding:9px 12px;position:relative;top:102px;transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:fit-content;z-index:20}.foxit-toast-item-success{background-color:#ddfae8;color:#1f7f40}.foxit-toast-item-error{background-color:#fae5dd;color:#e22727}.foxit-toast-item-warning{background-color:#fff0e7;color:#525252}.foxit-toast-enter{opacity:0;transform:translateY(-100%)}.foxit-toast-enter-active{transition:all .5s ease-out}.foxit-toast-enter-active,.foxit-toast-exit{opacity:1;transform:translateY(0)}.foxit-toast-exit-active{opacity:0;transform:translateY(-100%);transition:all .5s ease-in}.foxit-tooltip-container{display:inline-block;position:relative;width:auto}.foxit-tooltip-content{background-color:#525252;border-radius:10px;color:#fff;max-width:300px;padding:12px 16px;width:max-content;z-index:1}.foxit-tooltip-arrow,.foxit-tooltip-content{left:50%;position:absolute;transform:translateX(-50%)}.foxit-tooltip-arrow{border-left:5px solid #0000;border-right:5px solid #0000;border-top:5px solid #525252;bottom:-5px;height:0;width:0}.foxit-button{align-items:center;border:0;border-radius:10px;cursor:pointer;display:flex;font-size:14px;font-weight:600;justify-content:center;letter-spacing:.42px}.foxit-button:hover{opacity:.8}.foxit-button-primary{background-color:#ff5f00;color:#fff}.foxit-button-secondary{background-color:#fff;border:2px solid #ff5f00;color:#ff5f00}.foxit-button-small{border-radius:5px;height:38px;padding-left:24px;padding-right:24px}.foxit-button-small svg{height:16px;width:16px}.foxit-button-medium{border-radius:5px;height:44px;padding-left:32px;padding-right:32px}.foxit-button-medium svg{height:20px;width:20px}.foxit-button-large{height:56px;padding-left:32px;padding-right:32px}.foxit-button-loading{animation:spin 1s linear infinite;color:#fff;margin-right:8px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.foxit-menu{border-radius:10px;box-shadow:0 2px 8px #00000026;font-size:14px;overflow:hidden}.foxit-menu-item-content{align-items:center;cursor:pointer;display:flex;padding:12px 16px}.foxit-menu-item{padding-left:0}.foxit-menu-item.selected{background-color:#fff6f0!important;color:#ff5f00;font-weight:600}.foxit-menu-item:hover{background-color:#f5f6f8}.foxit-menu-submenu-title{align-items:center;cursor:pointer;display:flex;justify-content:space-between;padding:12px 16px}.foxit-menu-submenu-title:hover{background-color:#f5f6f8}.foxit-menu-icon{transition:transform .3s ease-in-out}.foxit-menu-rotated-icon{transform:rotate(180deg)}.foxit-menu-item-label{font-weight:600}.foxit-modal-content-container{background-color:#fff;border-radius:10px;display:flex;flex-direction:column;gap:24px;justify-content:space-between;min-width:320px;padding:24px}.foxit-modal-head{align-items:center;display:flex;justify-content:space-between}.foxit-modal-title{font-size:20px;font-weight:500}.foxit-modal-close-button{align-items:center;cursor:pointer;display:flex;height:16px;justify-content:center;width:16px}.foxit-modal-close-button svg{stroke:#6b7280}.foxit-modal-close-button:hover svg{stroke:#ea580c}.foxit-modal-footer{display:flex;gap:16px;justify-content:flex-end}.foxit-modal-fixed-layout{align-items:center;display:flex;flex-direction:column;inset:0;padding:36px;position:fixed;z-index:50}.foxit-modal-justify-center{justify-content:center}.foxit-modal-justify-top{justify-content:flex-start;padding-top:96px}.foxit-modal-justify-bottom{justify-content:flex-end}.foxit-modal-overlay{cursor:pointer;height:100%;inset:0;position:fixed;width:100%;z-index:50}.foxit-modal-overlay-bg{background-color:#00000026;height:100%;inset:0;position:absolute;width:100%}.foxit-modal-content{align-items:center;display:flex;font-size:16px;font-weight:400;justify-content:center;max-height:100%;width:auto;z-index:50}.foxit-modal-opacity-0{opacity:0}.foxit-modal-opacity-100{opacity:1}.foxit-modal-scale-0{transform:scale(0)}.foxit-modal-scale-100{transform:scale(1)}.foxit-modal-transition{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.foxit-modal-hide-overflow{overflow-y:hidden}
|
|
@@ -38,6 +38,44 @@ function __rest(s, e) {
|
|
|
38
38
|
return t;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function __generator(thisArg, body) {
|
|
52
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
53
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
54
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
55
|
+
function step(op) {
|
|
56
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
57
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
58
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
59
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
60
|
+
switch (op[0]) {
|
|
61
|
+
case 0: case 1: t = op; break;
|
|
62
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
63
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
64
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
65
|
+
default:
|
|
66
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
67
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
68
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
69
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
70
|
+
if (t[2]) _.ops.pop();
|
|
71
|
+
_.trys.pop(); continue;
|
|
72
|
+
}
|
|
73
|
+
op = body.call(thisArg, _);
|
|
74
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
75
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
41
79
|
function __spreadArray(to, from, pack) {
|
|
42
80
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
43
81
|
if (ar || !(i in from)) {
|
|
@@ -53,4 +91,4 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
53
91
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
54
92
|
};
|
|
55
93
|
|
|
56
|
-
export { __assign, __rest, __spreadArray };
|
|
94
|
+
export { __assign, __awaiter, __generator, __rest, __spreadArray };
|
package/package.json
CHANGED
package/es/Button/button.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-button {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n border: 0;\n border-radius: 10px;\n font-weight: 600;\n font-size: 14px;\n letter-spacing: 0.42px;\n}\n\n.foxit-button:hover {\n opacity: 0.8;\n}\n\n.foxit-button-primary {\n background-color: #ff5f00;\n color: white;\n}\n.foxit-button-secondary {\n border: 2px solid #ff5f00;\n background-color: white;\n color: #ff5f00;\n}\n\n.foxit-button-small {\n padding-left: 24px;\n padding-right: 24px;\n border-radius: 5px;\n height: 38px;\n}\n\n.foxit-button-medium {\n padding-left: 32px;\n padding-right: 32px;\n border-radius: 5px;\n height: 44px;\n}\n.foxit-button-large {\n padding-left: 32px;\n padding-right: 32px;\n height: 56px;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-checkbox-container {\n display: inline-block;\n position: relative;\n padding-left: 25px;\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n}\n\n.foxit-checkbox-container input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n}\n\n.foxit-checkbox-checkmark {\n position: absolute;\n top: 0;\n left: 0;\n height: 20px;\n width: 20px;\n background-color: #fff;\n border: 1px solid #b3b3b3;\n border-radius: 4px;\n}\n\n.foxit-checkbox-content {\n line-height: 20px;\n}\n\n.foxit-checkbox-container input:checked ~ .foxit-checkbox-checkmark {\n background-color: #ff5f00;\n border: none;\n}\n\n.foxit-checkbox-checkmark:after {\n content: '';\n position: absolute;\n display: none;\n}\n\n.foxit-checkbox-container input:checked ~ .foxit-checkbox-checkmark:after {\n display: block;\n}\n\n.foxit-checkbox-container .foxit-checkbox-checkmark:after {\n left: 7px;\n top: 4px;\n width: 6px;\n height: 10px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n}\n\n.foxit-checkbox-container.disabled {\n cursor: not-allowed;\n opacity: 0.6;\n color: #00000040;\n}\n\n.foxit-checkbox-checkmark.disabled {\n background-color: #f5f5f5;\n border: 1px solid #d9d9d9;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
package/es/Empty/empty.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 20px;\n}\n\n.foxit-empty-image {\n margin-bottom: 16px;\n}\n\n.foxit-empty-description {\n font-size: 14px;\n color: #757575;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
package/es/Form/form.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-form-item {\n margin-bottom: 16px;\n}\n\n.foxit-form-item label {\n display: block;\n margin-bottom: 8px;\n font-weight: 500;\n font-size: 14px;\n color: #525252;\n}\n\n.foxit-form-error-text {\n margin-top: 8px;\n color: red;\n}\n\n.foxit-form-warning-text {\n margin-top: 8px;\n color: orange;\n}\n\n.foxit-form-item > .foxit-form-error-component .foxit-input-wrapper,\n.foxit-form-item > .foxit-form-error-component .foxit-select-wrapper > :nth-child(3),\n.foxit-form-item > .foxit-form-error-component .foxit-checkbox-container,\n.foxit-form-item > .foxit-form-error-component .foxit-radio-container {\n border: 1px solid red !important;\n}\n\n.foxit-form-item > .foxit-form-warning-component .foxit-input-wrapper,\n.foxit-form-item > .foxit-form-warning-component .foxit-select-wrapper > :nth-child(3),\n.foxit-form-item > .foxit-form-warning-component .foxit-checkbox-container,\n.foxit-form-item > .foxit-form-warning-component .foxit-radio-container {\n border-color: orange !important;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
package/es/Input/input.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-input-wrapper {\n display: flex;\n align-items: center;\n border: 1px solid #d9d9d9;\n border-radius: 10px;\n padding: 11px 16px;\n transition: border-color 0.3s;\n font-size: 14px;\n font-weight: 400;\n}\n\n.foxit-input-wrapper:focus-within {\n border-color: #ff5f00 !important;\n}\n.foxit-input-wrapper:hover {\n border-color: #757575;\n}\n\n.foxit-input-element {\n flex: 1;\n border: none;\n outline: none;\n color: #525252;\n line-height: 24px;\n}\n\n.foxit-input-element::placeholder {\n color: #b3b3b3;\n}\n\n.foxit-input-addon {\n display: flex;\n align-items: center;\n padding: 0 8px;\n cursor: pointer;\n color: #b3b3b3;\n transition: color 0.3s;\n}\n\n.foxit-input-wrapper:focus-within .foxit-input-addon {\n color: #ff5f00 !important;\n}\n.foxit-input-wrapper:hover .foxit-input-addon {\n color: #757575;\n}\n\n.foxit-input-wrapper-disabled,\n.foxit-input-wrapper :disabled {\n background-color: #f8f8f8;\n}\n\n.foxit-input-wrapper-disabled:hover {\n border-color: #d9d9d9;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
package/es/Menu/menu.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-menu {\n font-size: 14px;\n /* font-family: sans-serif;\n border: 0px solid #FFFFFF; */\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n border-radius: 10px;\n overflow: hidden;\n}\n\n.foxit-menu-item-content {\n padding: 12px 16px;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.foxit-menu-item {\n padding-left: 0px;\n}\n\n.foxit-menu-item.selected {\n background-color: #fff6f0 !important;\n color: #ff5f00;\n font-weight: 600;\n}\n\n.foxit-menu-item:hover {\n background-color: #f5f6f8;\n}\n\n.foxit-menu-submenu-title {\n padding: 12px 16px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.foxit-menu-submenu-title:hover {\n background-color: #f5f6f8;\n}\n\n.foxit-menu-icon {\n transition: transform 0.3s ease-in-out; /* Adjust timing as needed */\n}\n\n.foxit-menu-rotated-icon {\n transform: rotate(180deg);\n}\n\n.foxit-menu-item-label {\n font-weight: 600;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
package/es/Modal/modal.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-modal-content-container {\n display: flex;\n flex-direction: column;\n padding: 24px;\n background-color: #fff;\n border-radius: 10px;\n justify-content: space-between;\n min-width: 320px;\n gap: 24px;\n}\n\n.foxit-modal-head {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.foxit-modal-title {\n font-weight: 500;\n font-size: 20px;\n}\n\n.foxit-modal-close-button {\n display: flex;\n width: 16px;\n height: 16px;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n}\n\n.foxit-modal-close-button svg {\n stroke: #6b7280;\n}\n\n.foxit-modal-close-button:hover svg {\n stroke: #ea580c;\n}\n\n.foxit-modal-footer {\n display: flex;\n gap: 16px;\n justify-content: flex-end;\n}\n\n.foxit-modal-fixed-layout {\n position: fixed;\n inset: 0;\n z-index: 50;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 36px;\n}\n\n.foxit-modal-justify-center {\n justify-content: center;\n}\n\n.foxit-modal-justify-top {\n justify-content: flex-start;\n padding-top: 96px;\n}\n\n.foxit-modal-justify-bottom {\n justify-content: flex-end;\n}\n\n.foxit-modal-overlay {\n position: fixed;\n inset: 0;\n z-index: 50;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n\n.foxit-modal-overlay-bg {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.15); /* Equivalent to bg-main-black opacity-15 */\n}\n\n.foxit-modal-content {\n z-index: 50;\n max-height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n width: auto;\n font-size: 16px;\n font-weight: 400;\n}\n\n.foxit-modal-opacity-0 {\n opacity: 0;\n}\n\n.foxit-modal-opacity-100 {\n opacity: 1;\n}\n\n.foxit-modal-scale-0 {\n transform: scale(0);\n}\n\n.foxit-modal-scale-100 {\n transform: scale(1);\n}\n\n.foxit-modal-transition {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.foxit-modal-hide-overflow {\n overflow-y: hidden;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-pagination-container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.foxit-pagination-button,\n.foxit-pagination-prev,\n.foxit-pagination-next {\n font-size: 16px;\n font-weight: 500;\n height: 48px;\n min-width: 48px;\n padding: 0 12px;\n border: none;\n border-radius: 10px;\n margin: 0 4px;\n color: #757575;\n background-color: transparent;\n cursor: pointer;\n transition:\n background-color 0.3s ease,\n color 0.3s ease;\n}\n\n.foxit-pagination-next:hover,\n.foxit-pagination-prev:hover {\n color: #ff5f00;\n}\n\n.foxit-pagination-button:hover {\n background-color: rgba(255, 95, 0, 0.1);\n}\n\n.foxit-pagination-button:disabled {\n background-color: #ff5f00;\n color: white;\n cursor: default;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
package/es/Radio/radio.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-radio-container {\n display: inline-block;\n position: relative;\n padding-left: 25px;\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n}\n\n.foxit-radio-container input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n}\n\n.foxit-radio-checkmark {\n position: absolute;\n top: 0;\n left: 0;\n height: 20px;\n width: 20px;\n background-color: #fff;\n border: 1px solid #b3b3b3;\n border-radius: 50%;\n}\n\n.foxit-radio-content {\n line-height: 20px;\n}\n\n.foxit-radio-container input:checked ~ .foxit-radio-checkmark {\n background-color: #ffffff;\n border: 1px solid #ff5f00;\n}\n\n.foxit-radio-checkmark:after {\n content: '';\n position: absolute;\n display: none;\n}\n\n.foxit-radio-container input:checked ~ .foxit-radio-checkmark:after {\n display: block;\n}\n\n.foxit-radio-container .foxit-radio-checkmark:after {\n top: 4px;\n left: 4px;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: #ff5f00;\n}\n\n.foxit-radio-container.disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
package/es/Table/table.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-table {\n border-radius: 10px;\n overflow: hidden;\n border: 1px solid #ff5f00;\n color: #373737;\n}\n\n.foxit-table-container {\n width: 100%;\n border-collapse: collapse;\n}\n\n.foxit-table-container th,\n.foxit-table-container td {\n min-height: 70px;\n height: 70px;\n padding: 24px;\n}\n\n.foxit-table-container th {\n background-color: #fff6f0;\n font-weight: 700;\n font-size: 16px;\n}\n\n.foxit-table-container td {\n font-size: 14px;\n font-weight: 400;\n}\n\n.foxit-table-container .foxit-even-row {\n background-color: white;\n}\n\n.foxit-table-container .foxit-odd-row {\n background-color: #fff6f0;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
package/es/Tabs/tabs.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-tabs {\n display: flex;\n gap: 8px;\n}\n\n.foxit-tab-item {\n font-weight: 600;\n padding: 14px 20px;\n border: none;\n border-radius: 10px;\n background-color: #f1f3f4;\n color: #757575;\n cursor: pointer;\n transition:\n background-color 0.3s,\n color 0.3s;\n}\n\n.foxit-tab-item.active {\n background-color: #ff5f00;\n color: white;\n}\n\n.foxit-tab-item:hover:not(.active) {\n background-color: #e0e0e0;\n}\n\n.foxit-tab-content {\n margin-top: 16px;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
package/es/Tag/tag.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-tag {\n display: inline-block;\n min-height: 24px;\n padding: 4px 8px;\n border-radius: 5px;\n font-size: 12px;\n font-weight: 600;\n white-space: nowrap;\n height: 24px;\n}\n\n.foxit-tag-active {\n background-color: #edfafa;\n color: #0f8b8d;\n}\n\n.foxit-tag-canceled {\n background-color: #ffecec;\n color: #e22727;\n}\n\n.foxit-tag-pending {\n background-color: #fbf4d0;\n color: #9b8827;\n}\n\n.foxit-tag-offline {\n background-color: #edecff;\n color: #6462c6;\n}\n\n.foxit-tag-trial {\n background-color: #e4f4fe;\n color: #2288ce;\n}\n\n.foxit-tag-expired {\n background-color: #ececec;\n color: #757575;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
package/es/Toast/toast.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-toast-container {\n width: 100%;\n position: fixed;\n pointer-events: none;\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 0.5s;\n left: 50%;\n transition-delay: 0s;\n transform: translateX(-50%);\n z-index: 2000;\n top: 0;\n}\n\n.foxit-toast-loading {\n animation: spin 1s linear infinite;\n color: #ff5f00;\n}\n\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n.foxit-toast-loading-overlay {\n position: fixed;\n inset: 0;\n background-color: #000000;\n opacity: 0.15;\n z-index: 10;\n pointer-events: auto;\n height: 100vh;\n}\n\n.foxit-toast-item {\n position: relative;\n top: 102px;\n z-index: 20;\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 0.15s;\n width: fit-content;\n margin-left: auto;\n margin-right: auto;\n background-color: #ffffff;\n color: #525252;\n padding: 9px 12px;\n border-radius: 50px;\n border: none;\n margin-bottom: 16px;\n display: flex;\n flex-direction: row;\n gap: 8px;\n justify-content: center;\n align-items: center;\n}\n\n.foxit-toast-item-success {\n background-color: #ddfae8;\n color: #1f7f40;\n}\n\n.foxit-toast-item-error {\n background-color: #fae5dd;\n color: #e22727;\n}\n\n.foxit-toast-item-warning {\n background-color: #fff0e7;\n color: #525252;\n}\n\n.foxit-toast-enter {\n opacity: 0;\n transform: translateY(-100%);\n}\n\n.foxit-toast-enter-active {\n opacity: 1;\n transform: translateY(0);\n transition: all 0.5s ease-out;\n}\n\n.foxit-toast-exit {\n opacity: 1;\n transform: translateY(0);\n}\n\n.foxit-toast-exit-active {\n opacity: 0;\n transform: translateY(-100%);\n transition: all 0.5s ease-in;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".foxit-tooltip-container {\n position: relative;\n display: inline-block;\n width: auto;\n}\n\n.foxit-tooltip-content {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n background-color: #525252;\n color: #fff;\n /* text-align: center; */\n border-radius: 10px;\n padding: 12px 16px;\n z-index: 1;\n max-width: 300px;\n width: max-content;\n}\n\n.foxit-tooltip-arrow {\n position: absolute;\n left: 50%;\n bottom: -5px;\n transform: translateX(-50%);\n width: 0;\n height: 0;\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n border-top: 5px solid #525252;\n}\n";
|
|
4
|
-
styleInject(css_248z);
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
function styleInject(css, ref) {
|
|
2
|
-
if ( ref === void 0 ) ref = {};
|
|
3
|
-
var insertAt = ref.insertAt;
|
|
4
|
-
|
|
5
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
6
|
-
|
|
7
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
8
|
-
var style = document.createElement('style');
|
|
9
|
-
style.type = 'text/css';
|
|
10
|
-
|
|
11
|
-
if (insertAt === 'top') {
|
|
12
|
-
if (head.firstChild) {
|
|
13
|
-
head.insertBefore(style, head.firstChild);
|
|
14
|
-
} else {
|
|
15
|
-
head.appendChild(style);
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
head.appendChild(style);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (style.styleSheet) {
|
|
22
|
-
style.styleSheet.cssText = css;
|
|
23
|
-
} else {
|
|
24
|
-
style.appendChild(document.createTextNode(css));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { styleInject as default };
|