@pie-lib/math-toolbar 3.0.7-next.35 → 3.0.7-next.58
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/lib/done-button.js +7 -4
- package/lib/done-button.js.map +1 -1
- package/package.json +4 -4
- package/src/done-button.jsx +7 -3
package/lib/done-button.js
CHANGED
|
@@ -11,20 +11,23 @@ var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
|
11
11
|
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
12
12
|
var _styles = require("@mui/material/styles");
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _renderUi = require("@pie-lib/render-ui");
|
|
14
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
17
|
var StyledIconButton = (0, _styles.styled)(_IconButton["default"])(function (_ref) {
|
|
17
|
-
var
|
|
18
|
-
hideBackground = _ref.hideBackground;
|
|
18
|
+
var hideBackground = _ref.hideBackground;
|
|
19
19
|
return _objectSpread(_objectSpread({
|
|
20
20
|
verticalAlign: 'top',
|
|
21
21
|
width: '28px',
|
|
22
22
|
height: '28px',
|
|
23
23
|
color: '#00bb00'
|
|
24
24
|
}, hideBackground && {
|
|
25
|
-
|
|
25
|
+
// `--pie-white` inverts with the scheme where `common.white` did not, so the
|
|
26
|
+
// button keeps reading as raised against the toolbar instead of staying a
|
|
27
|
+
// white chip on a dark surface.
|
|
28
|
+
backgroundColor: _renderUi.color.white(),
|
|
26
29
|
'&:hover': {
|
|
27
|
-
backgroundColor:
|
|
30
|
+
backgroundColor: _renderUi.color.backgroundDark()
|
|
28
31
|
}
|
|
29
32
|
}), {}, {
|
|
30
33
|
'& .MuiIconButton-label': {
|
package/lib/done-button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"done-button.js","names":["_react","_interopRequireDefault","require","_IconButton","_Check","_styles","_propTypes","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","StyledIconButton","styled","IconButton","_ref","
|
|
1
|
+
{"version":3,"file":"done-button.js","names":["_react","_interopRequireDefault","require","_IconButton","_Check","_styles","_propTypes","_renderUi","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","StyledIconButton","styled","IconButton","_ref","hideBackground","verticalAlign","width","height","color","backgroundColor","white","backgroundDark","position","top","RawDoneButton","exports","_ref2","onClick","createElement","size","propTypes","PropTypes","func","bool","DoneButton"],"sources":["../src/done-button.jsx"],"sourcesContent":["import React from 'react';\n\nimport IconButton from '@mui/material/IconButton';\nimport Check from '@mui/icons-material/Check';\nimport { styled } from '@mui/material/styles';\nimport PropTypes from 'prop-types';\nimport { color } from '@pie-lib/render-ui';\n\nconst StyledIconButton = styled(IconButton)(({ hideBackground }) => ({\n verticalAlign: 'top',\n width: '28px',\n height: '28px',\n color: '#00bb00',\n ...(hideBackground && {\n // `--pie-white` inverts with the scheme where `common.white` did not, so the\n // button keeps reading as raised against the toolbar instead of staying a\n // white chip on a dark surface.\n backgroundColor: color.white(),\n '&:hover': {\n backgroundColor: color.backgroundDark(),\n },\n }),\n '& .MuiIconButton-label': {\n position: 'absolute',\n top: '2px',\n },\n}));\n\nexport const RawDoneButton = ({ onClick, hideBackground }) => (\n <StyledIconButton aria-label=\"Done\" onClick={onClick} hideBackground={hideBackground} size=\"large\">\n <Check />\n </StyledIconButton>\n);\n\nRawDoneButton.propTypes = {\n onClick: PropTypes.func,\n hideBackground: PropTypes.bool,\n};\n\nexport const DoneButton = RawDoneButton;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAA2C,SAAAM,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,aAAAhB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,CACQ,CAAC;AAAA,CACpB;AAEDuC,aAAa,CAACM,SAAS,GAAG;EACxBH,OAAO,EAAEI,qBAAS,CAACC,IAAI;EACvBlB,cAAc,EAAEiB,qBAAS,CAACE;AAC5B,CAAC;AAEM,IAAMC,UAAU,GAAAT,OAAA,CAAAS,UAAA,GAAGV,aAAa","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.0.7-next.
|
|
6
|
+
"version": "3.0.7-next.58+dc4465159",
|
|
7
7
|
"description": "Math toolbar for editing math equations",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"math",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@emotion/styled": "^11.14.1",
|
|
22
22
|
"@mui/icons-material": "^7.3.4",
|
|
23
23
|
"@mui/material": "^7.3.4",
|
|
24
|
-
"@pie-lib/math-input": "^8.1.
|
|
25
|
-
"@pie-lib/render-ui": "^6.1.4-next.
|
|
24
|
+
"@pie-lib/math-input": "^8.1.1",
|
|
25
|
+
"@pie-lib/render-ui": "^6.1.4-next.58+dc4465159",
|
|
26
26
|
"debug": "^4.1.1",
|
|
27
27
|
"lodash-es": "^4.17.23",
|
|
28
28
|
"prop-types": "^15.7.2"
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"@pie-lib/test-utils": "^2.0.2"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "dc4465159da9d72020651fab10b4ab5281ad3bdd"
|
|
39
39
|
}
|
package/src/done-button.jsx
CHANGED
|
@@ -4,16 +4,20 @@ import IconButton from '@mui/material/IconButton';
|
|
|
4
4
|
import Check from '@mui/icons-material/Check';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
+
import { color } from '@pie-lib/render-ui';
|
|
7
8
|
|
|
8
|
-
const StyledIconButton = styled(IconButton)(({
|
|
9
|
+
const StyledIconButton = styled(IconButton)(({ hideBackground }) => ({
|
|
9
10
|
verticalAlign: 'top',
|
|
10
11
|
width: '28px',
|
|
11
12
|
height: '28px',
|
|
12
13
|
color: '#00bb00',
|
|
13
14
|
...(hideBackground && {
|
|
14
|
-
|
|
15
|
+
// `--pie-white` inverts with the scheme where `common.white` did not, so the
|
|
16
|
+
// button keeps reading as raised against the toolbar instead of staying a
|
|
17
|
+
// white chip on a dark surface.
|
|
18
|
+
backgroundColor: color.white(),
|
|
15
19
|
'&:hover': {
|
|
16
|
-
backgroundColor:
|
|
20
|
+
backgroundColor: color.backgroundDark(),
|
|
17
21
|
},
|
|
18
22
|
}),
|
|
19
23
|
'& .MuiIconButton-label': {
|