@zydon/common 2.3.38 → 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-
|
|
1
|
+
export { a as default } from '../../chunk-HZJAUQ3O.js';
|
|
2
2
|
import '../../chunk-ORYAES3Q.js';
|
package/package.json
CHANGED
package/dist/chunk-VDXAKLFE.js
DELETED
|
@@ -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 };
|