@bigbinary/neetoui 8.2.41 → 8.2.42

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';
@@ -40,12 +40,12 @@ var Palette = function Palette(_ref) {
40
40
  colorList = _ref$colorList === void 0 ? [] : _ref$colorList,
41
41
  onChange = _ref.onChange;
42
42
  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"
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 neeto-ui-gap-1"
44
44
  }, colorList.map(function (item, index) {
45
45
  return /*#__PURE__*/React__default.createElement("div", {
46
46
  "data-testid": "color-palette-item",
47
47
  key: index,
48
- className: classnames("neeto-ui-color-palette__item", {
48
+ className: classnames("neeto-ui-color-palette__item neeto-ui-border", {
49
49
  active: color && color.from === item.from && color.to === item.to
50
50
  }),
51
51
  onClick: function onClick() {
@@ -75,7 +75,7 @@ var ColorPicker = function ColorPicker(_ref) {
75
75
  colorPaletteProps = _ref.colorPaletteProps,
76
76
  dropdownProps = _ref.dropdownProps,
77
77
  _ref$showEyeDropper = _ref.showEyeDropper,
78
- showEyeDropper = _ref$showEyeDropper === void 0 ? false : _ref$showEyeDropper,
78
+ showEyeDropper = _ref$showEyeDropper === void 0 ? true : _ref$showEyeDropper,
79
79
  _ref$showHexValue = _ref.showHexValue,
80
80
  showHexValue = _ref$showHexValue === void 0 ? false : _ref$showHexValue,
81
81
  _ref$showTransparency = _ref.showTransparencyControl,
@@ -165,7 +165,7 @@ var ColorPicker = function ColorPicker(_ref) {
165
165
  }, color), /*#__PURE__*/React__default.createElement("span", {
166
166
  className: "neeto-ui-colorpicker-target__color-wrapper"
167
167
  }, /*#__PURE__*/React__default.createElement("span", {
168
- className: "neeto-ui-colorpicker-target__color neeto-ui-border-gray-400 border",
168
+ className: "neeto-ui-colorpicker-target__color neeto-ui-border-gray-200",
169
169
  style: {
170
170
  backgroundColor: colorValue
171
171
  }
@@ -187,22 +187,17 @@ var ColorPicker = function ColorPicker(_ref) {
187
187
  dropdownProps: _objectSpread(_objectSpread({}, dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.dropdownProps), portalProps)
188
188
  }), /*#__PURE__*/React__default.createElement("div", {
189
189
  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", {
190
+ }, showPicker && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
196
191
  className: "neeto-ui-colorpicker__pointer",
197
192
  "data-testid": "neeto-color-picker-section"
198
193
  }, /*#__PURE__*/React__default.createElement(PickerComponent, {
199
194
  color: colorValue,
200
195
  onChange: onPickerChange
201
196
  })), /*#__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"
197
+ className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-3 neeto-ui-gap-2"
203
198
  }, showEyeDropper && isSupported() && /*#__PURE__*/React__default.createElement(Button, {
204
199
  className: "neeto-ui-colorpicker__eyedropper-btn",
205
- icon: Focus,
200
+ icon: ColorPicker$1,
206
201
  size: "small",
207
202
  style: "text",
208
203
  type: "button",
@@ -214,10 +209,17 @@ var ColorPicker = function ColorPicker(_ref) {
214
209
  "data-cy": "colorpicker-editable-input"
215
210
  }, /*#__PURE__*/React__default.createElement(HexColorInput, {
216
211
  onBlur: onBlur,
212
+ prefixed: true,
217
213
  alpha: !!showTransparencyControl,
218
214
  color: colorValue,
219
215
  onChange: onColorInputChange
220
- })))))));
216
+ }))))), colorPaletteProps && /*#__PURE__*/React__default.createElement("div", {
217
+ "data-testid": "color-palette",
218
+ className: classnames("neeto-ui-colorpicker__palette-wrapper", {
219
+ "neeto-ui-colorpicker__palette-wrapper--hidden-picker": !showPicker,
220
+ "neeto-ui-pt-3 neeto-ui-border-t neeto-ui-border-gray-200": showPicker
221
+ })
222
+ }, /*#__PURE__*/React__default.createElement(Palette, colorPaletteProps))));
221
223
  };
222
224
 
223
225
  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,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,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,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eAExCF,cAAA,CAAAC,aAAA,CAAC+C,eAAe,EAAA;AAACpD,IAAAA,KAAK,EAAEuD,UAAW;AAACpD,IAAAA,QAAQ,EAAE+D,cAAAA;AAAe,GAAA,CAAG,CAC5D,eACN9D,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,0FAAA;GACZyB,EAAAA,cAAc,IAAIoB,WAAW,EAAE,iBAC9B/C,cAAA,CAAAC,aAAA,CAACgG,MAAM,EAAA;AACL/F,IAAAA,SAAS,EAAC,sCAAsC;AAChDgG,IAAAA,IAAI,EAAEC,KAAM;AACZ9E,IAAAA,IAAI,EAAC,OAAO;AACZiE,IAAAA,KAAK,EAAC,MAAM;AACZD,IAAAA,IAAI,EAAC,QAAQ;AACb1E,IAAAA,OAAO,EAAEqD,SAAAA;GAEZ,CAAA,eACDhE,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,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/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 neeto-ui-gap-1\">\n {colorList.map((item, index) => (\n <div\n data-testid=\"color-palette-item\"\n key={index}\n className={classnames(\"neeto-ui-color-palette__item neeto-ui-border\", {\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({ from: PropTypes.string, to: PropTypes.string })\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 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 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","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","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,OAA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,CAAC0B,UAAU;AACb,MAAA,0DAA0D,EACxDA,UAAAA;KACH,CAAA;GAEDjC,eAAAA,cAAA,CAAAC,aAAA,CAACP,OAAO,EAAK8B,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';
@@ -42,12 +42,12 @@ var Palette = function Palette(_ref) {
42
42
  colorList = _ref$colorList === void 0 ? [] : _ref$colorList,
43
43
  onChange = _ref.onChange;
44
44
  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"
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
46
  }, colorList.map(function (item, index) {
47
47
  return /*#__PURE__*/React.createElement("div", {
48
48
  "data-testid": "color-palette-item",
49
49
  key: index,
50
- className: classnames("neeto-ui-color-palette__item", {
50
+ className: classnames("neeto-ui-color-palette__item neeto-ui-border", {
51
51
  active: color && color.from === item.from && color.to === item.to
52
52
  }),
53
53
  onClick: function onClick() {
@@ -77,7 +77,7 @@ var ColorPicker = function ColorPicker(_ref) {
77
77
  colorPaletteProps = _ref.colorPaletteProps,
78
78
  dropdownProps = _ref.dropdownProps,
79
79
  _ref$showEyeDropper = _ref.showEyeDropper,
80
- showEyeDropper = _ref$showEyeDropper === void 0 ? false : _ref$showEyeDropper,
80
+ showEyeDropper = _ref$showEyeDropper === void 0 ? true : _ref$showEyeDropper,
81
81
  _ref$showHexValue = _ref.showHexValue,
82
82
  showHexValue = _ref$showHexValue === void 0 ? false : _ref$showHexValue,
83
83
  _ref$showTransparency = _ref.showTransparencyControl,
@@ -167,7 +167,7 @@ var ColorPicker = function ColorPicker(_ref) {
167
167
  }, color), /*#__PURE__*/React.createElement("span", {
168
168
  className: "neeto-ui-colorpicker-target__color-wrapper"
169
169
  }, /*#__PURE__*/React.createElement("span", {
170
- className: "neeto-ui-colorpicker-target__color neeto-ui-border-gray-400 border",
170
+ className: "neeto-ui-colorpicker-target__color neeto-ui-border-gray-200",
171
171
  style: {
172
172
  backgroundColor: colorValue
173
173
  }
@@ -189,22 +189,17 @@ var ColorPicker = function ColorPicker(_ref) {
189
189
  dropdownProps: _objectSpread(_objectSpread({}, dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.dropdownProps), portalProps)
190
190
  }), /*#__PURE__*/React.createElement("div", {
191
191
  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", {
192
+ }, showPicker && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
198
193
  className: "neeto-ui-colorpicker__pointer",
199
194
  "data-testid": "neeto-color-picker-section"
200
195
  }, /*#__PURE__*/React.createElement(PickerComponent, {
201
196
  color: colorValue,
202
197
  onChange: onPickerChange
203
198
  })), /*#__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"
199
+ className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-3 neeto-ui-gap-2"
205
200
  }, showEyeDropper && isSupported() && /*#__PURE__*/React.createElement(Button, {
206
201
  className: "neeto-ui-colorpicker__eyedropper-btn",
207
- icon: neetoIcons.Focus,
202
+ icon: neetoIcons.ColorPicker,
208
203
  size: "small",
209
204
  style: "text",
210
205
  type: "button",
@@ -216,10 +211,17 @@ var ColorPicker = function ColorPicker(_ref) {
216
211
  "data-cy": "colorpicker-editable-input"
217
212
  }, /*#__PURE__*/React.createElement(reactColorful.HexColorInput, {
218
213
  onBlur: onBlur,
214
+ prefixed: true,
219
215
  alpha: !!showTransparencyControl,
220
216
  color: colorValue,
221
217
  onChange: onColorInputChange
222
- })))))));
218
+ }))))), colorPaletteProps && /*#__PURE__*/React.createElement("div", {
219
+ "data-testid": "color-palette",
220
+ className: classnames("neeto-ui-colorpicker__palette-wrapper", {
221
+ "neeto-ui-colorpicker__palette-wrapper--hidden-picker": !showPicker,
222
+ "neeto-ui-pt-3 neeto-ui-border-t neeto-ui-border-gray-200": showPicker
223
+ })
224
+ }, /*#__PURE__*/React.createElement(Palette, colorPaletteProps))));
223
225
  };
224
226
 
225
227
  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","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,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,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAACC,iBAAC,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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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 neeto-ui-gap-1\">\n {colorList.map((item, index) => (\n <div\n data-testid=\"color-palette-item\"\n key={index}\n className={classnames(\"neeto-ui-color-palette__item neeto-ui-border\", {\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({ from: PropTypes.string, to: PropTypes.string })\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 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 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","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","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,CAA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,EACApC,iBAAiB,iBAChBxB,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACE,IAAA,aAAA,EAAY,eAAe;AAC3BC,IAAAA,SAAS,EAAEK,UAAU,CAAC,uCAAuC,EAAE;MAC7D,sDAAsD,EACpD,CAAC0B,UAAU;AACb,MAAA,0DAA0D,EACxDA,UAAAA;KACH,CAAA;GAEDjC,eAAAA,KAAA,CAAAC,aAAA,CAACP,OAAO,EAAK8B,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