@jamsrui/alert 0.0.13 → 0.0.14
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-config.mjs +1 -1
- package/dist/alert-content.mjs +1 -1
- package/dist/alert-context.mjs +1 -1
- package/dist/alert-description.mjs +1 -1
- package/dist/alert-icon.mjs +1 -1
- package/dist/alert-title.mjs +1 -1
- package/dist/alert.mjs +1 -1
- package/dist/icons.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/styles.mjs +1 -1
- package/dist/use-alert.mjs +1 -1
- package/package.json +6 -6
- package/dist/chunk-2LM4CODO.mjs +0 -1
- package/dist/chunk-7GIS5J5O.mjs +0 -1
- package/dist/chunk-7H57NDIJ.mjs +0 -1
- package/dist/chunk-BDR3I5OV.mjs +0 -1
- package/dist/chunk-EWVQT27P.mjs +0 -1
- package/dist/chunk-HRTLPVEV.mjs +0 -1
- package/dist/chunk-HXIFKUBQ.mjs +0 -1
- package/dist/chunk-JNWZOJMD.mjs +0 -1
- package/dist/chunk-O53QWKQF.mjs +0 -1
- package/dist/chunk-U2HPND5Q.mjs +0 -1
package/dist/alert-config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{createConfigContext as e}from"@jamsrui/utils";const[o,r]=e({displayName:"AlertConfigContext"});export{o as AlertConfig,r as useAlertConfig};
|
package/dist/alert-content.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{jsx as s}from"react/jsx-runtime";import{useAlertContext as n}from"./alert-context.mjs";const i=t=>{const{getContentProps:e}=n(),{children:o,...r}=t;return s("div",{...e(r),children:o})};export{i as AlertContent};
|
package/dist/alert-context.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as x}from"react/jsx-runtime";import{createContext as n,use as l}from"react";const t=n(null),s=e=>{const{children:r,ctx:o}=e;return x(t,{value:o,children:r})},c=()=>{const e=l(t);if(!e)throw new Error("useAlertContext must be used within AlertContextProvider");return e};export{s as AlertContextProvider,c as useAlertContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{Text as n}from"@jamsrui/text";import{useAlertContext as s}from"./alert-context.mjs";const l=t=>{const{getDescriptionProps:r}=s(),{children:o,...p}=t;return e(n,{render:e("p",{}),...r(p),children:o})};export{l as AlertDescription};
|
package/dist/alert-icon.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useRenderElement as s}from"@jamsrui/hooks";import{useAlertContext as p}from"./alert-context.mjs";const i=e=>{const{getIconProps:r,icon:t}=p(),{children:o=t,...n}=e;return s("span",{props:[r(n),{children:o}]})};export{i as AlertIcon};
|
package/dist/alert-title.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{Text as n}from"@jamsrui/text";import{useAlertContext as p}from"./alert-context.mjs";const x=t=>{const{getTitleProps:r}=p(),{children:o,...l}=t;return e(n,{render:e("h3",{}),...r(l),children:o})};export{x as AlertTitle};
|
package/dist/alert.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{jsx as f}from"react/jsx-runtime";import{useRenderElement as n}from"@jamsrui/hooks";import{mergeConfigProps as m}from"@jamsrui/utils";import{useAlertConfig as i}from"./alert-config.mjs";import{AlertContextProvider as l}from"./alert-context.mjs";import{useAlert as c}from"./use-alert.mjs";const g=o=>{const r=i(),t=m(r,r,o),e=c(t),{getRootProps:s}=e,p=n("div",{props:[s({})]});return f(l,{ctx:e,children:p})};export{g as Alert};
|
package/dist/icons.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{ErrorIcon as t,InfoIcon as o,SuccessIcon as a,WarningIcon as e}from"@jamsrui/icons";const c={danger:n(t,{}),info:n(o,{}),success:n(a,{}),warning:n(e,{}),default:n(o,{})};export{c as iconMappingDefault};
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{AlertConfig as x,useAlertConfig as C}from"./alert-config.mjs";import{AlertDescription as g}from"./alert-description.mjs";import{AlertTitle as R}from"./alert-title.mjs";import{alertStyles as u}from"./styles.mjs";import{useAlert as I}from"./use-alert.mjs";import{Alert as t}from"./alert.mjs";import{AlertContent as r}from"./alert-content.mjs";import{AlertDescription as o}from"./alert-description.mjs";import{AlertIcon as e}from"./alert-icon.mjs";import{AlertTitle as l}from"./alert-title.mjs";const f=Object.assign(t,{Root:t,Title:l,Description:o,Content:r,Icon:e});export{f as Alert,x as AlertConfig,g as AlertDescription,R as AlertTitle,u as alertStyles,I as useAlert,C as useAlertConfig};
|
package/dist/styles.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{radiusVariant as t,tv as r}from"@jamsrui/utils";const e=r({slots:{root:"alert__root relative flex gap-2 px-4 py-1.5 text-sm ring-1 ring-inset",icon:"alert__icon shrink-0 py-2",title:"alert__title",description:"alert__description",content:"alert__content flex flex-col grow py-2 gap-1"},variants:{variant:{bordered:{root:"alert--bordered border"},solid:{root:"alert--solid font-medium"},flat:{root:"alert--flat"}},status:{success:{root:"alert--success ring-success-border"},warning:{root:"alert--warning ring-warning-border"},danger:{root:"alert--danger ring-danger-border"},info:{root:"alert--info ring-primary-border"},default:{root:"alert--default ring-default-border"}},radius:t("root")},compoundVariants:[{status:"danger",variant:"solid",className:{root:"bg-danger text-danger-foreground"}},{status:"success",variant:"solid",className:{root:"bg-success text-success-foreground"}},{status:"info",variant:"solid",className:{root:"bg-primary text-primary-foreground"}},{status:"warning",variant:"solid",className:{root:"bg-warning text-warning-foreground"}},{status:"default",variant:"solid",className:{root:"bg-default text-default-foreground"}},{status:"success",variant:"flat",className:{root:"bg-success-flat text-success"}},{status:"info",variant:"flat",className:{root:"bg-primary-flat text-primary"}},{status:"warning",variant:"flat",className:{root:"bg-warning-flat text-warning"}},{status:"danger",variant:"flat",className:{root:"bg-danger-flat text-danger"}},{status:"default",variant:"flat",className:{root:"bg-default-flat text-foreground"}},{status:"danger",variant:"bordered",className:{root:"border-danger-stroke text-danger"}},{status:"success",variant:"bordered",className:{root:"border-success-stroke text-success"}},{status:"info",variant:"bordered",className:{root:"border-primary-stroke text-primary"}},{status:"warning",variant:"bordered",className:{root:"border-warning-stroke text-warning"}},{status:"default",variant:"bordered",className:{root:"border-default-stroke text-foreground"}}],defaultVariants:{status:"success",variant:"flat",radius:"md"}});export{e as alertStyles};
|
package/dist/use-alert.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useCallback as r,useMemo as d}from"react";import{cn as y,dataAttrDev as o,mapPropsVariants as u}from"@jamsrui/utils";import{iconMappingDefault as g}from"./icons.mjs";import{alertStyles as P}from"./styles.mjs";const x=A=>{const[N,s]=u(A,P.variantKeys),{...a}=N,e=P(s),{status:f="default"}=s,l=g[f],n=r(t=>({"data-slot":o("root"),role:"alert",...a,...t,className:e.root({className:y(t.className)})}),[a,e]),c=r(t=>({...t,"data-slot":o("title"),className:e.title({className:t.className}),variant:"h6"}),[e]),i=r(t=>({...t,"data-slot":o("description"),className:e.description({className:t.className})}),[e]),p=r(t=>({...t,"data-slot":o("content"),className:e.content({className:t.className})}),[e]),m=r(t=>({...t,"data-slot":o("icon"),className:e.icon({className:t.className})}),[e]);return d(()=>({icon:l,getRootProps:n,getTitleProps:c,getDescriptionProps:i,getContentProps:p,getIconProps:m}),[p,i,n,c,l,m])};export{x 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.14",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@jamsrui/
|
|
9
|
-
"@jamsrui/core": "^0.0.
|
|
10
|
-
"@jamsrui/
|
|
11
|
-
"@jamsrui/utils": "^0.0.
|
|
12
|
-
"@jamsrui/
|
|
8
|
+
"@jamsrui/hooks": "^0.0.14",
|
|
9
|
+
"@jamsrui/core": "^0.0.12",
|
|
10
|
+
"@jamsrui/icons": "^0.0.12",
|
|
11
|
+
"@jamsrui/utils": "^0.0.14",
|
|
12
|
+
"@jamsrui/text": "^0.0.14"
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
package/dist/chunk-2LM4CODO.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/dist/chunk-7GIS5J5O.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/dist/chunk-7H57NDIJ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createConfigContext as e}from"@jamsrui/utils";var[o,r]=e({displayName:"AlertConfigContext"});export{o as a,r as b};
|
package/dist/chunk-BDR3I5OV.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/dist/chunk-EWVQT27P.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as n,use as l}from"react";import{jsx as x}from"react/jsx-runtime";var t=n(null),s=e=>{let{children:r,ctx:o}=e;return x(t,{value:o,children:r})},c=()=>{let e=l(t);if(!e)throw new Error("useAlertContext must be used within AlertContextProvider");return e};export{s as a,c as b};
|
package/dist/chunk-HRTLPVEV.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/dist/chunk-HXIFKUBQ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/dist/chunk-JNWZOJMD.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ErrorIcon as t,InfoIcon as o,SuccessIcon as a,WarningIcon as e}from"@jamsrui/icons";import{jsx as n}from"react/jsx-runtime";var c={danger:n(t,{}),info:n(o,{}),success:n(a,{}),warning:n(e,{}),default:n(o,{})};export{c as a};
|
package/dist/chunk-O53QWKQF.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/chunk-U2HPND5Q.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{radiusVariant as t,tv as r}from"@jamsrui/utils";var e=r({slots:{root:"alert__root relative flex gap-2 px-4 py-1.5 text-sm ring-1 ring-inset",icon:"alert__icon shrink-0 py-2",title:"alert__title",description:"alert__description",content:"alert__content flex flex-col grow py-2 gap-1"},variants:{variant:{bordered:{root:"alert--bordered border"},solid:{root:"alert--solid font-medium"},flat:{root:"alert--flat"}},status:{success:{root:"alert--success ring-success-border"},warning:{root:"alert--warning ring-warning-border"},danger:{root:"alert--danger ring-danger-border"},info:{root:"alert--info ring-primary-border"},default:{root:"alert--default ring-default-border"}},radius:t("root")},compoundVariants:[{status:"danger",variant:"solid",className:{root:"bg-danger text-danger-foreground"}},{status:"success",variant:"solid",className:{root:"bg-success text-success-foreground"}},{status:"info",variant:"solid",className:{root:"bg-primary text-primary-foreground"}},{status:"warning",variant:"solid",className:{root:"bg-warning text-warning-foreground"}},{status:"default",variant:"solid",className:{root:"bg-default text-default-foreground"}},{status:"success",variant:"flat",className:{root:"bg-success-flat text-success"}},{status:"info",variant:"flat",className:{root:"bg-primary-flat text-primary"}},{status:"warning",variant:"flat",className:{root:"bg-warning-flat text-warning"}},{status:"danger",variant:"flat",className:{root:"bg-danger-flat text-danger"}},{status:"default",variant:"flat",className:{root:"bg-default-flat text-foreground"}},{status:"danger",variant:"bordered",className:{root:"border-danger-stroke text-danger"}},{status:"success",variant:"bordered",className:{root:"border-success-stroke text-success"}},{status:"info",variant:"bordered",className:{root:"border-primary-stroke text-primary"}},{status:"warning",variant:"bordered",className:{root:"border-warning-stroke text-warning"}},{status:"default",variant:"bordered",className:{root:"border-default-stroke text-foreground"}}],defaultVariants:{status:"success",variant:"flat",radius:"md"}});export{e as a};
|