@loja-integrada/admin-components 1.0.20 → 1.0.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-7PDX5FMD.js +10 -0
- package/dist/index.js +7 -7
- package/dist/indicators/index.js +2 -2
- package/dist/layout/index.js +1 -1
- package/dist/lib/formatters.d.ts +1 -0
- package/dist/navigation/Pagination/index.js +1 -1
- package/dist/navigation/index.js +1 -1
- package/package.json +2 -1
- package/dist/chunk-GGBKRV24.js +0 -10
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { b } from './chunk-HZACKBIW.js';
|
|
2
|
+
import { a } from './chunk-OWG2V7MG.js';
|
|
3
|
+
import { a as a$1 } from './chunk-HQ53LHR2.js';
|
|
4
|
+
import { a as a$2 } from './chunk-REQIQLRI.js';
|
|
5
|
+
import E, { useMemo, useEffect, useRef, useState, useCallback } from 'react';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function C(n){return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}var k=({currentItemsLength:n,totalItemsLength:i=0,itemsLengthOptions:o,onItemsLengthChange:a,defaultItemsLengthOption:e})=>{let r=E.createRef(),s=u=>{let t=parseInt(u.currentTarget.value);a&&a(t);},l=useMemo(()=>o?.[0]?.value,[o]);if(useEffect(()=>{e&&r.current&&(r.current.value=e.toString(),a?.(e));},[e]),!n&&n!==0)return null;let m=Math.max(n,i);return jsx("div",{className:"pagination-info hidden sm:flex",children:jsxs("div",{className:"text-f6 mr-5 flex items-center tracking-4 text-inverted-2",children:[o&&o?.length>0&&n>=l?jsx(b,{ref:r,id:"selectItemsPerPage",options:o,withoutStyle:!0,"aria-label":"Itens por p\xE1gina",onChange:s,className:"h-6",defaultValue:e}):jsxs("span",{children:["Mostrando"," ",jsx("span",{className:"pagination-info-current",children:n})]}),"\xA0de\xA0",jsx("span",{className:"pagination-info-total",children:C(m)}),"\xA0no total"]})})},g=E.memo(k);g.displayName="PaginationInfo";var L=({currentPage:n=1,totalPages:i=1,onPageChange:o})=>{let a$2=useRef(null),e=useMemo(()=>Math.max(n,i),[n,i]),r=useMemo(()=>n<i,[n,i]),s=useMemo(()=>n>1,[n]),l=t=>{t=t<1?1:t>e?e:t,o&&o(t);},m=t=>(t.preventDefault(),!1),u=t=>{if(t.key==="Enter"){let c=a$2?.current?.value;if(c){let v=parseInt(c);l(v);}t.preventDefault();return}};return useEffect(()=>{a$2?.current&&(a$2.current.value=n.toString());},[n]),jsxs("div",{className:"pagination-nav flex w-full items-center justify-between sm:w-auto",children:[jsxs("div",{className:"text-f6 text-inverted-2",children:[jsx(a,{ref:a$2,maxLength:3,formatValue:"onlyNumber",className:"pagination-nav-current mr-1 h-8 w-9 border-card-stroke/50 p-0 text-center font-semibold text-primary",formGroupClassName:"inline-flex",onKeyDown:u,onCopy:m,onCut:m,onPaste:m,defaultValue:n}),"/"," ",jsx("button",{type:"button",id:"btnPaginationLastPage",className:"pagination-nav-total focus:outline-none",onClick:()=>{n!==e&&l(e);},children:e})]}),jsxs("div",{className:"ml-5 flex items-center text-inverted-2",children:[jsx("button",{type:"button",id:"btnPaginationPrev",className:`pagination-nav-previous mr-3 outline-none duration-200 ${s?"hover:text-inverted-1":""}`,"aria-label":"Ir para p\xE1gina anterior",onClick:()=>{s&&l(n-1);},children:jsx(a$1,{icon:"arrowLeft",size:4})}),jsx("button",{type:"button",id:"btnPaginationNext",className:`pagination-nav-next outline-none duration-200 ${r?"hover:text-inverted-1":""}`,"aria-label":"Ir para pr\xF3xima p\xE1gina",onClick:()=>{r&&l(n+1);},children:jsx(a$1,{icon:"arrowRight",size:4})})]})]})},N=E.memo(L);N.displayName="PaginationNav";var w=[{label:"Mostrando 25",value:25},{label:"Mostrando 50",value:50},{label:"Mostrando 75",value:75},{label:"Mostrando 100",value:100}],B=({className:n="",currentPage:i=1,totalPages:o,defaultItemsLengthOption:a=w[0].value,onPageChange:e,currentItemsLength:r,totalItemsLength:s,itemsLengthOptions:l=w,onItemsLengthChange:m})=>{let[u,t]=useState(a),c=s&&Math.ceil(s/u),v=o||c;useEffect(()=>{t(a);},[a]);let R=useCallback(x=>{t(x),m&&m(x);},[]);return jsxs("div",{className:a$2("pagination flex flex-wrap items-center justify-end leading-4 sm:justify-between",n),children:[jsx(g,{currentItemsLength:r,totalItemsLength:s,itemsLengthOptions:l,onItemsLengthChange:R,defaultItemsLengthOption:u}),jsx(N,{currentPage:i,totalPages:v,onPageChange:e})]})},F=E.memo(B);F.displayName="Pagination";
|
|
9
|
+
|
|
10
|
+
export { F as a };
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import './chunk-7RP4L6ZM.js';
|
|
2
2
|
import './chunk-DBWOW4GL.js';
|
|
3
3
|
import './chunk-4PUGMMDC.js';
|
|
4
|
-
export { b as
|
|
5
|
-
export { a as
|
|
4
|
+
export { b as Box, d as BoxContent, c as BoxHeader, a as BoxSeparator } from './chunk-2JW67CO5.js';
|
|
5
|
+
export { a as Container, b as ContainerHeader } from './chunk-3BKW5XAK.js';
|
|
6
6
|
export { a as Breadcrumb } from './chunk-FZISHDWC.js';
|
|
7
7
|
export { a as HelpLink } from './chunk-SXBDHD2Z.js';
|
|
8
|
-
export { a as Pagination } from './chunk-
|
|
8
|
+
export { a as Pagination } from './chunk-7PDX5FMD.js';
|
|
9
9
|
export { a as Stepper } from './chunk-I7PCF2VW.js';
|
|
10
10
|
import './chunk-DIFKNF3L.js';
|
|
11
11
|
export { a as IconCircular } from './chunk-BV27BOLB.js';
|
|
12
12
|
import './chunk-BQWNCDFV.js';
|
|
13
13
|
export { b as Select, a as SelectComponent } from './chunk-HZACKBIW.js';
|
|
14
14
|
export { a as Dropdown } from './chunk-I757C3JI.js';
|
|
15
|
-
export { a as ActionBar } from './chunk-KZ5LLL3X.js';
|
|
16
|
-
export { b as Box, d as BoxContent, c as BoxHeader, a as BoxSeparator } from './chunk-2JW67CO5.js';
|
|
17
|
-
export { a as Container, b as ContainerHeader } from './chunk-3BKW5XAK.js';
|
|
18
|
-
import './chunk-L6H2NDVS.js';
|
|
19
15
|
export { a as Alert } from './chunk-FM3XVRKO.js';
|
|
20
16
|
export { a as Badge } from './chunk-72QPS6JN.js';
|
|
21
17
|
export { a as Tag } from './chunk-7TKVMHZG.js';
|
|
18
|
+
export { b as ToastContainer, a as notify } from './chunk-EHRQIKSI.js';
|
|
19
|
+
export { a as Tooltip } from './chunk-TZI6YTCW.js';
|
|
20
|
+
export { a as ActionBar } from './chunk-KZ5LLL3X.js';
|
|
21
|
+
import './chunk-L6H2NDVS.js';
|
|
22
22
|
export { a as Button } from './chunk-HHPP5PSK.js';
|
|
23
23
|
export { a as DataTable } from './chunk-CWI3HRJ4.js';
|
|
24
24
|
export { a as Checkbox } from './chunk-DIENJUYM.js';
|
package/dist/indicators/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../chunk-7RP4L6ZM.js';
|
|
2
|
-
export { b as ToastContainer, a as notify } from '../chunk-EHRQIKSI.js';
|
|
3
|
-
export { a as Tooltip } from '../chunk-TZI6YTCW.js';
|
|
4
2
|
export { a as Alert } from '../chunk-FM3XVRKO.js';
|
|
5
3
|
export { a as Badge } from '../chunk-72QPS6JN.js';
|
|
6
4
|
export { a as Tag } from '../chunk-7TKVMHZG.js';
|
|
5
|
+
export { b as ToastContainer, a as notify } from '../chunk-EHRQIKSI.js';
|
|
6
|
+
export { a as Tooltip } from '../chunk-TZI6YTCW.js';
|
|
7
7
|
import '../chunk-HHPP5PSK.js';
|
|
8
8
|
import '../chunk-LTWCICTK.js';
|
|
9
9
|
import '../chunk-HQ53LHR2.js';
|
package/dist/layout/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../chunk-DBWOW4GL.js';
|
|
2
|
-
export { a as ActionBar } from '../chunk-KZ5LLL3X.js';
|
|
3
2
|
export { b as Box, d as BoxContent, c as BoxHeader, a as BoxSeparator } from '../chunk-2JW67CO5.js';
|
|
4
3
|
export { a as Container, b as ContainerHeader } from '../chunk-3BKW5XAK.js';
|
|
4
|
+
export { a as ActionBar } from '../chunk-KZ5LLL3X.js';
|
|
5
5
|
import '../chunk-L6H2NDVS.js';
|
|
6
6
|
import '../chunk-HHPP5PSK.js';
|
|
7
7
|
import '../chunk-LTWCICTK.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function numberWithDots(number: string | number): string;
|
package/dist/navigation/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../chunk-4PUGMMDC.js';
|
|
2
2
|
export { a as Breadcrumb } from '../chunk-FZISHDWC.js';
|
|
3
3
|
export { a as HelpLink } from '../chunk-SXBDHD2Z.js';
|
|
4
|
-
export { a as Pagination } from '../chunk-
|
|
4
|
+
export { a as Pagination } from '../chunk-7PDX5FMD.js';
|
|
5
5
|
export { a as Stepper } from '../chunk-I7PCF2VW.js';
|
|
6
6
|
import '../chunk-BQWNCDFV.js';
|
|
7
7
|
import '../chunk-HZACKBIW.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loja-integrada/admin-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"author": "Loja Integrada",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"./style.css": "./dist/index.css",
|
|
66
66
|
"./utils": "./dist/lib/utils.js",
|
|
67
|
+
"./formatters": "./dist/lib/formatters.js",
|
|
67
68
|
"./package.json": "./package.json",
|
|
68
69
|
"./Button": {
|
|
69
70
|
"types": "./dist/components/Button/Button.d.ts",
|
package/dist/chunk-GGBKRV24.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { b } from './chunk-HZACKBIW.js';
|
|
2
|
-
import { a } from './chunk-OWG2V7MG.js';
|
|
3
|
-
import { a as a$1 } from './chunk-HQ53LHR2.js';
|
|
4
|
-
import { a as a$2 } from './chunk-REQIQLRI.js';
|
|
5
|
-
import E, { useMemo, useRef, useState, useCallback } from 'react';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var T=({currentItemsLength:n,totalItemsLength:e=0,itemsLengthOptions:t,onItemsLengthChange:l,defaultItemsLengthOption:o})=>{let m=r=>{let u=parseInt(r.currentTarget.value);l&&l(u);},i=useMemo(()=>{if(n)return Math.max(n,e)},[n,e]),s=useMemo(()=>t?.[0]?.value,[t]);return !n&&n!==0?null:jsx("div",{className:"pagination-info hidden sm:flex",children:jsxs("div",{className:"text-f6 mr-5 flex items-center tracking-4 text-inverted-2",children:[t&&t?.length>0&&n>=s?jsx(b,{id:"selectItemsPerPage",options:t,withoutStyle:!0,"aria-label":"Itens por p\xE1gina",onChange:m,className:"h-6",defaultValue:o}):jsxs("span",{children:["Mostrando"," ",jsx("span",{className:"pagination-info-current",children:n})]}),"\xA0de\xA0",jsx("span",{className:"pagination-info-total",children:i}),"\xA0no total"]})})},g=E.memo(T);g.displayName="PaginationInfo";var O=({currentPage:n=1,totalPages:e=1,onPageChange:t})=>{let l=useRef(null),o=useMemo(()=>Math.max(n,e),[n,e]),m=useMemo(()=>n<e,[n,e]),i=useMemo(()=>n>1,[n]),s=a=>{a=a<1?1:a>o?o:a,t&&t(a);},r=a=>(a.preventDefault(),!1);return jsxs("div",{className:"pagination-nav flex w-full items-center justify-between sm:w-auto",children:[jsxs("div",{className:"text-f6 text-inverted-2",children:[jsx(a,{ref:l,maxLength:3,formatValue:"onlyNumber",className:"pagination-nav-current mr-1 h-8 w-9 border-card-stroke/50 p-0 text-center font-semibold text-primary",formGroupClassName:"inline-flex",onKeyDown:a=>{if(a.key==="Enter"){let f=l?.current?.value;if(f){let d=parseInt(f);s(d);}a.preventDefault();return}},onCopy:r,onCut:r,onPaste:r,defaultValue:n}),"/"," ",jsx("button",{type:"button",id:"btnPaginationLastPage",className:"pagination-nav-total focus:outline-none",onClick:()=>{n!==o&&s(o);},children:o})]}),jsxs("div",{className:"ml-5 flex items-center text-inverted-2",children:[jsx("button",{type:"button",id:"btnPaginationPrev",className:`pagination-nav-previous mr-3 outline-none duration-200 ${i?"hover:text-inverted-1":""}`,"aria-label":"Ir para p\xE1gina anterior",onClick:()=>{i&&s(n-1);},children:jsx(a$1,{icon:"arrowLeft",size:4})}),jsx("button",{type:"button",id:"btnPaginationNext",className:`pagination-nav-next outline-none duration-200 ${m?"hover:text-inverted-1":""}`,"aria-label":"Ir para pr\xF3xima p\xE1gina",onClick:()=>{m&&s(n+1);},children:jsx(a$1,{icon:"arrowRight",size:4})})]})]})},N=E.memo(O);N.displayName="PaginationNav";var w=[{label:"Mostrando 25",value:25},{label:"Mostrando 50",value:50},{label:"Mostrando 75",value:75},{label:"Mostrando 100",value:100}],H=({className:n="",currentPage:e=1,totalPages:t,defaultItemsLengthOption:l=w[0].value,onPageChange:o,currentItemsLength:m,totalItemsLength:i,itemsLengthOptions:s=w,onItemsLengthChange:r})=>{let[u,a]=useState(l),f=i&&Math.ceil(i/u),d=t||f,k=useCallback(x=>{a(x),r&&r(x);},[]);return jsxs("div",{className:a$2("pagination flex flex-wrap items-center justify-end leading-4 sm:justify-between",n),children:[jsx(g,{currentItemsLength:m,totalItemsLength:i,itemsLengthOptions:s,onItemsLengthChange:k,defaultItemsLengthOption:u}),jsx(N,{currentPage:e,totalPages:d,onPageChange:o})]})},z=E.memo(H);z.displayName="Pagination";
|
|
9
|
-
|
|
10
|
-
export { z as a };
|