@micromag/screen-keypad 0.3.733 → 0.3.737
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/es/index.js +6 -5
- package/package.json +18 -18
package/es/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
|
12
12
|
import { ScreenElement, PlaceholderButton, Close } from '@micromag/core/components';
|
|
13
13
|
import { usePlaybackContext, usePlaybackMediaRef, useScreenState, useScreenSize, useViewerContext, useViewerWebView, useViewerInteraction, useScreenRenderContext } from '@micromag/core/contexts';
|
|
14
14
|
import { useTrackScreenEvent, useDimensionObserver, useDragProgress } from '@micromag/core/hooks';
|
|
15
|
-
import { isHeaderFilled, isFooterFilled, getFooterProps, isTextFilled, camelCase, getStyleFromBox, getStyleFromAlignment
|
|
15
|
+
import { isHeaderFilled, isFooterFilled, getFooterProps, isTextFilled, camelCase, getStyleFromBox, getStyleFromAlignment } from '@micromag/core/utils';
|
|
16
16
|
import Background from '@micromag/element-background';
|
|
17
17
|
import Button from '@micromag/element-button';
|
|
18
18
|
import CallToAction from '@micromag/element-call-to-action';
|
|
@@ -476,16 +476,17 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
476
476
|
_ref18$body = _ref18.body,
|
|
477
477
|
label = _ref18$body === void 0 ? null : _ref18$body,
|
|
478
478
|
_ref18$textStyle = _ref18.textStyle,
|
|
479
|
-
|
|
479
|
+
finalLabelTextStyle = _ref18$textStyle === void 0 ? null : _ref18$textStyle;
|
|
480
480
|
var key = label || visualUrl || id;
|
|
481
|
-
var
|
|
481
|
+
var itemIsEmpty = label === null && visual === null;
|
|
482
482
|
var isExternalLink = url !== null && !inWebView;
|
|
483
483
|
var isPopupEmpty = (heading === null || headingBody === null || headingBody === '') && (content === null || contentBody === null || contentBody === '') && popupLargeVisual === null;
|
|
484
|
+
var finalTextStyle = _objectSpread(_objectSpread({}, buttonTextStyle), finalLabelTextStyle);
|
|
484
485
|
return /*#__PURE__*/React.createElement("div", {
|
|
485
486
|
key: key,
|
|
486
487
|
className: styles.item
|
|
487
488
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
488
|
-
className: classNames([styles.button, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles.layoutLabelBottom, buttonLayout === 'label-bottom'), styles.layoutLabelTop, buttonLayout === 'label-top'), styles.layoutNoLabel, buttonLayout === 'no-label'), styles.layoutLabelOver, buttonLayout === 'label-over'), styles.fillImage, fillImage === true), styles.isEmpty,
|
|
489
|
+
className: classNames([styles.button, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles.layoutLabelBottom, buttonLayout === 'label-bottom'), styles.layoutLabelTop, buttonLayout === 'label-top'), styles.layoutNoLabel, buttonLayout === 'no-label'), styles.layoutLabelOver, buttonLayout === 'label-over'), styles.fillImage, fillImage === true), styles.isEmpty, itemIsEmpty), styles.isLink, url !== null), styles.disableHover, isPopupEmpty && url === null)]),
|
|
489
490
|
style: _objectSpread(_objectSpread(_objectSpread({}, getStyleFromBox(buttonBoxStyle)), getStyleFromBox(boxStyle)), getStyleFromAlignment(alignment || buttonAlignment, true, 'flex-start')),
|
|
490
491
|
external: isExternalLink,
|
|
491
492
|
href: isExternalLink ? url : null,
|
|
@@ -522,7 +523,7 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
522
523
|
}, label !== null || !isInteractivePreview ? /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
523
524
|
className: styles.buttonLabel
|
|
524
525
|
}, finalLabel, {
|
|
525
|
-
textStyle:
|
|
526
|
+
textStyle: finalTextStyle
|
|
526
527
|
})) : null)));
|
|
527
528
|
});
|
|
528
529
|
}, [items, screenState, keypadSettings, buttonAlignment, buttonBoxStyle, buttonTextStyle, buttonLayout]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-keypad",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.737",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -65,22 +65,22 @@
|
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@babel/runtime": "^7.13.10",
|
|
68
|
-
"@micromag/core": "^0.3.
|
|
69
|
-
"@micromag/element-background": "^0.3.
|
|
70
|
-
"@micromag/element-button": "^0.3.
|
|
71
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
72
|
-
"@micromag/element-container": "^0.3.
|
|
73
|
-
"@micromag/element-footer": "^0.3.
|
|
74
|
-
"@micromag/element-grid": "^0.3.
|
|
75
|
-
"@micromag/element-header": "^0.3.
|
|
76
|
-
"@micromag/element-heading": "^0.3.
|
|
77
|
-
"@micromag/element-keypad": "^0.3.
|
|
78
|
-
"@micromag/element-layout": "^0.3.
|
|
79
|
-
"@micromag/element-scroll": "^0.3.
|
|
80
|
-
"@micromag/element-text": "^0.3.
|
|
81
|
-
"@micromag/element-urbania-author": "^0.3.
|
|
82
|
-
"@micromag/element-visual": "^0.3.
|
|
83
|
-
"@micromag/transforms": "^0.3.
|
|
68
|
+
"@micromag/core": "^0.3.736",
|
|
69
|
+
"@micromag/element-background": "^0.3.736",
|
|
70
|
+
"@micromag/element-button": "^0.3.736",
|
|
71
|
+
"@micromag/element-call-to-action": "^0.3.736",
|
|
72
|
+
"@micromag/element-container": "^0.3.736",
|
|
73
|
+
"@micromag/element-footer": "^0.3.736",
|
|
74
|
+
"@micromag/element-grid": "^0.3.736",
|
|
75
|
+
"@micromag/element-header": "^0.3.736",
|
|
76
|
+
"@micromag/element-heading": "^0.3.736",
|
|
77
|
+
"@micromag/element-keypad": "^0.3.736",
|
|
78
|
+
"@micromag/element-layout": "^0.3.736",
|
|
79
|
+
"@micromag/element-scroll": "^0.3.736",
|
|
80
|
+
"@micromag/element-text": "^0.3.736",
|
|
81
|
+
"@micromag/element-urbania-author": "^0.3.736",
|
|
82
|
+
"@micromag/element-visual": "^0.3.736",
|
|
83
|
+
"@micromag/transforms": "^0.3.736",
|
|
84
84
|
"@react-spring/core": "^9.6.1",
|
|
85
85
|
"@react-spring/web": "^9.6.1",
|
|
86
86
|
"@use-gesture/react": "^10.3.0",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"access": "public",
|
|
96
96
|
"registry": "https://registry.npmjs.org/"
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "357ff7c95c7a25f250304c26a5d8a611a717d341"
|
|
99
99
|
}
|