iglooform 3.0.12 → 3.0.13
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/confirmation/index.d.ts +2 -0
- package/es/confirmation/index.js +8 -2
- package/es/confirmation/style/index.d.ts +1 -0
- package/es/confirmation/style/index.js +1 -0
- package/es/confirmation/style/index.less +4 -0
- package/es/layout/defaultFooter.js +2 -2
- package/es/utils/tools.d.ts +1 -1
- package/lib/confirmation/index.d.ts +2 -0
- package/lib/confirmation/index.js +8 -2
- package/lib/confirmation/style/index.d.ts +1 -0
- package/lib/confirmation/style/index.js +3 -1
- package/lib/confirmation/style/index.less +4 -0
- package/lib/layout/defaultFooter.js +2 -2
- package/lib/utils/tools.d.ts +1 -1
- package/package.json +1 -1
- package/yarn-error.log +16168 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { FC } from '../types';
|
|
3
|
+
import './style';
|
|
3
4
|
export interface ConfirmationProps {
|
|
4
5
|
onChange?: Function;
|
|
5
6
|
value?: boolean;
|
|
@@ -9,6 +10,7 @@ export interface ConfirmationProps {
|
|
|
9
10
|
okText?: ReactNode;
|
|
10
11
|
cancelText?: ReactNode;
|
|
11
12
|
href?: string;
|
|
13
|
+
disabled?: boolean;
|
|
12
14
|
}
|
|
13
15
|
declare const Confirmation: FC<ConfirmationProps>;
|
|
14
16
|
export default Confirmation;
|
package/es/confirmation/index.js
CHANGED
|
@@ -5,11 +5,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
5
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { useState, useContext } from 'react';
|
|
8
|
+
import cls from 'classnames';
|
|
8
9
|
import Modal from "../modal";
|
|
9
10
|
import Typography from "../typography";
|
|
10
11
|
import Checkbox from "../checkbox";
|
|
11
12
|
import Button from "../button";
|
|
12
13
|
import LocaleContext from "../locale/locale-context";
|
|
14
|
+
import "./style";
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -21,7 +23,8 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
21
23
|
modalTitle = _ref.modalTitle,
|
|
22
24
|
okText = _ref.okText,
|
|
23
25
|
cancelText = _ref.cancelText,
|
|
24
|
-
href = _ref.href
|
|
26
|
+
href = _ref.href,
|
|
27
|
+
disabled = _ref.disabled;
|
|
25
28
|
var _useState = useState(false),
|
|
26
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
30
|
visible = _useState2[0],
|
|
@@ -50,10 +53,12 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
50
53
|
return /*#__PURE__*/_jsxs("div", {
|
|
51
54
|
children: [/*#__PURE__*/_jsx(Checkbox, {
|
|
52
55
|
onChange: handleCheckbox,
|
|
53
|
-
checked: value
|
|
56
|
+
checked: value,
|
|
57
|
+
disabled: disabled
|
|
54
58
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
55
59
|
level: "body1",
|
|
56
60
|
onClick: function onClick(e) {
|
|
61
|
+
if (disabled) return;
|
|
57
62
|
e.stopPropagation();
|
|
58
63
|
if (modalContent) {
|
|
59
64
|
return setVisible(true);
|
|
@@ -71,6 +76,7 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
71
76
|
cursor: 'pointer',
|
|
72
77
|
marginLeft: 8
|
|
73
78
|
},
|
|
79
|
+
className: cls(disabled && 'disabled'),
|
|
74
80
|
children: message || /*#__PURE__*/_jsxs(_Fragment, {
|
|
75
81
|
children: [formatMessage({
|
|
76
82
|
id: 'I agree to the Igloo'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.less";
|
|
@@ -32,7 +32,7 @@ var DefaultFooter = function DefaultFooter(props) {
|
|
|
32
32
|
className: "footer-bottom",
|
|
33
33
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
34
34
|
level: "body3",
|
|
35
|
-
children: "\xA9 ".concat(new Date().getFullYear(), " Powered by
|
|
35
|
+
children: "\xA9 ".concat(new Date().getFullYear(), " Powered by Igloo. All Rights Reserved.")
|
|
36
36
|
}), /*#__PURE__*/_jsxs(Typography, {
|
|
37
37
|
level: "body3",
|
|
38
38
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
@@ -73,7 +73,7 @@ var DefaultFooter = function DefaultFooter(props) {
|
|
|
73
73
|
children: [/*#__PURE__*/_jsx("div", {
|
|
74
74
|
children: /*#__PURE__*/_jsxs(Typography, {
|
|
75
75
|
level: "body3",
|
|
76
|
-
children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by
|
|
76
|
+
children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by Igloo. All Rights Reserved."), /*#__PURE__*/_jsx("div", {
|
|
77
77
|
children: "All Rights Reserved."
|
|
78
78
|
})]
|
|
79
79
|
})
|
package/es/utils/tools.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const parseFileSize: (size: number) => string;
|
|
2
|
-
export declare function classifyType(type: string): "
|
|
2
|
+
export declare function classifyType(type: string): "image" | "video" | "pdf" | "unknown";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { FC } from '../types';
|
|
3
|
+
import './style';
|
|
3
4
|
export interface ConfirmationProps {
|
|
4
5
|
onChange?: Function;
|
|
5
6
|
value?: boolean;
|
|
@@ -9,6 +10,7 @@ export interface ConfirmationProps {
|
|
|
9
10
|
okText?: ReactNode;
|
|
10
11
|
cancelText?: ReactNode;
|
|
11
12
|
href?: string;
|
|
13
|
+
disabled?: boolean;
|
|
12
14
|
}
|
|
13
15
|
declare const Confirmation: FC<ConfirmationProps>;
|
|
14
16
|
export default Confirmation;
|
|
@@ -5,11 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
9
|
var _modal = _interopRequireDefault(require("../modal"));
|
|
9
10
|
var _typography = _interopRequireDefault(require("../typography"));
|
|
10
11
|
var _checkbox = _interopRequireDefault(require("../checkbox"));
|
|
11
12
|
var _button = _interopRequireDefault(require("../button"));
|
|
12
13
|
var _localeContext = _interopRequireDefault(require("../locale/locale-context"));
|
|
14
|
+
require("./style");
|
|
13
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -26,7 +28,8 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
26
28
|
modalTitle = _ref.modalTitle,
|
|
27
29
|
okText = _ref.okText,
|
|
28
30
|
cancelText = _ref.cancelText,
|
|
29
|
-
href = _ref.href
|
|
31
|
+
href = _ref.href,
|
|
32
|
+
disabled = _ref.disabled;
|
|
30
33
|
var _useState = (0, _react.useState)(false),
|
|
31
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
35
|
visible = _useState2[0],
|
|
@@ -55,10 +58,12 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
55
58
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
56
59
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_checkbox.default, {
|
|
57
60
|
onChange: handleCheckbox,
|
|
58
|
-
checked: value
|
|
61
|
+
checked: value,
|
|
62
|
+
disabled: disabled
|
|
59
63
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.default, {
|
|
60
64
|
level: "body1",
|
|
61
65
|
onClick: function onClick(e) {
|
|
66
|
+
if (disabled) return;
|
|
62
67
|
e.stopPropagation();
|
|
63
68
|
if (modalContent) {
|
|
64
69
|
return setVisible(true);
|
|
@@ -76,6 +81,7 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
76
81
|
cursor: 'pointer',
|
|
77
82
|
marginLeft: 8
|
|
78
83
|
},
|
|
84
|
+
className: (0, _classnames.default)(disabled && 'disabled'),
|
|
79
85
|
children: message || /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
80
86
|
children: [formatMessage({
|
|
81
87
|
id: 'I agree to the Igloo'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -37,7 +37,7 @@ var DefaultFooter = function DefaultFooter(props) {
|
|
|
37
37
|
className: "footer-bottom",
|
|
38
38
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.default, {
|
|
39
39
|
level: "body3",
|
|
40
|
-
children: "\xA9 ".concat(new Date().getFullYear(), " Powered by
|
|
40
|
+
children: "\xA9 ".concat(new Date().getFullYear(), " Powered by Igloo. All Rights Reserved.")
|
|
41
41
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_typography.default, {
|
|
42
42
|
level: "body3",
|
|
43
43
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
|
@@ -78,7 +78,7 @@ var DefaultFooter = function DefaultFooter(props) {
|
|
|
78
78
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
79
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_typography.default, {
|
|
80
80
|
level: "body3",
|
|
81
|
-
children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by
|
|
81
|
+
children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by Igloo. All Rights Reserved."), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
82
82
|
children: "All Rights Reserved."
|
|
83
83
|
})]
|
|
84
84
|
})
|
package/lib/utils/tools.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const parseFileSize: (size: number) => string;
|
|
2
|
-
export declare function classifyType(type: string): "
|
|
2
|
+
export declare function classifyType(type: string): "image" | "video" | "pdf" | "unknown";
|