@telefonica/mistica 12.1.0 → 12.3.0
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/README.md +2 -2
- package/dist/button-group.d.ts +2 -1
- package/dist/button-group.js +35 -4
- package/dist/button-group.js.flow +2 -1
- package/dist/button-layout.d.ts +2 -1
- package/dist/button-layout.js +22 -4
- package/dist/button-layout.js.flow +2 -1
- package/dist/button.js +110 -32
- package/dist/carousel.js +36 -29
- package/dist/container-type-context.d.ts +5 -0
- package/dist/container-type-context.js +49 -0
- package/dist/container-type-context.js.flow +7 -0
- package/dist/dialog.d.ts +21 -4
- package/dist/dialog.js +51 -26
- package/dist/dialog.js.flow +17 -4
- package/dist/generated/mistica-icons/icon-gift-light.js +1 -1
- package/dist/generated/mistica-icons/icon-hand-snap-filled.js +1 -1
- package/dist/generated/mistica-icons/icon-intranet-light.js +1 -1
- package/dist/generated/mistica-icons/icon-support-agent-premium-regular.js +1 -1
- package/dist/generated/mistica-icons/icon-support-agent-regular.js +1 -1
- package/dist/generated/mistica-icons/icon-tag-discount-euro-regular.js +1 -1
- package/dist/generated/mistica-icons/icon-tips-and-tricks-regular.js +2 -2
- package/dist/generated/mistica-icons/icon-world-device-filled.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-world-device-filled.js +109 -0
- package/dist/generated/mistica-icons/icon-world-device-filled.js.flow +6 -0
- package/dist/generated/mistica-icons/icon-world-device-light.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-world-device-light.js +115 -0
- package/dist/generated/mistica-icons/icon-world-device-light.js.flow +6 -0
- package/dist/generated/mistica-icons/icon-world-device-regular.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-world-device-regular.js +109 -0
- package/dist/generated/mistica-icons/icon-world-device-regular.js.flow +6 -0
- package/dist/grid-layout.d.ts +16 -0
- package/dist/grid-layout.js +173 -68
- package/dist/grid-layout.js.flow +33 -1
- package/dist/header.d.ts +3 -1
- package/dist/header.js +4 -2
- package/dist/header.js.flow +7 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js.flow +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +58 -0
- package/dist/index.js.flow +11 -1
- package/dist/navigation-bar.js +121 -96
- package/dist/navigation-breadcrumbs.d.ts +7 -0
- package/dist/navigation-breadcrumbs.js +108 -29
- package/dist/navigation-breadcrumbs.js.flow +3 -0
- package/dist/overscroll-color-context.d.ts +1 -1
- package/dist/overscroll-color-context.js +12 -14
- package/dist/overscroll-color-context.js.flow +1 -1
- package/dist/package-version.js +1 -1
- package/dist/responsive-layout.js +13 -8
- package/dist/screen-size-context-provider.js +17 -5
- package/dist/screen-size-context.d.ts +1 -0
- package/dist/screen-size-context.js +2 -1
- package/dist/screen-size-context.js.flow +1 -0
- package/dist/skeleton-base.d.ts +9 -0
- package/dist/skeleton-base.js +75 -0
- package/dist/skeleton-base.js.flow +11 -0
- package/dist/skeletons.d.ts +21 -0
- package/dist/skeletons.js +232 -0
- package/dist/skeletons.js.flow +29 -0
- package/dist/skins/blau.js +1 -1
- package/dist/skins/movistar.js +1 -1
- package/dist/skins/o2-classic.js +1 -1
- package/dist/skins/o2.js +1 -1
- package/dist/skins/telefonica.js +2 -2
- package/dist/skins/utils.d.ts +2 -0
- package/dist/skins/utils.js +34 -1
- package/dist/skins/utils.js.flow +2 -0
- package/dist/skins/vivo.js +1 -1
- package/dist/snackbar.js +5 -4
- package/dist/tabs.d.ts +2 -1
- package/dist/tabs.js +22 -4
- package/dist/tabs.js.flow +2 -1
- package/dist/utils/types.d.ts +1 -0
- package/dist/utils/types.js.flow +6 -0
- package/dist-es/button-group.js +34 -4
- package/dist-es/button-layout.js +21 -4
- package/dist-es/button.js +110 -32
- package/dist-es/carousel.js +36 -29
- package/dist-es/container-type-context.js +21 -0
- package/dist-es/dialog.js +51 -25
- package/dist-es/generated/mistica-icons/icon-gift-light.js +1 -1
- package/dist-es/generated/mistica-icons/icon-hand-snap-filled.js +1 -1
- package/dist-es/generated/mistica-icons/icon-intranet-light.js +1 -1
- package/dist-es/generated/mistica-icons/icon-support-agent-premium-regular.js +1 -1
- package/dist-es/generated/mistica-icons/icon-support-agent-regular.js +1 -1
- package/dist-es/generated/mistica-icons/icon-tag-discount-euro-regular.js +1 -1
- package/dist-es/generated/mistica-icons/icon-tips-and-tricks-regular.js +2 -2
- package/dist-es/generated/mistica-icons/icon-world-device-filled.js +85 -0
- package/dist-es/generated/mistica-icons/icon-world-device-light.js +91 -0
- package/dist-es/generated/mistica-icons/icon-world-device-regular.js +85 -0
- package/dist-es/grid-layout.js +167 -68
- package/dist-es/header.js +4 -2
- package/dist-es/index.js +5 -1
- package/dist-es/navigation-bar.js +121 -96
- package/dist-es/navigation-breadcrumbs.js +106 -30
- package/dist-es/overscroll-color-context.js +12 -14
- package/dist-es/package-version.js +1 -1
- package/dist-es/responsive-layout.js +13 -8
- package/dist-es/screen-size-context-provider.js +17 -5
- package/dist-es/screen-size-context.js +2 -1
- package/dist-es/skeleton-base.js +43 -0
- package/dist-es/skeletons.js +196 -0
- package/dist-es/skins/blau.js +1 -1
- package/dist-es/skins/movistar.js +1 -1
- package/dist-es/skins/o2-classic.js +1 -1
- package/dist-es/skins/o2.js +1 -1
- package/dist-es/skins/telefonica.js +2 -2
- package/dist-es/skins/utils.js +12 -0
- package/dist-es/skins/vivo.js +1 -1
- package/dist-es/snackbar.js +6 -5
- package/dist-es/tabs.js +21 -4
- package/package.json +2 -2
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _hooks = require("../../hooks");
|
|
9
|
+
var _themeVariantContext = require("../../theme-variant-context");
|
|
10
|
+
function _interopRequireWildcard(obj) {
|
|
11
|
+
if (obj && obj.__esModule) {
|
|
12
|
+
return obj;
|
|
13
|
+
} else {
|
|
14
|
+
var newObj = {};
|
|
15
|
+
if (obj != null) {
|
|
16
|
+
for(var key in obj){
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
18
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
19
|
+
if (desc.get || desc.set) {
|
|
20
|
+
Object.defineProperty(newObj, key, desc);
|
|
21
|
+
} else {
|
|
22
|
+
newObj[key] = obj[key];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
newObj.default = obj;
|
|
28
|
+
return newObj;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function _defineProperty(obj, key, value) {
|
|
32
|
+
if (key in obj) {
|
|
33
|
+
Object.defineProperty(obj, key, {
|
|
34
|
+
value: value,
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true
|
|
38
|
+
});
|
|
39
|
+
} else {
|
|
40
|
+
obj[key] = value;
|
|
41
|
+
}
|
|
42
|
+
return obj;
|
|
43
|
+
}
|
|
44
|
+
function _objectSpread(target) {
|
|
45
|
+
var _arguments = arguments, _loop = function(i) {
|
|
46
|
+
var source = _arguments[i] != null ? _arguments[i] : {};
|
|
47
|
+
var ownKeys = Object.keys(source);
|
|
48
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
49
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
50
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
ownKeys.forEach(function(key) {
|
|
54
|
+
_defineProperty(target, key, source[key]);
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
for(var i = 1; i < arguments.length; i++)_loop(i);
|
|
58
|
+
return target;
|
|
59
|
+
}
|
|
60
|
+
function _objectWithoutProperties(source, excluded) {
|
|
61
|
+
if (source == null) return {};
|
|
62
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
63
|
+
var key, i;
|
|
64
|
+
if (Object.getOwnPropertySymbols) {
|
|
65
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
66
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
67
|
+
key = sourceSymbolKeys[i];
|
|
68
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
69
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
70
|
+
target[key] = source[key];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return target;
|
|
74
|
+
}
|
|
75
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
76
|
+
if (source == null) return {};
|
|
77
|
+
var target = {};
|
|
78
|
+
var sourceKeys = Object.keys(source);
|
|
79
|
+
var key, i;
|
|
80
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
81
|
+
key = sourceKeys[i];
|
|
82
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
83
|
+
target[key] = source[key];
|
|
84
|
+
}
|
|
85
|
+
return target;
|
|
86
|
+
}
|
|
87
|
+
var IconWorldDeviceRegular = function IconWorldDeviceRegular(_param) {
|
|
88
|
+
var color = _param.color, _size = _param.size, size = _size === void 0 ? 24 : _size, children = _param.children, rest = _objectWithoutProperties(_param, [
|
|
89
|
+
"color",
|
|
90
|
+
"size",
|
|
91
|
+
"children"
|
|
92
|
+
]);
|
|
93
|
+
var colors = (0, _hooks).useTheme().colors;
|
|
94
|
+
var isInverse = (0, _themeVariantContext).useIsInverseVariant();
|
|
95
|
+
var fillColor = color !== null && color !== void 0 ? color : isInverse ? colors.inverse : colors.neutralHigh;
|
|
96
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx("svg", _objectSpread({
|
|
97
|
+
width: size,
|
|
98
|
+
height: size,
|
|
99
|
+
viewBox: "0 0 24 24",
|
|
100
|
+
role: "presentation"
|
|
101
|
+
}, rest, {
|
|
102
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("path", {
|
|
103
|
+
d: "M20.212 2h-3.214c-.786 0-1.429.643-1.429 1.429V5.25a8.8 8.8 0 00-4.285-1.107c-4.929 0-8.929 4-8.929 8.928 0 4.929 4 8.929 8.929 8.929 4.928 0 8.928-4 8.928-8.929 0-.5-.036-.964-.107-1.428h.107c.786 0 1.429-.643 1.429-1.429V3.43c0-.786-.643-1.429-1.429-1.429zm.357 3.036v3.571h-3.928V5.036h3.928zM16.998 3.07h3.214c.179 0 .357.179.357.358v.535h-3.928V3.43c0-.179.178-.358.357-.358zM8.962 5.93c.393.892.607 1.642.464 2 0 0-.5 1.464-2.178 1.357-1.357-.072-1.572.464-1.607.785-.036.572.464.929 2.143 1.465.035 0 .678.178 1.071.928a2.183 2.183 0 002.786.929.304.304 0 01.25 0c.071.036.143.143.143.214 0 .072.214 1.607-1.036 2.143-1 .464-1.179 1.143-1.322 1.679-.071.321-.142.571-.392.75-.179.142-.5.071-.608.035-.785-.25-1.75-1.214-2.035-2.5a5.294 5.294 0 01-.107-1.107c0-.428-.322-2.286-1.25-3-.393-.286-.822-.357-1.25-.214l-.108.036a7.674 7.674 0 015.036-5.5zm2.322 14.642a7.5 7.5 0 01-7.5-7.5c0-.178 0-.321.035-.5.143 0 .286-.035.465-.107l.107-.035c.107-.036.178-.036.285.035.5.393.822 1.822.822 2.143 0 .5.036.929.143 1.357.393 1.786 1.714 2.965 2.75 3.286.25.071.464.107.678.107.393 0 .715-.107.965-.357.464-.429.607-.893.714-1.286.107-.464.178-.714.714-.964 1.536-.714 1.75-2.393 1.643-3.286-.071-.428-.321-.821-.679-1a1.326 1.326 0 00-1.214-.035 1.046 1.046 0 01-1.393-.465c-.571-1.071-1.535-1.393-1.714-1.428-.179-.036-.321-.107-.429-.143 1.679-.107 2.572-1.393 2.822-2.107.25-.715-.072-1.75-.429-2.607a7.08 7.08 0 011.25-.108c1.607 0 3.072.5 4.286 1.358v2.464c-.286-.036-.571 0-.857.107-.857.429-1.429 1.393-1.5 2.429-.072 1.071.428 2.035 1.357 2.642 1.107.715 1.071 1.215 1.036 2-.036.643-.107 1.393.464 2.25-1.357 1.108-3 1.75-4.821 1.75zm7.5-7.5c0 1.929-.75 3.679-1.929 5-.25-.5-.214-.928-.179-1.428.072-.893.143-1.893-1.535-2.964-.822-.536-.893-1.286-.857-1.679.035-.679.392-1.286.892-1.536.072-.035.25-.035.393 0 .143.643.715 1.143 1.393 1.143h1.643c.143.5.179.964.179 1.464zm1.428-2.5h-3.214a.384.384 0 01-.357-.357V9.68h3.928v.535a.384.384 0 01-.357.357z",
|
|
104
|
+
fill: fillColor
|
|
105
|
+
})
|
|
106
|
+
}));
|
|
107
|
+
};
|
|
108
|
+
var _default = IconWorldDeviceRegular;
|
|
109
|
+
exports.default = _default;
|
package/dist/grid-layout.d.ts
CHANGED
|
@@ -1,41 +1,57 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { DataAttributes } from './utils/types';
|
|
3
|
+
declare type VerticalSpace = 0 | 2 | 4 | 8 | 12 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80;
|
|
2
4
|
declare type PropsChildren = {
|
|
3
5
|
template?: undefined;
|
|
4
6
|
children: React.ReactNode;
|
|
7
|
+
verticalSpace?: VerticalSpace;
|
|
8
|
+
dataAttributes?: DataAttributes;
|
|
5
9
|
};
|
|
6
10
|
declare type PropsTemplate6_6 = {
|
|
7
11
|
template: '6+6';
|
|
8
12
|
left: React.ReactNode;
|
|
9
13
|
right: React.ReactNode;
|
|
10
14
|
children?: undefined;
|
|
15
|
+
verticalSpace?: VerticalSpace;
|
|
16
|
+
dataAttributes?: DataAttributes;
|
|
11
17
|
};
|
|
12
18
|
declare type PropsTemplate8_4 = {
|
|
13
19
|
template: '8+4';
|
|
14
20
|
left: React.ReactNode;
|
|
15
21
|
right: React.ReactNode;
|
|
16
22
|
children?: undefined;
|
|
23
|
+
verticalSpace?: VerticalSpace;
|
|
24
|
+
dataAttributes?: DataAttributes;
|
|
17
25
|
};
|
|
18
26
|
declare type PropsTemplate4_6 = {
|
|
19
27
|
template: '4+6';
|
|
20
28
|
left: React.ReactNode;
|
|
21
29
|
right: React.ReactNode;
|
|
22
30
|
children?: undefined;
|
|
31
|
+
verticalSpace?: VerticalSpace;
|
|
32
|
+
dataAttributes?: DataAttributes;
|
|
23
33
|
};
|
|
24
34
|
declare type PropsTemplate5_4 = {
|
|
25
35
|
template: '5+4';
|
|
26
36
|
left: React.ReactNode;
|
|
27
37
|
right: React.ReactNode;
|
|
28
38
|
children?: undefined;
|
|
39
|
+
verticalSpace?: VerticalSpace;
|
|
40
|
+
dataAttributes?: DataAttributes;
|
|
29
41
|
};
|
|
30
42
|
declare type PropsTemplate3_9 = {
|
|
31
43
|
template: '3+9';
|
|
32
44
|
left: React.ReactNode;
|
|
33
45
|
right: React.ReactNode;
|
|
34
46
|
children?: undefined;
|
|
47
|
+
verticalSpace?: VerticalSpace;
|
|
48
|
+
dataAttributes?: DataAttributes;
|
|
35
49
|
};
|
|
36
50
|
declare type PropsTemplate10 = {
|
|
37
51
|
template: '10';
|
|
38
52
|
children: React.ReactNode;
|
|
53
|
+
verticalSpace?: VerticalSpace;
|
|
54
|
+
dataAttributes?: DataAttributes;
|
|
39
55
|
};
|
|
40
56
|
declare type Props = PropsChildren | PropsTemplate6_6 | PropsTemplate8_4 | PropsTemplate4_6 | PropsTemplate5_4 | PropsTemplate3_9 | PropsTemplate10;
|
|
41
57
|
declare const GridLayout: React.FC<Props>;
|
package/dist/grid-layout.js
CHANGED
|
@@ -5,7 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
exports.default = void 0;
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _hooks = require("./hooks");
|
|
9
|
+
var _containerTypeContext = _interopRequireDefault(require("./container-type-context"));
|
|
8
10
|
var _jss = require("./jss");
|
|
11
|
+
var _dom = require("./utils/dom");
|
|
12
|
+
function _interopRequireDefault(obj) {
|
|
13
|
+
return obj && obj.__esModule ? obj : {
|
|
14
|
+
default: obj
|
|
15
|
+
};
|
|
16
|
+
}
|
|
9
17
|
function _interopRequireWildcard(obj) {
|
|
10
18
|
if (obj && obj.__esModule) {
|
|
11
19
|
return obj;
|
|
@@ -40,6 +48,22 @@ function _defineProperty(obj, key, value) {
|
|
|
40
48
|
}
|
|
41
49
|
return obj;
|
|
42
50
|
}
|
|
51
|
+
function _objectSpread(target) {
|
|
52
|
+
var _arguments = arguments, _loop = function(i) {
|
|
53
|
+
var source = _arguments[i] != null ? _arguments[i] : {};
|
|
54
|
+
var ownKeys = Object.keys(source);
|
|
55
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
56
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
57
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
ownKeys.forEach(function(key) {
|
|
61
|
+
_defineProperty(target, key, source[key]);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
for(var i = 1; i < arguments.length; i++)_loop(i);
|
|
65
|
+
return target;
|
|
66
|
+
}
|
|
43
67
|
var useStyles = (0, _jss).createUseStyles(function(theme) {
|
|
44
68
|
var _obj, _obj1, _obj2, _obj3, _obj4, _obj5, _obj6, _obj7;
|
|
45
69
|
return {
|
|
@@ -51,166 +75,247 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
51
75
|
}), _defineProperty(_obj, theme.mq.desktop, {
|
|
52
76
|
gridTemplateColumns: "repeat(12, 1fr)",
|
|
53
77
|
gridColumnGap: 16
|
|
54
|
-
}), _defineProperty(_obj, theme.mq.
|
|
55
|
-
gridTemplateColumns: "minmax(0, 1fr)",
|
|
56
|
-
gridColumnGap: 16
|
|
57
|
-
}), _defineProperty(_obj, theme.mq.mobile, {
|
|
78
|
+
}), _defineProperty(_obj, theme.mq.tabletOrSmaller, {
|
|
58
79
|
gridTemplateColumns: "minmax(0, 1fr)",
|
|
59
|
-
gridColumnGap: 16
|
|
80
|
+
gridColumnGap: 16,
|
|
81
|
+
gap: function gap(param) {
|
|
82
|
+
var verticalSpace = param.verticalSpace;
|
|
83
|
+
return verticalSpace;
|
|
84
|
+
}
|
|
60
85
|
}), _obj),
|
|
61
86
|
span1: {
|
|
62
|
-
gridColumn: "span 1"
|
|
87
|
+
gridColumn: "span 1",
|
|
88
|
+
gap: function gap(param) {
|
|
89
|
+
var verticalSpace = param.verticalSpace;
|
|
90
|
+
return verticalSpace;
|
|
91
|
+
}
|
|
63
92
|
},
|
|
64
93
|
span3: (_obj1 = {}, _defineProperty(_obj1, theme.mq.desktopOrBigger, {
|
|
65
94
|
gridColumn: "span 3"
|
|
66
95
|
}), _defineProperty(_obj1, theme.mq.tabletOrSmaller, {
|
|
67
|
-
gridColumn: "span 1"
|
|
96
|
+
gridColumn: "span 1",
|
|
97
|
+
gap: function gap(param) {
|
|
98
|
+
var verticalSpace = param.verticalSpace;
|
|
99
|
+
return verticalSpace;
|
|
100
|
+
}
|
|
68
101
|
}), _obj1),
|
|
69
102
|
span4: (_obj2 = {}, _defineProperty(_obj2, theme.mq.desktopOrBigger, {
|
|
70
103
|
gridColumn: "span 4"
|
|
71
104
|
}), _defineProperty(_obj2, theme.mq.tabletOrSmaller, {
|
|
72
|
-
gridColumn: "span 1"
|
|
105
|
+
gridColumn: "span 1",
|
|
106
|
+
gap: function gap(param) {
|
|
107
|
+
var verticalSpace = param.verticalSpace;
|
|
108
|
+
return verticalSpace;
|
|
109
|
+
}
|
|
73
110
|
}), _obj2),
|
|
74
111
|
span5: (_obj3 = {}, _defineProperty(_obj3, theme.mq.desktopOrBigger, {
|
|
75
112
|
gridColumn: "span 5"
|
|
76
113
|
}), _defineProperty(_obj3, theme.mq.tabletOrSmaller, {
|
|
77
|
-
gridColumn: "span 1"
|
|
114
|
+
gridColumn: "span 1",
|
|
115
|
+
gap: function gap(param) {
|
|
116
|
+
var verticalSpace = param.verticalSpace;
|
|
117
|
+
return verticalSpace;
|
|
118
|
+
}
|
|
78
119
|
}), _obj3),
|
|
79
120
|
span6: (_obj4 = {}, _defineProperty(_obj4, theme.mq.desktopOrBigger, {
|
|
80
121
|
gridColumn: "span 6"
|
|
81
122
|
}), _defineProperty(_obj4, theme.mq.tabletOrSmaller, {
|
|
82
|
-
gridColumn: "span 1"
|
|
123
|
+
gridColumn: "span 1",
|
|
124
|
+
gap: function gap(param) {
|
|
125
|
+
var verticalSpace = param.verticalSpace;
|
|
126
|
+
return verticalSpace;
|
|
127
|
+
}
|
|
83
128
|
}), _obj4),
|
|
84
129
|
span8: (_obj5 = {}, _defineProperty(_obj5, theme.mq.desktopOrBigger, {
|
|
85
130
|
gridColumn: "span 8"
|
|
86
131
|
}), _defineProperty(_obj5, theme.mq.tabletOrSmaller, {
|
|
87
|
-
gridColumn: "span 1"
|
|
132
|
+
gridColumn: "span 1",
|
|
133
|
+
gap: function gap(param) {
|
|
134
|
+
var verticalSpace = param.verticalSpace;
|
|
135
|
+
return verticalSpace;
|
|
136
|
+
}
|
|
88
137
|
}), _obj5),
|
|
89
138
|
span9: (_obj6 = {}, _defineProperty(_obj6, theme.mq.desktopOrBigger, {
|
|
90
139
|
gridColumn: "span 9"
|
|
91
140
|
}), _defineProperty(_obj6, theme.mq.tabletOrSmaller, {
|
|
92
|
-
gridColumn: "span 1"
|
|
141
|
+
gridColumn: "span 1",
|
|
142
|
+
gap: function gap(param) {
|
|
143
|
+
var verticalSpace = param.verticalSpace;
|
|
144
|
+
return verticalSpace;
|
|
145
|
+
}
|
|
93
146
|
}), _obj6),
|
|
94
147
|
span10: (_obj7 = {}, _defineProperty(_obj7, theme.mq.desktopOrBigger, {
|
|
95
148
|
gridColumn: "span 10"
|
|
96
149
|
}), _defineProperty(_obj7, theme.mq.tabletOrSmaller, {
|
|
97
|
-
gridColumn: "span 1"
|
|
150
|
+
gridColumn: "span 1",
|
|
151
|
+
gap: function gap(param) {
|
|
152
|
+
var verticalSpace = param.verticalSpace;
|
|
153
|
+
return verticalSpace;
|
|
154
|
+
}
|
|
98
155
|
}), _obj7)
|
|
99
156
|
};
|
|
100
157
|
});
|
|
101
158
|
var GridLayout = function GridLayout(props) {
|
|
102
|
-
var
|
|
159
|
+
var _verticalSpace;
|
|
160
|
+
var classes = useStyles({
|
|
161
|
+
verticalSpace: (_verticalSpace = props.verticalSpace) !== null && _verticalSpace !== void 0 ? _verticalSpace : 0
|
|
162
|
+
});
|
|
163
|
+
var dataAttributes = (0, _dom).getPrefixedDataAttributes(props.dataAttributes);
|
|
164
|
+
var ref = (0, _hooks).useScreenSize(), isMobile = ref.isMobile, isTablet = ref.isTablet;
|
|
165
|
+
var getContainerType = function getContainerType(containerType) {
|
|
166
|
+
return isMobile ? "mobile-column" : isTablet ? "tablet-column" : containerType;
|
|
167
|
+
};
|
|
103
168
|
if (props.template === "6+6") {
|
|
104
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", {
|
|
105
|
-
className: classes.grid
|
|
169
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", _objectSpread({
|
|
170
|
+
className: classes.grid
|
|
171
|
+
}, dataAttributes, {
|
|
106
172
|
children: [
|
|
107
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
108
|
-
|
|
109
|
-
children:
|
|
173
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
174
|
+
value: getContainerType("desktop-medium-column"),
|
|
175
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
176
|
+
className: classes.span6,
|
|
177
|
+
children: props.left
|
|
178
|
+
})
|
|
110
179
|
}),
|
|
111
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
112
|
-
|
|
113
|
-
children:
|
|
180
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
181
|
+
value: getContainerType("desktop-medium-column"),
|
|
182
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
183
|
+
className: classes.span6,
|
|
184
|
+
children: props.right
|
|
185
|
+
})
|
|
114
186
|
})
|
|
115
187
|
]
|
|
116
|
-
});
|
|
188
|
+
}));
|
|
117
189
|
}
|
|
118
190
|
if (props.template === "8+4") {
|
|
119
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", {
|
|
120
|
-
className: classes.grid
|
|
191
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", _objectSpread({
|
|
192
|
+
className: classes.grid
|
|
193
|
+
}, dataAttributes, {
|
|
121
194
|
children: [
|
|
122
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
123
|
-
|
|
124
|
-
children:
|
|
195
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
196
|
+
value: getContainerType("desktop-medium-column"),
|
|
197
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
198
|
+
className: classes.span8,
|
|
199
|
+
children: props.left
|
|
200
|
+
})
|
|
125
201
|
}),
|
|
126
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
127
|
-
|
|
128
|
-
children:
|
|
202
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
203
|
+
value: getContainerType("desktop-small-column"),
|
|
204
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
205
|
+
className: classes.span4,
|
|
206
|
+
children: props.right
|
|
207
|
+
})
|
|
129
208
|
})
|
|
130
209
|
]
|
|
131
|
-
});
|
|
210
|
+
}));
|
|
132
211
|
}
|
|
133
212
|
if (props.template === "4+6") {
|
|
134
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", {
|
|
135
|
-
className: classes.grid
|
|
213
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", _objectSpread({
|
|
214
|
+
className: classes.grid
|
|
215
|
+
}, dataAttributes, {
|
|
136
216
|
children: [
|
|
137
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
138
|
-
|
|
139
|
-
children:
|
|
217
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
218
|
+
value: getContainerType("desktop-small-column"),
|
|
219
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
220
|
+
className: classes.span4,
|
|
221
|
+
children: props.left
|
|
222
|
+
})
|
|
140
223
|
}),
|
|
141
224
|
/*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
142
225
|
className: classes.span1
|
|
143
226
|
}),
|
|
144
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
145
|
-
|
|
146
|
-
children:
|
|
227
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
228
|
+
value: getContainerType("desktop-medium-column"),
|
|
229
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
230
|
+
className: classes.span6,
|
|
231
|
+
children: props.right
|
|
232
|
+
})
|
|
147
233
|
}),
|
|
148
234
|
/*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
149
235
|
className: classes.span1
|
|
150
236
|
})
|
|
151
237
|
]
|
|
152
|
-
});
|
|
238
|
+
}));
|
|
153
239
|
}
|
|
154
240
|
if (props.template === "5+4") {
|
|
155
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", {
|
|
156
|
-
className: classes.grid
|
|
241
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", _objectSpread({
|
|
242
|
+
className: classes.grid
|
|
243
|
+
}, dataAttributes, {
|
|
157
244
|
children: [
|
|
158
245
|
/*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
159
246
|
className: classes.span1
|
|
160
247
|
}),
|
|
161
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
162
|
-
|
|
163
|
-
children:
|
|
248
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
249
|
+
value: getContainerType("desktop-small-column"),
|
|
250
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
251
|
+
className: classes.span5,
|
|
252
|
+
children: props.left
|
|
253
|
+
})
|
|
164
254
|
}),
|
|
165
255
|
/*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
166
256
|
className: classes.span1
|
|
167
257
|
}),
|
|
168
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
169
|
-
|
|
170
|
-
children:
|
|
258
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
259
|
+
value: getContainerType("desktop-small-column"),
|
|
260
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
261
|
+
className: classes.span4,
|
|
262
|
+
children: props.right
|
|
263
|
+
})
|
|
171
264
|
}),
|
|
172
265
|
/*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
173
266
|
className: classes.span1
|
|
174
267
|
})
|
|
175
268
|
]
|
|
176
|
-
});
|
|
269
|
+
}));
|
|
177
270
|
}
|
|
178
271
|
if (props.template === "3+9") {
|
|
179
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", {
|
|
180
|
-
className: classes.grid
|
|
272
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", _objectSpread({
|
|
273
|
+
className: classes.grid
|
|
274
|
+
}, dataAttributes, {
|
|
181
275
|
children: [
|
|
182
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
183
|
-
|
|
184
|
-
children:
|
|
276
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
277
|
+
value: getContainerType("desktop-small-column"),
|
|
278
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
279
|
+
className: classes.span3,
|
|
280
|
+
children: props.left
|
|
281
|
+
})
|
|
185
282
|
}),
|
|
186
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
187
|
-
|
|
188
|
-
children:
|
|
283
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
284
|
+
value: getContainerType("desktop-medium-column"),
|
|
285
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
286
|
+
className: classes.span9,
|
|
287
|
+
children: props.right
|
|
288
|
+
})
|
|
189
289
|
})
|
|
190
290
|
]
|
|
191
|
-
});
|
|
291
|
+
}));
|
|
192
292
|
}
|
|
193
293
|
if (props.template === "10") {
|
|
194
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", {
|
|
195
|
-
className: classes.grid
|
|
294
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", _objectSpread({
|
|
295
|
+
className: classes.grid
|
|
296
|
+
}, dataAttributes, {
|
|
196
297
|
children: [
|
|
197
298
|
/*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
198
299
|
className: classes.span1
|
|
199
300
|
}),
|
|
200
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
201
|
-
|
|
202
|
-
children:
|
|
301
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_containerTypeContext.default.Provider, {
|
|
302
|
+
value: getContainerType("desktop-wide-column"),
|
|
303
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
304
|
+
className: classes.span10,
|
|
305
|
+
children: props.children
|
|
306
|
+
})
|
|
203
307
|
}),
|
|
204
308
|
/*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
205
309
|
className: classes.span1
|
|
206
310
|
})
|
|
207
311
|
]
|
|
208
|
-
});
|
|
312
|
+
}));
|
|
209
313
|
}
|
|
210
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
211
|
-
className: classes.grid
|
|
314
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx("div", _objectSpread({
|
|
315
|
+
className: classes.grid
|
|
316
|
+
}, dataAttributes, {
|
|
212
317
|
children: props.children
|
|
213
|
-
});
|
|
318
|
+
}));
|
|
214
319
|
};
|
|
215
320
|
var _default = GridLayout;
|
|
216
321
|
exports.default = _default;
|
package/dist/grid-layout.js.flow
CHANGED
|
@@ -1,35 +1,67 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
4
|
+
import type { DataAttributes } from "./utils/types";
|
|
5
|
+
declare type VerticalSpace =
|
|
6
|
+
| 0
|
|
7
|
+
| 2
|
|
8
|
+
| 4
|
|
9
|
+
| 8
|
|
10
|
+
| 12
|
|
11
|
+
| 16
|
|
12
|
+
| 24
|
|
13
|
+
| 32
|
|
14
|
+
| 40
|
|
15
|
+
| 48
|
|
16
|
+
| 56
|
|
17
|
+
| 64
|
|
18
|
+
| 72
|
|
19
|
+
| 80;
|
|
20
|
+
declare type PropsChildren = {
|
|
21
|
+
children: React.Node,
|
|
22
|
+
verticalSpace?: VerticalSpace,
|
|
23
|
+
dataAttributes?: DataAttributes,
|
|
24
|
+
};
|
|
5
25
|
declare type PropsTemplate6_6 = {
|
|
6
26
|
template: "6+6",
|
|
7
27
|
left: React.Node,
|
|
8
28
|
right: React.Node,
|
|
29
|
+
verticalSpace?: VerticalSpace,
|
|
30
|
+
dataAttributes?: DataAttributes,
|
|
9
31
|
};
|
|
10
32
|
declare type PropsTemplate8_4 = {
|
|
11
33
|
template: "8+4",
|
|
12
34
|
left: React.Node,
|
|
13
35
|
right: React.Node,
|
|
36
|
+
verticalSpace?: VerticalSpace,
|
|
37
|
+
dataAttributes?: DataAttributes,
|
|
14
38
|
};
|
|
15
39
|
declare type PropsTemplate4_6 = {
|
|
16
40
|
template: "4+6",
|
|
17
41
|
left: React.Node,
|
|
18
42
|
right: React.Node,
|
|
43
|
+
verticalSpace?: VerticalSpace,
|
|
44
|
+
dataAttributes?: DataAttributes,
|
|
19
45
|
};
|
|
20
46
|
declare type PropsTemplate5_4 = {
|
|
21
47
|
template: "5+4",
|
|
22
48
|
left: React.Node,
|
|
23
49
|
right: React.Node,
|
|
50
|
+
verticalSpace?: VerticalSpace,
|
|
51
|
+
dataAttributes?: DataAttributes,
|
|
24
52
|
};
|
|
25
53
|
declare type PropsTemplate3_9 = {
|
|
26
54
|
template: "3+9",
|
|
27
55
|
left: React.Node,
|
|
28
56
|
right: React.Node,
|
|
57
|
+
verticalSpace?: VerticalSpace,
|
|
58
|
+
dataAttributes?: DataAttributes,
|
|
29
59
|
};
|
|
30
60
|
declare type PropsTemplate10 = {
|
|
31
61
|
template: "10",
|
|
32
62
|
children: React.Node,
|
|
63
|
+
verticalSpace?: VerticalSpace,
|
|
64
|
+
dataAttributes?: DataAttributes,
|
|
33
65
|
};
|
|
34
66
|
declare type Props =
|
|
35
67
|
| PropsChildren
|
package/dist/header.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import NavigationBreadcrumbs from './navigation-breadcrumbs';
|
|
3
3
|
import { ButtonPrimary, ButtonSecondary } from './button';
|
|
4
|
-
import type { RendersElement, RendersNullableElement } from './utils/types';
|
|
4
|
+
import type { DataAttributes, RendersElement, RendersNullableElement } from './utils/types';
|
|
5
5
|
import type { TextPresetProps } from './text';
|
|
6
6
|
declare type OverridableTextProps = {
|
|
7
7
|
color?: TextPresetProps['color'];
|
|
@@ -20,6 +20,7 @@ declare type HeaderProps = {
|
|
|
20
20
|
secondaryButton?: RendersNullableElement<typeof ButtonSecondary>;
|
|
21
21
|
subtitle?: RichText;
|
|
22
22
|
isErrorAmount?: boolean;
|
|
23
|
+
dataAttributes?: DataAttributes;
|
|
23
24
|
};
|
|
24
25
|
export declare const Header: React.FC<HeaderProps>;
|
|
25
26
|
declare type MainSectionHeaderProps = {
|
|
@@ -35,6 +36,7 @@ declare type HeaderLayoutProps = {
|
|
|
35
36
|
extra?: React.ReactNode;
|
|
36
37
|
sideBySideExtraOnDesktop?: boolean;
|
|
37
38
|
children?: void;
|
|
39
|
+
dataAttributes?: DataAttributes;
|
|
38
40
|
};
|
|
39
41
|
export declare const HeaderLayout: React.FC<HeaderLayoutProps>;
|
|
40
42
|
declare type MainSectionHeaderLayoutProps = {
|
package/dist/header.js
CHANGED
|
@@ -98,7 +98,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
98
98
|
return target;
|
|
99
99
|
}
|
|
100
100
|
var Header = function Header(param) {
|
|
101
|
-
var pretitle = param.pretitle, title = param.title, preamount = param.preamount, amount = param.amount, button = param.button, subtitle = param.subtitle, isErrorAmount = param.isErrorAmount, secondaryButton = param.secondaryButton;
|
|
101
|
+
var pretitle = param.pretitle, title = param.title, preamount = param.preamount, amount = param.amount, button = param.button, subtitle = param.subtitle, isErrorAmount = param.isErrorAmount, secondaryButton = param.secondaryButton, dataAttributes = param.dataAttributes;
|
|
102
102
|
var isTabletOrSmaller = (0, _hooks).useScreenSize().isTabletOrSmaller;
|
|
103
103
|
var theme = (0, _hooks).useTheme();
|
|
104
104
|
var isInverse = (0, _themeVariantContext).useIsInverseVariant();
|
|
@@ -121,6 +121,7 @@ var Header = function Header(param) {
|
|
|
121
121
|
};
|
|
122
122
|
return /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
|
|
123
123
|
space: isTabletOrSmaller ? 24 : 32,
|
|
124
|
+
dataAttributes: dataAttributes,
|
|
124
125
|
children: [
|
|
125
126
|
(title || pretitle) && /*#__PURE__*/ (0, _jsxRuntime).jsx(_box.default, {
|
|
126
127
|
paddingRight: 16,
|
|
@@ -202,13 +203,14 @@ var useHeaderLayoutStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
202
203
|
};
|
|
203
204
|
});
|
|
204
205
|
var HeaderLayout = function HeaderLayout(param) {
|
|
205
|
-
var _isInverse = param.isInverse, isInverse = _isInverse === void 0 ? true : _isInverse, breadcrumbs = param.breadcrumbs, header = param.header, extra = param.extra, _sideBySideExtraOnDesktop = param.sideBySideExtraOnDesktop, sideBySideExtraOnDesktop = _sideBySideExtraOnDesktop === void 0 ? false : _sideBySideExtraOnDesktop;
|
|
206
|
+
var _isInverse = param.isInverse, isInverse = _isInverse === void 0 ? true : _isInverse, breadcrumbs = param.breadcrumbs, header = param.header, extra = param.extra, _sideBySideExtraOnDesktop = param.sideBySideExtraOnDesktop, sideBySideExtraOnDesktop = _sideBySideExtraOnDesktop === void 0 ? false : _sideBySideExtraOnDesktop, dataAttributes = param.dataAttributes;
|
|
206
207
|
var classes = useHeaderLayoutStyles({
|
|
207
208
|
isInverse: isInverse
|
|
208
209
|
});
|
|
209
210
|
var isTabletOrSmaller = (0, _hooks).useScreenSize().isTabletOrSmaller;
|
|
210
211
|
return /*#__PURE__*/ (0, _jsxRuntime).jsx(_responsiveLayout.default, {
|
|
211
212
|
className: classes.background,
|
|
213
|
+
dataAttributes: dataAttributes,
|
|
212
214
|
children: /*#__PURE__*/ (0, _jsxRuntime).jsxs(_themeVariantContext.ThemeVariant, {
|
|
213
215
|
isInverse: isInverse,
|
|
214
216
|
children: [
|