@loja-integrada/admin-components 1.1.2 → 1.1.3
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,8 @@
|
|
|
1
|
+
import { a as a$1 } from './chunk-KEDPPRQK.js';
|
|
2
|
+
import { a } from './chunk-REQIQLRI.js';
|
|
3
|
+
import w, { useState, useEffect, useMemo } from 'react';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var n={success:{class:"bg-success-light border-success-dark",icon:"checkCircle",iconClass:"text-success-dark"},warning:{class:"bg-warning-light border-warning-dark",icon:"exclamationTriangle",iconClass:"text-warning"},danger:{class:"bg-danger-light border-danger",icon:"ban",iconClass:"text-danger"},info:{class:"bg-base-1 border-inverted-2",icon:"infoCircle",iconClass:"text-inverted-2"},primary:{class:"bg-primary-light border-primary",icon:"infoCircle",iconClass:"text-primary"}},k=({variant:s="info",isOpen:t=!0,title:f,subtitle:l,actions:i,showClose:b=!1,onClose:c,hideIcon:g=!1,customIcon:m,allBorders:d=!0,className:x})=>{let[u,p]=useState(t);useEffect(()=>{p(t);},[t]);let v=()=>{p(!1),c?.();},C=useMemo(()=>d?"":"border-r-0 border-y-0",[d]);return u?jsxs("div",{className:a("alert relative flex w-full items-start rounded border border-l-4 px-5 py-4 sm:items-center",n[s].class,C,x),children:[!g&&jsx("div",{className:a("alert-icon mr-3 hidden shrink-0 sm:block",n[s].iconClass),children:jsx(a$1,{icon:m||n[s].icon,size:6})}),jsxs("div",{className:"flex min-w-0 grow flex-col items-start justify-between sm:flex-row sm:items-center",children:[jsxs("div",{className:"flex min-w-0 flex-col justify-center break-words leading-5 tracking-4 text-on-base",children:[jsx("span",{className:"alert-title text-f5 font-semibold",children:f}),l?jsx("span",{className:"alert-subtitle text-f6 mt-1",children:l}):null]}),i?jsx("div",{className:"alert-actions mt-3 flex shrink-0 flex-row items-center space-x-3 sm:ml-5 sm:mt-0 sm:flex-row-reverse sm:space-x-reverse",children:i}):null]}),b||c?jsx("div",{className:"alert-close ml-5 flex shrink-0",children:jsx("button",{className:"-m-2 p-2 text-inverted-2 hover:text-inverted-1",onClick:v,type:"button","aria-label":"Close",children:jsx(a$1,{icon:"close",size:4,className:"mt-px sm:mt-0"})})}):null]}):null},R=w.memo(k);R.displayName="Alert";
|
|
7
|
+
|
|
8
|
+
export { R as a };
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export { a as IconCircular } from './chunk-DTLT3DYY.js';
|
|
|
18
18
|
export { a as InputMask } from './chunk-NW24WOHT.js';
|
|
19
19
|
export { a as Input } from './chunk-SJ4MATMO.js';
|
|
20
20
|
export { a as InputLabel } from './chunk-7Z3CCBLX.js';
|
|
21
|
-
export { a as Alert } from './chunk-
|
|
21
|
+
export { a as Alert } from './chunk-NGGA7AJU.js';
|
|
22
22
|
export { a as Badge } from './chunk-7NXFX6TD.js';
|
|
23
23
|
export { a as Tag } from './chunk-EUZRZJ5Q.js';
|
|
24
24
|
export { a as Button } from './chunk-VVJUHPYS.js';
|
|
@@ -38,10 +38,14 @@ interface AlertProps {
|
|
|
38
38
|
* Action for the alert, like button and hiperlinks
|
|
39
39
|
* */
|
|
40
40
|
actions?: React.ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Shows all borders or just the left one
|
|
43
|
+
* */
|
|
44
|
+
allBorders?: boolean;
|
|
41
45
|
/**
|
|
42
46
|
* Custom className for the Alert container
|
|
43
47
|
* */
|
|
44
48
|
className?: string;
|
|
45
49
|
}
|
|
46
|
-
declare const Alert: React.MemoExoticComponent<({ variant, isOpen, title, subtitle, actions, showClose, onClose, hideIcon, customIcon, className }: AlertProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
50
|
+
declare const Alert: React.MemoExoticComponent<({ variant, isOpen, title, subtitle, actions, showClose, onClose, hideIcon, customIcon, allBorders, className }: AlertProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
47
51
|
export { Alert, type AlertProps };
|
package/dist/indicators/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../chunk-7RP4L6ZM.js';
|
|
2
|
-
export { a as Alert } from '../chunk-
|
|
2
|
+
export { a as Alert } from '../chunk-NGGA7AJU.js';
|
|
3
3
|
export { a as Badge } from '../chunk-7NXFX6TD.js';
|
|
4
4
|
export { a as Tag } from '../chunk-EUZRZJ5Q.js';
|
|
5
5
|
import '../chunk-VVJUHPYS.js';
|
package/package.json
CHANGED
package/dist/chunk-FH4OKVGL.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-KEDPPRQK.js';
|
|
2
|
-
import { a } from './chunk-REQIQLRI.js';
|
|
3
|
-
import v, { useState, useEffect } from 'react';
|
|
4
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var n={success:{class:"bg-success-light border-success-dark",icon:"checkCircle",iconClass:"text-success-dark"},warning:{class:"bg-warning-light border-warning",icon:"exclamationTriangle",iconClass:"text-warning"},danger:{class:"bg-danger-light border-danger",icon:"ban",iconClass:"text-danger"},info:{class:"bg-base-1 border-inverted-2",icon:"infoCircle",iconClass:"text-inverted-2"},primary:{class:"bg-primary-light border-primary",icon:"infoCircle",iconClass:"text-primary"}},N=({variant:s="info",isOpen:t=!0,title:p,subtitle:l,actions:o,showClose:f=!1,onClose:c,hideIcon:g=!1,customIcon:m,className:b})=>{let[x,d]=useState(t);useEffect(()=>{d(t);},[t]);let u=()=>{d(!1),c?.();};return x?jsxs("div",{className:a("alert relative flex w-full items-start rounded border border-l-4 px-5 py-4 sm:items-center",n[s].class,b),children:[!g&&jsx("div",{className:a("alert-icon mr-3 hidden shrink-0 sm:block",n[s].iconClass),children:jsx(a$1,{icon:m||n[s].icon,size:6})}),jsxs("div",{className:"flex min-w-0 grow flex-col items-start justify-between sm:flex-row sm:items-center",children:[jsxs("div",{className:"text-f6 flex min-w-0 flex-col justify-center break-words leading-5 tracking-4 text-on-base",children:[jsx("span",{className:"alert-title font-semibold",children:p}),l?jsx("span",{className:"alert-subtitle mt-1",children:l}):null]}),o?jsx("div",{className:"alert-actions mt-3 flex shrink-0 flex-row items-center space-x-3 sm:ml-5 sm:mt-0 sm:flex-row-reverse sm:space-x-reverse",children:o}):null]}),f||c?jsx("div",{className:"alert-close ml-5 flex shrink-0",children:jsx("button",{className:"-m-2 p-2 text-inverted-2 hover:text-inverted-1",onClick:u,type:"button","aria-label":"Close",children:jsx(a$1,{icon:"close",size:4,className:"mt-px sm:mt-0"})})}):null]}):null},h=v.memo(N);h.displayName="Alert";
|
|
7
|
-
|
|
8
|
-
export { h as a };
|