@pedidopago/ui 1.8.3 → 1.8.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/NewSelect/components/SelectItem/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,eAAO,MAAM,mBAAmB;;;;;qHA6B/B,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/NewSelect/components/SelectItem/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,eAAO,MAAM,mBAAmB;;;;;qHA8B/B,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SelectItemContainer=void 0;var _templateObject,_react=require("@emotion/react"),_styled=_interopRequireDefault(require("@emotion/styled"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var SelectItemContainer=_styled.default.button(function(_ref){var _ref$sizeSelect=_ref.sizeSelect,sizeSelect=void 0===_ref$sizeSelect?"md":_ref$sizeSelect,theme=_ref.theme;return(0,_react.css)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n outline: none;\n padding: ",";\n text-align: ",";\n font-weight: ",";\n font-size: ",";\n color: ",";\n transition: all ease 0.2s;\n cursor: pointer;\n background: none;\n border: none;\n font-family: inherit;\n min-height: auto;\n\n &.selected {\n background: ","50;\n\n &:hover {\n filter: brightness(0.9);\n }\n }\n\n &:hover {\n background: ",";\n }\n "])),{sm:"0.5rem",md:"1rem 2rem"}[sizeSelect],{sm:"center",md:"left"}[sizeSelect],theme.fontWeight[500],theme.fontSizes.xs,theme.colors.neutral.neutral5,theme.colors.neutral.neutral2,theme.colors.neutral.neutral1)});exports.SelectItemContainer=SelectItemContainer;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SelectItemContainer=void 0;var _templateObject,_react=require("@emotion/react"),_styled=_interopRequireDefault(require("@emotion/styled"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var SelectItemContainer=_styled.default.button(function(_ref){var _ref$sizeSelect=_ref.sizeSelect,sizeSelect=void 0===_ref$sizeSelect?"md":_ref$sizeSelect,theme=_ref.theme;return(0,_react.css)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n width: 100%;\n outline: none;\n padding: ",";\n text-align: ",";\n font-weight: ",";\n font-size: ",";\n color: ",";\n transition: all ease 0.2s;\n cursor: pointer;\n background: none;\n border: none;\n font-family: inherit;\n min-height: auto;\n\n &.selected {\n background: ","50;\n\n &:hover {\n filter: brightness(0.9);\n }\n }\n\n &:hover {\n background: ",";\n }\n "])),{sm:"0.5rem",md:"1rem 2rem"}[sizeSelect],{sm:"center",md:"left"}[sizeSelect],theme.fontWeight[500],theme.fontSizes.xs,theme.colors.neutral.neutral5,theme.colors.neutral.neutral2,theme.colors.neutral.neutral1)});exports.SelectItemContainer=SelectItemContainer;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { SelectPropsMultipleSelect } from '../types';
3
- export declare function NewMultipleSelect({ label, placeholder, alert, helperText, variant, children, value, onClose, onOpen, renderOptions, onChange, ...rest }: SelectPropsMultipleSelect): JSX.Element;
3
+ export declare function NewMultipleSelect({ label, placeholder, alert, helperText, variant, children, value, onClose, onOpen, renderOptions, onChange, optionsContainerStyles, ...rest }: SelectPropsMultipleSelect): JSX.Element;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/multiple/index.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAgB,yBAAyB,EAAe,MAAM,UAAU,CAAC;AAIhF,wBAAgB,iBAAiB,CAAC,EAChC,KAAU,EACV,WAAgB,EAChB,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,aAAa,EACb,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,yBAAyB,eAqL3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/multiple/index.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAgB,yBAAyB,EAAe,MAAM,UAAU,CAAC;AAIhF,wBAAgB,iBAAiB,CAAC,EAChC,KAAU,EACV,WAAgB,EAChB,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,aAAa,EACb,QAAQ,EACR,sBAAsB,EACtB,GAAG,IAAI,EACR,EAAE,yBAAyB,eAiL3B"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NewMultipleSelect=NewMultipleSelect;var _react=require("react"),_classnames=_interopRequireDefault(require("classnames")),_Flex=_interopRequireDefault(require("../../Flex")),_Icon=_interopRequireDefault(require("../../Icon")),_ReactPortal=require("../../ReactPortal"),_styles=require("../components/OptionsSelect/styles"),_useReposition=require("../../../shared/hooks/useReposition"),_useOnClickOutside=require("../../../shared/hooks/useOnClickOutside"),_styles2=require("../styles"),_SelectItem=require("../components/SelectItem"),_jsxRuntime=require("react/jsx-runtime"),_excluded=["label","placeholder","alert","helperText","variant","children","value","onClose","onOpen","renderOptions","onChange"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=_objectWithoutPropertiesLoose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],0<=excluded.indexOf(key)||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],0<=excluded.indexOf(key)||(target[key]=source[key]);return target}function NewMultipleSelect(_ref){function changeMultipleOption(valueOption){if(void 0===valueOption)return setSelectedOptions([]),void setIsOpenOptions(!1);var findOption=selectedOptions.find(function(option){return option.value===valueOption});if(findOption)removeOption(valueOption);else{var newOption=options.find(function(option){return option.value===valueOption});newOption&&setSelectedOptions([].concat(_toConsumableArray(selectedOptions),[newOption])),null===onChange||void 0===onChange?void 0:onChange([].concat(_toConsumableArray(multipleSelectValues),[valueOption]))}}function removeOption(optionToRemove){var newSelectedOptions=null===selectedOptions||void 0===selectedOptions?void 0:selectedOptions.filter(function(option){return option.value!==optionToRemove}),newSelectedValues=newSelectedOptions.map(function(option){return option.value});setSelectedOptions(newSelectedOptions),null===onChange||void 0===onChange?void 0:onChange(newSelectedValues)}var _containerRef$current,_ref$label=_ref.label,label=void 0===_ref$label?"":_ref$label,_ref$placeholder=_ref.placeholder,placeholder=void 0===_ref$placeholder?"":_ref$placeholder,alert=_ref.alert,helperText=_ref.helperText,variant=_ref.variant,children=_ref.children,value=_ref.value,onClose=_ref.onClose,onOpen=_ref.onOpen,renderOptions=_ref.renderOptions,onChange=_ref.onChange,rest=_objectWithoutProperties(_ref,_excluded),containerRef=(0,_react.useRef)(null),selectRef=(0,_react.useRef)(null),_useState=(0,_react.useState)(!1),_useState2=_slicedToArray(_useState,2),isOpenOptions=_useState2[0],setIsOpenOptions=_useState2[1],_useState3=(0,_react.useState)([]),_useState4=_slicedToArray(_useState3,2),selectedOptions=_useState4[0],setSelectedOptions=_useState4[1],multipleSelectValues=selectedOptions.map(function(option){return option.value}),optionsModalRef=(0,_react.useRef)(null),_useState5=(0,_react.useState)([]),_useState6=_slicedToArray(_useState5,2),options=_useState6[0],setOptions=_useState6[1];(0,_react.useEffect)(function(){var _optionsModalRef$curr,childs=null===(_optionsModalRef$curr=optionsModalRef.current)||void 0===_optionsModalRef$curr?void 0:_optionsModalRef$curr.childNodes,newOptions=[];_react.Children.forEach(children,function(child,index){var _childs$index,_childs$index$classLi;if(null!==childs&&void 0!==childs&&null!==(_childs$index=childs[index])&&void 0!==_childs$index&&null!==(_childs$index$classLi=_childs$index.classList)&&void 0!==_childs$index$classLi&&_childs$index$classLi.contains("select-item")){var _child$props,_childs$index2;newOptions.push({value:null===child||void 0===child||null===(_child$props=child.props)||void 0===_child$props?void 0:_child$props.value,label:null===childs||void 0===childs||null===(_childs$index2=childs[index])||void 0===_childs$index2?void 0:_childs$index2.innerText})}}),setOptions(newOptions)},[children,optionsModalRef.current]),(0,_react.useEffect)(function(){function handler(){setIsOpenOptions(!1)}if(isOpenOptions){var _document;null===onOpen||void 0===onOpen?void 0:onOpen(),null===(_document=document)||void 0===_document?void 0:_document.addEventListener("scroll",handler)}else{var _document2;null===onClose||void 0===onClose?void 0:onClose(),null===(_document2=document)||void 0===_document2?void 0:_document2.removeEventListener("scroll",handler)}return function(){var _document3;return null===(_document3=document)||void 0===_document3?void 0:_document3.removeEventListener("scroll",handler)}},[isOpenOptions]),(0,_useOnClickOutside.useOnClickOutside)([containerRef,optionsModalRef],function(){isOpenOptions&&setIsOpenOptions(!1)});var positionsSelect=(0,_useReposition.useReposition)({containerRef:optionsModalRef,triggerRef:selectRef},[children]),SelectedOptionsWithCustomComponent=function(_ref2){var option=_ref2.option;return/*#__PURE__*/(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:null===renderOptions||void 0===renderOptions?void 0:renderOptions(option,function(){return removeOption(option.value)})})};return(0,_react.useEffect)(function(){var newOptions=options.filter(function(option){return null===value||void 0===value?void 0:value.includes(option.value)}),newSelectedOptions=selectedOptions.filter(function(selectedOption){return newOptions.every(function(newOption){return newOption.value!==selectedOption.value})});setSelectedOptions([].concat(_toConsumableArray(newSelectedOptions),_toConsumableArray(newOptions)))},[value,options]),/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{ref:selectRef,style:{width:"100%"},children:/*#__PURE__*/(0,_jsxRuntime.jsxs)(_Flex.default,{direction:"column",style:{width:"100%"},children:[/*#__PURE__*/(0,_jsxRuntime.jsxs)(_styles2.SelectContainer,{"data-disabled":rest.disabled,"data-variant":variant,"data-label-in-top":!!(null!==selectedOptions&&void 0!==selectedOptions&&selectedOptions[0])||!!placeholder,alert:alert,tabIndex:rest.disabled?-1:0,onClick:function onClick(){return setIsOpenOptions(!isOpenOptions)},className:rest.className,style:rest.style,ref:containerRef,children:[label&&"unstyled"!==variant&&/*#__PURE__*/(0,_jsxRuntime.jsx)("label",{title:label,children:label}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{spacing:"0.5rem",wrap:"wrap",style:{paddingBlock:"0.5rem"},children:null!==selectedOptions&&void 0!==selectedOptions&&selectedOptions[0]?selectedOptions.map(function(option,index){return"function"==typeof renderOptions?/*#__PURE__*/(0,_jsxRuntime.jsx)(SelectedOptionsWithCustomComponent,{option:option},"custom-option-selected-".concat(index)):/*#__PURE__*/(0,_jsxRuntime.jsxs)(_styles2.SelectedOptionSpan,{hasSelectedOption:!0,children:[option.label,1<selectedOptions.length&&index<selectedOptions.length-1&&","]},index)}):/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles2.SelectedOptionSpan,{title:"placeholder",children:placeholder})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{className:"select_container_icon",children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_Icon.default,{name:"chevron-down"})})]}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_ReactPortal.ReactPortal,{wrapperId:"portal-root",children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.OptionsContainer,{ref:optionsModalRef,open:isOpenOptions,style:{maxWidth:"".concat(null===(_containerRef$current=containerRef.current)||void 0===_containerRef$current?void 0:_containerRef$current.getBoundingClientRect().width,"px"),left:positionsSelect.left,top:positionsSelect.top},children:_react.Children.map(children,function(child){var isSelectItemElement=(null===child||void 0===child?void 0:child.type)===_SelectItem.SelectItem;if(!/*#__PURE__*/(0,_react.isValidElement)(child)||!isSelectItemElement)return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{children:child});var childElement=child,isSelectedOption=selectedOptions.find(function(option){var _childElement$props;return option.value===(null===(_childElement$props=childElement.props)||void 0===_childElement$props?void 0:_childElement$props.value)}),className=(0,_classnames.default)("select-item",{selected:isSelectedOption});return/*#__PURE__*/(0,_react.cloneElement)(childElement,{onClick:function onClick(event){event.currentTarget.classList.contains("select-item")&&changeMultipleOption(childElement.props.value)},className:className})})})}),!!helperText&&/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles2.HelperText,{alert:alert,children:helperText})]})})}
1
+ "use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.NewMultipleSelect=NewMultipleSelect;var _react=require("react"),_classnames=_interopRequireDefault(require("classnames")),_Flex=_interopRequireDefault(require("../../Flex")),_Icon=_interopRequireDefault(require("../../Icon")),_ReactPortal=require("../../ReactPortal"),_styles=require("../components/OptionsSelect/styles"),_useReposition=require("../../../shared/hooks/useReposition"),_useOnClickOutside=require("../../../shared/hooks/useOnClickOutside"),_styles2=require("../styles"),_SelectItem=require("../components/SelectItem"),_jsxRuntime=require("react/jsx-runtime"),_excluded=["label","placeholder","alert","helperText","variant","children","value","onClose","onOpen","renderOptions","onChange","optionsContainerStyles"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var source,i=1;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return"symbol"===_typeof(key)?key:key+""}function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=_objectWithoutPropertiesLoose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],0<=excluded.indexOf(key)||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],0<=excluded.indexOf(key)||(target[key]=source[key]);return target}function NewMultipleSelect(_ref){function changeMultipleOption(valueOption){if(void 0===valueOption)return setSelectedValues([]),void setIsOpenOptions(!1);var findOption=selectedValues.find(function(option){return option===valueOption});findOption?removeOption(valueOption):(!(null!==value&&void 0!==value&&value[0])&&setSelectedValues([].concat(_toConsumableArray(selectedValues),[valueOption])),null===onChange||void 0===onChange?void 0:onChange([].concat(_toConsumableArray(selectedValues),[valueOption])))}function removeOption(optionToRemove){var newSelectedValues=null===selectedValues||void 0===selectedValues?void 0:selectedValues.filter(function(option){return option!==optionToRemove});setSelectedValues(newSelectedValues),null===onChange||void 0===onChange?void 0:onChange(newSelectedValues)}var _containerRef$current,_ref$label=_ref.label,label=void 0===_ref$label?"":_ref$label,_ref$placeholder=_ref.placeholder,placeholder=void 0===_ref$placeholder?"":_ref$placeholder,alert=_ref.alert,helperText=_ref.helperText,variant=_ref.variant,children=_ref.children,value=_ref.value,onClose=_ref.onClose,onOpen=_ref.onOpen,renderOptions=_ref.renderOptions,onChange=_ref.onChange,optionsContainerStyles=_ref.optionsContainerStyles,rest=_objectWithoutProperties(_ref,_excluded),containerRef=(0,_react.useRef)(null),selectRef=(0,_react.useRef)(null),_useState=(0,_react.useState)(!1),_useState2=_slicedToArray(_useState,2),isOpenOptions=_useState2[0],setIsOpenOptions=_useState2[1],_useState3=(0,_react.useState)([]),_useState4=_slicedToArray(_useState3,2),selectedValues=_useState4[0],setSelectedValues=_useState4[1],optionsModalRef=(0,_react.useRef)(null),_useState5=(0,_react.useState)([]),_useState6=_slicedToArray(_useState5,2),options=_useState6[0],setOptions=_useState6[1];(0,_react.useEffect)(function(){var _optionsModalRef$curr,childs=null===(_optionsModalRef$curr=optionsModalRef.current)||void 0===_optionsModalRef$curr?void 0:_optionsModalRef$curr.childNodes,newOptions=[];null===childs||void 0===childs?void 0:childs.forEach(function(child){var _child$classList;null!==child&&void 0!==child&&null!==(_child$classList=child.classList)&&void 0!==_child$classList&&_child$classList.contains("select-item")&&newOptions.push({value:null===child||void 0===child?void 0:child.value,label:null===child||void 0===child?void 0:child.innerText})}),setOptions(newOptions)},[children,optionsModalRef.current]),(0,_react.useEffect)(function(){function handler(){setIsOpenOptions(!1)}if(isOpenOptions){var _document;null===onOpen||void 0===onOpen?void 0:onOpen(),null===(_document=document)||void 0===_document?void 0:_document.addEventListener("scroll",handler)}else{var _document2;null===onClose||void 0===onClose?void 0:onClose(),null===(_document2=document)||void 0===_document2?void 0:_document2.removeEventListener("scroll",handler)}return function(){var _document3;return null===(_document3=document)||void 0===_document3?void 0:_document3.removeEventListener("scroll",handler)}},[isOpenOptions]),(0,_useOnClickOutside.useOnClickOutside)([containerRef,optionsModalRef],function(){isOpenOptions&&setIsOpenOptions(!1)});var positionsSelect=(0,_useReposition.useReposition)({containerRef:optionsModalRef,triggerRef:selectRef},[children]),SelectedOptionsWithCustomComponent=function(_ref2){var option=_ref2.option;return/*#__PURE__*/(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:null===renderOptions||void 0===renderOptions?void 0:renderOptions(option,function(){return removeOption(option.value)})})};return(0,_react.useEffect)(function(){value&&setSelectedValues(value)},[value]),/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{ref:selectRef,style:{width:"100%"},children:/*#__PURE__*/(0,_jsxRuntime.jsxs)(_Flex.default,{direction:"column",style:{width:"100%"},children:[/*#__PURE__*/(0,_jsxRuntime.jsxs)(_styles2.SelectContainer,{"data-disabled":rest.disabled,"data-variant":variant,"data-label-in-top":!!(null!==selectedValues&&void 0!==selectedValues&&selectedValues[0])||!!placeholder,alert:alert,tabIndex:rest.disabled?-1:0,onClick:function onClick(){return setIsOpenOptions(!isOpenOptions)},className:rest.className,style:rest.style,ref:containerRef,children:[label&&"unstyled"!==variant&&/*#__PURE__*/(0,_jsxRuntime.jsx)("label",{title:label,children:label}),/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:"container_selected_options",children:null!==selectedValues&&void 0!==selectedValues&&selectedValues[0]?selectedValues.map(function(value,index){var currentOption=options.find(function(option){return option.value===value});return"function"==typeof renderOptions?/*#__PURE__*/(0,_jsxRuntime.jsx)(SelectedOptionsWithCustomComponent,{option:currentOption},"custom-option-selected-".concat(index)):/*#__PURE__*/(0,_jsxRuntime.jsxs)(_styles2.SelectedOptionSpan,{hasSelectedOption:!0,children:[null===currentOption||void 0===currentOption?void 0:currentOption.label,1<selectedValues.length&&index<selectedValues.length-1&&","]},index)}):/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles2.SelectedOptionSpan,{title:"placeholder",children:placeholder})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{className:"select_container_icon",children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_Icon.default,{name:"chevron-down"})})]}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_ReactPortal.ReactPortal,{wrapperId:"portal-root",children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.OptionsContainer,{ref:optionsModalRef,open:isOpenOptions,style:_objectSpread(_objectSpread({maxWidth:"".concat(null===(_containerRef$current=containerRef.current)||void 0===_containerRef$current?void 0:_containerRef$current.getBoundingClientRect().width,"px")},optionsContainerStyles),{},{left:positionsSelect.left,top:positionsSelect.top}),children:_react.Children.map(children,function(child){var isSelectItemElement=(null===child||void 0===child?void 0:child.type)===_SelectItem.SelectItem;if(!/*#__PURE__*/(0,_react.isValidElement)(child)||!isSelectItemElement)return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{children:child});var childElement=child,isSelectedOption=null===selectedValues||void 0===selectedValues?void 0:selectedValues.find(function(value){var _childElement$props;return value===(null===(_childElement$props=childElement.props)||void 0===_childElement$props?void 0:_childElement$props.value)}),className=(0,_classnames.default)("select-item",{selected:isSelectedOption});return/*#__PURE__*/(0,_react.cloneElement)(childElement,{onClick:function onClick(event){var _childElement$props2,_childElement$props2$;null===(_childElement$props2=childElement.props)||void 0===_childElement$props2||null===(_childElement$props2$=_childElement$props2.onClick)||void 0===_childElement$props2$?void 0:_childElement$props2$.call(_childElement$props2,event),event.currentTarget.classList.contains("select-item")&&changeMultipleOption(childElement.props.value)},className:className})})})}),!!helperText&&/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles2.HelperText,{alert:alert,children:helperText})]})})}
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { SelectPropsSingleSelect } from '../types';
3
- export declare function NewSingleSelect<T>({ label, placeholder, alert, helperText, variant, children, value, onClose, onOpen, onChange, renderOptions, ...rest }: SelectPropsSingleSelect<T>): JSX.Element;
3
+ export declare function NewSingleSelect<T>({ label, placeholder, alert, helperText, variant, children, value, onClose, onOpen, onChange, renderOptions, optionsContainerStyles, ...rest }: SelectPropsSingleSelect<T>): JSX.Element;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/single/index.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAgB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEjE,wBAAgB,eAAe,CAAC,CAAC,EAAE,EACjC,KAAU,EACV,WAAgB,EAChB,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,aAAa,EACb,GAAG,IAAI,EACR,EAAE,uBAAuB,CAAC,CAAC,CAAC,eAqI5B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/single/index.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAgB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEjE,wBAAgB,eAAe,CAAC,CAAC,EAAE,EACjC,KAAU,EACV,WAAgB,EAChB,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,aAAa,EACb,sBAAsB,EACtB,GAAG,IAAI,EACR,EAAE,uBAAuB,CAAC,CAAC,CAAC,eAwI5B"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NewSingleSelect=NewSingleSelect;var _react=require("react"),_Flex=_interopRequireDefault(require("../../Flex")),_Icon=_interopRequireDefault(require("../../Icon")),_ReactPortal=require("../../ReactPortal"),_SelectItem=require("../components/SelectItem"),_useReposition=require("../../../shared/hooks/useReposition"),_useOnClickOutside=require("../../../shared/hooks/useOnClickOutside"),_styles=require("../components/OptionsSelect/styles"),_styles2=require("../styles"),_jsxRuntime=require("react/jsx-runtime"),_excluded=["label","placeholder","alert","helperText","variant","children","value","onClose","onOpen","onChange","renderOptions"];/* eslint-disable no-console */function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=_objectWithoutPropertiesLoose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],0<=excluded.indexOf(key)||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],0<=excluded.indexOf(key)||(target[key]=source[key]);return target}function NewSingleSelect(_ref){var _containerRef$current,_ref$label=_ref.label,label=void 0===_ref$label?"":_ref$label,_ref$placeholder=_ref.placeholder,placeholder=void 0===_ref$placeholder?"":_ref$placeholder,alert=_ref.alert,helperText=_ref.helperText,variant=_ref.variant,children=_ref.children,value=_ref.value,onClose=_ref.onClose,onOpen=_ref.onOpen,onChange=_ref.onChange,renderOptions=_ref.renderOptions,rest=_objectWithoutProperties(_ref,_excluded),containerRef=(0,_react.useRef)(null),selectRef=(0,_react.useRef)(null),_useState=(0,_react.useState)(!1),_useState2=_slicedToArray(_useState,2),isOpenOptions=_useState2[0],setIsOpenOptions=_useState2[1],_useState3=(0,_react.useState)(),_useState4=_slicedToArray(_useState3,2),selectedOption=_useState4[0],setSelectedOption=_useState4[1],optionsModalRef=(0,_react.useRef)(null),_useState5=(0,_react.useState)([]),_useState6=_slicedToArray(_useState5,2),options=_useState6[0],setOptions=_useState6[1],findOption=options.find(function(option){return option.value===selectedOption}),isFalseOptions=!1===(null===findOption||void 0===findOption?void 0:findOption.value),textPlaceholder=null!==findOption&&void 0!==findOption&&findOption.value||isFalseOptions?null===findOption||void 0===findOption?void 0:findOption.label:placeholder;(0,_react.useEffect)(function(){var _options$,_optionsModalRef$curr;if(!(null!==options&&void 0!==options&&null!==(_options$=options[0])&&void 0!==_options$&&_options$.value)){var childs=null===(_optionsModalRef$curr=optionsModalRef.current)||void 0===_optionsModalRef$curr?void 0:_optionsModalRef$curr.childNodes,newOptions=[];_react.Children.forEach(children,function(child,index){var _childs$index,_childs$index$classLi;if(null!==childs&&void 0!==childs&&null!==(_childs$index=childs[index])&&void 0!==_childs$index&&null!==(_childs$index$classLi=_childs$index.classList)&&void 0!==_childs$index$classLi&&_childs$index$classLi.contains("select-item")){var _child$props,_childs$index2;newOptions.push({value:null===child||void 0===child||null===(_child$props=child.props)||void 0===_child$props?void 0:_child$props.value,label:null===childs||void 0===childs||null===(_childs$index2=childs[index])||void 0===_childs$index2?void 0:_childs$index2.innerText})}}),setOptions(newOptions)}},[children,optionsModalRef.current,containerRef.current]),(0,_react.useEffect)(function(){function handler(){setIsOpenOptions(!1)}if(isOpenOptions){var _document;null===onOpen||void 0===onOpen?void 0:onOpen(),null===(_document=document)||void 0===_document?void 0:_document.addEventListener("scroll",handler)}else{var _document2;null===onClose||void 0===onClose?void 0:onClose(),null===(_document2=document)||void 0===_document2?void 0:_document2.removeEventListener("scroll",handler)}return function(){var _document3;return null===(_document3=document)||void 0===_document3?void 0:_document3.removeEventListener("scroll",handler)}},[isOpenOptions]),(0,_useOnClickOutside.useOnClickOutside)([containerRef,optionsModalRef],function(){isOpenOptions&&setIsOpenOptions(!1)});var positionsSelect=(0,_useReposition.useReposition)({containerRef:optionsModalRef,triggerRef:selectRef},[children]);return(0,_react.useEffect)(function(){setSelectedOption(value)},[value]),/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{ref:selectRef,style:{width:"100%"},children:/*#__PURE__*/(0,_jsxRuntime.jsxs)(_Flex.default,{direction:"column",style:{width:"100%"},children:[/*#__PURE__*/(0,_jsxRuntime.jsxs)(_styles2.SelectContainer,{"data-disabled":rest.disabled,"data-variant":variant,"data-label-in-top":!!textPlaceholder||!!placeholder,alert:alert,tabIndex:rest.disabled?-1:0,onClick:function onClick(){return setIsOpenOptions(!isOpenOptions)},className:rest.className,style:rest.style,ref:containerRef,children:[label&&"unstyled"!==variant&&/*#__PURE__*/(0,_jsxRuntime.jsx)("label",{children:label}),"function"==typeof renderOptions&&selectedOption?/*#__PURE__*/(0,_jsxRuntime.jsx)(function SelectedOptionsWithCustomComponent(){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:null===renderOptions||void 0===renderOptions?void 0:renderOptions(selectedOption)})},{},"custom-option-selected-".concat(textPlaceholder)):/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles2.SelectedOptionSpan,{hasSelectedOption:!!selectedOption||isFalseOptions,children:textPlaceholder}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{className:"select_container_icon",children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_Icon.default,{name:"chevron-down",color:"neutral.neutral5"})})]}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_ReactPortal.ReactPortal,{wrapperId:"portal-root",children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.OptionsContainer,{ref:optionsModalRef,open:isOpenOptions,style:{maxWidth:"".concat(null===(_containerRef$current=containerRef.current)||void 0===_containerRef$current?void 0:_containerRef$current.getBoundingClientRect().width,"px"),left:positionsSelect.left,top:positionsSelect.top},children:_react.Children.map(children,function(child){var isSelectItemElement=(null===child||void 0===child?void 0:child.type)===_SelectItem.SelectItem;if(!/*#__PURE__*/(0,_react.isValidElement)(child)||!isSelectItemElement)return/*#__PURE__*/(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:child});var childElement=child;return/*#__PURE__*/(0,_react.cloneElement)(childElement,{onClick:function onClick(event){event.currentTarget.classList.contains("select-item")&&(setIsOpenOptions(!1),setSelectedOption(childElement.props.value),null===onChange||void 0===onChange?void 0:onChange(childElement.props.value))}})})})}),!!helperText&&/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles2.HelperText,{alert:alert,children:helperText})]})})}
1
+ "use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.NewSingleSelect=NewSingleSelect;var _react=require("react"),_Flex=_interopRequireDefault(require("../../Flex")),_Icon=_interopRequireDefault(require("../../Icon")),_ReactPortal=require("../../ReactPortal"),_SelectItem=require("../components/SelectItem"),_useReposition=require("../../../shared/hooks/useReposition"),_useOnClickOutside=require("../../../shared/hooks/useOnClickOutside"),_styles=require("../components/OptionsSelect/styles"),_styles2=require("../styles"),_jsxRuntime=require("react/jsx-runtime"),_excluded=["label","placeholder","alert","helperText","variant","children","value","onClose","onOpen","onChange","renderOptions","optionsContainerStyles"];/* eslint-disable no-console */function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var source,i=1;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return"symbol"===_typeof(key)?key:key+""}function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=_objectWithoutPropertiesLoose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],0<=excluded.indexOf(key)||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],0<=excluded.indexOf(key)||(target[key]=source[key]);return target}function NewSingleSelect(_ref){var _containerRef$current,_ref$label=_ref.label,label=void 0===_ref$label?"":_ref$label,_ref$placeholder=_ref.placeholder,placeholder=void 0===_ref$placeholder?"":_ref$placeholder,alert=_ref.alert,helperText=_ref.helperText,variant=_ref.variant,children=_ref.children,value=_ref.value,onClose=_ref.onClose,onOpen=_ref.onOpen,onChange=_ref.onChange,renderOptions=_ref.renderOptions,optionsContainerStyles=_ref.optionsContainerStyles,rest=_objectWithoutProperties(_ref,_excluded),containerRef=(0,_react.useRef)(null),selectRef=(0,_react.useRef)(null),_useState=(0,_react.useState)(!1),_useState2=_slicedToArray(_useState,2),isOpenOptions=_useState2[0],setIsOpenOptions=_useState2[1],_useState3=(0,_react.useState)(),_useState4=_slicedToArray(_useState3,2),selectedOption=_useState4[0],setSelectedOption=_useState4[1],optionsModalRef=(0,_react.useRef)(null),_useState5=(0,_react.useState)([]),_useState6=_slicedToArray(_useState5,2),options=_useState6[0],setOptions=_useState6[1],findOption=options.find(function(option){return option.value===selectedOption}),isFalseOptions=!1===(null===findOption||void 0===findOption?void 0:findOption.value),textPlaceholder=null!==findOption&&void 0!==findOption&&findOption.value||isFalseOptions?null===findOption||void 0===findOption?void 0:findOption.label:placeholder;(0,_react.useEffect)(function(){var _options$,_optionsModalRef$curr;if(!(null!==options&&void 0!==options&&null!==(_options$=options[0])&&void 0!==_options$&&_options$.value)){var childs=null===(_optionsModalRef$curr=optionsModalRef.current)||void 0===_optionsModalRef$curr?void 0:_optionsModalRef$curr.childNodes,newOptions=[];null===childs||void 0===childs?void 0:childs.forEach(function(child){var _child$classList;null!==(_child$classList=child.classList)&&void 0!==_child$classList&&_child$classList.contains("select-item")&&newOptions.push({value:null===child||void 0===child?void 0:child.value,label:null===child||void 0===child?void 0:child.innerText})}),setOptions(newOptions)}},[children,optionsModalRef.current,containerRef.current]),(0,_react.useEffect)(function(){function handler(){setIsOpenOptions(!1)}if(isOpenOptions){var _document;null===onOpen||void 0===onOpen?void 0:onOpen(),null===(_document=document)||void 0===_document?void 0:_document.addEventListener("scroll",handler)}else{var _document2;null===onClose||void 0===onClose?void 0:onClose(),null===(_document2=document)||void 0===_document2?void 0:_document2.removeEventListener("scroll",handler)}return function(){var _document3;return null===(_document3=document)||void 0===_document3?void 0:_document3.removeEventListener("scroll",handler)}},[isOpenOptions]),(0,_useOnClickOutside.useOnClickOutside)([containerRef,optionsModalRef],function(){isOpenOptions&&setIsOpenOptions(!1)});var positionsSelect=(0,_useReposition.useReposition)({containerRef:optionsModalRef,triggerRef:selectRef},[children]);return(0,_react.useEffect)(function(){setSelectedOption(value)},[value]),/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{ref:selectRef,style:{width:"100%"},children:/*#__PURE__*/(0,_jsxRuntime.jsxs)(_Flex.default,{direction:"column",style:{width:"100%"},children:[/*#__PURE__*/(0,_jsxRuntime.jsxs)(_styles2.SelectContainer,{"data-disabled":rest.disabled,"data-variant":variant,"data-label-in-top":!!textPlaceholder||!!placeholder,alert:alert,tabIndex:rest.disabled?-1:0,onClick:function onClick(){return setIsOpenOptions(!isOpenOptions)},className:rest.className,style:rest.style,ref:containerRef,children:[label&&"unstyled"!==variant&&/*#__PURE__*/(0,_jsxRuntime.jsx)("label",{children:label}),"function"==typeof renderOptions&&selectedOption?/*#__PURE__*/(0,_jsxRuntime.jsx)(function SelectedOptionsWithCustomComponent(){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:null===renderOptions||void 0===renderOptions?void 0:renderOptions(selectedOption)})},{},"custom-option-selected-".concat(textPlaceholder)):/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles2.SelectedOptionSpan,{hasSelectedOption:!!selectedOption||isFalseOptions,children:textPlaceholder}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{className:"select_container_icon",children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_Icon.default,{name:"chevron-down",color:"neutral.neutral5"})})]}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_ReactPortal.ReactPortal,{wrapperId:"portal-root",children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.OptionsContainer,{ref:optionsModalRef,open:isOpenOptions,style:_objectSpread(_objectSpread({maxWidth:"".concat(null===(_containerRef$current=containerRef.current)||void 0===_containerRef$current?void 0:_containerRef$current.getBoundingClientRect().width,"px")},optionsContainerStyles),{},{left:positionsSelect.left,top:positionsSelect.top}),children:_react.Children.map(children,function(child){var isSelectItemElement=(null===child||void 0===child?void 0:child.type)===_SelectItem.SelectItem;if(!/*#__PURE__*/(0,_react.isValidElement)(child)||!isSelectItemElement)return/*#__PURE__*/(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:child});var childElement=child;return/*#__PURE__*/(0,_react.cloneElement)(childElement,{onClick:function onClick(event){var _childElement$props,_childElement$props$o;null===(_childElement$props=childElement.props)||void 0===_childElement$props||null===(_childElement$props$o=_childElement$props.onClick)||void 0===_childElement$props$o?void 0:_childElement$props$o.call(_childElement$props,event),event.currentTarget.classList.contains("select-item")&&(setIsOpenOptions(!1),setSelectedOption(childElement.props.value),null===onChange||void 0===onChange?void 0:onChange(childElement.props.value))}})})})}),!!helperText&&/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles2.HelperText,{alert:alert,children:helperText})]})})}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/NewSelect/styles.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,eAAe;;;gIAiG1B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;UAE7B,CAAC;AAEF,eAAO,MAAM,UAAU;;;wHAMrB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;qHAqBhC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;2GAM9B,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/NewSelect/styles.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,eAAe;;;gIAwG1B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;UAE7B,CAAC;AAEF,eAAO,MAAM,UAAU;;;wHAMrB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;qHAqBhC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;2GAM9B,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SelectedOptionSpan=exports.SelectMultipleOption=exports.SelectContainer=exports.OptionPlaceholder=exports.HelperText=void 0;var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_react=require("@emotion/react"),_styled=_interopRequireDefault(require("@emotion/styled")),_List=_interopRequireDefault(require("../List"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var SelectContainer=_styled.default.div(function(_ref){var theme=_ref.theme,alert=_ref.alert;return(0,_react.css)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n outline: none;\n user-select: none;\n width: 100%;\n min-height: 56px;\n border-radius: ",";\n border: 2px solid ",";\n transition: all ease 0.2s;\n outline: 0px solid transparent;\n cursor: pointer;\n background: ",";\n color: ",";\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.5rem;\n padding: 0 20px;\n position: relative;\n\n &:hover {\n color: ",";\n border-color: ",";\n\n label {\n color: ",";\n }\n }\n\n &:focus {\n color: ",";\n border-color: ",";\n outline: 2px solid ",";\n\n .select_container_icon {\n transform: rotate(180deg);\n }\n }\n\n &[data-label-in-top='true'] {\n label {\n left: 20px;\n top: -1px;\n font-size: 0.875rem;\n background: "," !important;\n }\n }\n\n &[data-disabled='true'] {\n background: ",";\n pointer-events: none;\n cursor: none;\n border-color: ",";\n\n label {\n background: inherit;\n }\n }\n\n &[data-variant='unstyled'] {\n padding: 0;\n border: none;\n background: none;\n height: auto;\n\n &:hover,\n &:focus {\n outline: none;\n }\n }\n\n input {\n display: none;\n }\n\n .select_container_icon {\n transition: all ease 0.2s;\n }\n\n label {\n position: absolute;\n left: 20px;\n top: 50%;\n transform: translateY(-50%);\n font-size: 1rem;\n font-weight: 500;\n color: ",";\n transition: all ease 0.2s;\n padding: 0 4px;\n z-index: 1;\n white-space: nowrap;\n max-width: 65%;\n overflow: hidden;\n cursor: pointer;\n text-overflow: ellipsis;\n }\n "])),theme.borderRadius.default,alert?theme.colors[alert].blurred:theme.colors.neutral.neutral2,alert?"".concat(theme.colors[alert].blurred,"33"):theme.colors.neutral.white,theme.colors.neutral.neutral5,theme.colors.neutral.black,alert?theme.colors[alert].default:theme.colors.primary.hover,theme.colors.neutral.neutral5,theme.colors.neutral.black,alert?theme.colors[alert].default:theme.colors.primary.focus,alert?theme.colors[alert].blurred:theme.colors.primary.disabled,theme.colors.neutral.white,theme.colors.neutral.neutral1,theme.colors.neutral.neutral2,theme.colors.neutral.neutral3)});exports.SelectContainer=SelectContainer;var OptionPlaceholder=(0,_styled.default)(_List.default)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n color: ",";\n"])),function(_ref2){var theme=_ref2.theme;return theme.colors.neutral.neutral3});exports.OptionPlaceholder=OptionPlaceholder;var HelperText=_styled.default.span(function(_ref3){var theme=_ref3.theme,_ref3$alert=_ref3.alert,alert=void 0===_ref3$alert?"success":_ref3$alert;return(0,_react.css)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-size: ",";\n color: ",";\n padding: 0 20px;\n "])),theme.fontSizes.xxs,"success"===alert?theme.colors.neutral.neutral4:theme.colors[alert].default)});exports.HelperText=HelperText;var SelectMultipleOption=_styled.default.button(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n min-width: 73px;\n height: 29px;\n padding: 4px 8px;\n border-radius: 6px;\n margin: 2px;\n\n transition: all ease-in-out 0.2s;\n\n background-color: ",";\n\n border: 0;\n color: ",";\n\n &:not(&:disabled) {\n cursor: pointer;\n }\n"])),function(_ref4){var theme=_ref4.theme;return theme.colors.neutral.neutral1},function(_ref5){var theme=_ref5.theme;return theme.colors.neutral.neutral6});exports.SelectMultipleOption=SelectMultipleOption;var SelectedOptionSpan=_styled.default.span(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n font-weight: 500;\n cursor: pointer;\n padding-block: 0.25rem;\n color: ",";\n"])),function(_ref6){var theme=_ref6.theme,hasSelectedOption=_ref6.hasSelectedOption;return hasSelectedOption?theme.colors.neutral.neutral5:theme.colors.neutral.neutral3});exports.SelectedOptionSpan=SelectedOptionSpan;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SelectedOptionSpan=exports.SelectMultipleOption=exports.SelectContainer=exports.OptionPlaceholder=exports.HelperText=void 0;var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_react=require("@emotion/react"),_styled=_interopRequireDefault(require("@emotion/styled")),_List=_interopRequireDefault(require("../List"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var SelectContainer=_styled.default.div(function(_ref){var theme=_ref.theme,alert=_ref.alert;return(0,_react.css)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n outline: none;\n user-select: none;\n width: 100%;\n min-height: 56px;\n border-radius: ",";\n border: 2px solid ",";\n transition: all ease 0.2s;\n outline: 0px solid transparent;\n cursor: pointer;\n background: ",";\n color: ",";\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.5rem;\n padding: 0 20px;\n position: relative;\n\n .container_selected_options {\n display: flex;\n gap: 0.5rem;\n flex-wrap: wrap;\n padding-block: 0.5rem;\n }\n\n &:hover {\n color: ",";\n border-color: ",";\n\n label {\n color: ",";\n }\n }\n\n &:focus {\n color: ",";\n border-color: ",";\n outline: 2px solid ",";\n\n .select_container_icon {\n transform: rotate(180deg);\n }\n }\n\n &[data-label-in-top='true'] {\n label {\n left: 20px;\n top: -1px;\n font-size: 0.875rem;\n background: "," !important;\n }\n }\n\n &[data-disabled='true'] {\n background: ",";\n pointer-events: none;\n cursor: none;\n border-color: ",";\n\n label {\n background: inherit;\n }\n }\n\n &[data-variant='unstyled'] {\n padding: 0;\n border: none;\n background: none;\n height: auto;\n\n &:hover,\n &:focus {\n outline: none;\n }\n }\n\n input {\n display: none;\n }\n\n .select_container_icon {\n transition: all ease 0.2s;\n }\n\n label {\n position: absolute;\n left: 20px;\n top: 50%;\n transform: translateY(-50%);\n font-size: 1rem;\n font-weight: 500;\n color: ",";\n transition: all ease 0.2s;\n padding: 0 4px;\n z-index: 1;\n white-space: nowrap;\n max-width: 65%;\n overflow: hidden;\n cursor: pointer;\n text-overflow: ellipsis;\n }\n "])),theme.borderRadius.default,alert?theme.colors[alert].blurred:theme.colors.neutral.neutral2,alert?"".concat(theme.colors[alert].blurred,"33"):theme.colors.neutral.white,theme.colors.neutral.neutral5,theme.colors.neutral.black,alert?theme.colors[alert].default:theme.colors.primary.hover,theme.colors.neutral.neutral5,theme.colors.neutral.black,alert?theme.colors[alert].default:theme.colors.primary.focus,alert?theme.colors[alert].blurred:theme.colors.primary.disabled,theme.colors.neutral.white,theme.colors.neutral.neutral1,theme.colors.neutral.neutral2,theme.colors.neutral.neutral3)});exports.SelectContainer=SelectContainer;var OptionPlaceholder=(0,_styled.default)(_List.default)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n color: ",";\n"])),function(_ref2){var theme=_ref2.theme;return theme.colors.neutral.neutral3});exports.OptionPlaceholder=OptionPlaceholder;var HelperText=_styled.default.span(function(_ref3){var theme=_ref3.theme,_ref3$alert=_ref3.alert,alert=void 0===_ref3$alert?"success":_ref3$alert;return(0,_react.css)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-size: ",";\n color: ",";\n padding: 0 20px;\n "])),theme.fontSizes.xxs,"success"===alert?theme.colors.neutral.neutral4:theme.colors[alert].default)});exports.HelperText=HelperText;var SelectMultipleOption=_styled.default.button(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n min-width: 73px;\n height: 29px;\n padding: 4px 8px;\n border-radius: 6px;\n margin: 2px;\n\n transition: all ease-in-out 0.2s;\n\n background-color: ",";\n\n border: 0;\n color: ",";\n\n &:not(&:disabled) {\n cursor: pointer;\n }\n"])),function(_ref4){var theme=_ref4.theme;return theme.colors.neutral.neutral1},function(_ref5){var theme=_ref5.theme;return theme.colors.neutral.neutral6});exports.SelectMultipleOption=SelectMultipleOption;var SelectedOptionSpan=_styled.default.span(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n font-weight: 500;\n cursor: pointer;\n padding-block: 0.25rem;\n color: ",";\n"])),function(_ref6){var theme=_ref6.theme,hasSelectedOption=_ref6.hasSelectedOption;return hasSelectedOption?theme.colors.neutral.neutral5:theme.colors.neutral.neutral3});exports.SelectedOptionSpan=SelectedOptionSpan;
@@ -1,9 +1,10 @@
1
- import { ComponentType, InputHTMLAttributes, ReactElement, ReactNode } from 'react';
1
+ import { CSSProperties, ComponentProps, ComponentType, InputHTMLAttributes, ReactElement, ReactNode } from 'react';
2
+ import { NewSelect } from './index';
2
3
  import { SelectInputSearchProps } from './components/SelectInputSearch/types';
3
4
  import { SelectItemProps } from './components/SelectItem/types';
4
5
  export type SelectAlertType = 'success' | 'error' | 'warning' | 'informative' | 'critical' | 'success_secondary' | 'warning_secondary';
5
6
  export type SizeSelect = 'sm' | 'md';
6
- export type SelectValue = string | readonly string[] | boolean | number | undefined;
7
+ export type SelectValue = string | string[] | boolean | number | number[] | undefined;
7
8
  export interface SelectOption {
8
9
  label: string;
9
10
  value?: SelectValue;
@@ -18,9 +19,10 @@ interface SelectPropsBase extends Omit<InputHTMLAttributes<HTMLInputElement>, 'o
18
19
  onOpen?: () => void;
19
20
  onClose?: () => void;
20
21
  multiple?: boolean;
22
+ optionsContainerStyles?: CSSProperties;
21
23
  }
22
24
  export type SelectPropsSingleSelect<T> = SelectPropsBase & {
23
- multiple?: false;
25
+ multiple?: false | undefined;
24
26
  onChange?: (value: T) => void;
25
27
  value?: T;
26
28
  renderOptions?: (option: T) => ReactNode | ReactNode[];
@@ -41,5 +43,6 @@ export type ChangeOption = {
41
43
  value: string | boolean | number;
42
44
  };
43
45
  export type SelectChildType = ReactElement<SelectInputSearchProps & SelectItemProps, ComponentType>;
46
+ export type NewSelectProps = ComponentProps<typeof NewSelect>;
44
47
  export {};
45
48
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/NewSelect/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,OAAO,GACP,SAAS,GACT,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,mBAAmB,CAAC;AAExB,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEpF,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,UAAU,eACR,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAGD,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,eAAe,GAAG;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,SAAS,GAAG,SAAS,EAAE,CAAC;CACxD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,eAAe,GAAG;IACxD,QAAQ,EAAE,IAAI,CAAC;IACf,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,CACd,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,KACzC,SAAS,GAAG,SAAS,EAAE,CAAC;CAC9B,CAAC;AAGF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,GAAG,yBAAyB,CAAC;AAEpF,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,sBAAsB,GAAG,eAAe,EAAE,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/NewSelect/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,OAAO,GACP,SAAS,GACT,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,mBAAmB,CAAC;AAExB,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAEtF,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,UAAU,eACR,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB,CAAC,EAAE,aAAa,CAAC;CACxC;AAGD,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,eAAe,GAAG;IACzD,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,SAAS,GAAG,SAAS,EAAE,CAAC;CACxD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,eAAe,GAAG;IACxD,QAAQ,EAAE,IAAI,CAAC;IACf,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,CACd,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,KACzC,SAAS,GAAG,SAAS,EAAE,CAAC;CAC9B,CAAC;AAGF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,GAAG,yBAAyB,CAAC;AAEpF,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,sBAAsB,GAAG,eAAe,EAAE,aAAa,CAAC,CAAC;AAEpG,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pedidopago/ui",
3
- "version": "1.8.3",
3
+ "version": "1.8.5",
4
4
  "description": "Quick build beatiful Pedido Pago apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",