Update gh-pages
parent
2dacd30dc8
commit
3b6fd1516f
|
@ -2509,7 +2509,6 @@ function (_React$PureComponent) {
|
||||||
_this.i18n = (0, _utils.deepMerge)(I18N, props.i18n);
|
_this.i18n = (0, _utils.deepMerge)(I18N, props.i18n);
|
||||||
_this.icons = (0, _utils.deepMerge)(icons, props.icons);
|
_this.icons = (0, _utils.deepMerge)(icons, props.icons);
|
||||||
_this.state = {
|
_this.state = {
|
||||||
skin: props.skin || _store["default"].get('skin') || props.defaultSkin,
|
|
||||||
firstRender: true
|
firstRender: true
|
||||||
};
|
};
|
||||||
_this.categories = [];
|
_this.categories = [];
|
||||||
|
@ -2623,7 +2622,6 @@ function (_React$PureComponent) {
|
||||||
_this.handleSkinChange = _this.handleSkinChange.bind((0, _assertThisInitialized2["default"])(_this));
|
_this.handleSkinChange = _this.handleSkinChange.bind((0, _assertThisInitialized2["default"])(_this));
|
||||||
_this.handleKeyDown = _this.handleKeyDown.bind((0, _assertThisInitialized2["default"])(_this));
|
_this.handleKeyDown = _this.handleKeyDown.bind((0, _assertThisInitialized2["default"])(_this));
|
||||||
_this.handleDarkMatchMediaChange = _this.handleDarkMatchMediaChange.bind((0, _assertThisInitialized2["default"])(_this));
|
_this.handleDarkMatchMediaChange = _this.handleDarkMatchMediaChange.bind((0, _assertThisInitialized2["default"])(_this));
|
||||||
_this.state.theme = _this.getPreferredTheme();
|
|
||||||
return _this;
|
return _this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2672,6 +2670,7 @@ function (_React$PureComponent) {
|
||||||
key: "getPreferredTheme",
|
key: "getPreferredTheme",
|
||||||
value: function getPreferredTheme() {
|
value: function getPreferredTheme() {
|
||||||
if (this.props.theme != 'auto') return this.props.theme;
|
if (this.props.theme != 'auto') return this.props.theme;
|
||||||
|
if (this.state.theme) return this.state.theme;
|
||||||
if (typeof matchMedia !== 'function') return _sharedDefaultProps.PickerDefaultProps.theme;
|
if (typeof matchMedia !== 'function') return _sharedDefaultProps.PickerDefaultProps.theme;
|
||||||
|
|
||||||
if (!this.darkMatchMedia) {
|
if (!this.darkMatchMedia) {
|
||||||
|
@ -2686,7 +2685,7 @@ function (_React$PureComponent) {
|
||||||
key: "handleDarkMatchMediaChange",
|
key: "handleDarkMatchMediaChange",
|
||||||
value: function handleDarkMatchMediaChange() {
|
value: function handleDarkMatchMediaChange() {
|
||||||
this.setState({
|
this.setState({
|
||||||
theme: this.getPreferredTheme()
|
theme: this.darkMatchMedia.matches ? 'dark' : 'light'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
@ -2999,11 +2998,10 @@ function (_React$PureComponent) {
|
||||||
autoFocus = _this$props.autoFocus,
|
autoFocus = _this$props.autoFocus,
|
||||||
skinEmoji = _this$props.skinEmoji,
|
skinEmoji = _this$props.skinEmoji,
|
||||||
notFound = _this$props.notFound,
|
notFound = _this$props.notFound,
|
||||||
notFoundEmoji = _this$props.notFoundEmoji,
|
notFoundEmoji = _this$props.notFoundEmoji;
|
||||||
_this$state = this.state,
|
var width = perLine * (emojiSize + 12) + 12 + 2 + (0, _utils.measureScrollbar)();
|
||||||
skin = _this$state.skin,
|
var theme = this.getPreferredTheme();
|
||||||
theme = _this$state.theme,
|
var skin = this.props.skin || this.state.skin || _store["default"].get('skin') || this.props.defaultSkin;
|
||||||
width = perLine * (emojiSize + 12) + 12 + 2 + (0, _utils.measureScrollbar)();
|
|
||||||
return _react["default"].createElement("section", {
|
return _react["default"].createElement("section", {
|
||||||
style: _objectSpread({
|
style: _objectSpread({
|
||||||
width: width
|
width: width
|
||||||
|
@ -3095,21 +3093,6 @@ function (_React$PureComponent) {
|
||||||
i18n: this.i18n
|
i18n: this.i18n
|
||||||
})));
|
})));
|
||||||
}
|
}
|
||||||
}], [{
|
|
||||||
key: "getDerivedStateFromProps",
|
|
||||||
value: function getDerivedStateFromProps(props, state) {
|
|
||||||
if (props.skin) {
|
|
||||||
return _objectSpread({}, state, {
|
|
||||||
skin: props.skin
|
|
||||||
});
|
|
||||||
} else if (props.defaultSkin && !_store["default"].get('skin')) {
|
|
||||||
return _objectSpread({}, state, {
|
|
||||||
skin: props.defaultSkin
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
}]);
|
}]);
|
||||||
return NimblePicker;
|
return NimblePicker;
|
||||||
}(_react["default"].PureComponent);
|
}(_react["default"].PureComponent);
|
||||||
|
@ -3706,8 +3689,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||||||
|
|
||||||
const CUSTOM_EMOJIS = [{
|
const CUSTOM_EMOJIS = [{
|
||||||
name: 'Party Parrot',
|
name: 'Party Parrot',
|
||||||
short_names: ['parrot'],
|
short_names: ['party_parrot'],
|
||||||
keywords: ['party'],
|
keywords: ['party', 'parrot'],
|
||||||
imageUrl: './images/parrot.gif'
|
imageUrl: './images/parrot.gif'
|
||||||
}, {
|
}, {
|
||||||
name: 'Octocat',
|
name: 'Octocat',
|
||||||
|
@ -3719,16 +3702,6 @@ const CUSTOM_EMOJIS = [{
|
||||||
short_names: ['shipit', 'squirrel'],
|
short_names: ['shipit', 'squirrel'],
|
||||||
keywords: ['github'],
|
keywords: ['github'],
|
||||||
imageUrl: 'https://github.githubassets.com/images/icons/emoji/shipit.png'
|
imageUrl: 'https://github.githubassets.com/images/icons/emoji/shipit.png'
|
||||||
}, {
|
|
||||||
name: 'Test Flag',
|
|
||||||
short_names: ['test'],
|
|
||||||
keywords: ['test', 'flag'],
|
|
||||||
spriteUrl: 'https://unpkg.com/emoji-datasource-twitter@4.0.4/img/twitter/sheets-256/64.png',
|
|
||||||
sheet_x: 1,
|
|
||||||
sheet_y: 1,
|
|
||||||
size: 64,
|
|
||||||
sheetColumns: 52,
|
|
||||||
sheetRows: 52
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
class Example extends __WEBPACK_IMPORTED_MODULE_1_react___default.a.Component {
|
class Example extends __WEBPACK_IMPORTED_MODULE_1_react___default.a.Component {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import { Picker, Emoji } from '../dist'
|
||||||
const CUSTOM_EMOJIS = [
|
const CUSTOM_EMOJIS = [
|
||||||
{
|
{
|
||||||
name: 'Party Parrot',
|
name: 'Party Parrot',
|
||||||
short_names: ['parrot'],
|
short_names: ['party_parrot'],
|
||||||
keywords: ['party'],
|
keywords: ['party', 'parrot'],
|
||||||
imageUrl: './images/parrot.gif',
|
imageUrl: './images/parrot.gif',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -22,18 +22,6 @@ const CUSTOM_EMOJIS = [
|
||||||
keywords: ['github'],
|
keywords: ['github'],
|
||||||
imageUrl: 'https://github.githubassets.com/images/icons/emoji/shipit.png',
|
imageUrl: 'https://github.githubassets.com/images/icons/emoji/shipit.png',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'Test Flag',
|
|
||||||
short_names: ['test'],
|
|
||||||
keywords: ['test', 'flag'],
|
|
||||||
spriteUrl:
|
|
||||||
'https://unpkg.com/emoji-datasource-twitter@4.0.4/img/twitter/sheets-256/64.png',
|
|
||||||
sheet_x: 1,
|
|
||||||
sheet_y: 1,
|
|
||||||
size: 64,
|
|
||||||
sheetColumns: 52,
|
|
||||||
sheetRows: 52,
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
|
||||||
class Example extends React.Component {
|
class Example extends React.Component {
|
||||||
|
|
Loading…
Reference in New Issue