@via-profit/ui-kit 0.1.0-rc.92 → 0.1.0-rc.94

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.
@@ -46,7 +46,6 @@ const Picture = styled_1.default.picture `
46
46
  }
47
47
  }}
48
48
  `;
49
- const generateKey = () => (Math.random() * 10000).toFixed();
50
49
  const AvatarPicture = (props, ref) => {
51
50
  const { src, variant } = props, nativeProps = __rest(props, ["src", "variant"]);
52
51
  const defaultSrc = react_1.default.useMemo(() => {
@@ -67,7 +66,7 @@ const AvatarPicture = (props, ref) => {
67
66
  return (react_1.default.createElement(Picture, Object.assign({}, nativeProps, { "$variant": variant, ref: ref }),
68
67
  src.map((_a) => {
69
68
  var { isDefault } = _a, srcProps = __rest(_a, ["isDefault"]);
70
- return (react_1.default.createElement("source", Object.assign({ key: generateKey() }, srcProps)));
69
+ return (react_1.default.createElement("source", Object.assign({ key: `${srcProps.srcSet}:${srcProps.type}` }, srcProps)));
71
70
  }),
72
71
  react_1.default.createElement("img", { src: (defaultSrc === null || defaultSrc === void 0 ? void 0 : defaultSrc.srcSet) || '' })));
73
72
  };
@@ -17,8 +17,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  const react_1 = __importDefault(require("react"));
18
18
  const styled_1 = __importDefault(require("@emotion/styled"));
19
19
  const react_2 = require("@emotion/react");
20
- const StyledDrawerBottomInner = styled_1.default.div `
20
+ const ModalInner_1 = __importDefault(require("../BaseModal/ModalInner"));
21
+ const StyledDrawerBottomInner = (0, styled_1.default)(ModalInner_1.default) `
21
22
  position: fixed;
23
+ margin: 0;
22
24
  left: 0;
23
25
  right: 0;
24
26
  bottom: -100%;
@@ -33,7 +35,7 @@ const StyledDrawerBottomInner = styled_1.default.div `
33
35
  transition:
34
36
  opacity 120ms ease-out,
35
37
  bottom 600ms ease-out;
36
- ${({ $isOpen }) => $isOpen &&
38
+ ${({ isOpen }) => isOpen &&
37
39
  (0, react_2.css) `
38
40
  opacity: 1;
39
41
  bottom: 0;
@@ -42,8 +44,9 @@ const StyledDrawerBottomInner = styled_1.default.div `
42
44
  bottom 240ms ease-out;
43
45
  `}
44
46
  `;
45
- const StyledDrawerTopInner = styled_1.default.div `
47
+ const StyledDrawerTopInner = (0, styled_1.default)(ModalInner_1.default) `
46
48
  position: fixed;
49
+ margin: 0;
47
50
  left: 0;
48
51
  right: 0;
49
52
  top: -100%;
@@ -58,7 +61,7 @@ const StyledDrawerTopInner = styled_1.default.div `
58
61
  transition:
59
62
  top 600ms ease-out,
60
63
  opacity 120ms ease-out;
61
- ${({ $isOpen }) => $isOpen &&
64
+ ${({ isOpen }) => isOpen &&
62
65
  (0, react_2.css) `
63
66
  opacity: 1;
64
67
  top: 0;
@@ -67,8 +70,9 @@ const StyledDrawerTopInner = styled_1.default.div `
67
70
  opacity 100ms ease-out;
68
71
  `}
69
72
  `;
70
- const StyledDrawerRightInner = styled_1.default.div `
73
+ const StyledDrawerRightInner = (0, styled_1.default)(ModalInner_1.default) `
71
74
  position: fixed;
75
+ margin: 0;
72
76
  right: -100%;
73
77
  top: 0;
74
78
  bottom: 0;
@@ -83,7 +87,7 @@ const StyledDrawerRightInner = styled_1.default.div `
83
87
  transition:
84
88
  right 600ms ease-out,
85
89
  opacity 120ms ease-out;
86
- ${({ $isOpen }) => $isOpen &&
90
+ ${({ isOpen }) => isOpen &&
87
91
  (0, react_2.css) `
88
92
  opacity: 1;
89
93
  right: 0;
@@ -92,8 +96,9 @@ const StyledDrawerRightInner = styled_1.default.div `
92
96
  opacity 100ms ease-out;
93
97
  `}
94
98
  `;
95
- const StyledDrawerLeftInner = styled_1.default.div `
99
+ const StyledDrawerLeftInner = (0, styled_1.default)(ModalInner_1.default) `
96
100
  position: fixed;
101
+ margin: 0;
97
102
  left: -100%;
98
103
  top: 0;
99
104
  bottom: 0;
@@ -108,7 +113,7 @@ const StyledDrawerLeftInner = styled_1.default.div `
108
113
  transition:
109
114
  left 600ms ease-out,
110
115
  opacity 120ms ease-out;
111
- ${({ $isOpen }) => $isOpen &&
116
+ ${({ isOpen }) => isOpen &&
112
117
  (0, react_2.css) `
113
118
  opacity: 1;
114
119
  left: 0;
@@ -132,6 +137,6 @@ const DrawerInner = (props, ref) => {
132
137
  return StyledDrawerBottomInner;
133
138
  }
134
139
  }, [anchor]);
135
- return (react_1.default.createElement(Element, Object.assign({ "$isOpen": isOpen, id: `${dialogID}-description` }, nativeProps, { ref: ref }), children));
140
+ return (react_1.default.createElement(Element, Object.assign({ isOpen: isOpen, id: `${dialogID}-description`, onRequestClose: onRequestClose }, nativeProps, { ref: ref }), children));
136
141
  };
137
142
  exports.default = react_1.default.forwardRef(DrawerInner);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@via-profit/ui-kit",
3
- "version": "0.1.0-rc.92",
3
+ "version": "0.1.0-rc.94",
4
4
  "description": "UI Kit",
5
5
  "repository": {
6
6
  "type": "git",