@zydon/common 2.3.38 → 2.3.39

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 } 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 };
@@ -1,2 +1,2 @@
1
- export { a as default } from '../../chunk-VDXAKLFE.js';
1
+ export { a as default } from '../../chunk-B3MVLFON.js';
2
2
  import '../../chunk-ORYAES3Q.js';
@@ -1,4 +1,4 @@
1
- import { a } from '../../../chunk-VDXAKLFE.js';
1
+ import { a } from '../../../chunk-B3MVLFON.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.38",
3
+ "version": "2.3.39",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,13 +0,0 @@
1
- import { a as a$1 } from './chunk-ORYAES3Q.js';
2
- import d from '@mui/material/Box';
3
- import u from '@mui/material/IconButton';
4
- import f from '@mui/material/InputAdornment';
5
- import P from '@mui/material/Popover';
6
- import x from '@mui/material/TextField';
7
- import { ChromePicker } from 'react-color';
8
- import { styled } from '@mui/material/styles';
9
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
10
-
11
- var a=styled(ChromePicker)({fontFamily:"inherit",boxShadow:"none"});var g=({value:n,onChangeColor:i,tabIndex:m,...p})=>{let t=n?"#"+n.replaceAll("#",""):"",e=a$1(),s=(o="")=>{(/^#[0-9a-fA-F]*$/.test(o)||o===""||o==="#")&&i("#"+o.replaceAll("#",""));};return jsxs(Fragment,{children:[jsx(x,{...p,value:t,onChange:o=>s(o.target.value),InputProps:{inputProps:{...p.inputProps,maxLength:7,tabIndex:m},startAdornment:jsx(f,{position:"start",sx:{ml:2},children:jsx(u,{edge:"start","aria-label":"Escolher cor",onClick:e.onOpen,children:jsx(d,{sx:{minWidth:24,minHeight:24,backgroundColor:t,borderRadius:.5}})})})}}),jsx(P,{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:t,onChange:({hex:o})=>i(o),styles:{default:{picker:{fontFamily:"inherit",boxShadow:"none"}}},disableAlpha:!0})})]})},E=g;
12
-
13
- export { E as a };