@discuss-ds/ui 0.25.0 → 0.26.0
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +16 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @discuss-ds/ui
|
|
2
2
|
|
|
3
|
+
## 0.26.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#96](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/96) [`b7cb516`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/b7cb516418206054de5f26c4c10d2fb3e7e9edb5) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `ToastInline` takes an optional `actions` slot (for example a ghost "Dismiss" and an outline "Fix" `Button size="sm"`) shown after the message, and a new quiet `variant="neutral"` (secondary background, standard border) for suggestions. Existing variants and the `onClose` button are unchanged.
|
|
8
|
+
|
|
3
9
|
## 0.25.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -2260,6 +2260,18 @@ var toastVariants = (0, import_class_variance_authority4.cva)("border", {
|
|
|
2260
2260
|
},
|
|
2261
2261
|
defaultVariants: { variant: "info" }
|
|
2262
2262
|
});
|
|
2263
|
+
var inlineVariants = (0, import_class_variance_authority4.cva)("border", {
|
|
2264
|
+
variants: {
|
|
2265
|
+
variant: {
|
|
2266
|
+
neutral: "border-border bg-secondary",
|
|
2267
|
+
info: "border-info-border bg-surface",
|
|
2268
|
+
success: "border-success-soft-border bg-success-soft",
|
|
2269
|
+
warning: "border-warning-soft-border bg-warning-soft",
|
|
2270
|
+
destructive: "border-destructive-soft-border bg-destructive-soft"
|
|
2271
|
+
}
|
|
2272
|
+
},
|
|
2273
|
+
defaultVariants: { variant: "info" }
|
|
2274
|
+
});
|
|
2263
2275
|
var iconColour = {
|
|
2264
2276
|
info: "text-surface-foreground",
|
|
2265
2277
|
success: "text-success-soft-foreground",
|
|
@@ -2324,18 +2336,19 @@ var Toast = React33.forwardRef(
|
|
|
2324
2336
|
Toast.displayName = "Toast";
|
|
2325
2337
|
var ToastAction = import_radix_ui17.Toast.Action;
|
|
2326
2338
|
var ToastInline = React33.forwardRef(
|
|
2327
|
-
({ className, variant = "info", onClose, closeLabel = "Close", children, ...props }, ref) => {
|
|
2339
|
+
({ className, variant = "info", actions, onClose, closeLabel = "Close", children, ...props }, ref) => {
|
|
2328
2340
|
const v = variant ?? "info";
|
|
2329
2341
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2330
2342
|
"div",
|
|
2331
2343
|
{
|
|
2332
2344
|
ref,
|
|
2333
2345
|
role: v === "destructive" ? "alert" : "status",
|
|
2334
|
-
className: cn("flex items-center gap-2 rounded-sm px-2 py-1.5",
|
|
2346
|
+
className: cn("flex items-center gap-2 rounded-sm px-2 py-1.5", inlineVariants({ variant: v }), className),
|
|
2335
2347
|
...props,
|
|
2336
2348
|
children: [
|
|
2337
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(VariantIcon, { variant: v, size: 16 }),
|
|
2349
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(VariantIcon, { variant: v === "neutral" ? "info" : v, size: 16 }),
|
|
2338
2350
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "min-w-0 flex-1 text-body-small text-secondary-muted-foreground", children }),
|
|
2351
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions }),
|
|
2339
2352
|
onClose && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react16.X, { size: 16, "aria-hidden": true }) })
|
|
2340
2353
|
]
|
|
2341
2354
|
}
|