@jamsrui/alert 0.0.12 → 0.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.
- package/dist/{alert-BWQLCpUd.d.mts → alert-BTqcLoKk.d.mts} +2 -23
- package/dist/alert-config.d.mts +5 -6
- package/dist/alert-config.mjs +1 -1
- package/dist/alert-content.mjs +1 -1
- package/dist/alert-context.d.mts +1 -2
- package/dist/alert-description.mjs +1 -1
- package/dist/alert-icon.d.mts +1 -1
- package/dist/alert-icon.mjs +1 -1
- package/dist/alert-title.mjs +1 -1
- package/dist/alert.d.mts +1 -2
- package/dist/alert.mjs +1 -1
- package/dist/chunk-2LM4CODO.mjs +1 -0
- package/dist/chunk-7GIS5J5O.mjs +1 -0
- package/dist/chunk-7H57NDIJ.mjs +1 -0
- package/dist/chunk-BDR3I5OV.mjs +1 -0
- package/dist/chunk-HRTLPVEV.mjs +1 -0
- package/dist/chunk-HXIFKUBQ.mjs +1 -0
- package/dist/chunk-O53QWKQF.mjs +1 -0
- package/dist/index.d.mts +20 -9
- package/dist/index.mjs +1 -1
- package/dist/use-alert.d.mts +1 -2
- package/dist/use-alert.mjs +1 -1
- package/package.json +6 -6
- package/dist/chunk-6GTLJVPA.mjs +0 -1
- package/dist/chunk-GDEGKV23.mjs +0 -1
- package/dist/chunk-SFDA3VBM.mjs +0 -1
- package/dist/chunk-SO2IDXD2.mjs +0 -1
- package/dist/chunk-T373AY6M.mjs +0 -1
- package/dist/chunk-UHA5ASFH.mjs +0 -1
- package/dist/chunk-UVM6MA45.mjs +0 -1
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { PropGetter, UIProps
|
|
3
|
+
import { PropGetter, UIProps } from '@jamsrui/utils';
|
|
4
4
|
import { AlertContent } from './alert-content.mjs';
|
|
5
5
|
import { AlertDescription } from './alert-description.mjs';
|
|
6
6
|
import { AlertIcon } from './alert-icon.mjs';
|
|
7
7
|
import { AlertTitle } from './alert-title.mjs';
|
|
8
|
-
import {
|
|
9
|
-
import { AlertVariants, AlertSlots } from './styles.mjs';
|
|
8
|
+
import { AlertVariants } from './styles.mjs';
|
|
10
9
|
|
|
11
10
|
declare const useAlert: (props: useAlert.Props) => {
|
|
12
|
-
hideIcon: boolean | undefined;
|
|
13
11
|
icon: react.ReactNode;
|
|
14
|
-
endContent: react.ReactNode;
|
|
15
|
-
slotProps: {
|
|
16
|
-
title?: AlertTitle.Props;
|
|
17
|
-
content?: AlertContent.Props;
|
|
18
|
-
description?: AlertDescription.Props;
|
|
19
|
-
icon?: AlertIcon.Props;
|
|
20
|
-
} | undefined;
|
|
21
12
|
getRootProps: PropGetter<Alert.Props>;
|
|
22
13
|
getTitleProps: PropGetter<AlertTitle.Props>;
|
|
23
14
|
getDescriptionProps: PropGetter<AlertDescription.Props>;
|
|
@@ -26,18 +17,6 @@ declare const useAlert: (props: useAlert.Props) => {
|
|
|
26
17
|
};
|
|
27
18
|
declare namespace useAlert {
|
|
28
19
|
interface Props extends UIProps<"div">, AlertVariants {
|
|
29
|
-
classNames?: SlotsToClassNames<AlertSlots>;
|
|
30
|
-
endContent?: React.ReactNode;
|
|
31
|
-
icon?: React.ReactNode;
|
|
32
|
-
iconMapping?: Partial<IconMapping>;
|
|
33
|
-
slotProps?: {
|
|
34
|
-
title?: AlertTitle.Props;
|
|
35
|
-
content?: AlertContent.Props;
|
|
36
|
-
description?: AlertDescription.Props;
|
|
37
|
-
icon?: AlertIcon.Props;
|
|
38
|
-
};
|
|
39
|
-
tv?: UnknownTV;
|
|
40
|
-
hideIcon?: boolean;
|
|
41
20
|
}
|
|
42
21
|
}
|
|
43
22
|
|
package/dist/alert-config.d.mts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { A as Alert } from './alert-BWQLCpUd.mjs';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import './alert-
|
|
4
|
-
import './alert-title.mjs';
|
|
5
|
-
import './styles.mjs';
|
|
2
|
+
import { A as Alert } from './alert-BTqcLoKk.mjs';
|
|
6
3
|
import 'react';
|
|
7
4
|
import '@jamsrui/utils';
|
|
8
5
|
import './alert-content.mjs';
|
|
9
|
-
import './alert-
|
|
10
|
-
import './icons.mjs';
|
|
6
|
+
import './alert-description.mjs';
|
|
11
7
|
import '@jamsrui/text';
|
|
8
|
+
import './alert-icon.mjs';
|
|
9
|
+
import './alert-title.mjs';
|
|
10
|
+
import './styles.mjs';
|
|
12
11
|
|
|
13
12
|
declare const useAlertConfig: () => AlertConfig.Props;
|
|
14
13
|
declare const AlertConfig: (props: Omit<Partial<AlertConfig.Props>, "children"> & {
|
package/dist/alert-config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
"use client";import{a,b}from"./chunk-7H57NDIJ.mjs";export{a as AlertConfig,b as useAlertConfig};
|
package/dist/alert-content.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
"use client";import{a}from"./chunk-2LM4CODO.mjs";import"./chunk-EWVQT27P.mjs";export{a as AlertContent};
|
package/dist/alert-context.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { u as useAlert } from './alert-
|
|
2
|
+
import { u as useAlert } from './alert-BTqcLoKk.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@jamsrui/utils';
|
|
5
5
|
import './alert-content.mjs';
|
|
@@ -7,7 +7,6 @@ import './alert-description.mjs';
|
|
|
7
7
|
import '@jamsrui/text';
|
|
8
8
|
import './alert-icon.mjs';
|
|
9
9
|
import './alert-title.mjs';
|
|
10
|
-
import './icons.mjs';
|
|
11
10
|
import './styles.mjs';
|
|
12
11
|
|
|
13
12
|
declare const useAlertContext: () => AlertContextProvider.Type;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
"use client";import{a}from"./chunk-HRTLPVEV.mjs";import"./chunk-EWVQT27P.mjs";export{a as AlertDescription};
|
package/dist/alert-icon.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { UIProps } from '@jamsrui/utils';
|
|
3
3
|
|
|
4
|
-
declare const AlertIcon: (props: AlertIcon.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any
|
|
4
|
+
declare const AlertIcon: (props: AlertIcon.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
5
|
declare namespace AlertIcon {
|
|
6
6
|
interface Props extends UIProps<"span"> {
|
|
7
7
|
}
|
package/dist/alert-icon.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
"use client";import{a}from"./chunk-HXIFKUBQ.mjs";import"./chunk-EWVQT27P.mjs";export{a as AlertIcon};
|
package/dist/alert-title.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
"use client";import{a}from"./chunk-BDR3I5OV.mjs";import"./chunk-EWVQT27P.mjs";export{a as AlertTitle};
|
package/dist/alert.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
|
-
export { A as Alert } from './alert-
|
|
2
|
+
export { A as Alert } from './alert-BTqcLoKk.mjs';
|
|
3
3
|
import '@jamsrui/utils';
|
|
4
4
|
import 'react';
|
|
5
5
|
import './alert-content.mjs';
|
|
@@ -7,5 +7,4 @@ import './alert-description.mjs';
|
|
|
7
7
|
import '@jamsrui/text';
|
|
8
8
|
import './alert-icon.mjs';
|
|
9
9
|
import './alert-title.mjs';
|
|
10
|
-
import './icons.mjs';
|
|
11
10
|
import './styles.mjs';
|
package/dist/alert.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
"use client";import{a}from"./chunk-7GIS5J5O.mjs";import"./chunk-O53QWKQF.mjs";import"./chunk-U2HPND5Q.mjs";import"./chunk-7H57NDIJ.mjs";import"./chunk-EWVQT27P.mjs";import"./chunk-JNWZOJMD.mjs";export{a as Alert};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as t}from"./chunk-EWVQT27P.mjs";import{jsx as s}from"react/jsx-runtime";var i=e=>{let{getContentProps:o}=t(),{children:r,...n}=e;return s("div",{...o(n),children:r})};export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk-O53QWKQF.mjs";import{b as o}from"./chunk-7H57NDIJ.mjs";import{a as t}from"./chunk-EWVQT27P.mjs";import{useRenderElement as l}from"@jamsrui/hooks";import{mergeConfigProps as c}from"@jamsrui/utils";import{jsx as f}from"react/jsx-runtime";var g=p=>{let r=o(),n=c(r,r,p),e=s(n),{getRootProps:m}=e,i=l("div",{props:[m({})]});return f(t,{ctx:e,children:i})};export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createConfigContext as e}from"@jamsrui/utils";var[o,r]=e({displayName:"AlertConfigContext"});export{o as a,r as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-EWVQT27P.mjs";import{Text as p}from"@jamsrui/text";import{jsx as t}from"react/jsx-runtime";var x=r=>{let{getTitleProps:o}=e(),{children:l,...n}=r;return t(p,{render:t("h3",{}),...o(n),children:l})};export{x as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-EWVQT27P.mjs";import{Text as s}from"@jamsrui/text";import{jsx as t}from"react/jsx-runtime";var l=r=>{let{getDescriptionProps:o}=e(),{children:p,...n}=r;return t(s,{render:t("p",{}),...o(n),children:p})};export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-EWVQT27P.mjs";import{useRenderElement as p}from"@jamsrui/hooks";var i=r=>{let{getIconProps:t,icon:o}=e(),{children:n=o,...s}=r;return p("span",{props:[t(s),{children:n}]})};export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk-U2HPND5Q.mjs";import{a as A}from"./chunk-JNWZOJMD.mjs";import{useCallback as r,useMemo as y}from"react";import{cn as u,dataAttrDev as o,mapPropsVariants as g}from"@jamsrui/utils";var x=N=>{let[f,a]=g(N,s.variantKeys),{...l}=f,e=s(a),{status:d="default"}=a,n=A[d],c=r(t=>({"data-slot":o("root"),role:"alert",...l,...t,className:e.root({className:u(t.className)})}),[l,e]),i=r(t=>({...t,"data-slot":o("title"),className:e.title({className:t.className}),variant:"h6"}),[e]),p=r(t=>({...t,"data-slot":o("description"),className:e.description({className:t.className})}),[e]),m=r(t=>({...t,"data-slot":o("content"),className:e.content({className:t.className})}),[e]),P=r(t=>({...t,"data-slot":o("icon"),className:e.icon({className:t.className})}),[e]);return y(()=>({icon:n,getRootProps:c,getTitleProps:i,getDescriptionProps:p,getContentProps:m,getIconProps:P}),[m,p,c,i,n,P])};export{x as a};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
export { AlertConfig, useAlertConfig } from './alert-config.mjs';
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import { AlertDescription } from './alert-description.mjs';
|
|
5
|
+
import { AlertTitle } from './alert-title.mjs';
|
|
5
6
|
export { alertStyles } from './styles.mjs';
|
|
6
|
-
import '
|
|
7
|
-
|
|
8
|
-
import '
|
|
9
|
-
import './alert-
|
|
10
|
-
import './alert-icon.mjs';
|
|
11
|
-
import './icons.mjs';
|
|
7
|
+
import { A as Alert$1 } from './alert-BTqcLoKk.mjs';
|
|
8
|
+
export { u as useAlert } from './alert-BTqcLoKk.mjs';
|
|
9
|
+
import { AlertContent } from './alert-content.mjs';
|
|
10
|
+
import { AlertIcon } from './alert-icon.mjs';
|
|
12
11
|
import '@jamsrui/text';
|
|
12
|
+
import '@jamsrui/utils';
|
|
13
|
+
|
|
14
|
+
type AlertProps = Alert$1.Props;
|
|
15
|
+
declare const Alert: ((props: Alert$1.Props) => react_jsx_runtime.JSX.Element) & {
|
|
16
|
+
Root: (props: Alert$1.Props) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
Title: (props: AlertTitle.Props) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
Description: (props: AlertDescription.Props) => react_jsx_runtime.JSX.Element;
|
|
19
|
+
Content: (props: AlertContent.Props) => react_jsx_runtime.JSX.Element;
|
|
20
|
+
Icon: (props: AlertIcon.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { Alert, AlertDescription, type AlertProps, AlertTitle };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{a as e}from"./chunk-2LM4CODO.mjs";import{a as t}from"./chunk-HRTLPVEV.mjs";import{a as l}from"./chunk-HXIFKUBQ.mjs";import{a as r}from"./chunk-BDR3I5OV.mjs";import{a as o}from"./chunk-7GIS5J5O.mjs";import{a as A}from"./chunk-O53QWKQF.mjs";import{a as m}from"./chunk-U2HPND5Q.mjs";import{a as p,b as i}from"./chunk-7H57NDIJ.mjs";import"./chunk-EWVQT27P.mjs";import"./chunk-JNWZOJMD.mjs";var C=Object.assign(o,{Root:o,Title:r,Description:t,Content:e,Icon:l});export{C as Alert,p as AlertConfig,t as AlertDescription,r as AlertTitle,m as alertStyles,A as useAlert,i as useAlertConfig};
|
package/dist/use-alert.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '@jamsrui/utils';
|
|
3
|
-
export { u as useAlert } from './alert-
|
|
3
|
+
export { u as useAlert } from './alert-BTqcLoKk.mjs';
|
|
4
4
|
import './alert-content.mjs';
|
|
5
5
|
import './alert-description.mjs';
|
|
6
6
|
import './alert-icon.mjs';
|
|
7
7
|
import './alert-title.mjs';
|
|
8
|
-
import './icons.mjs';
|
|
9
8
|
import './styles.mjs';
|
|
10
9
|
import 'react/jsx-runtime';
|
|
11
10
|
import '@jamsrui/text';
|
package/dist/use-alert.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-O53QWKQF.mjs";import"./chunk-U2HPND5Q.mjs";import"./chunk-JNWZOJMD.mjs";export{a as useAlert};
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/alert",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@jamsrui/
|
|
9
|
-
"@jamsrui/
|
|
10
|
-
"@jamsrui/
|
|
11
|
-
"@jamsrui/utils": "^0.0.
|
|
12
|
-
"@jamsrui/icons": "^0.0.
|
|
8
|
+
"@jamsrui/text": "^0.0.13",
|
|
9
|
+
"@jamsrui/core": "^0.0.11",
|
|
10
|
+
"@jamsrui/hooks": "^0.0.13",
|
|
11
|
+
"@jamsrui/utils": "^0.0.13",
|
|
12
|
+
"@jamsrui/icons": "^0.0.11"
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
package/dist/chunk-6GTLJVPA.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-EWVQT27P.mjs";import{useRenderElement as c}from"@jamsrui/hooks";var m=r=>{let{getIconProps:o,hideIcon:t,icon:n}=e(),s=n,p=c("span",{props:[o(r),{children:s}]});return t?null:p};export{m as a};
|
package/dist/chunk-GDEGKV23.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c}from"./chunk-U2HPND5Q.mjs";import{a as I}from"./chunk-JNWZOJMD.mjs";import{useCallback as r,useMemo as M}from"react";import{cn as n,dataAttrDev as a,mapPropsVariants as S,mergeProps as l}from"@jamsrui/utils";var h=C=>{let[T,i]=S(C,c.variantKeys),{classNames:o,slotProps:t,tv:v=c,endContent:p,icon:D,iconMapping:G,hideIcon:m,...P}=T,s=v(i),{status:N="default"}=i,d=D??G?.[N]??I[N],A=r(e=>({"data-slot":a("root"),role:"alert",...P,...e,className:s.root({className:n(o?.root,e.className)})}),[o?.root,P,s]),f=r(e=>({...l(t?.title,e),"data-slot":a("title"),className:s.title({className:n(t?.title?.className,o?.title,e.className)}),variant:"h6"}),[o?.title,t?.title,s]),y=r(e=>({...l(t?.description,e),"data-slot":a("description"),className:s.description({className:n(t?.description?.className,o?.description,e.className)})}),[o?.description,t?.description,s]),g=r(e=>({...l(t?.content,e),"data-slot":a("content"),className:s.content({className:n(t?.content?.className,o?.content,e.className)})}),[o?.content,t?.content,s]),u=r(e=>({...l(t?.icon,e),"data-slot":a("icon"),className:s.icon({className:n(t?.icon?.className,o?.icon,e.className)})}),[o?.icon,t?.icon,s]);return M(()=>({hideIcon:m,icon:d,endContent:p,slotProps:t,getRootProps:A,getTitleProps:f,getDescriptionProps:y,getContentProps:g,getIconProps:u}),[p,g,y,A,f,m,d,t,u])};export{h as a};
|
package/dist/chunk-SFDA3VBM.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as t}from"./chunk-EWVQT27P.mjs";import{mergeProps as s}from"@jamsrui/utils";import{jsx as i}from"react/jsx-runtime";var P=e=>{let{slotProps:o,getContentProps:r}=t(),{children:n,...p}=s(o?.content??{},e);return i("div",{...r(p),children:n})};export{P as a};
|
package/dist/chunk-SO2IDXD2.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createConfigContext as e}from"@jamsrui/utils";var[r,t]=e({displayName:"AlertConfigContext"});export{r as a,t as b};
|
package/dist/chunk-T373AY6M.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-EWVQT27P.mjs";import{Text as n}from"@jamsrui/text";import{jsx as t}from"react/jsx-runtime";var x=r=>{let{getTitleProps:o}=e(),{children:p,...l}=r;return t(n,{render:t("h3",{}),...o(l),children:p})};export{x as a};
|
package/dist/chunk-UHA5ASFH.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./chunk-GDEGKV23.mjs";import{b as n}from"./chunk-SO2IDXD2.mjs";import{a as m}from"./chunk-SFDA3VBM.mjs";import{a as p}from"./chunk-6GTLJVPA.mjs";import{a as s}from"./chunk-EWVQT27P.mjs";import{useRenderElement as C}from"@jamsrui/hooks";import{mergeConfigProps as x}from"@jamsrui/utils";import{Fragment as g,jsx as r,jsxs as u}from"react/jsx-runtime";var y=o=>{let{children:l}=o,e=n(),c=x(e,e,o),t=i(c),{endContent:d,getRootProps:f}=t,A=u(g,{children:[r(p,{}),r(m,{children:l}),d]}),P=C("div",{props:[f({}),{children:A}]});return r(s,{ctx:t,children:P})};export{y as a};
|
package/dist/chunk-UVM6MA45.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-EWVQT27P.mjs";import{Text as s}from"@jamsrui/text";import{jsx as r}from"react/jsx-runtime";var x=t=>{let{getDescriptionProps:o}=e(),{children:p,...n}=t;return r(s,{render:r("p",{}),...o(n),children:p})};export{x as a};
|