@bigbinary/neetoui 8.2.41 → 8.2.43

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.
@@ -5,7 +5,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
5
  import _regeneratorRuntime from '@babel/runtime/regenerator';
6
6
  import React__default, { useMemo, useRef, useCallback, useEffect, useState } from 'react';
7
7
  import classnames from 'classnames';
8
- import { Focus, Down } from '@bigbinary/neeto-icons';
8
+ import { ColorPicker as ColorPicker$1, Down } from '@bigbinary/neeto-icons';
9
9
  import { HexColorInput, HexAlphaColorPicker, HexColorPicker } from 'react-colorful';
10
10
  import { t as tinycolor } from './tinycolor-DX-kZ4bq.js';
11
11
  import Button from './Button.js';
@@ -34,25 +34,37 @@ const s=()=>"undefined"!=typeof window&&"EyeDropper"in window,i=()=>Promise.reje
34
34
 
35
35
  var useEyeDropper = p
36
36
 
37
+ var TRANSPARENT = "transparent";
38
+
37
39
  var Palette = function Palette(_ref) {
38
40
  var color = _ref.color,
39
41
  _ref$colorList = _ref.colorList,
40
42
  colorList = _ref$colorList === void 0 ? [] : _ref$colorList,
41
43
  onChange = _ref.onChange;
42
44
  return /*#__PURE__*/React__default.createElement("div", {
43
- className: "neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette"
44
- }, colorList.map(function (item, index) {
45
+ className: "neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette neeto-ui-gap-1"
46
+ }, colorList.map(function (item) {
47
+ var hex = item.hex,
48
+ colorClassName = item.colorClassName;
49
+ var isTransparent = hex === TRANSPARENT;
50
+ var isActive = Boolean((color === null || color === void 0 ? void 0 : color.hex) && color.hex === hex || (color === null || color === void 0 ? void 0 : color.colorClassName) && color.colorClassName === colorClassName);
45
51
  return /*#__PURE__*/React__default.createElement("div", {
46
52
  "data-testid": "color-palette-item",
47
- key: index,
48
- className: classnames("neeto-ui-color-palette__item", {
49
- active: color && color.from === item.from && color.to === item.to
53
+ key: hex !== null && hex !== void 0 ? hex : colorClassName,
54
+ className: classnames("neeto-ui-color-palette__item neeto-ui-border", {
55
+ active: isActive
50
56
  }),
51
57
  onClick: function onClick() {
52
- return onChange(item.from, item.to);
58
+ return onChange(item);
53
59
  }
54
60
  }, /*#__PURE__*/React__default.createElement("div", {
55
- className: "bg-gradient-to-r from-".concat(item.from, " to-").concat(item.to)
61
+ style: {
62
+ backgroundColor: hex
63
+ },
64
+ className: classnames({
65
+ "transparent-bg-pattern": isTransparent,
66
+ colorClassName: !isTransparent
67
+ })
56
68
  }));
57
69
  }));
58
70
  };
@@ -75,7 +87,7 @@ var ColorPicker = function ColorPicker(_ref) {
75
87
  colorPaletteProps = _ref.colorPaletteProps,
76
88
  dropdownProps = _ref.dropdownProps,
77
89
  _ref$showEyeDropper = _ref.showEyeDropper,
78
- showEyeDropper = _ref$showEyeDropper === void 0 ? false : _ref$showEyeDropper,
90
+ showEyeDropper = _ref$showEyeDropper === void 0 ? true : _ref$showEyeDropper,
79
91
  _ref$showHexValue = _ref.showHexValue,
80
92
  showHexValue = _ref$showHexValue === void 0 ? false : _ref$showHexValue,
81
93
  _ref$showTransparency = _ref.showTransparencyControl,
@@ -165,7 +177,7 @@ var ColorPicker = function ColorPicker(_ref) {
165
177
  }, color), /*#__PURE__*/React__default.createElement("span", {
166
178
  className: "neeto-ui-colorpicker-target__color-wrapper"
167
179
  }, /*#__PURE__*/React__default.createElement("span", {
168
- className: "neeto-ui-colorpicker-target__color neeto-ui-border-gray-400 border",
180
+ className: "neeto-ui-colorpicker-target__color neeto-ui-border-gray-200",
169
181
  style: {
170
182
  backgroundColor: colorValue
171
183
  }
@@ -187,22 +199,17 @@ var ColorPicker = function ColorPicker(_ref) {
187
199
  dropdownProps: _objectSpread(_objectSpread({}, dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.dropdownProps), portalProps)
188
200
  }), /*#__PURE__*/React__default.createElement("div", {
189
201
  className: "neeto-ui-colorpicker__popover"
190
- }, colorPaletteProps && /*#__PURE__*/React__default.createElement("div", {
191
- "data-testid": "color-palette",
192
- className: classnames("neeto-ui-colorpicker__palette-wrapper", {
193
- "neeto-ui-colorpicker__palette-wrapper--hidden-picker": !showPicker
194
- })
195
- }, /*#__PURE__*/React__default.createElement(Palette, colorPaletteProps)), showPicker && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
202
+ }, showPicker && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
196
203
  className: "neeto-ui-colorpicker__pointer",
197
204
  "data-testid": "neeto-color-picker-section"
198
205
  }, /*#__PURE__*/React__default.createElement(PickerComponent, {
199
206
  color: colorValue,
200
207
  onChange: onPickerChange
201
208
  })), /*#__PURE__*/React__default.createElement("div", {
202
- className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-2 neeto-ui-gap-2"
209
+ className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-3 neeto-ui-gap-2"
203
210
  }, showEyeDropper && isSupported() && /*#__PURE__*/React__default.createElement(Button, {
204
211
  className: "neeto-ui-colorpicker__eyedropper-btn",
205
- icon: Focus,
212
+ icon: ColorPicker$1,
206
213
  size: "small",
207
214
  style: "text",
208
215
  type: "button",
@@ -214,10 +221,17 @@ var ColorPicker = function ColorPicker(_ref) {
214
221
  "data-cy": "colorpicker-editable-input"
215
222
  }, /*#__PURE__*/React__default.createElement(HexColorInput, {
216
223
  onBlur: onBlur,
224
+ prefixed: true,
217
225
  alpha: !!showTransparencyControl,
218
226
  color: colorValue,
219
227
  onChange: onColorInputChange
220
- })))))));
228
+ }))))), colorPaletteProps && /*#__PURE__*/React__default.createElement("div", {
229
+ "data-testid": "color-palette",
230
+ className: classnames("neeto-ui-colorpicker__palette-wrapper", {
231
+ "neeto-ui-colorpicker__palette-wrapper--hidden-picker": !showPicker,
232
+ "neeto-ui-pt-3 neeto-ui-border-t neeto-ui-border-gray-200": showPicker
233
+ })
234
+ }, /*#__PURE__*/React__default.createElement(Palette, colorPaletteProps))));
221
235
  };
222
236
 
223
237
  export { ColorPicker as default };
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPicker.js","sources":["../node_modules/use-eye-dropper/lib/use-eye-dropper.module.js","../node_modules/use-eye-dropper/lib/index.module.js","../src/components/ColorPicker/Palette.jsx","../src/components/ColorPicker/index.jsx"],"sourcesContent":["import{useMemo as r,useRef as o,useCallback as n,useEffect as t,useState as e}from\"react\";const s=()=>\"undefined\"!=typeof window&&\"EyeDropper\"in window,i=()=>Promise.reject(new Error(\"Unsupported browser.\")),c=()=>{const r=o(),[i,c]=e(!1);t(()=>(r.current=!0,c(s()),()=>{r.current=!1}),[]);const u=n(()=>i,[i]);return[r,u]},u=r=>{const o=(r=>s()&&new EyeDropper(r))(r);var n;return(n=o)?EyeDropper.prototype.open.bind(n):i},p=e=>{const s=r(()=>u(e),[e]),[i,p]=c(),a=o(),f=n(()=>{void 0!==a.current&&a.current.abort()},[a]),d=n(function(r){void 0===r&&(r={});try{f();const{signal:o,...n}=r,t=new AbortController;a.current=t;const e=void 0!==o?(r=>{const o=new AbortController,n=()=>{o.abort();for(const o of r)o.removeEventListener(\"abort\",n)};for(const o of r){if(o.aborted){n();break}o.addEventListener(\"abort\",n)}return o.signal})([o,t.signal]):t.signal;return Promise.resolve(function(r,o){try{var t=Promise.resolve(s({...n,signal:e}))}catch(r){return o(r)}return t&&t.then?t.then(void 0,o):t}(0,function(r){throw i.current||(r.canceled=!0),r}))}catch(r){return Promise.reject(r)}},[a,i,f,s]);return t(()=>f,[f]),{open:d,close:f,isSupported:p}};export{p as default};\n","import { default as DropperDev } from './use-eye-dropper.module.dev.js'\nimport { default as Dropper } from './use-eye-dropper.module.js'\n\nexport default process.env.NODE_ENV === 'production' ? Dropper : DropperDev\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nconst Palette = ({ color, colorList = [], onChange }) => (\n <div className=\"neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette\">\n {colorList.map((item, index) => (\n <div\n data-testid=\"color-palette-item\"\n key={index}\n className={classnames(\"neeto-ui-color-palette__item\", {\n active: color && color.from === item.from && color.to === item.to,\n })}\n onClick={() => onChange(item.from, item.to)}\n >\n <div className={`bg-gradient-to-r from-${item.from} to-${item.to}`} />\n </div>\n ))}\n </div>\n);\n\nPalette.propTypes = {\n color: PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n};\n\nexport default Palette;\n","import React, { useState, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { Down, Focus } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport {\n HexColorPicker,\n HexColorInput,\n HexAlphaColorPicker,\n} from \"react-colorful\";\nimport tinycolor from \"tinycolor2\";\nimport useEyeDropper from \"use-eye-dropper\";\n\nimport Button from \"components/Button\";\nimport Dropdown from \"components/Dropdown\";\nimport { noop } from \"utils\";\n\nimport Palette from \"./Palette\";\n\nconst TARGET_SIZES = {\n large: \"large\",\n medium: \"medium\",\n small: \"small\",\n};\n\nconst ColorPicker = ({\n color = \"\",\n size = TARGET_SIZES.large,\n onChange = noop,\n colorPaletteProps,\n dropdownProps,\n showEyeDropper = false,\n showHexValue = false,\n showTransparencyControl = false,\n showPicker = true,\n portalProps,\n}) => {\n const [colorInternal, setColorInternal] = useState(color);\n const isInputChanged = useRef(false);\n const { open, isSupported } = useEyeDropper({ pickRadius: 3 });\n\n const PickerComponent = showTransparencyControl\n ? HexAlphaColorPicker\n : HexColorPicker;\n\n const colorValue = color ?? colorInternal ?? \"\";\n\n const onChangeInternal = onChange || setColorInternal;\n\n const getColor = colorValue => {\n const color = tinycolor(colorValue);\n\n return {\n hex: showTransparencyControl ? color.toHex8String() : color.toHexString(),\n rgb: color.toRgb(),\n };\n };\n\n const onColorInputChange = hex => {\n const color = tinycolor(hex);\n const rgb = color.toRgb();\n isInputChanged.current = true;\n\n onChangeInternal({ hex, rgb });\n };\n\n const onPickerChange = hex => onChangeInternal(getColor(hex));\n\n const onBlur = () => {\n // If input is not changed, don't call onChange on blur\n if (!isInputChanged.current) return;\n isInputChanged.current = false;\n onChangeInternal(getColor(colorValue));\n };\n\n const pickColor = async () => {\n try {\n const colorResponse = await open();\n const colorHex = tinycolor(colorResponse.sRGBHex).toHexString();\n onPickerChange(colorHex);\n } catch {\n // Ensures component is still mounted\n // before calling setState\n // if (!e.canceled) setError(e);\n }\n };\n\n const Target = ({ size }) => (\n <button\n data-cy=\"color-picker-target\"\n data-testid=\"neeto-color-picker\"\n type=\"button\"\n className={classnames(\"neeto-ui-colorpicker__target\", {\n \"neeto-ui-colorpicker__target-size--large\": size === TARGET_SIZES.large,\n \"neeto-ui-colorpicker__target-size--medium\":\n size === TARGET_SIZES.medium,\n \"neeto-ui-colorpicker__target-size--small\": size === TARGET_SIZES.small,\n })}\n >\n {showHexValue && (\n <span className=\"neeto-ui-colorpicker-target__code\">{color}</span>\n )}\n <span className=\"neeto-ui-colorpicker-target__color-wrapper\">\n <span\n className=\"neeto-ui-colorpicker-target__color neeto-ui-border-gray-400 border\"\n style={{ backgroundColor: colorValue }}\n />\n <span className=\"neeto-ui-colorpicker-target__icon\">\n <Down size={16} />\n </span>\n </span>\n </button>\n );\n\n return (\n <Dropdown\n className=\"neeto-ui-colorpicker__dropdown\"\n closeOnSelect={false}\n customTarget={<Target {...{ size }} />}\n label={colorValue}\n position=\"bottom-start\"\n {...dropdownProps}\n dropdownProps={{ ...dropdownProps?.dropdownProps, ...portalProps }}\n >\n <div className=\"neeto-ui-colorpicker__popover\">\n {colorPaletteProps && (\n <div\n data-testid=\"color-palette\"\n className={classnames(\"neeto-ui-colorpicker__palette-wrapper\", {\n \"neeto-ui-colorpicker__palette-wrapper--hidden-picker\":\n !showPicker,\n })}\n >\n <Palette {...colorPaletteProps} />\n </div>\n )}\n {showPicker && (\n <>\n <div\n className=\"neeto-ui-colorpicker__pointer\"\n data-testid=\"neeto-color-picker-section\"\n >\n <PickerComponent color={colorValue} onChange={onPickerChange} />\n </div>\n <div className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-2 neeto-ui-gap-2\">\n {showEyeDropper && isSupported() && (\n <Button\n className=\"neeto-ui-colorpicker__eyedropper-btn\"\n icon={Focus}\n size=\"small\"\n style=\"text\"\n type=\"button\"\n onClick={pickColor}\n />\n )}\n <div className=\"neeto-ui-input__wrapper\">\n <div\n className=\"neeto-ui-colorpicker__input neeto-ui-input neeto-ui-input--small\"\n data-cy=\"colorpicker-editable-input\"\n >\n <HexColorInput\n {...{ onBlur }}\n alpha={!!showTransparencyControl}\n color={colorValue}\n onChange={onColorInputChange}\n />\n </div>\n </div>\n </div>\n </>\n )}\n </div>\n </Dropdown>\n );\n};\n\nColorPicker.propTypes = {\n /**\n * To specify the color value.\n */\n color: PropTypes.string,\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To set the size of the target.\n */\n size: PropTypes.oneOf(Object.values(TARGET_SIZES)),\n /**\n * To specify the action to be triggered on changing the color.\n */\n onChange: PropTypes.func,\n /**\n * To specify the props to be passed to the Palette component.\n */\n colorPaletteProps: PropTypes.shape({\n color: PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n }),\n /**\n * Shows eye dropper to pick color.\n */\n showEyeDropper: PropTypes.bool,\n /**\n * To show hex value near to the color in the dropdown.\n * By default it will be hidden.\n */\n showHexValue: PropTypes.bool,\n /**\n * To show transparency control. By default it will be hidden.\n */\n showTransparencyControl: PropTypes.bool,\n /**\n * To show the color picker. Used to hide the picker in cases where only palette is required. By default it will be true.\n */\n showPicker: PropTypes.bool,\n /**\n * To specify the props to be passed to the dropdown portal.\n */\n portalProps: PropTypes.object,\n};\n\nexport default ColorPicker;\n"],"names":["o","e","t","n","r","Dropper","Palette","_ref","color","_ref$colorList","colorList","onChange","React","createElement","className","map","item","index","key","classnames","active","from","to","onClick","concat","TARGET_SIZES","large","medium","small","ColorPicker","_ref2","_ref$color","_ref$size","size","_ref$onChange","noop","colorPaletteProps","dropdownProps","_ref$showEyeDropper","showEyeDropper","_ref$showHexValue","showHexValue","_ref$showTransparency","showTransparencyControl","_ref$showPicker","showPicker","portalProps","_useState","useState","_useState2","_slicedToArray","colorInternal","setColorInternal","isInputChanged","useRef","_useEyeDropper","useEyeDropper","pickRadius","open","isSupported","PickerComponent","HexAlphaColorPicker","HexColorPicker","colorValue","onChangeInternal","getColor","tinycolor","hex","toHex8String","toHexString","rgb","toRgb","onColorInputChange","current","onPickerChange","onBlur","pickColor","_ref3","_asyncToGenerator","_regeneratorRuntime","mark","_callee","colorResponse","colorHex","wrap","_callee$","_context","prev","next","sent","sRGBHex","t0","stop","apply","arguments","Target","_ref4","type","style","backgroundColor","Down","Dropdown","_extends","closeOnSelect","customTarget","label","position","_objectSpread","Fragment","Button","icon","Focus","HexColorInput","alpha"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA0F,MAAM,CAAC,CAAC,IAAI,WAAW,EAAE,OAAO,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAACA,MAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,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AAKC,IAAAA,SAAS,EAAC,yBAAA;GACbF,eAAAA,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,kEAAkE;IAC5E,SAAQ,EAAA,4BAAA;AAA4B,GAAA,eAEpCF,cAAA,CAAAC,aAAA,CAACmG,aAAa,EAAA;AACNrC,IAAAA,MAAM,EAANA,MAAM;IACZsC,KAAK,EAAE,CAAC,CAACtE,uBAAwB;AACjCnC,IAAAA,KAAK,EAAEuD,UAAW;AAClBpD,IAAAA,QAAQ,EAAE6D,kBAAAA;AAAmB,GAAA,CAC7B,CACE,CACF,CACF,CAET,CACG,CACG,CAAA;AAEf;;;;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"ColorPicker.js","sources":["../node_modules/use-eye-dropper/lib/use-eye-dropper.module.js","../node_modules/use-eye-dropper/lib/index.module.js","../src/components/ColorPicker/constants.js","../src/components/ColorPicker/Palette.jsx","../src/components/ColorPicker/index.jsx"],"sourcesContent":["import{useMemo as r,useRef as o,useCallback as n,useEffect as t,useState as e}from\"react\";const s=()=>\"undefined\"!=typeof window&&\"EyeDropper\"in window,i=()=>Promise.reject(new Error(\"Unsupported browser.\")),c=()=>{const r=o(),[i,c]=e(!1);t(()=>(r.current=!0,c(s()),()=>{r.current=!1}),[]);const u=n(()=>i,[i]);return[r,u]},u=r=>{const o=(r=>s()&&new EyeDropper(r))(r);var n;return(n=o)?EyeDropper.prototype.open.bind(n):i},p=e=>{const s=r(()=>u(e),[e]),[i,p]=c(),a=o(),f=n(()=>{void 0!==a.current&&a.current.abort()},[a]),d=n(function(r){void 0===r&&(r={});try{f();const{signal:o,...n}=r,t=new AbortController;a.current=t;const e=void 0!==o?(r=>{const o=new AbortController,n=()=>{o.abort();for(const o of r)o.removeEventListener(\"abort\",n)};for(const o of r){if(o.aborted){n();break}o.addEventListener(\"abort\",n)}return o.signal})([o,t.signal]):t.signal;return Promise.resolve(function(r,o){try{var t=Promise.resolve(s({...n,signal:e}))}catch(r){return o(r)}return t&&t.then?t.then(void 0,o):t}(0,function(r){throw i.current||(r.canceled=!0),r}))}catch(r){return Promise.reject(r)}},[a,i,f,s]);return t(()=>f,[f]),{open:d,close:f,isSupported:p}};export{p as default};\n","import { default as DropperDev } from './use-eye-dropper.module.dev.js'\nimport { default as Dropper } from './use-eye-dropper.module.js'\n\nexport default process.env.NODE_ENV === 'production' ? Dropper : DropperDev\n","export const TRANSPARENT = \"transparent\";\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport { TRANSPARENT } from \"./constants\";\n\nconst Palette = ({ color, colorList = [], onChange }) => (\n <div className=\"neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette neeto-ui-gap-1\">\n {colorList.map(item => {\n const { hex, colorClassName } = item;\n const isTransparent = hex === TRANSPARENT;\n\n const isActive = Boolean(\n (color?.hex && color.hex === hex) ||\n (color?.colorClassName && color.colorClassName === colorClassName)\n );\n\n return (\n <div\n data-testid=\"color-palette-item\"\n key={hex ?? colorClassName}\n className={classnames(\n \"neeto-ui-color-palette__item neeto-ui-border\",\n { active: isActive }\n )}\n onClick={() => onChange(item)}\n >\n <div\n style={{ backgroundColor: hex }}\n className={classnames({\n \"transparent-bg-pattern\": isTransparent,\n colorClassName: !isTransparent,\n })}\n />\n </div>\n );\n })}\n </div>\n);\n\nPalette.propTypes = {\n color: PropTypes.shape({\n hex: PropTypes.string,\n colorClassName: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n hex: PropTypes.string,\n colorClassName: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n};\n\nexport default Palette;\n","import React, { useState, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { Down, ColorPicker as ColorPickerIcon } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport {\n HexColorPicker,\n HexColorInput,\n HexAlphaColorPicker,\n} from \"react-colorful\";\nimport tinycolor from \"tinycolor2\";\nimport useEyeDropper from \"use-eye-dropper\";\n\nimport Button from \"components/Button\";\nimport Dropdown from \"components/Dropdown\";\nimport { noop } from \"utils\";\n\nimport Palette from \"./Palette\";\n\nconst TARGET_SIZES = {\n large: \"large\",\n medium: \"medium\",\n small: \"small\",\n};\n\nconst ColorPicker = ({\n color = \"\",\n size = TARGET_SIZES.large,\n onChange = noop,\n colorPaletteProps,\n dropdownProps,\n showEyeDropper = true,\n showHexValue = false,\n showTransparencyControl = false,\n showPicker = true,\n portalProps,\n}) => {\n const [colorInternal, setColorInternal] = useState(color);\n const isInputChanged = useRef(false);\n const { open, isSupported } = useEyeDropper({ pickRadius: 3 });\n\n const PickerComponent = showTransparencyControl\n ? HexAlphaColorPicker\n : HexColorPicker;\n\n const colorValue = color ?? colorInternal ?? \"\";\n\n const onChangeInternal = onChange || setColorInternal;\n\n const getColor = colorValue => {\n const color = tinycolor(colorValue);\n\n return {\n hex: showTransparencyControl ? color.toHex8String() : color.toHexString(),\n rgb: color.toRgb(),\n };\n };\n\n const onColorInputChange = hex => {\n const color = tinycolor(hex);\n const rgb = color.toRgb();\n isInputChanged.current = true;\n\n onChangeInternal({ hex, rgb });\n };\n\n const onPickerChange = hex => onChangeInternal(getColor(hex));\n\n const onBlur = () => {\n // If input is not changed, don't call onChange on blur\n if (!isInputChanged.current) return;\n isInputChanged.current = false;\n onChangeInternal(getColor(colorValue));\n };\n\n const pickColor = async () => {\n try {\n const colorResponse = await open();\n const colorHex = tinycolor(colorResponse.sRGBHex).toHexString();\n onPickerChange(colorHex);\n } catch {\n // Ensures component is still mounted\n // before calling setState\n // if (!e.canceled) setError(e);\n }\n };\n\n const Target = ({ size }) => (\n <button\n data-cy=\"color-picker-target\"\n data-testid=\"neeto-color-picker\"\n type=\"button\"\n className={classnames(\"neeto-ui-colorpicker__target\", {\n \"neeto-ui-colorpicker__target-size--large\": size === TARGET_SIZES.large,\n \"neeto-ui-colorpicker__target-size--medium\":\n size === TARGET_SIZES.medium,\n \"neeto-ui-colorpicker__target-size--small\": size === TARGET_SIZES.small,\n })}\n >\n {showHexValue && (\n <span className=\"neeto-ui-colorpicker-target__code\">{color}</span>\n )}\n <span className=\"neeto-ui-colorpicker-target__color-wrapper\">\n <span\n className=\"neeto-ui-colorpicker-target__color neeto-ui-border-gray-200\"\n style={{ backgroundColor: colorValue }}\n />\n <span className=\"neeto-ui-colorpicker-target__icon\">\n <Down size={16} />\n </span>\n </span>\n </button>\n );\n\n return (\n <Dropdown\n className=\"neeto-ui-colorpicker__dropdown\"\n closeOnSelect={false}\n customTarget={<Target {...{ size }} />}\n label={colorValue}\n position=\"bottom-start\"\n {...dropdownProps}\n dropdownProps={{ ...dropdownProps?.dropdownProps, ...portalProps }}\n >\n <div className=\"neeto-ui-colorpicker__popover\">\n {showPicker && (\n <>\n <div\n className=\"neeto-ui-colorpicker__pointer\"\n data-testid=\"neeto-color-picker-section\"\n >\n <PickerComponent color={colorValue} onChange={onPickerChange} />\n </div>\n <div className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-3 neeto-ui-gap-2\">\n {showEyeDropper && isSupported() && (\n <Button\n className=\"neeto-ui-colorpicker__eyedropper-btn\"\n icon={ColorPickerIcon}\n size=\"small\"\n style=\"text\"\n type=\"button\"\n onClick={pickColor}\n />\n )}\n <div className=\"neeto-ui-input__wrapper\">\n <div\n className=\"neeto-ui-colorpicker__input neeto-ui-input neeto-ui-input--small\"\n data-cy=\"colorpicker-editable-input\"\n >\n <HexColorInput\n {...{ onBlur }}\n prefixed\n alpha={!!showTransparencyControl}\n color={colorValue}\n onChange={onColorInputChange}\n />\n </div>\n </div>\n </div>\n </>\n )}\n {colorPaletteProps && (\n <div\n data-testid=\"color-palette\"\n className={classnames(\"neeto-ui-colorpicker__palette-wrapper\", {\n \"neeto-ui-colorpicker__palette-wrapper--hidden-picker\":\n !showPicker,\n \"neeto-ui-pt-3 neeto-ui-border-t neeto-ui-border-gray-200\":\n showPicker,\n })}\n >\n <Palette {...colorPaletteProps} />\n </div>\n )}\n </div>\n </Dropdown>\n );\n};\n\nColorPicker.propTypes = {\n /**\n * To specify the color value.\n */\n color: PropTypes.string,\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To set the size of the target.\n */\n size: PropTypes.oneOf(Object.values(TARGET_SIZES)),\n /**\n * To specify the action to be triggered on changing the color.\n */\n onChange: PropTypes.func,\n /**\n * To specify the props to be passed to the Palette component.\n */\n colorPaletteProps: PropTypes.shape({\n color: PropTypes.shape({\n hex: PropTypes.string,\n colorClassName: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n hex: PropTypes.string,\n colorClassName: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n }),\n /**\n * Shows eye dropper to pick color.\n */\n showEyeDropper: PropTypes.bool,\n /**\n * To show hex value near to the color in the dropdown.\n * By default it will be enabled.\n */\n showHexValue: PropTypes.bool,\n /**\n * To show transparency control. By default it will be hidden.\n */\n showTransparencyControl: PropTypes.bool,\n /**\n * To show the color picker. Used to hide the picker in cases where only palette is required. By default it will be true.\n */\n showPicker: PropTypes.bool,\n /**\n * To specify the props to be passed to the dropdown portal.\n */\n portalProps: PropTypes.object,\n};\n\nexport default ColorPicker;\n"],"names":["o","e","t","n","r","Dropper","TRANSPARENT","Palette","_ref","color","_ref$colorList","colorList","onChange","React","createElement","className","map","item","hex","colorClassName","isTransparent","isActive","Boolean","key","classnames","active","onClick","style","backgroundColor","TARGET_SIZES","large","medium","small","ColorPicker","_ref2","_ref$color","_ref$size","size","_ref$onChange","noop","colorPaletteProps","dropdownProps","_ref$showEyeDropper","showEyeDropper","_ref$showHexValue","showHexValue","_ref$showTransparency","showTransparencyControl","_ref$showPicker","showPicker","portalProps","_useState","useState","_useState2","_slicedToArray","colorInternal","setColorInternal","isInputChanged","useRef","_useEyeDropper","useEyeDropper","pickRadius","open","isSupported","PickerComponent","HexAlphaColorPicker","HexColorPicker","colorValue","onChangeInternal","getColor","tinycolor","toHex8String","toHexString","rgb","toRgb","onColorInputChange","current","onPickerChange","onBlur","pickColor","_ref3","_asyncToGenerator","_regeneratorRuntime","mark","_callee","colorResponse","colorHex","wrap","_callee$","_context","prev","next","sent","sRGBHex","t0","stop","apply","arguments","Target","_ref4","type","Down","Dropdown","_extends","closeOnSelect","customTarget","label","position","_objectSpread","Fragment","Button","icon","ColorPickerIcon","HexColorInput","prefixed","alpha"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA0F,MAAM,CAAC,CAAC,IAAI,WAAW,EAAE,OAAO,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAACA,MAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,QAAC,CAAC,CAAC,CAAC,CAAC,CAACC,SAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAACC,WAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAM,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC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,UAAW;AAClBvD,IAAAA,QAAQ,EAAE+D,kBAAAA;GACV,CAAA,CACE,CACF,CACF,CAET,EACAnC,iBAAiB,iBAChB3B,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACE,IAAA,aAAA,EAAY,eAAe;AAC3BC,IAAAA,SAAS,EAAES,UAAU,CAAC,uCAAuC,EAAE;MAC7D,sDAAsD,EACpD,CAACyB,UAAU;AACb,MAAA,0DAA0D,EACxDA,UAAAA;KACH,CAAA;GAEDpC,eAAAA,cAAA,CAAAC,aAAA,CAACP,OAAO,EAAKiC,iBAAiB,CAAI,CAErC,CACG,CACG,CAAA;AAEf;;;;","x_google_ignoreList":[0,1]}
@@ -24,7 +24,7 @@ import 'react-colorful';
24
24
  import './tinycolor-DX-kZ4bq.js';
25
25
  import './Dropdown.js';
26
26
  import './index-qrY3Z55Q.js';
27
- export { D as default } from './index-CXmWCuhw.js';
27
+ export { D as default } from './index-CwFoAvhY.js';
28
28
  import './Input.js';
29
29
  import './Label.js';
30
30
  import './MultiEmailInput.js';
@@ -24,7 +24,7 @@ import 'react-colorful';
24
24
  import './tinycolor-DX-kZ4bq.js';
25
25
  import './Dropdown.js';
26
26
  import './index-qrY3Z55Q.js';
27
- export { T as default } from './index-CXmWCuhw.js';
27
+ export { T as default } from './index-CwFoAvhY.js';
28
28
  import './Input.js';
29
29
  import './Label.js';
30
30
  import './MultiEmailInput.js';
@@ -36,25 +36,37 @@ const s=()=>"undefined"!=typeof window&&"EyeDropper"in window,i=()=>Promise.reje
36
36
 
37
37
  var useEyeDropper = p
38
38
 
39
+ var TRANSPARENT = "transparent";
40
+
39
41
  var Palette = function Palette(_ref) {
40
42
  var color = _ref.color,
41
43
  _ref$colorList = _ref.colorList,
42
44
  colorList = _ref$colorList === void 0 ? [] : _ref$colorList,
43
45
  onChange = _ref.onChange;
44
46
  return /*#__PURE__*/React.createElement("div", {
45
- className: "neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette"
46
- }, colorList.map(function (item, index) {
47
+ className: "neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette neeto-ui-gap-1"
48
+ }, colorList.map(function (item) {
49
+ var hex = item.hex,
50
+ colorClassName = item.colorClassName;
51
+ var isTransparent = hex === TRANSPARENT;
52
+ var isActive = Boolean((color === null || color === void 0 ? void 0 : color.hex) && color.hex === hex || (color === null || color === void 0 ? void 0 : color.colorClassName) && color.colorClassName === colorClassName);
47
53
  return /*#__PURE__*/React.createElement("div", {
48
54
  "data-testid": "color-palette-item",
49
- key: index,
50
- className: classnames("neeto-ui-color-palette__item", {
51
- active: color && color.from === item.from && color.to === item.to
55
+ key: hex !== null && hex !== void 0 ? hex : colorClassName,
56
+ className: classnames("neeto-ui-color-palette__item neeto-ui-border", {
57
+ active: isActive
52
58
  }),
53
59
  onClick: function onClick() {
54
- return onChange(item.from, item.to);
60
+ return onChange(item);
55
61
  }
56
62
  }, /*#__PURE__*/React.createElement("div", {
57
- className: "bg-gradient-to-r from-".concat(item.from, " to-").concat(item.to)
63
+ style: {
64
+ backgroundColor: hex
65
+ },
66
+ className: classnames({
67
+ "transparent-bg-pattern": isTransparent,
68
+ colorClassName: !isTransparent
69
+ })
58
70
  }));
59
71
  }));
60
72
  };
@@ -77,7 +89,7 @@ var ColorPicker = function ColorPicker(_ref) {
77
89
  colorPaletteProps = _ref.colorPaletteProps,
78
90
  dropdownProps = _ref.dropdownProps,
79
91
  _ref$showEyeDropper = _ref.showEyeDropper,
80
- showEyeDropper = _ref$showEyeDropper === void 0 ? false : _ref$showEyeDropper,
92
+ showEyeDropper = _ref$showEyeDropper === void 0 ? true : _ref$showEyeDropper,
81
93
  _ref$showHexValue = _ref.showHexValue,
82
94
  showHexValue = _ref$showHexValue === void 0 ? false : _ref$showHexValue,
83
95
  _ref$showTransparency = _ref.showTransparencyControl,
@@ -167,7 +179,7 @@ var ColorPicker = function ColorPicker(_ref) {
167
179
  }, color), /*#__PURE__*/React.createElement("span", {
168
180
  className: "neeto-ui-colorpicker-target__color-wrapper"
169
181
  }, /*#__PURE__*/React.createElement("span", {
170
- className: "neeto-ui-colorpicker-target__color neeto-ui-border-gray-400 border",
182
+ className: "neeto-ui-colorpicker-target__color neeto-ui-border-gray-200",
171
183
  style: {
172
184
  backgroundColor: colorValue
173
185
  }
@@ -189,22 +201,17 @@ var ColorPicker = function ColorPicker(_ref) {
189
201
  dropdownProps: _objectSpread(_objectSpread({}, dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.dropdownProps), portalProps)
190
202
  }), /*#__PURE__*/React.createElement("div", {
191
203
  className: "neeto-ui-colorpicker__popover"
192
- }, colorPaletteProps && /*#__PURE__*/React.createElement("div", {
193
- "data-testid": "color-palette",
194
- className: classnames("neeto-ui-colorpicker__palette-wrapper", {
195
- "neeto-ui-colorpicker__palette-wrapper--hidden-picker": !showPicker
196
- })
197
- }, /*#__PURE__*/React.createElement(Palette, colorPaletteProps)), showPicker && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
204
+ }, showPicker && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
198
205
  className: "neeto-ui-colorpicker__pointer",
199
206
  "data-testid": "neeto-color-picker-section"
200
207
  }, /*#__PURE__*/React.createElement(PickerComponent, {
201
208
  color: colorValue,
202
209
  onChange: onPickerChange
203
210
  })), /*#__PURE__*/React.createElement("div", {
204
- className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-2 neeto-ui-gap-2"
211
+ className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-3 neeto-ui-gap-2"
205
212
  }, showEyeDropper && isSupported() && /*#__PURE__*/React.createElement(Button, {
206
213
  className: "neeto-ui-colorpicker__eyedropper-btn",
207
- icon: neetoIcons.Focus,
214
+ icon: neetoIcons.ColorPicker,
208
215
  size: "small",
209
216
  style: "text",
210
217
  type: "button",
@@ -216,10 +223,17 @@ var ColorPicker = function ColorPicker(_ref) {
216
223
  "data-cy": "colorpicker-editable-input"
217
224
  }, /*#__PURE__*/React.createElement(reactColorful.HexColorInput, {
218
225
  onBlur: onBlur,
226
+ prefixed: true,
219
227
  alpha: !!showTransparencyControl,
220
228
  color: colorValue,
221
229
  onChange: onColorInputChange
222
- })))))));
230
+ }))))), colorPaletteProps && /*#__PURE__*/React.createElement("div", {
231
+ "data-testid": "color-palette",
232
+ className: classnames("neeto-ui-colorpicker__palette-wrapper", {
233
+ "neeto-ui-colorpicker__palette-wrapper--hidden-picker": !showPicker,
234
+ "neeto-ui-pt-3 neeto-ui-border-t neeto-ui-border-gray-200": showPicker
235
+ })
236
+ }, /*#__PURE__*/React.createElement(Palette, colorPaletteProps))));
223
237
  };
224
238
 
225
239
  module.exports = ColorPicker;
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPicker.js","sources":["../../node_modules/use-eye-dropper/lib/use-eye-dropper.module.js","../../node_modules/use-eye-dropper/lib/index.module.js","../../src/components/ColorPicker/Palette.jsx","../../src/components/ColorPicker/index.jsx"],"sourcesContent":["import{useMemo as r,useRef as o,useCallback as n,useEffect as t,useState as e}from\"react\";const s=()=>\"undefined\"!=typeof window&&\"EyeDropper\"in window,i=()=>Promise.reject(new Error(\"Unsupported browser.\")),c=()=>{const r=o(),[i,c]=e(!1);t(()=>(r.current=!0,c(s()),()=>{r.current=!1}),[]);const u=n(()=>i,[i]);return[r,u]},u=r=>{const o=(r=>s()&&new EyeDropper(r))(r);var n;return(n=o)?EyeDropper.prototype.open.bind(n):i},p=e=>{const s=r(()=>u(e),[e]),[i,p]=c(),a=o(),f=n(()=>{void 0!==a.current&&a.current.abort()},[a]),d=n(function(r){void 0===r&&(r={});try{f();const{signal:o,...n}=r,t=new AbortController;a.current=t;const e=void 0!==o?(r=>{const o=new AbortController,n=()=>{o.abort();for(const o of r)o.removeEventListener(\"abort\",n)};for(const o of r){if(o.aborted){n();break}o.addEventListener(\"abort\",n)}return o.signal})([o,t.signal]):t.signal;return Promise.resolve(function(r,o){try{var t=Promise.resolve(s({...n,signal:e}))}catch(r){return o(r)}return t&&t.then?t.then(void 0,o):t}(0,function(r){throw i.current||(r.canceled=!0),r}))}catch(r){return Promise.reject(r)}},[a,i,f,s]);return t(()=>f,[f]),{open:d,close:f,isSupported:p}};export{p as default};\n","import { default as DropperDev } from './use-eye-dropper.module.dev.js'\nimport { default as Dropper } from './use-eye-dropper.module.js'\n\nexport default process.env.NODE_ENV === 'production' ? Dropper : DropperDev\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nconst Palette = ({ color, colorList = [], onChange }) => (\n <div className=\"neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette\">\n {colorList.map((item, index) => (\n <div\n data-testid=\"color-palette-item\"\n key={index}\n className={classnames(\"neeto-ui-color-palette__item\", {\n active: color && color.from === item.from && color.to === item.to,\n })}\n onClick={() => onChange(item.from, item.to)}\n >\n <div className={`bg-gradient-to-r from-${item.from} to-${item.to}`} />\n </div>\n ))}\n </div>\n);\n\nPalette.propTypes = {\n color: PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n};\n\nexport default Palette;\n","import React, { useState, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { Down, Focus } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport {\n HexColorPicker,\n HexColorInput,\n HexAlphaColorPicker,\n} from \"react-colorful\";\nimport tinycolor from \"tinycolor2\";\nimport useEyeDropper from \"use-eye-dropper\";\n\nimport Button from \"components/Button\";\nimport Dropdown from \"components/Dropdown\";\nimport { noop } from \"utils\";\n\nimport Palette from \"./Palette\";\n\nconst TARGET_SIZES = {\n large: \"large\",\n medium: \"medium\",\n small: \"small\",\n};\n\nconst ColorPicker = ({\n color = \"\",\n size = TARGET_SIZES.large,\n onChange = noop,\n colorPaletteProps,\n dropdownProps,\n showEyeDropper = false,\n showHexValue = false,\n showTransparencyControl = false,\n showPicker = true,\n portalProps,\n}) => {\n const [colorInternal, setColorInternal] = useState(color);\n const isInputChanged = useRef(false);\n const { open, isSupported } = useEyeDropper({ pickRadius: 3 });\n\n const PickerComponent = showTransparencyControl\n ? HexAlphaColorPicker\n : HexColorPicker;\n\n const colorValue = color ?? colorInternal ?? \"\";\n\n const onChangeInternal = onChange || setColorInternal;\n\n const getColor = colorValue => {\n const color = tinycolor(colorValue);\n\n return {\n hex: showTransparencyControl ? color.toHex8String() : color.toHexString(),\n rgb: color.toRgb(),\n };\n };\n\n const onColorInputChange = hex => {\n const color = tinycolor(hex);\n const rgb = color.toRgb();\n isInputChanged.current = true;\n\n onChangeInternal({ hex, rgb });\n };\n\n const onPickerChange = hex => onChangeInternal(getColor(hex));\n\n const onBlur = () => {\n // If input is not changed, don't call onChange on blur\n if (!isInputChanged.current) return;\n isInputChanged.current = false;\n onChangeInternal(getColor(colorValue));\n };\n\n const pickColor = async () => {\n try {\n const colorResponse = await open();\n const colorHex = tinycolor(colorResponse.sRGBHex).toHexString();\n onPickerChange(colorHex);\n } catch {\n // Ensures component is still mounted\n // before calling setState\n // if (!e.canceled) setError(e);\n }\n };\n\n const Target = ({ size }) => (\n <button\n data-cy=\"color-picker-target\"\n data-testid=\"neeto-color-picker\"\n type=\"button\"\n className={classnames(\"neeto-ui-colorpicker__target\", {\n \"neeto-ui-colorpicker__target-size--large\": size === TARGET_SIZES.large,\n \"neeto-ui-colorpicker__target-size--medium\":\n size === TARGET_SIZES.medium,\n \"neeto-ui-colorpicker__target-size--small\": size === TARGET_SIZES.small,\n })}\n >\n {showHexValue && (\n <span className=\"neeto-ui-colorpicker-target__code\">{color}</span>\n )}\n <span className=\"neeto-ui-colorpicker-target__color-wrapper\">\n <span\n className=\"neeto-ui-colorpicker-target__color neeto-ui-border-gray-400 border\"\n style={{ backgroundColor: colorValue }}\n />\n <span className=\"neeto-ui-colorpicker-target__icon\">\n <Down size={16} />\n </span>\n </span>\n </button>\n );\n\n return (\n <Dropdown\n className=\"neeto-ui-colorpicker__dropdown\"\n closeOnSelect={false}\n customTarget={<Target {...{ size }} />}\n label={colorValue}\n position=\"bottom-start\"\n {...dropdownProps}\n dropdownProps={{ ...dropdownProps?.dropdownProps, ...portalProps }}\n >\n <div className=\"neeto-ui-colorpicker__popover\">\n {colorPaletteProps && (\n <div\n data-testid=\"color-palette\"\n className={classnames(\"neeto-ui-colorpicker__palette-wrapper\", {\n \"neeto-ui-colorpicker__palette-wrapper--hidden-picker\":\n !showPicker,\n })}\n >\n <Palette {...colorPaletteProps} />\n </div>\n )}\n {showPicker && (\n <>\n <div\n className=\"neeto-ui-colorpicker__pointer\"\n data-testid=\"neeto-color-picker-section\"\n >\n <PickerComponent color={colorValue} onChange={onPickerChange} />\n </div>\n <div className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-2 neeto-ui-gap-2\">\n {showEyeDropper && isSupported() && (\n <Button\n className=\"neeto-ui-colorpicker__eyedropper-btn\"\n icon={Focus}\n size=\"small\"\n style=\"text\"\n type=\"button\"\n onClick={pickColor}\n />\n )}\n <div className=\"neeto-ui-input__wrapper\">\n <div\n className=\"neeto-ui-colorpicker__input neeto-ui-input neeto-ui-input--small\"\n data-cy=\"colorpicker-editable-input\"\n >\n <HexColorInput\n {...{ onBlur }}\n alpha={!!showTransparencyControl}\n color={colorValue}\n onChange={onColorInputChange}\n />\n </div>\n </div>\n </div>\n </>\n )}\n </div>\n </Dropdown>\n );\n};\n\nColorPicker.propTypes = {\n /**\n * To specify the color value.\n */\n color: PropTypes.string,\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To set the size of the target.\n */\n size: PropTypes.oneOf(Object.values(TARGET_SIZES)),\n /**\n * To specify the action to be triggered on changing the color.\n */\n onChange: PropTypes.func,\n /**\n * To specify the props to be passed to the Palette component.\n */\n colorPaletteProps: PropTypes.shape({\n color: PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n }),\n /**\n * Shows eye dropper to pick color.\n */\n showEyeDropper: PropTypes.bool,\n /**\n * To show hex value near to the color in the dropdown.\n * By default it will be hidden.\n */\n showHexValue: PropTypes.bool,\n /**\n * To show transparency control. By default it will be hidden.\n */\n showTransparencyControl: PropTypes.bool,\n /**\n * To show the color picker. Used to hide the picker in cases where only palette is required. By default it will be true.\n */\n showPicker: PropTypes.bool,\n /**\n * To specify the props to be passed to the dropdown portal.\n */\n portalProps: PropTypes.object,\n};\n\nexport default ColorPicker;\n"],"names":["o","e","t","n","r","Dropper","Palette","_ref","color","_ref$colorList","colorList","onChange","React","createElement","className","map","item","index","key","classnames","active","from","to","onClick","concat","TARGET_SIZES","large","medium","small","ColorPicker","_ref2","_ref$color","_ref$size","size","_ref$onChange","noop","colorPaletteProps","dropdownProps","_ref$showEyeDropper","showEyeDropper","_ref$showHexValue","showHexValue","_ref$showTransparency","showTransparencyControl","_ref$showPicker","showPicker","portalProps","_useState","useState","_useState2","_slicedToArray","colorInternal","setColorInternal","isInputChanged","useRef","_useEyeDropper","useEyeDropper","pickRadius","open","isSupported","PickerComponent","HexAlphaColorPicker","HexColorPicker","colorValue","onChangeInternal","getColor","tinycolor","hex","toHex8String","toHexString","rgb","toRgb","onColorInputChange","current","onPickerChange","onBlur","pickColor","_ref3","_asyncToGenerator","_regeneratorRuntime","mark","_callee","colorResponse","colorHex","wrap","_callee$","_context","prev","next","sent","sRGBHex","t0","stop","apply","arguments","Target","_ref4","type","style","backgroundColor","Down","Dropdown","_extends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AAKC,IAAAA,SAAS,EAAC,0FAAA;GACZyB,EAAAA,cAAc,IAAIoB,WAAW,EAAE,iBAC9B/C,KAAA,CAAAC,aAAA,CAACgG,MAAM,EAAA;AACL/F,IAAAA,SAAS,EAAC,sCAAsC;AAChDgG,IAAAA,IAAI,EAAEC,gBAAM;AACZ9E,IAAAA,IAAI,EAAC,OAAO;AACZiE,IAAAA,KAAK,EAAC,MAAM;AACZD,IAAAA,IAAI,EAAC,QAAQ;AACb1E,IAAAA,OAAO,EAAEqD,SAAAA;GAEZ,CAAA,eACDhE,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,yBAAA;GACbF,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,kEAAkE;IAC5E,SAAQ,EAAA,4BAAA;AAA4B,GAAA,eAEpCF,KAAA,CAAAC,aAAA,CAACmG,2BAAa,EAAA;AACNrC,IAAAA,MAAM,EAANA,MAAM;IACZsC,KAAK,EAAE,CAAC,CAACtE,uBAAwB;AACjCnC,IAAAA,KAAK,EAAEuD,UAAW;AAClBpD,IAAAA,QAAQ,EAAE6D,kBAAAA;AAAmB,GAAA,CAC7B,CACE,CACF,CACF,CAET,CACG,CACG,CAAA;AAEf;;;;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"ColorPicker.js","sources":["../../node_modules/use-eye-dropper/lib/use-eye-dropper.module.js","../../node_modules/use-eye-dropper/lib/index.module.js","../../src/components/ColorPicker/constants.js","../../src/components/ColorPicker/Palette.jsx","../../src/components/ColorPicker/index.jsx"],"sourcesContent":["import{useMemo as r,useRef as o,useCallback as n,useEffect as t,useState as e}from\"react\";const s=()=>\"undefined\"!=typeof window&&\"EyeDropper\"in window,i=()=>Promise.reject(new Error(\"Unsupported browser.\")),c=()=>{const r=o(),[i,c]=e(!1);t(()=>(r.current=!0,c(s()),()=>{r.current=!1}),[]);const u=n(()=>i,[i]);return[r,u]},u=r=>{const o=(r=>s()&&new EyeDropper(r))(r);var n;return(n=o)?EyeDropper.prototype.open.bind(n):i},p=e=>{const s=r(()=>u(e),[e]),[i,p]=c(),a=o(),f=n(()=>{void 0!==a.current&&a.current.abort()},[a]),d=n(function(r){void 0===r&&(r={});try{f();const{signal:o,...n}=r,t=new AbortController;a.current=t;const e=void 0!==o?(r=>{const o=new AbortController,n=()=>{o.abort();for(const o of r)o.removeEventListener(\"abort\",n)};for(const o of r){if(o.aborted){n();break}o.addEventListener(\"abort\",n)}return o.signal})([o,t.signal]):t.signal;return Promise.resolve(function(r,o){try{var t=Promise.resolve(s({...n,signal:e}))}catch(r){return o(r)}return t&&t.then?t.then(void 0,o):t}(0,function(r){throw i.current||(r.canceled=!0),r}))}catch(r){return Promise.reject(r)}},[a,i,f,s]);return t(()=>f,[f]),{open:d,close:f,isSupported:p}};export{p as default};\n","import { default as DropperDev } from './use-eye-dropper.module.dev.js'\nimport { default as Dropper } from './use-eye-dropper.module.js'\n\nexport default process.env.NODE_ENV === 'production' ? Dropper : DropperDev\n","export const TRANSPARENT = \"transparent\";\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport { TRANSPARENT } from \"./constants\";\n\nconst Palette = ({ color, colorList = [], onChange }) => (\n <div className=\"neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette neeto-ui-gap-1\">\n {colorList.map(item => {\n const { hex, colorClassName } = item;\n const isTransparent = hex === TRANSPARENT;\n\n const isActive = Boolean(\n (color?.hex && color.hex === hex) ||\n (color?.colorClassName && color.colorClassName === colorClassName)\n );\n\n return (\n <div\n data-testid=\"color-palette-item\"\n key={hex ?? colorClassName}\n className={classnames(\n \"neeto-ui-color-palette__item neeto-ui-border\",\n { active: isActive }\n )}\n onClick={() => onChange(item)}\n >\n <div\n style={{ backgroundColor: hex }}\n className={classnames({\n \"transparent-bg-pattern\": isTransparent,\n colorClassName: !isTransparent,\n })}\n />\n </div>\n );\n })}\n </div>\n);\n\nPalette.propTypes = {\n color: PropTypes.shape({\n hex: PropTypes.string,\n colorClassName: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n hex: PropTypes.string,\n colorClassName: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n};\n\nexport default Palette;\n","import React, { useState, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { Down, ColorPicker as ColorPickerIcon } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport {\n HexColorPicker,\n HexColorInput,\n HexAlphaColorPicker,\n} from \"react-colorful\";\nimport tinycolor from \"tinycolor2\";\nimport useEyeDropper from \"use-eye-dropper\";\n\nimport Button from \"components/Button\";\nimport Dropdown from \"components/Dropdown\";\nimport { noop } from \"utils\";\n\nimport Palette from \"./Palette\";\n\nconst TARGET_SIZES = {\n large: \"large\",\n medium: \"medium\",\n small: \"small\",\n};\n\nconst ColorPicker = ({\n color = \"\",\n size = TARGET_SIZES.large,\n onChange = noop,\n colorPaletteProps,\n dropdownProps,\n showEyeDropper = true,\n showHexValue = false,\n showTransparencyControl = false,\n showPicker = true,\n portalProps,\n}) => {\n const [colorInternal, setColorInternal] = useState(color);\n const isInputChanged = useRef(false);\n const { open, isSupported } = useEyeDropper({ pickRadius: 3 });\n\n const PickerComponent = showTransparencyControl\n ? HexAlphaColorPicker\n : HexColorPicker;\n\n const colorValue = color ?? colorInternal ?? \"\";\n\n const onChangeInternal = onChange || setColorInternal;\n\n const getColor = colorValue => {\n const color = tinycolor(colorValue);\n\n return {\n hex: showTransparencyControl ? color.toHex8String() : color.toHexString(),\n rgb: color.toRgb(),\n };\n };\n\n const onColorInputChange = hex => {\n const color = tinycolor(hex);\n const rgb = color.toRgb();\n isInputChanged.current = true;\n\n onChangeInternal({ hex, rgb });\n };\n\n const onPickerChange = hex => onChangeInternal(getColor(hex));\n\n const onBlur = () => {\n // If input is not changed, don't call onChange on blur\n if (!isInputChanged.current) return;\n isInputChanged.current = false;\n onChangeInternal(getColor(colorValue));\n };\n\n const pickColor = async () => {\n try {\n const colorResponse = await open();\n const colorHex = tinycolor(colorResponse.sRGBHex).toHexString();\n onPickerChange(colorHex);\n } catch {\n // Ensures component is still mounted\n // before calling setState\n // if (!e.canceled) setError(e);\n }\n };\n\n const Target = ({ size }) => (\n <button\n data-cy=\"color-picker-target\"\n data-testid=\"neeto-color-picker\"\n type=\"button\"\n className={classnames(\"neeto-ui-colorpicker__target\", {\n \"neeto-ui-colorpicker__target-size--large\": size === TARGET_SIZES.large,\n \"neeto-ui-colorpicker__target-size--medium\":\n size === TARGET_SIZES.medium,\n \"neeto-ui-colorpicker__target-size--small\": size === TARGET_SIZES.small,\n })}\n >\n {showHexValue && (\n <span className=\"neeto-ui-colorpicker-target__code\">{color}</span>\n )}\n <span className=\"neeto-ui-colorpicker-target__color-wrapper\">\n <span\n className=\"neeto-ui-colorpicker-target__color neeto-ui-border-gray-200\"\n style={{ backgroundColor: colorValue }}\n />\n <span className=\"neeto-ui-colorpicker-target__icon\">\n <Down size={16} />\n </span>\n </span>\n </button>\n );\n\n return (\n <Dropdown\n className=\"neeto-ui-colorpicker__dropdown\"\n closeOnSelect={false}\n customTarget={<Target {...{ size }} />}\n label={colorValue}\n position=\"bottom-start\"\n {...dropdownProps}\n dropdownProps={{ ...dropdownProps?.dropdownProps, ...portalProps }}\n >\n <div className=\"neeto-ui-colorpicker__popover\">\n {showPicker && (\n <>\n <div\n className=\"neeto-ui-colorpicker__pointer\"\n data-testid=\"neeto-color-picker-section\"\n >\n <PickerComponent color={colorValue} onChange={onPickerChange} />\n </div>\n <div className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-3 neeto-ui-gap-2\">\n {showEyeDropper && isSupported() && (\n <Button\n className=\"neeto-ui-colorpicker__eyedropper-btn\"\n icon={ColorPickerIcon}\n size=\"small\"\n style=\"text\"\n type=\"button\"\n onClick={pickColor}\n />\n )}\n <div className=\"neeto-ui-input__wrapper\">\n <div\n className=\"neeto-ui-colorpicker__input neeto-ui-input neeto-ui-input--small\"\n data-cy=\"colorpicker-editable-input\"\n >\n <HexColorInput\n {...{ onBlur }}\n prefixed\n alpha={!!showTransparencyControl}\n color={colorValue}\n onChange={onColorInputChange}\n />\n </div>\n </div>\n </div>\n </>\n )}\n {colorPaletteProps && (\n <div\n data-testid=\"color-palette\"\n className={classnames(\"neeto-ui-colorpicker__palette-wrapper\", {\n \"neeto-ui-colorpicker__palette-wrapper--hidden-picker\":\n !showPicker,\n \"neeto-ui-pt-3 neeto-ui-border-t neeto-ui-border-gray-200\":\n showPicker,\n })}\n >\n <Palette {...colorPaletteProps} />\n </div>\n )}\n </div>\n </Dropdown>\n );\n};\n\nColorPicker.propTypes = {\n /**\n * To specify the color value.\n */\n color: PropTypes.string,\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To set the size of the target.\n */\n size: PropTypes.oneOf(Object.values(TARGET_SIZES)),\n /**\n * To specify the action to be triggered on changing the color.\n */\n onChange: PropTypes.func,\n /**\n * To specify the props to be passed to the Palette component.\n */\n colorPaletteProps: PropTypes.shape({\n color: PropTypes.shape({\n hex: PropTypes.string,\n colorClassName: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n hex: PropTypes.string,\n colorClassName: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n }),\n /**\n * Shows eye dropper to pick color.\n */\n showEyeDropper: PropTypes.bool,\n /**\n * To show hex value near to the color in the dropdown.\n * By default it will be enabled.\n */\n showHexValue: PropTypes.bool,\n /**\n * To show transparency control. By default it will be hidden.\n */\n showTransparencyControl: PropTypes.bool,\n /**\n * To show the color picker. Used to hide the picker in cases where only palette is required. By default it will be true.\n */\n showPicker: PropTypes.bool,\n /**\n * To specify the props to be passed to the dropdown portal.\n */\n portalProps: PropTypes.object,\n};\n\nexport default ColorPicker;\n"],"names":["o","e","t","n","r","Dropper","TRANSPARENT","Palette","_ref","color","_ref$colorList","colorList","onChange","React","createElement","className","map","item","hex","colorClassName","isTransparent","isActive","Boolean","key","classnames","active","onClick","style","backgroundColor","TARGET_SIZES","large","medium","small","ColorPicker","_ref2","_ref$color","_ref$size","size","_ref$onChange","noop","colorPaletteProps","dropdownProps","_ref$showEyeDropper","showEyeDropper","_ref$showHexValue","showHexValue","_ref$showTransparency","showTransparencyControl","_ref$showPicker","showPicker","portalProps","_useState","useState","_useState2","_slicedToArray","colorInternal","setColorInternal","isInputChanged","useRef","_useEyeDropper","useEyeDropper","pickRadius","open","isSupported","PickerComponent","HexAlphaColorPicker","HexColorPicker","colorValue","onChangeInternal","getColor","tinycolor","toHex8String","toHexString","rgb","toRgb","onColorInputChange","current","onPickerChange","onBlur","pickColor","_ref3","_asyncToGenerator","_regeneratorRuntime","mark","_callee","colorResponse","colorHex","wrap","_callee$","_context","prev","next","sent","sRGBHex","t0","stop","apply","arguments","Target","_ref4","type","Down","Dropdown","_extends","closeOnSelect","customTarget","label","position","_objectSpread","Fragment","Button","icon","ColorPickerIcon","HexColorInput","prefixed","alpha"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA0F,MAAM,CAAC,CAAC,IAAI,WAAW,EAAE,OAAO,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAACA,YAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,cAAC,CAAC,CAAC,CAAC,CAAC,CAACC,eAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAC,CAAC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EAAEqD,SAAAA;GAEZ,CAAA,eACDlE,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,yBAAA;GACbF,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,kEAAkE;IAC5E,SAAQ,EAAA,4BAAA;AAA4B,GAAA,eAEpCF,KAAA,CAAAC,aAAA,CAACmG,2BAAa,EAAA;AACNnC,IAAAA,MAAM,EAANA,MAAM;IACZoC,QAAQ,EAAA,IAAA;IACRC,KAAK,EAAE,CAAC,CAACpE,uBAAwB;AACjCtC,IAAAA,KAAK,EAAE0D,UAAW;AAClBvD,IAAAA,QAAQ,EAAE+D,kBAAAA;GACV,CAAA,CACE,CACF,CACF,CAET,EACAnC,iBAAiB,iBAChB3B,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACE,IAAA,aAAA,EAAY,eAAe;AAC3BC,IAAAA,SAAS,EAAES,UAAU,CAAC,uCAAuC,EAAE;MAC7D,sDAAsD,EACpD,CAACyB,UAAU;AACb,MAAA,0DAA0D,EACxDA,UAAAA;KACH,CAAA;GAEDpC,eAAAA,KAAA,CAAAC,aAAA,CAACP,OAAO,EAAKiC,iBAAiB,CAAI,CAErC,CACG,CACG,CAAA;AAEf;;;;","x_google_ignoreList":[0,1]}
@@ -26,7 +26,7 @@ require('react-colorful');
26
26
  require('./tinycolor-C4a31PPv.js');
27
27
  require('./Dropdown.js');
28
28
  require('./index-CeDeXLYn.js');
29
- var DatePicker = require('./index-BY50BuGO.js');
29
+ var DatePicker = require('./index-DISv_xh0.js');
30
30
  require('./Input.js');
31
31
  require('./Label.js');
32
32
  require('./MultiEmailInput.js');
@@ -26,7 +26,7 @@ require('react-colorful');
26
26
  require('./tinycolor-C4a31PPv.js');
27
27
  require('./Dropdown.js');
28
28
  require('./index-CeDeXLYn.js');
29
- var DatePicker = require('./index-BY50BuGO.js');
29
+ var DatePicker = require('./index-DISv_xh0.js');
30
30
  require('./Input.js');
31
31
  require('./Label.js');
32
32
  require('./MultiEmailInput.js');
@@ -511,4 +511,4 @@ TimePicker.displayName = "TimePicker";
511
511
 
512
512
  exports.DatePicker = DatePicker;
513
513
  exports.TimePicker = TimePicker;
514
- //# sourceMappingURL=index-BY50BuGO.js.map
514
+ //# sourceMappingURL=index-DISv_xh0.js.map