@umami/react-zen 1.0.1 → 1.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umami/react-zen",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Zen is the design system and React component collection used by Umami.",
5
5
  "homepage": "https://zen.umami.is",
6
6
  "repository": {
@@ -43,6 +43,7 @@
43
43
  "dependencies": {
44
44
  "@base-ui/react": "^1.8.0",
45
45
  "@react-spring/web": "^9.7.5",
46
+ "@tanstack/react-table": "^9.3.1",
46
47
  "class-variance-authority": "^0.7.1",
47
48
  "cmdk": "^1.1.1",
48
49
  "cn": "^0.5.2",
@@ -53,6 +54,7 @@
53
54
  "react-day-picker": "^10.0.2",
54
55
  "react-hook-form": "^7.66.1",
55
56
  "react-resizable-panels": "^4.12.2",
57
+ "shiki": "^4.6.0",
56
58
  "tailwind-merge": "^3.4.0",
57
59
  "tailwind-variants": "^3.2.2",
58
60
  "tw-animate-css": "^1.4.0",
package/styles.css CHANGED
@@ -507,8 +507,51 @@
507
507
  --sidebar-ring: oklch(0.547 0.021 43.1);
508
508
  }
509
509
 
510
+ /*
511
+ * Zen extension: page surface. Pure white in light mode and pure black in dark mode, in every
512
+ * palette. The sidebar sits on the page surface (separated by its border) rather than its own
513
+ * tinted panel.
514
+ *
515
+ * --sidebar-accent (menu item hover/active) is derived from --sidebar instead of shadcn's fixed
516
+ * value, so it stays visible on the page-colored sidebar, or whatever an app recolors it to.
517
+ *
518
+ * Kept outside the generated palettes so regenerating them doesn't drop it. The selectors
519
+ * mirror the palette selectors and come after them, so they win in every palette, light and
520
+ * dark. --page is redeclared on .dark so a nested .dark gets the dark value.
521
+ */
522
+ :root,
523
+ [data-palette] {
524
+ --page: oklch(1 0 0);
525
+ }
526
+
527
+ .dark,
528
+ [data-palette].dark,
529
+ [data-palette] .dark {
530
+ --page: oklch(0 0 0);
531
+ }
532
+
533
+ :root,
534
+ .dark,
535
+ [data-palette],
536
+ [data-palette].dark,
537
+ [data-palette] .dark {
538
+ --sidebar: var(--page);
539
+ }
540
+
541
+ :root,
542
+ [data-palette] {
543
+ --sidebar-accent: color-mix(in oklch, var(--sidebar) 94%, var(--foreground));
544
+ }
545
+
546
+ .dark,
547
+ [data-palette].dark,
548
+ [data-palette] .dark {
549
+ --sidebar-accent: color-mix(in oklch, var(--sidebar) 88%, var(--foreground));
550
+ }
551
+
510
552
  @theme inline {
511
553
  --color-background: var(--background);
554
+ --color-page: var(--page);
512
555
  --color-foreground: var(--foreground);
513
556
  --color-card: var(--card);
514
557
  --color-card-foreground: var(--card-foreground);
@@ -557,7 +600,7 @@
557
600
  @apply border-border outline-ring/50;
558
601
  }
559
602
  body {
560
- @apply bg-background text-foreground;
603
+ @apply bg-page text-foreground;
561
604
  }
562
605
  }
563
606
 
@@ -1242,14 +1285,6 @@
1242
1285
  background-color: var(--background);
1243
1286
  }
1244
1287
 
1245
- /* Labels are semibold (shadcn's are font-medium). Covers Label, FieldLabel,
1246
- FieldTitle, and FieldLegend when used as a label (e.g. CheckboxGroup). */
1247
- [data-slot="label"],
1248
- [data-slot="field-label"],
1249
- [data-slot="field-legend"][data-variant="label"] {
1250
- font-weight: 600;
1251
- }
1252
-
1253
1288
  /* Tabs, line variant: the underline spans the label only. Tabs have no
1254
1289
  horizontal padding; the list's gap is the only space between them (the same
1255
1290
  label spacing as shadcn's 2 x px-2 + gap-1). */
@@ -1262,6 +1297,29 @@
1262
1297
  padding-inline: 0;
1263
1298
  }
1264
1299
 
1300
+ /* Fields: a tighter gap between a label and its input when stacked (shadcn's
1301
+ vertical Field is gap-3; this matches the nova style's gap-2). Horizontal
1302
+ fields, e.g. a checkbox beside its label, keep gap-3. */
1303
+ [data-slot="field"][data-orientation="vertical"] {
1304
+ row-gap: calc(var(--spacing) * 2);
1305
+ }
1306
+
1307
+ /* Dialog: a larger title, and a footer set off as a shaded band with a top
1308
+ border that runs to the dialog's edges (shadcn's nova style). The negative
1309
+ margins cancel DialogContent's p-6, and the bottom corners follow its
1310
+ rounded-xl. */
1311
+ [data-slot="dialog-title"] {
1312
+ font-size: 1rem;
1313
+ }
1314
+
1315
+ [data-slot="dialog-content"] [data-slot="dialog-footer"] {
1316
+ margin: 0 calc(var(--spacing) * -6) calc(var(--spacing) * -6);
1317
+ padding: calc(var(--spacing) * 4) calc(var(--spacing) * 6);
1318
+ border-top: 1px solid var(--border);
1319
+ border-radius: 0 0 calc(var(--radius) * 1.4) calc(var(--radius) * 1.4);
1320
+ background-color: color-mix(in oklab, var(--muted) 50%, transparent);
1321
+ }
1322
+
1265
1323
 
1266
1324
  /* ./src/styles/safelist.css */
1267
1325
  /* Generated by css.mjs from src/components/lib/tailwind.ts. Do not edit. */
@@ -1388,7 +1446,7 @@
1388
1446
  @source inline("{,sm:,md:,lg:,xl:,2xl:}{max-h-0,max-h-px,max-h-0.5,max-h-1,max-h-1.5,max-h-2,max-h-2.5,max-h-3,max-h-3.5,max-h-4,max-h-5,max-h-6,max-h-7,max-h-8,max-h-9,max-h-10,max-h-11,max-h-12,max-h-14,max-h-16,max-h-20,max-h-24,max-h-28,max-h-32,max-h-36,max-h-40,max-h-44,max-h-48,max-h-52,max-h-56,max-h-60,max-h-64,max-h-72,max-h-80,max-h-96,max-h-none,max-h-full,max-h-screen,max-h-svh,max-h-lvh,max-h-dvh,max-h-min,max-h-max,max-h-fit}");
1389
1447
 
1390
1448
 
1391
- /* src\components\Dots.css */
1449
+ /* src/components/Dots.css */
1392
1450
  .zen-dot {
1393
1451
  border-radius: 100%;
1394
1452
  background: currentColor;
@@ -1419,3 +1477,47 @@
1419
1477
  opacity: 0.2;
1420
1478
  }
1421
1479
  }
1480
+
1481
+
1482
+ /* src/components/Spinner.css */
1483
+ .zen-spinner {
1484
+ fill: none;
1485
+ stroke: currentColor;
1486
+ stroke-width: 4;
1487
+ animation: zen-spinner-rotate 1.6s linear infinite;
1488
+ }
1489
+
1490
+ .zen-spinner-track {
1491
+ opacity: 0.2;
1492
+ }
1493
+
1494
+ .zen-spinner-fill {
1495
+ stroke-linecap: square;
1496
+ stroke-dasharray: 1, 200;
1497
+ stroke-dashoffset: 0;
1498
+ animation: zen-spinner-dash 1.2s ease-in-out infinite;
1499
+ }
1500
+
1501
+ @keyframes zen-spinner-rotate {
1502
+ 0% {
1503
+ transform: rotate(0deg);
1504
+ }
1505
+ 100% {
1506
+ transform: rotate(360deg);
1507
+ }
1508
+ }
1509
+
1510
+ @keyframes zen-spinner-dash {
1511
+ 0% {
1512
+ stroke-dasharray: 1, 200;
1513
+ stroke-dashoffset: 0;
1514
+ }
1515
+ 50% {
1516
+ stroke-dasharray: 89, 200;
1517
+ stroke-dashoffset: -35;
1518
+ }
1519
+ 100% {
1520
+ stroke-dasharray: 89, 200;
1521
+ stroke-dashoffset: -124;
1522
+ }
1523
+ }