@micromag/screen-game-sort 0.3.714 → 0.3.716

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.
@@ -1 +1 @@
1
- .micromag-screen-game-sort-layout{scrollbar-width:none}.micromag-screen-game-sort-layout::-webkit-scrollbar{display:none}.micromag-screen-game-sort-button.micromag-screen-game-sort-layoutLabelOver .micromag-screen-game-sort-buttonLabel,.micromag-screen-game-sort-container .micromag-screen-game-sort-background{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-game-sort-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-game-sort-disabled.micromag-screen-game-sort-container{overflow:hidden;pointer-events:none}.micromag-screen-game-sort-hidden.micromag-screen-game-sort-container{display:none;visibility:hidden}.micromag-screen-game-sort-placeholder.micromag-screen-game-sort-container .micromag-screen-game-sort-content{padding:6px;position:relative}.micromag-screen-game-sort-emptyHeading,.micromag-screen-game-sort-emptyItems{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-game-sort-container .micromag-screen-game-sort-background{z-index:0}.micromag-screen-game-sort-container .micromag-screen-game-sort-content{z-index:1}.micromag-screen-game-sort-container .micromag-screen-game-sort-heading{margin-bottom:10px}.micromag-screen-game-sort-layout{overflow-x:hidden;overflow-y:auto;padding:10px}.micromag-screen-game-sort-emptyHeading,.micromag-screen-game-sort-emptyItems{margin:10px auto;padding:10px;width:100%}.micromag-screen-game-sort-emptyItems{padding:40px}.micromag-screen-game-sort-header{left:0;margin-top:0;position:absolute;top:0;width:100%;z-index:1}.micromag-screen-game-sort-footer{bottom:0;left:0;margin-top:0;position:absolute;width:100%}.micromag-screen-game-sort-items{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.micromag-screen-game-sort-item{border-radius:0;display:block;opacity:0;padding-bottom:10px;-ms-touch-action:none;touch-action:none;-webkit-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;width:100%}.micromag-screen-game-sort-sorted .micromag-screen-game-sort-item{opacity:1}.micromag-screen-game-sort-button{background-clip:padding-box;background-color:hsla(0,0%,100%,.1);display:block;padding:10px;text-align:center;width:100%}.micromag-screen-game-sort-isEmpty .micromag-screen-game-sort-button{min-height:2em}.micromag-screen-game-sort-valid .micromag-screen-game-sort-button{background:rgba(0,255,0,.4)}.micromag-screen-game-sort-invalid .micromag-screen-game-sort-button{background:rgba(255,0,0,.4)}.micromag-screen-game-sort-button.micromag-screen-game-sort-layoutLabelTop{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.micromag-screen-game-sort-button.micromag-screen-game-sort-layoutNoLabel .micromag-screen-game-sort-buttonLabel{display:none}.micromag-screen-game-sort-button.micromag-screen-game-sort-layoutLabelOver .micromag-screen-game-sort-buttonVisual{position:relative;z-index:1}.micromag-screen-game-sort-button.micromag-screen-game-sort-layoutLabelOver .micromag-screen-game-sort-buttonLabel{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}.micromag-screen-game-sort-submitButton{background:#fff;color:#000;padding:10px}.micromag-screen-game-sort-submitButton:disabled{opacity:.5}
1
+ .micromag-screen-game-sort-layout{scrollbar-width:none}.micromag-screen-game-sort-layout::-webkit-scrollbar{display:none}.micromag-screen-game-sort-button.micromag-screen-game-sort-layoutLabelOver .micromag-screen-game-sort-buttonLabel,.micromag-screen-game-sort-container .micromag-screen-game-sort-background{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-game-sort-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-game-sort-disabled.micromag-screen-game-sort-container{overflow:hidden;pointer-events:none}.micromag-screen-game-sort-hidden.micromag-screen-game-sort-container{display:none;visibility:hidden}.micromag-screen-game-sort-placeholder.micromag-screen-game-sort-container .micromag-screen-game-sort-content{padding:6px;position:relative}.micromag-screen-game-sort-emptyHeading,.micromag-screen-game-sort-emptyItems{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-game-sort-container .micromag-screen-game-sort-background{z-index:0}.micromag-screen-game-sort-container .micromag-screen-game-sort-content{z-index:1}.micromag-screen-game-sort-container .micromag-screen-game-sort-heading{font-size:1rem;font-weight:400;margin-bottom:.5em}.micromag-screen-game-sort-layout{overflow-x:hidden;overflow-y:auto;padding:10px}.micromag-screen-game-sort-emptyHeading,.micromag-screen-game-sort-emptyItems{margin:10px auto;padding:10px;width:100%}.micromag-screen-game-sort-emptyItems{padding:40px}.micromag-screen-game-sort-header{left:0;margin-top:0;position:absolute;top:0;width:100%;z-index:1}.micromag-screen-game-sort-footer{bottom:0;left:0;margin-top:0;position:absolute;width:100%}.micromag-screen-game-sort-items{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.micromag-screen-game-sort-item{border-radius:0;display:block;opacity:0;padding-bottom:.3em;-ms-touch-action:none;touch-action:none;-webkit-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;width:100%}.micromag-screen-game-sort-sorted .micromag-screen-game-sort-item{opacity:1}.micromag-screen-game-sort-button{background-clip:padding-box;background-color:hsla(0,0%,100%,.1);display:block;padding:.5em;text-align:center;width:100%}.micromag-screen-game-sort-isEmpty .micromag-screen-game-sort-button{min-height:2em}.micromag-screen-game-sort-valid .micromag-screen-game-sort-button{background:rgba(0,255,0,.4)}.micromag-screen-game-sort-invalid .micromag-screen-game-sort-button{background:rgba(255,0,0,.4)}.micromag-screen-game-sort-button.micromag-screen-game-sort-layoutLabelTop{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.micromag-screen-game-sort-button.micromag-screen-game-sort-layoutNoLabel .micromag-screen-game-sort-buttonLabel{display:none}.micromag-screen-game-sort-button.micromag-screen-game-sort-layoutLabelOver .micromag-screen-game-sort-buttonVisual{position:relative;z-index:1}.micromag-screen-game-sort-button.micromag-screen-game-sort-layoutLabelOver .micromag-screen-game-sort-buttonLabel{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}.micromag-screen-game-sort-submitButton{background:#fff;color:#000;margin-top:.3em;padding:.75em}.micromag-screen-game-sort-submitButton:disabled{opacity:.5}
package/es/index.js CHANGED
@@ -14,7 +14,7 @@ import { PropTypes as PropTypes$1 } from '@micromag/core';
14
14
  import { ScreenElement } from '@micromag/core/components';
15
15
  import { useScreenSize, useScreenRenderContext, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
16
16
  import { useDimensionObserver, useTrackScreenEvent } from '@micromag/core/hooks';
17
- import { isHeaderFilled, isFooterFilled, getFooterProps, getStyleFromBox, getStyleFromText } from '@micromag/core/utils';
17
+ import { isHeaderFilled, isFooterFilled, getFooterProps, getStyleFromText, getStyleFromBox } from '@micromag/core/utils';
18
18
  import Background from '@micromag/element-background';
19
19
  import Button from '@micromag/element-button';
20
20
  import Container from '@micromag/element-container';
@@ -403,11 +403,13 @@ var ShareScreen = function ShareScreen(_ref) {
403
403
  return /*#__PURE__*/React.createElement(animated.div, Object.assign({
404
404
  key: "button-".concat(itemIndex),
405
405
  className: classNames([styles.item, _defineProperty(_defineProperty(_defineProperty({}, styles.isEmpty, isEmpty), styles.valid, validated !== null && isValid), styles.invalid, validated !== null && !isValid)]),
406
- style: props,
407
406
  ref: function ref(_ref1) {
408
407
  itemsRef.current[itemIndex] = _ref1;
409
408
  }
410
- }, bind(itemIndex)), /*#__PURE__*/React.createElement("div", {
409
+ }, bind(itemIndex), {
410
+ style: _objectSpread(_objectSpread(_objectSpread({}, props), getStyleFromText(buttonTextStyle)), getStyleFromText(textStyle))
411
+ // onClick={(e) => onItemClick(e, item)}
412
+ }), /*#__PURE__*/React.createElement("div", {
411
413
  className: classNames([styles.button, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles.layoutLabelBottom, buttonLayout === 'label-bottom'), styles.layoutLabelTop, buttonLayout === 'label-top'), styles.layoutNoLabel, buttonLayout === 'no-label'), styles.layoutLabelOver, buttonLayout === 'label-over')]),
412
414
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, getStyleFromBox(buttonBoxStyle)), getStyleFromBox(boxStyle)), getStyleFromBox(validated && isValid ? validBoxStyle : null)), getStyleFromBox(validated && !isValid ? invalidBoxStyle : null))
413
415
  // onClick={(e) => onItemClick(e, item, itemIndex)}
@@ -486,10 +488,10 @@ var definition = {
486
488
  order: 12
487
489
  },
488
490
  title: defineMessage({
489
- id: "OOIQh7",
491
+ id: "eJMcXw",
490
492
  defaultMessage: [{
491
493
  "type": 0,
492
- "value": "Game Sort"
494
+ "value": "Sort game"
493
495
  }]
494
496
  }),
495
497
  component: ShareScreen,
@@ -533,15 +535,6 @@ var definition = {
533
535
  }, {
534
536
  name: 'buttonStyles',
535
537
  type: 'fields',
536
- defaultValue: {
537
- layout: 'label-bottom',
538
- boxStyle: {
539
- backgroundColor: {
540
- alpha: 0.15,
541
- color: '#000000'
542
- }
543
- }
544
- },
545
538
  isList: true,
546
539
  fields: [{
547
540
  name: 'layout',
@@ -567,30 +560,30 @@ var definition = {
567
560
  name: 'boxStyle',
568
561
  type: 'box-style-form',
569
562
  label: defineMessage({
570
- id: "nno1Pq",
563
+ id: "rlOUqL",
571
564
  defaultMessage: [{
572
565
  "type": 0,
573
- "value": "Button style"
566
+ "value": "Buttons style"
574
567
  }]
575
568
  })
576
569
  }, {
577
570
  name: 'validBoxStyle',
578
571
  type: 'box-style-form',
579
572
  label: defineMessage({
580
- id: "6bqjZK",
573
+ id: "wJm7+k",
581
574
  defaultMessage: [{
582
575
  "type": 0,
583
- "value": "Valid button style"
576
+ "value": "Valid buttons style"
584
577
  }]
585
578
  })
586
579
  }, {
587
580
  name: 'invalidBoxStyle',
588
581
  type: 'box-style-form',
589
582
  label: defineMessage({
590
- id: "NPpncq",
583
+ id: "0N19DP",
591
584
  defaultMessage: [{
592
585
  "type": 0,
593
- "value": "Invalid button style"
586
+ "value": "Invalid buttons style"
594
587
  }]
595
588
  })
596
589
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-game-sort",
3
- "version": "0.3.714",
3
+ "version": "0.3.716",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -87,5 +87,5 @@
87
87
  "access": "public",
88
88
  "registry": "https://registry.npmjs.org/"
89
89
  },
90
- "gitHead": "85dd03193fcac7776b74d8a41a2ebf116890b507"
90
+ "gitHead": "194b2ca0d8d059fb858b7d604b95b896d9cefd9b"
91
91
  }