@cosmicdrift/kumiko-renderer-web 0.233.0 → 0.235.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/package.json +5 -5
- package/src/__tests__/app-layout.test.tsx +13 -12
- package/src/__tests__/default-app-shell.test.tsx +33 -0
- package/src/__tests__/form-action-bar.test.tsx +1 -1
- package/src/__tests__/kumiko-screen.test.tsx +293 -3
- package/src/__tests__/primitives.test.tsx +182 -3
- package/src/__tests__/projection-detail-record-layout.test.tsx +119 -0
- package/src/__tests__/render-edit.test.tsx +9 -10
- package/src/__tests__/secrets-edit.test.tsx +287 -0
- package/src/__tests__/workspace-shell.test.tsx +5 -4
- package/src/icons.tsx +84 -1
- package/src/layout/app-layout.tsx +7 -7
- package/src/layout/default-app-shell.tsx +3 -2
- package/src/layout/workspace-shell.tsx +3 -2
- package/src/primitives/__tests__/button.test.tsx +37 -0
- package/src/primitives/__tests__/select-segmented.test.tsx +84 -0
- package/src/primitives/index.tsx +210 -17
- package/src/primitives/metric.tsx +18 -10
- package/src/styles.css +21 -17
- package/src/ui/switch.tsx +35 -0
package/src/styles.css
CHANGED
|
@@ -38,14 +38,15 @@
|
|
|
38
38
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
39
39
|
|
|
40
40
|
@theme {
|
|
41
|
-
/* Dark-Mode (Default) — shadcn
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
/* Dark-Mode (Default) — shadcn preset "Rhea"/Neutral (hue 0, pure gray,
|
|
42
|
+
no zinc blue tint). Card is raised above background (8% vs. 3.9%) so it
|
|
43
|
+
separates by surface color, not just border + shadow. Primary
|
|
44
|
+
near-white, apps override with their own brand. */
|
|
44
45
|
--color-background: hsl(0 0% 3.9%);
|
|
45
46
|
--color-foreground: hsl(0 0% 98%);
|
|
46
|
-
--color-card: hsl(0 0%
|
|
47
|
+
--color-card: hsl(0 0% 8%);
|
|
47
48
|
--color-card-foreground: hsl(0 0% 98%);
|
|
48
|
-
--color-popover: hsl(0 0%
|
|
49
|
+
--color-popover: hsl(0 0% 9%);
|
|
49
50
|
--color-popover-foreground: hsl(0 0% 98%);
|
|
50
51
|
--color-primary: hsl(0 0% 98%);
|
|
51
52
|
--color-primary-foreground: hsl(0 0% 9%);
|
|
@@ -107,10 +108,12 @@
|
|
|
107
108
|
auf light, greifen diese Werte. */
|
|
108
109
|
@layer base {
|
|
109
110
|
:root:not(.dark) {
|
|
110
|
-
/* Light-Mode — Neutral (hue 0,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
/* Light-Mode — Neutral (hue 0, pure gray). Background is tinted slightly
|
|
112
|
+
(96.5%), card stays pure white — card lifts off the page instead of
|
|
113
|
+
blending into it. Border + shadow remain additional cues. Primary
|
|
114
|
+
near-black; apps override with brand. Values = shadcn preset, adapted
|
|
115
|
+
to this hue-0 elevation scheme. */
|
|
116
|
+
--color-background: hsl(0 0% 96.5%);
|
|
114
117
|
--color-foreground: hsl(0 0% 3.9%);
|
|
115
118
|
--color-card: hsl(0 0% 100%);
|
|
116
119
|
--color-card-foreground: hsl(0 0% 3.9%);
|
|
@@ -118,11 +121,11 @@
|
|
|
118
121
|
--color-popover-foreground: hsl(0 0% 3.9%);
|
|
119
122
|
--color-primary: hsl(0 0% 9%);
|
|
120
123
|
--color-primary-foreground: hsl(0 0% 98%);
|
|
121
|
-
--color-secondary: hsl(0 0%
|
|
124
|
+
--color-secondary: hsl(0 0% 94%);
|
|
122
125
|
--color-secondary-foreground: hsl(0 0% 9%);
|
|
123
|
-
--color-muted: hsl(0 0%
|
|
124
|
-
--color-muted-foreground: hsl(0 0%
|
|
125
|
-
--color-accent: hsl(0 0%
|
|
126
|
+
--color-muted: hsl(0 0% 94%);
|
|
127
|
+
--color-muted-foreground: hsl(0 0% 42%);
|
|
128
|
+
--color-accent: hsl(0 0% 94%);
|
|
126
129
|
--color-accent-foreground: hsl(0 0% 9%);
|
|
127
130
|
--color-destructive: hsl(0 84.2% 60.2%);
|
|
128
131
|
--color-destructive-foreground: hsl(0 0% 98%);
|
|
@@ -130,10 +133,11 @@
|
|
|
130
133
|
--color-input: hsl(0 0% 89.8%);
|
|
131
134
|
--color-ring: hsl(0 0% 63%);
|
|
132
135
|
|
|
133
|
-
/* Sidebar
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
/* Sidebar family light (neutral): rail 98.5% (clearly between background
|
|
137
|
+
96.5% and card 100%, otherwise the tinted page would swallow the
|
|
138
|
+
rail), active 96.1%, border 89.8%. Inset panel (100%) floats via
|
|
139
|
+
shadow + rounded on the rail. */
|
|
140
|
+
--color-sidebar: hsl(0 0% 98.5%);
|
|
137
141
|
--color-sidebar-foreground: hsl(0 0% 26.1%);
|
|
138
142
|
--color-sidebar-primary: hsl(0 0% 9%);
|
|
139
143
|
--color-sidebar-primary-foreground: hsl(0 0% 98%);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// @ts-nocheck — vendored shadcn, regenerate via scripts/sync-shadcn.ts
|
|
2
|
+
"use client"
|
|
3
|
+
|
|
4
|
+
import * as React from "react"
|
|
5
|
+
import { cn } from "../lib/cn"
|
|
6
|
+
import { Switch as SwitchPrimitive } from "radix-ui"
|
|
7
|
+
|
|
8
|
+
function Switch({
|
|
9
|
+
className,
|
|
10
|
+
size = "default",
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof SwitchPrimitive.Root> & {
|
|
13
|
+
size?: "sm" | "default"
|
|
14
|
+
}) {
|
|
15
|
+
return (
|
|
16
|
+
<SwitchPrimitive.Root
|
|
17
|
+
data-slot="switch"
|
|
18
|
+
data-size={size}
|
|
19
|
+
className={cn(
|
|
20
|
+
"peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
23
|
+
{...props}
|
|
24
|
+
>
|
|
25
|
+
<SwitchPrimitive.Thumb
|
|
26
|
+
data-slot="switch-thumb"
|
|
27
|
+
className={cn(
|
|
28
|
+
"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground"
|
|
29
|
+
)}
|
|
30
|
+
/>
|
|
31
|
+
</SwitchPrimitive.Root>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { Switch }
|