@zydon/common 2.7.57 → 2.7.59
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.
- package/dist/{chunk-GPWECRTP.js → chunk-5DZ7OMHJ.js} +2 -2
- package/dist/chunk-IAOMC4C4.js +7 -0
- package/dist/chunk-IAOMC4C4.js.map +1 -0
- package/dist/{chunk-GTMH7NKR.js → chunk-SYQE2ZBT.js} +2 -2
- package/dist/{chunk-AQV2PEBQ.js → chunk-X76GAGS5.js} +2 -2
- package/dist/components/CopyButton/index.js +2 -2
- package/dist/components/DynamicDataView/index.js +2 -2
- package/dist/components/form/MultiCheckbox/index.js +1 -1
- package/dist/components/form/MultiCheckbox/index.js.map +1 -1
- package/dist/components/form/UploadAvatarWithCrop/index.js +2 -2
- package/dist/components/form/UploadWithCrop/index.js +2 -2
- package/dist/components/upload/index.js +3 -3
- package/dist/hooks/useSnackbar.d.ts +49 -1
- package/dist/hooks/useSnackbar.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-62UHO7QG.js +0 -7
- package/dist/chunk-62UHO7QG.js.map +0 -1
- /package/dist/{chunk-GPWECRTP.js.map → chunk-5DZ7OMHJ.js.map} +0 -0
- /package/dist/{chunk-GTMH7NKR.js.map → chunk-SYQE2ZBT.js.map} +0 -0
- /package/dist/{chunk-AQV2PEBQ.js.map → chunk-X76GAGS5.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import { a as a$4 } from './chunk-6U5LS7MP.js';
|
|
|
8
8
|
import { a } from './chunk-GC7GAEFE.js';
|
|
9
9
|
import { a as a$2 } from './chunk-SBMEL2IJ.js';
|
|
10
10
|
import { j } from './chunk-VITOOMKK.js';
|
|
11
|
-
import { a as a$3 } from './chunk-
|
|
11
|
+
import { a as a$3 } from './chunk-IAOMC4C4.js';
|
|
12
12
|
import { k, q } from './chunk-GLRLKFPS.js';
|
|
13
13
|
import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
|
|
14
14
|
import { restrictToHorizontalAxis, restrictToParentElement, restrictToWindowEdges } from '@dnd-kit/modifiers';
|
|
@@ -39,4 +39,4 @@ O SingleImageUpload oferece crop integrado, melhor gerenciamento de upload e int
|
|
|
39
39
|
|
|
40
40
|
export { eo as a, Oo as b, wr as c, Ko as d, St as e };
|
|
41
41
|
//# sourceMappingURL=out.js.map
|
|
42
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-5DZ7OMHJ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { toast } from 'sonner';
|
|
2
|
+
|
|
3
|
+
var e=()=>({toast:toast,success:(t,r)=>toast.success(t,r),error:(t,r)=>toast.error(t,r),warning:(t,r)=>toast.warning(t,r),info:(t,r)=>toast.info(t,r)}),d=e;
|
|
4
|
+
|
|
5
|
+
export { d as a };
|
|
6
|
+
//# sourceMappingURL=out.js.map
|
|
7
|
+
//# sourceMappingURL=chunk-IAOMC4C4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useSnackbar.ts"],"names":["toast","useSnackbar","message","data","useSnackbar_default"],"mappings":"AACA,OAAwB,SAAAA,MAAa,SAErC,IAAMC,EAAc,KAaX,CAAE,MAAAD,EAAO,QAZA,CAACE,EAA6BC,IAC5CH,EAAM,QAAQE,EAASC,CAAI,EAWJ,MATX,CAACD,EAA6BC,IAC1CH,EAAM,MAAME,EAASC,CAAI,EAQK,QANhB,CAACD,EAA6BC,IAC5CH,EAAM,QAAQE,EAASC,CAAI,EAKY,KAH5B,CAACD,EAA6BC,IACzCH,EAAM,KAAKE,EAASC,CAAI,CAEoB,GAGzCC,EAAQH","sourcesContent":["import { ReactNode } from 'react';\nimport { ExternalToast, toast } from 'sonner';\n\nconst useSnackbar = () => {\n const success = (message: string | ReactNode, data?: ExternalToast) =>\n toast.success(message, data);\n\n const error = (message: string | ReactNode, data?: ExternalToast) =>\n toast.error(message, data);\n\n const warning = (message: string | ReactNode, data?: ExternalToast) =>\n toast.warning(message, data);\n\n const info = (message: string | ReactNode, data?: ExternalToast) =>\n toast.info(message, data);\n\n return { toast, success, error, warning, info };\n};\n\nexport default useSnackbar;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as a$2 } from './chunk-45OMMG7D.js';
|
|
2
2
|
import { a as a$3 } from './chunk-GC7GAEFE.js';
|
|
3
|
-
import { a as a$1 } from './chunk-
|
|
3
|
+
import { a as a$1 } from './chunk-IAOMC4C4.js';
|
|
4
4
|
import { a } from './chunk-CFNATBO2.js';
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
import C from '@mui/material/IconButton';
|
|
@@ -10,4 +10,4 @@ var l=({label:t="Copiar conte\xFAdo",message:c="Conte\xFAdo copiado!",toCopy:m})
|
|
|
10
10
|
|
|
11
11
|
export { I as a };
|
|
12
12
|
//# sourceMappingURL=out.js.map
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-SYQE2ZBT.js.map
|
|
@@ -3,7 +3,7 @@ import { a as a$3 } from './chunk-QN4YPUG7.js';
|
|
|
3
3
|
import { e } from './chunk-OF6623HG.js';
|
|
4
4
|
import { a } from './chunk-GC7GAEFE.js';
|
|
5
5
|
import { a as a$1 } from './chunk-SBMEL2IJ.js';
|
|
6
|
-
import { a as a$2 } from './chunk-
|
|
6
|
+
import { a as a$2 } from './chunk-IAOMC4C4.js';
|
|
7
7
|
import { k } from './chunk-GLRLKFPS.js';
|
|
8
8
|
import { useState, useEffect } from 'react';
|
|
9
9
|
import { useDropzone } from 'react-dropzone';
|
|
@@ -20,4 +20,4 @@ O novo UploadAvatar oferece melhor gerenciamento de upload e integra\xE7\xE3o co
|
|
|
20
20
|
|
|
21
21
|
export { B as a, uo as b };
|
|
22
22
|
//# sourceMappingURL=out.js.map
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-X76GAGS5.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-SYQE2ZBT.js';
|
|
2
2
|
import '../../chunk-45OMMG7D.js';
|
|
3
3
|
import '../../chunk-GC7GAEFE.js';
|
|
4
4
|
import '../../chunk-TC4DDJSR.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-IAOMC4C4.js';
|
|
6
6
|
import '../../chunk-CFNATBO2.js';
|
|
7
7
|
//# sourceMappingURL=out.js.map
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d, c } from '../../chunk-N7IK5EUP.js';
|
|
2
2
|
import { a } from '../../chunk-FK4XGRYF.js';
|
|
3
3
|
import { h as h$1, a as a$3 } from '../../chunk-OF6623HG.js';
|
|
4
|
-
import { a as a$2 } from '../../chunk-
|
|
4
|
+
import { a as a$2 } from '../../chunk-SYQE2ZBT.js';
|
|
5
5
|
import '../../chunk-45OMMG7D.js';
|
|
6
6
|
import { k } from '../../chunk-YBFLHTQK.js';
|
|
7
7
|
import '../../chunk-LOF5K56U.js';
|
|
@@ -18,7 +18,7 @@ import '../../chunk-TC4DDJSR.js';
|
|
|
18
18
|
import '../../chunk-XWUVJ22J.js';
|
|
19
19
|
import '../../chunk-LQRRMVFN.js';
|
|
20
20
|
import '../../chunk-RPO7AI5K.js';
|
|
21
|
-
import '../../chunk-
|
|
21
|
+
import '../../chunk-IAOMC4C4.js';
|
|
22
22
|
import '../../chunk-GLRLKFPS.js';
|
|
23
23
|
import '../../chunk-CFNATBO2.js';
|
|
24
24
|
import { memo, useMemo, useCallback } from 'react';
|
|
@@ -7,7 +7,7 @@ import L from '@mui/material/FormHelperText';
|
|
|
7
7
|
import G from '@mui/material/FormLabel';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
|
-
var H=({row:m,name:n,rules:d,label:i,options:s,spacing:a,helperText:f,required:b,onSelectOption:p,...c})=>{let{control:C}=useFormContext(),F=(o,l)=>o.includes(l)?o.filter(r=>r!==l):[...o,l];return jsx(Controller,{name:n,control:C,rules:d,render:({field:{value:o=[],...l},fieldState:{error:r}})=>jsxs(h,{component:"fieldset",children:[i&&jsx(G,{component:"legend",sx:{typography:"body2"},required:b,children:i}),jsx(M,{sx:{...m&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:a||0},...m&&{mr:0,"&:not(:last-of-type)":{mr:a||2}}}},children:s.map(e=>jsx(k,{control:jsx(y,{checked:o.includes(e.value),onChange:()=>{let u=F(o,e.value);p&&p(u,o)
|
|
10
|
+
var H=({row:m,name:n,rules:d,label:i,options:s,spacing:a,helperText:f,required:b,onSelectOption:p,...c})=>{let{control:C}=useFormContext(),F=(o,l)=>o.includes(l)?o.filter(r=>r!==l):[...o,l];return jsx(Controller,{name:n,control:C,rules:d,render:({field:{value:o=[],...l},fieldState:{error:r}})=>jsxs(h,{component:"fieldset",children:[i&&jsx(G,{component:"legend",sx:{typography:"body2"},required:b,children:i}),jsx(M,{sx:{...m&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:a||0},...m&&{mr:0,"&:not(:last-of-type)":{mr:a||2}}}},children:s.map(e=>jsx(k,{control:jsx(y,{checked:o.includes(e.value),onChange:()=>{let u=F(o,e.value);l.onChange(u),p&&p(u,o);}}),label:e.label,"data-intercom-target":n,...c},e.value))}),(!!r||f)&&jsx(L,{error:!!r,sx:e=>({color:c.disabled?e.palette.grey[500]:void 0}),children:r?r?.message:f})]})})},z=H;
|
|
11
11
|
|
|
12
12
|
export { z as default };
|
|
13
13
|
//# sourceMappingURL=out.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/form/MultiCheckbox/index.tsx"],"names":["Controller","useFormContext","MuiCheckbox","FormControl","FormControlLabel","FormGroup","FormHelperText","FormLabel","jsx","jsxs","MultiCheckbox","row","name","rules","label","options","spacing","helperText","required","onSelectOption","other","control","getSelected","selectedItems","item","value","field","error","option","newValue","theme","MultiCheckbox_default"],"mappings":"AAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAC3C,OAAOC,MAAiB,yBACxB,OAAOC,MAAiB,4BACxB,OAAOC,MAAsB,iCAC7B,OAAOC,MAAe,0BACtB,OAAOC,MAAoB,+BAC3B,OAAOC,MAAe,0BA6Bd,OAEI,OAAAC,EAFJ,QAAAC,MAAA,oBAzBR,IAAMC,EAAgB,CAAC,CACrB,IAAAC,EACA,KAAAC,EACA,MAAAC,EACA,MAAAC,EACA,QAAAC,EACA,QAAAC,EACA,WAAAC,EACA,SAAAC,EACA,eAAAC,EACA,GAAGC,CACL,IAA0B,CACxB,GAAM,CAAE,QAAAC,CAAQ,EAAIpB,EAAe,EAE7BqB,EAAc,CAACC,EAAyBC,IAC5CD,EAAc,SAASC,CAAI,EACvBD,EAAc,OAAOE,GAASA,IAAUD,CAAI,EAC5C,CAAC,GAAGD,EAAeC,CAAI,EAE7B,OACEhB,EAACR,EAAA,CACC,KAAMY,EACN,QAASS,EACT,MAAOR,EACP,OAAQ,CAAC,CAAE,MAAO,CAAE,MAAAY,EAAQ,CAAC,EAAG,GAAGC,CAAM,EAAG,WAAY,CAAE,MAAAC,CAAM,CAAE,IAChElB,EAACN,EAAA,CAAY,UAAU,WACpB,UAAAW,GACCN,EAACD,EAAA,CACC,UAAU,SACV,GAAI,CAAE,WAAY,OAAQ,EAC1B,SAAUW,EAET,SAAAJ,EACH,EAGFN,EAACH,EAAA,CACC,GAAI,CACF,GAAIM,GAAO,CACT,cAAe,KACjB,EACA,8BAA+B,CAC7B,uBAAwB,CACtB,GAAIK,GAAW,CACjB,EACA,GAAIL,GAAO,CACT,GAAI,EACJ,uBAAwB,CACtB,GAAIK,GAAW,CACjB,CACF,CACF,CACF,EAEC,SAAAD,EAAQ,IAAIa,GACXpB,EAACJ,EAAA,CAEC,QACEI,EAACN,EAAA,CACC,QAASuB,EAAM,SAASG,EAAO,KAAK,EACpC,SAAU,IAAM,CACd,IAAMC,EAAWP,EAAYG,EAAOG,EAAO,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/form/MultiCheckbox/index.tsx"],"names":["Controller","useFormContext","MuiCheckbox","FormControl","FormControlLabel","FormGroup","FormHelperText","FormLabel","jsx","jsxs","MultiCheckbox","row","name","rules","label","options","spacing","helperText","required","onSelectOption","other","control","getSelected","selectedItems","item","value","field","error","option","newValue","theme","MultiCheckbox_default"],"mappings":"AAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAC3C,OAAOC,MAAiB,yBACxB,OAAOC,MAAiB,4BACxB,OAAOC,MAAsB,iCAC7B,OAAOC,MAAe,0BACtB,OAAOC,MAAoB,+BAC3B,OAAOC,MAAe,0BA6Bd,OAEI,OAAAC,EAFJ,QAAAC,MAAA,oBAzBR,IAAMC,EAAgB,CAAC,CACrB,IAAAC,EACA,KAAAC,EACA,MAAAC,EACA,MAAAC,EACA,QAAAC,EACA,QAAAC,EACA,WAAAC,EACA,SAAAC,EACA,eAAAC,EACA,GAAGC,CACL,IAA0B,CACxB,GAAM,CAAE,QAAAC,CAAQ,EAAIpB,EAAe,EAE7BqB,EAAc,CAACC,EAAyBC,IAC5CD,EAAc,SAASC,CAAI,EACvBD,EAAc,OAAOE,GAASA,IAAUD,CAAI,EAC5C,CAAC,GAAGD,EAAeC,CAAI,EAE7B,OACEhB,EAACR,EAAA,CACC,KAAMY,EACN,QAASS,EACT,MAAOR,EACP,OAAQ,CAAC,CAAE,MAAO,CAAE,MAAAY,EAAQ,CAAC,EAAG,GAAGC,CAAM,EAAG,WAAY,CAAE,MAAAC,CAAM,CAAE,IAChElB,EAACN,EAAA,CAAY,UAAU,WACpB,UAAAW,GACCN,EAACD,EAAA,CACC,UAAU,SACV,GAAI,CAAE,WAAY,OAAQ,EAC1B,SAAUW,EAET,SAAAJ,EACH,EAGFN,EAACH,EAAA,CACC,GAAI,CACF,GAAIM,GAAO,CACT,cAAe,KACjB,EACA,8BAA+B,CAC7B,uBAAwB,CACtB,GAAIK,GAAW,CACjB,EACA,GAAIL,GAAO,CACT,GAAI,EACJ,uBAAwB,CACtB,GAAIK,GAAW,CACjB,CACF,CACF,CACF,EAEC,SAAAD,EAAQ,IAAIa,GACXpB,EAACJ,EAAA,CAEC,QACEI,EAACN,EAAA,CACC,QAASuB,EAAM,SAASG,EAAO,KAAK,EACpC,SAAU,IAAM,CACd,IAAMC,EAAWP,EAAYG,EAAOG,EAAO,KAAK,EAChDF,EAAM,SAASG,CAAQ,EACnBV,GAAgBA,EAAeU,EAAUJ,CAAK,CACpD,EACF,EAEF,MAAOG,EAAO,MACd,uBAAsBhB,EACrB,GAAGQ,GAbCQ,EAAO,KAcd,CACD,EACH,GAEE,CAAC,CAACD,GAASV,IACXT,EAACF,EAAA,CACC,MAAO,CAAC,CAACqB,EACT,GAAIG,IAAU,CACZ,MAAOV,EAAM,SAAWU,EAAM,QAAQ,KAAK,GAAG,EAAI,MACpD,GAEC,SAAAH,EAAQA,GAAO,QAAUV,EAC5B,GAEJ,EAEJ,CAEJ,EAEOc,EAAQrB","sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\nimport MuiCheckbox from '@mui/material/Checkbox';\nimport FormControl from '@mui/material/FormControl';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport FormGroup from '@mui/material/FormGroup';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormLabel from '@mui/material/FormLabel';\n\nimport { MultiCheckboxProps } from 'types/multiCheckboxProps';\n\nconst MultiCheckbox = ({\n row,\n name,\n rules,\n label,\n options,\n spacing,\n helperText,\n required,\n onSelectOption,\n ...other\n}: MultiCheckboxProps) => {\n const { control } = useFormContext();\n\n const getSelected = (selectedItems: string[], item: string) =>\n selectedItems.includes(item)\n ? selectedItems.filter(value => value !== item)\n : [...selectedItems, item];\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { value = [], ...field }, fieldState: { error } }) => (\n <FormControl component=\"fieldset\">\n {label && (\n <FormLabel\n component=\"legend\"\n sx={{ typography: 'body2' }}\n required={required}\n >\n {label}\n </FormLabel>\n )}\n\n <FormGroup\n sx={{\n ...(row && {\n flexDirection: 'row',\n }),\n '& .MuiFormControlLabel-root': {\n '&:not(:last-of-type)': {\n mb: spacing || 0,\n },\n ...(row && {\n mr: 0,\n '&:not(:last-of-type)': {\n mr: spacing || 2,\n },\n }),\n },\n }}\n >\n {options.map(option => (\n <FormControlLabel\n key={option.value}\n control={\n <MuiCheckbox\n checked={value.includes(option.value)}\n onChange={() => {\n const newValue = getSelected(value, option.value);\n field.onChange(newValue);\n if (onSelectOption) onSelectOption(newValue, value);\n }}\n />\n }\n label={option.label}\n data-intercom-target={name}\n {...other}\n />\n ))}\n </FormGroup>\n\n {(!!error || helperText) && (\n <FormHelperText\n error={!!error}\n sx={theme => ({\n color: other.disabled ? theme.palette.grey[500] : undefined,\n })}\n >\n {error ? error?.message : helperText}\n </FormHelperText>\n )}\n </FormControl>\n )}\n />\n );\n};\n\nexport default MultiCheckbox;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-X76GAGS5.js';
|
|
2
2
|
import '../../../chunk-SA2BESEB.js';
|
|
3
3
|
import '../../../chunk-QN4YPUG7.js';
|
|
4
4
|
import '../../../chunk-TBUIZEOJ.js';
|
|
@@ -9,7 +9,7 @@ import '../../../chunk-TC4DDJSR.js';
|
|
|
9
9
|
import { a } from '../../../chunk-YCEQDXLR.js';
|
|
10
10
|
import '../../../chunk-SBMEL2IJ.js';
|
|
11
11
|
import '../../../chunk-E3R7W7GK.js';
|
|
12
|
-
import '../../../chunk-
|
|
12
|
+
import '../../../chunk-IAOMC4C4.js';
|
|
13
13
|
import '../../../chunk-GLRLKFPS.js';
|
|
14
14
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
15
15
|
import W from '@mui/material/FormHelperText';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e } from '../../../chunk-
|
|
1
|
+
import { e } from '../../../chunk-5DZ7OMHJ.js';
|
|
2
2
|
import '../../../chunk-SA2BESEB.js';
|
|
3
3
|
import '../../../chunk-QN4YPUG7.js';
|
|
4
4
|
import '../../../chunk-DTIGB5NW.js';
|
|
@@ -15,7 +15,7 @@ import '../../../chunk-SBMEL2IJ.js';
|
|
|
15
15
|
import '../../../chunk-E3R7W7GK.js';
|
|
16
16
|
import '../../../chunk-VITOOMKK.js';
|
|
17
17
|
import '../../../chunk-RPO7AI5K.js';
|
|
18
|
-
import '../../../chunk-
|
|
18
|
+
import '../../../chunk-IAOMC4C4.js';
|
|
19
19
|
import '../../../chunk-GLRLKFPS.js';
|
|
20
20
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
21
21
|
import b from '@mui/material/FormHelperText';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-
|
|
2
|
-
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-
|
|
1
|
+
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-X76GAGS5.js';
|
|
2
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-5DZ7OMHJ.js';
|
|
3
3
|
import { o } from '../../chunk-SA2BESEB.js';
|
|
4
4
|
export { p as RejectionFiles } from '../../chunk-SA2BESEB.js';
|
|
5
5
|
import '../../chunk-QN4YPUG7.js';
|
|
@@ -16,7 +16,7 @@ import '../../chunk-SBMEL2IJ.js';
|
|
|
16
16
|
import '../../chunk-E3R7W7GK.js';
|
|
17
17
|
import '../../chunk-VITOOMKK.js';
|
|
18
18
|
import '../../chunk-RPO7AI5K.js';
|
|
19
|
-
import '../../chunk-
|
|
19
|
+
import '../../chunk-IAOMC4C4.js';
|
|
20
20
|
import '../../chunk-GLRLKFPS.js';
|
|
21
21
|
import { useDropzone } from 'react-dropzone';
|
|
22
22
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -1,7 +1,55 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as sonner from 'sonner';
|
|
2
2
|
import { ExternalToast } from 'sonner';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
3
5
|
|
|
4
6
|
declare const useSnackbar: () => {
|
|
7
|
+
toast: ((message: ReactNode | (() => ReactNode), data?: ExternalToast | undefined) => string | number) & {
|
|
8
|
+
success: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
9
|
+
info: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
10
|
+
warning: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
11
|
+
error: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
12
|
+
custom: (jsx: (id: string | number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, data?: ExternalToast | undefined) => string | number;
|
|
13
|
+
message: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
14
|
+
promise: <ToastData>(promise: Promise<ToastData> | (() => Promise<ToastData>), data?: ({
|
|
15
|
+
className?: string | undefined;
|
|
16
|
+
style?: react.CSSProperties | undefined;
|
|
17
|
+
position?: ("top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right") | undefined;
|
|
18
|
+
id?: string | number | undefined;
|
|
19
|
+
action?: ReactNode | sonner.Action;
|
|
20
|
+
invert?: boolean | undefined;
|
|
21
|
+
icon?: ReactNode;
|
|
22
|
+
duration?: number | undefined;
|
|
23
|
+
onDismiss?: ((toast: sonner.ToastT) => void) | undefined;
|
|
24
|
+
cancel?: ReactNode | sonner.Action;
|
|
25
|
+
richColors?: boolean | undefined;
|
|
26
|
+
closeButton?: boolean | undefined;
|
|
27
|
+
dismissible?: boolean | undefined;
|
|
28
|
+
onAutoClose?: ((toast: sonner.ToastT) => void) | undefined;
|
|
29
|
+
cancelButtonStyle?: react.CSSProperties | undefined;
|
|
30
|
+
actionButtonStyle?: react.CSSProperties | undefined;
|
|
31
|
+
unstyled?: boolean | undefined;
|
|
32
|
+
classNames?: sonner.ToastClassnames | undefined;
|
|
33
|
+
descriptionClassName?: string | undefined;
|
|
34
|
+
} & {
|
|
35
|
+
loading?: ReactNode;
|
|
36
|
+
success?: ReactNode | ((data: ToastData) => ReactNode | Promise<ReactNode>);
|
|
37
|
+
error?: ReactNode | ((data: any) => ReactNode | Promise<ReactNode>);
|
|
38
|
+
description?: ReactNode | ((data: any) => ReactNode | Promise<ReactNode>);
|
|
39
|
+
finally?: (() => void | Promise<void>) | undefined;
|
|
40
|
+
}) | undefined) => (string & {
|
|
41
|
+
unwrap: () => Promise<ToastData>;
|
|
42
|
+
}) | (number & {
|
|
43
|
+
unwrap: () => Promise<ToastData>;
|
|
44
|
+
}) | {
|
|
45
|
+
unwrap: () => Promise<ToastData>;
|
|
46
|
+
};
|
|
47
|
+
dismiss: (id?: string | number | undefined) => string | number;
|
|
48
|
+
loading: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
49
|
+
} & {
|
|
50
|
+
getHistory: () => (sonner.ToastT | sonner.ToastToDismiss)[];
|
|
51
|
+
getToasts: () => (sonner.ToastT | sonner.ToastToDismiss)[];
|
|
52
|
+
};
|
|
5
53
|
success: (message: string | ReactNode, data?: ExternalToast) => string | number;
|
|
6
54
|
error: (message: string | ReactNode, data?: ExternalToast) => string | number;
|
|
7
55
|
warning: (message: string | ReactNode, data?: ExternalToast) => string | number;
|
package/package.json
CHANGED
package/dist/chunk-62UHO7QG.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { toast } from 'sonner';
|
|
2
|
-
|
|
3
|
-
var e=()=>({success:(t,r)=>toast.success(t,r),error:(t,r)=>toast.error(t,r),warning:(t,r)=>toast.warning(t,r),info:(t,r)=>toast.info(t,r)}),d=e;
|
|
4
|
-
|
|
5
|
-
export { d as a };
|
|
6
|
-
//# sourceMappingURL=out.js.map
|
|
7
|
-
//# sourceMappingURL=chunk-62UHO7QG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useSnackbar.ts"],"names":["toast","useSnackbar","message","data","useSnackbar_default"],"mappings":"AACA,OAAwB,SAAAA,MAAa,SAErC,IAAMC,EAAc,KAaX,CAAE,QAZO,CAACC,EAA6BC,IAC5CH,EAAM,QAAQE,EAASC,CAAI,EAWX,MATJ,CAACD,EAA6BC,IAC1CH,EAAM,MAAME,EAASC,CAAI,EAQF,QANT,CAACD,EAA6BC,IAC5CH,EAAM,QAAQE,EAASC,CAAI,EAKK,KAHrB,CAACD,EAA6BC,IACzCH,EAAM,KAAKE,EAASC,CAAI,CAEa,GAGlCC,EAAQH","sourcesContent":["import { ReactNode } from 'react';\nimport { ExternalToast, toast } from 'sonner';\n\nconst useSnackbar = () => {\n const success = (message: string | ReactNode, data?: ExternalToast) =>\n toast.success(message, data);\n\n const error = (message: string | ReactNode, data?: ExternalToast) =>\n toast.error(message, data);\n\n const warning = (message: string | ReactNode, data?: ExternalToast) =>\n toast.warning(message, data);\n\n const info = (message: string | ReactNode, data?: ExternalToast) =>\n toast.info(message, data);\n\n return { success, error, warning, info };\n};\n\nexport default useSnackbar;\n"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|