@zydon/common 2.3.73 → 2.3.75

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.
@@ -4,6 +4,6 @@ import '@mui/material/TextField';
4
4
  import '../../../types/baseField.js';
5
5
  import 'react-hook-form';
6
6
 
7
- declare const InputTags: ({ name, helperText, rules, label, required, }: FieldProps) => react_jsx_runtime.JSX.Element;
7
+ declare const InputTags: ({ name, helperText, rules, id, label, required, }: FieldProps) => react_jsx_runtime.JSX.Element;
8
8
 
9
9
  export { InputTags as default };
@@ -1,9 +1,10 @@
1
1
  import { useFormContext, Controller } from 'react-hook-form';
2
- import b from '@mui/material/Autocomplete';
3
- import h from '@mui/material/Chip';
4
- import I from '@mui/material/TextField';
2
+ import y from '@mui/material/Autocomplete';
3
+ import C from '@mui/material/Chip';
4
+ import F from '@mui/material/TextField';
5
5
  import { jsx } from 'react/jsx-runtime';
6
+ import { createElement } from 'react';
6
7
 
7
- var C=({name:n,helperText:a,rules:i,label:p,required:m})=>{let{control:s}=useFormContext();return jsx(Controller,{name:n,control:s,rules:i,render:({field:{ref:f,value:c,onChange:d},fieldState:{error:u}})=>jsx(b,{multiple:!0,options:[],freeSolo:!0,value:c,onChange:(t,o)=>{let l=o.filter(e=>typeof e=="string"?e.trim().length>0:!0);d(l);},renderTags:(t,o)=>t.map((l,e)=>jsx(h,{variant:"soft",color:"primary",label:l,...o({index:e})},e)),renderInput:t=>jsx(I,{...t,inputRef:f,label:p,placeholder:"| Digite e tecle enter",error:!!u,helperText:u?.message||a,required:m}),"data-intercom-target":n})})},R=C;
8
+ var I=({name:a,helperText:u,rules:i,id:m,label:s,required:f})=>{let{control:d}=useFormContext();return jsx(Controller,{name:a,control:d,rules:i,render:({field:{ref:c,value:n,onChange:g},fieldState:{error:p}})=>jsx(y,{multiple:!0,options:[],freeSolo:!0,value:Array.isArray(n)?n:[],onChange:(t,r)=>{let o=r.filter(e=>typeof e=="string"?e.trim().length>0:!0);g(o);},id:m,renderTags:(t,r)=>t.map((o,e)=>createElement(C,{...r({index:e}),key:`tag-${e}`,variant:"soft",color:"primary",label:o})),renderInput:t=>jsx(F,{...t,inputRef:c,label:s,placeholder:"| Digite e tecle enter",error:!!p,helperText:p?.message||u,required:f}),"data-intercom-target":a})})},k=I;
8
9
 
9
- export { R as default };
10
+ export { k as default };
@@ -443,7 +443,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
443
443
  wordWrap?: csstype.Property.WordWrap | readonly NonNullable<csstype.Property.WordWrap | undefined>[] | readonly csstype.Property.WordWrap[] | undefined;
444
444
  writingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
445
445
  zIndex?: csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto")[] | undefined;
446
- zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
446
+ zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
447
447
  all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
448
448
  animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "linear" | "none" | "auto" | "both" | "alternate" | "alternate-reverse" | "backwards" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start")[] | undefined;
449
449
  animationRange?: csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | readonly (string | (string & {}))[] | undefined;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Abre uma janela popup centralizada, ajustando para múltiplos monitores e zoom.
3
+ * @param {string} url URL que será carregada na popup
4
+ * @param {number} desiredWidth Largura desejada da popup (px)
5
+ * @param {number} desiredHeight Altura desejada da popup (px)
6
+ * @returns {Window|null} Referência à janela criada, ou null se bloqueada
7
+ */
8
+ declare const openCenteredPopup: (url: string, desiredWidth?: number, desiredHeight?: number) => Window | null;
9
+
10
+ export { openCenteredPopup };
@@ -0,0 +1,3 @@
1
+ var p=(c,r=700,d=900)=>{let h=window.screenLeft??window.screenX,w=window.screenTop??window.screenY,n=window.innerWidth||document.documentElement.clientWidth||screen.width,e=window.innerHeight||document.documentElement.clientHeight||screen.height,o=n/window.screen.availWidth,i=Math.min(r,Math.floor(n*.9)),s=Math.min(d,Math.floor(e*.9)),a=(n-i)/2/o+h,l=(e-s)/2/o+w,u=["toolbar=no","location=no","status=no","menubar=no","scrollbars=yes","resizable=yes",`width=${Math.floor(i/o)}`,`height=${Math.floor(s/o)}`,`top=${Math.round(l)}`,`left=${Math.round(a)}`].join(","),t=window.open(c,"_blank",u);return t&&t.focus&&t.focus(),t};
2
+
3
+ export { p as openCenteredPopup };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.3.73",
3
+ "version": "2.3.75",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",