@micromag/screen-urbania-horoscope 0.3.503 → 0.3.506
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 +10 -2
- package/lib/index.js +10 -2
- package/package.json +15 -15
package/assets/css/styles.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
.micromag-screen-urbania-horoscope-sign-card-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;-webkit-touch-callout:none;align-items:center;background-color:#1d3af2;border:0;border-radius:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-filter:drop-shadow(0 0 6px rgba(0,0,0,.7));filter:drop-shadow(0 0 6px rgba(0,0,0,.7));-ms-flex-direction:column;flex-direction:column;height:100%;padding:5px;position:relative;-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);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.micromag-screen-urbania-horoscope-sign-card-container.micromag-screen-urbania-horoscope-sign-card-focus-visible,.micromag-screen-urbania-horoscope-sign-card-container:hover{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05);z-index:2}.micromag-screen-urbania-horoscope-sign-card-container:focus-visible,.micromag-screen-urbania-horoscope-sign-card-container:hover{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05);z-index:2}.micromag-screen-urbania-horoscope-sign-card-container:active{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}.micromag-screen-urbania-horoscope-sign-card-placeholder{background-color:#b3b3b3;height:30px;margin:1px;width:30px}.micromag-screen-urbania-horoscope-sign-card-thumbnail{max-height:50px;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.micromag-screen-urbania-horoscope-sign-card-name{background-color:#fffc00;border-radius:24px;-webkit-box-shadow:0 0 0 2px rgba(255,250,0,.6);box-shadow:0 0 0 2px rgba(255,250,0,.6);color:#222;font-family:Agrandir Tight,sans-serif;font-size:12px;font-weight:700;margin-bottom:.4rem!important;padding:2px 5px 0!important;width:100%}.micromag-screen-urbania-horoscope-sign-card-date{color:#fffa00;font-family:Agrandir,sans-serif;font-size:8px}.micromag-screen-urbania-horoscope-sign-card-arrow{display:inline-block;font-size:20px;padding-bottom:2px;padding-right:5px;vertical-align:middle}.micromag-screen-urbania-horoscope-sign-card-emptyText{margin-top:5px;padding:10px;width:100%}
|
|
2
2
|
.micromag-screen-urbania-horoscope-sign-modal-modalButton{-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-urbania-horoscope-sign-modal-container{height:100%;overflow:hidden;width:100%}.micromag-screen-urbania-horoscope-sign-modal-disabled.micromag-screen-urbania-horoscope-sign-modal-container{overflow:hidden;pointer-events:none}.micromag-screen-urbania-horoscope-sign-modal-hidden.micromag-screen-urbania-horoscope-sign-modal-container{display:none;visibility:hidden}.micromag-screen-urbania-horoscope-sign-modal-placeholder.micromag-screen-urbania-horoscope-sign-modal-container .micromag-screen-urbania-horoscope-sign-modal-content{padding:6px;position:relative}.micromag-screen-urbania-horoscope-sign-modal-container{position:relative}.micromag-screen-urbania-horoscope-sign-modal-modalButton{height:100%;left:0;position:absolute;top: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-urbania-horoscope-sign-modal-modalButton:active{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}.micromag-screen-urbania-horoscope-sign-modal-modal{background-color:#0ff;border-radius:22px;-webkit-box-shadow:0 0 4px #010f66;box-shadow:0 0 4px #010f66;color:#1d3af2;margin:52px 18px 30px;padding:10px}.micromag-screen-urbania-horoscope-sign-modal-name{font-family:Agrandir Tight,sans-serif;font-weight:900;padding:7px auto 5px;text-transform:uppercase}.micromag-screen-urbania-horoscope-sign-modal-wordContainer{border:1px solid #1d3af2;border-radius:9px;margin-bottom:5px;padding:6px 6px 3px;text-transform:uppercase}.micromag-screen-urbania-horoscope-sign-modal-wordOfTheWeek{font-family:Agrandir Tight,sans-serif;font-size:8px;font-weight:500;letter-spacing:.03rem;padding-bottom:2px}.micromag-screen-urbania-horoscope-sign-modal-word{font-family:Agrandir Narrow,sans-serif;font-size:16px;font-weight:700}.micromag-screen-urbania-horoscope-sign-modal-description{font-family:Roboto,sans-serif;font-size:12px;line-height:1.2;padding-bottom:5px}.micromag-screen-urbania-horoscope-sign-modal-description p{margin-bottom:1em}.micromag-screen-urbania-horoscope-sign-modal-description p:last-child{margin-bottom:0}.micromag-screen-urbania-horoscope-sign-modal-illustration{height:auto;margin:0 auto;pointer-events:none;width:75%}.micromag-screen-urbania-horoscope-sign-modal-arrow{font-size:20px;padding-right:5px;vertical-align:middle}
|
|
3
|
-
.micromag-screen-urbania-horoscope-close{-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-urbania-horoscope-backdrop,.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-background,.micromag-screen-urbania-horoscope-signsGridContainer{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-urbania-horoscope-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-urbania-horoscope-disabled.micromag-screen-urbania-horoscope-container{overflow:hidden;pointer-events:none}.micromag-screen-urbania-horoscope-hidden.micromag-screen-urbania-horoscope-container{display:none;visibility:hidden}.micromag-screen-urbania-horoscope-placeholder.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-content{padding:6px;position:relative}.micromag-screen-urbania-horoscope-emptyText,.micromag-screen-urbania-horoscope-emptyTitle{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-urbania-horoscope-close.micromag-screen-urbania-horoscope-focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-urbania-horoscope-close:focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-urbania-horoscope-container{-ms-touch-action:none;touch-action:none}.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-background{z-index:0}.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-content{z-index:1}.micromag-screen-urbania-horoscope-container.micromag-screen-urbania-horoscope-isPlaceholder .micromag-screen-urbania-horoscope-layout{padding:10px}.micromag-screen-urbania-horoscope-layout{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;justify-content:space-between;text-align:center}.micromag-screen-urbania-horoscope-placeholderGrid{grid-gap:5px;display:grid;gap:5px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,1fr)}.micromag-screen-urbania-horoscope-placeholderItem{background-color:#6c6c6c;height:1.5em;width:1.5em}.micromag-screen-urbania-horoscope-emptyText,.micromag-screen-urbania-horoscope-emptyTitle{margin:10px auto;width:100%}.micromag-screen-urbania-horoscope-emptyTitle{height:100px}.micromag-screen-urbania-horoscope-emptyText{height:50px}.micromag-screen-urbania-horoscope-headerContainer{width:280px}.micromag-screen-urbania-horoscope-title{-webkit-text-stroke:1px #000f66;color:#0ff;font-family:Agrandir Tight,sans-serif;font-size:48px;font-weight:700;letter-spacing:-1px;text-shadow:-3px -3px 0 #000f66;text-transform:uppercase}.micromag-screen-urbania-horoscope-title,.micromag-screen-urbania-horoscope-titleImage{-webkit-filter:drop-shadow(0 0 6px rgba(0,0,0,.7));filter:drop-shadow(0 0 6px rgba(0,0,0,.7))}.micromag-screen-urbania-horoscope-titleImage{height:auto;width:100%}.micromag-screen-urbania-horoscope-titlePlaceholder{background-color:#343434;padding:10px}.micromag-screen-urbania-horoscope-description{color:#0ff;-webkit-filter:drop-shadow(0 0 3px rgba(0,0,0,.7));filter:drop-shadow(0 0 3px rgba(0,0,0,.7));font-family:Agrandir Tight,sans-serif;font-size:18px;font-weight:700;margin-bottom:8px;padding:10px}.micromag-screen-urbania-horoscope-description p,.micromag-screen-urbania-horoscope-description span{font-weight:700!important}.micromag-screen-urbania-horoscope-descriptionPlaceholder{padding:10px 10px 30px}.micromag-screen-urbania-horoscope-button{background-color:#fffc00;border-radius:24px;-webkit-box-shadow:0 0 0 6px rgba(255,250,0,.6);box-shadow:0 0 0 6px rgba(255,250,0,.6);padding:8px 15px 4px;-webkit-transition:-webkit-box-shadow .2s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-box-shadow .2s cubic-bezier(.41,1.69,.04,.67);transition:box-shadow .2s cubic-bezier(.41,1.69,.04,.67);transition:box-shadow .2s cubic-bezier(.41,1.69,.04,.67),-webkit-box-shadow .2s cubic-bezier(.41,1.69,.04,.67)}.micromag-screen-urbania-horoscope-button.micromag-screen-urbania-horoscope-focus-visible,.micromag-screen-urbania-horoscope-button:hover{-webkit-box-shadow:0 0 0 12px rgba(255,250,0,.6)!important;box-shadow:0 0 0 12px rgba(255,250,0,.6)!important}.micromag-screen-urbania-horoscope-button:focus-visible,.micromag-screen-urbania-horoscope-button:hover{-webkit-box-shadow:0 0 0 12px rgba(255,250,0,.6)!important;box-shadow:0 0 0 12px rgba(255,250,0,.6)!important}.micromag-screen-urbania-horoscope-button:active{-webkit-box-shadow:0 0 0 3px rgba(255,250,0,.3);box-shadow:0 0 0 3px rgba(255,250,0,.3)}.micromag-screen-urbania-horoscope-buttonLabel{color:#000;font-family:Agrandir Tight,sans-serif;font-size:22px;font-weight:700;letter-spacing:.03rem}.micromag-screen-urbania-horoscope-header{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.75)),to(rgba(0,0,0,0)));background-image:linear-gradient(rgba(0,0,0,.75),rgba(0,0,0,0));left:0;padding:10px;position:fixed;top:0;width:100%;z-index:
|
|
3
|
+
.micromag-screen-urbania-horoscope-close{-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-urbania-horoscope-backdrop,.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-background,.micromag-screen-urbania-horoscope-signsGridContainer{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-urbania-horoscope-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-urbania-horoscope-disabled.micromag-screen-urbania-horoscope-container{overflow:hidden;pointer-events:none}.micromag-screen-urbania-horoscope-hidden.micromag-screen-urbania-horoscope-container{display:none;visibility:hidden}.micromag-screen-urbania-horoscope-placeholder.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-content{padding:6px;position:relative}.micromag-screen-urbania-horoscope-emptyText,.micromag-screen-urbania-horoscope-emptyTitle{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-urbania-horoscope-close.micromag-screen-urbania-horoscope-focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-urbania-horoscope-close:focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-urbania-horoscope-container{-ms-touch-action:none;touch-action:none}.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-background{z-index:0}.micromag-screen-urbania-horoscope-container .micromag-screen-urbania-horoscope-content{z-index:1}.micromag-screen-urbania-horoscope-container.micromag-screen-urbania-horoscope-isPlaceholder .micromag-screen-urbania-horoscope-layout{padding:10px}.micromag-screen-urbania-horoscope-layout{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;justify-content:space-between;text-align:center}.micromag-screen-urbania-horoscope-placeholderGrid{grid-gap:5px;display:grid;gap:5px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,1fr)}.micromag-screen-urbania-horoscope-placeholderItem{background-color:#6c6c6c;height:1.5em;width:1.5em}.micromag-screen-urbania-horoscope-emptyText,.micromag-screen-urbania-horoscope-emptyTitle{margin:10px auto;width:100%}.micromag-screen-urbania-horoscope-emptyTitle{height:100px}.micromag-screen-urbania-horoscope-emptyText{height:50px}.micromag-screen-urbania-horoscope-headerContainer{width:280px}.micromag-screen-urbania-horoscope-title{-webkit-text-stroke:1px #000f66;color:#0ff;font-family:Agrandir Tight,sans-serif;font-size:48px;font-weight:700;letter-spacing:-1px;text-shadow:-3px -3px 0 #000f66;text-transform:uppercase}.micromag-screen-urbania-horoscope-title,.micromag-screen-urbania-horoscope-titleImage{-webkit-filter:drop-shadow(0 0 6px rgba(0,0,0,.7));filter:drop-shadow(0 0 6px rgba(0,0,0,.7))}.micromag-screen-urbania-horoscope-titleImage{height:auto;width:100%}.micromag-screen-urbania-horoscope-titlePlaceholder{background-color:#343434;padding:10px}.micromag-screen-urbania-horoscope-description{color:#0ff;-webkit-filter:drop-shadow(0 0 3px rgba(0,0,0,.7));filter:drop-shadow(0 0 3px rgba(0,0,0,.7));font-family:Agrandir Tight,sans-serif;font-size:18px;font-weight:700;margin-bottom:8px;padding:10px}.micromag-screen-urbania-horoscope-description p,.micromag-screen-urbania-horoscope-description span{font-weight:700!important}.micromag-screen-urbania-horoscope-descriptionPlaceholder{padding:10px 10px 30px}.micromag-screen-urbania-horoscope-button{background-color:#fffc00;border-radius:24px;-webkit-box-shadow:0 0 0 6px rgba(255,250,0,.6);box-shadow:0 0 0 6px rgba(255,250,0,.6);padding:8px 15px 4px;-webkit-transition:-webkit-box-shadow .2s cubic-bezier(.41,1.69,.04,.67);transition:-webkit-box-shadow .2s cubic-bezier(.41,1.69,.04,.67);transition:box-shadow .2s cubic-bezier(.41,1.69,.04,.67);transition:box-shadow .2s cubic-bezier(.41,1.69,.04,.67),-webkit-box-shadow .2s cubic-bezier(.41,1.69,.04,.67)}.micromag-screen-urbania-horoscope-button.micromag-screen-urbania-horoscope-focus-visible,.micromag-screen-urbania-horoscope-button:hover{-webkit-box-shadow:0 0 0 12px rgba(255,250,0,.6)!important;box-shadow:0 0 0 12px rgba(255,250,0,.6)!important}.micromag-screen-urbania-horoscope-button:focus-visible,.micromag-screen-urbania-horoscope-button:hover{-webkit-box-shadow:0 0 0 12px rgba(255,250,0,.6)!important;box-shadow:0 0 0 12px rgba(255,250,0,.6)!important}.micromag-screen-urbania-horoscope-button:active{-webkit-box-shadow:0 0 0 3px rgba(255,250,0,.3);box-shadow:0 0 0 3px rgba(255,250,0,.3)}.micromag-screen-urbania-horoscope-buttonLabel{color:#000;font-family:Agrandir Tight,sans-serif;font-size:22px;font-weight:700;letter-spacing:.03rem}.micromag-screen-urbania-horoscope-header{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.75)),to(rgba(0,0,0,0)));background-image:linear-gradient(rgba(0,0,0,.75),rgba(0,0,0,0));left:0;padding:10px;position:fixed;top:0;width:100%;z-index:5}.micromag-screen-urbania-horoscope-buttons,.micromag-screen-urbania-horoscope-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.micromag-screen-urbania-horoscope-buttons{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative}.micromag-screen-urbania-horoscope-close{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:700;margin-left:auto}.micromag-screen-urbania-horoscope-close.micromag-screen-urbania-horoscope-focus-visible{-webkit-box-shadow:0 0 2px 0 #fff;box-shadow:0 0 2px 0 #fff}.micromag-screen-urbania-horoscope-close:focus-visible{-webkit-box-shadow:0 0 2px 0 #fff;box-shadow:0 0 2px 0 #fff}.micromag-screen-urbania-horoscope-signsGridContainer{padding:2.5rem 1rem;-ms-touch-action:none;touch-action:none;z-index:3}.micromag-screen-urbania-horoscope-signsGridContainer.micromag-screen-urbania-horoscope-isPlaceholder{padding:0}.micromag-screen-urbania-horoscope-signs{-webkit-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between}.micromag-screen-urbania-horoscope-author{color:#0ff;-webkit-filter:drop-shadow(0 0 3px rgba(0,0,0,.7));filter:drop-shadow(0 0 3px rgba(0,0,0,.7));margin:5px auto 0;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.micromag-screen-urbania-horoscope-collaborator{color:#0ff}.micromag-screen-urbania-horoscope-authorBackground{background-color:#161719!important}.micromag-screen-urbania-horoscope-authorBackground p{font-weight:400!important;text-transform:none!important}.micromag-screen-urbania-horoscope-modal{height:100%;left:0;position:fixed;right:0;top:0;-ms-touch-action:none;touch-action:none;width:100%;z-index:4}.micromag-screen-urbania-horoscope-backdrop{background-color:rgba(0,0,0,.75);pointer-events:none;z-index:1}.micromag-screen-urbania-horoscope-backdropVideo{pointer-events:none}
|
package/es/index.js
CHANGED
|
@@ -590,11 +590,15 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
590
590
|
trackScreenEvent('open');
|
|
591
591
|
}, [disableInteraction, trackScreenEvent]);
|
|
592
592
|
var onCloseSignsGrid = useCallback(function () {
|
|
593
|
+
if (showModal) {
|
|
594
|
+
setShowModal(false);
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
593
597
|
setShowSignsGrid(false);
|
|
594
598
|
setShowModal(false); // can't have a modal if signs are closed
|
|
595
599
|
enableInteraction();
|
|
596
600
|
trackScreenEvent('close');
|
|
597
|
-
}, [setShowSignsGrid, setShowModal, enableInteraction, trackScreenEvent]);
|
|
601
|
+
}, [showModal, setShowSignsGrid, setShowModal, enableInteraction, trackScreenEvent]);
|
|
598
602
|
var onSelectSign = useCallback(function (e, id) {
|
|
599
603
|
e.stopPropagation();
|
|
600
604
|
var foundSignIndex = signs.findIndex(function (s) {
|
|
@@ -614,6 +618,9 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
614
618
|
my = _ref5$movement[1],
|
|
615
619
|
_ref5$velocity = _slicedToArray(_ref5.velocity, 2),
|
|
616
620
|
vy = _ref5$velocity[1];
|
|
621
|
+
console.log({
|
|
622
|
+
dragActive: dragActive
|
|
623
|
+
});
|
|
617
624
|
var progress = Math.max(0, my) / (window.innerHeight * 0.8);
|
|
618
625
|
var reachedThreshold = vy > 0.3 || Math.abs(progress) > 0.3;
|
|
619
626
|
if (!dragActive) {
|
|
@@ -623,7 +630,7 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
623
630
|
return reachedThreshold ? 0 : 1;
|
|
624
631
|
}
|
|
625
632
|
return 1 - progress;
|
|
626
|
-
}, [
|
|
633
|
+
}, [onCloseSignsGrid]);
|
|
627
634
|
var _useDragProgress = useDragProgress({
|
|
628
635
|
disabled: !isView,
|
|
629
636
|
progress: showSignsGrid ? 1 : 0,
|
|
@@ -642,6 +649,7 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
642
649
|
}),
|
|
643
650
|
bindSignsDrag = _useDragProgress.bind,
|
|
644
651
|
showSignsGridProgress = _useDragProgress.progress;
|
|
652
|
+
console.log(showSignsGrid);
|
|
645
653
|
var computeModalProgress = useCallback(function (_ref6) {
|
|
646
654
|
var dragActive = _ref6.active,
|
|
647
655
|
_ref6$movement = _slicedToArray(_ref6.movement, 2),
|
package/lib/index.js
CHANGED
|
@@ -594,11 +594,15 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
594
594
|
trackScreenEvent('open');
|
|
595
595
|
}, [disableInteraction, trackScreenEvent]);
|
|
596
596
|
var onCloseSignsGrid = React.useCallback(function () {
|
|
597
|
+
if (showModal) {
|
|
598
|
+
setShowModal(false);
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
597
601
|
setShowSignsGrid(false);
|
|
598
602
|
setShowModal(false); // can't have a modal if signs are closed
|
|
599
603
|
enableInteraction();
|
|
600
604
|
trackScreenEvent('close');
|
|
601
|
-
}, [setShowSignsGrid, setShowModal, enableInteraction, trackScreenEvent]);
|
|
605
|
+
}, [showModal, setShowSignsGrid, setShowModal, enableInteraction, trackScreenEvent]);
|
|
602
606
|
var onSelectSign = React.useCallback(function (e, id) {
|
|
603
607
|
e.stopPropagation();
|
|
604
608
|
var foundSignIndex = signs.findIndex(function (s) {
|
|
@@ -618,6 +622,9 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
618
622
|
my = _ref5$movement[1],
|
|
619
623
|
_ref5$velocity = _slicedToArray(_ref5.velocity, 2),
|
|
620
624
|
vy = _ref5$velocity[1];
|
|
625
|
+
console.log({
|
|
626
|
+
dragActive: dragActive
|
|
627
|
+
});
|
|
621
628
|
var progress = Math.max(0, my) / (window.innerHeight * 0.8);
|
|
622
629
|
var reachedThreshold = vy > 0.3 || Math.abs(progress) > 0.3;
|
|
623
630
|
if (!dragActive) {
|
|
@@ -627,7 +634,7 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
627
634
|
return reachedThreshold ? 0 : 1;
|
|
628
635
|
}
|
|
629
636
|
return 1 - progress;
|
|
630
|
-
}, [
|
|
637
|
+
}, [onCloseSignsGrid]);
|
|
631
638
|
var _useDragProgress = hooks.useDragProgress({
|
|
632
639
|
disabled: !isView,
|
|
633
640
|
progress: showSignsGrid ? 1 : 0,
|
|
@@ -646,6 +653,7 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
646
653
|
}),
|
|
647
654
|
bindSignsDrag = _useDragProgress.bind,
|
|
648
655
|
showSignsGridProgress = _useDragProgress.progress;
|
|
656
|
+
console.log(showSignsGrid);
|
|
649
657
|
var computeModalProgress = React.useCallback(function (_ref6) {
|
|
650
658
|
var dragActive = _ref6.active,
|
|
651
659
|
_ref6$movement = _slicedToArray(_ref6.movement, 2),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-urbania-horoscope",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.506",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -63,19 +63,19 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@babel/runtime": "^7.13.10",
|
|
66
|
-
"@micromag/core": "^0.3.
|
|
67
|
-
"@micromag/element-background": "^0.3.
|
|
68
|
-
"@micromag/element-button": "^0.3.
|
|
69
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
70
|
-
"@micromag/element-container": "^0.3.
|
|
71
|
-
"@micromag/element-grid": "^0.3.
|
|
72
|
-
"@micromag/element-heading": "^0.3.
|
|
73
|
-
"@micromag/element-keypad": "^0.3.
|
|
74
|
-
"@micromag/element-layout": "^0.3.
|
|
75
|
-
"@micromag/element-scroll": "^0.3.
|
|
76
|
-
"@micromag/element-text": "^0.3.
|
|
77
|
-
"@micromag/element-urbania-author": "^0.3.
|
|
78
|
-
"@micromag/transforms": "^0.3.
|
|
66
|
+
"@micromag/core": "^0.3.506",
|
|
67
|
+
"@micromag/element-background": "^0.3.506",
|
|
68
|
+
"@micromag/element-button": "^0.3.506",
|
|
69
|
+
"@micromag/element-call-to-action": "^0.3.506",
|
|
70
|
+
"@micromag/element-container": "^0.3.506",
|
|
71
|
+
"@micromag/element-grid": "^0.3.506",
|
|
72
|
+
"@micromag/element-heading": "^0.3.506",
|
|
73
|
+
"@micromag/element-keypad": "^0.3.506",
|
|
74
|
+
"@micromag/element-layout": "^0.3.506",
|
|
75
|
+
"@micromag/element-scroll": "^0.3.506",
|
|
76
|
+
"@micromag/element-text": "^0.3.506",
|
|
77
|
+
"@micromag/element-urbania-author": "^0.3.506",
|
|
78
|
+
"@micromag/transforms": "^0.3.506",
|
|
79
79
|
"@react-spring/core": "^9.6.1",
|
|
80
80
|
"@react-spring/web": "^9.6.1",
|
|
81
81
|
"@use-gesture/react": "^10.3.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"access": "public",
|
|
92
92
|
"registry": "https://registry.npmjs.org/"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "b3bc0905b6e926384f26f5807551c772ccc55452"
|
|
95
95
|
}
|