ywana-core8 0.0.391 → 0.0.392
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/dist/index.cjs +13 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +18 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +13 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +17 -9
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/color.css +18 -0
- package/src/html/color.js +8 -6
- package/src/html/color.test.js +2 -1
- package/src/html/textfield.test.js +1 -0
- package/src/html/color1.css +0 -3
package/dist/index.umd.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('material-design-icons-iconfont/dist/material-design-icons.css'), require('react'), require('react-switch'), require('moment'), require('moment-range'), require('resumablejs'), require('react-notifications-component'), require('react-notifications-component/dist/theme.css'), require('
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'material-design-icons-iconfont/dist/material-design-icons.css', 'react', 'react-switch', 'moment', 'moment-range', 'resumablejs', 'react-notifications-component', 'react-notifications-component/dist/theme.css', '
|
4
|
-
(global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.reactSwitch, global.moment, global.momentRange, global.resumablejs, global.reactNotificationsComponent, null, global.
|
5
|
-
})(this, (function (exports, materialDesignIcons_css, React, RSwitch, moment, momentRange, ResumableJS, reactNotificationsComponent, theme_css,
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('material-design-icons-iconfont/dist/material-design-icons.css'), require('react'), require('react-switch'), require('moment'), require('moment-range'), require('resumablejs'), require('react-notifications-component'), require('react-notifications-component/dist/theme.css'), require('deep-equal')) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'material-design-icons-iconfont/dist/material-design-icons.css', 'react', 'react-switch', 'moment', 'moment-range', 'resumablejs', 'react-notifications-component', 'react-notifications-component/dist/theme.css', 'deep-equal'], factory) :
|
4
|
+
(global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.reactSwitch, global.moment, global.momentRange, global.resumablejs, global.reactNotificationsComponent, null, global.deepEqual));
|
5
|
+
})(this, (function (exports, materialDesignIcons_css, React, RSwitch, moment, momentRange, ResumableJS, reactNotificationsComponent, theme_css, equal) {
|
6
6
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
7
7
|
|
8
8
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
@@ -3718,17 +3718,25 @@
|
|
3718
3718
|
|
3719
3719
|
var ColorField = function ColorField(props) {
|
3720
3720
|
var id = props.id,
|
3721
|
+
_props$label = props.label,
|
3722
|
+
label = _props$label === void 0 ? "Color" : _props$label,
|
3723
|
+
value = props.value,
|
3721
3724
|
onChange = props.onChange;
|
3722
3725
|
|
3723
|
-
function change(
|
3724
|
-
|
3726
|
+
function change(event) {
|
3727
|
+
var color = event.target.value;
|
3728
|
+
if (onChange) onChange(id, color);
|
3725
3729
|
}
|
3726
3730
|
|
3727
3731
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
3728
3732
|
className: "color-field"
|
3729
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
3730
|
-
|
3731
|
-
|
3733
|
+
}, /*#__PURE__*/React__default["default"].createElement("label", {
|
3734
|
+
"for": id
|
3735
|
+
}, label), /*#__PURE__*/React__default["default"].createElement("input", {
|
3736
|
+
id: id,
|
3737
|
+
type: "color",
|
3738
|
+
onChange: change,
|
3739
|
+
value: value
|
3732
3740
|
}));
|
3733
3741
|
};
|
3734
3742
|
|