@decisiv/ui-components 2.0.1-alpha.193 → 2.0.1-alpha.194
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/lib/components/Modal/ResponsiveModalWrapper.d.ts +2 -1
- package/lib/components/Modal/ResponsiveModalWrapper.d.ts.map +1 -1
- package/lib/components/Modal/ResponsiveModalWrapper.js +3 -0
- package/lib/components/Modal/components.d.ts +2 -0
- package/lib/components/Modal/components.d.ts.map +1 -1
- package/lib/components/Modal/components.js +2 -2
- package/lib/components/Modal/index.d.ts.map +1 -1
- package/lib/components/Modal/index.js +8 -3
- package/lib/components/Wizard/styles.d.ts +1 -0
- package/lib/components/Wizard/styles.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -4,9 +4,10 @@ import { ModalProps } from './types';
|
|
|
4
4
|
import { WizardProps } from '../Wizard';
|
|
5
5
|
declare type Props = Pick<ModalProps, 'id' | 'onClose' | 'zIndex'> & {
|
|
6
6
|
size?: WizardProps['size'];
|
|
7
|
+
hasFooter?: boolean;
|
|
7
8
|
breakpoint: keyof typeof sizes | undefined;
|
|
8
9
|
observedElementRef: RefObject<HTMLDivElement>;
|
|
9
10
|
};
|
|
10
|
-
declare const ResponsiveModalWrapper: ({ children, breakpoint, id, size, onClose, zIndex, observedElementRef, }: React.PropsWithChildren<Props>) => JSX.Element;
|
|
11
|
+
declare const ResponsiveModalWrapper: ({ children, breakpoint, hasFooter, id, size, onClose, zIndex, observedElementRef, }: React.PropsWithChildren<Props>) => JSX.Element;
|
|
11
12
|
export default ResponsiveModalWrapper;
|
|
12
13
|
//# sourceMappingURL=ResponsiveModalWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsiveModalWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ResponsiveModalWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAkC,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,aAAK,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAC,GAAG;IAC3D,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,UAAU,EAAE,MAAM,OAAO,KAAK,GAAG,SAAS,CAAC;IAC3C,kBAAkB,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CAC/C,CAAC;AAEF,QAAA,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"ResponsiveModalWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ResponsiveModalWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAkC,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,aAAK,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAC,GAAG;IAC3D,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,OAAO,KAAK,GAAG,SAAS,CAAC;IAC3C,kBAAkB,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CAC/C,CAAC;AAEF,QAAA,MAAM,sBAAsB,sIA4D3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -28,6 +28,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
28
28
|
var ResponsiveModalWrapper = function ResponsiveModalWrapper(_ref) {
|
|
29
29
|
var children = _ref.children,
|
|
30
30
|
breakpoint = _ref.breakpoint,
|
|
31
|
+
_ref$hasFooter = _ref.hasFooter,
|
|
32
|
+
hasFooter = _ref$hasFooter === void 0 ? true : _ref$hasFooter,
|
|
31
33
|
id = _ref.id,
|
|
32
34
|
_ref$size = _ref.size,
|
|
33
35
|
size = _ref$size === void 0 ? 'normal' : _ref$size,
|
|
@@ -63,6 +65,7 @@ var ResponsiveModalWrapper = function ResponsiveModalWrapper(_ref) {
|
|
|
63
65
|
ref: observedElementRef,
|
|
64
66
|
zIndex: zIndex
|
|
65
67
|
}, _react.default.createElement(_components.Body, {
|
|
68
|
+
hasFooter: hasFooter,
|
|
66
69
|
widthSize: size,
|
|
67
70
|
"aria-describedby": modalContentId,
|
|
68
71
|
"aria-labelledby": modalHeaderId,
|
|
@@ -4,10 +4,12 @@ export declare const Overlay: import("styled-components").StyledComponent<"div",
|
|
|
4
4
|
}, never>;
|
|
5
5
|
export declare const Body: import("styled-components").StyledComponent<"div", any, {
|
|
6
6
|
size?: "XS" | "SM" | "MD" | "LG" | "XL" | undefined;
|
|
7
|
+
hasFooter: boolean;
|
|
7
8
|
widthSize: "normal" | "extraLarge" | undefined;
|
|
8
9
|
}, never>;
|
|
9
10
|
export declare const ScrollYBox: import("styled-components").StyledComponent<"div", any, {
|
|
10
11
|
size?: "XS" | "SM" | "MD" | "LG" | "XL" | undefined;
|
|
12
|
+
hasFooter?: boolean | undefined;
|
|
11
13
|
}, never>;
|
|
12
14
|
export declare const Header: import("styled-components").StyledComponent<"div", any, Partial<{
|
|
13
15
|
readonly alignContent?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/components.tsx"],"names":[],"mappings":";AAaA,eAAO,MAAM,OAAO;;SASnB,CAAC;AAEF,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/components.tsx"],"names":[],"mappings":";AAaA,eAAO,MAAM,OAAO;;SASnB,CAAC;AAEF,eAAO,MAAM,IAAI;;;;SAgDhB,CAAC;AAEF,eAAO,MAAM,UAAU;;;SA4BtB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAoD,CAAC;AAExE,eAAO,MAAM,oBAAoB,oEAIhC,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAKnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAoBlB,CAAC;AAEF,eAAO,MAAM,aAAa,sGAkBzB,CAAC"}
|
|
@@ -35,14 +35,14 @@ exports.Overlay = Overlay;
|
|
|
35
35
|
var Body = _styledComponents.default.div.withConfig({
|
|
36
36
|
displayName: "components__Body",
|
|
37
37
|
componentId: "zcog99-1"
|
|
38
|
-
})(["background:", ";border-radius:2px;box-shadow:0 1px 4px ", ";margin:40px auto;max-height:calc(100% - 80px);max-width:650px;overflow:hidden;padding-bottom:75px;position:relative;width:100%;", ";", ""], (0, _toColorString.default)(_designTokens.color.base.snowWhite), (0, _toColorString.default)(_designTokens.color.shadow.light.default), (0, _styleModifiers.when)('size', _breakpointObserver.sizes.XS, (0, _styledComponents.css)(["border-radius:0;bottom:0;left:0;margin:0;max-height:100%;overflow:hidden;position:fixed;right:0;top:0;padding-bottom:0;"])), (0, _styleModifiers.when)('widthSize', 'extraLarge', (0, _styledComponents.css)(["max-width:", ";"], (0, _rem.default)(_designTokens.spacing.base * 90))));
|
|
38
|
+
})(["background:", ";border-radius:2px;box-shadow:0 1px 4px ", ";margin:40px auto;max-height:calc(100% - 80px);max-width:650px;overflow:hidden;padding-bottom:75px;position:relative;width:100%;", ";", ";", ""], (0, _toColorString.default)(_designTokens.color.base.snowWhite), (0, _toColorString.default)(_designTokens.color.shadow.light.default), (0, _styleModifiers.when)('hasFooter', false, (0, _styledComponents.css)(["padding-bottom:0;"])), (0, _styleModifiers.when)('size', _breakpointObserver.sizes.XS, (0, _styledComponents.css)(["border-radius:0;bottom:0;left:0;margin:0;max-height:100%;overflow:hidden;position:fixed;right:0;top:0;padding-bottom:0;"])), (0, _styleModifiers.when)('widthSize', 'extraLarge', (0, _styledComponents.css)(["max-width:", ";"], (0, _rem.default)(_designTokens.spacing.base * 90))));
|
|
39
39
|
|
|
40
40
|
exports.Body = Body;
|
|
41
41
|
|
|
42
42
|
var ScrollYBox = _styledComponents.default.div.withConfig({
|
|
43
43
|
displayName: "components__ScrollYBox",
|
|
44
44
|
componentId: "zcog99-2"
|
|
45
|
-
})(["width:100%;overflow-y:auto;position:relative;height:100%;max-height:calc(100vh - 150px);", ";"], (0, _styleModifiers.when)('size', _breakpointObserver.sizes.XS, (0, _styledComponents.css)(["max-height:calc(100vh - 70px);"])));
|
|
45
|
+
})(["width:100%;overflow-y:auto;position:relative;height:100%;max-height:calc(100vh - 150px);", ";", ";"], (0, _styleModifiers.when)('hasFooter', false, (0, _styledComponents.css)(["max-height:calc(100vh - 75px);"])), (0, _styleModifiers.when)('size', _breakpointObserver.sizes.XS, (0, _styledComponents.css)(["max-height:calc(100vh - 70px);"])));
|
|
46
46
|
|
|
47
47
|
exports.ScrollYBox = ScrollYBox;
|
|
48
48
|
var Header = (0, _styledComponents.default)(_Flex.default).attrs({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":";AAgCA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA+HrC,iBAAS,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,UAAU,eAQxE;kBARQ,YAAY;;;;;;;;AAwBrB,eAAe,YAAY,CAAC"}
|
|
@@ -17,6 +17,8 @@ var _Times = _interopRequireDefault(require("@decisiv/iconix/lib/components/Time
|
|
|
17
17
|
|
|
18
18
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
19
19
|
|
|
20
|
+
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
21
|
+
|
|
20
22
|
var _omit = _interopRequireDefault(require("lodash/omit"));
|
|
21
23
|
|
|
22
24
|
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
@@ -115,14 +117,17 @@ function Modal(_ref) {
|
|
|
115
117
|
var modalHeaderId = "modal-header-".concat(uuid);
|
|
116
118
|
var modalContentId = "modal-content-".concat(uuid);
|
|
117
119
|
var modalFooterId = "modal-footer-".concat(uuid);
|
|
120
|
+
var hasFooter = !(0, _isEmpty.default)(actions);
|
|
118
121
|
return _react.default.createElement(_ResponsiveModalWrapper.default, {
|
|
119
122
|
id: id,
|
|
120
123
|
zIndex: zIndex,
|
|
121
124
|
onClose: onClose,
|
|
122
125
|
breakpoint: breakpoint,
|
|
126
|
+
hasFooter: hasFooter,
|
|
123
127
|
observedElementRef: observedElementRef
|
|
124
128
|
}, _react.default.createElement(_components.ScrollYBox, {
|
|
125
|
-
size: breakpoint
|
|
129
|
+
size: breakpoint,
|
|
130
|
+
hasFooter: hasFooter
|
|
126
131
|
}, _react.default.createElement(_components.Header, {
|
|
127
132
|
id: modalHeaderId,
|
|
128
133
|
paddingTop: (_ref2 = {}, _defineProperty(_ref2, _breakpointObserver.sizes.LG, 3), _defineProperty(_ref2, _breakpointObserver.sizes.XS, 2), _ref2),
|
|
@@ -146,13 +151,13 @@ function Modal(_ref) {
|
|
|
146
151
|
paddingBottom: (_ref4 = {}, _defineProperty(_ref4, _breakpointObserver.sizes.LG, 3), _defineProperty(_ref4, _breakpointObserver.sizes.XS, 2), _ref4),
|
|
147
152
|
paddingX: (_ref5 = {}, _defineProperty(_ref5, _breakpointObserver.sizes.LG, 3), _defineProperty(_ref5, _breakpointObserver.sizes.XS, 2), _ref5),
|
|
148
153
|
size: breakpoint
|
|
149
|
-
}, children)),
|
|
154
|
+
}, children)), hasFooter && _react.default.createElement(_components.Footer, {
|
|
150
155
|
hasIcon: !!IconComponent,
|
|
151
156
|
id: modalFooterId,
|
|
152
157
|
paddingX: (_ref6 = {}, _defineProperty(_ref6, _breakpointObserver.sizes.LG, 3), _defineProperty(_ref6, _breakpointObserver.sizes.XS, 2), _ref6),
|
|
153
158
|
paddingY: (_ref7 = {}, _defineProperty(_ref7, _breakpointObserver.sizes.LG, 2), _defineProperty(_ref7, _breakpointObserver.sizes.XS, 1.5), _ref7),
|
|
154
159
|
size: breakpoint
|
|
155
|
-
}, actions.map(function (action, index) {
|
|
160
|
+
}, actions && actions.map(function (action, index) {
|
|
156
161
|
return _react.default.createElement(_components.ActionWrapper, {
|
|
157
162
|
key: action.text,
|
|
158
163
|
marginRight: 0.5,
|
|
@@ -594,6 +594,7 @@ export declare const StepContainer: import("styled-components").StyledComponent<
|
|
|
594
594
|
}, "flexDirection" | "flex" | "padding">;
|
|
595
595
|
export declare const ScrollYBox: import("styled-components").StyledComponent<"div", any, {
|
|
596
596
|
size?: "XS" | "SM" | "MD" | "LG" | "XL" | undefined;
|
|
597
|
+
hasFooter?: boolean | undefined;
|
|
597
598
|
}, never>;
|
|
598
599
|
export declare const Footer: import("styled-components").StyledComponent<"div", any, Partial<{
|
|
599
600
|
readonly alignContent?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Wizard/styles.ts"],"names":[],"mappings":";AAkBA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAQ3B,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAYlB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAuBlB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BA0BlC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decisiv/ui-components",
|
|
3
|
-
"version": "2.0.1-alpha.
|
|
3
|
+
"version": "2.0.1-alpha.194+085deec",
|
|
4
4
|
"description": "Decisiv's design system React components",
|
|
5
5
|
"author": "Decisiv UI Development Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
73
|
"private": false,
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "085deecc96e864d01b06301914036b4208c5ddd9"
|
|
75
75
|
}
|