@zydon/common 2.9.20 → 2.9.22
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-5KEVIB7P.js +7 -0
- package/dist/chunk-5KEVIB7P.js.map +1 -0
- package/dist/{chunk-XO2DW5UL.js → chunk-6L44C7QM.js} +2 -2
- package/dist/{chunk-Y5W727NP.js → chunk-7IE367Y6.js} +2 -2
- package/dist/{chunk-UJMWTYPH.js → chunk-A7AOWJKX.js} +2 -2
- package/dist/{chunk-WLRSUL67.js → chunk-E5SBGF5G.js} +2 -2
- package/dist/chunk-GTPEQ3CM.js +8 -0
- package/dist/chunk-GTPEQ3CM.js.map +1 -0
- package/dist/chunk-HFDGIEZC.js +7 -0
- package/dist/chunk-HFDGIEZC.js.map +1 -0
- package/dist/{chunk-I3B772WD.js → chunk-HW6M33F3.js} +2 -2
- package/dist/{chunk-TGDOTL22.js → chunk-IF6OSFZ7.js} +2 -2
- package/dist/chunk-J52ETP4H.js +17 -0
- package/dist/chunk-J52ETP4H.js.map +1 -0
- package/dist/{chunk-F7RZH6OK.js → chunk-RU3QT4Q3.js} +2 -2
- package/dist/chunk-SV2GIIMQ.js +6 -0
- package/dist/chunk-SV2GIIMQ.js.map +1 -0
- package/dist/chunk-TXJ45CNA.js +7 -0
- package/dist/chunk-TXJ45CNA.js.map +1 -0
- package/dist/{chunk-HJPMWQB2.js → chunk-ULVPJ2DF.js} +3 -3
- package/dist/{chunk-BVPBGV4Y.js → chunk-ZMXVWURR.js} +2 -2
- package/dist/components/Analytics/OverviewAnalytics/index.js +3 -3
- package/dist/components/Analytics/PartnerAnalysis/index.js +2 -2
- package/dist/components/Analytics/index.js +1 -1
- package/dist/components/AutocompleteDetailed/index.js +2 -2
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/AvatarButton/index.js +2 -2
- package/dist/components/ColorPickerInput/index.d.ts +2 -2
- package/dist/components/ColorPickerInput/index.js +3 -1
- package/dist/components/CopyButton/index.js +2 -2
- package/dist/components/DataView/index.d.ts +1 -1
- package/dist/components/DataView/index.js +2 -2
- package/dist/components/DynamicDataView/index.js +6 -6
- package/dist/components/EasyCropModal/index.js +2 -2
- package/dist/components/FileUpload/index.js +4 -4
- package/dist/components/Filters/index.js +1 -1
- package/dist/components/ResponsivePopover/index.js +2 -2
- package/dist/components/SeoPreview/index.js +2 -2
- package/dist/components/TextMaxLine/index.js +2 -2
- package/dist/components/ToggleTheme/index.js +2 -2
- package/dist/components/animate/index.js +2 -2
- package/dist/components/form/AutocompleteDetailed/index.js +2 -2
- package/dist/components/form/ColorPicker/index.d.ts +1 -1
- package/dist/components/form/ColorPicker/index.js +4 -2
- package/dist/components/form/ColorPicker/index.js.map +1 -1
- package/dist/components/form/FileUpload/index.js +4 -4
- package/dist/components/form/SelectableCards/index.js +2 -2
- package/dist/components/form/SelectableCards/index.js.map +1 -1
- package/dist/hooks/useCopyToClipboard.d.ts +1 -0
- package/dist/hooks/useCopyToClipboard.js +1 -1
- package/dist/hooks/useDatagrid.d.ts +1 -0
- package/dist/hooks/useDatagrid.js +1 -1
- package/dist/hooks/useDynamicAutocomplete.d.ts +1 -0
- package/dist/hooks/useDynamicAutocomplete.js +1 -1
- package/dist/hooks/useDynamicAutocomplete.js.map +1 -1
- package/dist/hooks/useFiltersSearchParams.d.ts +2 -1
- package/dist/hooks/useFiltersSearchParams.js +2 -2
- package/dist/hooks/useFiltersSearchParams.js.map +1 -1
- package/dist/hooks/useInfiniteScroll.d.ts +1 -0
- package/dist/hooks/useInfiniteScroll.js +2 -2
- package/dist/hooks/useInfiniteScroll.js.map +1 -1
- package/dist/hooks/useLocalStorage.d.ts +6 -5
- package/dist/hooks/useLocalStorage.js +1 -1
- package/dist/hooks/useOnClickOutside.d.ts +1 -0
- package/dist/hooks/useOnClickOutside.js +2 -2
- package/dist/hooks/useOnClickOutside.js.map +1 -1
- package/dist/hooks/usePagination.d.ts +1 -0
- package/dist/hooks/usePagination.js +2 -2
- package/dist/hooks/usePagination.js.map +1 -1
- package/dist/hooks/useReconciliation.d.ts +1 -0
- package/dist/hooks/useReconciliation.js +2 -2
- package/dist/hooks/useReconciliation.js.map +1 -1
- package/dist/hooks/useResponsive.d.ts +1 -0
- package/dist/hooks/useResponsive.js +1 -1
- package/dist/hooks/useScrollOffSetTop.d.ts +1 -0
- package/dist/hooks/useScrollOffSetTop.js +1 -1
- package/dist/hooks/useScrollOffSetTop.js.map +1 -1
- package/dist/hooks/useSnackbar.d.ts +1 -1
- package/dist/hooks/useThemeToggle.d.ts +1 -0
- package/dist/hooks/useThemeToggle.js +1 -1
- package/dist/hooks/useUploadImage.d.ts +1 -0
- package/dist/hooks/useUploadImage.js +2 -2
- package/dist/hooks/useUploadImage.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/theme/core/index.d.ts +1 -1
- package/dist/theme/styles/index.d.ts +13 -13
- package/package.json +1 -1
- package/dist/chunk-2HAPOY5M.js +0 -8
- package/dist/chunk-2HAPOY5M.js.map +0 -1
- package/dist/chunk-2ZJUGM2S.js +0 -7
- package/dist/chunk-2ZJUGM2S.js.map +0 -1
- package/dist/chunk-CFNATBO2.js +0 -6
- package/dist/chunk-CFNATBO2.js.map +0 -1
- package/dist/chunk-QSHKTHGM.js +0 -15
- package/dist/chunk-QSHKTHGM.js.map +0 -1
- package/dist/chunk-RMYYQLRJ.js +0 -7
- package/dist/chunk-RMYYQLRJ.js.map +0 -1
- package/dist/chunk-U4I7JPER.js +0 -7
- package/dist/chunk-U4I7JPER.js.map +0 -1
- package/dist/{chunk-XO2DW5UL.js.map → chunk-6L44C7QM.js.map} +0 -0
- package/dist/{chunk-Y5W727NP.js.map → chunk-7IE367Y6.js.map} +0 -0
- package/dist/{chunk-UJMWTYPH.js.map → chunk-A7AOWJKX.js.map} +0 -0
- package/dist/{chunk-WLRSUL67.js.map → chunk-E5SBGF5G.js.map} +0 -0
- package/dist/{chunk-I3B772WD.js.map → chunk-HW6M33F3.js.map} +0 -0
- package/dist/{chunk-TGDOTL22.js.map → chunk-IF6OSFZ7.js.map} +0 -0
- package/dist/{chunk-F7RZH6OK.js.map → chunk-RU3QT4Q3.js.map} +0 -0
- package/dist/{chunk-HJPMWQB2.js.map → chunk-ULVPJ2DF.js.map} +0 -0
- package/dist/{chunk-BVPBGV4Y.js.map → chunk-ZMXVWURR.js.map} +0 -0
- package/dist/{index-5a5e5dc8.d.ts → index-c8f1e6e7.d.ts} +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/usePagination.ts"],"names":["useState","usePagination","items","itemsPerPage","currentPage","setCurrentPage","totalPages","currentItems","page","prevPage","usePagination_default"],"mappings":"AAAA,OAAS,YAAAA,MAAgB,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/usePagination.ts"],"names":["useState","usePagination","items","itemsPerPage","currentPage","setCurrentPage","totalPages","currentItems","page","prevPage","usePagination_default"],"mappings":"AAAA,OAAS,YAAAA,MAAgB,QAOzB,SAASC,EAAiB,CACxB,MAAAC,EACA,aAAAC,CACF,EAAkD,CAChD,GAAM,CAACC,EAAaC,CAAc,EAAIL,EAAS,CAAC,EAE1CM,EAAa,KAAK,KAAKJ,EAAM,OAASC,CAAY,EAElDI,EAAeL,EAAM,OACxBE,EAAc,GAAKD,EACpBC,EAAcD,CAChB,EAoBA,MAAO,CACL,YAAAC,EACA,WAAAE,EACA,aAAAC,EACA,SAtBgBC,GAAiB,CAC7BA,EAAO,GAAKA,GAAQF,GACtBD,EAAeG,CAAI,CAEvB,EAmBE,SAjBe,IAAM,CACjBJ,EAAcE,GAChBD,EAAeI,GAAYA,EAAW,CAAC,CAE3C,EAcE,SAZe,IAAM,CACjBL,EAAc,GAChBC,EAAeI,GAAYA,EAAW,CAAC,CAE3C,CASA,CACF,CAEA,IAAOC,EAAQT","sourcesContent":["import { useState } from 'react';\n\nimport type {\n UsePaginationProps,\n UsePaginationResult,\n} from './usePagination.types';\n\nfunction usePagination<T>({\n items,\n itemsPerPage,\n}: UsePaginationProps<T>): UsePaginationResult<T> {\n const [currentPage, setCurrentPage] = useState(1);\n\n const totalPages = Math.ceil(items.length / itemsPerPage);\n\n const currentItems = items.slice(\n (currentPage - 1) * itemsPerPage,\n currentPage * itemsPerPage,\n );\n\n const goToPage = (page: number) => {\n if (page > 0 && page <= totalPages) {\n setCurrentPage(page);\n }\n };\n\n const nextPage = () => {\n if (currentPage < totalPages) {\n setCurrentPage(prevPage => prevPage + 1);\n }\n };\n\n const prevPage = () => {\n if (currentPage > 1) {\n setCurrentPage(prevPage => prevPage - 1);\n }\n };\n\n return {\n currentPage,\n totalPages,\n currentItems,\n goToPage,\n nextPage,\n prevPage,\n };\n}\n\nexport default usePagination;\n"]}
|
|
@@ -6,6 +6,7 @@ interface UseReconciliationParams {
|
|
|
6
6
|
interface UseReconciliationResult {
|
|
7
7
|
notifyActivity: () => void;
|
|
8
8
|
}
|
|
9
|
+
|
|
9
10
|
declare function useReconciliation({ reconcile, isActive, intervalMs, }: UseReconciliationParams): UseReconciliationResult;
|
|
10
11
|
|
|
11
12
|
export { useReconciliation };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRef, useCallback, useEffect } from 'react';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var a=1e4;function y({reconcile:o,isActive:t,intervalMs:i=a}){let u=useRef(o);u.current=o;let n=useRef(null),e=useCallback(()=>{n.current&&(clearInterval(n.current),n.current=null);},[]),r=useCallback(()=>{e(),n.current=setInterval(()=>{u.current();},i);},[e,i]);return useEffect(()=>{if(!t){e();return}return r(),e},[e,t,r]),{notifyActivity:useCallback(()=>{t&&r();},[t,r])}}
|
|
4
4
|
|
|
5
|
-
export {
|
|
5
|
+
export { y as useReconciliation };
|
|
6
6
|
//# sourceMappingURL=useReconciliation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useReconciliation.ts"],"names":["useCallback","useEffect","useRef","DEFAULT_INTERVAL_MS","useReconciliation","reconcile","isActive","intervalMs","reconcileRef","intervalRef","clear","start"],"mappings":"AAAA,OAAS,eAAAA,EAAa,aAAAC,EAAW,UAAAC,MAAc,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useReconciliation.ts"],"names":["useCallback","useEffect","useRef","DEFAULT_INTERVAL_MS","useReconciliation","reconcile","isActive","intervalMs","reconcileRef","intervalRef","clear","start"],"mappings":"AAAA,OAAS,eAAAA,EAAa,aAAAC,EAAW,UAAAC,MAAc,QAO/C,IAAMC,EAAsB,IAErB,SAASC,EAAkB,CAChC,UAAAC,EACA,SAAAC,EACA,WAAAC,EAAaJ,CACf,EAAqD,CACnD,IAAMK,EAAeN,EAAOG,CAAS,EACrCG,EAAa,QAAUH,EAEvB,IAAMI,EAAcP,EAA8C,IAAI,EAEhEQ,EAAQV,EAAY,IAAM,CAC1BS,EAAY,UACd,cAAcA,EAAY,OAAO,EACjCA,EAAY,QAAU,KAE1B,EAAG,CAAC,CAAC,EAECE,EAAQX,EAAY,IAAM,CAC9BU,EAAM,EAEND,EAAY,QAAU,YAAY,IAAM,CACjCD,EAAa,QAAQ,CAC5B,EAAGD,CAAU,CACf,EAAG,CAACG,EAAOH,CAAU,CAAC,EAEtB,OAAAN,EAAU,IAAM,CACd,GAAI,CAACK,EAAU,CACbI,EAAM,EAEN,OAGF,OAAAC,EAAM,EAECD,CACT,EAAG,CAACA,EAAOJ,EAAUK,CAAK,CAAC,EAQpB,CAAE,eANcX,EAAY,IAAM,CACnCM,GACFK,EAAM,CAEV,EAAG,CAACL,EAAUK,CAAK,CAAC,CAEI,CAC1B","sourcesContent":["import { useCallback, useEffect, useRef } from 'react';\n\nimport type {\n UseReconciliationParams,\n UseReconciliationResult,\n} from './useReconciliation.types';\n\nconst DEFAULT_INTERVAL_MS = 10000;\n\nexport function useReconciliation({\n reconcile,\n isActive,\n intervalMs = DEFAULT_INTERVAL_MS,\n}: UseReconciliationParams): UseReconciliationResult {\n const reconcileRef = useRef(reconcile);\n reconcileRef.current = reconcile;\n\n const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null);\n\n const clear = useCallback(() => {\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n\n const start = useCallback(() => {\n clear();\n\n intervalRef.current = setInterval(() => {\n void reconcileRef.current();\n }, intervalMs);\n }, [clear, intervalMs]);\n\n useEffect(() => {\n if (!isActive) {\n clear();\n\n return undefined;\n }\n\n start();\n\n return clear;\n }, [clear, isActive, start]);\n\n const notifyActivity = useCallback(() => {\n if (isActive) {\n start();\n }\n }, [isActive, start]);\n\n return { notifyActivity };\n}\n"]}
|
|
@@ -3,6 +3,7 @@ import { Breakpoint } from '@mui/material/styles';
|
|
|
3
3
|
type ReturnType = boolean;
|
|
4
4
|
type Query = 'up' | 'down' | 'between' | 'only';
|
|
5
5
|
type Value = Breakpoint | number;
|
|
6
|
+
|
|
6
7
|
declare const useResponsive: (query: Query, start?: Value, end?: Value) => ReturnType;
|
|
7
8
|
declare function useWidth(): "xs" | "sm" | "md" | "lg" | "xl";
|
|
8
9
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { b as default, a as useWidth } from '../chunk-
|
|
1
|
+
export { b as default, a as useWidth } from '../chunk-TXJ45CNA.js';
|
|
2
2
|
//# sourceMappingURL=useResponsive.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRef, useState, useCallback, useMemo } from 'react';
|
|
2
2
|
import { useScroll, useMotionValueEvent } from 'framer-motion';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var d=(t=0)=>{let e=useRef(null),{scrollY:s}=useScroll(),[o,l]=useState(!1),r=useCallback(c=>{let f=Math.round(c);if(e?.current){let u=e.current.getBoundingClientRect(),p=Math.round(u.top);l(p<t);}else l(f>t);},[e,t]);return useMotionValueEvent(s,"change",useMemo(()=>r,[r])),useMemo(()=>({elementRef:e,offsetTop:o}),[o])},g=d;
|
|
5
5
|
|
|
6
6
|
export { g as default };
|
|
7
7
|
//# sourceMappingURL=useScrollOffSetTop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useScrollOffSetTop.ts"],"names":["useCallback","useMemo","useRef","useState","useMotionValueEvent","useScroll","useScrollOffSetTop","top","elementRef","scrollY","offsetTop","setOffsetTop","handleScrollChange","val","scrollHeight","rect","elementTop","useScrollOffSetTop_default"],"mappings":"AAAA,OAAS,eAAAA,EAAa,WAAAC,EAAS,UAAAC,EAAQ,YAAAC,MAAgB,QACvD,OAAS,uBAAAC,EAAqB,aAAAC,MAAiB,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useScrollOffSetTop.ts"],"names":["useCallback","useMemo","useRef","useState","useMotionValueEvent","useScroll","useScrollOffSetTop","top","elementRef","scrollY","offsetTop","setOffsetTop","handleScrollChange","val","scrollHeight","rect","elementTop","useScrollOffSetTop_default"],"mappings":"AAAA,OAAS,eAAAA,EAAa,WAAAC,EAAS,UAAAC,EAAQ,YAAAC,MAAgB,QACvD,OAAS,uBAAAC,EAAqB,aAAAC,MAAiB,gBAQ/C,IAAMC,EAAqB,CAACC,EAAM,IAAgC,CAChE,IAAMC,EAAaN,EAAuB,IAAI,EAExC,CAAE,QAAAO,CAAQ,EAAIJ,EAAU,EAExB,CAACK,EAAWC,CAAY,EAAIR,EAAS,EAAK,EAE1CS,EAAqBZ,EACxBa,GAAgB,CACf,IAAMC,EAAe,KAAK,MAAMD,CAAG,EAEnC,GAAIL,GAAY,QAAS,CACvB,IAAMO,EAAOP,EAAW,QAAQ,sBAAsB,EAChDQ,EAAa,KAAK,MAAMD,EAAK,GAAG,EAEtCJ,EAAaK,EAAaT,CAAG,OAE7BI,EAAaG,EAAeP,CAAG,CAEnC,EACA,CAACC,EAAYD,CAAG,CAClB,EAEA,OAAAH,EACEK,EACA,SACAR,EAAQ,IAAMW,EAAoB,CAACA,CAAkB,CAAC,CACxD,EAEsBX,EAAQ,KAAO,CAAE,WAAAO,EAAY,UAAAE,CAAU,GAAI,CAACA,CAAS,CAAC,CAG9E,EAEOO,EAAQX","sourcesContent":["import { useCallback, useMemo, useRef, useState } from 'react';\nimport { useMotionValueEvent, useScroll } from 'framer-motion';\n\nimport type { UseScrollOffSetTopReturn } from './useScrollOffSetTop.types';\n\n// ----------------------------------------------------------------------\n\nexport type { UseScrollOffSetTopReturn } from './useScrollOffSetTop.types';\n\nconst useScrollOffSetTop = (top = 0): UseScrollOffSetTopReturn => {\n const elementRef = useRef<HTMLDivElement>(null);\n\n const { scrollY } = useScroll();\n\n const [offsetTop, setOffsetTop] = useState(false);\n\n const handleScrollChange = useCallback(\n (val: number) => {\n const scrollHeight = Math.round(val);\n\n if (elementRef?.current) {\n const rect = elementRef.current.getBoundingClientRect();\n const elementTop = Math.round(rect.top);\n\n setOffsetTop(elementTop < top);\n } else {\n setOffsetTop(scrollHeight > top);\n }\n },\n [elementRef, top],\n );\n\n useMotionValueEvent(\n scrollY,\n 'change',\n useMemo(() => handleScrollChange, [handleScrollChange]),\n );\n\n const memoizedValue = useMemo(() => ({ elementRef, offsetTop }), [offsetTop]);\n\n return memoizedValue;\n};\n\nexport default useScrollOffSetTop;\n"]}
|
|
@@ -12,6 +12,7 @@ declare const useSnackbar: () => {
|
|
|
12
12
|
custom: (jsx: (id: string | number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, data?: ExternalToast | undefined) => string | number;
|
|
13
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
14
|
promise: <ToastData>(promise: Promise<ToastData> | (() => Promise<ToastData>), data?: ({
|
|
15
|
+
cancel?: ReactNode | sonner.Action;
|
|
15
16
|
className?: string | undefined;
|
|
16
17
|
style?: react.CSSProperties | undefined;
|
|
17
18
|
position?: ("top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right") | undefined;
|
|
@@ -20,7 +21,6 @@ declare const useSnackbar: () => {
|
|
|
20
21
|
icon?: ReactNode;
|
|
21
22
|
duration?: number | undefined;
|
|
22
23
|
onDismiss?: ((toast: sonner.ToastT) => void) | undefined;
|
|
23
|
-
cancel?: ReactNode | sonner.Action;
|
|
24
24
|
richColors?: boolean | undefined;
|
|
25
25
|
invert?: boolean | undefined;
|
|
26
26
|
closeButton?: boolean | undefined;
|
|
@@ -2,7 +2,7 @@ import { a } from '../chunk-E3R7W7GK.js';
|
|
|
2
2
|
import { useId, useState } from 'react';
|
|
3
3
|
import I from 'browser-image-compression';
|
|
4
4
|
|
|
5
|
-
var h=5242880,
|
|
5
|
+
var h=5242880,y=({onFileCropped:n,onImageUploaded:c,onCancel:a$1})=>{let l=useId(),[e,f]=useState(),[d,o,s]=a(),[u,i]=useState(),[v,p]=useState(!1);return {id:l,setCropModalOpen:s,handleRemove:()=>{n(void 0),c(void 0),s(!1);},toggleCropModalOpen:o,cropModalOpen:d,cancelChanges:()=>{a$1&&a$1(),s(!1);},saveChanges:()=>{e!==void 0&&e.getCroppedCanvas().toBlob(async g=>{try{if(!g)return;p(!0);let r=new File([g],"imagem.png",{type:"image/png"});if(r.size>h){let C=await I(r,{maxSizeMB:5});n(C),o();return}n(r),o();}finally{p(!1);}},"image/png",1);},previewImage:()=>{e!==void 0&&i(e.getCroppedCanvas().toDataURL());},setCropper:f,preview:u,closePreviewImage:()=>i(void 0),saving:v}},z=y;
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { z as default };
|
|
8
8
|
//# sourceMappingURL=useUploadImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useUploadImage.ts"],"names":["useId","useState","imageCompression","FIVE_MB","useUploadImage","onFileCropped","onImageUploaded","onCancel","id","cropper","setCropper","cropModalOpen","toggleCropModalOpen","setCropModalOpen","useToggle_default","preview","setPreview","saving","setSaving","blob","file","compressedFile","useUploadImage_default"],"mappings":"yCAAA,OAAS,SAAAA,EAAO,YAAAC,MAAgB,QAChC,OAAOC,MAAsB,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useUploadImage.ts"],"names":["useId","useState","imageCompression","FIVE_MB","useUploadImage","onFileCropped","onImageUploaded","onCancel","id","cropper","setCropper","cropModalOpen","toggleCropModalOpen","setCropModalOpen","useToggle_default","preview","setPreview","saving","setSaving","blob","file","compressedFile","useUploadImage_default"],"mappings":"yCAAA,OAAS,SAAAA,EAAO,YAAAC,MAAgB,QAChC,OAAOC,MAAsB,4BAM7B,IAAMC,EAAU,QAEVC,EAAiB,CAAC,CACtB,cAAAC,EACA,gBAAAC,EACA,SAAAC,CACF,IAAa,CACX,IAAMC,EAAKR,EAAM,EACX,CAACS,EAASC,CAAU,EAAIT,EAAkB,EAC1C,CAACU,EAAeC,EAAqBC,CAAgB,EAAIC,EAAU,EACnE,CAACC,EAASC,CAAU,EAAIf,EAAiB,EACzC,CAACgB,EAAQC,CAAS,EAAIjB,EAAS,EAAK,EAuD1C,MAAO,CACL,GAAAO,EACA,iBAAAK,EACA,aATmB,IAAM,CACzBR,EAAc,MAAS,EACvBC,EAAgB,MAAS,EACzBO,EAAiB,EAAK,CACxB,EAME,oBAAAD,EACA,cAAAD,EACA,cA3DoB,IAAM,CACtBJ,GAAUA,EAAS,EACvBM,EAAiB,EAAK,CACxB,EAyDE,YA/CkB,IAAM,CACpBJ,IAAY,QAEhBA,EAAQ,iBAAiB,EAAE,OACzB,MAAOU,GAAsB,CAC3B,GAAI,CACF,GAAI,CAACA,EAAM,OAEXD,EAAU,EAAI,EAEd,IAAME,EAAO,IAAI,KAAK,CAACD,CAAI,EAAG,aAAc,CAAE,KAAM,WAAY,CAAC,EAEjE,GAAIC,EAAK,KAAOjB,EAAS,CACvB,IAAMkB,EAAiB,MAAMnB,EAAiBkB,EAAM,CAClD,UAAW,CACb,CAAC,EAEDf,EAAcgB,CAAc,EAC5BT,EAAoB,EAEpB,OAGFP,EAAce,CAAI,EAClBR,EAAoB,CACtB,QAAE,CACAM,EAAU,EAAK,CACjB,CACF,EACA,YACA,CACF,CACF,EAgBE,aAxDmB,IAAM,CACrBT,IAAY,QAEhBO,EAAWP,EAAQ,iBAAiB,EAAE,UAAU,CAAC,CACnD,EAqDE,WAAAC,EACA,QAAAK,EACA,kBArDwB,IAAMC,EAAW,MAAS,EAsDlD,OAAAC,CACF,CACF,EAEOK,EAAQlB","sourcesContent":["import { useId, useState } from 'react';\nimport imageCompression from 'browser-image-compression';\nimport Cropper from 'cropperjs';\n\nimport useToggle from './useToggle';\nimport type { Props } from './useUploadImage.types';\n\nconst FIVE_MB = 5242880;\n\nconst useUploadImage = ({\n onFileCropped,\n onImageUploaded,\n onCancel,\n}: Props) => {\n const id = useId();\n const [cropper, setCropper] = useState<Cropper>();\n const [cropModalOpen, toggleCropModalOpen, setCropModalOpen] = useToggle();\n const [preview, setPreview] = useState<string>();\n const [saving, setSaving] = useState(false);\n\n const cancelChanges = () => {\n if (onCancel) onCancel();\n setCropModalOpen(false);\n };\n\n const previewImage = () => {\n if (cropper === undefined) return;\n\n setPreview(cropper.getCroppedCanvas().toDataURL());\n };\n\n const closePreviewImage = () => setPreview(undefined);\n\n const saveChanges = () => {\n if (cropper === undefined) return;\n\n cropper.getCroppedCanvas().toBlob(\n async (blob: Blob | null) => {\n try {\n if (!blob) return;\n\n setSaving(true);\n\n const file = new File([blob], 'imagem.png', { type: 'image/png' });\n\n if (file.size > FIVE_MB) {\n const compressedFile = await imageCompression(file, {\n maxSizeMB: 5,\n });\n\n onFileCropped(compressedFile);\n toggleCropModalOpen();\n\n return;\n }\n\n onFileCropped(file);\n toggleCropModalOpen();\n } finally {\n setSaving(false);\n }\n },\n 'image/png',\n 1,\n );\n };\n\n const handleRemove = () => {\n onFileCropped(undefined);\n onImageUploaded(undefined);\n setCropModalOpen(false);\n };\n\n return {\n id,\n setCropModalOpen,\n handleRemove,\n toggleCropModalOpen,\n cropModalOpen,\n cancelChanges,\n saveChanges,\n previewImage,\n setCropper,\n preview,\n closePreviewImage,\n saving,\n };\n};\n\nexport default useUploadImage;\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CustomShadows } from './index-
|
|
2
|
-
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-
|
|
1
|
+
import { C as CustomShadows } from './index-c8f1e6e7.js';
|
|
2
|
+
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-c8f1e6e7.js';
|
|
3
3
|
export { S as SettingsContextValue, _ as SettingsProvider, T as ThemeProviderProps, u as useSettingsContext } from './settings-provider-38d09283.js';
|
|
4
4
|
export { THEME_CONFIG, default as ThemeProvider } from './theme/theme-provider.js';
|
|
5
5
|
import { S as SettingsState } from './settings-583c107c.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-
|
|
1
|
+
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-c8f1e6e7.js';
|
|
2
2
|
import '@mui/lab/TimelineConnector';
|
|
3
3
|
import '@mui/system';
|
|
4
4
|
import '@mui/lab/TimelineDot';
|
|
@@ -173,7 +173,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
173
173
|
float?: csstype.Property.Float | readonly NonNullable<csstype.Property.Float | undefined>[] | readonly csstype.Property.Float[] | undefined;
|
|
174
174
|
floodColor?: readonly string[] | csstype.Property.FloodColor | readonly csstype.Property.FloodColor[] | undefined;
|
|
175
175
|
floodOpacity?: readonly ((string & {}) | csstype.Globals)[] | csstype.Property.FloodOpacity | readonly NonNullable<csstype.Property.FloodOpacity | undefined>[] | undefined;
|
|
176
|
-
fontFamily?: csstype.Property.FontFamily | readonly
|
|
176
|
+
fontFamily?: readonly string[] | csstype.Property.FontFamily | readonly csstype.Property.FontFamily[] | undefined;
|
|
177
177
|
fontFeatureSettings?: readonly string[] | csstype.Property.FontFeatureSettings | readonly csstype.Property.FontFeatureSettings[] | undefined;
|
|
178
178
|
fontKerning?: csstype.Property.FontKerning | readonly NonNullable<csstype.Property.FontKerning | undefined>[] | readonly csstype.Property.FontKerning[] | undefined;
|
|
179
179
|
fontLanguageOverride?: readonly string[] | csstype.Property.FontLanguageOverride | readonly csstype.Property.FontLanguageOverride[] | undefined;
|
|
@@ -197,7 +197,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
197
197
|
fontVariantNumeric?: readonly string[] | csstype.Property.FontVariantNumeric | readonly csstype.Property.FontVariantNumeric[] | undefined;
|
|
198
198
|
fontVariantPosition?: csstype.Property.FontVariantPosition | readonly NonNullable<csstype.Property.FontVariantPosition | undefined>[] | readonly csstype.Property.FontVariantPosition[] | undefined;
|
|
199
199
|
fontVariationSettings?: readonly string[] | csstype.Property.FontVariationSettings | readonly csstype.Property.FontVariationSettings[] | undefined;
|
|
200
|
-
fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
200
|
+
fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ("bold" | (string & {}) | csstype.Globals | "normal" | "bolder" | "lighter")[] | undefined;
|
|
201
201
|
fontWidth?: readonly string[] | csstype.Property.FontWidth | readonly csstype.Property.FontWidth[] | undefined;
|
|
202
202
|
forcedColorAdjust?: csstype.Property.ForcedColorAdjust | readonly NonNullable<csstype.Property.ForcedColorAdjust | undefined>[] | readonly csstype.Property.ForcedColorAdjust[] | undefined;
|
|
203
203
|
gridAutoColumns?: readonly (string | (string & {}))[] | csstype.Property.GridAutoColumns<string | number> | readonly NonNullable<csstype.Property.GridAutoColumns<string | number> | undefined>[] | undefined;
|
|
@@ -460,9 +460,9 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
460
460
|
x?: readonly (string | (string & {}))[] | csstype.Property.X<string | number> | readonly NonNullable<csstype.Property.X<string | number> | undefined>[] | undefined;
|
|
461
461
|
y?: readonly (string | (string & {}))[] | csstype.Property.Y<string | number> | readonly NonNullable<csstype.Property.Y<string | number> | undefined>[] | undefined;
|
|
462
462
|
zIndex?: readonly ((string & {}) | csstype.Globals | "auto")[] | csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | undefined;
|
|
463
|
-
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal"
|
|
463
|
+
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
|
|
464
464
|
all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
|
|
465
|
-
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
465
|
+
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
466
466
|
animationRange?: readonly (string | (string & {}))[] | csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | undefined;
|
|
467
467
|
background?: readonly (string | (string & {}))[] | csstype.Property.Background<string | number> | readonly NonNullable<csstype.Property.Background<string | number> | undefined>[] | undefined;
|
|
468
468
|
border?: readonly (string | (string & {}))[] | csstype.Property.Border<string | number> | readonly NonNullable<csstype.Property.Border<string | number> | undefined>[] | undefined;
|
|
@@ -474,7 +474,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
474
474
|
borderBlockWidth?: readonly (string | (string & {}))[] | csstype.Property.BorderBlockWidth<string | number> | readonly NonNullable<csstype.Property.BorderBlockWidth<string | number> | undefined>[] | undefined;
|
|
475
475
|
borderBottom?: readonly (string | (string & {}))[] | csstype.Property.BorderBottom<string | number> | readonly NonNullable<csstype.Property.BorderBottom<string | number> | undefined>[] | undefined;
|
|
476
476
|
borderColor?: readonly string[] | csstype.Property.BorderColor | readonly csstype.Property.BorderColor[] | undefined;
|
|
477
|
-
borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
477
|
+
borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
478
478
|
borderInline?: readonly (string | (string & {}))[] | csstype.Property.BorderInline<string | number> | readonly NonNullable<csstype.Property.BorderInline<string | number> | undefined>[] | undefined;
|
|
479
479
|
borderInlineColor?: readonly string[] | csstype.Property.BorderInlineColor | readonly csstype.Property.BorderInlineColor[] | undefined;
|
|
480
480
|
borderInlineEnd?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineEnd<string | number> | readonly NonNullable<csstype.Property.BorderInlineEnd<string | number> | undefined>[] | undefined;
|
|
@@ -509,7 +509,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
509
509
|
marginBlock?: readonly (string | (string & {}))[] | csstype.Property.MarginBlock<string | number> | readonly NonNullable<csstype.Property.MarginBlock<string | number> | undefined>[] | undefined;
|
|
510
510
|
marginInline?: readonly (string | (string & {}))[] | csstype.Property.MarginInline<string | number> | readonly NonNullable<csstype.Property.MarginInline<string | number> | undefined>[] | undefined;
|
|
511
511
|
mask?: readonly (string | (string & {}))[] | csstype.Property.Mask<string | number> | readonly NonNullable<csstype.Property.Mask<string | number> | undefined>[] | undefined;
|
|
512
|
-
maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
512
|
+
maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
|
|
513
513
|
motion?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
|
|
514
514
|
offset?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
|
|
515
515
|
outline?: readonly (string | (string & {}))[] | csstype.Property.Outline<string | number> | readonly NonNullable<csstype.Property.Outline<string | number> | undefined>[] | undefined;
|
|
@@ -758,8 +758,8 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
758
758
|
WebkitUserModify?: csstype.Property.WebkitUserModify | readonly NonNullable<csstype.Property.WebkitUserModify | undefined>[] | readonly csstype.Property.WebkitUserModify[] | undefined;
|
|
759
759
|
WebkitUserSelect?: csstype.Property.WebkitUserSelect | readonly NonNullable<csstype.Property.WebkitUserSelect | undefined>[] | readonly csstype.Property.WebkitUserSelect[] | undefined;
|
|
760
760
|
WebkitWritingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
|
|
761
|
-
MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
762
|
-
MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
761
|
+
MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
762
|
+
MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
763
763
|
MozColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
|
|
764
764
|
MozColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
|
|
765
765
|
MozOutlineRadius?: readonly (string | (string & {}))[] | csstype.Property.MozOutlineRadius<string | number> | readonly NonNullable<csstype.Property.MozOutlineRadius<string | number> | undefined>[] | undefined;
|
|
@@ -771,16 +771,16 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
771
771
|
msScrollSnapX?: readonly string[] | csstype.Property.MsScrollSnapX | readonly csstype.Property.MsScrollSnapX[] | undefined;
|
|
772
772
|
msScrollSnapY?: readonly string[] | csstype.Property.MsScrollSnapY | readonly csstype.Property.MsScrollSnapY[] | undefined;
|
|
773
773
|
msTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
|
|
774
|
-
WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
774
|
+
WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
775
775
|
WebkitBorderBefore?: readonly (string | (string & {}))[] | csstype.Property.WebkitBorderBefore<string | number> | readonly NonNullable<csstype.Property.WebkitBorderBefore<string | number> | undefined>[] | undefined;
|
|
776
|
-
WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
776
|
+
WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
777
777
|
WebkitBorderRadius?: readonly (string | (string & {}))[] | csstype.Property.BorderRadius<string | number> | readonly NonNullable<csstype.Property.BorderRadius<string | number> | undefined>[] | undefined;
|
|
778
778
|
WebkitColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
|
|
779
779
|
WebkitColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
|
|
780
780
|
WebkitFlex?: readonly (string | (string & {}))[] | csstype.Property.Flex<string | number> | readonly NonNullable<csstype.Property.Flex<string | number> | undefined>[] | undefined;
|
|
781
781
|
WebkitFlexFlow?: readonly string[] | csstype.Property.FlexFlow | readonly csstype.Property.FlexFlow[] | undefined;
|
|
782
782
|
WebkitMask?: readonly (string | (string & {}))[] | csstype.Property.WebkitMask<string | number> | readonly NonNullable<csstype.Property.WebkitMask<string | number> | undefined>[] | undefined;
|
|
783
|
-
WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
783
|
+
WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
|
|
784
784
|
WebkitTextEmphasis?: readonly string[] | csstype.Property.TextEmphasis | readonly csstype.Property.TextEmphasis[] | undefined;
|
|
785
785
|
WebkitTextStroke?: readonly (string | (string & {}))[] | csstype.Property.WebkitTextStroke<string | number> | readonly NonNullable<csstype.Property.WebkitTextStroke<string | number> | undefined>[] | undefined;
|
|
786
786
|
WebkitTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
|
|
@@ -861,7 +861,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
861
861
|
MozUserFocus?: csstype.Property.MozUserFocus | readonly NonNullable<csstype.Property.MozUserFocus | undefined>[] | readonly csstype.Property.MozUserFocus[] | undefined;
|
|
862
862
|
MozUserInput?: csstype.Property.MozUserInput | readonly NonNullable<csstype.Property.MozUserInput | undefined>[] | readonly csstype.Property.MozUserInput[] | undefined;
|
|
863
863
|
msImeMode?: csstype.Property.ImeMode | readonly NonNullable<csstype.Property.ImeMode | undefined>[] | readonly csstype.Property.ImeMode[] | undefined;
|
|
864
|
-
OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
864
|
+
OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
865
865
|
OAnimationDelay?: readonly string[] | csstype.Property.AnimationDelay<string & {}> | readonly csstype.Property.AnimationDelay<string & {}>[] | undefined;
|
|
866
866
|
OAnimationDirection?: readonly string[] | csstype.Property.AnimationDirection | readonly csstype.Property.AnimationDirection[] | undefined;
|
|
867
867
|
OAnimationDuration?: readonly string[] | csstype.Property.AnimationDuration<string & {}> | readonly csstype.Property.AnimationDuration<string & {}>[] | undefined;
|
|
@@ -871,7 +871,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
871
871
|
OAnimationPlayState?: readonly string[] | csstype.Property.AnimationPlayState | readonly csstype.Property.AnimationPlayState[] | undefined;
|
|
872
872
|
OAnimationTimingFunction?: readonly string[] | csstype.Property.AnimationTimingFunction | readonly csstype.Property.AnimationTimingFunction[] | undefined;
|
|
873
873
|
OBackgroundSize?: readonly (string | (string & {}))[] | csstype.Property.BackgroundSize<string | number> | readonly NonNullable<csstype.Property.BackgroundSize<string | number> | undefined>[] | undefined;
|
|
874
|
-
OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
874
|
+
OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
875
875
|
OObjectFit?: csstype.Property.ObjectFit | readonly NonNullable<csstype.Property.ObjectFit | undefined>[] | readonly csstype.Property.ObjectFit[] | undefined;
|
|
876
876
|
OObjectPosition?: readonly (string | (string & {}))[] | csstype.Property.ObjectPosition<string | number> | readonly NonNullable<csstype.Property.ObjectPosition<string | number> | undefined>[] | undefined;
|
|
877
877
|
OTabSize?: readonly (string | (string & {}))[] | csstype.Property.TabSize<string | number> | readonly NonNullable<csstype.Property.TabSize<string | number> | undefined>[] | undefined;
|
package/package.json
CHANGED
package/dist/chunk-2HAPOY5M.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-FJBC6QA5.js';
|
|
2
|
-
import { a } from './chunk-POTVACYB.js';
|
|
3
|
-
import { useCallback, useState, useEffect } from 'react';
|
|
4
|
-
|
|
5
|
-
var h=typeof window>"u",p=(r,t,o={})=>{let{initializeWithValue:l=!0}=o,S=useCallback(e=>o.serializer?o.serializer(e):JSON.stringify(e),[o]),d=useCallback(e=>{if(o.deserializer)return o.deserializer(e);if(e==="undefined")return;let n=t instanceof Function?t():t,g;try{g=JSON.parse(e);}catch{return n}return g},[o,t]),a$2=useCallback(()=>{let e=t instanceof Function?t():t;if(h)return e;try{let n=window.localStorage.getItem(r);return n?d(n):e}catch{return e}},[t,r,d]),[w,s]=useState(()=>l?a$2():t instanceof Function?t():t),T=a(e=>{try{let n=e instanceof Function?e(a$2()):e;window.localStorage.setItem(r,S(n)),s(n),window.dispatchEvent(new StorageEvent("local-storage",{key:r}));}catch{}}),m=a(()=>{let e=t instanceof Function?t():t;window.localStorage.removeItem(r),s(e),window.dispatchEvent(new StorageEvent("local-storage",{key:r}));});useEffect(()=>{s(a$2());},[r]);let f=useCallback(e=>{e.key&&e.key!==r||s(a$2());},[r,a$2]);return a$1("storage",f),a$1("local-storage",f),[w,T,m]},I=p;
|
|
6
|
-
|
|
7
|
-
export { I as a };
|
|
8
|
-
//# sourceMappingURL=chunk-2HAPOY5M.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useLocalStorage.ts"],"names":["useCallback","useEffect","useState","IS_SERVER","useLocalStorage","key","initialValue","options","initializeWithValue","serializer","value","deserializer","defaultValue","parsed","readValue","initialValueToUse","raw","storedValue","setStoredValue","setValue","useEventCallback_default","newValue","removeValue","handleStorageChange","event","useEventListener_default","useLocalStorage_default"],"mappings":"gFACA,OAAS,eAAAA,EAAa,aAAAC,EAAW,YAAAC,MAAgB,QAiBjD,IAAMC,EAAY,OAAO,OAAW,IAE9BC,EAAkB,CACtBC,EACAC,EACAC,EAAqC,CAAC,IACW,CACjD,GAAM,CAAE,oBAAAC,EAAsB,EAAK,EAAID,EAEjCE,EAAaT,EACjBU,GACMH,EAAQ,WACHA,EAAQ,WAAWG,CAAK,EAE1B,KAAK,UAAUA,CAAK,EAE7B,CAACH,CAAO,CACV,EAEMI,EAAeX,EACnBU,GAAS,CACP,GAAIH,EAAQ,aACV,OAAOA,EAAQ,aAAaG,CAAK,EAEnC,GAAIA,IAAU,YACZ,OAGF,IAAME,EACJN,aAAwB,SAAWA,EAAa,EAAIA,EAElDO,EACJ,GAAI,CACFA,EAAS,KAAK,MAAMH,CAAK,CAC3B,MAAE,CACA,OAAOE,CACT,CAEA,OAAOC,CACT,EACA,CAACN,EAASD,CAAY,CACxB,EAEMQ,EAAYd,EAAY,IAAS,CACrC,IAAMe,EACJT,aAAwB,SAAWA,EAAa,EAAIA,EAEtD,GAAIH,EACF,OAAOY,EAGT,GAAI,CACF,IAAMC,EAAM,OAAO,aAAa,QAAQX,CAAG,EAC3C,OAAOW,EAAML,EAAaK,CAAG,EAAID,CACnC,MAAE,CACA,OAAOA,CACT,CACF,EAAG,CAACT,EAAcD,EAAKM,CAAY,CAAC,EAE9B,CAACM,EAAaC,CAAc,EAAIhB,EAAS,IACzCM,EACKM,EAAU,EAEZR,aAAwB,SAAWA,EAAa,EAAIA,CAC5D,EAEKa,EAAwCC,EAAiBV,GAAS,CACtE,GAAI,CACF,IAAMW,EAAWX,aAAiB,SAAWA,EAAMI,EAAU,CAAC,EAAIJ,EAClE,OAAO,aAAa,QAAQL,EAAKI,EAAWY,CAAQ,CAAC,EACrDH,EAAeG,CAAQ,EACvB,OAAO,cAAc,IAAI,aAAa,gBAAiB,CAAE,IAAAhB,CAAI,CAAC,CAAC,CACjE,MAAE,CAEF,CACF,CAAC,EAEKiB,EAAcF,EAAiB,IAAM,CACzC,IAAMR,EACJN,aAAwB,SAAWA,EAAa,EAAIA,EACtD,OAAO,aAAa,WAAWD,CAAG,EAClCa,EAAeN,CAAY,EAC3B,OAAO,cAAc,IAAI,aAAa,gBAAiB,CAAE,IAAAP,CAAI,CAAC,CAAC,CACjE,CAAC,EAEDJ,EAAU,IAAM,CACdiB,EAAeJ,EAAU,CAAC,CAE5B,EAAG,CAACT,CAAG,CAAC,EAER,IAAMkB,EAAsBvB,EACzBwB,GAAsC,CAChCA,EAAuB,KAAQA,EAAuB,MAAQnB,GAGnEa,EAAeJ,EAAU,CAAC,CAC5B,EACA,CAACT,EAAKS,CAAS,CACjB,EAEA,OAAAW,EAAiB,UAAWF,CAAmB,EAC/CE,EAAiB,gBAAiBF,CAAmB,EAE9C,CAACN,EAAaE,EAAUG,CAAW,CAC5C,EAEOI,EAAQtB","sourcesContent":["import type { Dispatch, SetStateAction } from 'react';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport useEventCallback from './useEventCallback';\nimport useEventListener from './useEventListener';\n\ndeclare global {\n interface WindowEventMap {\n 'local-storage': CustomEvent;\n }\n}\n\ntype UseLocalStorageOptions<T> = {\n serializer?: (value: T) => string;\n deserializer?: (value: string) => T;\n initializeWithValue?: boolean;\n};\n\nconst IS_SERVER = typeof window === 'undefined';\n\nconst useLocalStorage = <T>(\n key: string,\n initialValue: T | (() => T),\n options: UseLocalStorageOptions<T> = {},\n): [T, Dispatch<SetStateAction<T>>, () => void] => {\n const { initializeWithValue = true } = options;\n\n const serializer = useCallback<(value: T) => string>(\n value => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options],\n );\n\n const deserializer = useCallback<(value: string) => T>(\n value => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === 'undefined') {\n return undefined as unknown as T;\n }\n\n const defaultValue =\n initialValue instanceof Function ? initialValue() : initialValue;\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n return defaultValue;\n }\n\n return parsed as T;\n },\n [options, initialValue],\n );\n\n const readValue = useCallback((): T => {\n const initialValueToUse =\n initialValue instanceof Function ? initialValue() : initialValue;\n\n if (IS_SERVER) {\n return initialValueToUse;\n }\n\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n\n const setValue: Dispatch<SetStateAction<T>> = useEventCallback(value => {\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.localStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent('local-storage', { key }));\n } catch {\n /* empty */\n }\n });\n\n const removeValue = useEventCallback(() => {\n const defaultValue =\n initialValue instanceof Function ? initialValue() : initialValue;\n window.localStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent('local-storage', { key }));\n });\n\n useEffect(() => {\n setStoredValue(readValue());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key]);\n\n const handleStorageChange = useCallback(\n (event: StorageEvent | CustomEvent) => {\n if ((event as StorageEvent).key && (event as StorageEvent).key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue],\n );\n\n useEventListener('storage', handleStorageChange);\n useEventListener('local-storage', handleStorageChange);\n\n return [storedValue, setValue, removeValue];\n};\n\nexport default useLocalStorage;\n"]}
|
package/dist/chunk-2ZJUGM2S.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { useTheme } from '@mui/material/styles';
|
|
2
|
-
import n from '@mui/material/useMediaQuery';
|
|
3
|
-
|
|
4
|
-
var m=(e,t,r)=>{let o=useTheme(),u=n(o.breakpoints.up(t)),s=n(o.breakpoints.down(t)),p=n(o.breakpoints.between(t,r)),i=n(o.breakpoints.only(t));return e==="up"?u:e==="down"?s:e==="between"?p:i};function d(){let e=useTheme(),t=n(e.breakpoints.up("xl")),r=n(e.breakpoints.up("lg")),o=n(e.breakpoints.up("md")),u=n(e.breakpoints.up("sm"));return t?"xl":r?"lg":o?"md":u?"sm":"xs"}var f=m;
|
|
5
|
-
|
|
6
|
-
export { d as a, f as b };
|
|
7
|
-
//# sourceMappingURL=chunk-2ZJUGM2S.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useResponsive.ts"],"names":["useTheme","useMediaQuery","useResponsive","query","start","end","theme","mediaUp","mediaDown","mediaBetween","mediaOnly","useWidth","matchXl","matchLg","matchMd","matchSm","useResponsive_default"],"mappings":"AAAA,OAAqB,YAAAA,MAAgB,uBACrC,OAAOC,MAAmB,8BAQ1B,IAAMC,EAAgB,CACpBC,EACAC,EACAC,IACe,CACf,IAAMC,EAAQN,EAAS,EAEjBO,EAAUN,EAAcK,EAAM,YAAY,GAAGF,CAAc,CAAC,EAE5DI,EAAYP,EAAcK,EAAM,YAAY,KAAKF,CAAc,CAAC,EAEhEK,EAAeR,EACnBK,EAAM,YAAY,QAAQF,EAAgBC,CAAY,CACxD,EAEMK,EAAYT,EAAcK,EAAM,YAAY,KAAKF,CAAmB,CAAC,EAE3E,OAAID,IAAU,KACLI,EAGLJ,IAAU,OACLK,EAGLL,IAAU,UACLM,EAGFC,CACT,EAEO,SAASC,GAAW,CACzB,IAAML,EAAQN,EAAS,EAEjBY,EAAUX,EAAcK,EAAM,YAAY,GAAG,IAAI,CAAC,EAClDO,EAAUZ,EAAcK,EAAM,YAAY,GAAG,IAAI,CAAC,EAClDQ,EAAUb,EAAcK,EAAM,YAAY,GAAG,IAAI,CAAC,EAClDS,EAAUd,EAAcK,EAAM,YAAY,GAAG,IAAI,CAAC,EAExD,OAAIM,EAAgB,KAChBC,EAAgB,KAChBC,EAAgB,KAChBC,EAAgB,KACb,IACT,CAEA,IAAOC,EAAQd","sourcesContent":["import { Breakpoint, useTheme } from '@mui/material/styles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\ntype ReturnType = boolean;\n\ntype Query = 'up' | 'down' | 'between' | 'only';\n\ntype Value = Breakpoint | number;\n\nconst useResponsive = (\n query: Query,\n start?: Value,\n end?: Value,\n): ReturnType => {\n const theme = useTheme();\n\n const mediaUp = useMediaQuery(theme.breakpoints.up(start as Value));\n\n const mediaDown = useMediaQuery(theme.breakpoints.down(start as Value));\n\n const mediaBetween = useMediaQuery(\n theme.breakpoints.between(start as Value, end as Value),\n );\n\n const mediaOnly = useMediaQuery(theme.breakpoints.only(start as Breakpoint));\n\n if (query === 'up') {\n return mediaUp;\n }\n\n if (query === 'down') {\n return mediaDown;\n }\n\n if (query === 'between') {\n return mediaBetween;\n }\n\n return mediaOnly;\n};\n\nexport function useWidth() {\n const theme = useTheme();\n\n const matchXl = useMediaQuery(theme.breakpoints.up('xl'));\n const matchLg = useMediaQuery(theme.breakpoints.up('lg'));\n const matchMd = useMediaQuery(theme.breakpoints.up('md'));\n const matchSm = useMediaQuery(theme.breakpoints.up('sm'));\n\n if (matchXl) return 'xl';\n if (matchLg) return 'lg';\n if (matchMd) return 'md';\n if (matchSm) return 'sm';\n return 'xs';\n}\n\nexport default useResponsive;\n"]}
|
package/dist/chunk-CFNATBO2.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
|
|
3
|
-
var p=()=>{let[o,e]=useState(null);return {copiedText:o,copy:async t=>{if(!navigator?.clipboard)return !1;try{return await navigator.clipboard.writeText(t),e(t),!0}catch{return e(null),!1}}}},l=p;
|
|
4
|
-
|
|
5
|
-
export { l as a };
|
|
6
|
-
//# sourceMappingURL=chunk-CFNATBO2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useCopyToClipboard.ts"],"names":["useState","useCopyToClipboard","copiedText","setCopiedText","text","useCopyToClipboard_default"],"mappings":"AAAA,OAAS,YAAAA,MAAgB,QAWzB,IAAMC,EAAqB,IAAkB,CAC3C,GAAM,CAACC,EAAYC,CAAa,EAAIH,EAAsB,IAAI,EAe9D,MAAO,CAAE,WAAAE,EAAY,KAbA,MAAME,GAAQ,CACjC,GAAI,CAAC,WAAW,UAAW,MAAO,GAElC,GAAI,CACF,aAAM,UAAU,UAAU,UAAUA,CAAI,EACxCD,EAAcC,CAAI,EACX,EACT,MAAE,CACA,OAAAD,EAAc,IAAI,EACX,EACT,CACF,CAE0B,CAC5B,EAEOE,EAAQJ","sourcesContent":["import { useState } from 'react';\n\ntype CopiedValue = string | null;\n\ntype CopyFn = (text: string) => Promise<boolean>;\n\ntype ReturnType = {\n copy: CopyFn;\n copiedText: CopiedValue;\n};\n\nconst useCopyToClipboard = (): ReturnType => {\n const [copiedText, setCopiedText] = useState<CopiedValue>(null);\n\n const copy: CopyFn = async text => {\n if (!navigator?.clipboard) return false;\n\n try {\n await navigator.clipboard.writeText(text);\n setCopiedText(text);\n return true;\n } catch (error) {\n setCopiedText(null);\n return false;\n }\n };\n\n return { copiedText, copy };\n};\n\nexport default useCopyToClipboard;\n"]}
|
package/dist/chunk-QSHKTHGM.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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=chunk-QSHKTHGM.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
package/dist/chunk-RMYYQLRJ.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { useGridApiRef } from '@mui/x-data-grid-premium';
|
|
3
|
-
|
|
4
|
-
var R=({page:c,perPage:g,dir:o,search:p,searchValue:u,sort:d}={page:0,perPage:25})=>{let t=useGridApiRef(),[s,r]=useState({page:c,perPage:g,dir:o,search:p,searchValue:u,sort:d}),i=({pageSize:e=25,page:a=0})=>{r(n=>({...n,page:a,perPage:e}));},l=e=>r(a=>({...a,page:0,search:e})),f=e=>r(a=>({...a,searchValue:e})),h=()=>r(e=>({...e,page:0,search:e.searchValue})),m=(e,a)=>r(n=>({...n,sort:e,dir:a})),P=()=>{t.current&&t.current.setPage(0),i({page:0});};return {...s,apiRef:t,page:s.page||0,perPage:s.perPage||25,handlePaginationModelChange:i,handleSearch:l,handleSort:m,handleSearchValue:f,applySearchValue:h,goToPageFirstPage:P}},M=R;
|
|
5
|
-
|
|
6
|
-
export { M as a };
|
|
7
|
-
//# sourceMappingURL=chunk-RMYYQLRJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useDatagrid.ts"],"names":["useState","useGridApiRef","useDatagrid","page","perPage","dir","search","searchValue","sort","apiRef","state","setState","handlePaginationModelChange","pageSize","handleSearch","handleSearchValue","applySearchValue","handleSort","field","goToPageFirstPage","useDatagrid_default"],"mappings":"AAAA,OAA2B,YAAAA,MAAgB,QAC3C,OAAS,iBAAAC,MAAqB,2BAY9B,IAAMC,EAAc,CAClB,CAAE,KAAAC,EAAM,QAAAC,EAAS,IAAAC,EAAK,OAAAC,EAAQ,YAAAC,EAAa,KAAAC,CAAK,EAAW,CACzD,KAAM,EACN,QAAS,EACX,IACG,CACH,IAAMC,EAASR,EAAc,EACvB,CAACS,EAAOC,CAAQ,EAAIX,EAAgB,CACxC,KAAAG,EACA,QAAAC,EACA,IAAAC,EACA,OAAAC,EACA,YAAAC,EACA,KAAAC,CACF,CAAC,EAEKI,EAA8B,CAAC,CAAE,SAAAC,EAAW,GAAI,KAAAV,EAAO,CAAE,IAAM,CACnEQ,EAASD,IAAU,CAAE,GAAGA,EAAO,KAAAP,EAAM,QAASU,CAAS,EAAE,CAC3D,EAEMC,EAAgBR,GACpBK,EAASD,IAAU,CAAE,GAAGA,EAAO,KAAM,EAAG,OAAAJ,CAAO,EAAE,EAE7CS,EAAqBT,GACzBK,EAASD,IAAU,CAAE,GAAGA,EAAO,YAAaJ,CAAO,EAAE,EAEjDU,EAAmB,IACvBL,EAASD,IAAU,CAAE,GAAGA,EAAO,KAAM,EAAG,OAAQA,EAAM,WAAY,EAAE,EAEhEO,EAAa,CAACC,EAAgBb,IAClCM,EAASD,IAAU,CAAE,GAAGA,EAAO,KAAMQ,EAAO,IAAAb,CAAI,EAAE,EAE9Cc,EAAoB,IAAM,CAC1BV,EAAO,SAASA,EAAO,QAAQ,QAAQ,CAAC,EAC5CG,EAA4B,CAAE,KAAM,CAAE,CAAC,CACzC,EAEA,MAAO,CACL,GAAGF,EACH,OAAQD,EACR,KAAMC,EAAM,MAAQ,EACpB,QAASA,EAAM,SAAW,GAC1B,4BAAAE,EACA,aAAAE,EACA,WAAAG,EACA,kBAAAF,EACA,iBAAAC,EACA,kBAAAG,CACF,CACF,EAEOC,EAAQlB","sourcesContent":["import { MutableRefObject, useState } from 'react';\nimport { useGridApiRef } from '@mui/x-data-grid-premium';\nimport { GridApiPremium } from '@mui/x-data-grid-premium/models/gridApiPremium';\n\ninterface State {\n page?: number;\n perPage?: number;\n search?: string;\n searchValue?: string;\n sort?: string;\n dir?: 'asc' | 'desc';\n}\n\nconst useDatagrid = (\n { page, perPage, dir, search, searchValue, sort }: State = {\n page: 0,\n perPage: 25,\n },\n) => {\n const apiRef = useGridApiRef();\n const [state, setState] = useState<State>({\n page,\n perPage,\n dir,\n search,\n searchValue,\n sort,\n });\n\n const handlePaginationModelChange = ({ pageSize = 25, page = 0 }) => {\n setState(state => ({ ...state, page, perPage: pageSize }));\n };\n\n const handleSearch = (search: string | undefined) =>\n setState(state => ({ ...state, page: 0, search }));\n\n const handleSearchValue = (search: string | undefined) =>\n setState(state => ({ ...state, searchValue: search }));\n\n const applySearchValue = () =>\n setState(state => ({ ...state, page: 0, search: state.searchValue }));\n\n const handleSort = (field?: string, dir?: 'asc' | 'desc') =>\n setState(state => ({ ...state, sort: field, dir }));\n\n const goToPageFirstPage = () => {\n if (apiRef.current) apiRef.current.setPage(0);\n handlePaginationModelChange({ page: 0 });\n };\n\n return {\n ...state,\n apiRef: apiRef as MutableRefObject<GridApiPremium>,\n page: state.page || 0,\n perPage: state.perPage || 25,\n handlePaginationModelChange,\n handleSearch,\n handleSort,\n handleSearchValue,\n applySearchValue,\n goToPageFirstPage,\n };\n};\n\nexport default useDatagrid;\n"]}
|
package/dist/chunk-U4I7JPER.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { b } from './chunk-BX2DSNRV.js';
|
|
2
|
-
import { useColorScheme } from '@mui/material/styles';
|
|
3
|
-
|
|
4
|
-
var S=()=>{let{setMode:m}=useColorScheme(),{settings:c,updateSettings:h}=b(),e=c.colorScheme!=="light"?"dark":"light",t=o=>{m(o),h({colorScheme:o});};return {colorScheme:e,mode:e,isDark:e==="dark",toggleTheme:()=>{t(e==="light"?"dark":"light");},setColorScheme:t}};
|
|
5
|
-
|
|
6
|
-
export { S as a };
|
|
7
|
-
//# sourceMappingURL=chunk-U4I7JPER.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useThemeToggle.ts"],"names":["useColorScheme","useThemeToggle","setMode","settings","updateSettings","useSettingsContext","colorScheme","handleSetColorScheme","scheme"],"mappings":"wCAAA,OAAS,kBAAAA,MAAsB,uBAaxB,IAAMC,EAAiB,IAA4B,CACxD,GAAM,CAAE,QAAAC,CAAQ,EAAIF,EAAe,EAC7B,CAAE,SAAAG,EAAU,eAAAC,CAAe,EAAIC,EAAmB,EAClDC,EAAcH,EAAS,cAAgB,QAAU,OAAS,QAE1DI,EAAwBC,GAAwB,CACpDN,EAAQM,CAAM,EACdJ,EAAe,CAAE,YAAaI,CAAO,CAAC,CACxC,EAOA,MAAO,CACL,YAAAF,EACA,KAAMA,EACN,OAAQA,IAAgB,OACxB,YATkB,IAAM,CAExBC,EADkBD,IAAgB,QAAU,OAAS,OACvB,CAChC,EAOE,eAAgBC,CAClB,CACF","sourcesContent":["import { useColorScheme } from '@mui/material/styles';\nimport { useSettingsContext } from 'theme/theme-provider';\n\nimport { ColorScheme } from 'types/settings';\n\nexport interface UseThemeToggleReturn {\n colorScheme: ColorScheme;\n mode: ColorScheme;\n isDark: boolean;\n toggleTheme: () => void;\n setColorScheme: (scheme: ColorScheme) => void;\n}\n\nexport const useThemeToggle = (): UseThemeToggleReturn => {\n const { setMode } = useColorScheme();\n const { settings, updateSettings } = useSettingsContext();\n const colorScheme = settings.colorScheme !== 'light' ? 'dark' : 'light';\n\n const handleSetColorScheme = (scheme: ColorScheme) => {\n setMode(scheme);\n updateSettings({ colorScheme: scheme });\n };\n\n const toggleTheme = () => {\n const newScheme = colorScheme === 'light' ? 'dark' : 'light';\n handleSetColorScheme(newScheme);\n };\n\n return {\n colorScheme,\n mode: colorScheme,\n isDark: colorScheme === 'dark',\n toggleTheme,\n setColorScheme: handleSetColorScheme,\n };\n};\n"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -286,10 +286,13 @@ declare const components: {
|
|
|
286
286
|
MuiTimelineDot: {
|
|
287
287
|
defaultProps?: Partial<_mui_lab_TimelineDot.TimelineDotProps> | undefined;
|
|
288
288
|
styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<keyof _mui_lab_TimelineDot.TimelineDotClasses, "MuiTimelineDot", {
|
|
289
|
-
|
|
289
|
+
cssVarPrefix: string;
|
|
290
|
+
zIndex: _mui_material.ZIndex;
|
|
291
|
+
direction: _mui_system.Direction;
|
|
292
|
+
opacity: _mui_material.Opacity;
|
|
293
|
+
typography: _mui_material.TypographyVariants;
|
|
290
294
|
palette: _mui_material.Palette;
|
|
291
295
|
colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
|
|
292
|
-
cssVarPrefix: string;
|
|
293
296
|
vars: _mui_material.ThemeVars;
|
|
294
297
|
getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
|
|
295
298
|
getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
|
|
@@ -300,16 +303,13 @@ declare const components: {
|
|
|
300
303
|
spacing: _mui_system.Spacing;
|
|
301
304
|
breakpoints: _mui_system.Breakpoints;
|
|
302
305
|
shape: _mui_system.Shape;
|
|
303
|
-
|
|
306
|
+
transitions: _mui_material.Transitions;
|
|
304
307
|
shadows: _mui_material.Shadows;
|
|
305
308
|
mixins: _mui_material.Mixins;
|
|
306
|
-
zIndex: _mui_material.ZIndex;
|
|
307
|
-
direction: _mui_system.Direction;
|
|
308
309
|
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
309
310
|
unstable_sxConfig: _mui_system.SxConfig;
|
|
310
311
|
unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
|
|
311
312
|
applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
|
|
312
|
-
opacity: _mui_material.Opacity;
|
|
313
313
|
overlays: _mui_material.Overlays;
|
|
314
314
|
customShadows: CustomShadows;
|
|
315
315
|
unstable_strictMode?: boolean | undefined;
|
|
@@ -326,10 +326,13 @@ declare const components: {
|
|
|
326
326
|
MuiTimelineConnector: {
|
|
327
327
|
defaultProps?: Partial<_mui_lab_TimelineConnector.TimelineConnectorProps> | undefined;
|
|
328
328
|
styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<"root", "MuiTimelineConnector", {
|
|
329
|
-
|
|
329
|
+
cssVarPrefix: string;
|
|
330
|
+
zIndex: _mui_material.ZIndex;
|
|
331
|
+
direction: _mui_system.Direction;
|
|
332
|
+
opacity: _mui_material.Opacity;
|
|
333
|
+
typography: _mui_material.TypographyVariants;
|
|
330
334
|
palette: _mui_material.Palette;
|
|
331
335
|
colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
|
|
332
|
-
cssVarPrefix: string;
|
|
333
336
|
vars: _mui_material.ThemeVars;
|
|
334
337
|
getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
|
|
335
338
|
getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
|
|
@@ -340,16 +343,13 @@ declare const components: {
|
|
|
340
343
|
spacing: _mui_system.Spacing;
|
|
341
344
|
breakpoints: _mui_system.Breakpoints;
|
|
342
345
|
shape: _mui_system.Shape;
|
|
343
|
-
|
|
346
|
+
transitions: _mui_material.Transitions;
|
|
344
347
|
shadows: _mui_material.Shadows;
|
|
345
348
|
mixins: _mui_material.Mixins;
|
|
346
|
-
zIndex: _mui_material.ZIndex;
|
|
347
|
-
direction: _mui_system.Direction;
|
|
348
349
|
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
349
350
|
unstable_sxConfig: _mui_system.SxConfig;
|
|
350
351
|
unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
|
|
351
352
|
applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
|
|
352
|
-
opacity: _mui_material.Opacity;
|
|
353
353
|
overlays: _mui_material.Overlays;
|
|
354
354
|
customShadows: CustomShadows;
|
|
355
355
|
unstable_strictMode?: boolean | undefined;
|