@micromag/screen-keypad 0.3.646 → 0.3.656
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/assets/css/styles.css +1 -1
- package/es/index.js +65 -53
- package/package.json +18 -18
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-screen-keypad-close,.micromag-screen-keypad-popup,.micromag-screen-keypad-popupButton{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:inherit;cursor:pointer;display:inline-block;font-family:inherit;padding:0;position:relative}.micromag-screen-keypad-background,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-buttonLabel,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-emptyButtonLabel,.micromag-screen-keypad-popupBackdrop,.micromag-screen-keypad-withSquareItems .micromag-screen-keypad-button,.micromag-screen-keypad-withSquareItems .micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-thumbnail,.micromag-screen-keypad-withSquareItems .micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-thumbnail{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-keypad-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-keypad-disabled.micromag-screen-keypad-container{overflow:hidden;pointer-events:none}.micromag-screen-keypad-hidden.micromag-screen-keypad-container{display:none;visibility:hidden}.micromag-screen-keypad-placeholder.micromag-screen-keypad-container .micromag-screen-keypad-content{padding:6px;position:relative}.micromag-screen-keypad-emptyText,.micromag-screen-keypad-emptyTitle{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-keypad-close:focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-keypad-container{-ms-touch-action:none;touch-action:none}.micromag-screen-keypad-container p{font-weight:inherit;margin-bottom:inherit;margin-top:inherit}.micromag-screen-keypad-container.micromag-screen-keypad-isPlaceholder .micromag-screen-keypad-layout{padding:10px}.micromag-screen-keypad-background{z-index:1}.micromag-screen-keypad-fixedHeader{display:-ms-flexbox;display:flex;left:0;position:absolute;right:0;top:0;z-index:50;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:end;justify-content:flex-end;opacity:0;padding:10px;pointer-events:none;width:100%}.micromag-screen-keypad-fixedHeader.micromag-screen-keypad-open{opacity:1;pointer-events:auto}.micromag-screen-keypad-close{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-filter:invert(100%);filter:invert(100%);font-weight:700;margin-left:auto}.micromag-screen-keypad-close:focus-visible{-webkit-box-shadow:0 0 2px 0 #fff;box-shadow:0 0 2px 0 #fff}.micromag-screen-keypad-closeIcon{border-radius:50%;color:#000;height:25px;padding:0;width:25px}.micromag-screen-keypad-header{left:0;position:absolute;top:0;width:100%}.micromag-screen-keypad-footer{bottom:0;left:0;position:absolute;width:100%}.micromag-screen-keypad-inner{height:100%;position:relative;z-index:2}.micromag-screen-keypad-layout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;height:100%;justify-content:flex-start;text-align:center;-webkit-transition:padding .2s ease-out;transition:padding .2s ease-out}.micromag-screen-keypad-emptyText,.micromag-screen-keypad-emptyTitle{margin:10px auto;width:100%}.micromag-screen-keypad-emptyTitle{height:100px}.micromag-screen-keypad-emptyText{height:50px}.micromag-screen-keypad-grid{width:85%}.micromag-screen-keypad-item{height:100%;position:relative}.micromag-screen-keypad-withSquareItems .micromag-screen-keypad-item{height:0;padding-bottom:100%}.micromag-screen-keypad-placeholderItem{height:0;padding-bottom:60%}.micromag-screen-keypad-withSquareItems .micromag-screen-keypad-placeholderItem{padding-bottom:100%}.micromag-screen-keypad-button{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;font-weight:inherit;height:100%;justify-content:center;overflow:hidden;padding:0;-webkit-transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67),-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);width:100%}.micromag-screen-keypad-button:focus-visible,.micromag-screen-keypad-button:hover{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}.micromag-screen-keypad-button:active{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}.micromag-screen-keypad-button.micromag-screen-keypad-isEmpty{padding:2px;pointer-events:none}.micromag-screen-keypad-button.micromag-screen-keypad-disableHover,.micromag-screen-keypad-button.micromag-screen-keypad-isEmpty{cursor:default}.micromag-screen-keypad-button.micromag-screen-keypad-disableHover:active,.micromag-screen-keypad-button.micromag-screen-keypad-disableHover:hover,.micromag-screen-keypad-button.micromag-screen-keypad-isEmpty:active,.micromag-screen-keypad-button.micromag-screen-keypad-isEmpty:hover{-webkit-transform:none;-ms-transform:none;transform:none}.micromag-screen-keypad-button.micromag-screen-keypad-isLink{-webkit-text-decoration:none;text-decoration:none}.micromag-screen-keypad-button.micromag-screen-keypad-isLink:hover{color:inherit}.micromag-screen-keypad-button .micromag-screen-keypad-buttonPlaceholder,.micromag-screen-keypad-button .micromag-screen-keypad-imagePlaceholder{margin:0;width:100%}.micromag-screen-keypad-buttonVisualPlaceholder{width:100%}.micromag-screen-keypad-thumbnail{max-height:50px;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.micromag-screen-keypad-buttonLabel{padding:5px;width:100%}.micromag-screen-keypad-empty{margin-bottom:10px;padding:10px;width:100%}.micromag-screen-keypad-emptyButtonVisual{margin-bottom:5px;padding:10px 5px}.micromag-screen-keypad-emptyButtonLabel{margin-bottom:5px;padding:2px 5px}.micromag-screen-keypad-popupBackdrop{-webkit-backdrop-filter:blur(.25rem);backdrop-filter:blur(.25rem);background-color:rgba(0,0,0,.2);pointer-events:none;z-index:2}.micromag-screen-keypad-popup{height:100%;position:fixed;right:0;top:0;-ms-touch-action:none;touch-action:none;-webkit-transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67),-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);width:100%;z-index:6}.micromag-screen-keypad-popup:active,.micromag-screen-keypad-popup:hover{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}.micromag-screen-keypad-popupButton{height:100%;position:relative;text-align:left;-webkit-transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67),-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);width:100%;z-index:3}.micromag-screen-keypad-popupButton:active{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}.micromag-screen-keypad-popupScroll{height:100%;width:100%}.micromag-screen-keypad-popupInner{background-color:#1c1c1c;-webkit-box-shadow:0 0 2px #1c1c1c;box-shadow:0 0 2px #1c1c1c;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:10% 7.5%;overflow:hidden;position:relative;z-index:40}.micromag-screen-keypad-popupInner .micromag-screen-keypad-popupContent{font-family:inherit;font-style:inherit;font-weight:inherit;line-height:inherit}.micromag-screen-keypad-popupInner .micromag-screen-keypad-popupContent p{font-weight:inherit;margin-bottom:0;margin-top:0}.micromag-screen-keypad-placeholder{mix-blend-mode:normal}.micromag-screen-keypad-popupContent,.micromag-screen-keypad-popupHeading,.micromag-screen-keypad-popupVisual{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;margin-bottom:.5em;width:100%}.micromag-screen-keypad-popupHeading{font-weight:inherit;margin-bottom:.25em}.micromag-screen-keypad-contentSplit .micromag-screen-keypad-emptyHeading,.micromag-screen-keypad-contentSplit .micromag-screen-keypad-popupHeading{-ms-flex-order:1;order:1}.micromag-screen-keypad-contentSplit .micromag-screen-keypad-emptyVisual,.micromag-screen-keypad-contentSplit .micromag-screen-keypad-popupVisual{-ms-flex-order:2;order:2}.micromag-screen-keypad-contentSplit .micromag-screen-keypad-emptyContent,.micromag-screen-keypad-contentSplit .micromag-screen-keypad-popupContent{-ms-flex-order:3;order:3}.micromag-screen-keypad-contentSplit .micromag-screen-keypad-emptyCTA,.micromag-screen-keypad-contentSplit .micromag-screen-keypad-popupCTA{-ms-flex-order:4;order:4}.micromag-screen-keypad-contentBottom .micromag-screen-keypad-emptyVisual,.micromag-screen-keypad-contentBottom .micromag-screen-keypad-popupVisual{-ms-flex-order:1;order:1}.micromag-screen-keypad-contentBottom .micromag-screen-keypad-emptyHeading,.micromag-screen-keypad-contentBottom .micromag-screen-keypad-popupHeading{-ms-flex-order:2;order:2}.micromag-screen-keypad-contentBottom .micromag-screen-keypad-emptyContent,.micromag-screen-keypad-contentBottom .micromag-screen-keypad-popupContent{-ms-flex-order:3;order:3}.micromag-screen-keypad-contentBottom .micromag-screen-keypad-emptyCTA,.micromag-screen-keypad-contentBottom .micromag-screen-keypad-popupCTA{-ms-flex-order:4;order:4}.micromag-screen-keypad-popupCTA{margin:0 auto;z-index:2}.micromag-screen-keypad-layoutLabelTop .micromag-screen-keypad-buttonLabel,.micromag-screen-keypad-layoutLabelTop .micromag-screen-keypad-emptyButtonLabel{-ms-flex-order:1;order:1}.micromag-screen-keypad-layoutLabelTop .micromag-screen-keypad-buttonVisual,.micromag-screen-keypad-layoutLabelTop .micromag-screen-keypad-emptyButtonVisual{-ms-flex-order:2;order:2}.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-buttonLabel,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-emptyButtonLabel,.micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-buttonLabel,.micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-emptyButtonLabel{display:none}.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-buttonVisual,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-emptyButtonVisual,.micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-buttonVisual,.micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-emptyButtonVisual{height:100%;width:100%!important}.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-thumbnail,.micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-thumbnail{max-height:none;-o-object-fit:cover;object-fit:cover;width:100%!important}.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-buttonVisual,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-emptyButtonVisual{z-index:1}.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-buttonLabel,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-emptyButtonLabel{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(28,28,28,0)),to(rgba(28,28,28,.75)));background-image:linear-gradient(180deg,rgba(28,28,28,0),rgba(28,28,28,.75));bottom:0;display:block;height:auto;top:auto;z-index:2}
|
|
1
|
+
.micromag-screen-keypad-close,.micromag-screen-keypad-popup,.micromag-screen-keypad-popupButton{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:inherit;cursor:pointer;display:inline-block;font-family:inherit;padding:0;position:relative}.micromag-screen-keypad-background,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-buttonLabel,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-emptyButtonLabel,.micromag-screen-keypad-popupBackdrop,.micromag-screen-keypad-withSquareItems .micromag-screen-keypad-button,.micromag-screen-keypad-withSquareItems .micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-thumbnail,.micromag-screen-keypad-withSquareItems .micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-thumbnail{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-keypad-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-keypad-disabled.micromag-screen-keypad-container{overflow:hidden;pointer-events:none}.micromag-screen-keypad-hidden.micromag-screen-keypad-container{display:none;visibility:hidden}.micromag-screen-keypad-placeholder.micromag-screen-keypad-container .micromag-screen-keypad-content{padding:6px;position:relative}.micromag-screen-keypad-emptyText,.micromag-screen-keypad-emptyTitle{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-keypad-close:focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-keypad-container{-ms-touch-action:none;touch-action:none}.micromag-screen-keypad-container p{font-weight:inherit;margin-bottom:inherit;margin-top:inherit}.micromag-screen-keypad-container.micromag-screen-keypad-isPlaceholder .micromag-screen-keypad-layout{padding:10px}.micromag-screen-keypad-background{z-index:1}.micromag-screen-keypad-fixedHeader{display:-ms-flexbox;display:flex;left:0;position:absolute;right:0;top:0;z-index:50;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:end;justify-content:flex-end;opacity:0;padding:10px;pointer-events:none;width:100%}.micromag-screen-keypad-fixedHeader.micromag-screen-keypad-open{opacity:1;pointer-events:auto}.micromag-screen-keypad-close{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-filter:invert(100%);filter:invert(100%);font-weight:700;margin-left:auto}.micromag-screen-keypad-close:focus-visible{-webkit-box-shadow:0 0 2px 0 #fff;box-shadow:0 0 2px 0 #fff}.micromag-screen-keypad-closeIcon{border-radius:50%;color:#000;height:25px;padding:0;width:25px}.micromag-screen-keypad-header{left:0;position:absolute;top:0;width:100%}.micromag-screen-keypad-footer{bottom:0;left:0;position:absolute;width:100%}.micromag-screen-keypad-inner{height:100%;position:relative;z-index:2}.micromag-screen-keypad-layout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;height:100%;justify-content:flex-start;text-align:center;-webkit-transition:padding .2s ease-out;transition:padding .2s ease-out}.micromag-screen-keypad-emptyText,.micromag-screen-keypad-emptyTitle{margin:10px auto;width:100%}.micromag-screen-keypad-emptyTitle{height:100px}.micromag-screen-keypad-emptyText{height:50px}.micromag-screen-keypad-grid{width:85%}.micromag-screen-keypad-item{height:100%;position:relative}.micromag-screen-keypad-withSquareItems .micromag-screen-keypad-item{height:0;padding-bottom:100%}.micromag-screen-keypad-placeholderItem{height:0;padding-bottom:60%}.micromag-screen-keypad-withSquareItems .micromag-screen-keypad-placeholderItem{padding-bottom:100%}.micromag-screen-keypad-button{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;font-weight:inherit;height:100%;justify-content:center;overflow:hidden;padding:0;-webkit-transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67),-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);width:100%}.micromag-screen-keypad-button:focus-visible,.micromag-screen-keypad-button:hover{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}.micromag-screen-keypad-button:active{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}.micromag-screen-keypad-button.micromag-screen-keypad-isEmpty{padding:2px;pointer-events:none}.micromag-screen-keypad-button.micromag-screen-keypad-disableHover,.micromag-screen-keypad-button.micromag-screen-keypad-isEmpty{cursor:default}.micromag-screen-keypad-button.micromag-screen-keypad-disableHover:active,.micromag-screen-keypad-button.micromag-screen-keypad-disableHover:hover,.micromag-screen-keypad-button.micromag-screen-keypad-isEmpty:active,.micromag-screen-keypad-button.micromag-screen-keypad-isEmpty:hover{-webkit-transform:none;-ms-transform:none;transform:none}.micromag-screen-keypad-button.micromag-screen-keypad-isLink{-webkit-text-decoration:none;text-decoration:none}.micromag-screen-keypad-button.micromag-screen-keypad-isLink:hover{color:inherit}.micromag-screen-keypad-button .micromag-screen-keypad-buttonPlaceholder,.micromag-screen-keypad-button .micromag-screen-keypad-imagePlaceholder{margin:0;width:100%}.micromag-screen-keypad-buttonVisualPlaceholder{width:100%}.micromag-screen-keypad-thumbnail{max-height:50px;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.micromag-screen-keypad-buttonLabel{padding:5px;width:100%}.micromag-screen-keypad-empty{margin-bottom:10px;padding:10px;width:100%}.micromag-screen-keypad-emptyButtonVisual{margin-bottom:5px;padding:10px 5px}.micromag-screen-keypad-emptyButtonLabel{margin-bottom:5px;padding:2px 5px}.micromag-screen-keypad-popupBackdrop{-webkit-backdrop-filter:blur(.25rem);backdrop-filter:blur(.25rem);background-color:rgba(0,0,0,.2);pointer-events:none;z-index:2}.micromag-screen-keypad-popup{height:100%;position:fixed;right:0;top:0;-ms-touch-action:none;touch-action:none;-webkit-transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67),-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);width:100%;z-index:6}.micromag-screen-keypad-popup:active,.micromag-screen-keypad-popup:hover{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}.micromag-screen-keypad-popupButton{height:100%;position:relative;text-align:left;-webkit-transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67);transition:transform .3s cubic-bezier(.41,1.69,.04,.67),-webkit-transform .3s cubic-bezier(.41,1.69,.04,.67);width:100%;z-index:3}.micromag-screen-keypad-popupButton:active{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}.micromag-screen-keypad-popupScroll{height:100%;width:100%}.micromag-screen-keypad-popupInner{background-color:#1c1c1c;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:10% 7.5%;overflow:hidden;position:relative;z-index:40}.micromag-screen-keypad-popupInner.micromag-screen-keypad-withShadow{-webkit-box-shadow:0 0 2px #1c1c1c;box-shadow:0 0 2px #1c1c1c}.micromag-screen-keypad-popupInner .micromag-screen-keypad-popupContent{font-family:inherit;font-style:inherit;font-weight:inherit;line-height:inherit}.micromag-screen-keypad-popupInner .micromag-screen-keypad-popupContent p{font-weight:inherit;margin-bottom:0;margin-top:0}.micromag-screen-keypad-placeholder{mix-blend-mode:normal}.micromag-screen-keypad-popupContent,.micromag-screen-keypad-popupHeading,.micromag-screen-keypad-popupVisual{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;margin-bottom:.5em;width:100%}.micromag-screen-keypad-popupHeading{font-weight:inherit;margin-bottom:.25em}.micromag-screen-keypad-contentSplit .micromag-screen-keypad-emptyHeading,.micromag-screen-keypad-contentSplit .micromag-screen-keypad-popupHeading{-ms-flex-order:1;order:1}.micromag-screen-keypad-contentSplit .micromag-screen-keypad-emptyVisual,.micromag-screen-keypad-contentSplit .micromag-screen-keypad-popupVisual{-ms-flex-order:2;order:2}.micromag-screen-keypad-contentSplit .micromag-screen-keypad-emptyContent,.micromag-screen-keypad-contentSplit .micromag-screen-keypad-popupContent{-ms-flex-order:3;order:3}.micromag-screen-keypad-contentSplit .micromag-screen-keypad-emptyCTA,.micromag-screen-keypad-contentSplit .micromag-screen-keypad-popupCTA{-ms-flex-order:4;order:4}.micromag-screen-keypad-contentBottom .micromag-screen-keypad-emptyVisual,.micromag-screen-keypad-contentBottom .micromag-screen-keypad-popupVisual{-ms-flex-order:1;order:1}.micromag-screen-keypad-contentBottom .micromag-screen-keypad-emptyHeading,.micromag-screen-keypad-contentBottom .micromag-screen-keypad-popupHeading{-ms-flex-order:2;order:2}.micromag-screen-keypad-contentBottom .micromag-screen-keypad-emptyContent,.micromag-screen-keypad-contentBottom .micromag-screen-keypad-popupContent{-ms-flex-order:3;order:3}.micromag-screen-keypad-contentBottom .micromag-screen-keypad-emptyCTA,.micromag-screen-keypad-contentBottom .micromag-screen-keypad-popupCTA{-ms-flex-order:4;order:4}.micromag-screen-keypad-popupCTA{margin:0 auto;z-index:2}.micromag-screen-keypad-layoutLabelTop .micromag-screen-keypad-buttonLabel,.micromag-screen-keypad-layoutLabelTop .micromag-screen-keypad-emptyButtonLabel{-ms-flex-order:1;order:1}.micromag-screen-keypad-layoutLabelTop .micromag-screen-keypad-buttonVisual,.micromag-screen-keypad-layoutLabelTop .micromag-screen-keypad-emptyButtonVisual{-ms-flex-order:2;order:2}.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-buttonLabel,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-emptyButtonLabel,.micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-buttonLabel,.micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-emptyButtonLabel{display:none}.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-buttonVisual,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-emptyButtonVisual,.micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-buttonVisual,.micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-emptyButtonVisual{height:100%;width:100%!important}.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-thumbnail,.micromag-screen-keypad-layoutNoLabel .micromag-screen-keypad-thumbnail{max-height:none;-o-object-fit:cover;object-fit:cover;width:100%!important}.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-buttonVisual,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-emptyButtonVisual{z-index:1}.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-buttonLabel,.micromag-screen-keypad-layoutLabelOver .micromag-screen-keypad-emptyButtonLabel{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(28,28,28,0)),to(rgba(28,28,28,.75)));background-image:linear-gradient(180deg,rgba(28,28,28,0),rgba(28,28,28,.75));bottom:0;display:block;height:auto;top:auto;z-index:2}
|
package/es/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
|
10
10
|
import { ScreenElement, PlaceholderButton, Close } from '@micromag/core/components';
|
|
11
11
|
import { usePlaybackContext, usePlaybackMediaRef, useScreenState, useScreenSize, useViewerContext, useViewerWebView, useViewerInteraction, useScreenRenderContext } from '@micromag/core/contexts';
|
|
12
12
|
import { useTrackScreenEvent, useDimensionObserver, useDragProgress } from '@micromag/core/hooks';
|
|
13
|
-
import { isHeaderFilled, isFooterFilled, getFooterProps, isTextFilled, camelCase, getStyleFromBox, getStyleFromText } from '@micromag/core/utils';
|
|
13
|
+
import { isHeaderFilled, isFooterFilled, getFooterProps, isTextFilled, camelCase, getStyleFromBox, getStyleFromText, getStyleFromAlignment } from '@micromag/core/utils';
|
|
14
14
|
import Background from '@micromag/element-background';
|
|
15
15
|
import Button from '@micromag/element-button';
|
|
16
16
|
import CallToAction from '@micromag/element-call-to-action';
|
|
@@ -24,7 +24,7 @@ import Scroll from '@micromag/element-scroll';
|
|
|
24
24
|
import Text from '@micromag/element-text';
|
|
25
25
|
import Visual from '@micromag/element-visual';
|
|
26
26
|
|
|
27
|
-
var styles = {"popupButton":"micromag-screen-keypad-popupButton","popup":"micromag-screen-keypad-popup","close":"micromag-screen-keypad-close","layoutLabelOver":"micromag-screen-keypad-layoutLabelOver","emptyButtonLabel":"micromag-screen-keypad-emptyButtonLabel","buttonLabel":"micromag-screen-keypad-buttonLabel","withSquareItems":"micromag-screen-keypad-withSquareItems","layoutNoLabel":"micromag-screen-keypad-layoutNoLabel","thumbnail":"micromag-screen-keypad-thumbnail","popupBackdrop":"micromag-screen-keypad-popupBackdrop","button":"micromag-screen-keypad-button","background":"micromag-screen-keypad-background","container":"micromag-screen-keypad-container","disabled":"micromag-screen-keypad-disabled","hidden":"micromag-screen-keypad-hidden","placeholder":"micromag-screen-keypad-placeholder","content":"micromag-screen-keypad-content","emptyTitle":"micromag-screen-keypad-emptyTitle","emptyText":"micromag-screen-keypad-emptyText","isPlaceholder":"micromag-screen-keypad-isPlaceholder","layout":"micromag-screen-keypad-layout","fixedHeader":"micromag-screen-keypad-fixedHeader","open":"micromag-screen-keypad-open","closeIcon":"micromag-screen-keypad-closeIcon","header":"micromag-screen-keypad-header","footer":"micromag-screen-keypad-footer","inner":"micromag-screen-keypad-inner","grid":"micromag-screen-keypad-grid","item":"micromag-screen-keypad-item","placeholderItem":"micromag-screen-keypad-placeholderItem","isEmpty":"micromag-screen-keypad-isEmpty","disableHover":"micromag-screen-keypad-disableHover","isLink":"micromag-screen-keypad-isLink","imagePlaceholder":"micromag-screen-keypad-imagePlaceholder","buttonPlaceholder":"micromag-screen-keypad-buttonPlaceholder","buttonVisualPlaceholder":"micromag-screen-keypad-buttonVisualPlaceholder","empty":"micromag-screen-keypad-empty","emptyButtonVisual":"micromag-screen-keypad-emptyButtonVisual","popupScroll":"micromag-screen-keypad-popupScroll","popupInner":"micromag-screen-keypad-popupInner","popupContent":"micromag-screen-keypad-popupContent","popupHeading":"micromag-screen-keypad-popupHeading","popupVisual":"micromag-screen-keypad-popupVisual","contentSplit":"micromag-screen-keypad-contentSplit","emptyHeading":"micromag-screen-keypad-emptyHeading","emptyVisual":"micromag-screen-keypad-emptyVisual","emptyContent":"micromag-screen-keypad-emptyContent","emptyCTA":"micromag-screen-keypad-emptyCTA","popupCTA":"micromag-screen-keypad-popupCTA","contentBottom":"micromag-screen-keypad-contentBottom","layoutLabelTop":"micromag-screen-keypad-layoutLabelTop","buttonVisual":"micromag-screen-keypad-buttonVisual"};
|
|
27
|
+
var styles = {"popupButton":"micromag-screen-keypad-popupButton","popup":"micromag-screen-keypad-popup","close":"micromag-screen-keypad-close","layoutLabelOver":"micromag-screen-keypad-layoutLabelOver","emptyButtonLabel":"micromag-screen-keypad-emptyButtonLabel","buttonLabel":"micromag-screen-keypad-buttonLabel","withSquareItems":"micromag-screen-keypad-withSquareItems","layoutNoLabel":"micromag-screen-keypad-layoutNoLabel","thumbnail":"micromag-screen-keypad-thumbnail","popupBackdrop":"micromag-screen-keypad-popupBackdrop","button":"micromag-screen-keypad-button","background":"micromag-screen-keypad-background","container":"micromag-screen-keypad-container","disabled":"micromag-screen-keypad-disabled","hidden":"micromag-screen-keypad-hidden","placeholder":"micromag-screen-keypad-placeholder","content":"micromag-screen-keypad-content","emptyTitle":"micromag-screen-keypad-emptyTitle","emptyText":"micromag-screen-keypad-emptyText","isPlaceholder":"micromag-screen-keypad-isPlaceholder","layout":"micromag-screen-keypad-layout","fixedHeader":"micromag-screen-keypad-fixedHeader","open":"micromag-screen-keypad-open","closeIcon":"micromag-screen-keypad-closeIcon","header":"micromag-screen-keypad-header","footer":"micromag-screen-keypad-footer","inner":"micromag-screen-keypad-inner","grid":"micromag-screen-keypad-grid","item":"micromag-screen-keypad-item","placeholderItem":"micromag-screen-keypad-placeholderItem","isEmpty":"micromag-screen-keypad-isEmpty","disableHover":"micromag-screen-keypad-disableHover","isLink":"micromag-screen-keypad-isLink","imagePlaceholder":"micromag-screen-keypad-imagePlaceholder","buttonPlaceholder":"micromag-screen-keypad-buttonPlaceholder","buttonVisualPlaceholder":"micromag-screen-keypad-buttonVisualPlaceholder","empty":"micromag-screen-keypad-empty","emptyButtonVisual":"micromag-screen-keypad-emptyButtonVisual","popupScroll":"micromag-screen-keypad-popupScroll","popupInner":"micromag-screen-keypad-popupInner","withShadow":"micromag-screen-keypad-withShadow","popupContent":"micromag-screen-keypad-popupContent","popupHeading":"micromag-screen-keypad-popupHeading","popupVisual":"micromag-screen-keypad-popupVisual","contentSplit":"micromag-screen-keypad-contentSplit","emptyHeading":"micromag-screen-keypad-emptyHeading","emptyVisual":"micromag-screen-keypad-emptyVisual","emptyContent":"micromag-screen-keypad-emptyContent","emptyCTA":"micromag-screen-keypad-emptyCTA","popupCTA":"micromag-screen-keypad-popupCTA","contentBottom":"micromag-screen-keypad-contentBottom","layoutLabelTop":"micromag-screen-keypad-layoutLabelTop","buttonVisual":"micromag-screen-keypad-buttonVisual"};
|
|
28
28
|
|
|
29
29
|
var placeholders = [{
|
|
30
30
|
id: '1'
|
|
@@ -109,7 +109,8 @@ var propTypes = {
|
|
|
109
109
|
buttonStyles: PropTypes.shape({
|
|
110
110
|
layout: PropTypes.string,
|
|
111
111
|
textStyle: PropTypes$1.textStyle,
|
|
112
|
-
boxStyle: PropTypes$1.boxStyle
|
|
112
|
+
boxStyle: PropTypes$1.boxStyle,
|
|
113
|
+
alignment: PropTypes$1.alignment
|
|
113
114
|
}),
|
|
114
115
|
popupStyles: PropTypes.shape({
|
|
115
116
|
layout: PropTypes.oneOf(['content-top', 'content-split', 'content-bottom']),
|
|
@@ -192,53 +193,55 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
192
193
|
var hasTitle = isTextFilled(title);
|
|
193
194
|
var _ref2 = title || {},
|
|
194
195
|
_ref2$textStyle = _ref2.textStyle,
|
|
195
|
-
titleTextStyle = _ref2$textStyle ===
|
|
196
|
+
titleTextStyle = _ref2$textStyle === void 0 ? null : _ref2$textStyle;
|
|
196
197
|
var _useDimensionObserver = useDimensionObserver(),
|
|
197
198
|
headerRef = _useDimensionObserver.ref,
|
|
198
199
|
_useDimensionObserver2 = _useDimensionObserver.height,
|
|
199
|
-
headerHeight = _useDimensionObserver2 ===
|
|
200
|
+
headerHeight = _useDimensionObserver2 === void 0 ? 0 : _useDimensionObserver2;
|
|
200
201
|
var _useDimensionObserver3 = useDimensionObserver(),
|
|
201
202
|
footerRef = _useDimensionObserver3.ref,
|
|
202
203
|
_useDimensionObserver4 = _useDimensionObserver3.height,
|
|
203
|
-
footerHeight = _useDimensionObserver4 ===
|
|
204
|
+
footerHeight = _useDimensionObserver4 === void 0 ? 0 : _useDimensionObserver4;
|
|
204
205
|
var backgroundPlaying = current && (isView || isEdit);
|
|
205
206
|
var mediaShouldLoad = !isPlaceholder && (current || preload);
|
|
206
207
|
var isInteractivePreview = isEdit && screenState === null;
|
|
207
208
|
var _ref3 = keypadSettings || {},
|
|
208
209
|
_ref3$layout = _ref3.layout,
|
|
209
|
-
keypadLayout = _ref3$layout ===
|
|
210
|
+
keypadLayout = _ref3$layout === void 0 ? null : _ref3$layout;
|
|
210
211
|
var _ref4 = keypadLayout || {},
|
|
211
212
|
_ref4$columnAlign = _ref4.columnAlign,
|
|
212
|
-
columnAlign = _ref4$columnAlign ===
|
|
213
|
+
columnAlign = _ref4$columnAlign === void 0 ? null : _ref4$columnAlign,
|
|
213
214
|
_ref4$columns = _ref4.columns,
|
|
214
|
-
columns = _ref4$columns ===
|
|
215
|
+
columns = _ref4$columns === void 0 ? null : _ref4$columns,
|
|
215
216
|
_ref4$spacing = _ref4.spacing,
|
|
216
|
-
columnSpacing = _ref4$spacing ===
|
|
217
|
+
columnSpacing = _ref4$spacing === void 0 ? null : _ref4$spacing,
|
|
217
218
|
_ref4$withSquareItems = _ref4.withSquareItems,
|
|
218
|
-
withSquareItems = _ref4$withSquareItems ===
|
|
219
|
+
withSquareItems = _ref4$withSquareItems === void 0 ? false : _ref4$withSquareItems;
|
|
219
220
|
var _ref5 = buttonStyles || {},
|
|
220
221
|
_ref5$layout = _ref5.layout,
|
|
221
|
-
buttonLayout = _ref5$layout ===
|
|
222
|
+
buttonLayout = _ref5$layout === void 0 ? null : _ref5$layout,
|
|
222
223
|
_ref5$textStyle = _ref5.textStyle,
|
|
223
|
-
buttonTextStyle = _ref5$textStyle ===
|
|
224
|
+
buttonTextStyle = _ref5$textStyle === void 0 ? null : _ref5$textStyle,
|
|
224
225
|
_ref5$boxStyle = _ref5.boxStyle,
|
|
225
|
-
buttonBoxStyle = _ref5$boxStyle ===
|
|
226
|
+
buttonBoxStyle = _ref5$boxStyle === void 0 ? null : _ref5$boxStyle,
|
|
227
|
+
_ref5$alignment = _ref5.alignment,
|
|
228
|
+
buttonAlignment = _ref5$alignment === void 0 ? null : _ref5$alignment;
|
|
226
229
|
var _ref6 = popupStyles || {},
|
|
227
230
|
_ref6$layout = _ref6.layout,
|
|
228
|
-
popupLayout = _ref6$layout ===
|
|
231
|
+
popupLayout = _ref6$layout === void 0 ? null : _ref6$layout,
|
|
229
232
|
_ref6$headingTextStyl = _ref6.headingTextStyle,
|
|
230
|
-
headingTextStyle = _ref6$headingTextStyl ===
|
|
233
|
+
headingTextStyle = _ref6$headingTextStyl === void 0 ? null : _ref6$headingTextStyl,
|
|
231
234
|
_ref6$contentTextStyl = _ref6.contentTextStyle,
|
|
232
|
-
contentTextStyle = _ref6$contentTextStyl ===
|
|
235
|
+
contentTextStyle = _ref6$contentTextStyl === void 0 ? null : _ref6$contentTextStyl,
|
|
233
236
|
_ref6$button = _ref6.button,
|
|
234
|
-
popupButtons = _ref6$button ===
|
|
237
|
+
popupButtons = _ref6$button === void 0 ? null : _ref6$button,
|
|
235
238
|
_ref6$boxStyle = _ref6.boxStyle,
|
|
236
|
-
popupBoxStyle = _ref6$boxStyle ===
|
|
239
|
+
popupBoxStyle = _ref6$boxStyle === void 0 ? null : _ref6$boxStyle;
|
|
237
240
|
var _ref7 = popupButtons || {},
|
|
238
241
|
_ref7$buttonTextStyle = _ref7.buttonTextStyle,
|
|
239
|
-
popupButtonsTextStyle = _ref7$buttonTextStyle ===
|
|
242
|
+
popupButtonsTextStyle = _ref7$buttonTextStyle === void 0 ? null : _ref7$buttonTextStyle,
|
|
240
243
|
_ref7$boxStyle = _ref7.boxStyle,
|
|
241
|
-
popupButtonsBoxStyle = _ref7$boxStyle ===
|
|
244
|
+
popupButtonsBoxStyle = _ref7$boxStyle === void 0 ? null : _ref7$boxStyle;
|
|
242
245
|
var popupLayoutClassName = useMemo(function () {
|
|
243
246
|
return popupLayout !== null ? camelCase(popupLayout) : '';
|
|
244
247
|
}, [popupLayout]);
|
|
@@ -252,38 +255,38 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
252
255
|
setPopup = _useState4[1];
|
|
253
256
|
var _ref8 = popup || {},
|
|
254
257
|
_ref8$heading = _ref8.heading,
|
|
255
|
-
popupHeading = _ref8$heading ===
|
|
258
|
+
popupHeading = _ref8$heading === void 0 ? null : _ref8$heading,
|
|
256
259
|
_ref8$content = _ref8.content,
|
|
257
|
-
popupContent = _ref8$content ===
|
|
260
|
+
popupContent = _ref8$content === void 0 ? null : _ref8$content,
|
|
258
261
|
_ref8$largeVisual = _ref8.largeVisual,
|
|
259
|
-
largeVisual = _ref8$largeVisual ===
|
|
262
|
+
largeVisual = _ref8$largeVisual === void 0 ? null : _ref8$largeVisual,
|
|
260
263
|
_ref8$button = _ref8.button,
|
|
261
|
-
popupButton = _ref8$button ===
|
|
264
|
+
popupButton = _ref8$button === void 0 ? null : _ref8$button;
|
|
262
265
|
var hasPopupHeading = isTextFilled(popupHeading);
|
|
263
266
|
var _ref9 = popupHeading || {},
|
|
264
267
|
_ref9$textStyle = _ref9.textStyle,
|
|
265
|
-
popupHeadingTextStyle = _ref9$textStyle ===
|
|
268
|
+
popupHeadingTextStyle = _ref9$textStyle === void 0 ? null : _ref9$textStyle;
|
|
266
269
|
var hasPopupContent = isTextFilled(popupContent);
|
|
267
270
|
var _ref10 = popupContent || {},
|
|
268
271
|
_ref10$textStyle = _ref10.textStyle,
|
|
269
|
-
popupContentTextStyle = _ref10$textStyle ===
|
|
272
|
+
popupContentTextStyle = _ref10$textStyle === void 0 ? null : _ref10$textStyle;
|
|
270
273
|
var _ref11 = popupButton || {},
|
|
271
274
|
_ref11$label = _ref11.label,
|
|
272
|
-
buttonLabel = _ref11$label ===
|
|
275
|
+
buttonLabel = _ref11$label === void 0 ? null : _ref11$label,
|
|
273
276
|
_ref11$url = _ref11.url,
|
|
274
|
-
buttonUrl = _ref11$url ===
|
|
277
|
+
buttonUrl = _ref11$url === void 0 ? null : _ref11$url,
|
|
275
278
|
_ref11$inWebView = _ref11.inWebView,
|
|
276
|
-
popupInWebView = _ref11$inWebView ===
|
|
279
|
+
popupInWebView = _ref11$inWebView === void 0 ? false : _ref11$inWebView,
|
|
277
280
|
_ref11$boxStyle = _ref11.boxStyle,
|
|
278
|
-
popupButtonBoxStyle = _ref11$boxStyle ===
|
|
281
|
+
popupButtonBoxStyle = _ref11$boxStyle === void 0 ? null : _ref11$boxStyle;
|
|
279
282
|
var onItemClick = useCallback(function (e, item) {
|
|
280
283
|
e.stopPropagation();
|
|
281
284
|
trackScreenEvent('click_item', item);
|
|
282
285
|
var _ref12 = item || {},
|
|
283
286
|
_ref12$inWebView = _ref12.inWebView,
|
|
284
|
-
inWebView = _ref12$inWebView ===
|
|
287
|
+
inWebView = _ref12$inWebView === void 0 ? false : _ref12$inWebView,
|
|
285
288
|
_ref12$url = _ref12.url,
|
|
286
|
-
url = _ref12$url ===
|
|
289
|
+
url = _ref12$url === void 0 ? null : _ref12$url;
|
|
287
290
|
if (inWebView && url !== null) {
|
|
288
291
|
openWebView({
|
|
289
292
|
url: url
|
|
@@ -314,7 +317,7 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
314
317
|
setPopupDragDirection = _useState6[1];
|
|
315
318
|
var onPopupScrollHeightChange = useCallback(function (_ref13) {
|
|
316
319
|
var _ref13$scrolleeHeight = _ref13.scrolleeHeight,
|
|
317
|
-
scrolleeHeight = _ref13$scrolleeHeight ===
|
|
320
|
+
scrolleeHeight = _ref13$scrolleeHeight === void 0 ? 0 : _ref13$scrolleeHeight;
|
|
318
321
|
if (Math.floor(scrolleeHeight) >= Math.floor(height)) {
|
|
319
322
|
setPopupDragDirection('top');
|
|
320
323
|
} else {
|
|
@@ -410,34 +413,36 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
410
413
|
return (items === null || items.length === 0 ? placeholders : items).map(function (item) {
|
|
411
414
|
var _ref15 = item || {},
|
|
412
415
|
_ref15$id = _ref15.id,
|
|
413
|
-
id = _ref15$id ===
|
|
416
|
+
id = _ref15$id === void 0 ? null : _ref15$id,
|
|
414
417
|
_ref15$label = _ref15.label,
|
|
415
|
-
label = _ref15$label ===
|
|
418
|
+
label = _ref15$label === void 0 ? null : _ref15$label,
|
|
416
419
|
_ref15$visual = _ref15.visual,
|
|
417
|
-
visual = _ref15$visual ===
|
|
420
|
+
visual = _ref15$visual === void 0 ? null : _ref15$visual,
|
|
418
421
|
_ref15$textStyle = _ref15.textStyle,
|
|
419
|
-
textStyle = _ref15$textStyle ===
|
|
422
|
+
textStyle = _ref15$textStyle === void 0 ? null : _ref15$textStyle,
|
|
420
423
|
_ref15$boxStyle = _ref15.boxStyle,
|
|
421
|
-
boxStyle = _ref15$boxStyle ===
|
|
424
|
+
boxStyle = _ref15$boxStyle === void 0 ? null : _ref15$boxStyle,
|
|
425
|
+
_ref15$alignment = _ref15.alignment,
|
|
426
|
+
alignment = _ref15$alignment === void 0 ? null : _ref15$alignment,
|
|
422
427
|
_ref15$heading = _ref15.heading,
|
|
423
|
-
heading = _ref15$heading ===
|
|
428
|
+
heading = _ref15$heading === void 0 ? null : _ref15$heading,
|
|
424
429
|
_ref15$content = _ref15.content,
|
|
425
|
-
content = _ref15$content ===
|
|
430
|
+
content = _ref15$content === void 0 ? null : _ref15$content,
|
|
426
431
|
_ref15$url = _ref15.url,
|
|
427
|
-
url = _ref15$url ===
|
|
432
|
+
url = _ref15$url === void 0 ? null : _ref15$url,
|
|
428
433
|
_ref15$inWebView = _ref15.inWebView,
|
|
429
|
-
inWebView = _ref15$inWebView ===
|
|
434
|
+
inWebView = _ref15$inWebView === void 0 ? false : _ref15$inWebView,
|
|
430
435
|
_ref15$largeVisual = _ref15.largeVisual,
|
|
431
|
-
popupLargeVisual = _ref15$largeVisual ===
|
|
436
|
+
popupLargeVisual = _ref15$largeVisual === void 0 ? null : _ref15$largeVisual;
|
|
432
437
|
var _ref16 = visual || {},
|
|
433
438
|
_ref16$url = _ref16.url,
|
|
434
|
-
visualUrl = _ref16$url ===
|
|
439
|
+
visualUrl = _ref16$url === void 0 ? null : _ref16$url;
|
|
435
440
|
var _ref17 = heading || {},
|
|
436
441
|
_ref17$body = _ref17.body,
|
|
437
|
-
headingBody = _ref17$body ===
|
|
442
|
+
headingBody = _ref17$body === void 0 ? null : _ref17$body;
|
|
438
443
|
var _ref18 = content || {},
|
|
439
444
|
_ref18$body = _ref18.body,
|
|
440
|
-
contentBody = _ref18$body ===
|
|
445
|
+
contentBody = _ref18$body === void 0 ? null : _ref18$body;
|
|
441
446
|
var key = label || visualUrl || id;
|
|
442
447
|
var isEmpty = label === null && visual === null;
|
|
443
448
|
var isExternalLink = url !== null && !inWebView;
|
|
@@ -447,7 +452,7 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
447
452
|
className: styles.item
|
|
448
453
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
449
454
|
className: classNames([styles.button, _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.isEmpty, isEmpty), styles.isLink, url !== null), styles.disableHover, isPopupEmpty && url === null)]),
|
|
450
|
-
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, getStyleFromBox(buttonBoxStyle)), getStyleFromText(buttonTextStyle)), getStyleFromBox(boxStyle)), getStyleFromText(textStyle)),
|
|
455
|
+
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, getStyleFromBox(buttonBoxStyle)), getStyleFromText(buttonTextStyle)), getStyleFromBox(boxStyle)), getStyleFromText(textStyle)), getStyleFromAlignment(alignment || buttonAlignment, true, 'flex-start')),
|
|
451
456
|
external: isExternalLink,
|
|
452
457
|
href: isExternalLink ? url : null,
|
|
453
458
|
focusable: current,
|
|
@@ -484,7 +489,7 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
484
489
|
className: styles.buttonLabel
|
|
485
490
|
}, label) : null)));
|
|
486
491
|
});
|
|
487
|
-
}, [items, screenState, keypadSettings]);
|
|
492
|
+
}, [items, screenState, keypadSettings, buttonAlignment, buttonBoxStyle, buttonTextStyle, buttonLayout]);
|
|
488
493
|
useEffect(function () {
|
|
489
494
|
if (screenState === 'popup' && isPlaceholder) {
|
|
490
495
|
setPopup(placeholderPopupBoxStyles); // @note force placeholder
|
|
@@ -505,9 +510,6 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
505
510
|
setShowPopup(false);
|
|
506
511
|
}
|
|
507
512
|
}, [screenState, items, isView, showPopup, setPopup, setShowPopup]);
|
|
508
|
-
|
|
509
|
-
// console.log(showPopup, popup, isView);
|
|
510
|
-
|
|
511
513
|
return /*#__PURE__*/React.createElement("div", {
|
|
512
514
|
ref: containerRef,
|
|
513
515
|
className: classNames([styles.container, _defineProperty(_defineProperty(_defineProperty({}, className, className !== null), styles.isPlaceholder, isPlaceholder), styles.withSquareItems, withSquareItems)]),
|
|
@@ -624,7 +626,7 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
624
626
|
withShadow: true
|
|
625
627
|
}, /*#__PURE__*/React.createElement("div", {
|
|
626
628
|
ref: popupInnerRef,
|
|
627
|
-
className: classNames([styles.popupInner, styles[popupLayoutClassName]]),
|
|
629
|
+
className: classNames([styles.popupInner, styles[popupLayoutClassName], _defineProperty({}, styles.withShadow, popupBoxStyle === null)]),
|
|
628
630
|
style: _objectSpread(_objectSpread({}, getStyleFromBox(placeholderPopupBoxStyles)), getStyleFromBox(popupBoxStyle))
|
|
629
631
|
}, /*#__PURE__*/React.createElement(ScreenElement, {
|
|
630
632
|
emptyLabel: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -816,6 +818,16 @@ var definition = [{
|
|
|
816
818
|
"value": "Button style"
|
|
817
819
|
}]
|
|
818
820
|
})
|
|
821
|
+
}, {
|
|
822
|
+
name: 'alignment',
|
|
823
|
+
type: 'alignment',
|
|
824
|
+
label: defineMessage({
|
|
825
|
+
id: "ggNi0P",
|
|
826
|
+
defaultMessage: [{
|
|
827
|
+
"type": 0,
|
|
828
|
+
"value": "Button alignment"
|
|
829
|
+
}]
|
|
830
|
+
})
|
|
819
831
|
}]
|
|
820
832
|
}]
|
|
821
833
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-keypad",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.656",
|
|
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.656",
|
|
69
|
+
"@micromag/element-background": "^0.3.656",
|
|
70
|
+
"@micromag/element-button": "^0.3.656",
|
|
71
|
+
"@micromag/element-call-to-action": "^0.3.656",
|
|
72
|
+
"@micromag/element-container": "^0.3.656",
|
|
73
|
+
"@micromag/element-footer": "^0.3.656",
|
|
74
|
+
"@micromag/element-grid": "^0.3.656",
|
|
75
|
+
"@micromag/element-header": "^0.3.656",
|
|
76
|
+
"@micromag/element-heading": "^0.3.656",
|
|
77
|
+
"@micromag/element-keypad": "^0.3.656",
|
|
78
|
+
"@micromag/element-layout": "^0.3.656",
|
|
79
|
+
"@micromag/element-scroll": "^0.3.656",
|
|
80
|
+
"@micromag/element-text": "^0.3.656",
|
|
81
|
+
"@micromag/element-urbania-author": "^0.3.656",
|
|
82
|
+
"@micromag/element-visual": "^0.3.656",
|
|
83
|
+
"@micromag/transforms": "^0.3.656",
|
|
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": "fd956cc4a183b621df124f3f3afbae4af974db27"
|
|
99
99
|
}
|