@adoptaunabuelo/react-components 0.3.142 → 0.3.143

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,10 +1,10 @@
1
1
  import { ComponentPropsWithoutRef } from "react";
2
2
  declare const Avatar: (props: Props) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Avatar;
4
- export interface Props extends ComponentPropsWithoutRef<"div"> {
4
+ export interface Props extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
5
5
  icon?: string;
6
6
  name?: string;
7
7
  editable?: boolean;
8
8
  clickable?: boolean;
9
- onChange?: (file: any) => void;
9
+ onChange?: (file: string | ArrayBuffer | null) => void;
10
10
  }
@@ -1,13 +1,15 @@
1
+ import { EditorState } from "draft-js";
2
+ import { CSSProperties } from "react";
1
3
  export declare const ButtonEditor: (props: Props) => import("react/jsx-runtime").JSX.Element;
2
4
  export default ButtonEditor;
3
5
  export interface Props {
4
- style?: any;
6
+ style?: CSSProperties;
5
7
  text: string;
6
8
  design?: "primary" | "secondary";
7
9
  type: {
8
10
  control: string;
9
- value: any;
11
+ value: string;
10
12
  };
11
- editorState?: any;
12
- onChange?: Function;
13
+ editorState: EditorState;
14
+ onChange?: (editorState: EditorState) => void;
13
15
  }
@@ -1,26 +1,25 @@
1
1
  import { CSSProperties } from "react";
2
2
  declare const CheckboxList: (props: Props) => import("react/jsx-runtime").JSX.Element;
3
3
  export default CheckboxList;
4
+ export type CheckboxOption = {
5
+ id: string;
6
+ label?: string;
7
+ sublabel?: string;
8
+ Element?: React.ReactElement;
9
+ error?: boolean;
10
+ [key: string]: string | React.ReactElement | boolean | undefined;
11
+ };
4
12
  export interface Props {
5
13
  style?: CSSProperties;
6
14
  elementStyle?: CSSProperties;
7
- options: Array<{
8
- id: string;
9
- label?: string;
10
- sublabel?: string;
11
- Element?: React.ReactElement;
12
- error?: boolean;
13
- }>;
15
+ options: Array<CheckboxOption>;
14
16
  selectedOptions?: Array<{
15
17
  id: string;
16
18
  }>;
17
19
  height?: number;
18
20
  width?: number;
19
21
  type: "single" | "multiple";
20
- onChange?: (result: Array<{
21
- id: string;
22
- [key: string]: any;
23
- }>) => void;
22
+ onChange?: (result: Array<CheckboxOption>) => void;
24
23
  position?: "left" | "right";
25
24
  avatarEnabled?: boolean;
26
25
  shape?: "circle" | "square";
@@ -1,4 +1,6 @@
1
1
  import { FilterDefaultProps } from "./FilterDefault";
2
+ import { CheckboxOption } from "@components/Checkbox/CheckboxList";
3
+ type OptionWithDynamicProps = CheckboxOption;
2
4
  declare const FilterCheckbox: import("react").ForwardRefExoticComponent<FilterCheckboxProps & import("react").RefAttributes<FilterCheckboxRef>>;
3
5
  export default FilterCheckbox;
4
6
  export interface FilterCheckboxProps extends FilterDefaultProps {
@@ -9,14 +11,8 @@ export interface FilterCheckboxProps extends FilterDefaultProps {
9
11
  label: string;
10
12
  sublabel?: string;
11
13
  }>;
12
- selectedOptions?: Array<{
13
- id: string;
14
- [key: string]: any;
15
- }>;
16
- onChange?: (r: Array<{
17
- id: string;
18
- [key: string]: any;
19
- }>) => void;
14
+ selectedOptions?: OptionWithDynamicProps[];
15
+ onChange?: (r: OptionWithDynamicProps[]) => void;
20
16
  }
21
17
  export interface FilterCheckboxRef {
22
18
  clean: () => void;
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithRef } from "react";
2
- declare const InputStyled: import("react").ForwardRefExoticComponent<Omit<InputStyledProps, "ref"> & import("react").RefAttributes<unknown>>;
2
+ declare const InputStyled: import("react").ForwardRefExoticComponent<Omit<InputStyledProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
3
3
  export default InputStyled;
4
4
  export interface InputStyledProps extends ComponentPropsWithRef<"input"> {
5
5
  }
@@ -1,4 +1,7 @@
1
+ import { ChangeEvent } from "react";
1
2
  import { InputProps } from "../Basic/Input";
2
3
  declare const InputBirthday: ({ error, onChange, containerStyle, ...restProps }: InputBirthdayProps) => import("react/jsx-runtime").JSX.Element;
3
4
  export default InputBirthday;
4
- export type InputBirthdayProps = {} & InputProps;
5
+ export type InputBirthdayProps = Omit<InputProps, 'onChange'> & {
6
+ onChange?: (date: Date | ChangeEvent<HTMLInputElement>) => void;
7
+ };
@@ -14,5 +14,5 @@ export interface InputImageProps {
14
14
  maxHeight?: number;
15
15
  maxWidth?: number;
16
16
  hideCrop?: boolean;
17
- onChange?: (image: any) => void;
17
+ onChange?: (image: string | ArrayBuffer | null) => void;
18
18
  }
@@ -1,19 +1,13 @@
1
+ import { CountryProps } from "./SelectPhone";
1
2
  import { InputProps } from "../Basic/Input";
2
3
  declare const InputPhone: (props: InputPhoneProps) => import("react/jsx-runtime").JSX.Element;
3
4
  export default InputPhone;
4
5
  export type InputPhoneProps = InputProps & {
5
6
  country?: string;
6
- countryOptions?: {
7
- id: string;
8
- esCountry: string;
9
- enCountry: string;
10
- prefix: string;
11
- countryCode: string;
12
- [key: string]: any;
13
- }[];
7
+ countryOptions?: CountryProps[];
14
8
  onPhoneChange?: (item: {
15
9
  country: string;
16
- value?: any;
10
+ value?: string | number;
17
11
  isValid: boolean;
18
12
  }) => void;
19
13
  };
@@ -1,16 +1,17 @@
1
- import { ComponentPropsWithoutRef } from "react";
1
+ import { ComponentPropsWithoutRef, CSSProperties } from "react";
2
2
  declare const Select: (props: Props) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Select;
4
- export interface Props extends ComponentPropsWithoutRef<"div"> {
4
+ export interface Props extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
5
5
  id: string;
6
- optionStyle?: any;
6
+ optionStyle?: CSSProperties;
7
7
  showMenu?: boolean;
8
8
  options: Array<CountryProps>;
9
9
  selectedItem?: CountryProps;
10
10
  focus: boolean;
11
- onChange?: (a: any) => void;
11
+ onChange?: (country: CountryProps) => void;
12
12
  }
13
13
  export interface CountryProps {
14
+ id?: string;
14
15
  countryCode: string;
15
16
  prefix: string;
16
17
  esCountry: string;
@@ -12,7 +12,11 @@ export interface InputRangeProps extends ComponentPropsWithoutRef<"input"> {
12
12
  hideLabels?: boolean;
13
13
  presents?: {
14
14
  value: number;
15
- icon: any;
15
+ icon: React.ComponentType<{
16
+ height?: number;
17
+ width?: number;
18
+ color?: string;
19
+ }>;
16
20
  color: string;
17
21
  colorSuccess: string;
18
22
  onClick?: () => void;
@@ -17,7 +17,7 @@ export interface OptionsProps {
17
17
  id: string;
18
18
  label: string;
19
19
  labelColor?: string;
20
- icon?: any;
20
+ icon?: React.ReactElement;
21
21
  }
22
22
  export interface MenuRef {
23
23
  close: () => void;
@@ -1,13 +1,13 @@
1
1
  import { ComponentPropsWithoutRef, CSSProperties } from "react";
2
2
  declare const Select: (props: Props) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Select;
4
- export interface Props extends ComponentPropsWithoutRef<"div"> {
4
+ export interface Props extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
5
5
  id: string;
6
6
  optionStyle?: CSSProperties;
7
7
  hideTitle?: boolean;
8
8
  options: Array<OptionProps>;
9
9
  selectedItem?: OptionProps;
10
- onChange?: (option: any) => void;
10
+ onChange?: (option: OptionProps) => void;
11
11
  }
12
12
  interface OptionProps {
13
13
  icon?: React.ReactElement;
@@ -9,6 +9,6 @@ export interface Props {
9
9
  }>;
10
10
  onChange?: (option: {
11
11
  id: string;
12
- icon: any;
12
+ icon: React.ReactElement;
13
13
  }) => void;
14
14
  }
@@ -1,9 +1,9 @@
1
- import React from "react";
1
+ import React, { CSSProperties } from "react";
2
2
  declare const TagSelector: (props: Props) => import("react/jsx-runtime").JSX.Element;
3
3
  export default TagSelector;
4
4
  export interface Props {
5
5
  type?: "multiple" | "single";
6
- style?: any;
6
+ style?: CSSProperties;
7
7
  options: Array<OptionProps>;
8
8
  optionsSelected?: Array<OptionProps>;
9
9
  onChange?: (selection: Array<OptionProps>) => void;
package/dist/esm/index.js CHANGED
@@ -609,7 +609,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as o,jsxs as i,Fragment
609
609
  display: flex;
610
610
  justify-content: flex-end;
611
611
  padding: 0 16px;
612
- `;const Do=e=>{const r=window.innerWidth<=768,l=x(null),a=x(null),d=x(null),s=x(null),[c,p]=u(""),[g,f]=u(),[m,b]=u(),[v,w]=u(!1),[C,k]=u(!1),[F,S]=u(!1);h(()=>{const e=setTimeout(()=>{_.apply([m])},100);return()=>clearTimeout(e)},[m]);const _=()=>t(void 0,void 0,void 0,function*(){const e=s.current,t=d.current,o=m;if((null==o?void 0:o.width)&&(null==o?void 0:o.height)&&e&&t){const i=t.getContext("2d");if(!i)throw new Error("No 2d context");const n=e.naturalWidth/e.width,r=e.naturalHeight/e.height,l=window.devicePixelRatio;t.width=Math.floor(o.width*n*l),t.height=Math.floor(o.height*r*l),i.scale(l,l),i.imageSmoothingQuality="high";const a=o.x*n,d=o.y*r,s=e.naturalWidth/2,c=e.naturalHeight/2;i.save(),i.translate(-a,-d),i.translate(s,c),i.translate(-s,-c),i.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),i.restore()}}),D=e=>new Promise((t,o)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=e=>o(e)}),M=o=>{new de(o,{quality:1,maxHeight:e.maxHeight,maxWidth:e.maxWidth,success:o=>t(void 0,void 0,void 0,function*(){p("");const t=yield D(o);e.onChange&&e.onChange(t),w(!1)})})},B=e=>{var t;"camera"===e?S(!0):"library"===e&&(k(!1),null===(t=a.current)||void 0===t||t.click())},E=y(()=>{var t;const o=null===(t=l.current)||void 0===t?void 0:t.getScreenshot();o&&(k(!1),S(!1),p(o),e.hideCrop&&e.onChange&&e.onChange(o))},[l]);return i(wo,{style:e.style,children:[i(he,{isVisible:C,type:r?"full-screen":"default",hideClose:!0,hideHeader:!0,style:{width:r?"100%":400},contentStyle:{padding:"16px 0px",backgroundColor:F?"black":"white"},buttonProps:F?{children:o(Fo,{style:{position:"relative",justifyContent:"center",alignItems:"center",width:"100%",padding:"0 32px"},children:o(So,{onClick:E})}),style:{backgroundColor:"transparent",width:"100%",marginTop:12,marginBottom:12,paddingBottom:"calc(env(safe-area-inset-bottom, 0) + 8px)"}}:void 0,onClose:()=>k(!1),children:[F&&o(Q,{design:"image",icon:o(L,{}),onClick:()=>{S(!1),k(!1)},style:{position:"absolute",top:12,right:12,backgroundColor:"rgba(0, 0, 0, 0.4)",color:"white",border:"none",padding:8,borderRadius:"50%",cursor:"pointer",zIndex:10}}),F?o(n,{children:o(ue,{ref:l,height:"100%",width:"100%",videoConstraints:{facingMode:"environment"}})}):i(n,{children:[o(_o,{children:o(L,{style:{cursor:"pointer"},onClick:()=>{S(!1),k(!1)}})}),i(Lo,{onClick:()=>B("camera"),children:[o(z,{}),o($,{type:"p",children:"Cámara"})]}),i(Lo,{onClick:()=>B("library"),children:[o(j,{}),o($,{type:"p",children:"Imagen de librería"})]})]})]}),o(Q,{role:"button",onClick:()=>{var t;e.options&&e.options.length>1?k(!0):null===(t=a.current)||void 0===t||t.click()},style:Object.assign({height:32,padding:"0px 12px",fontSize:14,fontWeight:500},e.buttonStyle),icon:e.icon,design:"secondary",children:e.buttonText?e.buttonText:"Subir foto"}),o("input",{name:"image",accept:"image/*",onChange:o=>t(void 0,void 0,void 0,function*(){if(o&&o.target&&o.target.files&&o.target.files[0]){const t=o.target.files[0];if(e.hideCrop){const e=new Blob([t],{type:"image/webp"});M(e)}else{f(void 0);const e=yield D(t);p(e),a.current&&(a.current.value="")}}}),hidden:!0,type:"file",ref:a}),c&&!e.hideCrop&&i($o,{children:[i(Co,{children:[o(Q,{design:"primary",size:"small",loading:v,icon:o(O,{}),onClick:()=>{var e;w(!0),null===(e=d.current)||void 0===e||e.toBlob(e=>{e?M(e):w(!1)},"image/webp")},children:"Recortar"}),o(Q,{style:{marginLeft:12},design:"image",icon:o(L,{}),onClick:()=>{p("")}})]}),o(se,{style:{height:"-webkit-fill-available"},crop:g,onChange:(e,t)=>f(t),onComplete:e=>b(e),aspect:1,children:o("img",{ref:s,alt:"Crop me",src:c,style:{maxWidth:"100%",maxHeight:"100%"},onLoad:e=>{{const{width:t,height:o}=e.currentTarget;f(function(e,t,o){return ce(pe({unit:"%",width:60},o,e,t),e,t)}(t,o,1))}}})}),m&&o(ko,{ref:d,style:e.previewStyle})]})]})},zo=r.div`
612
+ `;const Do=e=>{const r=window.innerWidth<=768,l=x(null),a=x(null),d=x(null),s=x(null),[c,p]=u(""),[g,f]=u(),[m,b]=u(),[v,w]=u(!1),[C,k]=u(!1),[F,S]=u(!1);h(()=>{const e=setTimeout(()=>{_.apply([m])},100);return()=>clearTimeout(e)},[m]);const _=()=>t(void 0,void 0,void 0,function*(){const e=s.current,t=d.current,o=m;if((null==o?void 0:o.width)&&(null==o?void 0:o.height)&&e&&t){const i=t.getContext("2d");if(!i)throw new Error("No 2d context");const n=e.naturalWidth/e.width,r=e.naturalHeight/e.height,l=window.devicePixelRatio;t.width=Math.floor(o.width*n*l),t.height=Math.floor(o.height*r*l),i.scale(l,l),i.imageSmoothingQuality="high";const a=o.x*n,d=o.y*r,s=e.naturalWidth/2,c=e.naturalHeight/2;i.save(),i.translate(-a,-d),i.translate(s,c),i.translate(-s,-c),i.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),i.restore()}}),D=e=>new Promise((t,o)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=e=>o(e)}),M=o=>{new de(o,{quality:1,maxHeight:e.maxHeight,maxWidth:e.maxWidth,success:o=>t(void 0,void 0,void 0,function*(){p("");const t=yield D(o);e.onChange&&e.onChange(t),w(!1)})})},B=e=>{var t;"camera"===e?S(!0):"library"===e&&(k(!1),null===(t=a.current)||void 0===t||t.click())},E=y(()=>{var t;const o=null===(t=l.current)||void 0===t?void 0:t.getScreenshot();o&&(k(!1),S(!1),p(o),e.hideCrop&&e.onChange&&e.onChange(o))},[l]);return i(wo,{style:e.style,children:[i(he,{isVisible:C,type:r?"full-screen":"default",hideClose:!0,hideHeader:!0,style:{width:r?"100%":400},contentStyle:{padding:"16px 0px",backgroundColor:F?"black":"white"},buttonProps:F?{children:o(Fo,{style:{position:"relative",justifyContent:"center",alignItems:"center",width:"100%",padding:"0 32px"},children:o(So,{onClick:E})}),style:{backgroundColor:"transparent",width:"100%",marginTop:12,marginBottom:12,paddingBottom:"calc(env(safe-area-inset-bottom, 0) + 8px)"}}:void 0,onClose:()=>k(!1),children:[F&&o(Q,{design:"image",icon:o(L,{}),onClick:()=>{S(!1),k(!1)},style:{position:"absolute",top:12,right:12,backgroundColor:"rgba(0, 0, 0, 0.4)",color:"white",border:"none",padding:8,borderRadius:"50%",cursor:"pointer",zIndex:10}}),F?o(n,{children:o(ue,{ref:l,height:"100%",width:"100%",videoConstraints:{facingMode:"environment"}})}):i(n,{children:[o(_o,{children:o(L,{style:{cursor:"pointer"},onClick:()=>{S(!1),k(!1)}})}),i(Lo,{onClick:()=>B("camera"),children:[o(z,{}),o($,{type:"p",children:"Cámara"})]}),i(Lo,{onClick:()=>B("library"),children:[o(j,{}),o($,{type:"p",children:"Imagen de librería"})]})]})]}),o(Q,{role:"button",onClick:()=>{var t;e.options&&e.options.length>1?k(!0):null===(t=a.current)||void 0===t||t.click()},style:Object.assign({height:32,padding:"0px 12px",fontSize:14,fontWeight:500},e.buttonStyle),icon:e.icon,design:"secondary",children:e.buttonText?e.buttonText:"Subir foto"}),o("input",{name:"image",accept:"image/*",onChange:o=>t(void 0,void 0,void 0,function*(){if(o&&o.target&&o.target.files&&o.target.files[0]){const t=o.target.files[0];if(e.hideCrop){const e=new Blob([t],{type:"image/webp"});M(e)}else{f(void 0);const e=yield D(t);p("string"==typeof e?e:""),a.current&&(a.current.value="")}}}),hidden:!0,type:"file",ref:a}),c&&!e.hideCrop&&i($o,{children:[i(Co,{children:[o(Q,{design:"primary",size:"small",loading:v,icon:o(O,{}),onClick:()=>{var e;w(!0),null===(e=d.current)||void 0===e||e.toBlob(e=>{e?M(e):w(!1)},"image/webp")},children:"Recortar"}),o(Q,{style:{marginLeft:12},design:"image",icon:o(L,{}),onClick:()=>{p("")}})]}),o(se,{style:{height:"-webkit-fill-available"},crop:g,onChange:(e,t)=>f(t),onComplete:e=>b(e),aspect:1,children:o("img",{ref:s,alt:"Crop me",src:c,style:{maxWidth:"100%",maxHeight:"100%"},onLoad:e=>{{const{width:t,height:o}=e.currentTarget;f(function(e,t,o){return ce(pe({unit:"%",width:60},o,e,t),e,t)}(t,o,1))}}})}),m&&o(ko,{ref:d,style:e.previewStyle})]})]})},zo=r.div`
613
613
  position: relative;
614
614
  display: flex;
615
615
  `,jo=r.div`
@@ -679,7 +679,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as o,jsxs as i,Fragment
679
679
  margin-top: ${e=>e.$focus?"15px":"0px"};
680
680
  transition: margin-top 0.1s ease-out;
681
681
  font-size: 14px !important;
682
- `,Io=e=>{var t;const r=xe,[l,a]=u(!1),[s,c]=u(void 0),[p,g]=u(e.options);h(()=>{e.options&&(c(Object.assign(Object.assign({},e.options[0]),{flag:r[e.options[0].countryCode]})),g(e.options))},[]),h(()=>(window.addEventListener("mousedown",e=>f(e)),window.removeEventListener("mousedown",()=>{})),[]),h(()=>{e.selectedItem&&c(Object.assign(Object.assign({},e.selectedItem),{flag:r[e.selectedItem.countryCode]}))},[e.selectedItem]);const f=t=>{const o=document.getElementById(e.id);o&&(o.contains(t.target)||a(!1))};return i(Eo,{children:[o(Ho,{role:"select",style:e.style,$showMenu:l,onClick:e=>{if(!e)e=window.event;e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),a(!l)},children:s&&i(n,{children:[o(To,{children:o(s.flag,{height:24,width:24})}),o(l?M:B,{height:20,width:20,color:d.text.high}),o(Vo,{type:"p",$focus:e.focus,color:null===(t=e.style)||void 0===t?void 0:t.color,children:s.prefix})]})}),l&&o(Ao,{role:"menu",id:e.id,style:e.optionStyle,children:p&&p.map((t,n)=>{const l=r[t.countryCode];return i(Po,{role:"country"+n,onClick:o=>((t,o)=>{o||(o=window.event);o.cancelBubble=!0,o.stopPropagation&&o.stopPropagation(),c(Object.assign(Object.assign({},t),{flag:r[t.countryCode]})),a(!1),g(e.options),e.onChange&&e.onChange(t)})(t,o),children:[o(To,{children:o(l,{height:24,width:24})}),i($,{type:"p",style:{fontSize:14,display:"flex",alignItems:"center"},children:[t.esCountry,i("span",{style:{marginLeft:4},children:["(",t.prefix,")"]})]})]},"country"+n)})})]})},Zo=r.div`
682
+ `,Io=e=>{var t;const r=xe,[l,a]=u(!1),[s,c]=u(void 0),[p,g]=u(e.options);h(()=>{e.options&&(c(Object.assign(Object.assign({},e.options[0]),{flag:r[e.options[0].countryCode]})),g(e.options))},[]),h(()=>(window.addEventListener("mousedown",e=>f(e)),window.removeEventListener("mousedown",()=>{})),[]),h(()=>{e.selectedItem&&c(Object.assign(Object.assign({},e.selectedItem),{flag:r[e.selectedItem.countryCode]}))},[e.selectedItem]);const f=t=>{const o=document.getElementById(e.id);o&&(o.contains(t.target)||a(!1))};return i(Eo,{children:[o(Ho,{role:"select",style:e.style,$showMenu:l,onClick:e=>{e.stopPropagation(),a(!l)},children:s&&i(n,{children:[o(To,{children:o(s.flag,{height:24,width:24})}),o(l?M:B,{height:20,width:20,color:d.text.high}),o(Vo,{type:"p",$focus:e.focus,color:null===(t=e.style)||void 0===t?void 0:t.color,children:s.prefix})]})}),l&&o(Ao,{role:"menu",id:e.id,style:e.optionStyle,children:p&&p.map((t,n)=>{const l=r[t.countryCode];return i(Po,{role:"country"+n,onClick:o=>((t,o)=>{o.stopPropagation(),c(Object.assign(Object.assign({},t),{flag:r[t.countryCode]})),a(!1),g(e.options),e.onChange&&e.onChange(t)})(t,o),children:[o(To,{children:o(l,{height:24,width:24})}),i($,{type:"p",style:{fontSize:14,display:"flex",alignItems:"center"},children:[t.esCountry,i("span",{style:{marginLeft:4},children:["(",t.prefix,")"]})]})]},"country"+n)})})]})},Zo=r.div`
683
683
  margin-right: 8px;
684
684
  `,Ro=t=>{const i=fe.PhoneNumberUtil.getInstance(),[n,r]=u(void 0),[l,a]=u({id:"spain",esCountry:"España",enCountry:"Spain",prefix:"+34",countryCode:"ES"}),[d,s]=u(!1),{countryOptions:c,onPhoneChange:p}=t,g=e(t,["countryOptions","onPhoneChange"]);h(()=>{t.defaultValue?r(t.defaultValue):t.value&&r(t.value)},[t.value,t.defaultValue]),h(()=>{if(t.country&&c){const e=c.filter(e=>e.countryCode===t.country);e.length>0&&f(e[0])}},[t.country,c]);const f=e=>{a(e);const o=(n&&"string"==typeof n?n:t.defaultValue&&"string"==typeof t.defaultValue?t.defaultValue:"").replaceAll(/\s/g,""),r=e.prefix+o;p&&p({country:e.prefix,value:o,isValid:r.length>=6&&r.length<18&&i.isValidNumberForRegion(i.parse(r,e.countryCode),e.countryCode)})};return o(oo,Object.assign({LeftContent:t.countryOptions?o(Zo,{children:o(Io,{selectedItem:l,onChange:e=>f(e),id:"country",options:t.countryOptions,focus:!(!d&&!n||"secondary"!==t.design)})}):void 0},g,{onChange:e=>{r(e.target.value),t.onChange&&t.onChange(e);const o=e.target.value.replaceAll(/\s/g,""),n=l.prefix+o;p&&p({country:l.prefix,value:o,isValid:n.length>8&&n.length<18&&i.isValidNumberForRegion(i.parse(n,l.countryCode),l.countryCode)})},onFocus:e=>{s(!0),t.onFocus&&t.onFocus(e)},onBlur:e=>{s(!1),t.onBlur&&t.onBlur(e)}}))},No=r.div`
685
685
  display: flex;
@@ -916,7 +916,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as o,jsxs as i,Fragment
916
916
  margin-left: -8px;
917
917
  margin-top: -1px;
918
918
  }
919
- `,ci=e=>{const t=C,n=x(null),r=x([]),l=x(null),[a,d]=u(void 0),[s,p]=u(""),[g,f]=u(!1),[m,y]=u(""),[b,v]=u(24);h(()=>{d(e.defaultOption)},[e.defaultOption]),h(()=>{if(e.options.length>0){const t=e.options[e.options.length-1].price.toString().length;t>5?v(16):t>4?v(18):t>3&&v(21)}},[e.options]),h(()=>{const t=e.options.findIndex(e=>e.price===a);if(-1!==t&&r.current[t]&&n.current){const e=n.current,o=r.current[t],i=e.offsetWidth,l=o.offsetWidth,a=o.offsetLeft-(i/2-l/2);e.scrollTo({left:a,behavior:"smooth"})}},[a]);return i(ti,{style:e.style,ref:n,children:[e.label&&e.labelValueConversion&&!e.options[0].data&&o(ai,{style:{justifyContent:a?0===e.options.findIndex(e=>e.price===a)?"flex-start":1===e.options.findIndex(e=>e.price===a)?"center":"flex-end":"center"},children:i(di,{type:"c1",children:[e.label.replace("{{value}}",(e.labelValueConversion*(a||(s?parseInt(s):0))).toFixed(0)),o(si,{$position:a?0===e.options.findIndex(e=>e.price===a)?"left":1===e.options.findIndex(e=>e.price===a)?"center":"right":"center"})]})}),o(ii,{style:e.containerStyle,children:e.options.map((n,l)=>{const u=a===n.price&&0===s.length;return i(ni,{ref:e=>r.current[l]=e,$selected:u,$data:!!n.data,onClick:()=>(t=>{p(""),y(""),d(t),e.onChange&&e.onChange(t)})(n.price),children:[i($,{type:"h3",weight:"medium",style:{fontSize:b},children:[n.price.toLocaleString("es-ES",{useGrouping:!0}),o("span",{style:{fontSize:b-6},children:e.currency})]}),n.data&&n.data.length>0&&o("div",{style:{display:"flex",flexDirection:"column",gap:3,marginTop:12,paddingTop:12,borderTop:"1px solid "+c.border.neutralSoft},children:n.data.map((e,n)=>{const r=e.icon?t[e.icon]:t.Check;return i("div",{style:{display:"flex",gap:8},children:[o(r,{height:16,width:16,color:c.text.primary}),o($,{type:"c1",style:{flex:1},children:e.title})]},`column-${l}-data-${n}`)})})]},"price-option-"+l)})}),!e.hideCustomAmount&&i(li,{$focus:g,$isSelected:s.length>0,$error:m.length>0,onClick:()=>{var e;return null===(e=l.current)||void 0===e?void 0:e.focus()},children:[i(oi,{$data:!!e.options[0].data,children:[o(ri,{ref:l,style:{fontSize:b,width:s.length>0?s.length+"ch":"unset"},type:"number",value:s,placeholder:"Otra cantidad",onChange:e=>{p(e.target.value)},onFocus:e=>{f(!0),y(""),d(void 0)},onBlur:t=>{f(!1);const o=parseInt(t.target.value),i=e.options[0].price;o<i||!o?y(`La donación mínima es de ${i}${e.currency}`):(y(""),e.onChange&&e.onChange(t.target.value.length>0?o:a||0))}}),s.length>0&&o($,{type:"h6",weight:"medium",style:{fontSize:18,marginTop:6},children:e.currency})]}),e.customAmountData&&o("div",{style:{marginTop:12,paddingTop:12,borderTop:"1px solid "+c.border.neutralSoft},children:e.customAmountData}),m&&o($,{type:"p2",weight:"medium",style:{marginTop:4,color:c.text.red,textAlign:"center"},children:m})]})]})},pi=r.div`
919
+ `,ci=e=>{const t=C,n=x(null),r=x([]),l=x(null),[a,d]=u(void 0),[s,p]=u(""),[g,f]=u(!1),[m,y]=u(""),[b,v]=u(24);h(()=>{d(e.defaultOption)},[e.defaultOption]),h(()=>{if(e.options.length>0){const t=e.options[e.options.length-1].price.toString().length;t>5?v(16):t>4?v(18):t>3&&v(21)}},[e.options]),h(()=>{const t=e.options.findIndex(e=>e.price===a);if(-1!==t&&r.current[t]&&n.current){const e=n.current,o=r.current[t],i=e.offsetWidth,l=o.offsetWidth,a=o.offsetLeft-(i/2-l/2);e.scrollTo({left:a,behavior:"smooth"})}},[a]);return i(ti,{style:e.style,ref:n,children:[e.label&&e.labelValueConversion&&!e.options[0].data&&o(ai,{style:{justifyContent:a?0===e.options.findIndex(e=>e.price===a)?"flex-start":1===e.options.findIndex(e=>e.price===a)?"center":"flex-end":"center"},children:i(di,{type:"c1",children:[e.label.replace("{{value}}",(e.labelValueConversion*(a||(s?parseInt(s):0))).toFixed(0)),o(si,{$position:a?0===e.options.findIndex(e=>e.price===a)?"left":1===e.options.findIndex(e=>e.price===a)?"center":"right":"center"})]})}),o(ii,{style:e.containerStyle,children:e.options.map((n,l)=>{const u=a===n.price&&0===s.length;return i(ni,{ref:e=>{r.current[l]=e},$selected:u,$data:!!n.data,onClick:()=>(t=>{p(""),y(""),d(t),e.onChange&&e.onChange(t)})(n.price),children:[i($,{type:"h3",weight:"medium",style:{fontSize:b},children:[n.price.toLocaleString("es-ES",{useGrouping:!0}),o("span",{style:{fontSize:b-6},children:e.currency})]}),n.data&&n.data.length>0&&o("div",{style:{display:"flex",flexDirection:"column",gap:3,marginTop:12,paddingTop:12,borderTop:"1px solid "+c.border.neutralSoft},children:n.data.map((e,n)=>{const r=e.icon?t[e.icon]:t.Check;return i("div",{style:{display:"flex",gap:8},children:[o(r,{height:16,width:16,color:c.text.primary}),o($,{type:"c1",style:{flex:1},children:e.title})]},`column-${l}-data-${n}`)})})]},"price-option-"+l)})}),!e.hideCustomAmount&&i(li,{$focus:g,$isSelected:s.length>0,$error:m.length>0,onClick:()=>{var e;return null===(e=l.current)||void 0===e?void 0:e.focus()},children:[i(oi,{$data:!!e.options[0].data,children:[o(ri,{ref:l,style:{fontSize:b,width:s.length>0?s.length+"ch":"unset"},type:"number",value:s,placeholder:"Otra cantidad",onChange:e=>{p(e.target.value)},onFocus:e=>{f(!0),y(""),d(void 0)},onBlur:t=>{f(!1);const o=parseInt(t.target.value),i=e.options[0].price;o<i||!o?y(`La donación mínima es de ${i}${e.currency}`):(y(""),e.onChange&&e.onChange(t.target.value.length>0?o:a||0))}}),s.length>0&&o($,{type:"h6",weight:"medium",style:{fontSize:18,marginTop:6},children:e.currency})]}),e.customAmountData&&o("div",{style:{marginTop:12,paddingTop:12,borderTop:"1px solid "+c.border.neutralSoft},children:e.customAmountData}),m&&o($,{type:"p2",weight:"medium",style:{marginTop:4,color:c.text.red,textAlign:"center"},children:m})]})]})},pi=r.div`
920
920
  position: relative;
921
921
  `,ui=r.div`
922
922
  display: flex;
@@ -951,7 +951,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as o,jsxs as i,Fragment
951
951
  &:hover {
952
952
  background-color: ${d.background.soft};
953
953
  }
954
- `,fi=e=>{const[t,n]=u(!1),[r,l]=u(e.options&&e.options[0]);h(()=>(window.addEventListener("click",e=>a(e)),window.removeEventListener("click",()=>{})),[]),h(()=>{e.selectedItem&&l(e.selectedItem)},[e.selectedItem]);const a=t=>{const o=document.getElementById(e.id);null!==o&&(o.contains(t.target)||n(!1))};return i(pi,{children:[i(ui,{role:"select",id:e.id,style:e.style,onClick:e=>{if(!e)e=window.event;e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),n(!t)},children:[null==r?void 0:r.icon,!e.hideTitle&&o($,{type:"p",style:{flex:1,fontSize:14,color:e.style?e.style.color:d.text.full},children:null==r?void 0:r.label}),o(t?M:B,{height:20,width:20})]}),t&&o(hi,{role:"menu",style:e.optionStyle,children:e.options.map((t,r)=>i(gi,{role:"cell-"+r,onClick:o=>((t,o)=>{o||(o=window.event);o.cancelBubble=!0,o.stopPropagation&&o.stopPropagation(),l(t),n(!1),e.onChange&&e.onChange(t)})(t,o),children:[t.icon,o($,{type:"p",children:t.label})]},e.id+"-cell-"+r))})]})},xi=r.div`
954
+ `,fi=e=>{const[t,n]=u(!1),[r,l]=u(e.options&&e.options[0]);h(()=>(window.addEventListener("click",e=>a(e)),window.removeEventListener("click",()=>{})),[]),h(()=>{e.selectedItem&&l(e.selectedItem)},[e.selectedItem]);const a=t=>{const o=document.getElementById(e.id);null!==o&&(o.contains(t.target)||n(!1))};return i(pi,{children:[i(ui,{role:"select",id:e.id,style:e.style,onClick:e=>{e.stopPropagation(),n(!t)},children:[null==r?void 0:r.icon,!e.hideTitle&&o($,{type:"p",style:{flex:1,fontSize:14,color:e.style?e.style.color:d.text.full},children:null==r?void 0:r.label}),o(t?M:B,{height:20,width:20})]}),t&&o(hi,{role:"menu",style:e.optionStyle,children:e.options.map((t,r)=>i(gi,{role:"cell-"+r,onClick:o=>((t,o)=>{o.stopPropagation(),l(t),n(!1),e.onChange&&e.onChange(t)})(t,o),children:[t.icon,o($,{type:"p",children:t.label})]},e.id+"-cell-"+r))})]})},xi=r.div`
955
955
  display: flex;
956
956
  align-items: center;
957
957
  padding: 0px;
@@ -1061,7 +1061,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as o,jsxs as i,Fragment
1061
1061
  &:hover{
1062
1062
  background-color: ${d.status.neutral.hover};
1063
1063
  }
1064
- `,Hi=f((e,t)=>{const[n,r]=u(!1);m(t,()=>({close(){r(!1)}})),h(()=>(document.addEventListener("mousedown",t=>{const o=document.getElementById(e.id);null!==o&&(o.contains(t.target)||n&&l(t))}),document.removeEventListener("mousedown",l)));const l=t=>{t.stopPropagation(),n?(r(!1),e.onChange&&e.onChange(!1)):(r(!0),e.onChange&&e.onChange(!0))};return i(Oi,{id:e.id,role:"menu",style:e.style,children:[e.Icon?o(Bi,{onClick:l,children:e.Icon}):o(Q,{style:{backgroundColor:n?d.status.neutral.active:void 0},design:"image",icon:e.icon?e.icon:o(H,{}),onClick:l}),i(Mi,{$padding:!e.options,$position:e.position,style:e.menuStyle,$show:n,children:[e.children,e.options&&e.options.map((t,n)=>{var l;return i(Ei,{style:{borderBottom:n+1===(null===(l=e.options)||void 0===l?void 0:l.length)?"none":"1px solid "+d.line.soft},onClick:o=>((t,o)=>{t.stopPropagation(),r(!1),e.onClick&&e.onClick(o)})(o,t),children:[t.icon,o($,{type:"p",style:{color:t.labelColor},children:t.label})]},"action"+n)})]})]})}),Ai=r.div`
1064
+ `,Hi=f((e,t)=>{const[n,r]=u(!1);m(t,()=>({close(){r(!1)}})),h(()=>{const t=t=>{const o=document.getElementById(e.id);null!==o&&(o.contains(t.target)||n&&l(t))};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)});const l=t=>{t.stopPropagation(),n?(r(!1),e.onChange&&e.onChange(!1)):(r(!0),e.onChange&&e.onChange(!0))};return i(Oi,{id:e.id,role:"menu",style:e.style,children:[e.Icon?o(Bi,{onClick:l,children:e.Icon}):o(Q,{style:{backgroundColor:n?d.status.neutral.active:void 0},design:"image",icon:e.icon?e.icon:o(H,{}),onClick:l}),i(Mi,{$padding:!e.options,$position:e.position,style:e.menuStyle,$show:n,children:[e.children,e.options&&e.options.map((t,n)=>{var l;return i(Ei,{style:{borderBottom:n+1===(null===(l=e.options)||void 0===l?void 0:l.length)?"none":"1px solid "+d.line.soft},onClick:o=>((t,o)=>{t.stopPropagation(),r(!1),e.onClick&&e.onClick(o)})(o,t),children:[t.icon,o($,{type:"p",style:{color:t.labelColor},children:t.label})]},"action"+n)})]})]})}),Ai=r.div`
1065
1065
  display: flex;
1066
1066
  flex-direction: row;
1067
1067
  justify-content: center;
@@ -1225,7 +1225,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as o,jsxs as i,Fragment
1225
1225
  justify-content: center;
1226
1226
  height: 18px;
1227
1227
  width: 18px;
1228
- `,on=e=>{const t=window.innerWidth<=450,[r,l]=u(!1),[a,s]=u(void 0),p=x(null),g=x(null);h(()=>{const e=()=>{l(!1)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),h(()=>{const e=e=>{(r&&p.current&&!g.current&&!p.current.contains(e.target)||r&&g.current&&!g.current.contains(e.target))&&l(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[r]),h(()=>{r||e.onClose&&e.onClose()},[r]);const f=t=>{const o=t.target.value;s(o),e.onSearchChange&&e.onSearchChange(o)},m=()=>o(n,{children:i(Ji,{children:[o(Qi,{}),i(Ki,{children:[e.childrenBottomBar,o(Q,{design:"call-to-action",size:t?"normal":"small",onClick:()=>{l(!1),e.onRemove&&e.onRemove()},children:"Borrar"}),o(Q,{design:"primary",size:t?"normal":"small",onClick:()=>{l(!1),e.onSave&&e.onSave()},children:"Aplicar"})]})]})});return i(Ui,{id:e.id,role:"filter",style:e.style,children:[i(qi,{role:"filter-button",$selected:!!e.label,disabled:e.disabled,onClick:()=>{l(!0)},children:[o($,{type:"b2",weight:"medium",style:{fontWeight:500,whiteSpace:"nowrap",overflow:"hidden",overflowWrap:"break-word",textOverflow:"ellipsis"},children:e.label?e.label:e.placeholder}),e.label?o(tn,{onClick:t=>{t.stopPropagation(),e.onRemove&&e.onRemove()},children:o(L,{height:18,width:18,color:e.disabled?d.text.low:"black"})}):o(tn,{children:o(B,{height:18,width:18,color:e.disabled?d.text.low:d.text.high})})]}),o(he,{type:"full-screen",isVisible:r&&t,onClose:()=>{l(!1)},hideClose:!0,children:i("div",{ref:g,children:[i(en,{$hideSearchBar:!!e.hideSearchBar&&e.hideSearchBar,children:[!e.hideSearchBar&&o(ve,{defaultValue:a,style:{flex:1},placeholder:"Buscar",design:"primary",onChange:f}),o(Q,{design:"call-to-action",size:"small",style:{color:c.text.neutralHard},onClick:()=>{l(!1)},children:"Cancelar"})]}),o(Xi,{style:{flex:1,overflowY:"auto"},children:e.children}),m()]})}),!t&&r&&i(Gi,{style:e.menuStyle,ref:p,$position:e.position,children:[!e.hideSearchBar&&o(ve,{defaultValue:a,style:{borderBottom:"1px solid "+c.border.neutralSoft,marginBottom:8},placeholder:"Buscar",design:"secondary",onChange:f}),o(Xi,{children:e.children}),m()]})]})},nn=f((t,i)=>{var{type:n,options:r,selectedOptions:l,onChange:a}=t,d=e(t,["type","options","selectedOptions","onChange"]);const s=window.innerWidth<=450,[c,p]=u([]),[g,f]=u(r),[x,y]=u(void 0),[b,v]=u(void 0);m(i,()=>({clean(){$()}})),h(()=>{y(new be(r,{keys:["label","id"]})),f(r)},[r]),h(()=>{p(l||[]),w(l||[])},[l]);const w=e=>{if("single"===n&&e.length>0){const t=e[0];if(t.label)v(t.label);else{const e=r.find(e=>e.id===t.id);v(e?e.label:"1 seleccionado")}}else"multiple"===n&&e.length>0&&v(`${e.length} seleccionados`)},$=()=>{v(void 0),p([]),a&&a([])};return o(on,Object.assign({},d,{label:b,childrenBottomBar:"multiple"===n&&!s&&o(Q,{design:"call-to-action",size:s?"normal":"small",onClick:()=>{p(r)},children:"Seleccionar todo"}),onSave:()=>{w(c),a&&a(c)},onRemove:$,onSearchChange:e=>{if(e){const t=x.search(e).map(e=>e.item);f(t)}else f(r)},onClose:()=>{f(r)},children:o(we,{style:{width:"100%"},options:g,selectedOptions:c,type:n,shape:d.shape,height:s?22:18,width:s?22:18,position:s?"right":"left",onChange:e=>{p(e)}})}))});yo(".DayPicker{\n border-radius: 0px;\n box-shadow: none;\n font-family: Poppins;\n}\n\n.DayPickerKeyboardShortcuts_show__bottomRight{\n display: none;\n}\n\n.CalendarMonth{\n padding: 0px !important;\n}");const rn=f((t,i)=>{var{position:n,selectedOptions:r,onChange:l}=t,a=e(t,["position","selectedOptions","onChange"]);const d=window.innerWidth<=450,s=window.innerWidth<=400,[c,p]=u(void 0),[g,f]=u(null),[x,y]=u(null),[b,v]=u("startDate");m(i,()=>({clean(){$()}})),h(()=>{r?(f(r.startDate),y(r.endDate),w(r.startDate?r.startDate:void 0,r.endDate?r.endDate:void 0)):(f(null),y(null),p(""))},[r]);const w=(e,t)=>{let o="";e&&(o=e.format("D MMM")),t&&(o+=` - ${t.format("D MMM")}`),p(o)},$=()=>{y(null),f(null),v("startDate"),p(void 0),l&&l({startDate:null,endDate:null})};return o(on,Object.assign({},a,{label:c,hideSearchBar:!0,position:n,onSave:()=>{w(g||void 0,x||void 0),l&&l({startDate:g?g.startOf("date"):null,endDate:x?x.endOf("date"):null})},onRemove:$,children:o(ae,{startDate:g,endDate:x,onDatesChange:({startDate:e,endDate:t})=>{f(e),y(t)},daySize:s?35:d?48:void 0,focusedInput:b,noBorder:!0,onFocusChange:e=>v(e),initialVisibleMonth:()=>oe()})}))}),ln=f((t,i)=>{var{selectedOptions:n,min:r,max:l,unit:a,onChange:d}=t,s=e(t,["selectedOptions","min","max","unit","onChange"]);const c=window.innerWidth<=450,[p,g]=u(void 0),[f,x]=u(0),[y,b]=u(void 0);m(i,()=>({clean(){v()}})),h(()=>{n?(x(n),g(`${n.toString()} ${a||""}`)):(x(0),g(void 0))},[n]);const v=()=>{x(0),b(void 0),g(void 0),d&&d(void 0)};return o(on,Object.assign({},s,{label:p,hideSearchBar:!0,onSave:()=>{y&&(g(`${y.toString()} ${a||""}`),x(y),d&&d(y))},onRemove:v,children:o($e,{style:{width:"100%",margin:c?"20px 0px":20,marginTop:40},min:r,max:l,unit:a,defaultValue:f,onChange:e=>{b(e.target.value)}})}))}),an=f((e,t)=>"date"===e.type?o(rn,Object.assign({ref:t},e)):"ratio"===e.type?o(ln,Object.assign({ref:t},e)):o(nn,Object.assign({ref:t},e))),dn=r.button`
1228
+ `,on=e=>{const t=window.innerWidth<=450,[r,l]=u(!1),[a,s]=u(void 0),p=x(null),g=x(null);h(()=>{const e=()=>{l(!1)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),h(()=>{const e=e=>{(r&&p.current&&!g.current&&!p.current.contains(e.target)||r&&g.current&&!g.current.contains(e.target))&&l(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[r]),h(()=>{r||e.onClose&&e.onClose()},[r]);const f=t=>{const o=t.target.value;s(o),e.onSearchChange&&e.onSearchChange(o)},m=()=>o(n,{children:i(Ji,{children:[o(Qi,{}),i(Ki,{children:[e.childrenBottomBar,o(Q,{design:"call-to-action",size:t?"normal":"small",onClick:()=>{l(!1),e.onRemove&&e.onRemove()},children:"Borrar"}),o(Q,{design:"primary",size:t?"normal":"small",onClick:()=>{l(!1),e.onSave&&e.onSave()},children:"Aplicar"})]})]})});return i(Ui,{id:e.id,role:"filter",style:e.style,children:[i(qi,{role:"filter-button",$selected:!!e.label,disabled:e.disabled,onClick:()=>{l(!0)},children:[o($,{type:"b2",weight:"medium",style:{fontWeight:500,whiteSpace:"nowrap",overflow:"hidden",overflowWrap:"break-word",textOverflow:"ellipsis"},children:e.label?e.label:e.placeholder}),e.label?o(tn,{onClick:t=>{t.stopPropagation(),e.onRemove&&e.onRemove()},children:o(L,{height:18,width:18,color:e.disabled?d.text.low:"black"})}):o(tn,{children:o(B,{height:18,width:18,color:e.disabled?d.text.low:d.text.high})})]}),o(he,{type:"full-screen",isVisible:r&&t,onClose:()=>{l(!1)},hideClose:!0,children:i("div",{ref:g,children:[i(en,{$hideSearchBar:!!e.hideSearchBar&&e.hideSearchBar,children:[!e.hideSearchBar&&o(ve,{defaultValue:a,style:{flex:1},placeholder:"Buscar",design:"primary",onChange:f}),o(Q,{design:"call-to-action",size:"small",style:{color:c.text.neutralHard},onClick:()=>{l(!1)},children:"Cancelar"})]}),o(Xi,{style:{flex:1,overflowY:"auto"},children:e.children}),m()]})}),!t&&r&&i(Gi,{style:e.menuStyle,ref:p,$position:e.position,children:[!e.hideSearchBar&&o(ve,{defaultValue:a,style:{borderBottom:"1px solid "+c.border.neutralSoft,marginBottom:8},placeholder:"Buscar",design:"secondary",onChange:f}),o(Xi,{children:e.children}),m()]})]})},nn=f((t,i)=>{var{type:n,options:r,selectedOptions:l,onChange:a}=t,d=e(t,["type","options","selectedOptions","onChange"]);const s=window.innerWidth<=450,[c,p]=u([]),[g,f]=u(r),[x,y]=u(void 0),[b,v]=u(void 0);m(i,()=>({clean(){$()}})),h(()=>{y(new be(r,{keys:["label","id"]})),f(r)},[r]),h(()=>{p(l||[]),w(l||[])},[l]);const w=e=>{if("single"===n&&e.length>0){const t=e[0];if(t.label)v(t.label);else{const e=r.find(e=>e.id===t.id);v(e?e.label:"1 seleccionado")}}else"multiple"===n&&e.length>0&&v(`${e.length} seleccionados`)},$=()=>{v(void 0),p([]),a&&a([])};return o(on,Object.assign({},d,{label:b,childrenBottomBar:"multiple"===n&&!s&&o(Q,{design:"call-to-action",size:s?"normal":"small",onClick:()=>{p(r)},children:"Seleccionar todo"}),onSave:()=>{w(c),a&&a(c)},onRemove:$,onSearchChange:e=>{if(e&&x){const t=x.search(e).map(e=>e.item);f(t)}else f(r)},onClose:()=>{f(r)},children:o(we,{style:{width:"100%"},options:g,selectedOptions:c,type:n,shape:d.shape,height:s?22:18,width:s?22:18,position:s?"right":"left",onChange:e=>{p(e)}})}))});yo(".DayPicker{\n border-radius: 0px;\n box-shadow: none;\n font-family: Poppins;\n}\n\n.DayPickerKeyboardShortcuts_show__bottomRight{\n display: none;\n}\n\n.CalendarMonth{\n padding: 0px !important;\n}");const rn=f((t,i)=>{var{position:n,selectedOptions:r,onChange:l}=t,a=e(t,["position","selectedOptions","onChange"]);const d=window.innerWidth<=450,s=window.innerWidth<=400,[c,p]=u(void 0),[g,f]=u(null),[x,y]=u(null),[b,v]=u("startDate");m(i,()=>({clean(){$()}})),h(()=>{r?(f(r.startDate),y(r.endDate),w(r.startDate?r.startDate:void 0,r.endDate?r.endDate:void 0)):(f(null),y(null),p(""))},[r]);const w=(e,t)=>{let o="";e&&(o=e.format("D MMM")),t&&(o+=` - ${t.format("D MMM")}`),p(o)},$=()=>{y(null),f(null),v("startDate"),p(void 0),l&&l({startDate:null,endDate:null})};return o(on,Object.assign({},a,{label:c,hideSearchBar:!0,position:n,onSave:()=>{w(g||void 0,x||void 0),l&&l({startDate:g?g.startOf("date"):null,endDate:x?x.endOf("date"):null})},onRemove:$,children:o(ae,{startDate:g,endDate:x,onDatesChange:({startDate:e,endDate:t})=>{f(e),y(t)},daySize:s?35:d?48:void 0,focusedInput:b,noBorder:!0,onFocusChange:e=>v(e),initialVisibleMonth:()=>oe()})}))}),ln=f((t,i)=>{var{selectedOptions:n,min:r,max:l,unit:a,onChange:d}=t,s=e(t,["selectedOptions","min","max","unit","onChange"]);const c=window.innerWidth<=450,[p,g]=u(void 0),[f,x]=u(0),[y,b]=u(void 0);m(i,()=>({clean(){v()}})),h(()=>{n?(x(n),g(`${n.toString()} ${a||""}`)):(x(0),g(void 0))},[n]);const v=()=>{x(0),b(void 0),g(void 0),d&&d(void 0)};return o(on,Object.assign({},s,{label:p,hideSearchBar:!0,onSave:()=>{y&&(g(`${y.toString()} ${a||""}`),x(y),d&&d(y))},onRemove:v,children:o($e,{style:{width:"100%",margin:c?"20px 0px":20,marginTop:40},min:r,max:l,unit:a,defaultValue:f,onChange:e=>{const t=e.target.value?Number(e.target.value):void 0;b(t)}})}))}),an=f((e,t)=>"date"===e.type?o(rn,Object.assign({ref:t},e)):"ratio"===e.type?o(ln,Object.assign({ref:t},e)):o(nn,Object.assign({ref:t},e))),dn=r.button`
1229
1229
  display: flex;
1230
1230
  align-items: center;
1231
1231
  flex-direction: row;
@@ -1391,7 +1391,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as o,jsxs as i,Fragment
1391
1391
  border-radius: 9999px;
1392
1392
  background-color: #e0e0e0;
1393
1393
  }
1394
- `,Cn=e=>{const[t,n]=u(e.maxLength?e.maxLength:0);h(()=>{e.maxLength&&n(e.maxLength)},[e.maxLength]);return i(wn,{role:"text-area",children:[o($n,{defaultValue:e.defaultValue,name:e.name,maxLength:e.maxLength,onKeyDown:t=>{e.maxLength&&t.currentTarget.value.length>=e.maxLength&&"Backspace"!==t.key&&"Delete"!==t.key&&t.preventDefault()},onChange:(t,o)=>{let i;if(t)i=t;else{const t=Le(ke(o.getCurrentContent()));i={target:{name:e.name,value:t}}}e.maxLength&&i.target.value.length>e.maxLength||(e.maxLength&&n(i.target.value.length),e.onChange&&e.onChange(i))},"data-testid":"text_area",style:e.style,$design:e.design,placeholder:e.placeholder}),e.maxLength&&i($,{type:"h3",weight:"semibold",style:{color:"var(--text-clear-neutral-medium, rgba(0, 29, 61, 0.56)",fontFeatureSettings:"'liga' off, 'clig' off",fontFamily:"Poppins",fontSize:"13px",fontStyle:"normal",fontWeight:400,textAlign:"right",lineHeight:"20px",marginLeft:"16px",marginTop:"8px"},children:[t,"/",e.maxLength," caracteres"]})]})};yo('/* Basic editor styles */\n.tiptap {\n\tfont-family: "Poppins", sans-serif;\n\tfont-size: 15px;\n\tbackground-color: white;\n\tborder: 0px;\n\toutline: 0px;\n\tpadding: 16px 24px;\n\n\t:focus {\n\t\toutline: none !important;\n\t}\n\t:first-child {\n\t\tmargin-top: 0;\n\t}\n\n\t/* Heading styles */\n\th1 {\n\t\tfont-size: 1.4rem;\n\t}\n\n\th2 {\n\t\tfont-size: 1.2rem;\n\t}\n\n\th3 {\n\t\tfont-size: 1.1rem;\n\t}\n}\n\n.toolbar {\n\t.is-active {\n\t\tbackground-color: #f0f3f6;\n\t}\n}\n');const kn=r.div`
1394
+ `,Cn=e=>{const[t,n]=u(e.maxLength?e.maxLength:0);h(()=>{e.maxLength&&n(e.maxLength)},[e.maxLength]);return i(wn,{role:"text-area",children:[o($n,{defaultValue:e.defaultValue,name:e.name,maxLength:e.maxLength,onKeyDown:t=>{e.maxLength&&t.currentTarget.value.length>=e.maxLength&&"Backspace"!==t.key&&"Delete"!==t.key&&t.preventDefault()},onChange:(t,o)=>{let i;if(t)i=t;else if(o){const t=Le(ke(o.getCurrentContent()));i={target:{name:e.name,value:t}}}i&&(e.maxLength&&i.target.value.length>e.maxLength||(e.maxLength&&n(i.target.value.length),e.onChange&&e.onChange(i)))},"data-testid":"text_area",style:e.style,$design:e.design,placeholder:e.placeholder}),e.maxLength&&i($,{type:"h3",weight:"semibold",style:{color:"var(--text-clear-neutral-medium, rgba(0, 29, 61, 0.56)",fontFeatureSettings:"'liga' off, 'clig' off",fontFamily:"Poppins",fontSize:"13px",fontStyle:"normal",fontWeight:400,textAlign:"right",lineHeight:"20px",marginLeft:"16px",marginTop:"8px"},children:[t,"/",e.maxLength," caracteres"]})]})};yo('/* Basic editor styles */\n.tiptap {\n\tfont-family: "Poppins", sans-serif;\n\tfont-size: 15px;\n\tbackground-color: white;\n\tborder: 0px;\n\toutline: 0px;\n\tpadding: 16px 24px;\n\n\t:focus {\n\t\toutline: none !important;\n\t}\n\t:first-child {\n\t\tmargin-top: 0;\n\t}\n\n\t/* Heading styles */\n\th1 {\n\t\tfont-size: 1.4rem;\n\t}\n\n\th2 {\n\t\tfont-size: 1.2rem;\n\t}\n\n\th3 {\n\t\tfont-size: 1.1rem;\n\t}\n}\n\n.toolbar {\n\t.is-active {\n\t\tbackground-color: #f0f3f6;\n\t}\n}\n');const kn=r.div`
1395
1395
  position: relative;
1396
1396
  border-radius: 12px;
1397
1397
  overflow: hidden;