@salutejs/plasma-new-hope 0.195.0-canary.1534.11911237435.0 → 0.195.0-canary.1571.11912191235.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -333
- package/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/cjs/index.css +0 -14
- package/cjs/index.js +0 -6
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/_Icon/index.js +1 -8
- package/emotion/cjs/index.js +0 -11
- package/emotion/es/components/_Icon/index.js +1 -2
- package/emotion/es/index.js +1 -2
- package/es/_virtual/_rollupPluginBabelHelpers.js +1 -332
- package/es/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/es/index.css +0 -14
- package/es/index.js +0 -2
- package/es/index.js.map +1 -1
- package/package.json +4 -4
- package/styled-components/cjs/components/_Icon/index.js +1 -8
- package/styled-components/cjs/index.js +0 -11
- package/styled-components/es/components/_Icon/index.js +1 -2
- package/styled-components/es/index.js +1 -2
- package/types/components/_Icon/index.d.ts +0 -1
- package/types/components/_Icon/index.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/cjs/components/Dropzone/Dropzone.css +0 -15
- package/cjs/components/Dropzone/Dropzone.js +0 -252
- package/cjs/components/Dropzone/Dropzone.js.map +0 -1
- package/cjs/components/Dropzone/Dropzone.styles.js +0 -47
- package/cjs/components/Dropzone/Dropzone.styles.js.map +0 -1
- package/cjs/components/Dropzone/Dropzone.styles_1fo7dbq.css +0 -7
- package/cjs/components/Dropzone/Dropzone.tokens.js +0 -47
- package/cjs/components/Dropzone/Dropzone.tokens.js.map +0 -1
- package/cjs/components/Dropzone/variations/_disabled/base.js +0 -9
- package/cjs/components/Dropzone/variations/_disabled/base.js.map +0 -1
- package/cjs/components/Dropzone/variations/_disabled/base_3qwygi.css +0 -1
- package/cjs/components/Dropzone/variations/_size/base.js +0 -9
- package/cjs/components/Dropzone/variations/_size/base.js.map +0 -1
- package/cjs/components/Dropzone/variations/_size/base_1bt22g1.css +0 -1
- package/cjs/components/Dropzone/variations/_view/base.js +0 -9
- package/cjs/components/Dropzone/variations/_view/base.js.map +0 -1
- package/cjs/components/Dropzone/variations/_view/base_1pdzq6t.css +0 -1
- package/cjs/components/_Icon/Icon.assets/ArrowBarDown.js +0 -24
- package/cjs/components/_Icon/Icon.assets/ArrowBarDown.js.map +0 -1
- package/cjs/components/_Icon/Icons/IconArrowBarDown.js +0 -23
- package/cjs/components/_Icon/Icons/IconArrowBarDown.js.map +0 -1
- package/emotion/cjs/components/Dropzone/Dropzone.js +0 -271
- package/emotion/cjs/components/Dropzone/Dropzone.styles.js +0 -67
- package/emotion/cjs/components/Dropzone/Dropzone.template-docs.mdx +0 -136
- package/emotion/cjs/components/Dropzone/Dropzone.tokens.js +0 -44
- package/emotion/cjs/components/Dropzone/Dropzone.types.js +0 -5
- package/emotion/cjs/components/Dropzone/index.js +0 -31
- package/emotion/cjs/components/Dropzone/variations/_disabled/base.js +0 -9
- package/emotion/cjs/components/Dropzone/variations/_disabled/tokens.json +0 -4
- package/emotion/cjs/components/Dropzone/variations/_size/base.js +0 -10
- package/emotion/cjs/components/Dropzone/variations/_size/tokens.json +0 -19
- package/emotion/cjs/components/Dropzone/variations/_view/base.js +0 -10
- package/emotion/cjs/components/Dropzone/variations/_view/tokens.json +0 -9
- package/emotion/cjs/components/_Icon/Icon.assets/ArrowBarDown.js +0 -23
- package/emotion/cjs/components/_Icon/Icons/IconArrowBarDown.js +0 -22
- package/emotion/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.config.js +0 -25
- package/emotion/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.js +0 -11
- package/emotion/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.stories.tsx +0 -57
- package/emotion/cjs/examples/plasma_web/components/Dropzone/Dropzone.config.js +0 -25
- package/emotion/cjs/examples/plasma_web/components/Dropzone/Dropzone.js +0 -11
- package/emotion/cjs/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +0 -57
- package/emotion/es/components/Dropzone/Dropzone.js +0 -263
- package/emotion/es/components/Dropzone/Dropzone.styles.js +0 -60
- package/emotion/es/components/Dropzone/Dropzone.template-docs.mdx +0 -136
- package/emotion/es/components/Dropzone/Dropzone.tokens.js +0 -38
- package/emotion/es/components/Dropzone/Dropzone.types.js +0 -1
- package/emotion/es/components/Dropzone/index.js +0 -2
- package/emotion/es/components/Dropzone/variations/_disabled/base.js +0 -3
- package/emotion/es/components/Dropzone/variations/_disabled/tokens.json +0 -4
- package/emotion/es/components/Dropzone/variations/_size/base.js +0 -4
- package/emotion/es/components/Dropzone/variations/_size/tokens.json +0 -19
- package/emotion/es/components/Dropzone/variations/_view/base.js +0 -4
- package/emotion/es/components/Dropzone/variations/_view/tokens.json +0 -9
- package/emotion/es/components/_Icon/Icon.assets/ArrowBarDown.js +0 -16
- package/emotion/es/components/_Icon/Icons/IconArrowBarDown.js +0 -15
- package/emotion/es/examples/plasma_b2c/components/Dropzone/Dropzone.config.js +0 -19
- package/emotion/es/examples/plasma_b2c/components/Dropzone/Dropzone.js +0 -5
- package/emotion/es/examples/plasma_b2c/components/Dropzone/Dropzone.stories.tsx +0 -57
- package/emotion/es/examples/plasma_web/components/Dropzone/Dropzone.config.js +0 -19
- package/emotion/es/examples/plasma_web/components/Dropzone/Dropzone.js +0 -5
- package/emotion/es/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +0 -57
- package/es/components/Dropzone/Dropzone.css +0 -15
- package/es/components/Dropzone/Dropzone.js +0 -247
- package/es/components/Dropzone/Dropzone.js.map +0 -1
- package/es/components/Dropzone/Dropzone.styles.js +0 -37
- package/es/components/Dropzone/Dropzone.styles.js.map +0 -1
- package/es/components/Dropzone/Dropzone.styles_1fo7dbq.css +0 -7
- package/es/components/Dropzone/Dropzone.tokens.js +0 -41
- package/es/components/Dropzone/Dropzone.tokens.js.map +0 -1
- package/es/components/Dropzone/variations/_disabled/base.js +0 -5
- package/es/components/Dropzone/variations/_disabled/base.js.map +0 -1
- package/es/components/Dropzone/variations/_disabled/base_3qwygi.css +0 -1
- package/es/components/Dropzone/variations/_size/base.js +0 -5
- package/es/components/Dropzone/variations/_size/base.js.map +0 -1
- package/es/components/Dropzone/variations/_size/base_1bt22g1.css +0 -1
- package/es/components/Dropzone/variations/_view/base.js +0 -5
- package/es/components/Dropzone/variations/_view/base.js.map +0 -1
- package/es/components/Dropzone/variations/_view/base_1pdzq6t.css +0 -1
- package/es/components/_Icon/Icon.assets/ArrowBarDown.js +0 -20
- package/es/components/_Icon/Icon.assets/ArrowBarDown.js.map +0 -1
- package/es/components/_Icon/Icons/IconArrowBarDown.js +0 -19
- package/es/components/_Icon/Icons/IconArrowBarDown.js.map +0 -1
- package/styled-components/cjs/components/Dropzone/Dropzone.js +0 -271
- package/styled-components/cjs/components/Dropzone/Dropzone.styles.js +0 -29
- package/styled-components/cjs/components/Dropzone/Dropzone.template-docs.mdx +0 -136
- package/styled-components/cjs/components/Dropzone/Dropzone.tokens.js +0 -44
- package/styled-components/cjs/components/Dropzone/Dropzone.types.js +0 -5
- package/styled-components/cjs/components/Dropzone/index.js +0 -31
- package/styled-components/cjs/components/Dropzone/variations/_disabled/base.js +0 -9
- package/styled-components/cjs/components/Dropzone/variations/_disabled/tokens.json +0 -4
- package/styled-components/cjs/components/Dropzone/variations/_size/base.js +0 -10
- package/styled-components/cjs/components/Dropzone/variations/_size/tokens.json +0 -19
- package/styled-components/cjs/components/Dropzone/variations/_view/base.js +0 -10
- package/styled-components/cjs/components/Dropzone/variations/_view/tokens.json +0 -9
- package/styled-components/cjs/components/_Icon/Icon.assets/ArrowBarDown.js +0 -23
- package/styled-components/cjs/components/_Icon/Icons/IconArrowBarDown.js +0 -22
- package/styled-components/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.config.js +0 -25
- package/styled-components/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.js +0 -11
- package/styled-components/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.stories.tsx +0 -57
- package/styled-components/cjs/examples/plasma_web/components/Dropzone/Dropzone.config.js +0 -25
- package/styled-components/cjs/examples/plasma_web/components/Dropzone/Dropzone.js +0 -11
- package/styled-components/cjs/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +0 -57
- package/styled-components/es/components/Dropzone/Dropzone.js +0 -263
- package/styled-components/es/components/Dropzone/Dropzone.styles.js +0 -21
- package/styled-components/es/components/Dropzone/Dropzone.template-docs.mdx +0 -136
- package/styled-components/es/components/Dropzone/Dropzone.tokens.js +0 -38
- package/styled-components/es/components/Dropzone/Dropzone.types.js +0 -1
- package/styled-components/es/components/Dropzone/index.js +0 -2
- package/styled-components/es/components/Dropzone/variations/_disabled/base.js +0 -3
- package/styled-components/es/components/Dropzone/variations/_disabled/tokens.json +0 -4
- package/styled-components/es/components/Dropzone/variations/_size/base.js +0 -4
- package/styled-components/es/components/Dropzone/variations/_size/tokens.json +0 -19
- package/styled-components/es/components/Dropzone/variations/_view/base.js +0 -4
- package/styled-components/es/components/Dropzone/variations/_view/tokens.json +0 -9
- package/styled-components/es/components/_Icon/Icon.assets/ArrowBarDown.js +0 -16
- package/styled-components/es/components/_Icon/Icons/IconArrowBarDown.js +0 -15
- package/styled-components/es/examples/plasma_b2c/components/Dropzone/Dropzone.config.js +0 -19
- package/styled-components/es/examples/plasma_b2c/components/Dropzone/Dropzone.js +0 -5
- package/styled-components/es/examples/plasma_b2c/components/Dropzone/Dropzone.stories.tsx +0 -57
- package/styled-components/es/examples/plasma_web/components/Dropzone/Dropzone.config.js +0 -19
- package/styled-components/es/examples/plasma_web/components/Dropzone/Dropzone.js +0 -5
- package/styled-components/es/examples/plasma_web/components/Dropzone/Dropzone.stories.tsx +0 -57
- package/types/components/Dropzone/Dropzone.d.ts +0 -59
- package/types/components/Dropzone/Dropzone.d.ts.map +0 -1
- package/types/components/Dropzone/Dropzone.styles.d.ts +0 -9
- package/types/components/Dropzone/Dropzone.styles.d.ts.map +0 -1
- package/types/components/Dropzone/Dropzone.tokens.d.ts +0 -39
- package/types/components/Dropzone/Dropzone.tokens.d.ts.map +0 -1
- package/types/components/Dropzone/Dropzone.types.d.ts +0 -77
- package/types/components/Dropzone/Dropzone.types.d.ts.map +0 -1
- package/types/components/Dropzone/index.d.ts +0 -3
- package/types/components/Dropzone/index.d.ts.map +0 -1
- package/types/components/Dropzone/variations/_disabled/base.d.ts +0 -2
- package/types/components/Dropzone/variations/_disabled/base.d.ts.map +0 -1
- package/types/components/Dropzone/variations/_size/base.d.ts +0 -2
- package/types/components/Dropzone/variations/_size/base.d.ts.map +0 -1
- package/types/components/Dropzone/variations/_view/base.d.ts +0 -2
- package/types/components/Dropzone/variations/_view/base.d.ts.map +0 -1
- package/types/components/_Icon/Icon.assets/ArrowBarDown.d.ts +0 -4
- package/types/components/_Icon/Icon.assets/ArrowBarDown.d.ts.map +0 -1
- package/types/components/_Icon/Icons/IconArrowBarDown.d.ts +0 -4
- package/types/components/_Icon/Icons/IconArrowBarDown.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Dropzone/Dropzone.config.d.ts +0 -18
- package/types/examples/plasma_b2c/components/Dropzone/Dropzone.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Dropzone/Dropzone.d.ts +0 -29
- package/types/examples/plasma_b2c/components/Dropzone/Dropzone.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Dropzone/Dropzone.config.d.ts +0 -18
- package/types/examples/plasma_web/components/Dropzone/Dropzone.config.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Dropzone/Dropzone.d.ts +0 -29
- package/types/examples/plasma_web/components/Dropzone/Dropzone.d.ts.map +0 -1
@@ -1,10 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.base = void 0;
|
7
|
-
var _react = /*#__PURE__*/require("@emotion/react");
|
8
|
-
var _Dropzone = /*#__PURE__*/require("../../Dropzone.tokens");
|
9
|
-
var _Dropzone2 = /*#__PURE__*/require("../../Dropzone.styles");
|
10
|
-
var base = exports.base = /*#__PURE__*/(0, _react.css)("background:var(", _Dropzone.tokens.background, ");border:var(", _Dropzone.tokens.border, ");&:not(.", _Dropzone.classes.active, "):hover,&:not(.", _Dropzone.classes.active, "):focus-within{background:var(", _Dropzone.tokens.backgroundHover, ");border-color:var(", _Dropzone.tokens.borderColorHover, ");outline:none;}&.", _Dropzone.classes.active, "{border-color:var(", _Dropzone.tokens.borderColorActive, ");", _Dropzone2.DropzoneHandlerOverlay, "{background:var(", _Dropzone.tokens.overlayColorActive, ");}}", _Dropzone2.TitleWrapper, "{color:var(", _Dropzone.tokens.titleColor, ");}", _Dropzone2.Description, "{color:var(", _Dropzone.tokens.descriptionColor, ");};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvRHJvcHpvbmUvdmFyaWF0aW9ucy9fdmlldy9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUt1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0Ryb3B6b25lL3ZhcmlhdGlvbnMvX3ZpZXcvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgY2xhc3NlcywgdG9rZW5zIH0gZnJvbSAnLi4vLi4vRHJvcHpvbmUudG9rZW5zJztcbmltcG9ydCB7IERlc2NyaXB0aW9uLCBEcm9wem9uZUhhbmRsZXJPdmVybGF5LCBUaXRsZVdyYXBwZXIgfSBmcm9tICcuLi8uLi9Ecm9wem9uZS5zdHlsZXMnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICBiYWNrZ3JvdW5kOiB2YXIoJHt0b2tlbnMuYmFja2dyb3VuZH0pO1xuICAgIGJvcmRlcjogdmFyKCR7dG9rZW5zLmJvcmRlcn0pO1xuXG4gICAgJjpub3QoLiR7Y2xhc3Nlcy5hY3RpdmV9KTpob3ZlcixcbiAgICAmOm5vdCguJHtjbGFzc2VzLmFjdGl2ZX0pOmZvY3VzLXdpdGhpbiB7XG4gICAgICAgIGJhY2tncm91bmQ6IHZhcigke3Rva2Vucy5iYWNrZ3JvdW5kSG92ZXJ9KTtcbiAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoJHt0b2tlbnMuYm9yZGVyQ29sb3JIb3Zlcn0pO1xuICAgICAgICBvdXRsaW5lOiBub25lO1xuICAgIH1cblxuICAgICYuJHtjbGFzc2VzLmFjdGl2ZX0ge1xuICAgICAgICBib3JkZXItY29sb3I6IHZhcigke3Rva2Vucy5ib3JkZXJDb2xvckFjdGl2ZX0pO1xuXG4gICAgICAgICR7RHJvcHpvbmVIYW5kbGVyT3ZlcmxheX0ge1xuICAgICAgICAgICAgYmFja2dyb3VuZDogdmFyKCR7dG9rZW5zLm92ZXJsYXlDb2xvckFjdGl2ZX0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgJHtUaXRsZVdyYXBwZXJ9IHtcbiAgICAgICAgY29sb3I6IHZhcigke3Rva2Vucy50aXRsZUNvbG9yfSk7XG4gICAgfVxuXG4gICAgJHtEZXNjcmlwdGlvbn0ge1xuICAgICAgICBjb2xvcjogdmFyKCR7dG9rZW5zLmRlc2NyaXB0aW9uQ29sb3J9KTtcbiAgICB9XG5gO1xuIl19 */"));
|
@@ -1,9 +0,0 @@
|
|
1
|
-
[
|
2
|
-
"--plasma-dropzone-background",
|
3
|
-
"--plasma-dropzone-overlay-color-active",
|
4
|
-
"--plasma-dropzone-border-color",
|
5
|
-
"--plasma-dropzone-border-color-hover",
|
6
|
-
"--plasma-dropzone-border-color-active",
|
7
|
-
"--plasma-dropzone-title-color",
|
8
|
-
"--plasma-dropzone-description-color"
|
9
|
-
]
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.ArrowBarDown = void 0;
|
7
|
-
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
8
|
-
var _path;
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
10
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
11
|
-
var ArrowBarDown = exports.ArrowBarDown = function ArrowBarDown(props) {
|
12
|
-
return /*#__PURE__*/_react["default"].createElement("svg", _extends({
|
13
|
-
width: "100%",
|
14
|
-
viewBox: "0 0 16 16",
|
15
|
-
fill: "none",
|
16
|
-
xmlns: "http://www.w3.org/2000/svg"
|
17
|
-
}, props), _path || (_path = /*#__PURE__*/_react["default"].createElement("path", {
|
18
|
-
fillRule: "evenodd",
|
19
|
-
clipRule: "evenodd",
|
20
|
-
d: "M7.95833 1.875C8.23448 1.875 8.45833 2.09886 8.45833 2.375V10.4043L11.2686 7.54868C11.4623 7.35186 11.7789 7.34933 11.9757 7.54302C12.1725 7.73672 12.1751 8.05329 11.9814 8.25011L8.3147 11.9759C8.21782 12.0744 8.08453 12.1283 7.94645 12.1251C7.80837 12.1218 7.67779 12.0615 7.5857 11.9586L4.25237 8.23278C4.06824 8.02698 4.08582 7.71088 4.29162 7.52676C4.49742 7.34264 4.81351 7.36021 4.99763 7.56601L7.45833 10.3164V2.375C7.45833 2.09886 7.68219 1.875 7.95833 1.875ZM2.5 14.0001C2.5 13.724 2.72386 13.5001 3 13.5001H13C13.2761 13.5001 13.5 13.724 13.5 14.0001C13.5 14.2763 13.2761 14.5001 13 14.5001H3C2.72386 14.5001 2.5 14.2763 2.5 14.0001Z",
|
21
|
-
fill: "currentColor"
|
22
|
-
})));
|
23
|
-
};
|
@@ -1,22 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.IconArrowBarDown = void 0;
|
7
|
-
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
8
|
-
var _ArrowBarDown = /*#__PURE__*/require("../Icon.assets/ArrowBarDown");
|
9
|
-
var _IconRoot = /*#__PURE__*/require("../IconRoot");
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
|
-
var IconArrowBarDown = exports.IconArrowBarDown = function IconArrowBarDown(_ref) {
|
12
|
-
var _ref$size = _ref.size,
|
13
|
-
size = _ref$size === void 0 ? 'xs' : _ref$size,
|
14
|
-
color = _ref.color,
|
15
|
-
className = _ref.className;
|
16
|
-
return /*#__PURE__*/_react["default"].createElement(_IconRoot.IconRoot, {
|
17
|
-
className: className,
|
18
|
-
size: size,
|
19
|
-
color: color,
|
20
|
-
icon: _ArrowBarDown.ArrowBarDown
|
21
|
-
});
|
22
|
-
};
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.config = void 0;
|
7
|
-
var _react = /*#__PURE__*/require("@emotion/react");
|
8
|
-
var _Dropzone = /*#__PURE__*/require("../../../../components/Dropzone");
|
9
|
-
var config = exports.config = {
|
10
|
-
defaults: {
|
11
|
-
view: 'default',
|
12
|
-
size: 'm'
|
13
|
-
},
|
14
|
-
variations: {
|
15
|
-
view: {
|
16
|
-
"default": /*#__PURE__*/(0, _react.css)(_Dropzone.dropzoneTokens.background, ":var(--surface-solid-card);", _Dropzone.dropzoneTokens.backgroundHover, ":var(--surface-solid-card-hover);", _Dropzone.dropzoneTokens.overlayColorActive, ":var(--overlay-soft);", _Dropzone.dropzoneTokens.border, ":0.063rem dashed var(--outline-secondary);", _Dropzone.dropzoneTokens.borderColorHover, ":var(--outline-secondary-hover);", _Dropzone.dropzoneTokens.borderColorActive, ":var(--outline-accent);", _Dropzone.dropzoneTokens.titleColor, ":var(--text-primary);", _Dropzone.dropzoneTokens.descriptionColor, ":var(--text-secondary);;label:plasma-new-hope__default;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV9iMmMvY29tcG9uZW50cy9Ecm9wem9uZS9Ecm9wem9uZS5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBV3dCIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV9iMmMvY29tcG9uZW50cy9Ecm9wem9uZS9Ecm9wem9uZS5jb25maWcudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IGRyb3B6b25lVG9rZW5zIH0gZnJvbSAnLi4vLi4vLi4vLi4vY29tcG9uZW50cy9Ecm9wem9uZSc7XG5cbmV4cG9ydCBjb25zdCBjb25maWcgPSB7XG4gICAgZGVmYXVsdHM6IHtcbiAgICAgICAgdmlldzogJ2RlZmF1bHQnLFxuICAgICAgICBzaXplOiAnbScsXG4gICAgfSxcbiAgICB2YXJpYXRpb25zOiB7XG4gICAgICAgIHZpZXc6IHtcbiAgICAgICAgICAgIGRlZmF1bHQ6IGNzc2BcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmJhY2tncm91bmR9OiB2YXIoLS1zdXJmYWNlLXNvbGlkLWNhcmQpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuYmFja2dyb3VuZEhvdmVyfTogdmFyKC0tc3VyZmFjZS1zb2xpZC1jYXJkLWhvdmVyKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLm92ZXJsYXlDb2xvckFjdGl2ZX06IHZhcigtLW92ZXJsYXktc29mdCk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5ib3JkZXJ9OiAwLjA2M3JlbSBkYXNoZWQgdmFyKC0tb3V0bGluZS1zZWNvbmRhcnkpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuYm9yZGVyQ29sb3JIb3Zlcn06IHZhcigtLW91dGxpbmUtc2Vjb25kYXJ5LWhvdmVyKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmJvcmRlckNvbG9yQWN0aXZlfTogdmFyKC0tb3V0bGluZS1hY2NlbnQpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVDb2xvcn06IHZhcigtLXRleHQtcHJpbWFyeSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkNvbG9yfTogdmFyKC0tdGV4dC1zZWNvbmRhcnkpO1xuICAgICAgICAgICAgYCxcbiAgICAgICAgfSxcbiAgICAgICAgc2l6ZToge1xuICAgICAgICAgICAgbTogY3NzYFxuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMucGFkZGluZ306IDEuNXJlbTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmJvcmRlclJhZGl1c306IDEuMjVyZW07XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5jb250ZW50R2FwfTogMC43NXJlbTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlV3JhcHBlckdhcH06IDAuMzc1cmVtO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVXcmFwcGVyR2FwQ29sdW1ufTogMC41cmVtO1xuXG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUZvbnRGYW1pbHl9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1mb250LWZhbWlseSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUZvbnRTaXplfTogdmFyKC0tcGxhc21hLXR5cG8taDQtZm9udC1zaXplKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlRm9udFN0eWxlfTogdmFyKC0tcGxhc21hLXR5cG8taDQtZm9udC1zdHlsZSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUZvbnRXZWlnaHR9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1ib2xkLWZvbnQtd2VpZ2h0KTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlTGV0dGVyU3BhY2luZ306IHZhcigtLXBsYXNtYS10eXBvLWg0LWxldHRlci1zcGFjaW5nKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlTGluZUhlaWdodH06IHZhcigtLXBsYXNtYS10eXBvLWg0LWxpbmUtaGVpZ2h0KTtcblxuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuZGVzY3JpcHRpb25Gb250RmFtaWx5fTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWZvbnQtZmFtaWx5KTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udFNpemV9OiB2YXIoLS1wbGFzbWEtdHlwby1ib2R5LXMtZm9udC1zaXplKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udFN0eWxlfTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWZvbnQtc3R5bGUpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuZGVzY3JpcHRpb25Gb250V2VpZ2h0fTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWZvbnQtd2VpZ2h0KTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uTGV0dGVyU3BhY2luZ306IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1sZXR0ZXItc3BhY2luZyk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkxpbmVIZWlnaHR9OiB2YXIoLS1wbGFzbWEtdHlwby1ib2R5LXMtbGluZS1oZWlnaHQpO1xuICAgICAgICAgICAgYCxcbiAgICAgICAgfSxcbiAgICAgICAgZGlzYWJsZWQ6IHtcbiAgICAgICAgICAgIHRydWU6IGNzc2BcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRpc2FibGVkT3BhY2l0eX06IDAuNDtcbiAgICAgICAgICAgIGAsXG4gICAgICAgIH0sXG4gICAgfSxcbn07XG4iXX0= */"))
|
17
|
-
},
|
18
|
-
size: {
|
19
|
-
m: /*#__PURE__*/(0, _react.css)(_Dropzone.dropzoneTokens.padding, ":1.5rem;", _Dropzone.dropzoneTokens.borderRadius, ":1.25rem;", _Dropzone.dropzoneTokens.contentGap, ":0.75rem;", _Dropzone.dropzoneTokens.titleWrapperGap, ":0.375rem;", _Dropzone.dropzoneTokens.titleWrapperGapColumn, ":0.5rem;", _Dropzone.dropzoneTokens.titleFontFamily, ":var(--plasma-typo-h4-font-family);", _Dropzone.dropzoneTokens.titleFontSize, ":var(--plasma-typo-h4-font-size);", _Dropzone.dropzoneTokens.titleFontStyle, ":var(--plasma-typo-h4-font-style);", _Dropzone.dropzoneTokens.titleFontWeight, ":var(--plasma-typo-h4-bold-font-weight);", _Dropzone.dropzoneTokens.titleLetterSpacing, ":var(--plasma-typo-h4-letter-spacing);", _Dropzone.dropzoneTokens.titleLineHeight, ":var(--plasma-typo-h4-line-height);", _Dropzone.dropzoneTokens.descriptionFontFamily, ":var(--plasma-typo-body-s-font-family);", _Dropzone.dropzoneTokens.descriptionFontSize, ":var(--plasma-typo-body-s-font-size);", _Dropzone.dropzoneTokens.descriptionFontStyle, ":var(--plasma-typo-body-s-font-style);", _Dropzone.dropzoneTokens.descriptionFontWeight, ":var(--plasma-typo-body-s-font-weight);", _Dropzone.dropzoneTokens.descriptionLetterSpacing, ":var(--plasma-typo-body-s-letter-spacing);", _Dropzone.dropzoneTokens.descriptionLineHeight, ":var(--plasma-typo-body-s-line-height);;label:plasma-new-hope__m;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV9iMmMvY29tcG9uZW50cy9Ecm9wem9uZS9Ecm9wem9uZS5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJrQiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9leGFtcGxlcy9wbGFzbWFfYjJjL2NvbXBvbmVudHMvRHJvcHpvbmUvRHJvcHpvbmUuY29uZmlnLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBkcm9wem9uZVRva2VucyB9IGZyb20gJy4uLy4uLy4uLy4uL2NvbXBvbmVudHMvRHJvcHpvbmUnO1xuXG5leHBvcnQgY29uc3QgY29uZmlnID0ge1xuICAgIGRlZmF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lVG9rZW5zLnBhZGRpbmd9OiAxLjVyZW07XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5ib3JkZXJSYWRpdXN9OiAxLjI1cmVtO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuY29udGVudEdhcH06IDAuNzVyZW07XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZVdyYXBwZXJHYXB9OiAwLjM3NXJlbTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlV3JhcHBlckdhcENvbHVtbn06IDAuNXJlbTtcblxuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250RmFtaWx5fTogdmFyKC0tcGxhc21hLXR5cG8taDQtZm9udC1mYW1pbHkpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250U2l6ZX06IHZhcigtLXBsYXNtYS10eXBvLWg0LWZvbnQtc2l6ZSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUZvbnRTdHlsZX06IHZhcigtLXBsYXNtYS10eXBvLWg0LWZvbnQtc3R5bGUpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250V2VpZ2h0fTogdmFyKC0tcGxhc21hLXR5cG8taDQtYm9sZC1mb250LXdlaWdodCk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUxldHRlclNwYWNpbmd9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1sZXR0ZXItc3BhY2luZyk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUxpbmVIZWlnaHR9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1saW5lLWhlaWdodCk7XG5cbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udEZhbWlseX06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LWZhbWlseSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkZvbnRTaXplfTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWZvbnQtc2l6ZSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkZvbnRTdHlsZX06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LXN0eWxlKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udFdlaWdodH06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LXdlaWdodCk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkxldHRlclNwYWNpbmd9OiB2YXIoLS1wbGFzbWEtdHlwby1ib2R5LXMtbGV0dGVyLXNwYWNpbmcpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuZGVzY3JpcHRpb25MaW5lSGVpZ2h0fTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWxpbmUtaGVpZ2h0KTtcbiAgICAgICAgICAgIGAsXG4gICAgICAgIH0sXG4gICAgICAgIGRpc2FibGVkOiB7XG4gICAgICAgICAgICB0cnVlOiBjc3NgXG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kaXNhYmxlZE9wYWNpdHl9OiAwLjQ7XG4gICAgICAgICAgICBgLFxuICAgICAgICB9LFxuICAgIH0sXG59O1xuIl19 */"))
|
20
|
-
},
|
21
|
-
disabled: {
|
22
|
-
"true": /*#__PURE__*/(0, _react.css)(_Dropzone.dropzoneTokens.disabledOpacity, ":0.4;;label:plasma-new-hope__true;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJz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c2Vjb25kYXJ5KTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmJvcmRlckNvbG9ySG92ZXJ9OiB2YXIoLS1vdXRsaW5lLXNlY29uZGFyeS1ob3Zlcik7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5ib3JkZXJDb2xvckFjdGl2ZX06IHZhcigtLW91dGxpbmUtYWNjZW50KTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlQ29sb3J9OiB2YXIoLS10ZXh0LXByaW1hcnkpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuZGVzY3JpcHRpb25Db2xvcn06IHZhcigtLXRleHQtc2Vjb25kYXJ5KTtcbiAgICAgICAgICAgIGAsXG4gICAgICAgIH0sXG4gICAgICAgIHNpemU6IHtcbiAgICAgICAgICAgIG06IGNzc2BcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnBhZGRpbmd9OiAxLjVyZW07XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5ib3JkZXJSYWRpdXN9OiAxLjI1cmVtO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuY29udGVudEdhcH06IDAuNzVyZW07XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZVdyYXBwZXJHYXB9OiAwLjM3NXJlbTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlV3JhcHBlckdhcENvbHVtbn06IDAuNXJlbTtcblxuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250RmFtaWx5fTogdmFyKC0tcGxhc21hLXR5cG8taDQtZm9udC1mYW1pbHkpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250U2l6ZX06IHZhcigtLXBsYXNtYS10eXBvLWg0LWZvbnQtc2l6ZSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUZvbnRTdHlsZX06IHZhcigtLXBsYXNtYS10eXBvLWg0LWZvbnQtc3R5bGUpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250V2VpZ2h0fTogdmFyKC0tcGxhc21hLXR5cG8taDQtYm9sZC1mb250LXdlaWdodCk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUxldHRlclNwYWNpbmd9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1sZXR0ZXItc3BhY2luZyk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUxpbmVIZWlnaHR9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1saW5lLWhlaWdodCk7XG5cbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udEZhbWlseX06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LWZhbWlseSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkZvbnRTaXplfTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWZvbnQtc2l6ZSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkZvbnRTdHlsZX06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LXN0eWxlKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udFdlaWdodH06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LXdlaWdodCk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkxldHRlclNwYWNpbmd9OiB2YXIoLS1wbGFzbWEtdHlwby1ib2R5LXMtbGV0dGVyLXNwYWNpbmcpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuZGVzY3JpcHRpb25MaW5lSGVpZ2h0fTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWxpbmUtaGVpZ2h0KTtcbiAgICAgICAgICAgIGAsXG4gICAgICAgIH0sXG4gICAgICAgIGRpc2FibGVkOiB7XG4gICAgICAgICAgICB0cnVlOiBjc3NgXG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kaXNhYmxlZE9wYWNpdHl9OiAwLjQ7XG4gICAgICAgICAgICBgLFxuICAgICAgICB9LFxuICAgIH0sXG59O1xuIl19 */"))
|
23
|
-
}
|
24
|
-
}
|
25
|
-
};
|
@@ -1,11 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.Dropzone = void 0;
|
7
|
-
var _Dropzone = /*#__PURE__*/require("../../../../components/Dropzone");
|
8
|
-
var _engines = /*#__PURE__*/require("../../../../engines");
|
9
|
-
var _Dropzone2 = /*#__PURE__*/require("./Dropzone.config");
|
10
|
-
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Dropzone.dropzoneConfig, _Dropzone2.config);
|
11
|
-
var Dropzone = exports.Dropzone = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
2
|
-
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
-
import { action } from '@storybook/addon-actions';
|
4
|
-
import { disableProps } from '@salutejs/plasma-sb-utils';
|
5
|
-
|
6
|
-
import { WithTheme } from '../../../_helpers';
|
7
|
-
|
8
|
-
import { Dropzone } from './Dropzone';
|
9
|
-
|
10
|
-
const onDragEnter = action('onDragEnter');
|
11
|
-
const onDragLeave = action('onDragLeave');
|
12
|
-
const onDrop = action('onDrop');
|
13
|
-
const onChange = action('onChange');
|
14
|
-
const onChoseFiles = action('onChoseFiles');
|
15
|
-
|
16
|
-
const iconPlacements = ['top', 'left'];
|
17
|
-
|
18
|
-
const meta: Meta<typeof Dropzone> = {
|
19
|
-
title: 'plasma_b2c/Dropzone',
|
20
|
-
component: Dropzone,
|
21
|
-
decorators: [WithTheme],
|
22
|
-
argTypes: {
|
23
|
-
iconPlacement: {
|
24
|
-
options: iconPlacements,
|
25
|
-
control: {
|
26
|
-
type: 'inline-radio',
|
27
|
-
},
|
28
|
-
defaultValue: 'top',
|
29
|
-
},
|
30
|
-
...disableProps(['view', 'size']),
|
31
|
-
},
|
32
|
-
};
|
33
|
-
|
34
|
-
export default meta;
|
35
|
-
|
36
|
-
type StoryPropsDefault = ComponentProps<typeof Dropzone>;
|
37
|
-
|
38
|
-
export const Default: StoryObj<StoryPropsDefault> = {
|
39
|
-
args: {
|
40
|
-
iconPlacement: 'top',
|
41
|
-
width: 400,
|
42
|
-
height: 280,
|
43
|
-
disabled: false,
|
44
|
-
title: 'Click to upload',
|
45
|
-
description: 'or drag and drop files here',
|
46
|
-
},
|
47
|
-
render: (args) => (
|
48
|
-
<Dropzone
|
49
|
-
{...args}
|
50
|
-
onDragEnter={onDragEnter}
|
51
|
-
onDragLeave={onDragLeave}
|
52
|
-
onDrop={onDrop}
|
53
|
-
onChange={onChange}
|
54
|
-
onChoseFiles={onChoseFiles}
|
55
|
-
/>
|
56
|
-
),
|
57
|
-
};
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.config = void 0;
|
7
|
-
var _react = /*#__PURE__*/require("@emotion/react");
|
8
|
-
var _Dropzone = /*#__PURE__*/require("../../../../components/Dropzone");
|
9
|
-
var config = exports.config = {
|
10
|
-
defaults: {
|
11
|
-
view: 'default',
|
12
|
-
size: 'm'
|
13
|
-
},
|
14
|
-
variations: {
|
15
|
-
view: {
|
16
|
-
"default": /*#__PURE__*/(0, _react.css)(_Dropzone.dropzoneTokens.background, ":var(--surface-solid-card);", _Dropzone.dropzoneTokens.backgroundHover, ":var(--surface-solid-card-hover);", _Dropzone.dropzoneTokens.overlayColorActive, ":var(--overlay-soft);", _Dropzone.dropzoneTokens.border, ":0.063rem dashed var(--outline-secondary);", _Dropzone.dropzoneTokens.borderColorHover, ":var(--outline-secondary-hover);", _Dropzone.dropzoneTokens.borderColorActive, ":var(--outline-accent);", _Dropzone.dropzoneTokens.titleColor, ":var(--text-primary);", _Dropzone.dropzoneTokens.descriptionColor, ":var(--text-secondary);;label:plasma-new-hope__default;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV93ZWIvY29tcG9uZW50cy9Ecm9wem9uZS9Ecm9wem9uZS5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBV3dCIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV93ZWIvY29tcG9uZW50cy9Ecm9wem9uZS9Ecm9wem9uZS5jb25maWcudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IGRyb3B6b25lVG9rZW5zIH0gZnJvbSAnLi4vLi4vLi4vLi4vY29tcG9uZW50cy9Ecm9wem9uZSc7XG5cbmV4cG9ydCBjb25zdCBjb25maWcgPSB7XG4gICAgZGVmYXVsdHM6IHtcbiAgICAgICAgdmlldzogJ2RlZmF1bHQnLFxuICAgICAgICBzaXplOiAnbScsXG4gICAgfSxcbiAgICB2YXJpYXRpb25zOiB7XG4gICAgICAgIHZpZXc6IHtcbiAgICAgICAgICAgIGRlZmF1b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jb250ZW50R2FwfTogMC43NXJlbTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlV3JhcHBlckdhcH06IDAuMzc1cmVtO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVXcmFwcGVyR2FwQ29sdW1ufTogMC41cmVtO1xuXG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUZvbnRGYW1pbHl9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1mb250LWZhbWlseSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUZvbnRTaXplfTogdmFyKC0tcGxhc21hLXR5cG8taDQtZm9udC1zaXplKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlRm9udFN0eWxlfTogdmFyKC0tcGxhc21hLXR5cG8taDQtZm9udC1zdHlsZSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUZvbnRXZWlnaHR9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1ib2xkLWZvbnQtd2VpZ2h0KTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlTGV0dGVyU3BhY2luZ306IHZhcigtLXBsYXNtYS10eXBvLWg0LWxldHRlci1zcGFjaW5nKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlTGluZUhlaWdodH06IHZhcigtLXBsYXNtYS10eXBvLWg0LWxpbmUtaGVpZ2h0KTtcblxuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuZGVzY3JpcHRpb25Gb250RmFtaWx5fTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWZvbnQtZmFtaWx5KTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udFNpemV9OiB2YXIoLS1wbGFzbWEtdHlwby1ib2R5LXMtZm9udC1zaXplKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udFN0eWxlfTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWZvbnQtc3R5bGUpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuZGVzY3JpcHRpb25Gb250V2VpZ2h0fTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWZvbnQtd2VpZ2h0KTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uTGV0dGVyU3BhY2luZ306IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1sZXR0ZXItc3BhY2luZyk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkxpbmVIZWlnaHR9OiB2YXIoLS1wbGFzbWEtdHlwby1ib2R5LXMtbGluZS1oZWlnaHQpO1xuICAgICAgICAgICAgYCxcbiAgICAgICAgfSxcbiAgICAgICAgZGlzYWJsZWQ6IHtcbiAgICAgICAgICAgIHRydWU6IGNzc2BcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRpc2FibGVkT3BhY2l0eX06IDAuNDtcbiAgICAgICAgICAgIGAsXG4gICAgICAgIH0sXG4gICAgfSxcbn07XG4iXX0= */"))
|
17
|
-
},
|
18
|
-
size: {
|
19
|
-
m: /*#__PURE__*/(0, _react.css)(_Dropzone.dropzoneTokens.padding, ":1.5rem;", _Dropzone.dropzoneTokens.borderRadius, ":1.25rem;", _Dropzone.dropzoneTokens.contentGap, ":0.75rem;", _Dropzone.dropzoneTokens.titleWrapperGap, ":0.375rem;", _Dropzone.dropzoneTokens.titleWrapperGapColumn, ":0.5rem;", _Dropzone.dropzoneTokens.titleFontFamily, ":var(--plasma-typo-h4-font-family);", _Dropzone.dropzoneTokens.titleFontSize, ":var(--plasma-typo-h4-font-size);", _Dropzone.dropzoneTokens.titleFontStyle, ":var(--plasma-typo-h4-font-style);", _Dropzone.dropzoneTokens.titleFontWeight, ":var(--plasma-typo-h4-bold-font-weight);", _Dropzone.dropzoneTokens.titleLetterSpacing, ":var(--plasma-typo-h4-letter-spacing);", _Dropzone.dropzoneTokens.titleLineHeight, ":var(--plasma-typo-h4-line-height);", _Dropzone.dropzoneTokens.descriptionFontFamily, ":var(--plasma-typo-body-s-font-family);", _Dropzone.dropzoneTokens.descriptionFontSize, ":var(--plasma-typo-body-s-font-size);", _Dropzone.dropzoneTokens.descriptionFontStyle, ":var(--plasma-typo-body-s-font-style);", _Dropzone.dropzoneTokens.descriptionFontWeight, ":var(--plasma-typo-body-s-font-weight);", _Dropzone.dropzoneTokens.descriptionLetterSpacing, ":var(--plasma-typo-body-s-letter-spacing);", _Dropzone.dropzoneTokens.descriptionLineHeight, ":var(--plasma-typo-body-s-line-height);;label:plasma-new-hope__m;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV93ZWIvY29tcG9uZW50cy9Ecm9wem9uZS9Ecm9wem9uZS5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJrQiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9leGFtcGxlcy9wbGFzbWFfd2ViL2NvbXBvbmVudHMvRHJvcHpvbmUvRHJvcHpvbmUuY29uZmlnLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBkcm9wem9uZVRva2VucyB9IGZyb20gJy4uLy4uLy4uLy4uL2NvbXBvbmVudHMvRHJvcHpvbmUnO1xuXG5leHBvcnQgY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cbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnBhZGRpbmd9OiAxLjVyZW07XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5ib3JkZXJSYWRpdXN9OiAxLjI1cmVtO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuY29udGVudEdhcH06IDAuNzVyZW07XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZVdyYXBwZXJHYXB9OiAwLjM3NXJlbTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlV3JhcHBlckdhcENvbHVtbn06IDAuNXJlbTtcblxuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250RmFtaWx5fTogdmFyKC0tcGxhc21hLXR5cG8taDQtZm9udC1mYW1pbHkpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250U2l6ZX06IHZhcigtLXBsYXNtYS10eXBvLWg0LWZvbnQtc2l6ZSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUZvbnRTdHlsZX06IHZhcigtLXBsYXNtYS10eXBvLWg0LWZvbnQtc3R5bGUpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250V2VpZ2h0fTogdmFyKC0tcGxhc21hLXR5cG8taDQtYm9sZC1mb250LXdlaWdodCk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUxldHRlclNwYWNpbmd9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1sZXR0ZXItc3BhY2luZyk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUxpbmVIZWlnaHR9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1saW5lLWhlaWdodCk7XG5cbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udEZhbWlseX06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LWZhbWlseSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkZvbnRTaXplfTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWZvbnQtc2l6ZSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkZvbnRTdHlsZX06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LXN0eWxlKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udFdlaWdodH06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LXdlaWdodCk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkxldHRlclNwYWNpbmd9OiB2YXIoLS1wbGFzbWEtdHlwby1ib2R5LXMtbGV0dGVyLXNwYWNpbmcpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuZGVzY3JpcHRpb25MaW5lSGVpZ2h0fTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWxpbmUtaGVpZ2h0KTtcbiAgICAgICAgICAgIGAsXG4gICAgICAgIH0sXG4gICAgICAgIGRpc2FibGVkOiB7XG4gICAgICAgICAgICB0cnVlOiBjc3NgXG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kaXNhYmxlZE9wYWNpdHl9OiAwLjQ7XG4gICAgICAgICAgICBgLFxuICAgICAgICB9LFxuICAgIH0sXG59O1xuIl19 */"))
|
20
|
-
},
|
21
|
-
disabled: {
|
22
|
-
"true": /*#__PURE__*/(0, _react.css)(_Dropzone.dropzoneTokens.disabledOpacity, ":0.4;;label:plasma-new-hope__true;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset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ZW0gZGFzaGVkIHZhcigtLW91dGxpbmUtc2Vjb25kYXJ5KTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmJvcmRlckNvbG9ySG92ZXJ9OiB2YXIoLS1vdXRsaW5lLXNlY29uZGFyeS1ob3Zlcik7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5ib3JkZXJDb2xvckFjdGl2ZX06IHZhcigtLW91dGxpbmUtYWNjZW50KTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlQ29sb3J9OiB2YXIoLS10ZXh0LXByaW1hcnkpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuZGVzY3JpcHRpb25Db2xvcn06IHZhcigtLXRleHQtc2Vjb25kYXJ5KTtcbiAgICAgICAgICAgIGAsXG4gICAgICAgIH0sXG4gICAgICAgIHNpemU6IHtcbiAgICAgICAgICAgIG06IGNzc2BcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnBhZGRpbmd9OiAxLjVyZW07XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5ib3JkZXJSYWRpdXN9OiAxLjI1cmVtO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuY29udGVudEdhcH06IDAuNzVyZW07XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZVdyYXBwZXJHYXB9OiAwLjM3NXJlbTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLnRpdGxlV3JhcHBlckdhcENvbHVtbn06IDAuNXJlbTtcblxuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250RmFtaWx5fTogdmFyKC0tcGxhc21hLXR5cG8taDQtZm9udC1mYW1pbHkpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250U2l6ZX06IHZhcigtLXBsYXNtYS10eXBvLWg0LWZvbnQtc2l6ZSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUZvbnRTdHlsZX06IHZhcigtLXBsYXNtYS10eXBvLWg0LWZvbnQtc3R5bGUpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMudGl0bGVGb250V2VpZ2h0fTogdmFyKC0tcGxhc21hLXR5cG8taDQtYm9sZC1mb250LXdlaWdodCk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUxldHRlclNwYWNpbmd9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1sZXR0ZXItc3BhY2luZyk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy50aXRsZUxpbmVIZWlnaHR9OiB2YXIoLS1wbGFzbWEtdHlwby1oNC1saW5lLWhlaWdodCk7XG5cbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udEZhbWlseX06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LWZhbWlseSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkZvbnRTaXplfTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWZvbnQtc2l6ZSk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkZvbnRTdHlsZX06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LXN0eWxlKTtcbiAgICAgICAgICAgICAgICAke2Ryb3B6b25lVG9rZW5zLmRlc2NyaXB0aW9uRm9udFdlaWdodH06IHZhcigtLXBsYXNtYS10eXBvLWJvZHktcy1mb250LXdlaWdodCk7XG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kZXNjcmlwdGlvbkxldHRlclNwYWNpbmd9OiB2YXIoLS1wbGFzbWEtdHlwby1ib2R5LXMtbGV0dGVyLXNwYWNpbmcpO1xuICAgICAgICAgICAgICAgICR7ZHJvcHpvbmVUb2tlbnMuZGVzY3JpcHRpb25MaW5lSGVpZ2h0fTogdmFyKC0tcGxhc21hLXR5cG8tYm9keS1zLWxpbmUtaGVpZ2h0KTtcbiAgICAgICAgICAgIGAsXG4gICAgICAgIH0sXG4gICAgICAgIGRpc2FibGVkOiB7XG4gICAgICAgICAgICB0cnVlOiBjc3NgXG4gICAgICAgICAgICAgICAgJHtkcm9wem9uZVRva2Vucy5kaXNhYmxlZE9wYWNpdHl9OiAwLjQ7XG4gICAgICAgICAgICBgLFxuICAgICAgICB9LFxuICAgIH0sXG59O1xuIl19 */"))
|
23
|
-
}
|
24
|
-
}
|
25
|
-
};
|
@@ -1,11 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.Dropzone = void 0;
|
7
|
-
var _Dropzone = /*#__PURE__*/require("../../../../components/Dropzone");
|
8
|
-
var _engines = /*#__PURE__*/require("../../../../engines");
|
9
|
-
var _Dropzone2 = /*#__PURE__*/require("./Dropzone.config");
|
10
|
-
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Dropzone.dropzoneConfig, _Dropzone2.config);
|
11
|
-
var Dropzone = exports.Dropzone = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
2
|
-
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
-
import { action } from '@storybook/addon-actions';
|
4
|
-
import { disableProps } from '@salutejs/plasma-sb-utils';
|
5
|
-
|
6
|
-
import { WithTheme } from '../../../_helpers';
|
7
|
-
|
8
|
-
import { Dropzone } from './Dropzone';
|
9
|
-
|
10
|
-
const onDragEnter = action('onDragEnter');
|
11
|
-
const onDragLeave = action('onDragLeave');
|
12
|
-
const onDrop = action('onDrop');
|
13
|
-
const onChange = action('onChange');
|
14
|
-
const onChoseFiles = action('onChoseFiles');
|
15
|
-
|
16
|
-
const iconPlacements = ['top', 'left'];
|
17
|
-
|
18
|
-
const meta: Meta<typeof Dropzone> = {
|
19
|
-
title: 'plasma_web/Dropzone',
|
20
|
-
component: Dropzone,
|
21
|
-
decorators: [WithTheme],
|
22
|
-
argTypes: {
|
23
|
-
iconPlacement: {
|
24
|
-
options: iconPlacements,
|
25
|
-
control: {
|
26
|
-
type: 'inline-radio',
|
27
|
-
},
|
28
|
-
defaultValue: 'top',
|
29
|
-
},
|
30
|
-
...disableProps(['view', 'size']),
|
31
|
-
},
|
32
|
-
};
|
33
|
-
|
34
|
-
export default meta;
|
35
|
-
|
36
|
-
type StoryPropsDefault = ComponentProps<typeof Dropzone>;
|
37
|
-
|
38
|
-
export const Default: StoryObj<StoryPropsDefault> = {
|
39
|
-
args: {
|
40
|
-
iconPlacement: 'top',
|
41
|
-
width: 400,
|
42
|
-
height: 280,
|
43
|
-
disabled: false,
|
44
|
-
title: 'Click to upload',
|
45
|
-
description: 'or drag and drop files here',
|
46
|
-
},
|
47
|
-
render: (args) => (
|
48
|
-
<Dropzone
|
49
|
-
{...args}
|
50
|
-
onDragEnter={onDragEnter}
|
51
|
-
onDragLeave={onDragLeave}
|
52
|
-
onDrop={onDrop}
|
53
|
-
onChange={onChange}
|
54
|
-
onChoseFiles={onChoseFiles}
|
55
|
-
/>
|
56
|
-
),
|
57
|
-
};
|
@@ -1,263 +0,0 @@
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
var _IconArrowBarDown;
|
3
|
-
var _excluded = ["className", "style", "accept", "multiple", "title", "description", "icon", "iconPlacement", "size", "view", "disabled", "stretch", "width", "height", "onDragEnter", "onDragLeave", "onDragOver", "onDrop", "validator", "onClick", "onChange", "onChoseFiles"];
|
4
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
5
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
6
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
7
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
9
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
10
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
11
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
12
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
13
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
14
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
15
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
16
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
17
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
18
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
19
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
20
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
21
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
22
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
23
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
24
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
25
|
-
import React, { forwardRef, useRef, useState } from 'react';
|
26
|
-
import { useForkRef } from '@salutejs/plasma-core';
|
27
|
-
import { cx, getSizeValueFromProp } from '../../utils';
|
28
|
-
import { IconArrowBarDown } from '../../components/_Icon';
|
29
|
-
import { base as viewCSS } from './variations/_view/base';
|
30
|
-
import { base as sizeCSS } from './variations/_size/base';
|
31
|
-
import { base as disabledCSS } from './variations/_disabled/base';
|
32
|
-
import { base, Content, Description, DropzoneHandlerOverlay, HiddenInput, Title, TitleWrapper } from './Dropzone.styles';
|
33
|
-
import { classes, privateTokens } from './Dropzone.tokens';
|
34
|
-
export var dropzoneRoot = function dropzoneRoot(Root) {
|
35
|
-
return /*#__PURE__*/forwardRef(function (_ref, outerRef) {
|
36
|
-
var className = _ref.className,
|
37
|
-
style = _ref.style,
|
38
|
-
accept = _ref.accept,
|
39
|
-
multiple = _ref.multiple,
|
40
|
-
title = _ref.title,
|
41
|
-
description = _ref.description,
|
42
|
-
icon = _ref.icon,
|
43
|
-
iconPlacement = _ref.iconPlacement,
|
44
|
-
size = _ref.size,
|
45
|
-
view = _ref.view,
|
46
|
-
disabled = _ref.disabled,
|
47
|
-
stretch = _ref.stretch,
|
48
|
-
width = _ref.width,
|
49
|
-
height = _ref.height,
|
50
|
-
onDragEnter = _ref.onDragEnter,
|
51
|
-
onDragLeave = _ref.onDragLeave,
|
52
|
-
onDragOver = _ref.onDragOver,
|
53
|
-
onDrop = _ref.onDrop,
|
54
|
-
validator = _ref.validator,
|
55
|
-
onClick = _ref.onClick,
|
56
|
-
onChange = _ref.onChange,
|
57
|
-
onChoseFiles = _ref.onChoseFiles,
|
58
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
59
|
-
var _useState = useState(false),
|
60
|
-
_useState2 = _slicedToArray(_useState, 2),
|
61
|
-
isDropzoneActive = _useState2[0],
|
62
|
-
setIsDropzoneActive = _useState2[1];
|
63
|
-
var inputRef = useRef(null);
|
64
|
-
var forkInputRef = useForkRef(outerRef, inputRef);
|
65
|
-
var innerWidth = width ? getSizeValueFromProp(width) : 'fit-content';
|
66
|
-
var innerHeight = height ? getSizeValueFromProp(height) : 'fit-content';
|
67
|
-
var processFiles = /*#__PURE__*/function () {
|
68
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(rawFiles, callback, afterAction) {
|
69
|
-
var files, res;
|
70
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
71
|
-
while (1) switch (_context.prev = _context.next) {
|
72
|
-
case 0:
|
73
|
-
if (rawFiles !== null && rawFiles !== void 0 && rawFiles.length) {
|
74
|
-
_context.next = 2;
|
75
|
-
break;
|
76
|
-
}
|
77
|
-
return _context.abrupt("return");
|
78
|
-
case 2:
|
79
|
-
files = _toConsumableArray(rawFiles);
|
80
|
-
res = {
|
81
|
-
acceptedFiles: files
|
82
|
-
};
|
83
|
-
if (!validator) {
|
84
|
-
_context.next = 8;
|
85
|
-
break;
|
86
|
-
}
|
87
|
-
_context.next = 7;
|
88
|
-
return validator === null || validator === void 0 ? void 0 : validator(files);
|
89
|
-
case 7:
|
90
|
-
res = _context.sent;
|
91
|
-
case 8:
|
92
|
-
if (!callback) {
|
93
|
-
_context.next = 11;
|
94
|
-
break;
|
95
|
-
}
|
96
|
-
_context.next = 11;
|
97
|
-
return callback(res);
|
98
|
-
case 11:
|
99
|
-
if (afterAction) {
|
100
|
-
afterAction();
|
101
|
-
}
|
102
|
-
case 12:
|
103
|
-
case "end":
|
104
|
-
return _context.stop();
|
105
|
-
}
|
106
|
-
}, _callee);
|
107
|
-
}));
|
108
|
-
return function processFiles(_x, _x2, _x3) {
|
109
|
-
return _ref2.apply(this, arguments);
|
110
|
-
};
|
111
|
-
}();
|
112
|
-
var handleDragEnter = function handleDragEnter(event) {
|
113
|
-
if (disabled) {
|
114
|
-
return;
|
115
|
-
}
|
116
|
-
event.preventDefault();
|
117
|
-
event.stopPropagation();
|
118
|
-
if (onDragEnter) {
|
119
|
-
onDragEnter(event);
|
120
|
-
}
|
121
|
-
setIsDropzoneActive(true);
|
122
|
-
};
|
123
|
-
var handleDragLeave = function handleDragLeave(event) {
|
124
|
-
if (disabled) {
|
125
|
-
return;
|
126
|
-
}
|
127
|
-
event.preventDefault();
|
128
|
-
if (onDragLeave) {
|
129
|
-
onDragLeave(event);
|
130
|
-
}
|
131
|
-
setIsDropzoneActive(false);
|
132
|
-
};
|
133
|
-
var handleDragOver = function handleDragOver(event) {
|
134
|
-
if (disabled) {
|
135
|
-
return;
|
136
|
-
}
|
137
|
-
event.preventDefault();
|
138
|
-
if (onDragOver) {
|
139
|
-
onDragOver(event);
|
140
|
-
}
|
141
|
-
var rawFiles = event.dataTransfer.files;
|
142
|
-
if (!isDropzoneActive && rawFiles && rawFiles.length > 0) {
|
143
|
-
setIsDropzoneActive(true);
|
144
|
-
}
|
145
|
-
};
|
146
|
-
var handleDrop = /*#__PURE__*/function () {
|
147
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(event) {
|
148
|
-
var rawFiles, afterAction;
|
149
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
150
|
-
while (1) switch (_context2.prev = _context2.next) {
|
151
|
-
case 0:
|
152
|
-
if (!disabled) {
|
153
|
-
_context2.next = 2;
|
154
|
-
break;
|
155
|
-
}
|
156
|
-
return _context2.abrupt("return");
|
157
|
-
case 2:
|
158
|
-
event.preventDefault();
|
159
|
-
event.persist();
|
160
|
-
rawFiles = event.dataTransfer.files;
|
161
|
-
afterAction = function afterAction() {
|
162
|
-
event.dataTransfer.clearData();
|
163
|
-
setIsDropzoneActive(false);
|
164
|
-
};
|
165
|
-
_context2.next = 8;
|
166
|
-
return processFiles(rawFiles, onDrop, afterAction);
|
167
|
-
case 8:
|
168
|
-
case "end":
|
169
|
-
return _context2.stop();
|
170
|
-
}
|
171
|
-
}, _callee2);
|
172
|
-
}));
|
173
|
-
return function handleDrop(_x4) {
|
174
|
-
return _ref3.apply(this, arguments);
|
175
|
-
};
|
176
|
-
}();
|
177
|
-
var handleClick = function handleClick(event) {
|
178
|
-
if (!inputRef.current || disabled) {
|
179
|
-
return;
|
180
|
-
}
|
181
|
-
inputRef.current.click();
|
182
|
-
if (onClick) {
|
183
|
-
onClick(event);
|
184
|
-
}
|
185
|
-
};
|
186
|
-
var handleChange = /*#__PURE__*/function () {
|
187
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(event) {
|
188
|
-
var rawFiles;
|
189
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
190
|
-
while (1) switch (_context3.prev = _context3.next) {
|
191
|
-
case 0:
|
192
|
-
if (!disabled) {
|
193
|
-
_context3.next = 2;
|
194
|
-
break;
|
195
|
-
}
|
196
|
-
return _context3.abrupt("return");
|
197
|
-
case 2:
|
198
|
-
if (onChange) {
|
199
|
-
onChange(event);
|
200
|
-
}
|
201
|
-
rawFiles = event.target.files;
|
202
|
-
_context3.next = 6;
|
203
|
-
return processFiles(rawFiles, onChoseFiles);
|
204
|
-
case 6:
|
205
|
-
case "end":
|
206
|
-
return _context3.stop();
|
207
|
-
}
|
208
|
-
}, _callee3);
|
209
|
-
}));
|
210
|
-
return function handleChange(_x5) {
|
211
|
-
return _ref4.apply(this, arguments);
|
212
|
-
};
|
213
|
-
}();
|
214
|
-
return /*#__PURE__*/React.createElement(Root, {
|
215
|
-
className: cx(className, isDropzoneActive && classes.active, stretch && classes.stretch, disabled && classes.disabled),
|
216
|
-
view: view,
|
217
|
-
size: size,
|
218
|
-
disabled: disabled,
|
219
|
-
tabIndex: 0,
|
220
|
-
style: _objectSpread(_objectSpread({}, style), {}, _defineProperty(_defineProperty({}, privateTokens.width, innerWidth), privateTokens.height, innerHeight))
|
221
|
-
}, /*#__PURE__*/React.createElement(DropzoneHandlerOverlay, {
|
222
|
-
onDragEnter: handleDragEnter,
|
223
|
-
onDragLeave: handleDragLeave,
|
224
|
-
onDragOver: handleDragOver,
|
225
|
-
onDrop: handleDrop,
|
226
|
-
onClick: handleClick
|
227
|
-
}), /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement(TitleWrapper, {
|
228
|
-
className: cx(iconPlacement === 'top' && classes.verticalContentPlacing)
|
229
|
-
}, icon || _IconArrowBarDown || (_IconArrowBarDown = /*#__PURE__*/React.createElement(IconArrowBarDown, {
|
230
|
-
color: "inherit",
|
231
|
-
size: "s"
|
232
|
-
})), title && /*#__PURE__*/React.createElement(Title, null, title)), description && /*#__PURE__*/React.createElement(Description, null, description)), /*#__PURE__*/React.createElement(HiddenInput, _extends({
|
233
|
-
ref: forkInputRef,
|
234
|
-
type: "file",
|
235
|
-
accept: accept,
|
236
|
-
multiple: multiple,
|
237
|
-
tabIndex: -1,
|
238
|
-
onChange: handleChange
|
239
|
-
}, rest)));
|
240
|
-
});
|
241
|
-
};
|
242
|
-
export var dropzoneConfig = {
|
243
|
-
name: 'Dropzone',
|
244
|
-
tag: 'div',
|
245
|
-
layout: dropzoneRoot,
|
246
|
-
base: base,
|
247
|
-
variations: {
|
248
|
-
view: {
|
249
|
-
css: viewCSS
|
250
|
-
},
|
251
|
-
size: {
|
252
|
-
css: sizeCSS
|
253
|
-
},
|
254
|
-
disabled: {
|
255
|
-
css: disabledCSS,
|
256
|
-
attrs: true
|
257
|
-
}
|
258
|
-
},
|
259
|
-
defaults: {
|
260
|
-
view: 'default',
|
261
|
-
size: 'm'
|
262
|
-
}
|
263
|
-
};
|