@arcfusionz/arc-primitive-ui 0.3.6 → 0.3.8

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.
@@ -7,10 +7,10 @@ import { Button } from "@base-ui/react/button";
7
7
  const baseClasses = "relative flex w-full items-start gap-3 rounded-md border border-transparent p-4 font-sans text-sm";
8
8
  const appearanceClasses = {
9
9
  solid: {
10
- neutral: "bg-foreground text-background",
10
+ neutral: "bg-slate-600 text-background",
11
11
  info: "bg-primary text-primary-foreground",
12
- success: "bg-success-700 text-success-foreground",
13
- warning: "bg-warning text-warning-950",
12
+ success: "bg-success text-success-foreground",
13
+ warning: "bg-warning text-warning-foreground",
14
14
  destructive: "bg-destructive text-destructive-foreground"
15
15
  },
16
16
  soft: {
@@ -153,6 +153,8 @@ function alertVariants({ variant = "neutral", appearance = "soft", className } =
153
153
  const Alert = forwardRef(({ variant = "neutral", appearance = "soft", title, icon, action, onClose, closeLabel, role = "alert", render, className, children, ...rest }, ref) => {
154
154
  const resolvedIcon = icon === void 0 ? defaultVariantIcons[variant] : icon;
155
155
  const solid = appearance === "solid";
156
+ const hasDescription = children != null && children !== false;
157
+ const hasTitleOnlyAction = title != null && action != null && !hasDescription;
156
158
  return useRender({
157
159
  defaultTagName: "div",
158
160
  render,
@@ -162,7 +164,7 @@ const Alert = forwardRef(({ variant = "neutral", appearance = "soft", title, ico
162
164
  className: cn(alertVariants({
163
165
  variant,
164
166
  appearance
165
- }), className),
167
+ }), hasTitleOnlyAction && "items-center", className),
166
168
  children: /* @__PURE__ */ jsxs(Fragment$1, { children: [
167
169
  resolvedIcon != null && typeof resolvedIcon !== "boolean" && /* @__PURE__ */ jsx("span", {
168
170
  "aria-hidden": "true",
@@ -174,7 +176,7 @@ const Alert = forwardRef(({ variant = "neutral", appearance = "soft", title, ico
174
176
  children: [title != null && /* @__PURE__ */ jsx("div", {
175
177
  className: cn(titleClasses, !solid && titleColorClasses[variant]),
176
178
  children: title
177
- }), children != null && children !== false && /* @__PURE__ */ jsx("div", { children })]
179
+ }), hasDescription && /* @__PURE__ */ jsx("div", { children })]
178
180
  }),
179
181
  action != null && /* @__PURE__ */ jsx("div", {
180
182
  className: actionSlotClasses,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcfusionz/arc-primitive-ui",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "ArcFusion primitive UI components",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -309,6 +309,8 @@
309
309
  --color-background: #ffffff; /* [brand] the "Clean Slate" */
310
310
  --color-foreground: var(--color-slate-900);
311
311
 
312
+ --color-canvas: #f9fafc;
313
+
312
314
  --color-surface: var(--color-slate-50);
313
315
  --color-surface-foreground: var(--color-slate-900);
314
316