lkd-web-kit 0.0.17 → 0.0.19
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/components/EmptyState/index.cjs +1 -1
- package/dist/components/EmptyState/index.cjs.map +1 -1
- package/dist/components/EmptyState/index.mjs +1 -1
- package/dist/components/EmptyState/index.mjs.map +1 -1
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/Icon.cjs.map +1 -1
- package/dist/components/Icon.mjs +4 -11
- package/dist/components/Icon.mjs.map +1 -1
- package/dist/hooks/useBreakpoint.cjs +2 -0
- package/dist/hooks/useBreakpoint.cjs.map +1 -0
- package/dist/hooks/useBreakpoint.mjs +9 -0
- package/dist/hooks/useBreakpoint.mjs.map +1 -0
- package/dist/hooks/useUpdateSearchParams.cjs +2 -0
- package/dist/hooks/useUpdateSearchParams.cjs.map +1 -0
- package/dist/hooks/useUpdateSearchParams.mjs +19 -0
- package/dist/hooks/useUpdateSearchParams.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.mjs +56 -54
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("clsx"),o=require("../Icon.cjs"),a=e=>e&&e.__esModule?e:{default:e},d=a(i),u={sm:48,md:60,lg:84},m=({label:e,action:s,icon:c,className:l,size:n="md",...r})=>t.jsxs("div",{className:d.default("justfiy-center flex flex-col items-center gap-1",l),...r,children:[t.jsx(o.Icon,{i:c,size:u[n],className:"text-gray-2"}),t.jsx("p",{className:"text-gray-6 text-sm font-semibold",children:e}),t.jsx("div",{children:s})]});exports.EmptyState=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/EmptyState/index.tsx"],"sourcesContent":["import clsx from 'clsx';\r\nimport { ComponentProps, ReactNode } from 'react';\r\nimport
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/EmptyState/index.tsx"],"sourcesContent":["import clsx from 'clsx';\r\nimport { ComponentProps, ReactNode } from 'react';\r\nimport { IconFC, Icon } from '../Icon';\r\n\r\nexport interface EmptyProps extends ComponentProps<'div'> {\r\n label: ReactNode;\r\n action?: ReactNode;\r\n icon: IconFC;\r\n size?: keyof typeof pxBySize;\r\n}\r\n\r\nconst pxBySize = {\r\n sm: 48,\r\n md: 60,\r\n lg: 84,\r\n};\r\n\r\nexport const EmptyState = ({\r\n label,\r\n action,\r\n icon,\r\n className,\r\n size = 'md',\r\n ...props\r\n}: EmptyProps) => {\r\n return (\r\n <div\r\n className={clsx('justfiy-center flex flex-col items-center gap-1', className)}\r\n {...props}\r\n >\r\n <Icon\r\n i={icon}\r\n size={pxBySize[size]}\r\n className=\"text-gray-2\"\r\n />\r\n <p className=\"text-gray-6 text-sm font-semibold\">{label}</p>\r\n <div>{action}</div>\r\n </div>\r\n );\r\n};\r\n"],"names":["pxBySize","EmptyState","label","action","icon","className","size","props","jsxs","clsx","jsx","Icon"],"mappings":"0MAWMA,EAAW,CACf,GAAI,GACJ,GAAI,GACJ,GAAI,EACN,EAEaC,EAAa,CAAC,CACzB,MAAAC,EACA,OAAAC,EACA,KAAAC,EACA,UAAAC,EACA,KAAAC,EAAO,KACP,GAAGC,CACL,IAEIC,EAAA,KAAC,MAAA,CACC,UAAWC,EAAAA,QAAK,kDAAmDJ,CAAS,EAC3E,GAAGE,EAEJ,SAAA,CAAAG,EAAA,IAACC,EAAA,KAAA,CACC,EAAGP,EACH,KAAMJ,EAASM,CAAI,EACnB,UAAU,aAAA,CACZ,EACCI,EAAA,IAAA,IAAA,CAAE,UAAU,oCAAqC,SAAMR,EAAA,EACxDQ,EAAAA,IAAC,OAAK,SAAOP,CAAA,CAAA,CAAA,CAAA,CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/EmptyState/index.tsx"],"sourcesContent":["import clsx from 'clsx';\r\nimport { ComponentProps, ReactNode } from 'react';\r\nimport
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/EmptyState/index.tsx"],"sourcesContent":["import clsx from 'clsx';\r\nimport { ComponentProps, ReactNode } from 'react';\r\nimport { IconFC, Icon } from '../Icon';\r\n\r\nexport interface EmptyProps extends ComponentProps<'div'> {\r\n label: ReactNode;\r\n action?: ReactNode;\r\n icon: IconFC;\r\n size?: keyof typeof pxBySize;\r\n}\r\n\r\nconst pxBySize = {\r\n sm: 48,\r\n md: 60,\r\n lg: 84,\r\n};\r\n\r\nexport const EmptyState = ({\r\n label,\r\n action,\r\n icon,\r\n className,\r\n size = 'md',\r\n ...props\r\n}: EmptyProps) => {\r\n return (\r\n <div\r\n className={clsx('justfiy-center flex flex-col items-center gap-1', className)}\r\n {...props}\r\n >\r\n <Icon\r\n i={icon}\r\n size={pxBySize[size]}\r\n className=\"text-gray-2\"\r\n />\r\n <p className=\"text-gray-6 text-sm font-semibold\">{label}</p>\r\n <div>{action}</div>\r\n </div>\r\n );\r\n};\r\n"],"names":["pxBySize","EmptyState","label","action","icon","className","size","props","jsxs","clsx","jsx","Icon"],"mappings":";;;AAWA,MAAMA,IAAW;AAAA,EACf,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAa,CAAC;AAAA,EACzB,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAK,mDAAmDJ,CAAS;AAAA,IAC3E,GAAGE;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAG;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,GAAGP;AAAA,UACH,MAAMJ,EAASM,CAAI;AAAA,UACnB,WAAU;AAAA,QAAA;AAAA,MACZ;AAAA,MACC,gBAAAI,EAAA,KAAA,EAAE,WAAU,qCAAqC,UAAMR,GAAA;AAAA,MACxD,gBAAAQ,EAAC,SAAK,UAAOP,EAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AACf;"}
|
package/dist/components/Icon.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";const l=require("react/jsx-runtime"),n=require("clsx"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("clsx"),d=t=>t&&t.__esModule?t:{default:t},r=d(n),c=({i:t,size:e="md",style:i,rotate:h,className:s,...o})=>l.jsx(t,{...typeof e=="number"?{height:e,width:e}:u[e],viewBox:"0 0 24 24",style:{...i,transform:`rotate(${h}deg)`},className:r.default("shrink-0",s),...o}),u={xs:{height:16,width:16},sm:{height:20,width:20},md:{height:24,width:24},lg:{height:28,width:28},xl:{height:32,width:32},"2xl":{height:40,width:40}};exports.Icon=c;
|
|
2
2
|
//# sourceMappingURL=Icon.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.cjs","sources":["../../src/components/Icon.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"Icon.cjs","sources":["../../src/components/Icon.tsx"],"sourcesContent":["'use client';\r\nimport clsx from 'clsx';\r\nimport React, { ComponentPropsWithoutRef } from 'react';\r\n\r\nexport type IconFC = React.FC<ComponentPropsWithoutRef<'svg'>>;\r\nexport interface IconProps extends ComponentPropsWithoutRef<'svg'> {\r\n i: IconFC;\r\n /**\r\n * @property xs: 16px\r\n * @property sm: 20px\r\n * @property md: 24px\r\n * @property lg: 28px\r\n * @property xl: 32px\r\n * @property 2xl: 40px\r\n */\r\n size?: keyof typeof stylesBySize | number;\r\n}\r\n\r\nexport const Icon = ({ i: I, size = 'md', style, rotate, className, ...rest }: IconProps) => {\r\n /* \r\n Para que no haya colisiones de ids al renderizar el icono en varios lados, le pasamos este id a la prop idprefix.\r\n Esta prop es agregada gracias al archivo svgr-dynamic-ids.js que se encuentra en la raíz del proyecto.\r\n */\r\n\r\n return (\r\n <I\r\n {...(typeof size === 'number'\r\n ? {\r\n height: size,\r\n width: size,\r\n }\r\n : stylesBySize[size])}\r\n viewBox=\"0 0 24 24\"\r\n style={{\r\n ...style,\r\n transform: `rotate(${rotate}deg)`,\r\n }}\r\n className={clsx('shrink-0', className)}\r\n {...rest}\r\n />\r\n );\r\n};\r\n\r\nconst stylesBySize = {\r\n xs: {\r\n height: 16,\r\n width: 16,\r\n },\r\n sm: {\r\n height: 20,\r\n width: 20,\r\n },\r\n md: {\r\n height: 24,\r\n width: 24,\r\n },\r\n lg: {\r\n height: 28,\r\n width: 28,\r\n },\r\n xl: {\r\n height: 32,\r\n width: 32,\r\n },\r\n ['2xl']: {\r\n height: 40,\r\n width: 40,\r\n },\r\n};\r\n"],"names":["Icon","I","size","style","rotate","className","rest","jsx","stylesBySize","clsx"],"mappings":"8LAkBaA,EAAO,CAAC,CAAE,EAAGC,EAAG,KAAAC,EAAO,KAAM,MAAAC,EAAO,OAAAC,EAAQ,UAAAC,EAAW,GAAGC,CAAA,IAOnEC,EAAA,IAACN,EAAA,CACE,GAAI,OAAOC,GAAS,SACjB,CACE,OAAQA,EACR,MAAOA,CAAA,EAETM,EAAaN,CAAI,EACrB,QAAQ,YACR,MAAO,CACL,GAAGC,EACH,UAAW,UAAUC,CAAM,MAC7B,EACA,UAAWK,EAAAA,QAAK,WAAYJ,CAAS,EACpC,GAAGC,CAAA,CACN,EAIEE,EAAe,CACnB,GAAI,CACF,OAAQ,GACR,MAAO,EACT,EACA,GAAI,CACF,OAAQ,GACR,MAAO,EACT,EACA,GAAI,CACF,OAAQ,GACR,MAAO,EACT,EACA,GAAI,CACF,OAAQ,GACR,MAAO,EACT,EACA,GAAI,CACF,OAAQ,GACR,MAAO,EACT,EACC,MAAQ,CACP,OAAQ,GACR,MAAO,EAAA,CAEX"}
|
package/dist/components/Icon.mjs
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import d from "clsx";
|
|
4
|
-
const n = ({
|
|
5
|
-
i: h,
|
|
6
|
-
size: t = "md",
|
|
7
|
-
style: e,
|
|
8
|
-
rotate: i,
|
|
9
|
-
className: o,
|
|
10
|
-
...r
|
|
11
|
-
}) => /* @__PURE__ */ s(
|
|
4
|
+
const n = ({ i: h, size: t = "md", style: i, rotate: e, className: o, ...r }) => /* @__PURE__ */ s(
|
|
12
5
|
h,
|
|
13
6
|
{
|
|
14
7
|
...typeof t == "number" ? {
|
|
@@ -17,8 +10,8 @@ const n = ({
|
|
|
17
10
|
} : m[t],
|
|
18
11
|
viewBox: "0 0 24 24",
|
|
19
12
|
style: {
|
|
20
|
-
...
|
|
21
|
-
transform: `rotate(${
|
|
13
|
+
...i,
|
|
14
|
+
transform: `rotate(${e}deg)`
|
|
22
15
|
},
|
|
23
16
|
className: d("shrink-0", o),
|
|
24
17
|
...r
|
|
@@ -50,6 +43,6 @@ const n = ({
|
|
|
50
43
|
}
|
|
51
44
|
};
|
|
52
45
|
export {
|
|
53
|
-
n as
|
|
46
|
+
n as Icon
|
|
54
47
|
};
|
|
55
48
|
//# sourceMappingURL=Icon.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.mjs","sources":["../../src/components/Icon.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"Icon.mjs","sources":["../../src/components/Icon.tsx"],"sourcesContent":["'use client';\r\nimport clsx from 'clsx';\r\nimport React, { ComponentPropsWithoutRef } from 'react';\r\n\r\nexport type IconFC = React.FC<ComponentPropsWithoutRef<'svg'>>;\r\nexport interface IconProps extends ComponentPropsWithoutRef<'svg'> {\r\n i: IconFC;\r\n /**\r\n * @property xs: 16px\r\n * @property sm: 20px\r\n * @property md: 24px\r\n * @property lg: 28px\r\n * @property xl: 32px\r\n * @property 2xl: 40px\r\n */\r\n size?: keyof typeof stylesBySize | number;\r\n}\r\n\r\nexport const Icon = ({ i: I, size = 'md', style, rotate, className, ...rest }: IconProps) => {\r\n /* \r\n Para que no haya colisiones de ids al renderizar el icono en varios lados, le pasamos este id a la prop idprefix.\r\n Esta prop es agregada gracias al archivo svgr-dynamic-ids.js que se encuentra en la raíz del proyecto.\r\n */\r\n\r\n return (\r\n <I\r\n {...(typeof size === 'number'\r\n ? {\r\n height: size,\r\n width: size,\r\n }\r\n : stylesBySize[size])}\r\n viewBox=\"0 0 24 24\"\r\n style={{\r\n ...style,\r\n transform: `rotate(${rotate}deg)`,\r\n }}\r\n className={clsx('shrink-0', className)}\r\n {...rest}\r\n />\r\n );\r\n};\r\n\r\nconst stylesBySize = {\r\n xs: {\r\n height: 16,\r\n width: 16,\r\n },\r\n sm: {\r\n height: 20,\r\n width: 20,\r\n },\r\n md: {\r\n height: 24,\r\n width: 24,\r\n },\r\n lg: {\r\n height: 28,\r\n width: 28,\r\n },\r\n xl: {\r\n height: 32,\r\n width: 32,\r\n },\r\n ['2xl']: {\r\n height: 40,\r\n width: 40,\r\n },\r\n};\r\n"],"names":["Icon","I","size","style","rotate","className","rest","jsx","stylesBySize","clsx"],"mappings":";;;AAkBO,MAAMA,IAAO,CAAC,EAAE,GAAGC,GAAG,MAAAC,IAAO,MAAM,OAAAC,GAAO,QAAAC,GAAQ,WAAAC,GAAW,GAAGC,EAAA,MAOnE,gBAAAC;AAAA,EAACN;AAAA,EAAA;AAAA,IACE,GAAI,OAAOC,KAAS,WACjB;AAAA,MACE,QAAQA;AAAA,MACR,OAAOA;AAAA,IAAA,IAETM,EAAaN,CAAI;AAAA,IACrB,SAAQ;AAAA,IACR,OAAO;AAAA,MACL,GAAGC;AAAA,MACH,WAAW,UAAUC,CAAM;AAAA,IAC7B;AAAA,IACA,WAAWK,EAAK,YAAYJ,CAAS;AAAA,IACpC,GAAGC;AAAA,EAAA;AACN,GAIEE,IAAe;AAAA,EACnB,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAAA,EACA,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAAA,EACA,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAAA,EACA,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAAA,EACA,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAAA,EACC,OAAQ;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EAAA;AAEX;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpoint.cjs","sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["'use client';\r\nimport { useMatches } from '@mantine/core';\r\nimport { breakpointsWithPx } from '../mantine/breakpointsWithPx';\r\n\r\nexport const useBreakpoint = (breakpoint: keyof typeof breakpointsWithPx): boolean => {\r\n const result = useMatches({\r\n [breakpoint]: true,\r\n });\r\n\r\n return !!result;\r\n};\r\n"],"names":["useBreakpoint","breakpoint","useMatches"],"mappings":"8HAIaA,EAAiBC,GAKrB,CAAC,CAJOC,EAAAA,WAAW,CACxB,CAACD,CAAU,EAAG,EAAA,CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpoint.mjs","sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["'use client';\r\nimport { useMatches } from '@mantine/core';\r\nimport { breakpointsWithPx } from '../mantine/breakpointsWithPx';\r\n\r\nexport const useBreakpoint = (breakpoint: keyof typeof breakpointsWithPx): boolean => {\r\n const result = useMatches({\r\n [breakpoint]: true,\r\n });\r\n\r\n return !!result;\r\n};\r\n"],"names":["useBreakpoint","breakpoint","useMatches"],"mappings":";;AAIa,MAAAA,IAAgB,CAACC,MAKrB,CAAC,CAJOC,EAAW;AAAA,EACxB,CAACD,CAAU,GAAG;AAAA,CACf;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("next/navigation"),c=()=>{const a=n.useSearchParams();return{updateSearchParams:s=>{const e=new URLSearchParams(a.toString());Object.entries(s).forEach(([r,t])=>{if(t===null){e.delete(r);return}e.set(r,String(t))}),window?.history?.pushState(null,"",`?${e.toString()}`)},searchParams:a}};exports.useUpdateSearchParams=c;
|
|
2
|
+
//# sourceMappingURL=useUpdateSearchParams.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdateSearchParams.cjs","sources":["../../src/hooks/useUpdateSearchParams.ts"],"sourcesContent":["'use client';\r\nimport { useSearchParams } from 'next/navigation';\r\n\r\nexport const useUpdateSearchParams = () => {\r\n const searchParams = useSearchParams();\r\n\r\n const updateSearchParams = (newSearchparams: Record<string, string | number | null>) => {\r\n const params = new URLSearchParams(searchParams.toString());\r\n\r\n Object.entries(newSearchparams).forEach(([key, value]) => {\r\n if (value === null) {\r\n params.delete(key);\r\n return;\r\n }\r\n params.set(key, String(value));\r\n });\r\n\r\n window?.history?.pushState(null, '', `?${params.toString()}`);\r\n };\r\n\r\n return { updateSearchParams, searchParams };\r\n};\r\n"],"names":["useUpdateSearchParams","searchParams","useSearchParams","newSearchparams","params","key","value"],"mappings":"gIAGaA,EAAwB,IAAM,CACzC,MAAMC,EAAeC,EAAAA,gBAAgB,EAgB9B,MAAA,CAAE,mBAdmBC,GAA4D,CACtF,MAAMC,EAAS,IAAI,gBAAgBH,EAAa,UAAU,EAEnD,OAAA,QAAQE,CAAe,EAAE,QAAQ,CAAC,CAACE,EAAKC,CAAK,IAAM,CACxD,GAAIA,IAAU,KAAM,CAClBF,EAAO,OAAOC,CAAG,EACjB,MAAA,CAEFD,EAAO,IAAIC,EAAK,OAAOC,CAAK,CAAC,CAAA,CAC9B,EAEO,QAAA,SAAS,UAAU,KAAM,GAAI,IAAIF,EAAO,SAAU,CAAA,EAAE,CAC9D,EAE6B,aAAAH,CAAa,CAC5C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSearchParams as n } from "next/navigation";
|
|
3
|
+
const h = () => {
|
|
4
|
+
const a = n();
|
|
5
|
+
return { updateSearchParams: (s) => {
|
|
6
|
+
const r = new URLSearchParams(a.toString());
|
|
7
|
+
Object.entries(s).forEach(([t, e]) => {
|
|
8
|
+
if (e === null) {
|
|
9
|
+
r.delete(t);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
r.set(t, String(e));
|
|
13
|
+
}), window?.history?.pushState(null, "", `?${r.toString()}`);
|
|
14
|
+
}, searchParams: a };
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
h as useUpdateSearchParams
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useUpdateSearchParams.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdateSearchParams.mjs","sources":["../../src/hooks/useUpdateSearchParams.ts"],"sourcesContent":["'use client';\r\nimport { useSearchParams } from 'next/navigation';\r\n\r\nexport const useUpdateSearchParams = () => {\r\n const searchParams = useSearchParams();\r\n\r\n const updateSearchParams = (newSearchparams: Record<string, string | number | null>) => {\r\n const params = new URLSearchParams(searchParams.toString());\r\n\r\n Object.entries(newSearchparams).forEach(([key, value]) => {\r\n if (value === null) {\r\n params.delete(key);\r\n return;\r\n }\r\n params.set(key, String(value));\r\n });\r\n\r\n window?.history?.pushState(null, '', `?${params.toString()}`);\r\n };\r\n\r\n return { updateSearchParams, searchParams };\r\n};\r\n"],"names":["useUpdateSearchParams","searchParams","useSearchParams","newSearchparams","params","key","value"],"mappings":";;AAGO,MAAMA,IAAwB,MAAM;AACzC,QAAMC,IAAeC,EAAgB;AAgB9B,SAAA,EAAE,oBAdkB,CAACC,MAA4D;AACtF,UAAMC,IAAS,IAAI,gBAAgBH,EAAa,UAAU;AAEnD,WAAA,QAAQE,CAAe,EAAE,QAAQ,CAAC,CAACE,GAAKC,CAAK,MAAM;AACxD,UAAIA,MAAU,MAAM;AAClB,QAAAF,EAAO,OAAOC,CAAG;AACjB;AAAA,MAAA;AAEF,MAAAD,EAAO,IAAIC,GAAK,OAAOC,CAAK,CAAC;AAAA,IAAA,CAC9B,GAEO,QAAA,SAAS,UAAU,MAAM,IAAI,IAAIF,EAAO,SAAU,CAAA,EAAE;AAAA,EAC9D,GAE6B,cAAAH,EAAa;AAC5C;"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./components/EmptyState/index.cjs"),i=require("./components/InfinityLoader/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./components/EmptyState/index.cjs"),i=require("./components/InfinityLoader/index.cjs"),a=require("./components/SelectInfinity/index.cjs"),n=require("./components/NavItems.cjs"),s=require("./components/Icon.cjs"),u=require("./consts/http-status.cjs"),c=require("./consts/revalidate.cjs"),e=require("./contexts/NavigationHistoryContext/index.cjs"),r=require("./contexts/PageDataContext/index.cjs"),l=require("./form/Form.cjs"),d=require("./form/FormButtonSubmit.cjs"),y=require("./form/utils/zodValidator.cjs"),q=require("./form/utils/nullableInput.cjs"),m=require("./hocs/withForm.cjs"),p=require("./hocs/withModalManager.cjs"),P=require("./hooks/useBreakpoint.cjs"),S=require("./hooks/useFetchNextPageOnScroll.cjs"),g=require("./hooks/useOnScrollProgress.cjs"),f=require("./hooks/useUpdateSearchParams.cjs"),h=require("./mantine/breakpointsWithPx.cjs"),B=require("./mantine/toTailwindColors.cjs"),I=require("./utils/formatBytes.cjs"),v=require("./utils/ky/addBodyJsonHook.cjs"),N=require("./utils/ky/parseJson.cjs"),t=require("./utils/array/groupBy.cjs"),x=require("./utils/array/shuffleArray.cjs"),w=require("./utils/newHref.cjs"),F=require("./utils/isInfinityEmpty.cjs");exports.EmptyState=o.EmptyState;exports.InfinityLoader=i.InfinityLoader;exports.SelectInfinity=a.SelectInfinity;exports.NavItems=n.NavItems;exports.Icon=s.Icon;exports.HttpStatus=u.HttpStatus;exports.Revalidate=c.Revalidate;exports.NavigationHistoryProvider=e.NavigationHistoryProvider;exports.QP_BACK_URL_NAME=e.QP_BACK_URL_NAME;exports.useNavigationHistory=e.useNavigationHistory;exports.PageDataProvider=r.PageDataProvider;exports.usePageData=r.usePageData;exports.Form=l.Form;exports.FormButtonSubmit=d.FormButtonSubmit;exports.zodValidator=y.zodValidator;exports.nullableInput=q.nullableInput;exports.withForm=m.withForm;exports.withModalManager=p.withModalManager;exports.useBreakpoint=P.useBreakpoint;exports.useFetchNextPageOnScroll=S.useFetchNextPageOnScroll;exports.useOnScrollProgress=g.useOnScrollProgress;exports.useUpdateSearchParams=f.useUpdateSearchParams;exports.breakpointsWithPx=h.breakpointsWithPx;exports.toTailwindColors=B.toTailwindColors;exports.formatBytes=I.formatBytes;exports.addBodyJsonHook=v.addBodyJsonHook;exports.parseJSON=N.parseJSON;exports.groupBy=t.groupBy;exports.indexBy=t.indexBy;exports.shuffleArray=x.shuffleArray;exports.newHref=w.newHref;exports.isInfinityEmpty=F.isInfinityEmpty;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ import { MantineThemeColors } from '@mantine/core';
|
|
|
24
24
|
import { ModalProps } from '@mantine/core';
|
|
25
25
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
26
26
|
import { ReactNode } from 'react';
|
|
27
|
+
import { ReadonlyURLSearchParams } from 'next/navigation';
|
|
27
28
|
import { RefObject } from 'react';
|
|
28
29
|
import { SetStateAction } from 'react';
|
|
29
30
|
import { SubmitErrorHandler } from 'react-hook-form';
|
|
@@ -164,9 +165,11 @@ export declare enum HttpStatus {
|
|
|
164
165
|
NetworkAuthenticationRequired = 511
|
|
165
166
|
}
|
|
166
167
|
|
|
167
|
-
export declare
|
|
168
|
+
export declare const Icon: ({ i: I, size, style, rotate, className, ...rest }: IconProps) => JSX.Element;
|
|
168
169
|
|
|
169
|
-
export declare
|
|
170
|
+
export declare type IconFC = default_2.FC<ComponentPropsWithoutRef<'svg'>>;
|
|
171
|
+
|
|
172
|
+
export declare interface IconProps extends ComponentPropsWithoutRef<'svg'> {
|
|
170
173
|
i: IconFC;
|
|
171
174
|
/**
|
|
172
175
|
* @property xs: 16px
|
|
@@ -340,6 +343,8 @@ export declare type TSearchParams = {
|
|
|
340
343
|
[x: string]: any;
|
|
341
344
|
};
|
|
342
345
|
|
|
346
|
+
export declare const useBreakpoint: (breakpoint: keyof typeof breakpointsWithPx) => boolean;
|
|
347
|
+
|
|
343
348
|
export declare const useFetchNextPageOnScroll: (infinity: InfiniteQueryHookResult<InfiniteData<{
|
|
344
349
|
data: unknown[];
|
|
345
350
|
}, number>, Error>, elementRef?: RefObject<HTMLElement | null>) => void;
|
|
@@ -354,6 +359,11 @@ export declare const useOnScrollProgress: (triggerPercentage: number, callback:
|
|
|
354
359
|
|
|
355
360
|
export declare const usePageData: <T>() => T;
|
|
356
361
|
|
|
362
|
+
export declare const useUpdateSearchParams: () => {
|
|
363
|
+
updateSearchParams: (newSearchparams: Record<string, string | number | null>) => void;
|
|
364
|
+
searchParams: ReadonlyURLSearchParams;
|
|
365
|
+
};
|
|
366
|
+
|
|
357
367
|
export declare const withForm: <P extends unknown>(WrappedComponent: React.ComponentType<FormFieldProps<P>>, getControllerProps?: (props: P) => Omit<Partial<ControllerProps>, "render">) => FC<P & WithFormProps>;
|
|
358
368
|
|
|
359
369
|
export declare interface WithFormProps {
|
package/dist/index.mjs
CHANGED
|
@@ -1,61 +1,63 @@
|
|
|
1
|
-
import { EmptyState as
|
|
2
|
-
import { InfinityLoader as
|
|
3
|
-
import { SelectInfinity as
|
|
4
|
-
import { NavItems as
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import "@mantine/core";
|
|
1
|
+
import { EmptyState as t } from "./components/EmptyState/index.mjs";
|
|
2
|
+
import { InfinityLoader as m } from "./components/InfinityLoader/index.mjs";
|
|
3
|
+
import { SelectInfinity as f } from "./components/SelectInfinity/index.mjs";
|
|
4
|
+
import { NavItems as x } from "./components/NavItems.mjs";
|
|
5
|
+
import { Icon as n } from "./components/Icon.mjs";
|
|
6
|
+
import { HttpStatus as l } from "./consts/http-status.mjs";
|
|
7
|
+
import { Revalidate as u } from "./consts/revalidate.mjs";
|
|
8
|
+
import { NavigationHistoryProvider as P, QP_BACK_URL_NAME as g, useNavigationHistory as S } from "./contexts/NavigationHistoryContext/index.mjs";
|
|
9
|
+
import { PageDataProvider as c, usePageData as h } from "./contexts/PageDataContext/index.mjs";
|
|
10
|
+
import { Form as I } from "./form/Form.mjs";
|
|
11
|
+
import { FormButtonSubmit as H } from "./form/FormButtonSubmit.mjs";
|
|
12
|
+
import { zodValidator as F } from "./form/utils/zodValidator.mjs";
|
|
13
|
+
import { nullableInput as k } from "./form/utils/nullableInput.mjs";
|
|
14
|
+
import { withForm as E } from "./hocs/withForm.mjs";
|
|
15
|
+
import { withModalManager as O } from "./hocs/withModalManager.mjs";
|
|
16
|
+
import { useBreakpoint as C } from "./hooks/useBreakpoint.mjs";
|
|
18
17
|
import { useFetchNextPageOnScroll as J } from "./hooks/useFetchNextPageOnScroll.mjs";
|
|
19
18
|
import { useOnScrollProgress as R } from "./hooks/useOnScrollProgress.mjs";
|
|
20
|
-
import "
|
|
21
|
-
import { breakpointsWithPx as
|
|
22
|
-
import { toTailwindColors as
|
|
23
|
-
import { formatBytes as
|
|
24
|
-
import { addBodyJsonHook as
|
|
25
|
-
import { parseJSON as
|
|
26
|
-
import { groupBy as
|
|
27
|
-
import { shuffleArray as
|
|
28
|
-
import { newHref as
|
|
29
|
-
import { isInfinityEmpty as
|
|
19
|
+
import { useUpdateSearchParams as z } from "./hooks/useUpdateSearchParams.mjs";
|
|
20
|
+
import { breakpointsWithPx as Q } from "./mantine/breakpointsWithPx.mjs";
|
|
21
|
+
import { toTailwindColors as V } from "./mantine/toTailwindColors.mjs";
|
|
22
|
+
import { formatBytes as j } from "./utils/formatBytes.mjs";
|
|
23
|
+
import { addBodyJsonHook as G } from "./utils/ky/addBodyJsonHook.mjs";
|
|
24
|
+
import { parseJSON as Y } from "./utils/ky/parseJson.mjs";
|
|
25
|
+
import { groupBy as $, indexBy as oo } from "./utils/array/groupBy.mjs";
|
|
26
|
+
import { shuffleArray as to } from "./utils/array/shuffleArray.mjs";
|
|
27
|
+
import { newHref as mo } from "./utils/newHref.mjs";
|
|
28
|
+
import { isInfinityEmpty as fo } from "./utils/isInfinityEmpty.mjs";
|
|
30
29
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
g as
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
30
|
+
t as EmptyState,
|
|
31
|
+
I as Form,
|
|
32
|
+
H as FormButtonSubmit,
|
|
33
|
+
l as HttpStatus,
|
|
34
|
+
n as Icon,
|
|
35
|
+
m as InfinityLoader,
|
|
36
|
+
x as NavItems,
|
|
37
|
+
P as NavigationHistoryProvider,
|
|
38
|
+
c as PageDataProvider,
|
|
39
|
+
g as QP_BACK_URL_NAME,
|
|
40
|
+
u as Revalidate,
|
|
41
|
+
f as SelectInfinity,
|
|
42
|
+
G as addBodyJsonHook,
|
|
43
|
+
Q as breakpointsWithPx,
|
|
44
|
+
j as formatBytes,
|
|
45
|
+
$ as groupBy,
|
|
46
|
+
oo as indexBy,
|
|
47
|
+
fo as isInfinityEmpty,
|
|
48
|
+
mo as newHref,
|
|
49
|
+
k as nullableInput,
|
|
50
|
+
Y as parseJSON,
|
|
51
|
+
to as shuffleArray,
|
|
52
|
+
V as toTailwindColors,
|
|
53
|
+
C as useBreakpoint,
|
|
53
54
|
J as useFetchNextPageOnScroll,
|
|
54
|
-
|
|
55
|
+
S as useNavigationHistory,
|
|
55
56
|
R as useOnScrollProgress,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
h as usePageData,
|
|
58
|
+
z as useUpdateSearchParams,
|
|
59
|
+
E as withForm,
|
|
60
|
+
O as withModalManager,
|
|
61
|
+
F as zodValidator
|
|
60
62
|
};
|
|
61
63
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|