sag_components 1.0.12 → 1.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.
@@ -13,14 +13,16 @@ var _OneColumnContainer = require("../OneColumnContainer.style");
13
13
  var _InfoIcon = require("./InfoIcon");
14
14
  var _core = require("@dnd-kit/core");
15
15
  var _classnames = _interopRequireDefault(require("classnames"));
16
- var _DroppableModule = _interopRequireDefault(require("./Droppable.module.css"));
17
- var _excluded = ["children", "itemClass", "refId", "width", "height", "infoText"];
16
+ var _excluded = ["children", "itemClass", "overStyle", "draggingStyle", "droppedStyle", "refId", "width", "height", "infoText"];
18
17
  /**
19
18
  * Primary UI component for user interaction
20
19
  */
21
20
  var OneColumnContainer = function OneColumnContainer(_ref) {
22
21
  var children = _ref.children,
23
22
  itemClass = _ref.itemClass,
23
+ overStyle = _ref.overStyle,
24
+ draggingStyle = _ref.draggingStyle,
25
+ droppedStyle = _ref.droppedStyle,
24
26
  refId = _ref.refId,
25
27
  width = _ref.width,
26
28
  height = _ref.height,
@@ -39,7 +41,7 @@ var OneColumnContainer = function OneColumnContainer(_ref) {
39
41
  setClicked(!clicked);
40
42
  };
41
43
  return /*#__PURE__*/_react.default.createElement(_OneColumnContainer.StyledContainer, {
42
- className: (0, _classnames.default)(itemClass, isOver && _DroppableModule.default.over, dragging && _DroppableModule.default.dragging, children && _DroppableModule.default.dropped),
44
+ className: (0, _classnames.default)(itemClass, overStyle, draggingStyle, droppedStyle),
43
45
  ref: setNodeRef,
44
46
  width: width,
45
47
  height: height
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -4,11 +4,10 @@ import { InfoTextLabel,InfoTextContainer,IconContainer, StyledContainer } from '
4
4
  import { InfoIcon } from "./InfoIcon";
5
5
  import { useDroppable, UniqueIdentifier } from "@dnd-kit/core";
6
6
  import classNames from "classnames";
7
- import styles from "./Droppable.module.css"
8
7
  /**
9
8
  * Primary UI component for user interaction
10
9
  */
11
- export const OneColumnContainer = ({ children,itemClass,refId,width,height,infoText,...props }) => {
10
+ export const OneColumnContainer = ({ children,itemClass,overStyle,draggingStyle,droppedStyle,refId,width,height,infoText,...props }) => {
12
11
  const [clicked, setClicked] = useState(false);
13
12
  const { isOver, setNodeRef } = useDroppable({
14
13
  refId,
@@ -20,9 +19,9 @@ export const OneColumnContainer = ({ children,itemClass,refId,width,height,infoT
20
19
  return (
21
20
  <StyledContainer className={classNames(
22
21
  itemClass,
23
- isOver && styles.over,
24
- dragging && styles.dragging,
25
- children && styles.dropped
22
+ overStyle,
23
+ draggingStyle,
24
+ droppedStyle
26
25
  )} ref={setNodeRef} width={width} height={height}>
27
26
  {children}
28
27
  <InfoTextContainer clicked={clicked} width={width} height={height}>
@@ -1,106 +0,0 @@
1
- .Droppable {
2
-
3
- position: relative;
4
-
5
- padding-top: 80px;
6
-
7
- text-align: center;
8
-
9
- border-radius: 10px;
10
-
11
- width: 340px;
12
-
13
- height: 340px;
14
-
15
- box-sizing: border-box;
16
-
17
- background-color: #fff;
18
-
19
- box-shadow: inset rgba(201, 211, 219, 0.5) 0 0 0 2px,
20
-
21
- rgba(255, 255, 255, 0) 0 0 0 1px, rgba(201, 211, 219, 0.25) 20px 14px 24px;
22
-
23
- transition: box-shadow 250ms ease;
24
-
25
-
26
-
27
-
28
- > svg {
29
-
30
- position: absolute;
31
-
32
- left: 50%;
33
-
34
- top: 50%;
35
-
36
- width: 200px;
37
-
38
- transform: translate3d(-50%, -50%, 0);
39
-
40
- opacity: 0.8;
41
-
42
- transition: opacity 300ms ease, transform 200ms ease;
43
-
44
- user-select: none;
45
-
46
- pointer-events: none;
47
-
48
- }
49
-
50
-
51
-
52
-
53
- &.dragging {
54
-
55
- > svg {
56
-
57
- opacity: 0.8;
58
-
59
- }
60
-
61
- }
62
-
63
-
64
-
65
-
66
- &.over {
67
-
68
- box-shadow: inset #ffffff 0 0 0 3px, rgba(201, 211, 219, 0.5) 20px 14px 24px;
69
-
70
-
71
-
72
-
73
- > svg {
74
-
75
- opacity: 1;
76
-
77
- }
78
-
79
-
80
-
81
-
82
- &.dropped {
83
-
84
- box-shadow: inset rgba(4, 49, 85, 0.7) 0 0 0 3px,
85
-
86
- rgba(201, 211, 219, 0.5) 20px 14px 24px;
87
-
88
- }
89
-
90
- }
91
-
92
-
93
-
94
-
95
- &.dropped {
96
-
97
- > svg {
98
-
99
- opacity: 0.2;
100
-
101
- transform: translate3d(-50%, 100%, 0) scale(0.8);
102
-
103
- }
104
-
105
- }
106
- }