@xerobi/ui 0.1.0 → 0.1.1

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.
Files changed (49) hide show
  1. package/dist/components/alert-dialog/alert-dialog.js +2 -2
  2. package/dist/components/clipboard-text/clipboard-text.d.ts +15 -0
  3. package/dist/components/clipboard-text/clipboard-text.js +58 -0
  4. package/dist/components/clipboard-text/index.d.ts +1 -0
  5. package/dist/components/clipboard-text/index.js +1 -0
  6. package/dist/components/dialog/dialog.js +2 -2
  7. package/dist/components/index.d.ts +7 -1
  8. package/dist/components/index.js +7 -1
  9. package/dist/components/inline-copy-text/index.d.ts +1 -0
  10. package/dist/components/inline-copy-text/index.js +1 -0
  11. package/dist/components/inline-copy-text/inline-copy-text.d.ts +35 -0
  12. package/dist/components/inline-copy-text/inline-copy-text.js +66 -0
  13. package/dist/components/navigation-progress/index.d.ts +1 -0
  14. package/dist/components/navigation-progress/index.js +1 -0
  15. package/dist/components/navigation-progress/navigation-progress.d.ts +10 -0
  16. package/dist/components/navigation-progress/navigation-progress.js +59 -0
  17. package/dist/components/sensitive-input/index.d.ts +1 -0
  18. package/dist/components/sensitive-input/index.js +1 -0
  19. package/dist/components/sensitive-input/sensitive-input.d.ts +14 -0
  20. package/dist/components/sensitive-input/sensitive-input.js +175 -0
  21. package/dist/components/sheet/sheet.js +1 -1
  22. package/dist/components/spinner/spinner.js +2 -2
  23. package/dist/components/switch/switch.d.ts +53 -2
  24. package/dist/components/switch/switch.js +47 -3
  25. package/dist/components/toast/index.d.ts +1 -0
  26. package/dist/components/toast/index.js +1 -0
  27. package/dist/components/toast/toast.d.ts +90 -0
  28. package/dist/components/toast/toast.js +137 -0
  29. package/dist/components/toolbar/index.d.ts +1 -0
  30. package/dist/components/toolbar/index.js +1 -0
  31. package/dist/components/toolbar/toolbar.d.ts +18 -0
  32. package/dist/components/toolbar/toolbar.js +53 -0
  33. package/dist/components/tooltip/tooltip.d.ts +50 -3
  34. package/dist/components/tooltip/tooltip.js +39 -7
  35. package/dist/components/xerobi-logo/index.d.ts +1 -0
  36. package/dist/components/xerobi-logo/index.js +1 -0
  37. package/dist/components/xerobi-logo/xerobi-logo.d.ts +60 -0
  38. package/dist/components/xerobi-logo/xerobi-logo.js +88 -0
  39. package/dist/styles/globals.css +36 -1
  40. package/docs/compliance-report.md +1 -1
  41. package/docs/publishing.md +1 -1
  42. package/package.json +29 -5
  43. package/dist/components/snackbar/classes.d.ts +0 -18
  44. package/dist/components/snackbar/classes.js +0 -19
  45. package/dist/components/snackbar/index.d.ts +0 -3
  46. package/dist/components/snackbar/index.js +0 -3
  47. package/dist/components/snackbar/snackbar.d.ts +0 -8
  48. package/dist/components/snackbar/snackbar.js +0 -39
  49. package/dist/styles/snackbar.css +0 -68
@@ -0,0 +1,88 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { forwardRef } from "react";
4
+ import { cn } from "cn"; // Replace with your utility path
5
+ // =============================================================================
6
+ // Brand Colors (internal)
7
+ // =============================================================================
8
+ const XEROBI_BRAND_COLOR = "#0F172A"; // Slate 900 (fallback for standard color)
9
+ const XEROBI_TEXT_GRAY = "#404041";
10
+ // =============================================================================
11
+ // SVG Path Data (internal)
12
+ // =============================================================================
13
+ const XEROBI_GLYPH_PATH = "M 2.1 0 L 17.9 0 C 19.1 0 19.7 0.6 19.7 1.8 L 19.7 17.5 C 19.7 18.7 19.1 19.3 17.9 19.3 L 2.1 19.3 C 0.9 19.3 0.3 18.7 0.3 17.5 L 0.3 1.8 C 0.3 0.6 0.9 0 2.1 0 Z M 11.6 13.9 L 18.6 6.9 C 19.2 6.3 19.2 5.4 18.6 4.8 L 16.5 2.7 C 15.9 2.1 15 2.1 14.4 2.7 L 11.2 5.9 L 8.1 2.7 C 7.5 2.1 6.6 2.1 6 2.7 L 3.9 4.8 C 3.3 5.4 3.3 6.3 3.9 6.9 L 6.8 9.8 L 3.9 12.7 C 3.3 13.3 3.3 14.2 3.9 14.8 L 6 16.9 C 6.6 17.5 7.5 17.5 8.1 16.9 L 11.2 13.8 L 14.4 17 C 15 17.6 15.9 17.6 16.5 17 L 18.6 14.9 C 19.2 14.3 19.2 13.4 18.6 12.8 Z";
14
+ const XEROBI_WORDMARK_PATHS = [
15
+ // X
16
+ "M 0 44.8 L 20.8 0 L 36.1 0 L 15.3 44.8 Z",
17
+ // E
18
+ "M 44.8 0 L 92.4 0 L 92.4 9.6 L 60.8 9.6 L 60.8 18.4 L 88.5 18.4 L 88.5 28 L 60.8 28 L 60.8 35.2 L 92.4 35.2 L 92.4 44.8 L 44.8 44.8 Z",
19
+ // R
20
+ "M 107.2 0 L 134.4 0 C 142.1 0 148 5.6 148 14.4 C 148 21.6 144 26.4 138.4 28.8 L 150.4 44.8 L 134.4 44.8 L 125.6 31.2 L 123.2 31.2 L 123.2 44.8 L 107.2 44.8 Z M 123.2 22.4 L 132.8 22.4 C 135.7 22.4 137.6 20.8 137.6 18.4 C 137.6 16 135.7 14.4 132.8 14.4 L 123.2 14.4 Z",
21
+ // O
22
+ "M 170 21.6 C 170 8.8 181.6 0 198.4 0 C 215.2 0 226.8 8.8 226.8 21.6 C 226.8 34.4 215.2 44.8 198.4 44.8 C 181.6 44.8 170 34.4 170 21.6 Z M 210.4 22.4 C 210.4 15.2 205.6 10.4 198.4 10.4 C 191.2 10.4 186.4 15.2 186.4 22.4 C 186.4 29.6 191.2 34.4 198.4 34.4 C 205.6 34.4 210.4 29.6 210.4 22.4 Z",
23
+ // B
24
+ "M 245.6 0 L 276.8 0 C 286.4 0 293.6 5.6 293.6 14.4 C 293.6 20 290.4 24 285.6 26.4 C 291.2 28.8 294.4 33.6 294.4 39.2 C 294.4 49.6 286.4 55.2 274.4 55.2 L 245.6 55.2 Z M 274.4 22.4 C 278.4 22.4 280.8 20 280.8 16.8 C 280.8 13.6 278.4 11.2 274.4 11.2 L 261.6 11.2 L 261.6 22.4 Z M 277.6 44.8 C 281.6 44.8 284 42.4 284 38.4 C 284 34.4 281.6 32 277.6 32 L 261.6 32 L 261.6 44.8 Z",
25
+ // I
26
+ "M 312.8 0 L 328.8 0 L 328.8 44.8 L 312.8 44.8 Z",
27
+ ];
28
+ const XEROBI_GLYPH_VIEWBOX = "0 0 20 20";
29
+ const XEROBI_FULL_LOGO_VIEWBOX = "0 0 329 56";
30
+ // =============================================================================
31
+ // Component Variants
32
+ // =============================================================================
33
+ export const XEROBI_LOGO_VARIANTS = {
34
+ variant: {
35
+ glyph: { description: "X glyph only (logomark)" },
36
+ full: { description: "Full logo with X glyph and wordmark stacked" },
37
+ },
38
+ color: {
39
+ color: { description: "Brand colors" },
40
+ black: { description: "Solid black logo" },
41
+ white: { description: "Solid white logo (for dark backgrounds)" },
42
+ },
43
+ };
44
+ export const XEROBI_LOGO_DEFAULT_VARIANTS = {
45
+ variant: "full",
46
+ color: "color",
47
+ };
48
+ /**
49
+ * Xerobi logo component.
50
+ */
51
+ export const XerobiLogo = /* @__PURE__ */ forwardRef(({ variant = XEROBI_LOGO_DEFAULT_VARIANTS.variant, color = XEROBI_LOGO_DEFAULT_VARIANTS.color, className, ...props }, ref) => {
52
+ const isGlyph = variant === "glyph";
53
+ // Determine fill colors
54
+ const fillBrand = color === "color" ? XEROBI_BRAND_COLOR : "currentColor";
55
+ const fillText = color === "color" ? XEROBI_TEXT_GRAY : "currentColor";
56
+ if (isGlyph) {
57
+ return (_jsx("svg", { ref: ref, viewBox: XEROBI_GLYPH_VIEWBOX, fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": "Xerobi logo", className: cn(color === "white" && "text-white", color === "black" && "text-black", className), ...props, children: _jsx("path", { d: XEROBI_GLYPH_PATH, fill: fillBrand }) }));
58
+ }
59
+ // Full logo with wordmark
60
+ return (_jsx("svg", { ref: ref, viewBox: XEROBI_FULL_LOGO_VIEWBOX, fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": "Xerobi logo", className: cn(color === "color" && "text-foreground dark:text-foreground", color === "white" && "text-white", color === "black" && "text-black", className), ...props, children: XEROBI_WORDMARK_PATHS.map((d, i) => (_jsx("path", { d: d, fill: fillText }, i))) }));
61
+ });
62
+ XerobiLogo.displayName = "XerobiLogo";
63
+ /**
64
+ * "Powered by Xerobi" badge component.
65
+ */
66
+ export const PoweredByXerobi = /* @__PURE__ */ forwardRef(({ color = "color", href = "https://xerobi.com", className, ...props }, ref) => {
67
+ return (_jsxs("a", { ref: ref, href: href, target: "_blank", rel: "noopener noreferrer", className: cn("inline-flex items-center gap-2 rounded-lg py-2 pr-3 pl-2.5 text-sm font-medium", "ring-1 ring-inset transition-all hover:shadow-sm", color === "color" &&
68
+ "bg-background text-foreground ring-border", color === "black" && "bg-white text-black ring-black/20", color === "white" && "bg-black text-white ring-white/20", className), ...props, children: [_jsx(XerobiLogo, { variant: "glyph", color: color, className: "h-4 w-auto" }), _jsxs("span", { children: ["Powered by ", _jsx("span", { className: "font-semibold", children: "Xerobi" })] })] }));
69
+ });
70
+ PoweredByXerobi.displayName = "PoweredByXerobi";
71
+ /**
72
+ * Generates SVG markup string for the Xerobi logo.
73
+ */
74
+ export function generateXerobiLogoSvg(options = {}) {
75
+ const { variant = "full", color = "color" } = options;
76
+ const isGlyph = variant === "glyph";
77
+ const fillBrand = color === "color" ? XEROBI_BRAND_COLOR : color;
78
+ const fillText = color === "color" ? XEROBI_TEXT_GRAY : color;
79
+ if (isGlyph) {
80
+ return `<svg viewBox="${XEROBI_GLYPH_VIEWBOX}" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Xerobi logo">
81
+ <path d="${XEROBI_GLYPH_PATH}" fill="${fillBrand}"/>
82
+ </svg>`;
83
+ }
84
+ const wordmarkPaths = XEROBI_WORDMARK_PATHS.map((d) => ` <path d="${d}" fill="${fillText}"/>`).join("\n");
85
+ return `<svg viewBox="${XEROBI_FULL_LOGO_VIEWBOX}" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Xerobi logo">
86
+ ${wordmarkPaths}
87
+ </svg>`;
88
+ }
@@ -9,7 +9,6 @@
9
9
  @import "./theme.css";
10
10
  @import "./components.css";
11
11
  @import "./scrollbar.css";
12
- @import "./snackbar.css";
13
12
 
14
13
  /* Tell Tailwind to scan the library's own sources (src/ in the repo, dist/ once published). */
15
14
  @source "../";
@@ -174,6 +173,42 @@
174
173
  -webkit-mask-composite: xor;
175
174
  mask-composite: exclude;
176
175
  }
176
+
177
+
178
+
179
+ /* =============================================================================
180
+ * SCROLLBAR
181
+ * ============================================================================= */
182
+
183
+ ::-webkit-scrollbar {
184
+ width: 4px;
185
+ }
186
+
187
+ ::-webkit-scrollbar-thumb {
188
+ background-color: transparent;
189
+ border-radius: 9999px;
190
+ transition: background-color 0.3s;
191
+ }
192
+
193
+ *:hover::-webkit-scrollbar-thumb {
194
+ background-color: var(--border);
195
+ }
196
+
197
+ * {
198
+ scrollbar-width: thin;
199
+ scrollbar-color: transparent transparent;
200
+ }
201
+
202
+ *:hover {
203
+ scrollbar-color: var(--border) transparent;
204
+ }
205
+
206
+ /* =============================================================================
207
+ * SCROLLBAR END
208
+ * ============================================================================= */
209
+
210
+
211
+
177
212
  @import "./lightbox.css";
178
213
  @import "./org-chart.css";
179
214
  @import "./nav.css";
@@ -97,7 +97,7 @@ Checked 388 source files against `@xerobi/tokens`.
97
97
  - `src/components/progress-bar` progress-bar has no data-slot attribute
98
98
  - `src/components/scrollbar` scrollbar has no data-slot attribute
99
99
  - `src/components/search-not-found` search-not-found has no data-slot attribute
100
- - `src/components/snackbar` snackbar has no data-slot attribute
100
+ - `src/components/toast` toast has no data-slot attribute
101
101
  - `src/components/svg-color` svg-color has no data-slot attribute
102
102
  - `src/components/theme-provider` theme-provider has no data-slot attribute
103
103
  - `src/components/upload` upload has no data-slot attribute
@@ -5,7 +5,7 @@ Releases go to the public npm registry from GitHub Actions using npm trusted pub
5
5
  ## One-time setup
6
6
 
7
7
  1. Create the package scope. The `@xerobi` organisation must exist on npm.
8
- 2. Publish the first version by hand if the package does not exist yet: `npm publish --access public`. Trusted publishers can only be configured for existing packages.
8
+ 2. Publish the first version by hand if the package does not exist yet: `npm publish --access public --provenance=false`. Trusted publishers can only be configured for existing packages.
9
9
  3. Do this for both `@xerobi/tokens` and `@xerobi/ui`. On npmjs.com open the package, then Settings, then Trusted Publisher, and choose GitHub Actions with:
10
10
  - Organization or user: the GitHub owner of the repository
11
11
  - Repository: the repository name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xerobi/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "scripts": {
@@ -176,6 +176,10 @@
176
176
  "types": "./dist/components/chip/index.d.ts",
177
177
  "default": "./dist/components/chip/index.js"
178
178
  },
179
+ "./clipboard-text": {
180
+ "types": "./dist/components/clipboard-text/index.d.ts",
181
+ "default": "./dist/components/clipboard-text/index.js"
182
+ },
179
183
  "./collapsible": {
180
184
  "types": "./dist/components/collapsible/index.d.ts",
181
185
  "default": "./dist/components/collapsible/index.js"
@@ -276,6 +280,10 @@
276
280
  "types": "./dist/components/image/index.d.ts",
277
281
  "default": "./dist/components/image/index.js"
278
282
  },
283
+ "./inline-copy-text": {
284
+ "types": "./dist/components/inline-copy-text/index.d.ts",
285
+ "default": "./dist/components/inline-copy-text/index.js"
286
+ },
279
287
  "./input": {
280
288
  "types": "./dist/components/input/index.d.ts",
281
289
  "default": "./dist/components/input/index.js"
@@ -348,6 +356,10 @@
348
356
  "types": "./dist/components/navigation-menu/index.d.ts",
349
357
  "default": "./dist/components/navigation-menu/index.js"
350
358
  },
359
+ "./navigation-progress": {
360
+ "types": "./dist/components/navigation-progress/index.d.ts",
361
+ "default": "./dist/components/navigation-progress/index.js"
362
+ },
351
363
  "./number-input": {
352
364
  "types": "./dist/components/number-input/index.d.ts",
353
365
  "default": "./dist/components/number-input/index.js"
@@ -408,6 +420,10 @@
408
420
  "types": "./dist/components/select/index.d.ts",
409
421
  "default": "./dist/components/select/index.js"
410
422
  },
423
+ "./sensitive-input": {
424
+ "types": "./dist/components/sensitive-input/index.d.ts",
425
+ "default": "./dist/components/sensitive-input/index.js"
426
+ },
411
427
  "./separator": {
412
428
  "types": "./dist/components/separator/index.d.ts",
413
429
  "default": "./dist/components/separator/index.js"
@@ -432,10 +448,6 @@
432
448
  "types": "./dist/components/slider/index.d.ts",
433
449
  "default": "./dist/components/slider/index.js"
434
450
  },
435
- "./snackbar": {
436
- "types": "./dist/components/snackbar/index.d.ts",
437
- "default": "./dist/components/snackbar/index.js"
438
- },
439
451
  "./spinner": {
440
452
  "types": "./dist/components/spinner/index.d.ts",
441
453
  "default": "./dist/components/spinner/index.js"
@@ -464,6 +476,10 @@
464
476
  "types": "./dist/components/theme-provider/index.d.ts",
465
477
  "default": "./dist/components/theme-provider/index.js"
466
478
  },
479
+ "./toast": {
480
+ "types": "./dist/components/toast/index.d.ts",
481
+ "default": "./dist/components/toast/index.js"
482
+ },
467
483
  "./toggle": {
468
484
  "types": "./dist/components/toggle/index.d.ts",
469
485
  "default": "./dist/components/toggle/index.js"
@@ -472,6 +488,10 @@
472
488
  "types": "./dist/components/toggle-group/index.d.ts",
473
489
  "default": "./dist/components/toggle-group/index.js"
474
490
  },
491
+ "./toolbar": {
492
+ "types": "./dist/components/toolbar/index.d.ts",
493
+ "default": "./dist/components/toolbar/index.js"
494
+ },
475
495
  "./tooltip": {
476
496
  "types": "./dist/components/tooltip/index.d.ts",
477
497
  "default": "./dist/components/tooltip/index.js"
@@ -483,6 +503,10 @@
483
503
  "./walktour": {
484
504
  "types": "./dist/components/walktour/index.d.ts",
485
505
  "default": "./dist/components/walktour/index.js"
506
+ },
507
+ "./xerobi-logo": {
508
+ "types": "./dist/components/xerobi-logo/index.d.ts",
509
+ "default": "./dist/components/xerobi-logo/index.js"
486
510
  }
487
511
  },
488
512
  "description": "Xerobi design system: components and blocks built on Base UI and Tailwind CSS v4.",
@@ -1,18 +0,0 @@
1
- export declare const snackbarClasses: {
2
- root: string;
3
- toast: string;
4
- title: string;
5
- icon: string;
6
- iconSvg: string;
7
- content: string;
8
- description: string;
9
- actionButton: string;
10
- cancelButton: string;
11
- closeButton: string;
12
- loadingIcon: string;
13
- default: string;
14
- error: string;
15
- success: string;
16
- warning: string;
17
- info: string;
18
- };
@@ -1,19 +0,0 @@
1
- import { createClasses } from "../../lib/create-classes.js";
2
- export const snackbarClasses = {
3
- root: /* @__PURE__ */ createClasses("snackbar__root"),
4
- toast: /* @__PURE__ */ createClasses("snackbar__toast"),
5
- title: /* @__PURE__ */ createClasses("snackbar__title"),
6
- icon: /* @__PURE__ */ createClasses("snackbar__icon"),
7
- iconSvg: /* @__PURE__ */ createClasses("snackbar__icon__svg"),
8
- content: /* @__PURE__ */ createClasses("snackbar__content"),
9
- description: /* @__PURE__ */ createClasses("snackbar__description"),
10
- actionButton: /* @__PURE__ */ createClasses("snackbar__action__button"),
11
- cancelButton: /* @__PURE__ */ createClasses("snackbar__cancel__button"),
12
- closeButton: /* @__PURE__ */ createClasses("snackbar__close_button"),
13
- loadingIcon: /* @__PURE__ */ createClasses("snackbar__loading_icon"),
14
- default: /* @__PURE__ */ createClasses("snackbar__default"),
15
- error: /* @__PURE__ */ createClasses("snackbar__error"),
16
- success: /* @__PURE__ */ createClasses("snackbar__success"),
17
- warning: /* @__PURE__ */ createClasses("snackbar__warning"),
18
- info: /* @__PURE__ */ createClasses("snackbar__info"),
19
- };
@@ -1,3 +0,0 @@
1
- export { toast, useSonner } from "sonner";
2
- export * from "./classes.js";
3
- export * from "./snackbar.js";
@@ -1,3 +0,0 @@
1
- export { toast, useSonner } from "sonner";
2
- export * from "./classes.js";
3
- export * from "./snackbar.js";
@@ -1,8 +0,0 @@
1
- import * as React from "react";
2
- import { type ToasterProps } from "sonner";
3
- export type SnackbarProps = ToasterProps;
4
- /**
5
- * Toast outlet. Mount once near the root, then call `toast.success("Saved")` (re-exported from sonner).
6
- * Styles live in styles/snackbar.css and follow the theme tokens.
7
- */
8
- export declare function Snackbar({ className, toastOptions, ...props }: SnackbarProps): React.JSX.Element;
@@ -1,39 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Toaster } from "sonner";
4
- import { CircleAlertIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon } from "lucide-react";
5
- import { cn } from "cn";
6
- import { snackbarClasses } from "./classes.js";
7
- /**
8
- * Toast outlet. Mount once near the root, then call `toast.success("Saved")` (re-exported from sonner).
9
- * Styles live in styles/snackbar.css and follow the theme tokens.
10
- */
11
- export function Snackbar({ className, toastOptions, ...props }) {
12
- const icon = snackbarClasses.iconSvg;
13
- return (_jsx(Toaster, { expand: true, gap: 12, closeButton: true, offset: 16, visibleToasts: 4, position: "top-right", className: cn(snackbarClasses.root, className), toastOptions: {
14
- unstyled: true,
15
- ...toastOptions,
16
- classNames: {
17
- toast: snackbarClasses.toast,
18
- icon: snackbarClasses.icon,
19
- content: snackbarClasses.content,
20
- title: snackbarClasses.title,
21
- description: snackbarClasses.description,
22
- actionButton: snackbarClasses.actionButton,
23
- cancelButton: snackbarClasses.cancelButton,
24
- closeButton: snackbarClasses.closeButton,
25
- default: snackbarClasses.default,
26
- info: snackbarClasses.info,
27
- error: snackbarClasses.error,
28
- success: snackbarClasses.success,
29
- warning: snackbarClasses.warning,
30
- ...toastOptions?.classNames,
31
- },
32
- }, icons: {
33
- loading: _jsx("span", { className: snackbarClasses.loadingIcon }),
34
- info: _jsx(InfoIcon, { className: icon }),
35
- success: _jsx(CircleCheckIcon, { className: icon }),
36
- warning: _jsx(TriangleAlertIcon, { className: icon }),
37
- error: _jsx(CircleAlertIcon, { className: icon }),
38
- }, ...props }));
39
- }
@@ -1,68 +0,0 @@
1
- /* Toast styles for <Snackbar />. Class names come from snackbar/classes.ts. */
2
- .xerobi__snackbar__root { width: 300px; }
3
-
4
- .xerobi__snackbar__toast {
5
- display: flex;
6
- align-items: center;
7
- gap: 12px;
8
- width: 100%;
9
- min-height: 52px;
10
- border-radius: 12px;
11
- box-shadow: var(--elev-z8);
12
- }
13
-
14
- .xerobi__snackbar__content { flex: 1 1 auto; gap: 0; }
15
- .xerobi__snackbar__title { font-size: 0.875rem; font-weight: 600; line-height: 1.5714; }
16
- .xerobi__snackbar__description { font-size: 0.75rem; line-height: 1.5; opacity: 0.64; }
17
-
18
- .xerobi__snackbar__close_button {
19
- top: 0; right: 0; left: auto;
20
- color: currentColor;
21
- background-color: transparent;
22
- border-color: var(--action-selected);
23
- transform: translate(-6px, 6px);
24
- transition: background-color 0.2s, border-color 0.2s;
25
- }
26
- .xerobi__snackbar__close_button:hover {
27
- border-color: var(--action-focus);
28
- background-color: var(--action-hover);
29
- }
30
-
31
- .xerobi__snackbar__icon {
32
- display: flex;
33
- align-items: center;
34
- justify-content: center;
35
- align-self: flex-start;
36
- width: 48px; height: 48px;
37
- margin: 0;
38
- border-radius: inherit;
39
- }
40
- .xerobi__snackbar__icon__svg { width: 24px; height: 24px; }
41
-
42
- /* Neutral toast: inverted surface. */
43
- .xerobi__snackbar__default {
44
- padding: 8px 8px 8px 12px;
45
- color: var(--bg-paper);
46
- background-color: var(--text-primary);
47
- }
48
- .xerobi__snackbar__default:has([data-close-button="true"]) .xerobi__snackbar__content { padding-right: 32px; }
49
-
50
- /* Coloured toasts: paper surface with a tinted icon tile. */
51
- .xerobi__snackbar__error, .xerobi__snackbar__success, .xerobi__snackbar__warning, .xerobi__snackbar__info {
52
- padding: 4px 8px 4px 4px;
53
- color: var(--text-primary);
54
- background-color: var(--bg-paper);
55
- }
56
- .xerobi__snackbar__error .xerobi__snackbar__icon { color: var(--error-main); background-color: color-mix(in oklab, var(--error-main) 8%, transparent); }
57
- .xerobi__snackbar__success .xerobi__snackbar__icon { color: var(--success-main); background-color: color-mix(in oklab, var(--success-main) 8%, transparent); }
58
- .xerobi__snackbar__warning .xerobi__snackbar__icon { color: var(--warning-main); background-color: color-mix(in oklab, var(--warning-main) 8%, transparent); }
59
- .xerobi__snackbar__info .xerobi__snackbar__icon { color: var(--info-main); background-color: color-mix(in oklab, var(--info-main) 8%, transparent); }
60
-
61
- .xerobi__snackbar__loading_icon {
62
- z-index: 9;
63
- width: 24px; height: 24px;
64
- border-radius: 50%;
65
- background: conic-gradient(transparent, color-mix(in oklab, var(--text-disabled) 64%, transparent));
66
- animation: xui-spin 3s infinite linear;
67
- }
68
- @keyframes xui-spin { to { transform: rotate(1turn); } }