@elliemae/ds-backdrop 2.2.0-alpha.4 → 3.0.0-next.2

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/cjs/Backdrop.js CHANGED
@@ -1,65 +1,37 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var Backdrop_exports = {};
29
- __export(Backdrop_exports, {
30
- DSBackdrop: () => DSBackdrop,
31
- default: () => Backdrop_default
32
- });
33
- var React = __toESM(require("react"));
34
- var import_react = __toESM(require("react"));
35
- var import_prop_types = __toESM(require("prop-types"));
36
- var import_styled_components = __toESM(require("styled-components"));
37
- const BackdropTag = import_styled_components.default.div`
38
- ${({ type }) => type === "cover" ? "position: fixed" : "position: absolute"};
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
39
4
 
40
- top: 0;
41
- left: 0;
42
- width: 100%;
43
- height: 100%;
44
- background: black;
45
- opacity: 0.6;
46
- ${(props) => props.zIndex ? `z-index: ${props.zIndex};` : ""}
47
- `;
48
- const DSBackdrop = ({
49
- type = "cover",
50
- zIndex,
51
- onClick = () => null
52
- }) => /* @__PURE__ */ import_react.default.createElement(BackdropTag, {
53
- zIndex,
54
- type,
55
- onClick,
56
- "data-testid": "ds-backdrop"
57
- });
58
- DSBackdrop.propTypes = {
59
- type: import_prop_types.default.oneOf(["fill", "cover"]),
60
- zIndex: import_prop_types.default.number,
61
- onClick: import_prop_types.default.func
5
+ var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('react');
7
+ var styled = require('styled-components');
8
+
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
12
+ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
13
+
14
+ const BackdropTag = /*#__PURE__*/styled__default["default"].div.withConfig({
15
+ componentId: "sc-hba0s0-0"
16
+ })(["", ";top:0;left:0;width:100%;height:100%;background:black;opacity:0.6;", ""], _ref => {
17
+ let {
18
+ type
19
+ } = _ref;
20
+ return type === 'cover' ? 'position: fixed' : 'position: absolute';
21
+ }, props => props.zIndex ? "z-index: ".concat(props.zIndex, ";") : '');
22
+ const DSBackdrop = _ref2 => {
23
+ let {
24
+ type = 'cover',
25
+ zIndex,
26
+ onClick = () => null
27
+ } = _ref2;
28
+ return /*#__PURE__*/_jsx__default["default"](BackdropTag, {
29
+ zIndex: zIndex,
30
+ type: type,
31
+ onClick: onClick,
32
+ "data-testid": "ds-backdrop"
33
+ });
62
34
  };
63
- var Backdrop_default = DSBackdrop;
64
- module.exports = __toCommonJS(Backdrop_exports);
65
- //# sourceMappingURL=Backdrop.js.map
35
+
36
+ exports.DSBackdrop = DSBackdrop;
37
+ exports["default"] = DSBackdrop;
package/cjs/index.js CHANGED
@@ -1,37 +1,10 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var src_exports = {};
29
- __export(src_exports, {
30
- DSBackdrop: () => import_Backdrop2.default,
31
- default: () => import_Backdrop.default
32
- });
33
- var React = __toESM(require("react"));
34
- var import_Backdrop = require("./Backdrop");
35
- var import_Backdrop2 = require("./Backdrop");
36
- module.exports = __toCommonJS(src_exports);
37
- //# sourceMappingURL=index.js.map
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Backdrop = require('./Backdrop.js');
6
+
7
+
8
+
9
+ exports.DSBackdrop = Backdrop.DSBackdrop;
10
+ exports["default"] = Backdrop.DSBackdrop;
package/esm/Backdrop.js CHANGED
@@ -1,36 +1,27 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import PropTypes from "prop-types";
4
- import styled from "styled-components";
5
- const BackdropTag = styled.div`
6
- ${({ type }) => type === "cover" ? "position: fixed" : "position: absolute"};
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import styled from 'styled-components';
7
4
 
8
- top: 0;
9
- left: 0;
10
- width: 100%;
11
- height: 100%;
12
- background: black;
13
- opacity: 0.6;
14
- ${(props) => props.zIndex ? `z-index: ${props.zIndex};` : ""}
15
- `;
16
- const DSBackdrop = ({
17
- type = "cover",
18
- zIndex,
19
- onClick = () => null
20
- }) => /* @__PURE__ */ React2.createElement(BackdropTag, {
21
- zIndex,
22
- type,
23
- onClick,
24
- "data-testid": "ds-backdrop"
25
- });
26
- DSBackdrop.propTypes = {
27
- type: PropTypes.oneOf(["fill", "cover"]),
28
- zIndex: PropTypes.number,
29
- onClick: PropTypes.func
5
+ const BackdropTag = /*#__PURE__*/styled.div.withConfig({
6
+ componentId: "sc-hba0s0-0"
7
+ })(["", ";top:0;left:0;width:100%;height:100%;background:black;opacity:0.6;", ""], _ref => {
8
+ let {
9
+ type
10
+ } = _ref;
11
+ return type === 'cover' ? 'position: fixed' : 'position: absolute';
12
+ }, props => props.zIndex ? "z-index: ".concat(props.zIndex, ";") : '');
13
+ const DSBackdrop = _ref2 => {
14
+ let {
15
+ type = 'cover',
16
+ zIndex,
17
+ onClick = () => null
18
+ } = _ref2;
19
+ return /*#__PURE__*/_jsx(BackdropTag, {
20
+ zIndex: zIndex,
21
+ type: type,
22
+ onClick: onClick,
23
+ "data-testid": "ds-backdrop"
24
+ });
30
25
  };
31
- var Backdrop_default = DSBackdrop;
32
- export {
33
- DSBackdrop,
34
- Backdrop_default as default
35
- };
36
- //# sourceMappingURL=Backdrop.js.map
26
+
27
+ export { DSBackdrop, DSBackdrop as default };
package/esm/index.js CHANGED
@@ -1,8 +1 @@
1
- import * as React from "react";
2
- import { default as default2 } from "./Backdrop";
3
- import { default as default3 } from "./Backdrop";
4
- export {
5
- default3 as DSBackdrop,
6
- default2 as default
7
- };
8
- //# sourceMappingURL=index.js.map
1
+ export { DSBackdrop, DSBackdrop as default } from './Backdrop.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-backdrop",
3
- "version": "2.2.0-alpha.4",
3
+ "version": "3.0.0-next.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Backdrop",
6
6
  "module": "./esm/index.js",
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Backdrop.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\n// TODO change hardcoded opacity for theme variable\nconst BackdropTag = styled.div`\n ${({ type }) =>\n type === 'cover' ? 'position: fixed' : 'position: absolute'};\n\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: black;\n opacity: 0.6;\n ${(props) => (props.zIndex ? `z-index: ${props.zIndex};` : '')}\n`;\n\nexport const DSBackdrop = ({\n type = 'cover',\n zIndex,\n onClick = () => null,\n}) => (\n <BackdropTag\n zIndex={zIndex}\n type={type}\n onClick={onClick}\n data-testid=\"ds-backdrop\"\n />\n);\nDSBackdrop.propTypes = {\n /**\n * ['cover', 'fill']\n */\n type: PropTypes.oneOf(['fill', 'cover']),\n /**\n * z-index of dimmer background\n */\n zIndex: PropTypes.number,\n /**\n * Backdrop click event\n */\n onClick: PropTypes.func,\n};\n\nexport default DSBackdrop;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAsB;AACtB,+BAAmB;AAGnB,MAAM,cAAc,iCAAO;AAAA,IACvB,CAAC,EAAE,WACH,SAAS,UAAU,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQvC,CAAC,UAAW,MAAM,SAAS,YAAY,MAAM,YAAY;AAAA;AAGtD,MAAM,aAAa,CAAC;AAAA,EACzB,OAAO;AAAA,EACP;AAAA,EACA,UAAU,MAAM;AAAA,MAEhB,mDAAC,aAAD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAY;AAAA;AAGhB,WAAW,YAAY;AAAA,EAIrB,MAAM,0BAAU,MAAM,CAAC,QAAQ;AAAA,EAI/B,QAAQ,0BAAU;AAAA,EAIlB,SAAS,0BAAU;AAAA;AAGrB,IAAO,mBAAQ;",
6
- "names": []
7
- }
package/cjs/index.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { default } from './Backdrop';\nexport { default as DSBackdrop } from './Backdrop';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAAwB;AACxB,uBAAsC;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/Backdrop.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\n// TODO change hardcoded opacity for theme variable\nconst BackdropTag = styled.div`\n ${({ type }) =>\n type === 'cover' ? 'position: fixed' : 'position: absolute'};\n\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: black;\n opacity: 0.6;\n ${(props) => (props.zIndex ? `z-index: ${props.zIndex};` : '')}\n`;\n\nexport const DSBackdrop = ({\n type = 'cover',\n zIndex,\n onClick = () => null,\n}) => (\n <BackdropTag\n zIndex={zIndex}\n type={type}\n onClick={onClick}\n data-testid=\"ds-backdrop\"\n />\n);\nDSBackdrop.propTypes = {\n /**\n * ['cover', 'fill']\n */\n type: PropTypes.oneOf(['fill', 'cover']),\n /**\n * z-index of dimmer background\n */\n zIndex: PropTypes.number,\n /**\n * Backdrop click event\n */\n onClick: PropTypes.func,\n};\n\nexport default DSBackdrop;\n"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AAGA,MAAM,cAAc,OAAO;AAAA,IACvB,CAAC,EAAE,WACH,SAAS,UAAU,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQvC,CAAC,UAAW,MAAM,SAAS,YAAY,MAAM,YAAY;AAAA;AAGtD,MAAM,aAAa,CAAC;AAAA,EACzB,OAAO;AAAA,EACP;AAAA,EACA,UAAU,MAAM;AAAA,MAEhB,qCAAC,aAAD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAY;AAAA;AAGhB,WAAW,YAAY;AAAA,EAIrB,MAAM,UAAU,MAAM,CAAC,QAAQ;AAAA,EAI/B,QAAQ,UAAU;AAAA,EAIlB,SAAS,UAAU;AAAA;AAGrB,IAAO,mBAAQ;",
6
- "names": []
7
- }
package/esm/index.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default } from './Backdrop';\nexport { default as DSBackdrop } from './Backdrop';\n"],
5
- "mappings": "AAAA;ACAA;AACA;",
6
- "names": []
7
- }