@loja-integrada/admin-components 1.0.10 → 1.0.11
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-72QPS6JN.js +8 -0
- package/dist/{chunk-6PFQJJHT.js → chunk-ABMMRP7O.js} +1 -1
- package/dist/{chunk-4ETDF3ZY.js → chunk-FNTWCBA6.js} +1 -1
- package/dist/chunk-T46I7KD2.js +10 -0
- package/dist/chunk-UYUM2DWH.js +9 -0
- package/dist/forms/Input/index.js +1 -1
- package/dist/forms/InputMask/index.js +2 -2
- package/dist/forms/Select/Select.d.ts +6 -2
- package/dist/forms/Select/index.js +1 -1
- package/dist/forms/index.js +3 -3
- package/dist/index.js +11 -11
- package/dist/indicators/Badge/Badge.d.ts +1 -5
- package/dist/indicators/Badge/index.js +1 -1
- package/dist/indicators/index.js +3 -3
- package/dist/layout/index.js +2 -2
- package/dist/navigation/Pagination/index.js +2 -2
- package/dist/navigation/index.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-BLEJ5LCZ.js +0 -10
- package/dist/chunk-M4V7OPDZ.js +0 -8
- package/dist/chunk-ZRJQNS4S.js +0 -9
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { a } from './chunk-REQIQLRI.js';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import l from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var o=cva("badge inline-flex items-center font-semibold",{variants:{type:{neutral:"bg-inverted-2 text-base-1",neutralLight:"bg-inverted-3 text-tertiary",primary:"bg-primary-dark text-base-1",danger:"bg-danger-dark text-base-1",success:"bg-success-dark text-base-1",warning:"bg-warning-dark text-base-1",focus:"bg-focus text-base-1"},size:{default:"text-f7 h-5 px-2 py-0.5",small:"text-f7 h-4 px-2",xsmall:"text-f8 h-3 px-0.5 py-px"},rounded:{full:"rounded-full",small:"rounded",none:"rounded-none"}},defaultVariants:{type:"primary",size:"default"}}),i=({type:t="neutral",text:a$1,size:r="default",rounded:s="full",className:n=""})=>jsx("div",{className:a(o({type:t,size:r,rounded:s}),n),children:a$1}),g=l.memo(i);g.displayName="Badge";
|
|
7
|
+
|
|
8
|
+
export { g as a };
|
|
@@ -5,6 +5,6 @@ import { cva } from 'class-variance-authority';
|
|
|
5
5
|
import h, { useMemo } from 'react';
|
|
6
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
-
var V=cva("peer text-f6 flex w-full min-w-0 appearance-none overflow-hidden rounded border border-card-stroke bg-base-1 px-4 text-on-base shadow-none outline-none transition-colors placeholder:text-on-base-
|
|
8
|
+
var V=cva("peer text-f6 flex w-full min-w-0 appearance-none overflow-hidden rounded border border-card-stroke bg-base-1 px-4 text-on-base shadow-none outline-none transition-colors placeholder:text-on-base-2 focus-within:border-inverted-1 focus:border-inverted-1",{variants:{variant:{default:"h-12",small:"h-10",large:"h-14",xlarge:"h-24"},hasErrorState:{true:"border-danger focus:border-danger [&~.adornment]:border-danger [&~.adornment]:focus:border-danger"},disabled:{true:"pointer-events-none bg-base-3 text-on-base-2"},readOnly:{true:"bg-base-2"},prefixBorder:{true:"[&~.adornment.prefix]:border-r"},sufixBorder:{true:"[&~.adornment.sufix]:border-l"},hasPrefix:{true:"pl-[4.5rem]"},hasSufix:{true:"pr-[4.5rem]"}},compoundVariants:[{hasPrefix:!0,prefixBorder:!1,class:"pl-14"},{hasSufix:!0,sufixBorder:!1,class:"pr-14"}],defaultVariants:{variant:"default",hasErrorState:!1,disabled:!1,readOnly:!1}}),b="adornment border-card-stroke flex justify-center items-center absolute bottom-0 w-14 h-full text-f6 text-inverted-2 -mt-px peer-focus:border-inverted-1 transition-colors",k=({className:g="",formGroupClassName:I="",label:v,labelComplement:N,helpText:P,hasError:R=!1,errorMessage:o,required:n=!1,id:w,name:s,variant:E="default",disabled:l,readOnly:d,type:T="text",prefix:i,sufix:p,prefixBorder:H=!0,sufixBorder:L=!0,...S},y)=>{let B=useMemo(()=>Math.random().toString(36).substring(7),[]),t=w||s||B,a$3=R||!!o,u=!!p,f=!!i,C=jsx(a,{label:v,labelComplement:N,required:n,hasError:a$3,htmlFor:t,className:"mb-1"}),F=jsx(a$1,{helpText:o||P,hasError:a$3,className:"mt-2"});return jsxs("div",{className:a$2("form-group flex flex-col",I),children:[C,jsxs("div",{className:"relative",children:[jsx("input",{ref:y,type:T,id:t,name:s,required:n,disabled:l,readOnly:d,className:a$2(V({variant:E,hasErrorState:a$3,disabled:l,readOnly:d,className:g,prefixBorder:H,sufixBorder:L,hasSufix:u,hasPrefix:f})),...S}),f?jsx("label",{htmlFor:t,className:a$2("prefix left-0",b),children:i}):null,u?jsx("label",{htmlFor:t,className:a$2("sufix right-0",b),children:p}):null]}),F]})},q=h.forwardRef(k),A=h.memo(q);A.displayName="Input";
|
|
9
9
|
|
|
10
10
|
export { A as a };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { a } from './chunk-7Z3CCBLX.js';
|
|
2
|
+
import { a as a$1 } from './chunk-G3GCVCTU.js';
|
|
3
|
+
import { a as a$2 } from './chunk-REQIQLRI.js';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import b from 'react';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var E=cva("w-full min-w-0 cursor-pointer appearance-none rounded border border-card-stroke bg-base-1 bg-no-repeat pl-4 pr-8 text-sm tracking-4 text-on-base shadow-none outline-none transition-colors duration-75 placeholder:text-on-base-2 focus:border-inverted-1",{variants:{variant:{default:"h-12",small:"h-10",large:"h-14",xlarge:"h-24"},withoutStyle:{true:"no-style border-transparent pl-2 pr-4 hover:text-inverted-1"},hasErrorState:{true:"border-danger focus:border-danger"},disabled:{true:"pointer-events-none bg-base-3 text-on-base-2 opacity-100"}}}),R=({formGroupClassName:f="",className:g="",label:x,labelComplement:v,helpText:h,hasError:S=!1,errorMessage:n,required:r=!1,id:w,name:s,variant:H="default",disabled:p,placeholder:c,options:I=[],withoutStyle:i=!1,style:N,...P},T)=>{let a$3=w||s,o=S||!!n,y=jsx(a,{label:x,required:r,hasError:o,htmlFor:a$3,className:"mb-1",labelComplement:v}),L=jsx(a$1,{helpText:n||h,hasError:o,className:"mt-2"});return jsxs("div",{className:a$2("form-group flex flex-col",f),children:[y,jsx("div",{className:"flex w-full",children:jsxs("select",{ref:T,id:a$3,name:s,required:r,disabled:p,className:a$2(E({variant:H,withoutStyle:i,hasErrorState:o,disabled:p}),g),...P,style:{backgroundImage:`url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 5" fill="%23607081"><path d="M7.11 0H.889a.667.667 0 00-.47 1.138l3.11 3.11a.661.661 0 00.943 0l3.11-3.11A.666.666 0 007.112 0z" /></svg>')`,backgroundSize:"8px",backgroundPosition:`calc(100% - ${i?"5px":"15px"}) center`,...N},children:[c?jsx("option",{value:"",disabled:r,children:c}):null,I?.map(t=>jsx("option",{value:`${t.value}`,disabled:t.disabled,children:t.label},`${a$3}-${t.value}`))]})}),L]})},C=b.forwardRef(R),M=b.memo(C);M.displayName="Select";
|
|
9
|
+
|
|
10
|
+
export { R as a, M as b };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { b } from './chunk-T46I7KD2.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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use client";export { a as InputMask } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
"use client";export { a as InputMask } from '../../chunk-ABMMRP7O.js';
|
|
2
|
+
import '../../chunk-FNTWCBA6.js';
|
|
3
3
|
import '../../chunk-7Z3CCBLX.js';
|
|
4
4
|
import '../../chunk-G3GCVCTU.js';
|
|
5
5
|
import '../../chunk-REQIQLRI.js';
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputHelpTextProps } from '../InputHelpText';
|
|
3
3
|
import { InputLabelProps } from '../InputLabel';
|
|
4
|
-
export declare const SelectComponent: ({ className, label, labelComplement, helpText, hasError, errorMessage, required, id, name, variant, disabled, placeholder, options, withoutStyle, style, ...props }: SelectProps, ref: React.ForwardedRef<HTMLSelectElement>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const SelectComponent: ({ formGroupClassName, className, label, labelComplement, helpText, hasError, errorMessage, required, id, name, variant, disabled, placeholder, options, withoutStyle, style, ...props }: SelectProps, ref: React.ForwardedRef<HTMLSelectElement>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
interface SelectProps extends InputLabelProps, InputHelpTextProps, React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
6
6
|
/**
|
|
7
|
-
* Custom class name
|
|
7
|
+
* Custom class name for form group
|
|
8
|
+
*/
|
|
9
|
+
formGroupClassName?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Custom class name for input
|
|
8
12
|
* */
|
|
9
13
|
className?: string;
|
|
10
14
|
/** List of options to populate select
|
package/dist/forms/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../chunk-WV2QQGA4.js';
|
|
2
2
|
export { a as Dropdown } from '../chunk-2VOBQTBC.js';
|
|
3
|
-
export { b as Select, a as SelectComponent } from '../chunk-
|
|
4
|
-
export { a as InputMask } from '../chunk-
|
|
5
|
-
export { a as Input } from '../chunk-
|
|
3
|
+
export { b as Select, a as SelectComponent } from '../chunk-T46I7KD2.js';
|
|
4
|
+
export { a as InputMask } from '../chunk-ABMMRP7O.js';
|
|
5
|
+
export { a as Input } from '../chunk-FNTWCBA6.js';
|
|
6
6
|
export { a as InputLabel } from '../chunk-7Z3CCBLX.js';
|
|
7
7
|
import '../chunk-LTWCICTK.js';
|
|
8
8
|
import '../chunk-HQ53LHR2.js';
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
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-UYUM2DWH.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';
|
|
11
11
|
import './chunk-WV2QQGA4.js';
|
|
12
12
|
export { a as Dropdown } from './chunk-2VOBQTBC.js';
|
|
13
|
-
export { b as Select, a as SelectComponent } from './chunk-
|
|
14
|
-
export { a as InputMask } from './chunk-
|
|
15
|
-
export { a as Input } from './chunk-
|
|
13
|
+
export { b as Select, a as SelectComponent } from './chunk-T46I7KD2.js';
|
|
14
|
+
export { a as InputMask } from './chunk-ABMMRP7O.js';
|
|
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
|
-
export { a as Badge } from './chunk-
|
|
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-7SZYD2J2.js';
|
|
27
27
|
export { a as LoadingPlaceholder } from './chunk-IPIBO3ES.js';
|
|
28
28
|
export { a as Modal } from './chunk-2J6WGYVP.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const Badge: React.MemoExoticComponent<({ type, text, size,
|
|
2
|
+
declare const Badge: React.MemoExoticComponent<({ type, text, size, rounded, className }: BadgeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
3
|
interface BadgeProps {
|
|
4
4
|
/**
|
|
5
5
|
* Custom class name
|
|
@@ -17,10 +17,6 @@ interface BadgeProps {
|
|
|
17
17
|
* @default default
|
|
18
18
|
* */
|
|
19
19
|
size?: 'default' | 'small' | 'xsmall';
|
|
20
|
-
/**
|
|
21
|
-
* Enlarge width of the badge
|
|
22
|
-
* */
|
|
23
|
-
expanded?: boolean;
|
|
24
20
|
/**
|
|
25
21
|
* Style of rounded corners
|
|
26
22
|
* @default full
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as Badge } from '../../chunk-
|
|
1
|
+
export { a as Badge } from '../../chunk-72QPS6JN.js';
|
|
2
2
|
import '../../chunk-REQIQLRI.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
|
-
export { a as Badge } from '../chunk-
|
|
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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use client";export { a as Pagination } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
"use client";export { a as Pagination } from '../../chunk-UYUM2DWH.js';
|
|
2
|
+
import '../../chunk-T46I7KD2.js';
|
|
3
3
|
import '../../chunk-7Z3CCBLX.js';
|
|
4
4
|
import '../../chunk-LTWCICTK.js';
|
|
5
5
|
import '../../chunk-HQ53LHR2.js';
|
package/dist/navigation/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-UYUM2DWH.js';
|
|
5
5
|
export { a as Stepper } from '../chunk-I7PCF2VW.js';
|
|
6
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-T46I7KD2.js';
|
|
7
7
|
import '../chunk-7Z3CCBLX.js';
|
|
8
8
|
import '../chunk-LTWCICTK.js';
|
|
9
9
|
import '../chunk-HQ53LHR2.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.11",
|
|
4
4
|
"author": "Loja Integrada",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
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.
|
|
35
|
+
"@loja-integrada/eslint-config": "0.0.2",
|
|
36
36
|
"@loja-integrada/tailwindcss-config": "2.0.1",
|
|
37
37
|
"@loja-integrada/typescript-config": "0.0.2"
|
|
38
38
|
},
|
|
@@ -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": "eslint --fix . && prettier --write .",
|
|
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-BLEJ5LCZ.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-7Z3CCBLX.js';
|
|
2
|
-
import { a as a$2 } from './chunk-G3GCVCTU.js';
|
|
3
|
-
import { a } from './chunk-REQIQLRI.js';
|
|
4
|
-
import { cva } from 'class-variance-authority';
|
|
5
|
-
import b from 'react';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var E=cva("",{variants:{variant:{default:"h-12",small:"h-10",large:"h-14",xlarge:"h-24"},withoutStyle:{true:"no-style mr-1 cursor-pointer appearance-none bg-no-repeat pr-4 hover:text-inverted-1",false:"transition-border w-full min-w-0 cursor-pointer appearance-none rounded border bg-base-1 bg-no-repeat px-4 pr-8 text-sm tracking-4 text-on-base placeholder-on-base-2 shadow-none outline-none duration-75 focus:border-inverted-1"},hasErrorState:{true:"border-danger focus:border-danger",false:"border-card-stroke"},disabled:{true:"pointer-events-none bg-base-3 text-on-base-2 opacity-100"}}}),R=({className:f="",label:g,labelComplement:x,helpText:v,hasError:h=!1,errorMessage:l,required:r=!1,id:S,name:n,variant:w="default",disabled:s,placeholder:p,options:H=[],withoutStyle:c=!1,style:I,...P},T)=>{let a$3=S||n,o=h||!!l,y=a(E({variant:w,withoutStyle:c,hasErrorState:o,disabled:s})),L=jsx(a$1,{label:g,required:r,hasError:o,htmlFor:a$3,className:"mb-1",labelComplement:x}),N=jsx(a$2,{helpText:l||v,hasError:o,className:"mt-2"});return jsxs("div",{className:`form-group flex flex-col ${f}`,children:[L,jsx("div",{className:"flex w-full",children:jsxs("select",{ref:T,id:a$3,name:n,required:r,disabled:s,className:y,...P,style:{backgroundImage:`url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 5" fill="%23607081"><path d="M7.11 0H.889a.667.667 0 00-.47 1.138l3.11 3.11a.661.661 0 00.943 0l3.11-3.11A.666.666 0 007.112 0z" /></svg>')`,backgroundSize:"8px",backgroundPosition:`calc(100% - ${c?"5px":"15px"}) center`,...I},children:[p?jsx("option",{value:"",disabled:r,children:p}):null,H?.map(t=>jsx("option",{value:`${t.value}`,disabled:t.disabled,children:t.label},`${a$3}-${t.value}`))]})}),N]})},C=b.forwardRef(R),$=b.memo(C);$.displayName="Select";
|
|
9
|
-
|
|
10
|
-
export { R as a, $ as b };
|
package/dist/chunk-M4V7OPDZ.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-REQIQLRI.js';
|
|
2
|
-
import { cva } from 'class-variance-authority';
|
|
3
|
-
import o from 'react';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var i=cva("badge items-center justify-center font-semibold",{variants:{type:{neutral:"bg-inverted-2 text-base-1",neutralLight:"bg-inverted-3 text-tertiary",primary:"bg-primary-dark text-base-1",danger:"bg-danger-dark text-base-1",success:"bg-success-dark text-base-1",warning:"bg-warning-dark text-base-1",focus:"bg-focus text-base-1"},size:{default:"px-2 py-0.5 text-xs",small:"px-1.5 text-[0.70rem]",xsmall:"text-f8 px-0.5 py-px"},expanded:{true:"flex w-full",false:"inline-flex"},rounded:{full:"rounded-full",small:"rounded",none:"rounded-none"}},defaultVariants:{type:"primary",size:"default"}}),u=({type:a$1="neutral",text:t,size:r="default",expanded:s=!1,rounded:n="full",className:l=""})=>jsx("div",{className:a(i({type:a$1,size:r,expanded:s,rounded:n}),l),children:t}),p=o.memo(u);p.displayName="Badge";
|
|
7
|
-
|
|
8
|
-
export { p as a };
|
package/dist/chunk-ZRJQNS4S.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { b } from './chunk-BLEJ5LCZ.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=p=>{let o=p.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}):jsxs("span",{children:["Mostrando ",jsx("span",{className:"pagination-info-current",children:n})]}),"\xA0de\xA0",jsx("span",{className:"pagination-info-total",children:s}),"\xA0no total"]})})},g=y.memo(I);g.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]),p=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",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 P=r?.current?.innerText;if(P){let w=parseInt(P);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 ${p?"hover:text-inverted-1":""}`,"aria-label":"Ir para p\xE1gina anterior",onClick:()=>{p&&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:p,onItemsLengthChange:o})=>jsxs("div",{className:a$1("pagination flex flex-wrap items-center justify-end leading-4 sm:justify-between",n),children:[jsx(g,{currentItemsLength:e,totalItemsLength:s,itemsLengthOptions:p,onItemsLengthChange:o}),jsx(v,{currentPage:a,totalPages:i,onPageChange:r})]}),L=y.memo(R);L.displayName="Pagination";
|
|
8
|
-
|
|
9
|
-
export { L as a };
|