@zydon/common 2.8.1 → 2.8.3

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.
Files changed (33) hide show
  1. package/dist/{chunk-E4HIWMGS.js → chunk-BJ5IDN65.js} +2 -2
  2. package/dist/chunk-KYV74QIT.js +8 -0
  3. package/dist/chunk-KYV74QIT.js.map +1 -0
  4. package/dist/chunk-QSHKTHGM.js +16 -0
  5. package/dist/chunk-QSHKTHGM.js.map +1 -0
  6. package/dist/{chunk-GEEFHX4U.js → chunk-WRGRGZEM.js} +2 -2
  7. package/dist/components/AvatarButton/index.js +3 -3
  8. package/dist/components/ColorPickerInput/index.js +1 -1
  9. package/dist/components/Common/index.js +3 -3
  10. package/dist/components/DynamicDataView/index.js.map +1 -1
  11. package/dist/components/FrameSkeleton/index.js.map +1 -1
  12. package/dist/components/SeoPreview/index.js +2 -2
  13. package/dist/components/SeoPreview/index.js.map +1 -1
  14. package/dist/components/ToggleTheme/index.js +3 -3
  15. package/dist/components/form/ColorPicker/index.js +1 -1
  16. package/dist/contexts/PushNotifications/index.js +2 -2
  17. package/dist/contexts/PushNotifications/index.js.map +1 -1
  18. package/dist/hooks/useIsVisible.d.ts +1 -1
  19. package/dist/hooks/useIsVisible.js +3 -3
  20. package/dist/hooks/useIsVisible.js.map +1 -1
  21. package/dist/hooks/useThemeToggle.js +3 -3
  22. package/dist/index.js +3 -3
  23. package/dist/theme/theme-provider.js +3 -3
  24. package/dist/theme/with-settings/index.js +2 -2
  25. package/dist/utils/color.d.ts +2 -1
  26. package/dist/utils/color.js +1 -1
  27. package/package.json +1 -1
  28. package/dist/chunk-E3TW4QI3.js +0 -16
  29. package/dist/chunk-E3TW4QI3.js.map +0 -1
  30. package/dist/chunk-TWOLB4FN.js +0 -8
  31. package/dist/chunk-TWOLB4FN.js.map +0 -1
  32. /package/dist/{chunk-E4HIWMGS.js.map → chunk-BJ5IDN65.js.map} +0 -0
  33. /package/dist/{chunk-GEEFHX4U.js.map → chunk-WRGRGZEM.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { a } from './chunk-373WGZZL.js';
2
2
  import { a as a$1, e } from './chunk-FTYHXGXC.js';
3
- import { a as a$3, b } from './chunk-GEEFHX4U.js';
3
+ import { a as a$3, b } from './chunk-WRGRGZEM.js';
4
4
  import { p, r, a as a$2 } from './chunk-LRSF3YE6.js';
5
5
  import { a as a$5 } from './chunk-WUFEPE2G.js';
6
6
  import { c, b as b$1 } from './chunk-BX2DSNRV.js';
@@ -15,4 +15,4 @@ var W=t=>({lighter:lighten(t,.815),light:lighten(t,.225),main:t,dark:darken(t,.1
15
15
 
16
16
  export { x as a, te as b };
17
17
  //# sourceMappingURL=out.js.map
18
- //# sourceMappingURL=chunk-E4HIWMGS.js.map
18
+ //# sourceMappingURL=chunk-BJ5IDN65.js.map
@@ -0,0 +1,8 @@
1
+ import { a } from './chunk-HBOBTNB5.js';
2
+ import n from 'color';
3
+
4
+ var e=t=>n(t).luminosity(),l=t=>e(t)>.5?a.grey[800]:"#FFFFFF",m=t=>t?`#${t.replace(/^#+/,"")}`:"#000000";
5
+
6
+ export { e as a, l as b, m as c };
7
+ //# sourceMappingURL=out.js.map
8
+ //# sourceMappingURL=chunk-KYV74QIT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/color.ts"],"names":["Color","getLuminosity","color","getContrastTextColor","colors_default","normalizeHexColor"],"mappings":"wCAAA,OAAOA,MAAW,QAIX,IAAMC,EAAiBC,GAAkBF,EAAME,CAAK,EAAE,WAAW,EAE3DC,EAAwBD,GAChBD,EAAcC,CAAK,EAElB,GAAME,EAAO,KAAK,GAAG,EAAI,UAGlCC,EAAqBH,GAC3BA,EAEE,IADSA,EAAM,QAAQ,MAAO,EAAE,IADpB","sourcesContent":["import Color from 'color';\n\nimport COLORS from 'theme/core/colors.json';\n\nexport const getLuminosity = (color: string) => Color(color).luminosity();\n\nexport const getContrastTextColor = (color: string) => {\n const luminosity = getLuminosity(color);\n\n return luminosity > 0.5 ? COLORS.grey[800] : '#FFFFFF';\n};\n\nexport const normalizeHexColor = (color: string): string => {\n if (!color) return '#000000';\n const cleaned = color.replace(/^#+/, '');\n return `#${cleaned}`;\n};\n"]}
@@ -0,0 +1,16 @@
1
+ import { a } from './chunk-LQRRMVFN.js';
2
+ import { useState } from 'react';
3
+ import C from '@mui/material/Box';
4
+ import g from '@mui/material/IconButton';
5
+ import k from '@mui/material/InputAdornment';
6
+ import x 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 p=styled(ChromePicker)({fontFamily:"inherit",boxShadow:"none"});var I=({value:l,tabIndex:s,onChangeColor:a$1,...t})=>{let[m,c]=useState(),n=m||l,r=n?"#"+n.replaceAll("#",""):"",e=a(),u=()=>{e.onClose(),a$1(r);};return jsxs(Fragment,{children:[jsx(b,{...t,value:r,InputProps:{...t.InputProps,startAdornment:jsx(k,{position:"start",sx:{ml:2},children:jsx(g,{edge:"start","aria-label":"Escolher cor",onClick:e.onOpen,children:jsx(C,{sx:{minWidth:23,minHeight:23,backgroundColor:r,borderRadius:.5,boxShadow:"0 0 0 2px rgba(0, 0, 0, 0.0375)"}})})})},inputProps:{readOnly:!0,...t.inputProps,maxLength:7,tabIndex:s}}),jsx(x,{className:"popover-color-picker",open:!!e.open,anchorEl:e.open,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"center",horizontal:"center"},slotProps:{paper:{style:{borderRadius:8}}},children:jsx(p,{color:r,onChange:({hex:d})=>c(d),styles:{default:{picker:{fontFamily:"inherit",boxShadow:"none"}}},disableAlpha:!0})})]})},L=I;
13
+
14
+ export { L as a };
15
+ //# sourceMappingURL=out.js.map
16
+ //# sourceMappingURL=chunk-QSHKTHGM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ColorPickerInput/index.tsx","../src/components/ColorPickerInput/styles.ts"],"names":["useState","Box","IconButton","InputAdornment","Popover","TextField","ChromePickerOrigin","styled","ChromePicker","Fragment","jsx","jsxs","ColorPickerInput","value","tabIndex","onChangeColor","other","color","setColor","currentColor","hexValue","popover","usePopover_default","handleCloseColorPicker","hex","ColorPickerInput_default"],"mappings":"wCAAA,OAAS,YAAAA,MAAgB,QACzB,OAAOC,MAAS,oBAChB,OAAOC,MAAgB,2BACvB,OAAOC,MAAoB,+BAC3B,OAAOC,MAAa,wBACpB,OAAOC,MAAe,0BCLtB,OAAS,gBAAgBC,MAA0B,cACnD,OAAS,UAAAC,MAAc,uBAEhB,IAAMC,EAAeD,EAAOD,CAAkB,EAAE,CACrD,WAAY,UACZ,UAAW,MACb,CAAC,EDwBG,mBAAAG,EAaY,OAAAC,EAbZ,QAAAC,MAAA,oBAlBJ,IAAMC,EAAmB,CAAC,CACxB,MAAAC,EACA,SAAAC,EACA,cAAAC,EACA,GAAGC,CACL,IAA6B,CAC3B,GAAM,CAACC,EAAOC,CAAQ,EAAIlB,EAAuB,EAC3CmB,EAAeF,GAASJ,EACxBO,EAAWD,EAAe,IAAMA,EAAa,WAAW,IAAK,EAAE,EAAI,GAEnEE,EAAUC,EAAW,EAErBC,EAAyB,IAAM,CACnCF,EAAQ,QAAQ,EAChBN,EAAcK,CAAQ,CACxB,EAEA,OACET,EAAAF,EAAA,CACE,UAAAC,EAACL,EAAA,CACE,GAAGW,EACJ,MAAOI,EACP,WAAY,CACV,GAAGJ,EAAM,WACT,eACEN,EAACP,EAAA,CAAe,SAAS,QAAQ,GAAI,CAAE,GAAI,CAAE,EAC3C,SAAAO,EAACR,EAAA,CACC,KAAK,QACL,aAAW,eACX,QAASmB,EAAQ,OAEjB,SAAAX,EAACT,EAAA,CACC,GAAI,CACF,SAAU,GACV,UAAW,GACX,gBAAiBmB,EACjB,aAAc,GACd,UAAW,iCACb,EACF,EACF,EACF,CAEJ,EACA,WAAY,CACV,SAAU,GACV,GAAGJ,EAAM,WACT,UAAW,EACX,SAAAF,CACF,EACF,EACAJ,EAACN,EAAA,CACC,UAAU,uBACV,KAAM,EAAQiB,EAAQ,KACtB,SAAUA,EAAQ,KAClB,QAASE,EACT,aAAc,CACZ,SAAU,SACV,WAAY,QACd,EACA,gBAAiB,CACf,SAAU,SACV,WAAY,QACd,EACA,UAAW,CACT,MAAO,CACL,MAAO,CAAE,aAAc,CAAE,CAC3B,CACF,EAEA,SAAAb,EAACF,EAAA,CACC,MAAOY,EACP,SAAU,CAAC,CAAE,IAAAI,CAAI,IAAuBN,EAASM,CAAmB,EACpE,OAAQ,CACN,QAAS,CACP,OAAQ,CACN,WAAY,UACZ,UAAW,MACb,CACF,CACF,EACA,aAAY,GACd,EACF,GACF,CAEJ,EAEOC,EAAQb","sourcesContent":["import { useState } from 'react';\nimport Box from '@mui/material/Box';\nimport IconButton from '@mui/material/IconButton';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport Popover from '@mui/material/Popover';\nimport TextField from '@mui/material/TextField';\n\nimport usePopover from 'hooks/usePopover';\n\nimport { ColorPickerInputProps } from './props';\nimport { ChromePicker } from './styles';\n\nconst ColorPickerInput = ({\n value,\n tabIndex,\n onChangeColor,\n ...other\n}: ColorPickerInputProps) => {\n const [color, setColor] = useState<`#${string}`>();\n const currentColor = color || value;\n const hexValue = currentColor ? '#' + currentColor.replaceAll('#', '') : '';\n\n const popover = usePopover();\n\n const handleCloseColorPicker = () => {\n popover.onClose();\n onChangeColor(hexValue);\n };\n\n return (\n <>\n <TextField\n {...other}\n value={hexValue}\n InputProps={{\n ...other.InputProps,\n startAdornment: (\n <InputAdornment position=\"start\" sx={{ ml: 2 }}>\n <IconButton\n edge=\"start\"\n aria-label=\"Escolher cor\"\n onClick={popover.onOpen}\n >\n <Box\n sx={{\n minWidth: 23,\n minHeight: 23,\n backgroundColor: hexValue,\n borderRadius: 0.5,\n boxShadow: '0 0 0 2px rgba(0, 0, 0, 0.0375)',\n }}\n />\n </IconButton>\n </InputAdornment>\n ),\n }}\n inputProps={{\n readOnly: true,\n ...other.inputProps,\n maxLength: 7,\n tabIndex,\n }}\n />\n <Popover\n className=\"popover-color-picker\"\n open={Boolean(popover.open)}\n anchorEl={popover.open}\n onClose={handleCloseColorPicker}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n transformOrigin={{\n vertical: 'center',\n horizontal: 'center',\n }}\n slotProps={{\n paper: {\n style: { borderRadius: 8 },\n },\n }}\n >\n <ChromePicker\n color={hexValue}\n onChange={({ hex }: { hex: string }) => setColor(hex as `#${string}`)}\n styles={{\n default: {\n picker: {\n fontFamily: 'inherit',\n boxShadow: 'none',\n },\n },\n }}\n disableAlpha\n />\n </Popover>\n </>\n );\n};\n\nexport default ColorPickerInput;\n","import { ChromePicker as ChromePickerOrigin } from 'react-color';\nimport { styled } from '@mui/material/styles';\n\nexport const ChromePicker = styled(ChromePickerOrigin)({\n fontFamily: 'inherit',\n boxShadow: 'none',\n});\n"]}
@@ -1,4 +1,4 @@
1
- import { a } from './chunk-TWOLB4FN.js';
1
+ import { a } from './chunk-KYV74QIT.js';
2
2
  import { r, b, a as a$2 } from './chunk-LRSF3YE6.js';
3
3
  import { h as h$1, j } from './chunk-GLRLKFPS.js';
4
4
  import a$1 from 'color';
@@ -7,4 +7,4 @@ function P(t,e){let{colorSchemes:r$1,customShadows:o}=t;return {...t,colorScheme
7
7
 
8
8
  export { P as a, T as b, f as c };
9
9
  //# sourceMappingURL=out.js.map
10
- //# sourceMappingURL=chunk-GEEFHX4U.js.map
10
+ //# sourceMappingURL=chunk-WRGRGZEM.js.map
@@ -6,11 +6,11 @@ import { a as a$3 } from '../../chunk-QVOKZISA.js';
6
6
  import '../../chunk-S7KQI2WJ.js';
7
7
  import { a as a$1 } from '../../chunk-LQRRMVFN.js';
8
8
  import '../../chunk-EDWQYAWG.js';
9
- import '../../chunk-E4HIWMGS.js';
9
+ import '../../chunk-BJ5IDN65.js';
10
10
  import '../../chunk-373WGZZL.js';
11
11
  import '../../chunk-FTYHXGXC.js';
12
- import '../../chunk-GEEFHX4U.js';
13
- import '../../chunk-TWOLB4FN.js';
12
+ import '../../chunk-WRGRGZEM.js';
13
+ import '../../chunk-KYV74QIT.js';
14
14
  import '../../chunk-LRSF3YE6.js';
15
15
  import '../../chunk-HBOBTNB5.js';
16
16
  import '../../chunk-WUFEPE2G.js';
@@ -1,4 +1,4 @@
1
- export { a as default } from '../../chunk-E3TW4QI3.js';
1
+ export { a as default } from '../../chunk-QSHKTHGM.js';
2
2
  import '../../chunk-LQRRMVFN.js';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,10 +1,10 @@
1
1
  import { a } from '../../chunk-QVOKZISA.js';
2
2
  import '../../chunk-S7KQI2WJ.js';
3
- import { b } from '../../chunk-E4HIWMGS.js';
3
+ import { b } from '../../chunk-BJ5IDN65.js';
4
4
  import '../../chunk-373WGZZL.js';
5
5
  import '../../chunk-FTYHXGXC.js';
6
- import '../../chunk-GEEFHX4U.js';
7
- import '../../chunk-TWOLB4FN.js';
6
+ import '../../chunk-WRGRGZEM.js';
7
+ import '../../chunk-KYV74QIT.js';
8
8
  import '../../chunk-LRSF3YE6.js';
9
9
  import '../../chunk-HBOBTNB5.js';
10
10
  import '../../chunk-WUFEPE2G.js';