@bigbinary/neetoui 8.2.40 → 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-f5vacrcC.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-f5vacrcC.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,C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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,CAAC,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ACApC,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-h_4GQiYg.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-h_4GQiYg.js');
29
+ var DatePicker = require('./index-DISv_xh0.js');
30
30
  require('./Input.js');
31
31
  require('./Label.js');
32
32
  require('./MultiEmailInput.js');
@@ -248,10 +248,6 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
248
248
  _useState6 = _slicedToArray(_useState5, 2),
249
249
  pickerValue = _useState6[0],
250
250
  setPickerValue = _useState6[1];
251
- var _useState7 = React.useState(false),
252
- _useState8 = _slicedToArray(_useState7, 2),
253
- touched = _useState8[0],
254
- setTouched = _useState8[1];
255
251
  var id = useId.useId(otherProps.id);
256
252
  var datePickerRef = Textarea.useSyncedRef(ref);
257
253
  var Component = datePickerTypes[type === null || type === void 0 ? void 0 : type.toLowerCase()];
@@ -272,7 +268,6 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
272
268
  }
273
269
  var allowed = getAllowedValue(index.getTimezoneAppliedDateTime(date));
274
270
  setValue(allowed);
275
- setTouched(true);
276
271
  return onChange(allowed, formattedString(allowed, dateFormat));
277
272
  };
278
273
  var renderExtraFooter = function renderExtraFooter() {
@@ -286,33 +281,19 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
286
281
  }
287
282
  });
288
283
  };
289
- var _useMemo = React.useMemo(function () {
290
- var sanitizedDefaultValue = index.convertToDayjsObjects(defaultValue);
291
- var sanitizedValue = index.convertToDayjsObjects(value);
292
- if (touched) {
293
- sanitizedValue = getAllowedValue(sanitizedValue);
294
- sanitizedDefaultValue = getAllowedValue(sanitizedDefaultValue);
295
- }
296
- return {
297
- sanitizedDefaultValue: sanitizedDefaultValue,
298
- sanitizedValue: sanitizedValue
299
- };
300
- }, [defaultValue, value, touched, getAllowedValue]),
301
- sanitizedValue = _useMemo.sanitizedValue,
302
- sanitizedDefaultValue = _useMemo.sanitizedDefaultValue;
303
284
  return /*#__PURE__*/React.createElement(Provider, null, /*#__PURE__*/React.createElement("div", {
304
285
  className: "neeto-ui-input__wrapper"
305
286
  }, label && /*#__PURE__*/React.createElement(Label, _objectSpread$1({
306
287
  required: required
307
288
  }, labelProps), label), /*#__PURE__*/React.createElement(Component, _extends({
308
289
  "data-cy": label ? "".concat(index.hyphenize(label), "-input") : "picker-input",
309
- defaultValue: sanitizedDefaultValue,
290
+ defaultValue: index.convertToDayjsObjects(defaultValue),
310
291
  placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : format,
311
292
  ref: datePickerRef,
312
293
  showTime: showTime && _objectSpread$1({
313
294
  format: timeFormat
314
295
  }, timePickerProps),
315
- value: sanitizedValue,
296
+ value: index.convertToDayjsObjects(value),
316
297
  className: classnames("neeto-ui-date-input", [className], {
317
298
  "neeto-ui-date-input--small": size === "small",
318
299
  "neeto-ui-date-input--medium": size === "medium",
@@ -530,4 +511,4 @@ TimePicker.displayName = "TimePicker";
530
511
 
531
512
  exports.DatePicker = DatePicker;
532
513
  exports.TimePicker = TimePicker;
533
- //# sourceMappingURL=index-h_4GQiYg.js.map
514
+ //# sourceMappingURL=index-DISv_xh0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DISv_xh0.js","sources":["../../src/components/DatePicker/IconOverride.jsx","../../src/components/DatePicker/Provider.jsx","../../src/components/DatePicker/Today.jsx","../../src/components/DatePicker/utils.js","../../src/components/DatePicker/index.jsx","../../src/components/TimePicker/constants.js","../../src/components/TimePicker/index.jsx"],"sourcesContent":["import React from \"react\";\n\nconst IconOverride = ({ icon: Icon }) => (\n <span className=\"neeto-ui-btn neeto-ui-btn--style-text neeto-ui-btn--size-medium neeto-ui-btn--icon-only\">\n <Icon className=\"neeto-ui-btn__icon\" size={20} />\n </span>\n);\n\nexport default IconOverride;\n","import React from \"react\";\n\nimport { ConfigProvider } from \"antd\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANTD_LOCALE } from \"components/constants\";\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nconst Provider = ({ children }) => {\n const { i18n } = useTranslation();\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n DatePicker: {\n activeBg: \"rgb(var(--neeto-ui-white))\",\n activeBorderColor: \"rgb(var(--neeto-ui-primary-500))\",\n addonBg: \"rgb(var(--neeto-ui-gray-100))\",\n cellActiveWithRangeBg: \"rgb(var(--neeto-ui-primary-100))\",\n cellBgDisabled: \"rgb(var(--neeto-ui-gray-100))\",\n cellHoverBg: \"rgb(var(--neeto-ui-gray-200))\",\n cellHoverWithRangeBg: \"rgb(var(--neeto-ui-primary-100))\",\n cellRangeBorderColor: \"rgb(var(--neeto-ui-primary-100))\",\n hoverBg: \"rgb(var(--neeto-ui-white))\",\n hoverBorderColor: \"rgb(var(--neeto-ui-primary-500))\",\n\n // Global overrides\n colorBgContainer: \"rgb(var(--neeto-ui-white))\",\n colorBgElevated: \"rgb(var(--neeto-ui-white))\",\n colorPrimary: \"rgb(var(--neeto-ui-primary-500))\",\n colorPrimaryBorder: \"rgb(var(--neeto-ui-primary-100))\",\n colorPrimaryHover: \"rgb(var(--neeto-ui-primary-600))\",\n colorBorder: \"rgb(var(--neeto-ui-gray-300))\",\n colorError: \"rgb(var(--neeto-ui-error-500))\",\n colorErrorHover: \"rgb(var(--neeto-ui-error-600))\",\n colorErrorOutline: \"rgb(var(--neeto-ui-error-100))\",\n colorFillAlter: \"rgb(var(--neeto-ui-gray-100))\",\n colorIcon: \"rgb(var(--neeto-ui-gray-700))\",\n colorIconHover: \"rgb(var(--neeto-ui-gray-800))\",\n colorLink: \"rgb(var(--neeto-ui-primary-500))\",\n colorLinkHover: \"rgb(var(--neeto-ui-primary-600))\",\n colorLinkActive: \"rgb(var(--neeto-ui-primary-800))\",\n colorSplit: \"rgb(var(--neeto-ui-gray-200))\",\n colorText: \"rgb(var(--neeto-ui-gray-800))\",\n colorTextDescription: \"rgb(var(--neeto-ui-gray-700))\",\n colorTextDisabled: \"rgb(var(--neeto-ui-gray-500))\",\n colorTextHeading: \"rgb(var(--neeto-ui-black))\",\n colorTextLightSolid: \"rgb(var(--neeto-ui-white))\",\n colorTextPlaceholder: \"rgb(var(--neeto-ui-gray-400))\",\n colorTextQuaternary: \"rgb(var(--neeto-ui-gray-400))\",\n colorWarning: \"rgb(var(--neeto-ui-warning-500))\",\n colorWarningHover: \"rgb(var(--neeto-ui-warning-600))\",\n colorWarningOutline: \"rgb(var(--neeto-ui-warning-100))\",\n controlItemBgActive: \"rgb(var(--neeto-ui-pastel-purple))\",\n controlItemBgHover: \"rgb(var(--neeto-ui-gray-100))\",\n controlOutline: \"rgb(var(--neeto-ui-gray-300))\",\n\n // Sizes\n cellHeight: 32,\n padding: 22,\n },\n },\n }}\n >\n {children}\n </ConfigProvider>\n );\n};\n\nexport default Provider;\n","/* eslint-disable @bigbinary/neeto/no-dumb-components-with-use-translation */\nimport React from \"react\";\n\nimport { useTranslation } from \"react-i18next\";\n\nimport { getLocale } from \"utils\";\n\nconst Today = ({ onClick }) => {\n const { t, i18n } = useTranslation();\n\n return (\n <div className=\"text-center\">\n <button\n {...{ onClick }}\n className=\"neeto-ui-rounded-md hover:neeto-ui-bg-gray-200 px-2 py-1 text-xs font-medium transition duration-300 ease-in-out\"\n data-cy=\"year-month-mode-today\"\n >\n {getLocale(i18n, t, \"neetoui.datePicker.today\")}\n </button>\n </div>\n );\n};\n\nexport default Today;\n","import { isPresent } from \"neetocist\";\n\nconst getAllowedDate = (date, minDate, maxDate) => {\n if (isPresent(minDate) && date?.isBefore(minDate)) {\n return minDate;\n }\n\n if (isPresent(maxDate) && date?.isAfter(maxDate)) {\n return maxDate;\n }\n\n return date;\n};\n\nconst getAllowedRange = (dates, minDate, maxDate) =>\n dates.map(item => getAllowedDate(item, minDate, maxDate));\n\nconst getAllowed = (date, minDate, maxDate) =>\n (Array.isArray(date) ? getAllowedRange : getAllowedDate)(\n date,\n minDate,\n maxDate\n );\n\nconst formattedString = (date, dateFormat) =>\n Array.isArray(date)\n ? date.map(item => item?.format(dateFormat))\n : date?.format(dateFormat);\n\nexport { getAllowed, formattedString };\n","import React, { forwardRef, useState, useEffect, useCallback } from \"react\";\n\nimport { DatePicker as AntDatePicker } from \"antd\";\nimport classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Left, Right, Calendar, Close } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\n\nimport { Tag } from \"components\";\nimport Label from \"components/Label\";\nimport { useSyncedRef, useId } from \"hooks\";\nimport {\n convertToDayjsObjects,\n noop,\n hyphenize,\n dayjs,\n getTimezoneAppliedDateTime,\n} from \"utils\";\n\nimport IconOverride from \"./IconOverride\";\nimport Provider from \"./Provider\";\nimport Today from \"./Today\";\nimport { getAllowed, formattedString } from \"./utils\";\n\nconst INPUT_SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nconst { RangePicker } = AntDatePicker;\n\nconst datePickerTypes = { range: RangePicker, date: AntDatePicker };\n\nconst DatePicker = forwardRef(\n (\n {\n className = \"\",\n label = \"\",\n size = INPUT_SIZES.medium,\n dropdownClassName = \"\",\n popupClassName = \"\",\n dateFormat = \"DD/MM/YYYY\",\n timeFormat = \"HH:mm:ss\",\n placeholder,\n onChange = noop,\n onOk = noop,\n picker = \"date\",\n showTime = false,\n type = \"date\",\n nakedInput = false,\n error = \"\",\n defaultValue,\n value: inputValue,\n labelProps,\n required = false,\n allowClear = true,\n maxDate,\n minDate,\n timePickerProps,\n timezone,\n ...otherProps\n },\n ref\n ) => {\n const [value, setValue] = useState(inputValue);\n const [mode, setMode] = useState(picker);\n const [pickerValue, setPickerValue] = useState();\n const id = useId(otherProps.id);\n const datePickerRef = useSyncedRef(ref);\n\n const Component = datePickerTypes[type?.toLowerCase()];\n const format = showTime ? `${dateFormat} ${timeFormat}` : dateFormat;\n\n const errorId = `error_${id}`;\n\n useEffect(() => {\n setValue(inputValue);\n }, [inputValue]);\n\n useEffect(() => {\n setMode(picker);\n }, [picker]);\n\n const getAllowedValue = useCallback(\n date => getAllowed(date, minDate, maxDate),\n [minDate, maxDate]\n );\n\n const handleOnChange = (date, dateString) => {\n if (type === \"range\" && isNotPresent(date)) {\n return onChange([], dateString);\n }\n\n const allowed = getAllowedValue(getTimezoneAppliedDateTime(date));\n setValue(allowed);\n\n return onChange(allowed, formattedString(allowed, dateFormat));\n };\n\n const renderExtraFooter = () => {\n if (type === \"range\" || mode === \"date\") return null;\n\n return (\n <Today\n onClick={() => {\n const today = dayjs();\n setValue(today);\n onChange(today, formattedString(today, dateFormat));\n setMode(picker);\n }}\n />\n );\n };\n\n return (\n <Provider>\n <div className=\"neeto-ui-input__wrapper\">\n {label && <Label {...{ required, ...labelProps }}>{label}</Label>}\n <Component\n data-cy={label ? `${hyphenize(label)}-input` : \"picker-input\"}\n defaultValue={convertToDayjsObjects(defaultValue)}\n placeholder={placeholder ?? format}\n ref={datePickerRef}\n showTime={showTime && { format: timeFormat, ...timePickerProps }}\n value={convertToDayjsObjects(value)}\n className={classnames(\"neeto-ui-date-input\", [className], {\n \"neeto-ui-date-input--small\": size === \"small\",\n \"neeto-ui-date-input--medium\": size === \"medium\",\n \"neeto-ui-date-input--large\": size === \"large\",\n \"neeto-ui-date-input--disabled\": otherProps.disabled,\n \"neeto-ui-date-input--naked\": nakedInput,\n \"neeto-ui-date-input--error\": !!error,\n })}\n popupClassName={classnames(\"neeto-ui-date-time-dropdown\", [\n dropdownClassName, // Will be removed in the next major version\n popupClassName,\n ])}\n onChange={handleOnChange}\n {...{\n format,\n maxDate,\n minDate,\n onOk,\n picker,\n ...otherProps,\n ...(type === \"date\" && {\n mode,\n pickerValue,\n renderExtraFooter,\n onPanelChange: (pickerValue, mode) => {\n setPickerValue(pickerValue);\n setMode(mode);\n },\n }),\n }}\n getNow={dayjs}\n nextIcon={<IconOverride icon={Right} />}\n prevIcon={<IconOverride icon={Left} />}\n superNextIcon={<IconOverride icon={Right} />}\n superPrevIcon={<IconOverride icon={Left} />}\n allowClear={\n allowClear && {\n clearIcon: <Close data-cy=\"date-time-clear-icon\" size={16} />,\n }\n }\n suffixIcon={\n timezone ? <Tag label={timezone} /> : <Calendar size={16} />\n }\n />\n {!!error && typeof error === \"string\" && (\n <p\n className=\"neeto-ui-input__error\"\n data-cy={`${hyphenize(label)}-input-error`}\n id={errorId}\n >\n {error}\n </p>\n )}\n </div>\n </Provider>\n );\n }\n);\n\nDatePicker.displayName = \"DatePicker\";\n\nDatePicker.propTypes = {\n /**\n * To provide external classnames to DatePicker component.\n */\n className: PropTypes.string,\n /**\n * To provide external classnames to DatePicker popup.\n */\n popupClassName: PropTypes.string,\n /**\n * To set the text to be displayed above the DatePicker.\n */\n label: PropTypes.string,\n /**\n * To specify the label props to be passed to the Label component.\n */\n labelProps: PropTypes.object,\n /**\n * To set the size of the DatePicker.\n */\n size: PropTypes.oneOf(Object.values(INPUT_SIZES)),\n /**\n * To set the DatePicker as naked Input field.\n */\n nakedInput: PropTypes.bool,\n /**\n * To specify the error message to be shown in the DatePicker.\n */\n error: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n /**\n * To set DatePicker as disabled.\n */\n disabled: PropTypes.bool,\n /**\n * To specify custom classnames to be applied to the DatePicker dropdown.\n */\n dropdownClassName: PropTypes.string,\n /**\n * To specify the date format.\n */\n dateFormat: PropTypes.string,\n /**\n * To specify the time format.\n */\n timeFormat: PropTypes.string,\n /**\n * To specify the placeholder text for the DatePicker, if not provided, the format will be used as placeholder.\n */\n placeholder: PropTypes.string,\n /**\n * To specify props to be passed to the time picker.\n */\n timePickerProps: PropTypes.object,\n /**\n * To specify the timezone.\n */\n timezone: PropTypes.string,\n /**\n * For `DateInput`,(date, dateString) => {} <br />\n * For `DateRange`, (date, [startDate, endDate]) => {}\n */\n onChange: PropTypes.func,\n /**\n * Callback function which will be invoked when ok button is clicked in DateInput\n */\n onOk: PropTypes.func,\n /**\n * To specify the type of the picker.\n */\n picker: PropTypes.oneOf([\"date\", \"week\", \"month\", \"quarter\", \"year\"]),\n /**\n * To show time picker\n */\n showTime: PropTypes.bool,\n /**\n * To specify the type of the DatePicker.\n */\n type: PropTypes.oneOf(Object.keys(datePickerTypes)),\n /**\n * To specify the values to be displayed inside the DatePicker.\n */\n value: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n /**\n * To specify the default values to be displayed inside the DatePicker.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n /**\n * To specify whether the Date picker is required or not.\n */\n required: PropTypes.bool,\n /**\n * To specify whether the Date picker value can be cleared or not.\n */\n allowClear: PropTypes.bool,\n /**\n * To specify the minimum date of the DatePicker.\n */\n minDate: PropTypes.object,\n /**\n * To specify the maximum date of the DatePicker.\n */\n maxDate: PropTypes.object,\n};\n\nexport default DatePicker;\n","import { DatePicker as AntTimePicker } from \"antd\";\n\nconst { RangePicker } = AntTimePicker;\n\nexport const TIME_PICKER_TYPES = {\n range: RangePicker,\n time: AntTimePicker,\n};\n","import React, { forwardRef } from \"react\";\n\nimport { ConfigProvider } from \"antd\";\nimport classnames from \"classnames\";\nimport { Clock } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Tag } from \"components\";\nimport { ANTD_LOCALE } from \"components/constants\";\nimport Label from \"components/Label\";\nimport { useSyncedRef, useId } from \"hooks\";\nimport {\n convertToDayjsObjects,\n noop,\n hyphenize,\n ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES,\n getLocale,\n getTimezoneAppliedDateTime,\n} from \"utils\";\n\nimport { TIME_PICKER_TYPES } from \"./constants\";\n\nconst INPUT_SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nconst TIME_PICKER_INTERVAL = {\n hourStep: 1,\n minuteStep: 1,\n secondStep: 1,\n};\n\nconst TimePicker = forwardRef(\n (\n {\n className = \"\",\n label = \"\",\n size = INPUT_SIZES.medium,\n dropdownClassName = \"\",\n popupClassName = \"\",\n format = \"HH:mm:ss\",\n interval = TIME_PICKER_INTERVAL,\n onChange = noop,\n type = \"time\",\n nakedInput = false,\n disabled = false,\n error = \"\",\n defaultValue,\n value,\n labelProps,\n required = false,\n placeholder,\n timezone,\n ...otherProps\n },\n ref\n ) => {\n const { t, i18n } = useTranslation();\n const id = useId(otherProps.id);\n const timePickerRef = useSyncedRef(ref);\n\n const Component = TIME_PICKER_TYPES[type.toLowerCase()];\n\n const errorId = `error_${id}`;\n\n const showTimeLabels = {};\n if (format.includes(\"s\")) {\n showTimeLabels.second = true;\n }\n\n if (format.includes(\"m\")) {\n showTimeLabels.minute = true;\n }\n\n if (format.includes(\"H\") || format.includes(\"h\")) {\n showTimeLabels.hour = true;\n }\n\n const handleOnChange = (time, timeString) => {\n type === \"range\" && !time\n ? onChange([], timeString)\n : onChange(getTimezoneAppliedDateTime(time), timeString);\n };\n\n const panelRender = originalPanel => (\n <div className=\"neeto-ui-date-input-custom-panel\">\n <div className=\"neeto-ui-date-input-custom-panel__header\">\n <ul className=\"neeto-ui-date-input-custom-panel__header-cols\">\n {showTimeLabels.hour && (\n <li className=\"neeto-ui-date-input-custom-panel__header-col\">\n {getLocale(i18n, t, \"neetoui.timePicker.hours\")}\n </li>\n )}\n {showTimeLabels.minute && (\n <li className=\"neeto-ui-date-input-custom-panel__header-col\">\n {getLocale(i18n, t, \"neetoui.timePicker.minutes\")}\n </li>\n )}\n {showTimeLabels.second && (\n <li className=\"neeto-ui-date-input-custom-panel__header-col\">\n {getLocale(i18n, t, \"neetoui.timePicker.seconds\")}\n </li>\n )}\n </ul>\n </div>\n <div className=\"neeto-ui-date-input-custom-panel__body\">\n {originalPanel}\n </div>\n </div>\n );\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n DatePicker: {\n // Global overrides\n colorBgElevated: \"rgb(var(--neeto-ui-white))\",\n colorPrimary: \"rgb(var(--neeto-ui-primary-500))\",\n colorPrimaryHover: \"rgb(var(--neeto-ui-primary-600))\",\n colorBorder: \"rgb(var(--neeto-ui-gray-300))\",\n colorLink: \"rgb(var(--neeto-ui-primary-500))\",\n colorLinkHover: \"rgb(var(--neeto-ui-primary-600))\",\n colorText: \"rgb(var(--neeto-ui-gray-800))\",\n colorTextDisabled: \"rgb(var(--neeto-ui-gray-500))\",\n colorTextPlaceholder: \"rgb(var(--neeto-ui-gray-400))\",\n controlItemBgActive: \"rgb(var(--neeto-ui-primary-800))\",\n controlItemBgHover: \"rgb(var(--neeto-ui-gray-100))\",\n controlOutline: \"rgb(var(--neeto-ui-gray-300))\",\n },\n },\n }}\n >\n <div className=\"neeto-ui-input__wrapper\">\n {label && <Label {...{ required, ...labelProps }}>{label}</Label>}\n <Component\n hourStep={interval.hourStep}\n minuteStep={interval.minuteStep}\n ref={timePickerRef}\n secondStep={interval.secondStep}\n className={classnames(\"neeto-ui-time-input\", [className], {\n \"neeto-ui-time-input--small\": size === \"small\",\n \"neeto-ui-time-input--medium\": size === \"medium\",\n \"neeto-ui-time-input--large\": size === \"large\",\n \"neeto-ui-time-input--disabled\": disabled,\n \"neeto-ui-time-input--naked\": nakedInput,\n \"neeto-ui-time-input--error\": error,\n })}\n popupClassName={classnames(\"neeto-ui-date-time-dropdown\", [\n dropdownClassName, // Will be removed in the next major version\n popupClassName,\n ])}\n onChange={handleOnChange}\n {...{ disabled, format, ...otherProps, panelRender }}\n defaultValue={convertToDayjsObjects(defaultValue)}\n mode={undefined}\n picker=\"time\"\n placeholder={placeholder ?? format}\n value={convertToDayjsObjects(value)}\n suffixIcon={\n timezone ? <Tag label={timezone} /> : <Clock size={16} />\n }\n />\n {!!error && (\n <p\n className=\"neeto-ui-input__error\"\n data-cy={`${hyphenize(label)}-input-error`}\n id={errorId}\n >\n {error}\n </p>\n )}\n </div>\n </ConfigProvider>\n );\n }\n);\n\nTimePicker.displayName = \"TimePicker\";\n\nTimePicker.propTypes = {\n /**\n * To provide external classnames to TimePicker component.\n */\n className: PropTypes.string,\n /**\n * To provide external classnames to TimePicker popup component.\n */\n popupClassName: PropTypes.string,\n /**\n * To set the text to be displayed above the TimePicker.\n */\n label: PropTypes.string,\n /**\n * To specify the label props to be passed to the Label component.\n */\n labelProps: PropTypes.object,\n /**\n * To set the size of the TimePicker.\n */\n size: PropTypes.oneOf(Object.values(INPUT_SIZES)),\n /**\n * To set the TimePicker as naked Input field.\n */\n nakedInput: PropTypes.bool,\n /**\n * To specify the error message to be shown in the TimePicker.\n */\n error: PropTypes.string,\n /**\n * To specify the time format.\n */\n format: PropTypes.string,\n /**\n * To specify the timezone.\n */\n timezone: PropTypes.string,\n /**\n * To set the placeholder text for the TimePicker, if not provided, the format will be used as placeholder.\n */\n placeholder: PropTypes.string,\n /**\n * To specify the time interval.\n */\n interval: PropTypes.object,\n /**\n * For `TimeInput`,(time, timeString) => {} <br />\n * For `TimeRange`, (time, [startTime, endTime]) => {}\n */\n onChange: PropTypes.func,\n /**\n * To specify the type of the TimePicker.\n */\n type: PropTypes.oneOf([\"time\", \"range\"]),\n /**\n * To set TimePicker as disabled.\n */\n disabled: PropTypes.bool,\n /**\n * To specify the values to be displayed inside the TimePicker.\n */\n value: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n /**\n * To specify custom classnames to be applied to the TimePicker dropdown.\n */\n dropdownClassName: PropTypes.string,\n /**\n * To specify the default values to be displayed inside the TimePicker.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n /**\n * To specify whether the Time picker is required or not.\n */\n required: PropTypes.bool,\n};\n\nexport default TimePicker;\n"],"names":["IconOverride","_ref","Icon","icon","React","createElement","className","size","Provider","children","_useTranslation","useTranslation","i18n","_ConfigProvider","locale","ANTD_LOCALE","language","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","DatePicker","activeBg","activeBorderColor","addonBg","cellActiveWithRangeBg","cellBgDisabled","cellHoverBg","cellHoverWithRangeBg","cellRangeBorderColor","hoverBg","hoverBorderColor","colorBgContainer","colorBgElevated","colorPrimary","colorPrimaryBorder","colorPrimaryHover","colorBorder","colorError","colorErrorHover","colorErrorOutline","colorFillAlter","colorIcon","colorIconHover","colorLink","colorLinkHover","colorLinkActive","colorSplit","colorText","colorTextDescription","colorTextDisabled","colorTextHeading","colorTextLightSolid","colorTextPlaceholder","colorTextQuaternary","colorWarning","colorWarningHover","colorWarningOutline","controlItemBgActive","controlItemBgHover","controlOutline","cellHeight","padding","Today","onClick","t","getLocale","getAllowedDate","date","minDate","maxDate","isPresent","isBefore","isAfter","getAllowedRange","dates","map","item","getAllowed","Array","isArray","formattedString","dateFormat","format","INPUT_SIZES","small","medium","large","RangePicker","_DatePicker","datePickerTypes","range","forwardRef","ref","_ref$className","_ref$label","label","_ref$size","_ref$dropdownClassNam","dropdownClassName","_ref$popupClassName","popupClassName","_ref$dateFormat","_ref$timeFormat","timeFormat","placeholder","_ref$onChange","onChange","noop","_ref$onOk","onOk","_ref$picker","picker","_ref$showTime","showTime","_ref$type","type","_ref$nakedInput","nakedInput","_ref$error","error","defaultValue","inputValue","value","labelProps","_ref$required","required","_ref$allowClear","allowClear","timePickerProps","timezone","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","setValue","_useState3","_useState4","mode","setMode","_useState5","_useState6","pickerValue","setPickerValue","id","useId","datePickerRef","useSyncedRef","Component","toLowerCase","concat","errorId","useEffect","getAllowedValue","useCallback","handleOnChange","dateString","isNotPresent","allowed","getTimezoneAppliedDateTime","renderExtraFooter","today","dayjs","Label","_extends","hyphenize","convertToDayjsObjects","classnames","disabled","onPanelChange","getNow","nextIcon","Right","prevIcon","Left","superNextIcon","superPrevIcon","clearIcon","Close","suffixIcon","Tag","Calendar","displayName","TIME_PICKER_TYPES","time","TIME_PICKER_INTERVAL","hourStep","minuteStep","secondStep","TimePicker","_ref$format","_ref$interval","interval","_ref$disabled","timePickerRef","showTimeLabels","includes","second","minute","hour","timeString","panelRender","originalPanel","undefined","Clock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAYC,IAAI,GAAAD,IAAA,CAAVE,IAAI,CAAA;EAAA,oBAC1BC,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMC,IAAAA,SAAS,EAAC,yFAAA;AAAyF,GAAA,eACvGF,KAAA,CAAAC,aAAA,CAACH,IAAI,EAAA;AAACI,IAAAA,SAAS,EAAC,oBAAoB;AAACC,IAAAA,IAAI,EAAE,EAAA;AAAG,GAAA,CAAG,CAC5C,CAAA;AAAA,CACR;;;;ACED,IAAMC,QAAQ,GAAG,SAAXA,QAAQA,CAAAP,IAAA,EAAqB;AAAA,EAA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