@micromag/screen-game-sort 0.3.718 → 0.3.719
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 +55 -30
- package/package.json +2 -2
package/assets/css/styles.css
CHANGED
|
@@ -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{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;-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-item .micromag-screen-game-sort-button{margin-bottom:.3em}.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;position:relative;text-align:center;width:100%}.micromag-screen-game-sort-button .micromag-screen-game-sort-buttonLabel{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.micromag-screen-game-sort-button .micromag-screen-game-sort-
|
|
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;-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-item .micromag-screen-game-sort-button{margin-bottom:.3em}.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;position:relative;text-align:center;width:100%}.micromag-screen-game-sort-button .micromag-screen-game-sort-buttonLabel{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.micromag-screen-game-sort-button .micromag-screen-game-sort-buttonResults{-webkit-animation:micromag-screen-game-sort-fadeIn .2s ease-in-out;animation:micromag-screen-game-sort-fadeIn .2s ease-in-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;margin-left:auto;padding-left:2em}.micromag-screen-game-sort-button .micromag-screen-game-sort-label{-webkit-transition:text-align .2s ease-in-out;transition:text-align .2s ease-in-out}.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-resultsVisible .micromag-screen-game-sort-button .micromag-screen-game-sort-label{text-align:left}.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{min-height:2em}.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;height:auto;padding:.5em;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}.micromag-screen-game-sort-results{-webkit-animation:micromag-screen-game-sort-fadeIn .2s ease-in-out;animation:micromag-screen-game-sort-fadeIn .2s ease-in-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;margin-top:.3em}@-webkit-keyframes micromag-screen-game-sort-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes micromag-screen-game-sort-fadeIn{0%{opacity:0}to{opacity:1}}
|
package/es/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import Layout, { Spacer } from '@micromag/element-layout';
|
|
|
25
25
|
import Text from '@micromag/element-text';
|
|
26
26
|
import Visual from '@micromag/element-visual';
|
|
27
27
|
|
|
28
|
-
var styles = {"layout":"micromag-screen-game-sort-layout","button":"micromag-screen-game-sort-button","layoutLabelOver":"micromag-screen-game-sort-layoutLabelOver","buttonLabel":"micromag-screen-game-sort-buttonLabel","container":"micromag-screen-game-sort-container","background":"micromag-screen-game-sort-background","content":"micromag-screen-game-sort-content","emptyHeading":"micromag-screen-game-sort-emptyHeading","emptyItems":"micromag-screen-game-sort-emptyItems","heading":"micromag-screen-game-sort-heading","header":"micromag-screen-game-sort-header","footer":"micromag-screen-game-sort-footer","items":"micromag-screen-game-sort-items","item":"micromag-screen-game-sort-item","sorted":"micromag-screen-game-sort-sorted","
|
|
28
|
+
var styles = {"layout":"micromag-screen-game-sort-layout","button":"micromag-screen-game-sort-button","layoutLabelOver":"micromag-screen-game-sort-layoutLabelOver","buttonLabel":"micromag-screen-game-sort-buttonLabel","container":"micromag-screen-game-sort-container","background":"micromag-screen-game-sort-background","content":"micromag-screen-game-sort-content","emptyHeading":"micromag-screen-game-sort-emptyHeading","emptyItems":"micromag-screen-game-sort-emptyItems","heading":"micromag-screen-game-sort-heading","header":"micromag-screen-game-sort-header","footer":"micromag-screen-game-sort-footer","items":"micromag-screen-game-sort-items","item":"micromag-screen-game-sort-item","sorted":"micromag-screen-game-sort-sorted","buttonResults":"micromag-screen-game-sort-buttonResults","label":"micromag-screen-game-sort-label","isEmpty":"micromag-screen-game-sort-isEmpty","valid":"micromag-screen-game-sort-valid","invalid":"micromag-screen-game-sort-invalid","resultsVisible":"micromag-screen-game-sort-resultsVisible","layoutLabelTop":"micromag-screen-game-sort-layoutLabelTop","layoutNoLabel":"micromag-screen-game-sort-layoutNoLabel","buttonVisual":"micromag-screen-game-sort-buttonVisual","submitButton":"micromag-screen-game-sort-submitButton","results":"micromag-screen-game-sort-results"};
|
|
29
29
|
|
|
30
30
|
var propTypes = {
|
|
31
31
|
layout: PropTypes.oneOf(['top', 'middle', 'bottom']),
|
|
@@ -36,13 +36,14 @@ var propTypes = {
|
|
|
36
36
|
itemsLayout: PropTypes.oneOf(['label-bottom', 'label-top', 'no-label', 'label-over']),
|
|
37
37
|
itemsBoxStyle: PropTypes$1.boxStyle,
|
|
38
38
|
itemsTextStyle: PropTypes$1.textStyle,
|
|
39
|
-
|
|
39
|
+
itemsResultsTextStyle: PropTypes$1.textStyle,
|
|
40
40
|
validBoxStyle: PropTypes$1.boxStyle,
|
|
41
41
|
invalidBoxStyle: PropTypes$1.boxStyle,
|
|
42
42
|
submitBoxStyle: PropTypes$1.boxStyle,
|
|
43
43
|
submitTextStyle: PropTypes$1.textStyle,
|
|
44
44
|
submitButtonLabel: PropTypes.string,
|
|
45
|
-
|
|
45
|
+
results: PropTypes$1.textElement,
|
|
46
|
+
resultsBoxStyle: PropTypes$1.boxStyle,
|
|
46
47
|
background: PropTypes$1.backgroundElement,
|
|
47
48
|
header: PropTypes$1.header,
|
|
48
49
|
footer: PropTypes$1.footer,
|
|
@@ -58,13 +59,14 @@ var defaultProps = {
|
|
|
58
59
|
itemsLayout: 'label-bottom',
|
|
59
60
|
itemsBoxStyle: null,
|
|
60
61
|
itemsTextStyle: null,
|
|
61
|
-
|
|
62
|
+
itemsResultsTextStyle: null,
|
|
62
63
|
validBoxStyle: null,
|
|
63
64
|
invalidBoxStyle: null,
|
|
64
65
|
submitBoxStyle: null,
|
|
65
66
|
submitTextStyle: null,
|
|
66
67
|
submitButtonLabel: null,
|
|
67
|
-
|
|
68
|
+
results: null,
|
|
69
|
+
resultsBoxStyle: null,
|
|
68
70
|
background: null,
|
|
69
71
|
header: null,
|
|
70
72
|
footer: null,
|
|
@@ -80,13 +82,14 @@ var ShareScreen = function ShareScreen(_ref) {
|
|
|
80
82
|
itemsLayout = _ref.itemsLayout,
|
|
81
83
|
itemsBoxStyle = _ref.itemsBoxStyle,
|
|
82
84
|
itemsTextStyle = _ref.itemsTextStyle,
|
|
83
|
-
|
|
85
|
+
itemsResultsTextStyle = _ref.itemsResultsTextStyle,
|
|
84
86
|
validBoxStyle = _ref.validBoxStyle,
|
|
85
87
|
invalidBoxStyle = _ref.invalidBoxStyle,
|
|
86
88
|
submitBoxStyle = _ref.submitBoxStyle,
|
|
87
89
|
submitTextStyle = _ref.submitTextStyle,
|
|
88
90
|
submitButtonLabel = _ref.submitButtonLabel,
|
|
89
|
-
|
|
91
|
+
results = _ref.results,
|
|
92
|
+
resultsBoxStyle = _ref.resultsBoxStyle,
|
|
90
93
|
background = _ref.background,
|
|
91
94
|
header = _ref.header,
|
|
92
95
|
footer = _ref.footer,
|
|
@@ -391,7 +394,7 @@ var ShareScreen = function ShareScreen(_ref) {
|
|
|
391
394
|
_ref7$boxStyle = _ref7.boxStyle,
|
|
392
395
|
boxStyle = _ref7$boxStyle === void 0 ? null : _ref7$boxStyle,
|
|
393
396
|
_ref7$results = _ref7.results,
|
|
394
|
-
|
|
397
|
+
itemResults = _ref7$results === void 0 ? null : _ref7$results;
|
|
395
398
|
var finalLabel = isString(itemLabel) ? {
|
|
396
399
|
body: itemLabel
|
|
397
400
|
} : itemLabel || {};
|
|
@@ -425,28 +428,25 @@ var ShareScreen = function ShareScreen(_ref) {
|
|
|
425
428
|
imageClassName: styles.thumbnail,
|
|
426
429
|
media: visual,
|
|
427
430
|
width: "auto"
|
|
428
|
-
}) : null, label !== null ||
|
|
431
|
+
}) : null, label !== null || itemResults !== null && resultsVisible ? /*#__PURE__*/React.createElement("div", {
|
|
429
432
|
className: styles.buttonLabel
|
|
430
433
|
}, label !== null ? /*#__PURE__*/React.createElement(Text, Object.assign({}, finalLabel, {
|
|
431
434
|
style: _objectSpread(_objectSpread({}, getStyleFromBox(itemsTextStyle)), getStyleFromText(labelTextStyle)),
|
|
432
435
|
className: styles.label
|
|
433
|
-
})) : null,
|
|
434
|
-
className: styles.
|
|
435
|
-
style: _objectSpread(_objectSpread({}, getStyleFromText(
|
|
436
|
+
})) : null, itemResults !== null && resultsVisible ? /*#__PURE__*/React.createElement(Text, Object.assign({}, itemResults, {
|
|
437
|
+
className: styles.buttonResults,
|
|
438
|
+
style: _objectSpread(_objectSpread({}, getStyleFromText(itemsResultsTextStyle)), getStyleFromText(itemResults.textStyle || null))
|
|
436
439
|
})) : null) : null));
|
|
437
|
-
})), /*#__PURE__*/React.createElement(
|
|
440
|
+
})), resultsVisible && results !== null ? /*#__PURE__*/React.createElement(Text, Object.assign({}, results, {
|
|
441
|
+
className: styles.results,
|
|
442
|
+
style: _objectSpread({}, getStyleFromBox(resultsBoxStyle))
|
|
443
|
+
})) : /*#__PURE__*/React.createElement(Button, {
|
|
438
444
|
className: styles.submitButton,
|
|
439
445
|
disabled: validated !== null,
|
|
440
446
|
type: "button",
|
|
441
447
|
onClick: onClickSubmit,
|
|
442
448
|
style: _objectSpread(_objectSpread({}, getStyleFromBox(submitBoxStyle)), getStyleFromText(submitTextStyle))
|
|
443
|
-
},
|
|
444
|
-
id: "CTculh",
|
|
445
|
-
defaultMessage: [{
|
|
446
|
-
"type": 0,
|
|
447
|
-
"value": "Validated"
|
|
448
|
-
}]
|
|
449
|
-
}) : submitButtonLabel || intl.formatMessage({
|
|
449
|
+
}, submitButtonLabel || intl.formatMessage({
|
|
450
450
|
id: "IbZVf0",
|
|
451
451
|
defaultMessage: [{
|
|
452
452
|
"type": 0,
|
|
@@ -627,16 +627,6 @@ var definition = {
|
|
|
627
627
|
"value": "Label"
|
|
628
628
|
}]
|
|
629
629
|
})
|
|
630
|
-
}, {
|
|
631
|
-
name: 'validatedButtonLabel',
|
|
632
|
-
type: 'text',
|
|
633
|
-
label: defineMessage({
|
|
634
|
-
id: "wROB6F",
|
|
635
|
-
defaultMessage: [{
|
|
636
|
-
"type": 0,
|
|
637
|
-
"value": "Validated label"
|
|
638
|
-
}]
|
|
639
|
-
})
|
|
640
630
|
}, {
|
|
641
631
|
name: 'submitBoxStyle',
|
|
642
632
|
type: 'box-style-form',
|
|
@@ -658,6 +648,41 @@ var definition = {
|
|
|
658
648
|
}]
|
|
659
649
|
})
|
|
660
650
|
}]
|
|
651
|
+
}, {
|
|
652
|
+
label: defineMessage({
|
|
653
|
+
id: "jINZkT",
|
|
654
|
+
defaultMessage: [{
|
|
655
|
+
"type": 0,
|
|
656
|
+
"value": "Results"
|
|
657
|
+
}]
|
|
658
|
+
}),
|
|
659
|
+
type: 'fields',
|
|
660
|
+
isList: true,
|
|
661
|
+
isSection: true,
|
|
662
|
+
fields: [{
|
|
663
|
+
name: 'results',
|
|
664
|
+
type: 'text-element',
|
|
665
|
+
theme: {
|
|
666
|
+
textStyle: 'text'
|
|
667
|
+
},
|
|
668
|
+
label: defineMessage({
|
|
669
|
+
id: "ZMS1Wv",
|
|
670
|
+
defaultMessage: [{
|
|
671
|
+
"type": 0,
|
|
672
|
+
"value": "Text"
|
|
673
|
+
}]
|
|
674
|
+
})
|
|
675
|
+
}, {
|
|
676
|
+
name: 'resultsBoxStyle',
|
|
677
|
+
type: 'box-style-form',
|
|
678
|
+
label: defineMessage({
|
|
679
|
+
id: "p1pghO",
|
|
680
|
+
defaultMessage: [{
|
|
681
|
+
"type": 0,
|
|
682
|
+
"value": "Box style"
|
|
683
|
+
}]
|
|
684
|
+
})
|
|
685
|
+
}]
|
|
661
686
|
}, {
|
|
662
687
|
name: 'background',
|
|
663
688
|
type: 'background',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-game-sort",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.719",
|
|
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": "
|
|
90
|
+
"gitHead": "edd6a658bf8d26923d14de5f111130b3c62090e6"
|
|
91
91
|
}
|