@loja-integrada/admin-components 1.0.12 → 1.0.13
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.
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { b } from './chunk-HZACKBIW.js';
|
|
2
|
+
import { a } from './chunk-HQ53LHR2.js';
|
|
3
|
+
import { a as a$1 } from './chunk-REQIQLRI.js';
|
|
4
|
+
import y, { useMemo, useRef } from 'react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var I=({currentItemsLength:n,totalItemsLength:a=0,itemsLengthOptions:i,onItemsLengthChange:r})=>{let e=l=>{let o=l.currentTarget.value;r&&r(o);},s=useMemo(()=>{if(n)return Math.max(n,a)},[n,a]);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:[i?jsx(b,{id:"selectItemsPerPage",options:i,withoutStyle:!0,"aria-label":"Itens por p\xE1gina",onChange:e,className:"h-6"}):jsxs("span",{children:["Mostrando"," ",jsx("span",{className:"pagination-info-current",children:n})]}),"\xA0de\xA0",jsx("span",{className:"pagination-info-total",children:s}),"\xA0no total"]})})},u=y.memo(I);u.displayName="PaginationInfo";var M=({currentPage:n=1,totalPages:a$1=1,onPageChange:i})=>{let r=useRef(null),e=useMemo(()=>Math.max(n,a$1),[n,a$1]),s=useMemo(()=>n<a$1,[n,a$1]),l=useMemo(()=>n>1,[n]),o=t=>{t=t<1?1:t>e?e:t,i&&i(t);},c=t=>(t.preventDefault(),!1);return jsxs("div",{className:"pagination-nav flex w-full items-center justify-between sm:w-auto",children:[jsxs("div",{className:"text-f6 tracking-4 text-inverted-2",children:[jsx("span",{id:"btnPaginationActualPage",className:"pagination-nav-current inline-block w-9 rounded border border-card-stroke/50 bg-base-1 text-center font-semibold leading-8 text-primary outline-none transition-colors focus-within:border-inverted-1 focus:border-inverted-1",ref:r,contentEditable:!0,suppressContentEditableWarning:!0,onKeyDown:t=>{if(!(t.which>=35&&t.which<=39)&&!(t.which===46||t.which===8)){if(t.which===13){let b=r?.current?.innerText;if(b){let w=parseInt(b);o(w);}t.preventDefault();return}isNaN(parseInt(String.fromCharCode(t.which)))&&t.preventDefault();}},onCopy:c,onCut:c,onPaste:c,children:n})," ","/"," ",jsx("button",{type:"button",id:"btnPaginationLastPage",className:"pagination-nav-total focus:outline-none",onClick:()=>{n!==e&&o(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 ${l?"hover:text-inverted-1":""}`,"aria-label":"Ir para p\xE1gina anterior",onClick:()=>{l&&o(n-1);},children:jsx(a,{icon:"arrowLeft",size:4})}),jsx("button",{type:"button",id:"btnPaginationNext",className:`pagination-nav-next outline-none duration-200 ${s?"hover:text-inverted-1":""}`,"aria-label":"Ir para pr\xF3xima p\xE1gina",onClick:()=>{s&&o(n+1);},children:jsx(a,{icon:"arrowRight",size:4})})]})]})},v=y.memo(M);v.displayName="PaginationNav";var R=({className:n="",currentPage:a=1,totalPages:i=1,onPageChange:r,currentItemsLength:e,totalItemsLength:s,itemsLengthOptions:l,onItemsLengthChange:o})=>jsxs("div",{className:a$1("pagination flex flex-wrap items-center justify-end leading-4 sm:justify-between",n),children:[jsx(u,{currentItemsLength:e,totalItemsLength:s,itemsLengthOptions:l,onItemsLengthChange:o}),jsx(v,{currentPage:a,totalPages:i,onPageChange:r})]}),L=y.memo(R);L.displayName="Pagination";
|
|
8
|
+
|
|
9
|
+
export { L as a };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './chunk-7RP4L6ZM.js';
|
|
2
2
|
import './chunk-DBWOW4GL.js';
|
|
3
3
|
import './chunk-4PUGMMDC.js';
|
|
4
|
-
export { a as
|
|
4
|
+
export { a as Container, b as ContainerHeader } from './chunk-3BKW5XAK.js';
|
|
5
5
|
export { a as Breadcrumb } from './chunk-FZISHDWC.js';
|
|
6
6
|
export { a as HelpLink } from './chunk-SXBDHD2Z.js';
|
|
7
|
-
export { a as Pagination } from './chunk-
|
|
7
|
+
export { a as Pagination } from './chunk-TKA7LHSA.js';
|
|
8
8
|
export { a as Stepper } from './chunk-I7PCF2VW.js';
|
|
9
9
|
import './chunk-DIFKNF3L.js';
|
|
10
10
|
export { a as IconCircular } from './chunk-BV27BOLB.js';
|
|
@@ -14,15 +14,15 @@ export { b as Select, a as SelectComponent } from './chunk-HZACKBIW.js';
|
|
|
14
14
|
export { a as InputMask } from './chunk-ABMMRP7O.js';
|
|
15
15
|
export { a as Input } from './chunk-FNTWCBA6.js';
|
|
16
16
|
export { a as InputLabel } from './chunk-7Z3CCBLX.js';
|
|
17
|
-
export { a as ActionBar } from './chunk-UQTLNERO.js';
|
|
18
|
-
export { b as Box, d as BoxContent, c as BoxHeader, a as BoxSeparator } from './chunk-IGUCTFH2.js';
|
|
19
|
-
export { a as Container, b as ContainerHeader } from './chunk-3BKW5XAK.js';
|
|
20
|
-
import './chunk-L6H2NDVS.js';
|
|
21
17
|
export { a as Alert } from './chunk-FM3XVRKO.js';
|
|
22
18
|
export { a as Badge } from './chunk-72QPS6JN.js';
|
|
23
19
|
export { a as Tag } from './chunk-2B6HWISX.js';
|
|
24
|
-
export { a as Button } from './chunk-T7A7CWOV.js';
|
|
25
20
|
export { b as ToastContainer, a as notify } from './chunk-EHRQIKSI.js';
|
|
21
|
+
export { a as Tooltip } from './chunk-TZI6YTCW.js';
|
|
22
|
+
export { a as ActionBar } from './chunk-UQTLNERO.js';
|
|
23
|
+
import './chunk-L6H2NDVS.js';
|
|
24
|
+
export { a as Button } from './chunk-T7A7CWOV.js';
|
|
25
|
+
export { b as Box, d as BoxContent, c as BoxHeader, a as BoxSeparator } from './chunk-IGUCTFH2.js';
|
|
26
26
|
export { a as DataTable } from './chunk-3O4Z3XLF.js';
|
|
27
27
|
export { a as LoadingPlaceholder } from './chunk-IPIBO3ES.js';
|
|
28
28
|
export { a as Modal } from './chunk-2J6WGYVP.js';
|
package/dist/indicators/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../chunk-7RP4L6ZM.js';
|
|
2
|
-
export { a as Tooltip } from '../chunk-TZI6YTCW.js';
|
|
3
2
|
export { a as Alert } from '../chunk-FM3XVRKO.js';
|
|
4
3
|
export { a as Badge } from '../chunk-72QPS6JN.js';
|
|
5
4
|
export { a as Tag } from '../chunk-2B6HWISX.js';
|
|
6
|
-
import '../chunk-T7A7CWOV.js';
|
|
7
5
|
export { b as ToastContainer, a as notify } from '../chunk-EHRQIKSI.js';
|
|
6
|
+
export { a as Tooltip } from '../chunk-TZI6YTCW.js';
|
|
7
|
+
import '../chunk-T7A7CWOV.js';
|
|
8
8
|
import '../chunk-LTWCICTK.js';
|
|
9
9
|
import '../chunk-HQ53LHR2.js';
|
|
10
10
|
import '../chunk-EVEOC5I2.js';
|
package/dist/layout/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../chunk-DBWOW4GL.js';
|
|
2
|
-
export { a as ActionBar } from '../chunk-UQTLNERO.js';
|
|
3
|
-
export { b as Box, d as BoxContent, c as BoxHeader, a as BoxSeparator } from '../chunk-IGUCTFH2.js';
|
|
4
2
|
export { a as Container, b as ContainerHeader } from '../chunk-3BKW5XAK.js';
|
|
3
|
+
export { a as ActionBar } from '../chunk-UQTLNERO.js';
|
|
5
4
|
import '../chunk-L6H2NDVS.js';
|
|
6
5
|
import '../chunk-T7A7CWOV.js';
|
|
6
|
+
export { b as Box, d as BoxContent, c as BoxHeader, a as BoxSeparator } from '../chunk-IGUCTFH2.js';
|
|
7
7
|
import '../chunk-LTWCICTK.js';
|
|
8
8
|
import '../chunk-HQ53LHR2.js';
|
|
9
9
|
import '../chunk-EVEOC5I2.js';
|
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-TKA7LHSA.js';
|
|
5
5
|
export { a as Stepper } from '../chunk-I7PCF2VW.js';
|
|
6
6
|
import '../chunk-HZACKBIW.js';
|
|
7
7
|
import '../chunk-7Z3CCBLX.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.13",
|
|
4
4
|
"author": "Loja Integrada",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"tsup": "^8.1.0",
|
|
33
33
|
"typescript": "^5.3.3",
|
|
34
34
|
"vite": "^5.1.4",
|
|
35
|
+
"@loja-integrada/eslint-config": "0.0.3",
|
|
35
36
|
"@loja-integrada/tailwindcss-config": "2.0.2",
|
|
36
|
-
"@loja-integrada/eslint-config": "0.0.2",
|
|
37
37
|
"@loja-integrada/typescript-config": "0.0.2"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
"gen-entry": "node scripts/entry-points.js",
|
|
182
182
|
"dev": "tsup --watch",
|
|
183
183
|
"lint": "eslint . && prettier --check .",
|
|
184
|
-
"format": "
|
|
184
|
+
"format": "prettier --write . && eslint --fix .",
|
|
185
185
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
186
186
|
"test": "cypress run --component",
|
|
187
187
|
"test-visual": "cypress open --component"
|
package/dist/chunk-C5IV2FYP.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { b } from './chunk-HZACKBIW.js';
|
|
2
|
-
import { a } from './chunk-HQ53LHR2.js';
|
|
3
|
-
import { a as a$1 } from './chunk-REQIQLRI.js';
|
|
4
|
-
import y, { useMemo, useRef } from 'react';
|
|
5
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var I=({currentItemsLength:n,totalItemsLength:a=0,itemsLengthOptions:i,onItemsLengthChange:r})=>{let e=l=>{let o=l.currentTarget.value;r&&r(o);},s=useMemo(()=>{if(n)return Math.max(n,a)},[n,a]);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:[i?jsx(b,{id:"selectItemsPerPage",options:i,withoutStyle:!0,"aria-label":"Itens por p\xE1gina",onChange:e,className:"h-6"}):jsxs("span",{children:["Mostrando ",jsx("span",{className:"pagination-info-current",children:n})]}),"\xA0de\xA0",jsx("span",{className:"pagination-info-total",children:s}),"\xA0no total"]})})},u=y.memo(I);u.displayName="PaginationInfo";var M=({currentPage:n=1,totalPages:a$1=1,onPageChange:i})=>{let r=useRef(null),e=useMemo(()=>Math.max(n,a$1),[n,a$1]),s=useMemo(()=>n<a$1,[n,a$1]),l=useMemo(()=>n>1,[n]),o=t=>{t=t<1?1:t>e?e:t,i&&i(t);},c=t=>(t.preventDefault(),!1);return jsxs("div",{className:"pagination-nav flex w-full items-center justify-between sm:w-auto",children:[jsxs("div",{className:"text-f6 tracking-4 text-inverted-2",children:[jsx("span",{id:"btnPaginationActualPage",className:"pagination-nav-current inline-block w-9 rounded border border-card-stroke/50 bg-base-1 text-center font-semibold leading-8 text-primary outline-none transition-colors focus-within:border-inverted-1 focus:border-inverted-1",ref:r,contentEditable:!0,suppressContentEditableWarning:!0,onKeyDown:t=>{if(!(t.which>=35&&t.which<=39)&&!(t.which===46||t.which===8)){if(t.which===13){let b=r?.current?.innerText;if(b){let w=parseInt(b);o(w);}t.preventDefault();return}isNaN(parseInt(String.fromCharCode(t.which)))&&t.preventDefault();}},onCopy:c,onCut:c,onPaste:c,children:n})," ","/"," ",jsx("button",{type:"button",id:"btnPaginationLastPage",className:"pagination-nav-total focus:outline-none",onClick:()=>{n!==e&&o(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 ${l?"hover:text-inverted-1":""}`,"aria-label":"Ir para p\xE1gina anterior",onClick:()=>{l&&o(n-1);},children:jsx(a,{icon:"arrowLeft",size:4})}),jsx("button",{type:"button",id:"btnPaginationNext",className:`pagination-nav-next outline-none duration-200 ${s?"hover:text-inverted-1":""}`,"aria-label":"Ir para pr\xF3xima p\xE1gina",onClick:()=>{s&&o(n+1);},children:jsx(a,{icon:"arrowRight",size:4})})]})]})},v=y.memo(M);v.displayName="PaginationNav";var R=({className:n="",currentPage:a=1,totalPages:i=1,onPageChange:r,currentItemsLength:e,totalItemsLength:s,itemsLengthOptions:l,onItemsLengthChange:o})=>jsxs("div",{className:a$1("pagination flex flex-wrap items-center justify-end leading-4 sm:justify-between",n),children:[jsx(u,{currentItemsLength:e,totalItemsLength:s,itemsLengthOptions:l,onItemsLengthChange:o}),jsx(v,{currentPage:a,totalPages:i,onPageChange:r})]}),L=y.memo(R);L.displayName="Pagination";
|
|
8
|
-
|
|
9
|
-
export { L as a };
|