@loja-integrada/admin-components 1.3.20 → 1.3.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-2BHQJL6C.js +10 -0
- package/dist/{chunk-VOM77MIG.js → chunk-2FBFMOYN.js} +1 -1
- package/dist/{chunk-XV4GV73T.js → chunk-2SALQO2D.js} +1 -1
- package/dist/{chunk-V3H7F7XP.js → chunk-E6U67LUI.js} +1 -1
- package/dist/{chunk-DESZMNF3.js → chunk-HAJWKP2L.js} +2 -2
- package/dist/chunk-JTJXUDMO.js +11 -0
- package/dist/chunk-KIMO2L56.js +12 -0
- package/dist/{chunk-7YXK57VB.js → chunk-KX4ZN75R.js} +1 -1
- package/dist/{chunk-T6YO3R7X.js → chunk-L5COHMTE.js} +1 -1
- package/dist/{chunk-7XOVOCH6.js → chunk-MG4XNTQM.js} +2 -2
- package/dist/forms/Calendar/index.js +4 -4
- package/dist/forms/Dropdown/Dropdown.client.d.ts +1 -1
- package/dist/forms/Dropdown/index.js +2 -2
- package/dist/forms/Input/index.js +2 -2
- package/dist/forms/InputCurrency/index.js +3 -3
- package/dist/forms/InputLabel/InputLabel.d.ts +1 -1
- package/dist/forms/InputLabel/index.js +1 -1
- package/dist/forms/InputMask/InputMask.client.d.ts +11 -2
- package/dist/forms/InputMask/index.js +3 -3
- package/dist/forms/InputWithUnit/InputWithUnit.client.d.ts +2 -1
- package/dist/forms/InputWithUnit/index.js +5 -5
- package/dist/forms/Select/index.js +2 -2
- package/dist/forms/TextArea/TextArea.d.ts +5 -0
- package/dist/forms/TextArea/index.js +2 -2
- package/dist/forms/index.js +9 -9
- package/dist/index.js +10 -10
- package/dist/navigation/Pagination/index.js +3 -3
- package/dist/navigation/index.js +3 -3
- package/package.json +3 -3
- package/dist/chunk-COOODRQ2.js +0 -11
- package/dist/chunk-L5IJMOFK.js +0 -10
- package/dist/chunk-RXUWLIO5.js +0 -10
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { a as a$1 } from './chunk-TZI6YTCW.js';
|
|
2
|
+
import { a as a$2 } from './chunk-UZZ5JUF7.js';
|
|
3
|
+
import { a } from './chunk-AGCI6C3Z.js';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import b from 'react';
|
|
6
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var u=cva("ml-2 hidden md:block",{variants:{hasError:{true:"text-danger",false:"text-on-base"}},defaultVariants:{hasError:!1}}),d=b.memo(({className:p="",label:e="",labelComplement:a$3,hasError:o=!1,required:n=!1,help:r,htmlFor:c})=>e?jsxs("label",{className:a("input-label text-f6 mb-0.5 inline-flex items-center font-semibold",o?"text-danger":"text-on-base",p),htmlFor:c,children:[typeof e=="string"?`${e}${n?"*":""}`:jsxs(Fragment,{children:[e,n?"*":""]}),a$3?jsx("span",{className:"ml-2",children:a$3}):null,r?jsx(a$1,{content:r,className:"ml-2",children:jsx("span",{children:jsx(a$2,{icon:"infoCircle",className:u({hasError:o}),size:4})})}):null]}):null);d.displayName="InputLabel";
|
|
9
|
+
|
|
10
|
+
export { d as a };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b } from './chunk-B3V3TXJU.js';
|
|
2
|
-
import { a as a$1 } from './chunk-
|
|
2
|
+
import { a as a$1 } from './chunk-MG4XNTQM.js';
|
|
3
3
|
import { a as a$2 } from './chunk-ZWW7VJFD.js';
|
|
4
4
|
import { a } from './chunk-UZZ5JUF7.js';
|
|
5
5
|
import { subDays, subMonths, addDays, parse, isBefore, isValid, isWithinInterval, isEqual, isAfter, format } from 'date-fns';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-
|
|
1
|
+
import { a as a$1 } from './chunk-2BHQJL6C.js';
|
|
2
2
|
import { a as a$4 } from './chunk-NRAIF4I3.js';
|
|
3
3
|
import { a as a$2 } from './chunk-BW4TJLAD.js';
|
|
4
4
|
import { a as a$3 } from './chunk-UZZ5JUF7.js';
|
|
@@ -9,6 +9,6 @@ import q, { components } from 'react-select';
|
|
|
9
9
|
import A from 'react-select/creatable';
|
|
10
10
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
|
-
var K=cva("flex w-full cursor-pointer items-center border bg-base-1 transition-colors",{variants:{size:{small:"text-f7 h-10",default:"text-f6 h-12",large:"text-f5 h-14",xlarge:"text-f4 h-24"},variant:{default:"rounded border-card-stroke font-normal text-on-base",secondary:"rounded-md border-inverted-2 font-semibold shadow-inner hover:bg-base-3 focus:bg-base-1 focus:ring-2 focus:ring-focus focus:ring-offset-2"},disabled:{true:"pointer-events-none bg-base-3 text-on-base-2"},readOnly:{true:"pointer-events-none bg-base-2"},hasErrorState:{true:"border-danger focus:border-danger"}},defaultVariants:{variant:"default",size:"default",hasErrorState:!1,disabled:!1,readOnly:!1}}),{Option:Q,DropdownIndicator:U}=components,Y=r=>{let{selectProps:s}=r,t=`transform transition duration-200 ${s.menuIsOpen?"rotate-180":"rotate-0"} text-inverted-2`;return jsx(U,{...r,className:"mr-2",children:jsx(a$3,{icon:"sortDown",size:5,className:t})})},Z=r=>{let{data:s,removeProps:t}=r;return jsxs("div",{...r,className:"selected-option mr-2 flex items-center gap-x-1.5 rounded-sm bg-primary-light px-2 text-inverted-1",children:[jsx("span",{className:"text-f7 truncate font-semibold",children:s.label}),jsx("div",{onClick:t.onClick,...t,className:"cursor-pointer",children:jsx(a$3,{icon:"close",size:3})})]})},_=r=>{let{isSelected:s,isDisabled:t,isFocused:a$1,data:n,isMulti:
|
|
12
|
+
var K=cva("flex w-full cursor-pointer items-center border bg-base-1 transition-colors",{variants:{size:{small:"text-f7 h-10",default:"text-f6 h-12",large:"text-f5 h-14",xlarge:"text-f4 h-24"},variant:{default:"rounded border-card-stroke font-normal text-on-base",secondary:"rounded-md border-inverted-2 font-semibold shadow-inner hover:bg-base-3 focus:bg-base-1 focus:ring-2 focus:ring-focus focus:ring-offset-2"},disabled:{true:"pointer-events-none bg-base-3 text-on-base-2"},readOnly:{true:"pointer-events-none bg-base-2"},hasErrorState:{true:"border-danger focus:border-danger"}},defaultVariants:{variant:"default",size:"default",hasErrorState:!1,disabled:!1,readOnly:!1}}),{Option:Q,DropdownIndicator:U}=components,Y=r=>{let{selectProps:s}=r,t=`transform transition duration-200 ${s.menuIsOpen?"rotate-180":"rotate-0"} text-inverted-2`;return jsx(U,{...r,className:"mr-2",children:jsx(a$3,{icon:"sortDown",size:5,className:t})})},Z=r=>{let{data:s,removeProps:t}=r;return jsxs("div",{...r,className:"selected-option mr-2 flex items-center gap-x-1.5 rounded-sm bg-primary-light px-2 text-inverted-1",children:[jsx("span",{className:"text-f7 truncate font-semibold",children:s.label}),jsx("div",{onClick:t.onClick,...t,className:"cursor-pointer",children:jsx(a$3,{icon:"close",size:3})})]})},_=r=>{let{isSelected:s,isDisabled:t,isFocused:a$1,data:n,isMulti:l}=r,c=useMemo(()=>n.element?n.element:jsx(Fragment,{children:l?jsx(a$4,{label:n.label,checked:s}):jsxs(Fragment,{children:[n.icon?jsx(a$3,{icon:n.icon,className:"mr-2"}):null,n.label]})}),[n,s,l]);return jsx(Q,{...r,className:a("text-f6 first:mt-2 last:mb-2 py-2 px-5 font-semibold transition-colors flex items-center",t?"opacity-50 cursor-not-allowed":"hover:text-on-base hover:bg-inverted-2/5 cursor-pointer",s?"text-inverted-1":"text-inverted-2",a$1&&"bg-inverted-2/5"),children:c})},ee=({options:r,isSearchable:s=!1,allowCreation:t=!1,isMultivalued:a$3=!1,onChange:n,onMultiChange:l,onBlur:c,size:S="default",variant:I="default",placeholder:y="Selecione um item",emptyMessage:M="Nenhuma op\xE7\xE3o dispon\xEDvel",hasError:V=!1,errorMessage:g,helpText:D,label:N,labelComplement:L,id:E,name:W,required:k=!1,disabled:h,readOnly:m,maxMenuHeight:G=300,menuPosition:B="absolute",menuPlacement:z="auto",menuWidth:R="100%",menuHorizontalPlacement:i,formGroupClassName:T="",value:F},H)=>{let X=useMemo(()=>Math.random().toString(36).substring(7),[]),x=E||W||X,p=V||!!g,$=useMemo(()=>t?A:q,[t]);return jsxs("div",{className:a("form-group flex flex-col",T),children:[jsx(a$1,{label:N,labelComplement:L,required:k,hasError:p,htmlFor:x,className:"mb-1"}),jsx($,{id:x,ref:H,value:F,classNamePrefix:"select",options:r,isSearchable:t||s,blurInputOnSelect:!a$3,isMulti:a$3,hideSelectedOptions:!1,closeMenuOnSelect:!a$3,isDisabled:h||m,maxMenuHeight:G,menuPortalTarget:document?.body,menuPosition:B,menuPlacement:z,placeholder:y,noOptionsMessage:({inputValue:e})=>e?`Nenhum resultado para "${e}"`:M,formatCreateLabel:e=>`Selecionar "${e}"`,onChange:e=>{a$3&&l?l(e):n&&e&&n(e);},onBlur:e=>c?.(e),components:{Option:e=>_(e),DropdownIndicator:e=>Y(e),MultiValue:e=>Z(e),ClearIndicator:()=>null},classNames:{input:()=>t?"":"absolute !mx-0",noOptionsMessage:()=>"text-on-base-3 text-f6 font-semibold break-words",valueContainer:()=>"w-full min-h-10",singleValue:()=>"truncate",placeholder:()=>"w-full truncate pr-2 h-full text-on-base-3",control:({isFocused:e})=>a(K({variant:I,size:S,hasErrorState:p,disabled:h,readOnly:m}),e&&!p&&!m&&"border-inverted-1"),groupHeading:()=>"px-5 text-on-base-3 text-f7 font-semibold uppercase"},styles:{option:()=>({}),control:()=>({}),menu:e=>({...e,width:R,backgroundColor:"rgb(var(--color-base-1) / 100)",zIndex:999,...i&&i==="left"&&{left:0},...i&&i==="right"&&{right:0}}),menuPortal:e=>({...e,zIndex:9999}),indicatorSeparator:()=>({}),groupHeading:()=>({}),singleValue:()=>({maxWidth:"calc(100% - 6px)"}),valueContainer:e=>({...e,paddingLeft:16,display:"flex",flexWrap:"nowrap",alignItems:"center",overflowX:"auto",msOverflowStyle:"none",scrollbarWidth:"none","::-webkit-scrollbar":{display:"none"}}),placeholder:()=>({}),multiValue:e=>({...e,overflow:"scroll",display:"flex",flexWrap:"nowrap",overflowX:"auto",scrollbarWidth:"thin",msOverflowStyle:"auto",whiteSpace:"nowrap"})}}),jsx(a$2,{helpText:g||D,hasError:p,className:"mt-2"})]})},oe=w.forwardRef(ee),te=w.memo(oe);te.displayName="Dropdown";
|
|
13
13
|
|
|
14
14
|
export { te as a };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { a as a$3 } from './chunk-HAJWKP2L.js';
|
|
2
|
+
import { a as a$1 } from './chunk-MG4XNTQM.js';
|
|
3
|
+
import { a } from './chunk-2BHQJL6C.js';
|
|
4
|
+
import { a as a$4 } from './chunk-BW4TJLAD.js';
|
|
5
|
+
import { a as a$2 } from './chunk-AGCI6C3Z.js';
|
|
6
|
+
import { forwardRef, useState } from 'react';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var S=[{label:"mm",value:"mm"},{label:"cm",value:"cm"},{label:"m",value:"m"}],W=forwardRef(({units:r=S,maxSize:b=6,className:v="",inputClassName:c="",dropdownClassName:g="",helpText:I="",disabled:o=!1,errorMessage:t="",hasError:l=!1,required:p=!1,label:w,inputPlaceholder:C,defaultUnit:N,fixedUnit:n,onChangeValue:x,onChangeUnit:s},U)=>{let[E,P]=useState(N||r[0]);return jsxs("div",{className:`flex flex-col ${v}`,id:"input-with-unit__container",children:[jsx(a,{label:w,required:p,hasError:l||!!t,htmlFor:"input-with-unit",className:"mb-1"}),jsxs("div",{className:"flex w-full items-start gap-x-1",children:[jsx(a$1,{id:"input-with-unit",ref:U,maxLength:b,formatValue:"onlyNumber",disabled:o,hasError:l||!!t,required:p,onChange:x,placeholder:C,formGroupClassName:a$2("w-full",c)}),jsx(a$3,{id:"input-with-unit-dropdown",formGroupClassName:a$2("w-40",g),placeholder:"mm",options:r,value:n??E,onChange:a=>{n||(P({label:a.label,value:String(a.value)}),s&&s(a));},disabled:!!n||o,hasError:l||!!t})]}),jsx(a$4,{helpText:t||I,hasError:!!t})]})});W.displayName="InputWithUnit";
|
|
10
|
+
|
|
11
|
+
export { S as a, W as b };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { a } from './chunk-2BHQJL6C.js';
|
|
2
|
+
import { a as a$3 } from './chunk-ZWW7VJFD.js';
|
|
3
|
+
import { a as a$1 } from './chunk-BW4TJLAD.js';
|
|
4
|
+
import { a as a$4 } from './chunk-UZZ5JUF7.js';
|
|
5
|
+
import { a as a$2 } from './chunk-AGCI6C3Z.js';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
7
|
+
import P, { useMemo, useState, useRef, useEffect } from 'react';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var c=24,Y=cva("relative appearance-none overflow-hidden rounded border border-card-stroke bg-base-1 px-4 py-3 shadow-none outline-none transition-colors focus-within:border-inverted-1 focus:border-inverted-1",{variants:{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"}},defaultVariants:{hasErrorState:!1,disabled:!1,readOnly:!1}}),Z=({className:R="",formGroupClassName:C="",label:S,labelComplement:$,helpText:k,hasError:F=!1,errorMessage:g,required:v=!1,defaultValue:p,id:O,name:T,disabled:H,readOnly:y,minLines:a$5=2,maxLines:f=5,showSeeMore:u=!1,...V},z)=>{let B=useMemo(()=>Math.random().toString(36).substring(7),[]),E=O||T||B,h=F||!!g,[n,D]=useState(!1),[x,G]=useState(f),s=useRef(null);useEffect(()=>{G(u&&!n?a$5:f);},[n,a$5,f]);let q=jsx(a,{label:S,labelComplement:$,required:v,hasError:h,htmlFor:E,className:"mb-1"}),W=jsx(a$1,{helpText:g||k,hasError:h,className:"mt-2"}),_=()=>{if(u&&!n)return;let e=s.current;if(e){let t=x*c,r=a$5*c,i=e.style.height;e.style.height="auto";let l=e.scrollHeight;e.style.height=i;let d=j(l,r,t);J(e,d);}},j=(e,t,r)=>Math.min(r,Math.max(t,e)),J=(e,t)=>{let r=e.offsetHeight;if(r===t)return;let i=e.style.transitionProperty?.includes("height"),l=e.style.transition;!i&&!l&&(e.style.transition="height 200ms"),e.style.height=`${r}px`,e.offsetHeight,e.style.height=`${t}px`;let d=K=>{K.propertyName==="height"&&(e.removeEventListener("transitionend",d),!i&&!l&&(e.style.transition=""));};e.addEventListener("transitionend",d);};return useEffect(()=>{let e=s.current;if(e){let t=a$5*c;if(p){let r=x*c;e.scrollHeight>r?t=r:e.scrollHeight>t&&(t=e.scrollHeight);}e.style.height=`${t}px`;}},[s,a$5,x,p,n]),jsxs("div",{className:a$2("form-group flex flex-col ",C),ref:z,children:[q,jsx("div",{className:a$2("relative appearance-none overflow-hidden rounded border border-card-stroke bg-base-1 px-4 py-3 shadow-none outline-none transition-colors focus-within:border-inverted-1 focus:border-inverted-1",Y({hasErrorState:h,disabled:H,readOnly:y,className:R})),children:jsx("textarea",{...V,ref:s,onInput:_,className:"peer text-f6 flex w-full min-w-0 resize-none bg-transparent text-on-base shadow-none outline-none transition-all duration-200 ease-in-out focus-within:border-inverted-1 focus:border-inverted-1",id:E,name:T,required:v,disabled:H,readOnly:y,defaultValue:p})}),W,u?jsxs("div",{className:"mt-2 flex items-center justify-center gap-x-2",id:"see-more",children:[jsx("div",{className:"h-px w-full bg-inverted-2"}),jsxs(a$3,{as:"button",variant:"onlyText",className:"mx-2 hover:no-underline",onClick:()=>D(!n),children:[jsx(a$4,{icon:"angleDown",size:4,className:`mr-1 text-inverted-2 transition duration-300 ease-in-out ${n?"-rotate-180":""}`}),jsxs("span",{className:"text-f6 text-nowrap font-semibold text-inverted-2 no-underline",children:["Ver ",n?"menos":"mais"]})]}),jsx("div",{className:"h-px w-full bg-inverted-2"})]}):null]})},ee=P.forwardRef(Z),te=P.memo(ee);te.displayName="TextArea";
|
|
11
|
+
|
|
12
|
+
export { te as a };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
1
|
+
import { a } from './chunk-KX4ZN75R.js';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { IMaskMixin, IMask } from 'react-imask';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var{MaskedRange:o}=IMask,m={onlyNumber:{mask:/^\d+$/,inputMode:"decimal"},onlyLetter:{mask:/^[a-zA-ZÀ-ú']+$/},onlyAlphanumeric:{mask:/^\w+$/},onlyText:{mask:/^[a-zA-ZÀ-ú'˜`´^0-9\sü]+$/},date:{mask:Date,pattern:"d{/}`m{/}`Y",blocks:{d:{mask:o,from:1,to:31,maxLength:2},m:{mask:o,from:1,to:12,maxLength:2},Y:{mask:o,from:1900,to:9999}},format:e=>{if(!(e instanceof Date))return "";let _=e.getDate(),t=e.getMonth()+1,
|
|
6
|
+
var{MaskedRange:o}=IMask,m={onlyNumber:{mask:/^\d+$/,inputMode:"decimal"},onlyLetter:{mask:/^[a-zA-ZÀ-ú']+$/},onlyAlphanumeric:{mask:/^\w+$/},onlyText:{mask:/^[a-zA-ZÀ-ú'˜`´^0-9\sü]+$/},date:{mask:Date,pattern:"d{/}`m{/}`Y",blocks:{d:{mask:o,from:1,to:31,maxLength:2},m:{mask:o,from:1,to:12,maxLength:2},Y:{mask:o,from:1900,to:9999}},format:e=>{if(!(e instanceof Date))return "";let _=e.getDate(),t=e.getMonth()+1,a=e.getFullYear();return _<10&&(_="0"+_),t<10&&(t="0"+t),[_,t,a].join("/")},parse:e=>{let[_,t,a]=e.split("/").map(Number);return new Date(a,t-1,_)},inputMode:"decimal",placeholder:"__/__/____"},zipCode:{mask:"00000-000",inputMode:"decimal",placeholder:"_____-___"},nfe:{mask:"0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000",inputMode:"decimal",placeholder:"____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____"},phone:{mask:"(00) 0000-0000",inputMode:"decimal",placeholder:"(__) ____-____"},cellphone:{mask:"(00) 00000-0000",inputMode:"decimal",placeholder:"(__) _____-____"},phoneOrCellphone:{mask:[{mask:"(00) 0000-0000",maxLength:10},{mask:"(00) 00000-0000"}],inputMode:"decimal",placeholder:"(__) _____-____"},cpf:{mask:"000.000.000-00",inputMode:"decimal",placeholder:"___.___.___-__"},cnpj:{mask:"00.000.000/0000-00",inputMode:"decimal",placeholder:"__.___.___/____-__"},expiration:{mask:"00/00",inputMode:"decimal",placeholder:"__/__"},cvv:{mask:[{mask:"000"},{mask:"0000"}],inputMode:"decimal",placeholder:"___"},creditCard:{mask:[{mask:"0000 0000 0000 0000",maxLength:16},{mask:"0000 000000 00000",maxLength:15}],inputMode:"decimal",placeholder:"____ ____ ____ ____"}};var c=IMaskMixin(({inputRef:e,..._})=>jsx(a,{..._,ref:e})),k=forwardRef(({formatValue:e="onlyAlphanumeric",inputOnChangeType:_="onComplete",...t},a)=>{let n={...m[e]||{},...t},l=t?.onChange;return delete n.onChange,n[_]=(s,M)=>{l?.({target:{value:s}});},jsx(c,{...n,inputRef:a})});k.displayName="InputMask";
|
|
7
7
|
|
|
8
8
|
export { k as a };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use client";export { a as Calendar } from '../../chunk-
|
|
1
|
+
"use client";export { a as Calendar } from '../../chunk-2FBFMOYN.js';
|
|
2
2
|
import '../../chunk-DBWOW4GL.js';
|
|
3
3
|
import '../../chunk-GJV4GVWP.js';
|
|
4
4
|
import '../../chunk-B3V3TXJU.js';
|
|
5
5
|
import '../../chunk-NXRYURC6.js';
|
|
6
6
|
import '../../chunk-L6H2NDVS.js';
|
|
7
|
-
import '../../chunk-
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
7
|
+
import '../../chunk-MG4XNTQM.js';
|
|
8
|
+
import '../../chunk-KX4ZN75R.js';
|
|
9
|
+
import '../../chunk-2BHQJL6C.js';
|
|
10
10
|
import '../../chunk-KN7DOGNL.js';
|
|
11
11
|
import '../../chunk-QEFCC7YX.js';
|
|
12
12
|
import '../../chunk-7RP4L6ZM.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use client";export { a as Dropdown } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
"use client";export { a as Dropdown } from '../../chunk-HAJWKP2L.js';
|
|
2
|
+
import '../../chunk-2BHQJL6C.js';
|
|
3
3
|
import '../../chunk-KN7DOGNL.js';
|
|
4
4
|
import '../../chunk-QEFCC7YX.js';
|
|
5
5
|
import '../../chunk-7RP4L6ZM.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as Input } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { a as Input } from '../../chunk-KX4ZN75R.js';
|
|
2
|
+
import '../../chunk-2BHQJL6C.js';
|
|
3
3
|
import '../../chunk-KN7DOGNL.js';
|
|
4
4
|
import '../../chunk-QEFCC7YX.js';
|
|
5
5
|
import '../../chunk-7RP4L6ZM.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use client";export { a as InputCurrency } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
"use client";export { a as InputCurrency } from '../../chunk-E6U67LUI.js';
|
|
2
|
+
import '../../chunk-KX4ZN75R.js';
|
|
3
|
+
import '../../chunk-2BHQJL6C.js';
|
|
4
4
|
import '../../chunk-KN7DOGNL.js';
|
|
5
5
|
import '../../chunk-QEFCC7YX.js';
|
|
6
6
|
import '../../chunk-7RP4L6ZM.js';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
2
|
import { IMaskInputProps } from 'react-imask';
|
|
3
3
|
import { InputProps } from '../Input';
|
|
4
|
+
import { InputLabelProps } from '../InputLabel';
|
|
4
5
|
import { formatValuePatterns } from './utils';
|
|
5
|
-
declare const InputMask: import("react").ForwardRefExoticComponent<Omit<IMaskInputProps<HTMLInputElement>, "prefix" | "onChange"> & InputProps & {
|
|
6
|
+
declare const InputMask: import("react").ForwardRefExoticComponent<Omit<IMaskInputProps<HTMLInputElement>, "prefix" | "onChange" | "label"> & InputProps & {
|
|
6
7
|
/**
|
|
7
8
|
* Predefined masks. When used, will replace passed `mask` attr
|
|
8
9
|
* @default 'onlyAlphanumeric'
|
|
@@ -19,8 +20,12 @@ declare const InputMask: import("react").ForwardRefExoticComponent<Omit<IMaskInp
|
|
|
19
20
|
* Callback to be called when the value changes.
|
|
20
21
|
* */
|
|
21
22
|
onChange?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Label for the input field.
|
|
25
|
+
* */
|
|
26
|
+
label?: InputLabelProps['label'];
|
|
22
27
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
23
|
-
type InputMaskProps = Omit<IMaskInputProps<HTMLInputElement>, 'prefix' | 'onChange'> & InputProps & {
|
|
28
|
+
type InputMaskProps = Omit<IMaskInputProps<HTMLInputElement>, 'prefix' | 'onChange' | 'label'> & InputProps & {
|
|
24
29
|
/**
|
|
25
30
|
* Predefined masks. When used, will replace passed `mask` attr
|
|
26
31
|
* @default 'onlyAlphanumeric'
|
|
@@ -37,5 +42,9 @@ type InputMaskProps = Omit<IMaskInputProps<HTMLInputElement>, 'prefix' | 'onChan
|
|
|
37
42
|
* Callback to be called when the value changes.
|
|
38
43
|
* */
|
|
39
44
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Label for the input field.
|
|
47
|
+
* */
|
|
48
|
+
label?: InputLabelProps['label'];
|
|
40
49
|
};
|
|
41
50
|
export { InputMask, type InputMaskProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use client";export { a as InputMask } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
"use client";export { a as InputMask } from '../../chunk-MG4XNTQM.js';
|
|
2
|
+
import '../../chunk-KX4ZN75R.js';
|
|
3
|
+
import '../../chunk-2BHQJL6C.js';
|
|
4
4
|
import '../../chunk-KN7DOGNL.js';
|
|
5
5
|
import '../../chunk-QEFCC7YX.js';
|
|
6
6
|
import '../../chunk-7RP4L6ZM.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
2
|
import { CustomOptionProps } from '../Dropdown';
|
|
3
|
+
import { InputLabelProps } from '../InputLabel/InputLabel';
|
|
3
4
|
export declare const DEFAULT_UNITS: {
|
|
4
5
|
label: string;
|
|
5
6
|
value: string;
|
|
@@ -59,7 +60,7 @@ type InputWithUnitProps = {
|
|
|
59
60
|
/**
|
|
60
61
|
* Label for the input field.
|
|
61
62
|
* */
|
|
62
|
-
label:
|
|
63
|
+
label: InputLabelProps['label'];
|
|
63
64
|
/**
|
|
64
65
|
* Placeholder for the input field.
|
|
65
66
|
* */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use client";export { a as DEFAULT_UNITS, b as InputWithUnit } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
"use client";export { a as DEFAULT_UNITS, b as InputWithUnit } from '../../chunk-JTJXUDMO.js';
|
|
2
|
+
import '../../chunk-HAJWKP2L.js';
|
|
3
|
+
import '../../chunk-MG4XNTQM.js';
|
|
4
|
+
import '../../chunk-KX4ZN75R.js';
|
|
5
|
+
import '../../chunk-2BHQJL6C.js';
|
|
6
6
|
import '../../chunk-KN7DOGNL.js';
|
|
7
7
|
import '../../chunk-QEFCC7YX.js';
|
|
8
8
|
import '../../chunk-7RP4L6ZM.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { b as Select, a as SelectComponent } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { b as Select, a as SelectComponent } from '../../chunk-L5COHMTE.js';
|
|
2
|
+
import '../../chunk-2BHQJL6C.js';
|
|
3
3
|
import '../../chunk-KN7DOGNL.js';
|
|
4
4
|
import '../../chunk-QEFCC7YX.js';
|
|
5
5
|
import '../../chunk-7RP4L6ZM.js';
|
|
@@ -34,5 +34,10 @@ interface TextAreaProps extends InputLabelProps, InputHelpTextProps, Omit<React.
|
|
|
34
34
|
* @default 5
|
|
35
35
|
* */
|
|
36
36
|
maxLines?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Sets wether to show a see more button when the text exceeds the maxLines
|
|
39
|
+
* @default false
|
|
40
|
+
* */
|
|
41
|
+
showSeeMore?: boolean;
|
|
37
42
|
}
|
|
38
43
|
export { TextArea, type TextAreaProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as TextArea } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { a as TextArea } from '../../chunk-KIMO2L56.js';
|
|
2
|
+
import '../../chunk-2BHQJL6C.js';
|
|
3
3
|
import '../../chunk-KN7DOGNL.js';
|
|
4
4
|
import '../../chunk-QEFCC7YX.js';
|
|
5
5
|
import '../../chunk-7RP4L6ZM.js';
|
package/dist/forms/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import '../chunk-V7ZS2B75.js';
|
|
2
|
-
export { a as TextArea } from '../chunk-
|
|
3
|
-
export { b as Select, a as SelectComponent } from '../chunk-
|
|
4
|
-
export { a as Calendar } from '../chunk-
|
|
2
|
+
export { a as TextArea } from '../chunk-KIMO2L56.js';
|
|
3
|
+
export { b as Select, a as SelectComponent } from '../chunk-L5COHMTE.js';
|
|
4
|
+
export { a as Calendar } from '../chunk-2FBFMOYN.js';
|
|
5
5
|
import '../chunk-DBWOW4GL.js';
|
|
6
6
|
import '../chunk-GJV4GVWP.js';
|
|
7
7
|
import '../chunk-B3V3TXJU.js';
|
|
8
8
|
import '../chunk-NXRYURC6.js';
|
|
9
9
|
import '../chunk-L6H2NDVS.js';
|
|
10
|
-
export { a as InputCurrency } from '../chunk-
|
|
11
|
-
export { a as DEFAULT_UNITS, b as InputWithUnit } from '../chunk-
|
|
12
|
-
export { a as Dropdown } from '../chunk-
|
|
13
|
-
export { a as InputMask } from '../chunk-
|
|
14
|
-
export { a as Input } from '../chunk-
|
|
15
|
-
export { a as InputLabel } from '../chunk-
|
|
10
|
+
export { a as InputCurrency } from '../chunk-E6U67LUI.js';
|
|
11
|
+
export { a as DEFAULT_UNITS, b as InputWithUnit } from '../chunk-JTJXUDMO.js';
|
|
12
|
+
export { a as Dropdown } from '../chunk-HAJWKP2L.js';
|
|
13
|
+
export { a as InputMask } from '../chunk-MG4XNTQM.js';
|
|
14
|
+
export { a as Input } from '../chunk-KX4ZN75R.js';
|
|
15
|
+
export { a as InputLabel } from '../chunk-2BHQJL6C.js';
|
|
16
16
|
import '../chunk-KN7DOGNL.js';
|
|
17
17
|
import '../chunk-QEFCC7YX.js';
|
|
18
18
|
import '../chunk-7RP4L6ZM.js';
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import './chunk-4PUGMMDC.js';
|
|
2
|
-
export { c as DEFAULT_OPTIONS, d as Pagination, a as PaginationInfo, b as PaginationNav } from './chunk-
|
|
2
|
+
export { c as DEFAULT_OPTIONS, d as Pagination, a as PaginationInfo, b as PaginationNav } from './chunk-2SALQO2D.js';
|
|
3
3
|
export { a as Stepper } from './chunk-J62DBIT2.js';
|
|
4
4
|
import './chunk-V7ZS2B75.js';
|
|
5
|
-
export { a as TextArea } from './chunk-
|
|
6
|
-
export { b as Select, a as SelectComponent } from './chunk-
|
|
5
|
+
export { a as TextArea } from './chunk-KIMO2L56.js';
|
|
6
|
+
export { b as Select, a as SelectComponent } from './chunk-L5COHMTE.js';
|
|
7
7
|
export { a as Breadcrumb } from './chunk-UF3JKCLY.js';
|
|
8
8
|
export { a as HelpLink } from './chunk-GQ2PFXYP.js';
|
|
9
|
-
export { a as Calendar } from './chunk-
|
|
9
|
+
export { a as Calendar } from './chunk-2FBFMOYN.js';
|
|
10
10
|
import './chunk-DBWOW4GL.js';
|
|
11
11
|
export { a as ActionBar } from './chunk-GJV4GVWP.js';
|
|
12
12
|
export { b as Box, d as BoxContent, c as BoxHeader, a as BoxSeparator } from './chunk-B3V3TXJU.js';
|
|
13
13
|
export { a as Container, b as ContainerHeader } from './chunk-NXRYURC6.js';
|
|
14
14
|
import './chunk-L6H2NDVS.js';
|
|
15
|
-
export { a as InputCurrency } from './chunk-
|
|
16
|
-
export { a as DEFAULT_UNITS, b as InputWithUnit } from './chunk-
|
|
17
|
-
export { a as Dropdown } from './chunk-
|
|
18
|
-
export { a as InputMask } from './chunk-
|
|
19
|
-
export { a as Input } from './chunk-
|
|
20
|
-
export { a as InputLabel } from './chunk-
|
|
15
|
+
export { a as InputCurrency } from './chunk-E6U67LUI.js';
|
|
16
|
+
export { a as DEFAULT_UNITS, b as InputWithUnit } from './chunk-JTJXUDMO.js';
|
|
17
|
+
export { a as Dropdown } from './chunk-HAJWKP2L.js';
|
|
18
|
+
export { a as InputMask } from './chunk-MG4XNTQM.js';
|
|
19
|
+
export { a as Input } from './chunk-KX4ZN75R.js';
|
|
20
|
+
export { a as InputLabel } from './chunk-2BHQJL6C.js';
|
|
21
21
|
import './chunk-KN7DOGNL.js';
|
|
22
22
|
export { a as IconCircular } from './chunk-QEFCC7YX.js';
|
|
23
23
|
import './chunk-7RP4L6ZM.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use client";export { c as DEFAULT_OPTIONS, d as Pagination, a as PaginationInfo, b as PaginationNav } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
"use client";export { c as DEFAULT_OPTIONS, d as Pagination, a as PaginationInfo, b as PaginationNav } from '../../chunk-2SALQO2D.js';
|
|
2
|
+
import '../../chunk-L5COHMTE.js';
|
|
3
|
+
import '../../chunk-2BHQJL6C.js';
|
|
4
4
|
import '../../chunk-KN7DOGNL.js';
|
|
5
5
|
import '../../chunk-QEFCC7YX.js';
|
|
6
6
|
import '../../chunk-7RP4L6ZM.js';
|
package/dist/navigation/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../chunk-4PUGMMDC.js';
|
|
2
|
-
export { c as DEFAULT_OPTIONS, d as Pagination, a as PaginationInfo, b as PaginationNav } from '../chunk-
|
|
2
|
+
export { c as DEFAULT_OPTIONS, d as Pagination, a as PaginationInfo, b as PaginationNav } from '../chunk-2SALQO2D.js';
|
|
3
3
|
export { a as Stepper } from '../chunk-J62DBIT2.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-L5COHMTE.js';
|
|
5
5
|
export { a as Breadcrumb } from '../chunk-UF3JKCLY.js';
|
|
6
6
|
export { a as HelpLink } from '../chunk-GQ2PFXYP.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-2BHQJL6C.js';
|
|
8
8
|
import '../chunk-KN7DOGNL.js';
|
|
9
9
|
import '../chunk-QEFCC7YX.js';
|
|
10
10
|
import '../chunk-7RP4L6ZM.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loja-integrada/admin-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.22",
|
|
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/
|
|
36
|
-
"@loja-integrada/
|
|
35
|
+
"@loja-integrada/typescript-config": "0.0.2",
|
|
36
|
+
"@loja-integrada/eslint-config": "0.0.3"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@tanstack/react-table": "^8.17.3",
|
package/dist/chunk-COOODRQ2.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { a as a$3 } from './chunk-DESZMNF3.js';
|
|
2
|
-
import { a as a$1 } from './chunk-7XOVOCH6.js';
|
|
3
|
-
import { a } from './chunk-L5IJMOFK.js';
|
|
4
|
-
import { a as a$4 } from './chunk-BW4TJLAD.js';
|
|
5
|
-
import { a as a$2 } from './chunk-AGCI6C3Z.js';
|
|
6
|
-
import { forwardRef, useState } from 'react';
|
|
7
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
var S=[{label:"mm",value:"mm"},{label:"cm",value:"cm"},{label:"m",value:"m"}],W=forwardRef(({units:r=S,maxSize:b=6,className:g="",inputClassName:v="",dropdownClassName:c="",helpText:w="",disabled:o=!1,errorMessage:t="",hasError:l=!1,required:s=!1,label:C,inputPlaceholder:I,defaultUnit:N,fixedUnit:n,onChangeValue:x,onChangeUnit:p},U)=>{let[E,T]=useState(N||r[0]);return jsxs("div",{className:`flex flex-col ${g}`,id:"input-with-unit__container",children:[jsx(a,{label:C,required:s,hasError:l||!!t,htmlFor:"input-with-unit",className:"mb-1"}),jsxs("div",{className:"flex w-full items-start gap-x-1",children:[jsx(a$1,{id:"input-with-unit",ref:U,maxLength:b,formatValue:"onlyNumber",disabled:o,hasError:l||!!t,required:s,onChange:x,placeholder:I,formGroupClassName:a$2("w-full",v)}),jsx(a$3,{id:"input-with-unit-dropdown",formGroupClassName:a$2("w-40",c),placeholder:"mm",options:r,value:n??E,onChange:i=>{n||(T({label:i.label,value:String(i.value)}),p&&p(i));},disabled:!!n||o,hasError:l||!!t})]}),jsx(a$4,{helpText:t||w,hasError:!!t})]})});W.displayName="InputWithUnit";
|
|
10
|
-
|
|
11
|
-
export { S as a, W as b };
|
package/dist/chunk-L5IJMOFK.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-TZI6YTCW.js';
|
|
2
|
-
import { a as a$2 } from './chunk-UZZ5JUF7.js';
|
|
3
|
-
import { a } from './chunk-AGCI6C3Z.js';
|
|
4
|
-
import { cva } from 'class-variance-authority';
|
|
5
|
-
import f from 'react';
|
|
6
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var b=cva("ml-2 hidden md:block",{variants:{hasError:{true:"text-danger",false:"text-on-base"}},defaultVariants:{hasError:!1}}),u=f.memo(({className:i="",label:t="",labelComplement:a$3,hasError:n=!1,required:m=!1,help:o,htmlFor:p})=>t?jsxs("label",{className:a("input-label text-f6 mb-0.5 inline-flex items-center font-semibold",n?"text-danger":"text-on-base",i),htmlFor:p,children:[`${t}${m?"*":""}`,a$3?jsx("span",{className:"ml-2",children:a$3}):null,o?jsx(a$1,{content:o,className:"ml-2",children:jsx("span",{children:jsx(a$2,{icon:"infoCircle",className:b({hasError:n}),size:4})})}):null]}):null);u.displayName="InputLabel";
|
|
9
|
-
|
|
10
|
-
export { u as a };
|
package/dist/chunk-RXUWLIO5.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-L5IJMOFK.js';
|
|
2
|
-
import { a as a$1 } from './chunk-BW4TJLAD.js';
|
|
3
|
-
import { a as a$2 } from './chunk-AGCI6C3Z.js';
|
|
4
|
-
import { cva } from 'class-variance-authority';
|
|
5
|
-
import H, { useMemo, useRef, useEffect } from 'react';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var n=24,k=cva("relative appearance-none overflow-hidden rounded border border-card-stroke bg-base-1 px-4 py-3 shadow-none outline-none transition-colors focus-within:border-inverted-1 focus:border-inverted-1",{variants:{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"}},defaultVariants:{hasErrorState:!1,disabled:!1,readOnly:!1}}),G=({className:T="",formGroupClassName:v="",label:w,labelComplement:y,helpText:E,hasError:I=!1,errorMessage:c,required:p=!1,defaultValue:s,id:A,name:f,disabled:m,readOnly:h,minLines:i=2,maxLines:u=5,...N},L)=>{let R=useMemo(()=>Math.random().toString(36).substring(7),[]),b=A||f||R,l=I||!!c,P=jsx(a,{label:w,labelComplement:y,required:p,hasError:l,htmlFor:b,className:"mb-1"}),M=jsx(a$1,{helpText:c||E,hasError:l,className:"mt-2"}),o=useRef(null),C=()=>{let e=o.current;if(e){let r=u*n,t=i*n;e.scrollHeight>r?(e.style.height="auto",e.style.height=`${r}px`):e.scrollHeight<=t?(e.style.height="auto",e.style.height=`${t}px`):(e.style.height="auto",e.style.height=`${e.scrollHeight}px`);}};return useEffect(()=>{let e=o.current;if(e){let r=i*n;if(s){let t=u*n;e.scrollHeight>t?r=t:e.scrollHeight>r&&(r=e.scrollHeight);}e.style.height=`${r}px`;}},[o,i,s]),jsxs("div",{className:a$2("form-group flex flex-col ",v),ref:L,children:[P,jsx("div",{className:a$2("relative appearance-none overflow-hidden rounded border border-card-stroke bg-base-1 px-4 py-3 shadow-none outline-none transition-colors focus-within:border-inverted-1 focus:border-inverted-1",k({hasErrorState:l,disabled:m,readOnly:h,className:T})),children:jsx("textarea",{...N,ref:o,onInput:C,className:"peer text-f6 flex w-full min-w-0 resize-none bg-transparent text-on-base shadow-none outline-none transition-colors focus-within:border-inverted-1 focus:border-inverted-1",id:b,name:f,required:p,disabled:m,readOnly:h,defaultValue:s})}),M]})},V=H.forwardRef(G),q=H.memo(V);q.displayName="TextArea";
|
|
9
|
-
|
|
10
|
-
export { q as a };
|