@zydon/common 2.3.39 → 2.3.40

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.
@@ -0,0 +1,14 @@
1
+ import { a as a$1 } from './chunk-ORYAES3Q.js';
2
+ import { useState } from 'react';
3
+ import g from '@mui/material/Box';
4
+ import P from '@mui/material/IconButton';
5
+ import x from '@mui/material/InputAdornment';
6
+ import k from '@mui/material/Popover';
7
+ import I from '@mui/material/TextField';
8
+ import { ChromePicker } from 'react-color';
9
+ import { styled } from '@mui/material/styles';
10
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
11
+
12
+ var a=styled(ChromePicker)({fontFamily:"inherit",boxShadow:"none"});var b=({value:m,onChangeColor:c,tabIndex:h,...t})=>{let[u,i]=useState(),p=u||m,n=p?"#"+p.replaceAll("#",""):"",e=a$1(),l=(o="")=>{(/^#[0-9a-fA-F]*$/.test(o)||o===""||o==="#")&&c("#"+o.replaceAll("#","")),i(void 0);};return jsxs(Fragment,{children:[jsx(I,{...t,value:n,onChange:o=>l(o.target.value),InputProps:{inputProps:{...t.inputProps,maxLength:7,tabIndex:h},...t.InputProps,startAdornment:jsx(x,{position:"start",sx:{ml:2},children:jsx(P,{edge:"start","aria-label":"Escolher cor",onClick:e.onOpen,children:jsx(g,{sx:{minWidth:24,minHeight:24,backgroundColor:n,borderRadius:.5}})})})}}),jsx(k,{className:"popover-color-picker",open:!!e.open,anchorEl:e.open,onClose:e.onClose,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"center",horizontal:"center"},slotProps:{paper:{style:{borderRadius:8}}},children:jsx(a,{color:n,onChange:({hex:o})=>i(o),onChangeComplete:({hex:o})=>l(o),styles:{default:{picker:{fontFamily:"inherit",boxShadow:"none"}}},disableAlpha:!0})})]})},N=b;
13
+
14
+ export { N as a };
@@ -1,2 +1,2 @@
1
- export { a as default } from '../../chunk-B3MVLFON.js';
1
+ export { a as default } from '../../chunk-HZJAUQ3O.js';
2
2
  import '../../chunk-ORYAES3Q.js';
@@ -1,4 +1,4 @@
1
- import { a } from '../../../chunk-B3MVLFON.js';
1
+ import { a } from '../../../chunk-HZJAUQ3O.js';
2
2
  import '../../../chunk-ORYAES3Q.js';
3
3
  import { useFormContext, Controller } from 'react-hook-form';
4
4
  import { jsx } from 'react/jsx-runtime';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.3.39",
3
+ "version": "2.3.40",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,14 +0,0 @@
1
- import { a } from './chunk-ORYAES3Q.js';
2
- import { useState } from 'react';
3
- import g from '@mui/material/Box';
4
- import P from '@mui/material/IconButton';
5
- import x from '@mui/material/InputAdornment';
6
- import k from '@mui/material/Popover';
7
- import b from '@mui/material/TextField';
8
- import { ChromePicker } from 'react-color';
9
- import { styled } from '@mui/material/styles';
10
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
11
-
12
- var s=styled(ChromePicker)({fontFamily:"inherit",boxShadow:"none"});var I=({value:m,onChangeColor:c,tabIndex:h,...n})=>{let[u,i]=useState(),p=u||m,t=p?"#"+p.replaceAll("#",""):"",e=a(),l=(o="")=>{(/^#[0-9a-fA-F]*$/.test(o)||o===""||o==="#")&&c("#"+o.replaceAll("#","")),i(void 0);};return jsxs(Fragment,{children:[jsx(b,{...n,value:t,onChange:o=>l(o.target.value),InputProps:{inputProps:{...n.inputProps,maxLength:7,tabIndex:h},startAdornment:jsx(x,{position:"start",sx:{ml:2},children:jsx(P,{edge:"start","aria-label":"Escolher cor",onClick:e.onOpen,children:jsx(g,{sx:{minWidth:24,minHeight:24,backgroundColor:t,borderRadius:.5}})})})}}),jsx(k,{className:"popover-color-picker",open:!!e.open,anchorEl:e.open,onClose:e.onClose,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"center",horizontal:"center"},slotProps:{paper:{style:{borderRadius:8}}},children:jsx(s,{color:t,onChange:({hex:o})=>i(o),onChangeComplete:({hex:o})=>l(o),styles:{default:{picker:{fontFamily:"inherit",boxShadow:"none"}}},disableAlpha:!0})})]})},N=I;
13
-
14
- export { N as a };