@popmenu/common-ui 0.20.0 → 0.23.0
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/build/components/NumberField/NumberField.d.ts +3 -0
- package/build/components/NumberField/NumberFieldProps.d.ts +7 -0
- package/build/components/NumberField/NumberFieldStyles.d.ts +2 -0
- package/build/components/NumberField/index.d.ts +2 -0
- package/build/components/index.d.ts +1 -0
- package/build/index.es.js +120 -46
- package/build/index.es.js.map +1 -1
- package/build/index.js +119 -44
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -157,128 +157,164 @@ function __rest(s, e) {
|
|
|
157
157
|
return t;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
var _path$
|
|
160
|
+
var _path$3e;
|
|
161
161
|
|
|
162
|
-
function _extends$
|
|
162
|
+
function _extends$3u() { _extends$3u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3u.apply(this, arguments); }
|
|
163
|
+
|
|
164
|
+
function SvgMinusCircle(props) {
|
|
165
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3u({
|
|
166
|
+
viewBox: "0 0 16 16",
|
|
167
|
+
strokeLinecap: "round",
|
|
168
|
+
strokeLinejoin: "round",
|
|
169
|
+
stroke: "currentColor",
|
|
170
|
+
fill: "none",
|
|
171
|
+
width: "1em",
|
|
172
|
+
height: "1em"
|
|
173
|
+
}, props), _path$3e || (_path$3e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
174
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM5.333 8h5.334"
|
|
175
|
+
})));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
var _path$36;
|
|
179
|
+
|
|
180
|
+
function _extends$3m() { _extends$3m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3m.apply(this, arguments); }
|
|
181
|
+
|
|
182
|
+
function SvgPlusCircle(props) {
|
|
183
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3m({
|
|
184
|
+
viewBox: "0 0 16 16",
|
|
185
|
+
strokeLinecap: "round",
|
|
186
|
+
strokeLinejoin: "round",
|
|
187
|
+
stroke: "currentColor",
|
|
188
|
+
fill: "none",
|
|
189
|
+
width: "1em",
|
|
190
|
+
height: "1em"
|
|
191
|
+
}, props), _path$36 || (_path$36 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
192
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-9.334v5.334M5.333 8h5.334"
|
|
193
|
+
})));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
var _path$2O;
|
|
197
|
+
|
|
198
|
+
function _extends$32() { _extends$32 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$32.apply(this, arguments); }
|
|
163
199
|
|
|
164
200
|
function SvgUser(props) {
|
|
165
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
201
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$32({
|
|
166
202
|
viewBox: "0 0 16 16",
|
|
167
203
|
strokeLinecap: "round",
|
|
168
204
|
strokeLinejoin: "round",
|
|
169
205
|
stroke: "currentColor",
|
|
206
|
+
fill: "none",
|
|
170
207
|
width: "1em",
|
|
171
|
-
height: "1em"
|
|
172
|
-
|
|
173
|
-
}, props), _path$3k || (_path$3k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
208
|
+
height: "1em"
|
|
209
|
+
}, props), _path$2O || (_path$2O = /*#__PURE__*/React__namespace.createElement("path", {
|
|
174
210
|
d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z"
|
|
175
211
|
})));
|
|
176
212
|
}
|
|
177
213
|
|
|
178
|
-
var _path$
|
|
214
|
+
var _path$1k;
|
|
179
215
|
|
|
180
|
-
function _extends$
|
|
216
|
+
function _extends$1o() { _extends$1o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1o.apply(this, arguments); }
|
|
181
217
|
|
|
182
218
|
function SvgPause(props) {
|
|
183
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
219
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1o({
|
|
184
220
|
viewBox: "0 0 16 16",
|
|
185
221
|
strokeLinecap: "round",
|
|
186
222
|
strokeLinejoin: "round",
|
|
187
223
|
stroke: "currentColor",
|
|
224
|
+
fill: "none",
|
|
188
225
|
width: "1em",
|
|
189
|
-
height: "1em"
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
d: "M6.667 2.667H4v10.666h2.667V2.667zm5.333 0H9.333v10.666H12V2.667z"
|
|
226
|
+
height: "1em"
|
|
227
|
+
}, props), _path$1k || (_path$1k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
228
|
+
d: "M6.667 2.667H4v10.666h2.667V2.666zm5.333 0H9.333v10.666H12V2.666z"
|
|
193
229
|
})));
|
|
194
230
|
}
|
|
195
231
|
|
|
196
|
-
var _path$
|
|
232
|
+
var _path$1i;
|
|
197
233
|
|
|
198
|
-
function _extends$
|
|
234
|
+
function _extends$1m() { _extends$1m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1m.apply(this, arguments); }
|
|
199
235
|
|
|
200
236
|
function SvgPlay(props) {
|
|
201
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
237
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1m({
|
|
202
238
|
viewBox: "0 0 16 16",
|
|
203
239
|
strokeLinecap: "round",
|
|
204
240
|
strokeLinejoin: "round",
|
|
205
241
|
stroke: "currentColor",
|
|
242
|
+
fill: "none",
|
|
206
243
|
width: "1em",
|
|
207
|
-
height: "1em"
|
|
208
|
-
|
|
209
|
-
}, props), _path$1d || (_path$1d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
244
|
+
height: "1em"
|
|
245
|
+
}, props), _path$1i || (_path$1i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
210
246
|
d: "M3.333 2l9.334 6-9.334 6V2z"
|
|
211
247
|
})));
|
|
212
248
|
}
|
|
213
249
|
|
|
214
|
-
var _path$
|
|
250
|
+
var _path$15;
|
|
215
251
|
|
|
216
|
-
function _extends$
|
|
252
|
+
function _extends$19() { _extends$19 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$19.apply(this, arguments); }
|
|
217
253
|
|
|
218
254
|
function SvgVolumeDown(props) {
|
|
219
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
255
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$19({
|
|
220
256
|
viewBox: "0 0 16 16",
|
|
221
257
|
strokeLinecap: "round",
|
|
222
258
|
strokeLinejoin: "round",
|
|
223
259
|
stroke: "currentColor",
|
|
260
|
+
fill: "none",
|
|
224
261
|
width: "1em",
|
|
225
|
-
height: "1em"
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
d: "M8.999 3.333L5.665 6H3v4h2.666L9 12.667V3.333zm3.026 2.307a3.333 3.333 0 010 4.713"
|
|
262
|
+
height: "1em"
|
|
263
|
+
}, props), _path$15 || (_path$15 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
264
|
+
d: "M8.999 3.333L5.665 6H3v4h2.666L9 12.667V3.333zm3.026 2.307a3.333 3.333 0 010 4.714"
|
|
229
265
|
})));
|
|
230
266
|
}
|
|
231
267
|
|
|
232
|
-
var _path
|
|
268
|
+
var _path$14;
|
|
233
269
|
|
|
234
|
-
function _extends$
|
|
270
|
+
function _extends$18() { _extends$18 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$18.apply(this, arguments); }
|
|
235
271
|
|
|
236
272
|
function SvgVolumeMute(props) {
|
|
237
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
273
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$18({
|
|
238
274
|
viewBox: "0 0 16 16",
|
|
239
275
|
strokeLinecap: "round",
|
|
240
276
|
strokeLinejoin: "round",
|
|
241
277
|
stroke: "currentColor",
|
|
278
|
+
fill: "none",
|
|
242
279
|
width: "1em",
|
|
243
|
-
height: "1em"
|
|
244
|
-
|
|
245
|
-
}, props), _path$$ || (_path$$ = /*#__PURE__*/React__namespace.createElement("path", {
|
|
280
|
+
height: "1em"
|
|
281
|
+
}, props), _path$14 || (_path$14 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
246
282
|
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333z"
|
|
247
283
|
})));
|
|
248
284
|
}
|
|
249
285
|
|
|
250
|
-
var _path$
|
|
286
|
+
var _path$13;
|
|
251
287
|
|
|
252
|
-
function _extends$
|
|
288
|
+
function _extends$17() { _extends$17 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$17.apply(this, arguments); }
|
|
253
289
|
|
|
254
290
|
function SvgVolumeOff(props) {
|
|
255
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
291
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$17({
|
|
256
292
|
viewBox: "0 0 16 16",
|
|
257
293
|
strokeLinecap: "round",
|
|
258
294
|
strokeLinejoin: "round",
|
|
259
295
|
stroke: "currentColor",
|
|
296
|
+
fill: "none",
|
|
260
297
|
width: "1em",
|
|
261
|
-
height: "1em"
|
|
262
|
-
|
|
263
|
-
}, props), _path$_ || (_path$_ = /*#__PURE__*/React__namespace.createElement("path", {
|
|
298
|
+
height: "1em"
|
|
299
|
+
}, props), _path$13 || (_path$13 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
264
300
|
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm8 2.667l-4 4m0-4l4 4"
|
|
265
301
|
})));
|
|
266
302
|
}
|
|
267
303
|
|
|
268
|
-
var _path$
|
|
304
|
+
var _path$12;
|
|
269
305
|
|
|
270
|
-
function _extends$
|
|
306
|
+
function _extends$16() { _extends$16 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$16.apply(this, arguments); }
|
|
271
307
|
|
|
272
308
|
function SvgVolumeUp(props) {
|
|
273
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
309
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$16({
|
|
274
310
|
viewBox: "0 0 16 16",
|
|
275
311
|
strokeLinecap: "round",
|
|
276
312
|
strokeLinejoin: "round",
|
|
277
313
|
stroke: "currentColor",
|
|
314
|
+
fill: "none",
|
|
278
315
|
width: "1em",
|
|
279
|
-
height: "1em"
|
|
280
|
-
|
|
281
|
-
}, props), _path$Z || (_path$Z = /*#__PURE__*/React__namespace.createElement("path", {
|
|
316
|
+
height: "1em"
|
|
317
|
+
}, props), _path$12 || (_path$12 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
282
318
|
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm5.38-.046a6.667 6.667 0 010 9.426M10.36 5.64a3.333 3.333 0 010 4.713"
|
|
283
319
|
})));
|
|
284
320
|
}
|
|
@@ -1062,6 +1098,44 @@ var Tooltip = React.forwardRef(function (props, ref) {
|
|
|
1062
1098
|
});
|
|
1063
1099
|
Tooltip.displayName = 'Tooltip';
|
|
1064
1100
|
|
|
1101
|
+
var useNumberFieldStyles = core.makeStyles(function () { return ({
|
|
1102
|
+
root: {
|
|
1103
|
+
height: 56,
|
|
1104
|
+
},
|
|
1105
|
+
}); });
|
|
1106
|
+
var useNumberInputStyles = core.makeStyles(function (theme) { return ({
|
|
1107
|
+
root: {
|
|
1108
|
+
height: '100%',
|
|
1109
|
+
width: 'min-content',
|
|
1110
|
+
borderRadius: theme.spacing(1),
|
|
1111
|
+
},
|
|
1112
|
+
input: {
|
|
1113
|
+
'&::-webkit-clear-button, &::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
|
|
1114
|
+
display: 'none',
|
|
1115
|
+
},
|
|
1116
|
+
'-moz-appearance': 'textfield',
|
|
1117
|
+
minWidth: 40,
|
|
1118
|
+
padding: 0,
|
|
1119
|
+
textAlign: 'center',
|
|
1120
|
+
},
|
|
1121
|
+
adornedStart: {
|
|
1122
|
+
padding: 0,
|
|
1123
|
+
},
|
|
1124
|
+
adornedEnd: {
|
|
1125
|
+
padding: 0,
|
|
1126
|
+
},
|
|
1127
|
+
}); });
|
|
1128
|
+
|
|
1129
|
+
var NumberField = function (props) {
|
|
1130
|
+
var onIncrement = props.onIncrement, onDecrement = props.onDecrement, _a = props.InputProps, InputProps = _a === void 0 ? {} : _a, classes = props.classes, restProps = __rest(props, ["onIncrement", "onDecrement", "InputProps", "classes"]);
|
|
1131
|
+
var _b = InputProps, inputClassesOverride = _b.classes, restInputProps = __rest(_b, ["classes"]);
|
|
1132
|
+
var fieldClasses = useNumberFieldStyles(props);
|
|
1133
|
+
var inputClasses = useNumberInputStyles(props);
|
|
1134
|
+
return (React__default['default'].createElement(core.TextField, __assign({ classes: __assign(__assign({}, fieldClasses), classes), variant: "filled", type: "number", defaultValue: 0, InputProps: __assign({ classes: __assign(__assign({}, inputClasses), inputClassesOverride), disableUnderline: true, endAdornment: (React__default['default'].createElement(IconButton, { style: { fontSize: 20 }, onClick: onIncrement },
|
|
1135
|
+
React__default['default'].createElement(Icon, { icon: SvgPlusCircle }))), startAdornment: (React__default['default'].createElement(IconButton, { style: { fontSize: 20 }, onClick: onDecrement },
|
|
1136
|
+
React__default['default'].createElement(Icon, { icon: SvgMinusCircle }))) }, restInputProps) }, restProps)));
|
|
1137
|
+
};
|
|
1138
|
+
|
|
1065
1139
|
var useCollapsibleText = function () {
|
|
1066
1140
|
var _a = React.useState(false), open = _a[0], setOpen = _a[1];
|
|
1067
1141
|
var collapseState = React.useState(false);
|
|
@@ -1486,6 +1560,7 @@ exports.Divider = Divider;
|
|
|
1486
1560
|
exports.Icon = Icon;
|
|
1487
1561
|
exports.IconButton = IconButton;
|
|
1488
1562
|
exports.Link = Link;
|
|
1563
|
+
exports.NumberField = NumberField;
|
|
1489
1564
|
exports.Paper = Paper;
|
|
1490
1565
|
exports.PaperContent = PaperContent;
|
|
1491
1566
|
exports.Radio = Radio;
|