@uiw/react-color-swatch
Advanced tools
Comparing version 0.0.18 to 0.0.19
@@ -7,2 +7,10 @@ import React from 'react'; | ||
} | string; | ||
export declare type SwatchRectRenderProps = { | ||
key: string | number; | ||
title: string; | ||
color: string; | ||
checked: boolean; | ||
style: React.CSSProperties; | ||
onClick: (evn: React.MouseEvent<HTMLDivElement, MouseEvent>) => void; | ||
}; | ||
export interface SwatchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'> { | ||
@@ -13,2 +21,3 @@ prefixCls?: string; | ||
rectProps?: React.HTMLAttributes<HTMLDivElement>; | ||
rectRender?: (props: SwatchRectRenderProps) => JSX.Element; | ||
onChange?: (hsva: HsvaColor) => void; | ||
@@ -15,0 +24,0 @@ } |
@@ -22,3 +22,3 @@ "use strict"; | ||
var _excluded = ["prefixCls", "className", "color", "colors", "style", "rectProps", "onChange"]; | ||
var _excluded = ["prefixCls", "className", "color", "colors", "style", "rectProps", "onChange", "rectRender"]; | ||
@@ -36,2 +36,3 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) { | ||
onChange = props.onChange, | ||
rectRender = props.rectRender, | ||
other = (0, _objectWithoutProperties2.default)(props, _excluded); | ||
@@ -78,2 +79,18 @@ var rectStyle = (0, _objectSpread2.default)({ | ||
var checked = color && color.toLocaleLowerCase() === background.toLocaleLowerCase(); | ||
if (rectRender) { | ||
return rectRender({ | ||
key: idx, | ||
title: title, | ||
color: background, | ||
checked: !!checked, | ||
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, rectStyle), {}, { | ||
background: background | ||
}), | ||
onClick: function onClick() { | ||
return handleClick(background); | ||
} | ||
}); | ||
} | ||
var child = rectProps.children && /*#__PURE__*/_react.default.isValidElement(rectProps.children) ? /*#__PURE__*/_react.default.cloneElement(rectProps.children, { | ||
@@ -101,2 +118,2 @@ color: background, | ||
module.exports = exports.default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY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AuLi5zdHlsZSxcbiAgICAgIH19XG4gICAgPlxuICAgICAge2NvbG9ycyAmJlxuICAgICAgICBBcnJheS5pc0FycmF5KGNvbG9ycykgJiZcbiAgICAgICAgY29sb3JzLm1hcCgoaXRlbSwgaWR4KSA9PiB7XG4gICAgICAgICAgbGV0IHRpdGxlID0gJyc7XG4gICAgICAgICAgbGV0IGJhY2tncm91bmQgPSAnJztcbiAgICAgICAgICBpZiAodHlwZW9mIGl0ZW0gPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICB0aXRsZSA9IGl0ZW07XG4gICAgICAgICAgICBiYWNrZ3JvdW5kID0gaXRlbTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSAnb2JqZWN0JyAmJiBpdGVtLmNvbG9yKSB7XG4gICAgICAgICAgICB0aXRsZSA9IGl0ZW0udGl0bGUgfHwgaXRlbS5jb2xvcjtcbiAgICAgICAgICAgIGJhY2tncm91bmQgPSBpdGVtLmNvbG9yO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCBjaGVja2VkID0gY29sb3IgJiYgY29sb3IudG9Mb2NhbGVMb3dlckNhc2UoKSA9PT0gYmFja2dyb3VuZC50b0xvY2FsZUxvd2VyQ2FzZSgpO1xuICAgICAgICAgIGNvbnN0IGNoaWxkID1cbiAgICAgICAgICAgIHJlY3RQcm9wcy5jaGlsZHJlbiAmJiBSZWFjdC5pc1ZhbGlkRWxlbWVudChyZWN0UHJvcHMuY2hpbGRyZW4pXG4gICAgICAgICAgICAgID8gUmVhY3QuY2xvbmVFbGVtZW50KHJlY3RQcm9wcy5jaGlsZHJlbiwge1xuICAgICAgICAgICAgICAgICAgY29sb3I6IGJhY2tncm91bmQsXG4gICAgICAgICAgICAgICAgICBjaGVja2VkLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIDogbnVsbDtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICB0YWJJbmRleD17MH1cbiAgICAgICAgICAgICAga2V5PXtpZHh9XG4gICAgICAgICAgICAgIHRpdGxlPXt0aXRsZX1cbiAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gaGFuZGxlQ2xpY2soYmFja2dyb3VuZCl9XG4gICAgICAgICAgICAgIHsuLi5yZWN0UHJvcHN9XG4gICAgICAgICAgICAgIGNoaWxkcmVuPXtjaGlsZH1cbiAgICAgICAgICAgICAgc3R5bGU9e3sgLi4ucmVjdFN0eWxlLCBiYWNrZ3JvdW5kIH19XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICk7XG4gICAgICAgIH0pfVxuICAgIDwvZGl2PlxuICApO1xufSk7XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbmRleC50c3giXSwibmFtZXMiOlsiUmVhY3QiLCJmb3J3YXJkUmVmIiwicHJvcHMiLCJyZWYiLCJwcmVmaXhDbHMiLCJjbGFzc05hbWUiLCJjb2xvciIsImNvbG9ycyIsInN0eWxlIiwicmVjdFByb3BzIiwib25DaGFuZ2UiLCJyZWN0UmVuZGVyIiwib3RoZXIiLCJyZWN0U3R5bGUiLCJiYWNrZ3JvdW5kIiwiaGVpZ2h0Iiwid2lkdGgiLCJtYXJnaW5SaWdodCIsIm1hcmdpbkJvdHRvbSIsImN1cnNvciIsInBvc2l0aW9uIiwib3V0bGluZSIsImJvcmRlclJhZGl1cyIsImhhbmRsZUNsaWNrIiwiaGV4IiwiZmlsdGVyIiwiQm9vbGVhbiIsImpvaW4iLCJkaXNwbGF5IiwiZmxleFdyYXAiLCJBcnJheSIsImlzQXJyYXkiLCJtYXAiLCJpdGVtIiwiaWR4IiwidGl0bGUiLCJjaGVja2VkIiwidG9Mb2NhbGVMb3dlckNhc2UiLCJrZXkiLCJvbkNsaWNrIiwiY2hpbGQiLCJjaGlsZHJlbiIsImlzVmFsaWR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SHN2YShoZXgpKTtcbiAgfTtcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICByZWY9e3JlZn1cbiAgICAgIHsuLi5vdGhlcn1cbiAgICAgIGNsYXNzTmFtZT17W3ByZWZpeENscywgY2xhc3NOYW1lIHx8ICcnXS5maWx0ZXIoQm9vbGVhbikuam9pbignICcpfVxuICAgICAgc3R5bGU9e3tcbiAgICAgICAgZGlzcGxheTogJ2ZsZXgnLFxuICAgICAgICBmbGV4V3JhcDogJ3dyYXAnLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgLi4uc3R5bGUsXG4gICAgICB9fVxuICAgID5cbiAgICAgIHtjb2xvcnMgJiZcbiAgICAgICAgQXJyYXkuaXNBcnJheShjb2xvcnMpICYmXG4gICAgICAgIGNvbG9ycy5tYXAoKGl0ZW0sIGlkeCkgPT4ge1xuICAgICAgICAgIGxldCB0aXRsZSA9ICcnO1xuICAgICAgICAgIGxldCBiYWNrZ3JvdW5kID0gJyc7XG4gICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgdGl0bGUgPSBpdGVtO1xuICAgICAgICAgICAgYmFja2dyb3VuZCA9IGl0ZW07XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICh0eXBlb2YgaXRlbSA9PT0gJ29iamVjdCcgJiYgaXRlbS5jb2xvcikge1xuICAgICAgICAgICAgdGl0bGUgPSBpdGVtLnRpdGxlIHx8IGl0ZW0uY29sb3I7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kID0gaXRlbS5jb2xvcjtcbiAgICAgICAgICB9XG4gICAgICAgICAgY29uc3QgY2hlY2tlZCA9IGNvbG9yICYmIGNvbG9yLnRvTG9jYWxlTG93ZXJDYXNlKCkgPT09IGJhY2tncm91bmQudG9Mb2NhbGVMb3dlckNhc2UoKTtcbiAgICAgICAgICBpZiAocmVjdFJlbmRlcikge1xuICAgICAgICAgICAgcmV0dXJuIHJlY3RSZW5kZXIoe1xuICAgICAgICAgICAgICBrZXk6IGlkeCxcbiAgICAgICAgICAgICAgdGl0bGUsXG4gICAgICAgICAgICAgIGNvbG9yOiBiYWNrZ3JvdW5kLFxuICAgICAgICAgICAgICBjaGVja2VkOiAhIWNoZWNrZWQsXG4gICAgICAgICAgICAgIHN0eWxlOiB7IC4uLnJlY3RTdHlsZSwgYmFja2dyb3VuZCB9LFxuICAgICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiBoYW5kbGVDbGljayhiYWNrZ3JvdW5kKSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCBjaGlsZCA9XG4gICAgICAgICAgICByZWN0UHJvcHMuY2hpbGRyZW4gJiYgUmVhY3QuaXNWYWxpZEVsZW1lbnQocmVjdFByb3BzLmNoaWxkcmVuKVxuICAgICAgICAgICAgICA/IFJlYWN0LmNsb25lRWxlbWVudChyZWN0UHJvcHMuY2hpbGRyZW4sIHtcbiAgICAgICAgICAgICAgICAgIGNvbG9yOiBiYWNrZ3JvdW5kLFxuICAgICAgICAgICAgICAgICAgY2hlY2tlZCxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICA6IG51bGw7XG4gICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgdGFiSW5kZXg9ezB9XG4gICAgICAgICAgICAgIGtleT17aWR4fVxuICAgICAgICAgICAgICB0aXRsZT17dGl0bGV9XG4gICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IGhhbmRsZUNsaWNrKGJhY2tncm91bmQpfVxuICAgICAgICAgICAgICB7Li4ucmVjdFByb3BzfVxuICAgICAgICAgICAgICBjaGlsZHJlbj17Y2hpbGR9XG4gICAgICAgICAgICAgIHN0eWxlPXt7IC4uLnJlY3RTdHlsZSwgYmFja2dyb3VuZCB9fVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICApO1xuICAgICAgICB9KX1cbiAgICA8L2Rpdj5cbiAgKTtcbn0pO1xuIl19 |
@@ -7,2 +7,10 @@ import React from 'react'; | ||
} | string; | ||
export declare type SwatchRectRenderProps = { | ||
key: string | number; | ||
title: string; | ||
color: string; | ||
checked: boolean; | ||
style: React.CSSProperties; | ||
onClick: (evn: React.MouseEvent<HTMLDivElement, MouseEvent>) => void; | ||
}; | ||
export interface SwatchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'> { | ||
@@ -13,2 +21,3 @@ prefixCls?: string; | ||
rectProps?: React.HTMLAttributes<HTMLDivElement>; | ||
rectRender?: (props: SwatchRectRenderProps) => JSX.Element; | ||
onChange?: (hsva: HsvaColor) => void; | ||
@@ -15,0 +24,0 @@ } |
@@ -5,3 +5,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; | ||
var _excluded = ["prefixCls", "className", "color", "colors", "style", "rectProps", "onChange"]; | ||
var _excluded = ["prefixCls", "className", "color", "colors", "style", "rectProps", "onChange", "rectRender"]; | ||
import React from 'react'; | ||
@@ -20,2 +20,3 @@ import { hexToHsva } from '@uiw/color-convert'; | ||
onChange = props.onChange, | ||
rectRender = props.rectRender, | ||
other = _objectWithoutProperties(props, _excluded); | ||
@@ -63,2 +64,18 @@ | ||
var checked = color && color.toLocaleLowerCase() === background.toLocaleLowerCase(); | ||
if (rectRender) { | ||
return rectRender({ | ||
key: idx, | ||
title: title, | ||
color: background, | ||
checked: !!checked, | ||
style: _objectSpread(_objectSpread({}, rectStyle), {}, { | ||
background: background | ||
}), | ||
onClick: function onClick() { | ||
return handleClick(background); | ||
} | ||
}); | ||
} | ||
var child = rectProps.children && /*#__PURE__*/React.isValidElement(rectProps.children) ? /*#__PURE__*/React.cloneElement(rectProps.children, { | ||
@@ -83,2 +100,2 @@ color: background, | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb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ICBjb2xvcjogYmFja2dyb3VuZCxcbiAgICAgICAgICAgICAgICAgIGNoZWNrZWQsXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgOiBudWxsO1xuICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgIHRhYkluZGV4PXswfVxuICAgICAgICAgICAgICBrZXk9e2lkeH1cbiAgICAgICAgICAgICAgdGl0bGU9e3RpdGxlfVxuICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBoYW5kbGVDbGljayhiYWNrZ3JvdW5kKX1cbiAgICAgICAgICAgICAgey4uLnJlY3RQcm9wc31cbiAgICAgICAgICAgICAgY2hpbGRyZW49e2NoaWxkfVxuICAgICAgICAgICAgICBzdHlsZT17eyAuLi5yZWN0U3R5bGUsIGJhY2tncm91bmQgfX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgKTtcbiAgICAgICAgfSl9XG4gICAgPC9kaXY+XG4gICk7XG59KTtcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbmRleC50c3giXSwibmFtZXMiOlsiUmVhY3QiLCJoZXhUb0hzdmEiLCJmb3J3YXJkUmVmIiwicHJvcHMiLCJyZWYiLCJwcmVmaXhDbHMiLCJjbGFzc05hbWUiLCJjb2xvciIsImNvbG9ycyIsInN0eWxlIiwicmVjdFByb3BzIiwib25DaGFuZ2UiLCJyZWN0UmVuZGVyIiwib3RoZXIiLCJyZWN0U3R5bGUiLCJiYWNrZ3JvdW5kIiwiaGVpZ2h0Iiwid2lkdGgiLCJtYXJnaW5SaWdodCIsIm1hcmdpbkJvdHRvbSIsImN1cnNvciIsInBvc2l0aW9uIiwib3V0bGluZSIsImJvcmRlclJhZGl1cyIsImhhbmRsZUNsaWNrIiwiaGV4IiwiZmlsdGVyIiwiQm9vbGVhbiIsImpvaW4iLCJkaXNwb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sZSA9IGl0ZW0udGl0bGUgfHwgaXRlbS5jb2xvcjtcbiAgICAgICAgICAgIGJhY2tncm91bmQgPSBpdGVtLmNvbG9yO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCBjaGVja2VkID0gY29sb3IgJiYgY29sb3IudG9Mb2NhbGVMb3dlckNhc2UoKSA9PT0gYmFja2dyb3VuZC50b0xvY2FsZUxvd2VyQ2FzZSgpO1xuICAgICAgICAgIGlmIChyZWN0UmVuZGVyKSB7XG4gICAgICAgICAgICByZXR1cm4gcmVjdFJlbmRlcih7XG4gICAgICAgICAgICAgIGtleTogaWR4LFxuICAgICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgICAgY29sb3I6IGJhY2tncm91bmQsXG4gICAgICAgICAgICAgIGNoZWNrZWQ6ICEhY2hlY2tlZCxcbiAgICAgICAgICAgICAgc3R5bGU6IHsgLi4ucmVjdFN0eWxlLCBiYWNrZ3JvdW5kIH0sXG4gICAgICAgICAgICAgIG9uQ2xpY2s6ICgpID0+IGhhbmRsZUNsaWNrKGJhY2tncm91bmQpLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IGNoaWxkID1cbiAgICAgICAgICAgIHJlY3RQcm9wcy5jaGlsZHJlbiAmJiBSZWFjdC5pc1ZhbGlkRWxlbWVudChyZWN0UHJvcHMuY2hpbGRyZW4pXG4gICAgICAgICAgICAgID8gUmVhY3QuY2xvbmVFbGVtZW50KHJlY3RQcm9wcy5jaGlsZHJlbiwge1xuICAgICAgICAgICAgICAgICAgY29sb3I6IGJhY2tncm91bmQsXG4gICAgICAgICAgICAgICAgICBjaGVja2VkLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIDogbnVsbDtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICB0YWJJbmRleD17MH1cbiAgICAgICAgICAgICAga2V5PXtpZHh9XG4gICAgICAgICAgICAgIHRpdGxlPXt0aXRsZX1cbiAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gaGFuZGxlQ2xpY2soYmFja2dyb3VuZCl9XG4gICAgICAgICAgICAgIHsuLi5yZWN0UHJvcHN9XG4gICAgICAgICAgICAgIGNoaWxkcmVuPXtjaGlsZH1cbiAgICAgICAgICAgICAgc3R5bGU9e3sgLi4ucmVjdFN0eWxlLCBiYWNrZ3JvdW5kIH19XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICk7XG4gICAgICAgIH0pfVxuICAgIDwvZGl2PlxuICApO1xufSk7XG4iXX0= |
{ | ||
"name": "@uiw/react-color-swatch", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"description": "Color swatch component for React.", | ||
@@ -33,3 +33,3 @@ "homepage": "https://uiwjs.github.io/react-color/#react-color-swatch", | ||
"@babel/runtime": "7.14.6", | ||
"@uiw/color-convert": "^0.0.18" | ||
"@uiw/color-convert": "^0.0.19" | ||
}, | ||
@@ -36,0 +36,0 @@ "devDependencies": { |
@@ -67,3 +67,4 @@ React Color Swatch | ||
rectProps?: React.HTMLAttributes<HTMLDivElement>; | ||
onClick?: (hsva: HsvaColor) => void; | ||
rectRender?: (props: { title: string; color: string; checked: boolean; }) => JSX.Element; | ||
onChange?: (hsva: HsvaColor) => void; | ||
} | ||
@@ -70,0 +71,0 @@ ``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31312
336
77
+ Added@uiw/color-convert@0.0.19(transitive)
- Removed@uiw/color-convert@0.0.18(transitive)
Updated@uiw/color-convert@^0.0.19