foxit-component 0.0.1-alpha.6 → 0.0.1-alpha.8

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.
@@ -1,10 +1,18 @@
1
- import React from 'react';
1
+ import React, { FC } from 'react';
2
2
  import './checkbox.css';
3
3
  interface CheckboxProps {
4
4
  onChange?: (checked: boolean) => void;
5
5
  checked?: boolean;
6
6
  disabled?: boolean;
7
+ value?: string;
7
8
  children: React.ReactNode;
8
9
  }
9
- declare const Checkbox: React.FC<CheckboxProps>;
10
+ interface CheckboxGroupProps {
11
+ value?: string[];
12
+ onChange?: (checkedValues: string[]) => void;
13
+ children: React.ReactNode;
14
+ }
15
+ declare const Checkbox: React.FC<CheckboxProps> & {
16
+ Group: FC<CheckboxGroupProps>;
17
+ };
10
18
  export default Checkbox;
@@ -1,18 +1,49 @@
1
- import { __assign } from '../node_modules/tslib/tslib.es6.js';
1
+ import { __assign, __spreadArray } from '../node_modules/tslib/tslib.es6.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { useState } from 'react';
3
+ import { createContext, useContext, useState, useEffect } from 'react';
4
4
 
5
+ var CheckboxGroupContext = createContext(null);
5
6
  var Checkbox = function (_a) {
6
- var onChange = _a.onChange, checked = _a.checked, _b = _a.disabled, disabled = _b === void 0 ? false : _b, children = _a.children;
7
+ var onChange = _a.onChange, checked = _a.checked, _b = _a.disabled, disabled = _b === void 0 ? false : _b, value = _a.value, children = _a.children;
8
+ var groupContext = useContext(CheckboxGroupContext);
7
9
  var _c = useState(checked || false), internalChecked = _c[0], setInternalChecked = _c[1];
10
+ useEffect(function () {
11
+ if (checked !== undefined) {
12
+ setInternalChecked(checked);
13
+ }
14
+ }, [checked]);
8
15
  var handleChange = function (e) {
9
16
  var newChecked = e.target.checked;
10
17
  setInternalChecked(newChecked);
11
18
  if (onChange) {
12
19
  onChange(newChecked);
13
20
  }
21
+ if (groupContext && value) {
22
+ groupContext.onChange(value, newChecked);
23
+ }
24
+ };
25
+ var isChecked = groupContext ? groupContext.value.includes(value || '') : internalChecked;
26
+ return (jsxs("label", __assign({ className: "foxit-checkbox-container ".concat(disabled ? 'disabled' : '') }, { children: [jsx("input", { type: "checkbox", checked: isChecked, disabled: disabled, onChange: handleChange }), jsx("span", { className: "foxit-checkbox-checkmark ".concat(disabled ? 'disabled' : '') }), jsx("span", __assign({ className: "foxit-checkbox-content" }, { children: children }))] })));
27
+ };
28
+ var CheckboxGroup = function (_a) {
29
+ var value = _a.value, onChange = _a.onChange, children = _a.children;
30
+ var _b = useState([]), checkedValues = _b[0], setCheckedValues = _b[1];
31
+ useEffect(function () {
32
+ if (value !== undefined) {
33
+ setCheckedValues(value);
34
+ }
35
+ }, [value]);
36
+ var handleCheckboxChange = function (checkboxValue, checked) {
37
+ var newCheckedValues = checked
38
+ ? __spreadArray(__spreadArray([], checkedValues, true), [checkboxValue], false) : checkedValues.filter(function (v) { return v !== checkboxValue; });
39
+ setCheckedValues(newCheckedValues);
40
+ if (onChange) {
41
+ onChange(newCheckedValues);
42
+ }
14
43
  };
15
- return (jsxs("label", __assign({ className: "foxit-checkbox-container ".concat(disabled ? 'disabled' : '') }, { children: [jsx("input", { type: "checkbox", checked: checked !== undefined ? checked : internalChecked, disabled: disabled, onChange: handleChange }), jsx("span", { className: "foxit-checkbox-checkmark ".concat(disabled ? 'disabled' : '') }), jsx("span", __assign({ className: "foxit-checkbox-content" }, { children: children }))] })));
44
+ var currentValue = value !== undefined ? value : checkedValues;
45
+ return (jsx(CheckboxGroupContext.Provider, __assign({ value: { value: currentValue, onChange: handleCheckboxChange } }, { children: jsx("div", __assign({ className: "foxit-checkbox-group" }, { children: children })) })));
16
46
  };
47
+ Checkbox.Group = CheckboxGroup;
17
48
 
18
49
  export { Checkbox as default };
package/es/Modal/Modal.js CHANGED
@@ -8,7 +8,8 @@ import { Button } from '../Button/Button.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];
11
+ var _e = useState(false), loading = _e[0], setLoading = _e[1];
12
+ var _f = useState(false), cancelLoading = _f[0], setCancelLoading = _f[1];
12
13
  var handleOk = function () { return __awaiter(void 0, void 0, void 0, function () {
13
14
  var result;
14
15
  return __generator(this, function (_a) {
@@ -20,7 +21,7 @@ var ModalContent = function (_a) {
20
21
  _a.trys.push([1, , 5, 6]);
21
22
  result = onOk();
22
23
  if (!(result instanceof Promise)) return [3 /*break*/, 3];
23
- setOkLoading(true);
24
+ setLoading(true);
24
25
  return [4 /*yield*/, result];
25
26
  case 2:
26
27
  _a.sent();
@@ -30,7 +31,34 @@ var ModalContent = function (_a) {
30
31
  _a.label = 4;
31
32
  case 4: return [3 /*break*/, 6];
32
33
  case 5:
33
- setOkLoading(false);
34
+ setLoading(false);
35
+ return [7 /*endfinally*/];
36
+ case 6: return [2 /*return*/];
37
+ }
38
+ });
39
+ }); };
40
+ var handleCancel = function () { return __awaiter(void 0, void 0, void 0, function () {
41
+ var result;
42
+ return __generator(this, function (_a) {
43
+ switch (_a.label) {
44
+ case 0:
45
+ if (!onCancel) return [3 /*break*/, 6];
46
+ _a.label = 1;
47
+ case 1:
48
+ _a.trys.push([1, , 5, 6]);
49
+ result = onCancel();
50
+ if (!(result instanceof Promise)) return [3 /*break*/, 3];
51
+ setCancelLoading(true);
52
+ return [4 /*yield*/, result];
53
+ case 2:
54
+ _a.sent();
55
+ return [3 /*break*/, 4];
56
+ case 3:
57
+ onCancel();
58
+ _a.label = 4;
59
+ case 4: return [3 /*break*/, 6];
60
+ case 5:
61
+ setCancelLoading(false);
34
62
  return [7 /*endfinally*/];
35
63
  case 6: return [2 /*return*/];
36
64
  }
@@ -39,7 +67,7 @@ var ModalContent = function (_a) {
39
67
  return (jsxs("div", __assign({ className: "foxit-modal-content-container", style: {
40
68
  maxWidth: width,
41
69
  width: width
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 })))] }))] })));
70
+ } }, { 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: handleCancel, loading: cancelLoading }, { children: onCancelText }))), onOkText && (jsx(Button, __assign({ primary: true, size: "medium", onClick: handleOk, loading: loading }, { children: onOkText })))] }))] })));
43
71
  };
44
72
  var Modal = function (_a) {
45
73
  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;
@@ -53,15 +81,29 @@ Modal.confirm = function (_a) {
53
81
  var root = createRoot(modalRoot);
54
82
  var handleClose = function () {
55
83
  root.unmount();
56
- document.body.removeChild(modalRoot);
84
+ if (document.body.contains(modalRoot)) {
85
+ document.body.removeChild(modalRoot);
86
+ }
57
87
  };
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 () {
59
- onCancel === null || onCancel === void 0 ? void 0 : onCancel();
60
- handleClose();
61
- }, onCancelText: onCancelText, onOk:
88
+ root.render(jsx(Modal$1, __assign({ opened: true, onClose: handleClose, maskClosable: maskClosable, position: "top" }, { children: jsx(ModalContent, __assign({ title: title, width: width, onCancel: onCancel instanceof Function && onCancel.constructor.name === 'AsyncFunction'
89
+ ? function () { return __awaiter(void 0, void 0, void 0, function () {
90
+ return __generator(this, function (_a) {
91
+ switch (_a.label) {
92
+ case 0: return [4 /*yield*/, onCancel()];
93
+ case 1:
94
+ _a.sent();
95
+ handleClose();
96
+ return [2 /*return*/];
97
+ }
98
+ });
99
+ }); }
100
+ : function () {
101
+ onCancel === null || onCancel === void 0 ? void 0 : onCancel();
102
+ handleClose();
103
+ }, onCancelText: onCancelText, onOk:
62
104
  // 判断传进来的onOk是否为async函数
63
- onOk instanceof Function && onOk.constructor.name === 'AsyncFunction' ?
64
- function () { return __awaiter(void 0, void 0, void 0, function () {
105
+ onOk instanceof Function && onOk.constructor.name === 'AsyncFunction'
106
+ ? function () { return __awaiter(void 0, void 0, void 0, function () {
65
107
  return __generator(this, function (_a) {
66
108
  switch (_a.label) {
67
109
  case 0: return [4 /*yield*/, onOk()];
@@ -71,8 +113,8 @@ Modal.confirm = function (_a) {
71
113
  return [2 /*return*/];
72
114
  }
73
115
  });
74
- }); } :
75
- function () {
116
+ }); }
117
+ : function () {
76
118
  onOk === null || onOk === void 0 ? void 0 : onOk();
77
119
  handleClose();
78
120
  }, onOkText: onOkText }, { children: content })) })));
@@ -23,6 +23,10 @@ var Portal = function (_a) {
23
23
  useEffect(function () {
24
24
  var _a, _b;
25
25
  (_b = (_a = document === null || document === void 0 ? void 0 : document.body) === null || _a === void 0 ? void 0 : _a.appendChild) === null || _b === void 0 ? void 0 : _b.call(_a, container);
26
+ return function () {
27
+ var _a, _b;
28
+ (_b = (_a = document === null || document === void 0 ? void 0 : document.body) === null || _a === void 0 ? void 0 : _a.removeChild) === null || _b === void 0 ? void 0 : _b.call(_a, container);
29
+ };
26
30
  }, [container]);
27
31
  return createPortal(children, container);
28
32
  };
@@ -5,6 +5,7 @@ interface PaginationProps {
5
5
  pageSize: number;
6
6
  onChange?: (page: number) => void;
7
7
  defaultCurrent?: number;
8
+ current?: number;
8
9
  }
9
10
  declare const Pagination: React.FC<PaginationProps>;
10
11
  export default Pagination;
@@ -4,11 +4,16 @@ import { useState, useEffect } from 'react';
4
4
 
5
5
  var $_MORE = 9999999999;
6
6
  var Pagination = function (_a) {
7
- var total = _a.total, pageSize = _a.pageSize, onChange = _a.onChange, _b = _a.defaultCurrent, defaultCurrent = _b === void 0 ? 1 : _b;
8
- var _c = useState(defaultCurrent), current = _c[0], setCurrent = _c[1];
7
+ var total = _a.total, pageSize = _a.pageSize, onChange = _a.onChange, _b = _a.defaultCurrent, defaultCurrent = _b === void 0 ? 1 : _b, currentProp = _a.current;
8
+ var _c = useState(currentProp !== undefined ? currentProp : defaultCurrent), current = _c[0], setCurrent = _c[1];
9
9
  var _d = useState([]), pages = _d[0], setPages = _d[1];
10
10
  var maxButtons = 5;
11
11
  var totalPages = Math.ceil(total / pageSize);
12
+ useEffect(function () {
13
+ if (currentProp !== undefined && currentProp !== current) {
14
+ setCurrent(currentProp);
15
+ }
16
+ }, [currentProp, current]);
12
17
  useEffect(function () {
13
18
  var generatePages = function () {
14
19
  var pageArray = [];
@@ -48,14 +53,16 @@ var Pagination = function (_a) {
48
53
  var handleClick = function (page, index) {
49
54
  if (page === $_MORE) {
50
55
  if (index > 0 && pages[index - 1] !== null && pages[index - 1] !== 1) {
51
- setCurrent(pages[index - 1] + 1);
52
- onChange === null || onChange === void 0 ? void 0 : onChange(pages[index - 1] + 1);
56
+ var newPage = pages[index - 1] + 1;
57
+ setCurrent(newPage);
58
+ onChange === null || onChange === void 0 ? void 0 : onChange(newPage);
53
59
  }
54
60
  else if (index < pages.length - 1 &&
55
61
  pages[index + 1] !== null &&
56
62
  pages[index + 1] !== totalPages) {
57
- setCurrent(pages[index + 1] - 1);
58
- onChange === null || onChange === void 0 ? void 0 : onChange(pages[index + 1] - 1);
63
+ var newPage = pages[index + 1] - 1;
64
+ setCurrent(newPage);
65
+ onChange === null || onChange === void 0 ? void 0 : onChange(newPage);
59
66
  }
60
67
  }
61
68
  else if (page !== current) {
@@ -65,14 +72,16 @@ var Pagination = function (_a) {
65
72
  };
66
73
  var handlePrev = function () {
67
74
  if (current > 1) {
68
- setCurrent(current - 1);
69
- onChange === null || onChange === void 0 ? void 0 : onChange(current - 1);
75
+ var newPage = current - 1;
76
+ setCurrent(newPage);
77
+ onChange === null || onChange === void 0 ? void 0 : onChange(newPage);
70
78
  }
71
79
  };
72
80
  var handleNext = function () {
73
81
  if (current < totalPages) {
74
- setCurrent(current + 1);
75
- onChange === null || onChange === void 0 ? void 0 : onChange(current + 1);
82
+ var newPage = current + 1;
83
+ setCurrent(newPage);
84
+ onChange === null || onChange === void 0 ? void 0 : onChange(newPage);
76
85
  }
77
86
  };
78
87
  return total > pageSize ? (jsxs("div", __assign({ className: "foxit-pagination-container" }, { children: [jsx("button", __assign({ className: "foxit-pagination-prev", onClick: handlePrev, disabled: current === 1 }, { children: '<' })), pages.map(function (page, index) { return (jsx("button", __assign({ className: "foxit-pagination-button", onClick: function () { return handleClick(page, index); }, disabled: page === current }, { children: page === $_MORE ? '...' : page }), index)); }), jsx("button", __assign({ className: "foxit-pagination-next", onClick: handleNext, disabled: current === totalPages }, { children: '>' }))] }))) : null;
@@ -12,8 +12,15 @@ export interface SelectProps {
12
12
  isMulti?: boolean;
13
13
  placeholder?: string;
14
14
  preIcon?: React.ReactNode;
15
- value?: string | number;
15
+ value?: string | number | CustomOption | null;
16
16
  onChange?: (v: unknown) => void;
17
17
  }
18
+ interface CustomOption {
19
+ readonly value: string | number;
20
+ readonly label: string;
21
+ readonly color?: string;
22
+ readonly isFixed?: boolean;
23
+ readonly isDisabled?: boolean;
24
+ }
18
25
  declare const Select: React.FC<SelectProps>;
19
26
  export default Select;
@@ -39,7 +39,18 @@ var Select = function (_a) {
39
39
  return Array.isArray(defaultValue) &&
40
40
  defaultValue.includes(option.value);
41
41
  })
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; }) })));
42
+ : options.find(function (option) { return option.value === defaultValue; }), isDisabled: isDisabled, isClearable: isClearable, isSearchable: isSearchable, isMulti: isMulti, components: { Control: CustomControl, Option: CustomOptionComp }, onChange: onChange }, rest, {
43
+ // value={
44
+ // isMulti
45
+ // ? options.filter(
46
+ // (option) =>
47
+ // Array.isArray(value) && (value as (string | number)[]).includes(option.value)
48
+ // )
49
+ // : options.find((option) => option.value === value) || value as CustomOption || null
50
+ // }
51
+ value: isMulti && Array.isArray(value)
52
+ ? value.map(function (v) { return options.find(function (option) { return option.value === v; }); })
53
+ : options.find(function (option) { return option.value === value; }) || value })));
43
54
  };
44
55
 
45
56
  export { Select as default };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './switch.css';
3
+ interface FoxitSwitchProps {
4
+ value?: boolean;
5
+ onChange?: (value: boolean) => void;
6
+ size?: 'small' | 'large';
7
+ }
8
+ declare const Switch: React.FC<FoxitSwitchProps>;
9
+ export { Switch };
@@ -0,0 +1,20 @@
1
+ import { __assign } from '../node_modules/tslib/tslib.es6.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { useState } from 'react';
4
+
5
+ var Switch = function (_a) {
6
+ var value = _a.value, onChange = _a.onChange, _b = _a.size, size = _b === void 0 ? 'large' : _b;
7
+ var _c = useState(value || false), internalValue = _c[0], setInternalValue = _c[1];
8
+ var isControlled = value !== undefined;
9
+ var handleToggle = function () {
10
+ if (onChange) {
11
+ onChange(!isControlled ? !internalValue : !value);
12
+ }
13
+ if (!isControlled) {
14
+ setInternalValue(!internalValue);
15
+ }
16
+ };
17
+ return (jsx("div", __assign({ className: "foxit-switch ".concat(size, " ").concat(isControlled ? (value ? 'checked' : '') : internalValue ? 'checked' : ''), onClick: handleToggle }, { children: jsx("div", { className: "foxit-switch-handle" }) })));
18
+ };
19
+
20
+ export { Switch };
@@ -10,6 +10,8 @@ export interface Column<T> {
10
10
  interface TableProps<T> {
11
11
  columns: Column<T>[];
12
12
  data: T[];
13
+ loading?: boolean;
14
+ emptyText?: React.ReactNode;
13
15
  }
14
- declare const Table: <T>({ columns, data }: TableProps<T>) => import("react/jsx-runtime").JSX.Element;
16
+ declare const Table: <T>({ columns, data, loading, emptyText }: TableProps<T>) => import("react/jsx-runtime").JSX.Element;
15
17
  export default Table;
package/es/Table/Table.js CHANGED
@@ -1,17 +1,19 @@
1
1
  import { __assign } from '../node_modules/tslib/tslib.es6.js';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import Empty from '../Empty/Empty.js';
4
+ import { Icon } from '../Icon/index.js';
3
5
 
4
6
  var Table = function (_a) {
5
- var columns = _a.columns, data = _a.data;
6
- return (jsx("div", __assign({ className: "foxit-table" }, { children: jsxs("table", __assign({ className: "foxit-table-container" }, { children: [jsx("thead", { children: jsx("tr", { children: columns.map(function (column, index) { return (jsx("th", __assign({ style: {
7
- width: column.width ? "".concat(column.width, "px") : 'auto',
8
- textAlign: column.align || 'left'
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
10
- ? column.render(record[column.dataIndex], record)
11
- : (typeof record[column.dataIndex] === 'object'
12
- ? JSON.stringify(record[column.dataIndex]) // 将对象转换为字符串
13
- : String(record[column.dataIndex])) // 确保它是一个字符串
14
- }), colIndex)); }) }), rowIndex)); }) })] })) })));
7
+ var columns = _a.columns, data = _a.data, loading = _a.loading, emptyText = _a.emptyText;
8
+ return !loading && data.length === 0 ? (jsx(Empty, { description: emptyText || 'No Data' })) : (jsxs("div", __assign({ className: "foxit-table" }, { children: [loading ? (jsx("div", __assign({ className: "foxit-table-loading" }, { children: jsx(Icon, { name: "LoadingOutlined", className: "foxit-table-icon-loading" }) }))) : null, jsxs("table", __assign({ className: "foxit-table-container" }, { children: [jsx("thead", { children: jsx("tr", { children: columns.map(function (column, index) { return (jsx("th", __assign({ style: {
9
+ width: column.width ? "".concat(column.width, "px") : 'auto',
10
+ textAlign: column.align || 'left'
11
+ } }, { 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
12
+ ? column.render(record[column.dataIndex], record)
13
+ : typeof record[column.dataIndex] === 'object'
14
+ ? JSON.stringify(record[column.dataIndex]) // 将对象转换为字符串
15
+ : String(record[column.dataIndex]) // 确保它是一个字符串
16
+ }), colIndex)); }) }), rowIndex)); }) })] }))] })));
15
17
  };
16
18
 
17
19
  export { Table as default };
package/es/Tag/Tag.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './tag.css';
3
3
  interface TagProps {
4
- color: 'active' | 'canceled' | 'pending' | 'offline' | 'trial' | 'expired';
4
+ color?: 'active' | 'canceled' | 'pending' | 'offline' | 'trial' | 'expired' | string;
5
5
  children: React.ReactNode;
6
6
  }
7
7
  declare const Tag: React.FC<TagProps>;
package/es/Tag/Tag.js CHANGED
@@ -2,7 +2,7 @@ import { __assign } from '../node_modules/tslib/tslib.es6.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
 
4
4
  var Tag = function (_a) {
5
- var color = _a.color, children = _a.children;
5
+ var _b = _a.color, color = _b === void 0 ? 'active' : _b, children = _a.children;
6
6
  var className = "foxit-tag foxit-tag-".concat(color);
7
7
  return jsx("span", __assign({ className: className }, { children: children }));
8
8
  };
@@ -19,6 +19,7 @@ export declare const ICONS: Readonly<{
19
19
  QuestionCircleOutlined: (className?: string) => import("react/jsx-runtime").JSX.Element;
20
20
  EditorOutlined: (className?: string) => import("react/jsx-runtime").JSX.Element;
21
21
  DateOutlined: (className?: string) => import("react/jsx-runtime").JSX.Element;
22
+ DownLoadOutlined: (className?: string) => import("react/jsx-runtime").JSX.Element;
22
23
  SuccessColoursOutlined: (className?: string) => import("react/jsx-runtime").JSX.Element;
23
24
  ErrorColoursOutlined: (className?: string) => import("react/jsx-runtime").JSX.Element;
24
25
  WarningColoursOutlined: (className?: string) => import("react/jsx-runtime").JSX.Element;
@@ -21,6 +21,7 @@ var ICONS = Object.freeze({
21
21
  QuestionCircleOutlined: function (className) { return (jsx("svg", __assign({ width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className }, { children: jsx("path", { d: "M6.99961 1.11328C5.85742 1.11328 4.74089 1.45198 3.79119 2.08654C2.8415 2.72111 2.1013 3.62304 1.66421 4.67828C1.22711 5.73353 1.11275 6.89469 1.33558 8.01493C1.55841 9.13517 2.10842 10.1642 2.91607 10.9718C3.72372 11.7795 4.75272 12.3295 5.87296 12.5523C6.99321 12.7751 8.15437 12.6608 9.20961 12.2237C10.2649 11.7866 11.1668 11.0464 11.8013 10.0967C12.4359 9.14701 12.7746 8.03047 12.7746 6.88828C12.7746 5.35666 12.1662 3.88776 11.0832 2.80474C10.0001 1.72172 8.53124 1.11328 6.99961 1.11328ZM7.36361 9.72328C7.24823 9.83218 7.09527 9.89236 6.93661 9.89128C6.85726 9.89282 6.77843 9.87809 6.70499 9.84799C6.63155 9.81789 6.56506 9.77307 6.50961 9.71628C6.45336 9.6619 6.40881 9.59659 6.37872 9.52436C6.34862 9.45214 6.33361 9.37452 6.33461 9.29628C6.33139 9.21775 6.34539 9.13946 6.37562 9.06691C6.40585 8.99436 6.45158 8.92929 6.50961 8.87628C6.56565 8.82076 6.63241 8.77722 6.70582 8.74834C6.77924 8.71946 6.85776 8.70583 6.93661 8.70828C7.01658 8.70528 7.09631 8.71863 7.17094 8.74752C7.24557 8.7764 7.31351 8.82022 7.37061 8.87628C7.42864 8.92929 7.47437 8.99436 7.5046 9.06691C7.53483 9.13946 7.54883 9.21775 7.54561 9.29628C7.5468 9.37725 7.53124 9.4576 7.49993 9.53228C7.46861 9.60697 7.4222 9.67437 7.36361 9.73028V9.72328ZM8.55361 6.50328C8.33257 6.73093 8.09886 6.94594 7.85361 7.14728C7.70967 7.26306 7.59264 7.40876 7.51061 7.57428C7.42001 7.7418 7.3742 7.92987 7.37761 8.12028V8.26028H6.50261V8.12028C6.4928 7.84907 6.55053 7.57966 6.67061 7.33628C6.91984 6.94271 7.23199 6.59272 7.59461 6.30028L7.73461 6.14628C7.8778 5.9777 7.95927 5.76537 7.96561 5.54428C7.96151 5.30371 7.86647 5.07362 7.69961 4.90028C7.60526 4.81469 7.49469 4.7489 7.37445 4.70681C7.25421 4.66473 7.12675 4.64721 6.99961 4.65528C6.84625 4.64246 6.69213 4.66844 6.55145 4.73083C6.41077 4.79322 6.28806 4.89001 6.19461 5.01228C6.0327 5.26142 5.95425 5.55561 5.97061 5.85228H5.13061C5.119 5.59615 5.15885 5.34028 5.24782 5.09982C5.3368 4.85935 5.47308 4.63917 5.64861 4.45228C5.8393 4.27146 6.06499 4.13159 6.31179 4.0413C6.55858 3.95101 6.82125 3.91221 7.08361 3.92728C7.5572 3.88677 8.02826 4.02959 8.39961 4.32628C8.56609 4.47339 8.69724 4.65617 8.78329 4.86099C8.86934 5.06581 8.90808 5.28741 8.89661 5.50928C8.89943 5.87224 8.77845 6.22533 8.55361 6.51028V6.50328Z", fill: "currentColor" }) }))); },
22
22
  EditorOutlined: function (className) { return (jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className }, { children: [jsx("path", { d: "M8.39447 12.9991C8.38198 13.0151 8.36948 13.0318 8.36392 13.0519L7.40054 16.5839C7.34427 16.7896 7.40193 17.0111 7.55406 17.1674C7.66798 17.2785 7.818 17.3396 7.97776 17.3396C8.03054 17.3396 8.08333 17.3334 8.13542 17.3195L11.6424 16.363C11.648 16.363 11.6508 16.3679 11.6549 16.3679C11.6952 16.3679 11.7348 16.3533 11.7647 16.3227L21.1424 6.94643C21.4209 6.66757 21.5737 6.28762 21.5737 5.87434C21.5737 5.40584 21.375 4.9377 21.027 4.59073L20.1414 3.70374C19.7942 3.35573 19.3253 3.15674 18.8571 3.15674C18.4439 3.15674 18.0639 3.30956 17.7847 3.58773L8.40836 12.9665C8.39867 12.9755 8.40143 12.9887 8.39447 12.9991ZM20.2248 6.02819L19.2933 6.95898L17.7833 5.42495L18.7016 4.50669C18.8467 4.36084 19.128 4.38204 19.2947 4.5494L20.181 5.43642C20.2734 5.5288 20.3262 5.65172 20.3262 5.77327C20.3255 5.87297 20.29 5.96327 20.2248 6.02819ZM10.0622 13.1464L16.8289 6.37931L18.3397 7.91437L11.5855 14.6682L10.0622 13.1464ZM8.8293 15.89L9.31828 14.0952L10.6227 15.3997L8.8293 15.89Z", fill: "currentColor" }), jsx("path", { d: "M20.8187 9.74373C20.4638 9.74373 20.1727 10.0323 20.1714 10.3921V19.1339C20.1714 19.5923 19.7991 19.9646 19.3399 19.9646H4.55207C4.09364 19.9646 3.71993 19.5924 3.71993 19.1339V4.86561C3.71993 4.4068 4.09364 4.03416 4.55207 4.03416H14.0763C14.4333 4.03416 14.723 3.7442 14.723 3.38713C14.723 3.03083 14.4333 2.74048 14.0763 2.74048H4.45345C3.33585 2.74048 2.42627 3.64937 2.42627 4.76766V19.2326C2.42627 20.3509 3.33585 21.2594 4.45345 21.2594H19.4378C20.5562 21.2594 21.4654 20.3509 21.4654 19.2326V10.388C21.4639 10.0323 21.1737 9.74373 20.8187 9.74373Z", fill: "currentColor" })] }))); },
23
23
  DateOutlined: function (className) { return (jsx("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className }, { children: jsx("path", { d: "M9 6H15V5H17V6H20V19H4V6H7V5H9V6ZM18 8H6V17H18V8ZM10 10V12H8V10H10ZM13 10V12H11V10H13ZM16 10V12H14V10H16ZM10 13V15H8V13H10ZM13 13V15H11V13H13ZM16 13V15H14V13H16Z", fill: "currentColor" }) }))); },
24
+ DownLoadOutlined: function (className) { return (jsx("svg", __assign({ width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className }, { children: jsx("path", { d: "M11.9969 5.21521H9.14154V0.932129H4.85844V5.21521H2.00307L6.99999 10.2121L11.9969 5.21521ZM2.00307 11.6398V13.0675H11.9969V11.6398H2.00307Z", fill: "currentColor" }) }))); },
24
25
  // ColoursOutlined 带颜色的图标
25
26
  SuccessColoursOutlined: function (className) { return (jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className }, { children: [jsx("rect", { width: "24", height: "24", rx: "12", fill: "#30DC6B" }), jsx("path", { d: "M7.33337 12.6665L10 15.3332L16.6667 8.6665", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] }))); },
26
27
  ErrorColoursOutlined: function (className) { return (jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className }, { children: [jsx("rect", { width: "24", height: "24", rx: "12", fill: "#FF3C3C" }), jsx("path", { d: "M15.9854 7.75732L7.50007 16.2426", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }), jsx("path", { d: "M7.5 7.75732L15.9853 16.2426", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })] }))); },
package/es/index.css CHANGED
@@ -1 +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}
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;min-height:200px;overflow:hidden;position:relative}.foxit-table-loading{align-items:center;background-color:#ffffffb3;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.foxit-table-icon-loading{animation:spin 1s linear infinite;color:#ff5f00}.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;margin-right:8px}.foxit-button-primary .foxit-button-loading{color:#fff}.foxit-button-secondary .foxit-button-loading{color:#ff5f00}@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}.foxit-switch{background-color:#ccc;border-radius:100px;cursor:pointer;display:inline-block;height:22px;line-height:22px;position:relative;transition:background-color .3s;width:40px}.foxit-switch.small{height:14px;line-height:14px;width:24px}.foxit-switch.checked{background-color:#ff5f00}.foxit-switch-handle{background-color:#fff;border-radius:50%;height:18px;position:absolute;top:2px;transform:translateX(1px);transition:transform .3s;width:18px}.foxit-switch.small .foxit-switch-handle{height:12px;top:1px;width:12px}.foxit-switch.checked .foxit-switch-handle{transform:translateX(20px)}.foxit-switch.small.checked .foxit-switch-handle{transform:translateX(11px)}
package/es/index.d.ts CHANGED
@@ -30,3 +30,4 @@ export { Tabs };
30
30
  export { Tag };
31
31
  export { Toast };
32
32
  export { Tooltip };
33
+ export { Switch } from './Switch/Switch';
package/es/index.js CHANGED
@@ -14,4 +14,5 @@ export { Button } from './Button/Button.js';
14
14
  export { Icon } from './Icon/index.js';
15
15
  export { Menu, getItem } from './Menu/Menu.js';
16
16
  export { Modal } from './Modal/Modal.js';
17
+ export { Switch } from './Switch/Switch.js';
17
18
  export { default as FormItem } from './Form/FormItem.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxit-component",
3
- "version": "0.0.1-alpha.6",
3
+ "version": "0.0.1-alpha.8",
4
4
  "author": {
5
5
  "name": "linye",
6
6
  "email": "869675630@qq.com"