@larakit/react 0.0.0-stage → 0.5.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 +30 -4
- package/src/Cell.tsx +35 -0
- package/src/Dashboard.tsx +79 -0
- package/src/Field.tsx +132 -0
- package/src/FileInput.tsx +76 -0
- package/src/Form.tsx +116 -0
- package/src/Layout.tsx +250 -0
- package/src/PanelPages.tsx +115 -0
- package/src/Repeater.tsx +46 -0
- package/src/ResourceIndex.tsx +271 -0
- package/src/action-upload.test.tsx +44 -0
- package/src/blocks.tsx +26 -0
- package/src/button-part.test.tsx +42 -0
- package/src/components.test.ts +22 -0
- package/src/components.tsx +435 -0
- package/src/confirm.test.tsx +68 -0
- package/src/context.tsx +19 -0
- package/src/custom-pages.test.tsx +177 -0
- package/src/errors.test.tsx +95 -0
- package/src/fixtures.ts +20 -0
- package/src/index.ts +29 -0
- package/src/kit/api.ts +305 -0
- package/src/kit/auth.tsx +109 -0
- package/src/kit/bridge.tsx +142 -0
- package/src/kit/button.tsx +396 -0
- package/src/kit/cell.tsx +260 -0
- package/src/kit/charts.tsx +638 -0
- package/src/kit/create.tsx +166 -0
- package/src/kit/dashboard.tsx +335 -0
- package/src/kit/dates.tsx +62 -0
- package/src/kit/entry.tsx +87 -0
- package/src/kit/field.tsx +449 -0
- package/src/kit/fields/CodeEditor.tsx +157 -0
- package/src/kit/fields/KeyValue.tsx +215 -0
- package/src/kit/fields/MarkdownEditor.tsx +380 -0
- package/src/kit/fields/OneTimeCode.tsx +192 -0
- package/src/kit/fields/Repeater.tsx +350 -0
- package/src/kit/fields/Slider.tsx +185 -0
- package/src/kit/fields/TagsInput.tsx +219 -0
- package/src/kit/filters.tsx +214 -0
- package/src/kit/form-shared.tsx +62 -0
- package/src/kit/form.tsx +253 -0
- package/src/kit/hooks.ts +119 -0
- package/src/kit/i18n.tsx +67 -0
- package/src/kit/icons.tsx +190 -0
- package/src/kit/infolist.tsx +452 -0
- package/src/kit/kit.test.tsx +2200 -0
- package/src/kit/layout.tsx +236 -0
- package/src/kit/loading.tsx +120 -0
- package/src/kit/notice.tsx +72 -0
- package/src/kit/page.tsx +103 -0
- package/src/kit/pageform.tsx +75 -0
- package/src/kit/picker.tsx +110 -0
- package/src/kit/plugins.tsx +206 -0
- package/src/kit/profile.tsx +86 -0
- package/src/kit/relations.tsx +146 -0
- package/src/kit/rich.tsx +276 -0
- package/src/kit/search.tsx +92 -0
- package/src/kit/select.tsx +244 -0
- package/src/kit/shell.tsx +401 -0
- package/src/kit/table-extras.tsx +457 -0
- package/src/kit/table.tsx +734 -0
- package/src/kit/theme.ts +57 -0
- package/src/layout-parts.test.tsx +159 -0
- package/src/pages/index.ts +7 -0
- package/src/part.test.tsx +56 -0
- package/src/plugins.test.tsx +159 -0
- package/src/plugins.tsx +240 -0
- package/src/preview.test.tsx +81 -0
- package/src/rail.test.tsx +56 -0
- package/src/repeater.test.tsx +48 -0
- package/src/resource-pages.test.tsx +119 -0
- package/src/screens.test.tsx +121 -0
- package/src/ssr.test.tsx +86 -0
- package/src/tenant.test.tsx +94 -0
- package/src/ui.tsx +100 -0
- package/theme.css +467 -0
- package/README.md +0 -3
package/theme.css
ADDED
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
/* Larakit's look: its tokens (protocol/theme.json) as CSS variables and its component classes, which the app's
|
|
2
|
+
Tailwind compiles (add `@source "../../node_modules/@larakit/react";` next to the import). The variables are named
|
|
3
|
+
--lk-* and live on :root, so the panel's theme can set them; every class and base style is scoped to .larakit, so
|
|
4
|
+
nothing here touches the rest of the application. Dark mode: data-lk-mode="dark" on <html>, which the panel sets. */
|
|
5
|
+
|
|
6
|
+
@layer base {
|
|
7
|
+
:root {
|
|
8
|
+
--lk-bg: #f6f6f4;
|
|
9
|
+
--lk-surface: #ffffff;
|
|
10
|
+
--lk-surface-2: #f1f1ee;
|
|
11
|
+
--lk-text: #18181b;
|
|
12
|
+
--lk-muted: #5e6068;
|
|
13
|
+
--lk-border: #e5e5e0;
|
|
14
|
+
--lk-primary: #18181b;
|
|
15
|
+
--lk-on-primary: #ffffff;
|
|
16
|
+
--lk-accent: #eaf5f0;
|
|
17
|
+
--lk-on-accent: #0d5539;
|
|
18
|
+
--lk-info: #2563eb;
|
|
19
|
+
--lk-success: #15803d;
|
|
20
|
+
--lk-warning: #d97706;
|
|
21
|
+
--lk-danger: #be2525;
|
|
22
|
+
--lk-ring: color-mix(in srgb, var(--lk-primary) 55%, transparent);
|
|
23
|
+
--lk-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 1px 1px rgb(0 0 0 / 0.02);
|
|
24
|
+
--lk-sidebar-bg: color-mix(in srgb, var(--lk-bg) 45%, var(--lk-surface));
|
|
25
|
+
--lk-sidebar-text: var(--lk-muted);
|
|
26
|
+
--lk-sidebar-border: var(--lk-border);
|
|
27
|
+
--lk-topbar-bg: color-mix(in srgb, var(--lk-surface) 88%, transparent);
|
|
28
|
+
--lk-topbar-border: var(--lk-border);
|
|
29
|
+
--lk-chart: #0e7a4d;
|
|
30
|
+
--lk-chart-2: #0284c7;
|
|
31
|
+
--lk-chart-3: #6d28d9;
|
|
32
|
+
--lk-chart-4: #d97706;
|
|
33
|
+
--lk-radius: 0.5rem;
|
|
34
|
+
--lk-btn-radius: var(--lk-radius);
|
|
35
|
+
--lk-input-radius: var(--lk-radius);
|
|
36
|
+
--lk-card-radius: calc(var(--lk-radius) * 1.4);
|
|
37
|
+
--lk-badge-radius: calc(var(--lk-radius) * 0.75);
|
|
38
|
+
--lk-font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
|
39
|
+
--lk-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
40
|
+
--lk-space: 1;
|
|
41
|
+
color-scheme: light;
|
|
42
|
+
}
|
|
43
|
+
:root[data-lk-mode="dark"] {
|
|
44
|
+
--lk-bg: #111214;
|
|
45
|
+
--lk-surface: #181a1d;
|
|
46
|
+
--lk-surface-2: #202328;
|
|
47
|
+
--lk-text: #ededef;
|
|
48
|
+
--lk-muted: #969aa3;
|
|
49
|
+
--lk-border: #26292f;
|
|
50
|
+
--lk-primary: #22b573;
|
|
51
|
+
--lk-on-primary: #042216;
|
|
52
|
+
--lk-accent: #142921;
|
|
53
|
+
--lk-on-accent: #6ee7b7;
|
|
54
|
+
--lk-info: #3b82f6;
|
|
55
|
+
--lk-success: #22c55e;
|
|
56
|
+
--lk-warning: #f59e0b;
|
|
57
|
+
--lk-danger: #f87171;
|
|
58
|
+
--lk-shadow: 0 1px 2px rgb(0 0 0 / 0.25), inset 0 1px 0 rgb(255 255 255 / 0.03);
|
|
59
|
+
--lk-chart: #2bc480;
|
|
60
|
+
--lk-chart-2: #38bdf8;
|
|
61
|
+
--lk-chart-3: #a78bfa;
|
|
62
|
+
--lk-chart-4: #fbbf24;
|
|
63
|
+
color-scheme: dark;
|
|
64
|
+
}
|
|
65
|
+
:root[data-lk-preset]:not([data-lk-preset="ink"]) { --lk-chart: var(--lk-primary); }
|
|
66
|
+
:root[data-lk-preset="petrol"] { --lk-bg: #f8fafa; --lk-primary: #0f766e; --lk-on-primary: #fff; --lk-accent: #ccfbf1; --lk-on-accent: #134e4a; }
|
|
67
|
+
:root[data-lk-preset="petrol"][data-lk-mode="dark"] { --lk-bg: #08100f; --lk-surface: #101b1a; --lk-surface-2: #162523; --lk-border: #223533; --lk-primary: #2dd4bf; --lk-on-primary: #042f2e; --lk-accent: #134e4a; --lk-on-accent: #ccfbf1; }
|
|
68
|
+
:root[data-lk-preset="cobalt"] { --lk-bg: #f8fafc; --lk-primary: #1d4ed8; --lk-on-primary: #fff; --lk-accent: #dbeafe; --lk-on-accent: #1e3a8a; }
|
|
69
|
+
:root[data-lk-preset="cobalt"][data-lk-mode="dark"] { --lk-bg: #080c18; --lk-surface: #101729; --lk-surface-2: #182138; --lk-border: #253047; --lk-primary: #93c5fd; --lk-on-primary: #172554; --lk-accent: #1e3a8a; --lk-on-accent: #dbeafe; }
|
|
70
|
+
:root[data-lk-preset="savanna"] { --lk-bg: #fafaf9; --lk-text: #1c1917; --lk-muted: #57534e; --lk-border: #e4e0dc; --lk-primary: #c2410c; --lk-on-primary: #fff; --lk-accent: #ffedd5; --lk-on-accent: #7c2d12; }
|
|
71
|
+
:root[data-lk-preset="savanna"][data-lk-mode="dark"] { --lk-bg: #100e0d; --lk-surface: #1c1917; --lk-surface-2: #272320; --lk-text: #f5f5f4; --lk-muted: #a8a29e; --lk-border: #302c29; --lk-accent: #431407; --lk-on-accent: #fed7aa; }
|
|
72
|
+
:root[data-lk-preset="ocean"] { --lk-primary: #0369a1; --lk-on-primary: #fff; --lk-accent: #e0f2fe; --lk-on-accent: #0c4a6e; }
|
|
73
|
+
:root[data-lk-preset="ocean"][data-lk-mode="dark"] { --lk-bg: #070d1a; --lk-surface: #0f172a; --lk-surface-2: #17233b; --lk-border: #233044; --lk-accent: #082f49; --lk-on-accent: #bae6fd; }
|
|
74
|
+
:root[data-lk-preset="forest"] { --lk-primary: #15803d; --lk-on-primary: #fff; --lk-accent: #dcfce7; --lk-on-accent: #14532d; --lk-radius: 0.75rem; }
|
|
75
|
+
:root[data-lk-preset="forest"][data-lk-mode="dark"] { --lk-accent: #052e16; --lk-on-accent: #bbf7d0; }
|
|
76
|
+
:root[data-lk-preset="mono"] { --lk-primary: #18181b; --lk-accent: #e4e4e7; --lk-on-accent: #18181b; --lk-radius: 0; }
|
|
77
|
+
:root[data-lk-preset="mono"][data-lk-mode="dark"] { --lk-primary: #fafafa; --lk-on-primary: #18181b; --lk-accent: #27272a; --lk-on-accent: #fafafa; }
|
|
78
|
+
:root[data-lk-preset="contrast"] { --lk-bg: #fff; --lk-surface-2: #f4f4f4; --lk-text: #000; --lk-muted: #000; --lk-border: #000; --lk-primary: #0000c8; --lk-on-primary: #fff; --lk-accent: #ffff8a; --lk-on-accent: #000; }
|
|
79
|
+
:root[data-lk-preset="contrast"][data-lk-mode="dark"] { --lk-bg: #000; --lk-surface: #000; --lk-surface-2: #111; --lk-text: #fff; --lk-muted: #fff; --lk-border: #fff; --lk-primary: #ffff00; --lk-on-primary: #000; --lk-danger: #ff9d9d; --lk-accent: #fff; --lk-on-accent: #000; }
|
|
80
|
+
/* Colors of further series. Measured: all four differ for color-blind people, and each has 3:1 on the surface. */
|
|
81
|
+
:root[data-lk-preset="petrol"] { --lk-chart-2: #111827; --lk-chart-3: #6a4ce2; --lk-chart-4: #991b1b; }
|
|
82
|
+
:root[data-lk-preset="petrol"][data-lk-mode="dark"] { --lk-chart-2: #9887ef; --lk-chart-3: #e76624; --lk-chart-4: #fde047; }
|
|
83
|
+
:root[data-lk-preset="cobalt"] { --lk-chart-2: #00856b; --lk-chart-3: #111827; --lk-chart-4: #991b1b; }
|
|
84
|
+
:root[data-lk-preset="cobalt"][data-lk-mode="dark"] { --lk-chart-2: #d28e05; --lk-chart-3: #e24d8b; --lk-chart-4: #fde047; }
|
|
85
|
+
:root[data-lk-preset="savanna"] { --lk-chart-2: #0891b2; --lk-chart-3: #111827; --lk-chart-4: #7c3aed; }
|
|
86
|
+
:root[data-lk-preset="savanna"][data-lk-mode="dark"] { --lk-chart-2: #00a888; --lk-chart-3: #9887ef; --lk-chart-4: #fde047; }
|
|
87
|
+
:root[data-lk-preset="ocean"] { --lk-chart-2: #111827; --lk-chart-3: #991b1b; --lk-chart-4: #f43f5e; }
|
|
88
|
+
:root[data-lk-preset="ocean"][data-lk-mode="dark"] { --lk-chart-2: #22d3ee; --lk-chart-3: #e76624; --lk-chart-4: #fde047; }
|
|
89
|
+
:root[data-lk-preset="forest"] { --lk-chart-2: #111827; --lk-chart-3: #257de0; --lk-chart-4: #4c1d95; }
|
|
90
|
+
:root[data-lk-preset="forest"][data-lk-mode="dark"] { --lk-chart-2: #338ced; --lk-chart-3: #e24d8b; --lk-chart-4: #fde047; }
|
|
91
|
+
:root[data-lk-preset="contrast"] { --lk-chart-2: #0891b2; --lk-chart-3: #111827; --lk-chart-4: #d9480f; }
|
|
92
|
+
:root[data-lk-preset="contrast"][data-lk-mode="dark"] { --lk-chart-2: #00a888; --lk-chart-3: #9887ef; --lk-chart-4: #e76624; }
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@layer base {
|
|
96
|
+
.larakit {
|
|
97
|
+
& { --spacing: calc(0.25rem * var(--lk-space)); }
|
|
98
|
+
& { background: var(--lk-bg); color: var(--lk-text); font-family: var(--lk-font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv02", "cv03", "cv04", "cv11"; }
|
|
99
|
+
& ::selection { background: var(--lk-accent); color: var(--lk-on-accent); }
|
|
100
|
+
& *, & ::before, & ::after { border-color: var(--lk-border); }
|
|
101
|
+
& :is(button, a) { cursor: pointer; }
|
|
102
|
+
& :focus-visible { outline: 2px solid var(--lk-ring); outline-offset: 2px; }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* tokens */
|
|
107
|
+
@layer components {
|
|
108
|
+
.larakit {
|
|
109
|
+
.surface { background: var(--lk-surface); color: var(--lk-text); border-radius: var(--lk-card-radius); box-shadow: var(--lk-shadow); }
|
|
110
|
+
.surface-fill { background: var(--lk-surface); }
|
|
111
|
+
.menu, .popup, dialog.surface { box-shadow: 0 12px 32px rgb(0 0 0 / 0.12); }
|
|
112
|
+
:root[data-lk-mode="dark"] & .menu, :root[data-lk-mode="dark"] & .popup, :root[data-lk-mode="dark"] & dialog.surface { box-shadow: 0 16px 40px rgb(0 0 0 / 0.5); }
|
|
113
|
+
.menu { position: fixed; inset: auto; margin: 0; overflow-y: auto; overscroll-behavior: contain; }
|
|
114
|
+
[data-lk="side"] { background: var(--lk-sidebar-bg); border-color: var(--lk-sidebar-border); }
|
|
115
|
+
header.surface-fill { background: var(--lk-topbar-bg); border-color: var(--lk-topbar-border); backdrop-filter: blur(12px); }
|
|
116
|
+
[data-lk="topbar"] { border-color: var(--lk-topbar-border); }
|
|
117
|
+
.search-box::backdrop { background: rgb(0 0 0 / 0.45); backdrop-filter: blur(2px); }
|
|
118
|
+
.search-result[aria-selected="true"] { background: color-mix(in srgb, var(--lk-accent) 60%, var(--lk-surface)); }
|
|
119
|
+
.search-button { cursor: pointer; background: color-mix(in srgb, var(--lk-bg) 70%, var(--lk-surface)); transition: border-color 140ms, background-color 140ms; }
|
|
120
|
+
.search-button:hover { border-color: color-mix(in srgb, var(--lk-muted) 45%, var(--lk-border)); background: var(--lk-surface); }
|
|
121
|
+
.search-button kbd, .search-box kbd { border: 1px solid var(--lk-border); border-radius: 0.3rem; padding: 0 0.3rem; font-family: var(--lk-font-mono); }
|
|
122
|
+
.nav-group:hover { color: var(--lk-text); }
|
|
123
|
+
.navlink { border-radius: var(--lk-radius); color: var(--lk-sidebar-text); transition: background-color 140ms, color 140ms; }
|
|
124
|
+
.navlink:hover { color: var(--lk-text); background: color-mix(in srgb, var(--lk-border) 42%, transparent); }
|
|
125
|
+
.navlink[aria-current] { background: var(--lk-accent); color: var(--lk-on-accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lk-on-accent) 16%, transparent); }
|
|
126
|
+
.tool { transition: background-color 140ms, color 140ms; }
|
|
127
|
+
.tool:hover, .menu-item:hover, .menu-line:is(a, button):hover { background: color-mix(in srgb, var(--lk-border) 42%, transparent); }
|
|
128
|
+
.tool { @apply inline-flex min-h-9 min-w-9 items-center justify-center p-1.5 text-sm font-medium; color: var(--lk-muted); border-radius: var(--lk-radius); }
|
|
129
|
+
.tool:hover, .tool[aria-expanded="true"] { color: var(--lk-text); }
|
|
130
|
+
.seg[aria-pressed="true"] { background: var(--lk-accent); color: var(--lk-on-accent); }
|
|
131
|
+
.avatar { background: var(--lk-accent); color: var(--lk-on-accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lk-on-accent) 22%, transparent); }
|
|
132
|
+
.tenant-btn { border-radius: var(--lk-radius); background: var(--lk-surface); color: var(--lk-text); transition: background-color 140ms, border-color 140ms, box-shadow 140ms; }
|
|
133
|
+
.tenant-btn:hover, .tenant-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--lk-border) 32%, var(--lk-surface)); border-color: color-mix(in srgb, var(--lk-muted) 40%, var(--lk-border)); }
|
|
134
|
+
.tenant-menu { border-radius: var(--lk-card-radius); }
|
|
135
|
+
.menu-item { @apply flex w-full items-center gap-3 px-2 py-2 text-left text-sm font-medium; border-radius: calc(var(--lk-radius) * 0.7); transition: background-color 120ms; }
|
|
136
|
+
.unread { background: var(--lk-chart); }
|
|
137
|
+
.count { @apply absolute -top-0.5 grid h-4.5 min-w-4.5 place-items-center rounded-full px-1 text-[11px] leading-none font-semibold; inset-inline-end: -0.125rem; background: var(--lk-primary); color: var(--lk-on-primary); box-shadow: 0 0 0 2px var(--lk-surface); }
|
|
138
|
+
.bone { background: color-mix(in srgb, var(--lk-border) 60%, transparent); animation: bone 1.4s ease-in-out infinite; }
|
|
139
|
+
.toast { animation: toast 0.2s ease-out; }
|
|
140
|
+
@media (prefers-reduced-motion: reduce) { .bone, .toast { animation: none; } }
|
|
141
|
+
.muted { color: var(--lk-muted); }
|
|
142
|
+
.danger { color: var(--lk-danger); }
|
|
143
|
+
.sign-in { background: light-dark(#fef3c7, #78350f); color: light-dark(#78350f, #fef3c7); border-radius: var(--lk-radius); }
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* tones */
|
|
148
|
+
@layer components {
|
|
149
|
+
.larakit {
|
|
150
|
+
/* 12-tone color system (--t-solid, --t-on-solid, --t-soft, --t-soft-fg, --t-soft-border) */
|
|
151
|
+
[data-color="gray"], .tone-gray { --t-solid: light-dark(#52525b, #52525b); --t-on-solid: #ffffff; --t-soft: light-dark(#f1f1ef, #272a30); --t-soft-fg: light-dark(#3f3f46, #e4e4e7); --t-soft-border: light-dark(#a1a1aa, #71717a); }
|
|
152
|
+
[data-color="primary"], .tone-primary { --t-solid: var(--lk-primary); --t-on-solid: var(--lk-on-primary); --t-soft: var(--lk-accent); --t-soft-fg: var(--lk-on-accent); --t-soft-border: color-mix(in srgb, var(--lk-primary) 55%, var(--lk-border)); }
|
|
153
|
+
[data-color="info"], .tone-info { --t-solid: var(--lk-info); --t-on-solid: #ffffff; --t-soft: light-dark(#e6f0fe, #172b4d); --t-soft-fg: light-dark(#1d4ed8, #93c5fd); --t-soft-border: light-dark(#60a5fa, #3b82f6); }
|
|
154
|
+
[data-color="success"], .tone-success { --t-solid: var(--lk-success); --t-on-solid: #ffffff; --t-soft: light-dark(#e6f6ee, #113022); --t-soft-fg: light-dark(#115e3b, #6ee7b7); --t-soft-border: light-dark(#34d399, #22c55e); }
|
|
155
|
+
[data-color="warning"], .tone-warning { --t-solid: var(--lk-warning); --t-on-solid: #18181b; --t-soft: light-dark(#fef4d6, #38270c); --t-soft-fg: light-dark(#854d0e, #fcd34d); --t-soft-border: light-dark(#f59e0b, #fbbf24); }
|
|
156
|
+
[data-color="danger"], .tone-danger { --t-solid: light-dark(#dc2626, #ef4444); --t-on-solid: #ffffff; --t-soft: light-dark(#fde8e8, #3b171b); --t-soft-fg: light-dark(#991b1b, #fca5a5); --t-soft-border: light-dark(#f87171, #ef4444); }
|
|
157
|
+
[data-color="indigo"], .tone-indigo { --t-solid: light-dark(#4f46e5, #6366f1); --t-on-solid: #ffffff; --t-soft: light-dark(#eef2ff, #1e1f4b); --t-soft-fg: light-dark(#3730a3, #a5b4fc); --t-soft-border: light-dark(#818cf8, #6366f1); }
|
|
158
|
+
[data-color="purple"], .tone-purple { --t-solid: light-dark(#7c3aed, #8b5cf6); --t-on-solid: #ffffff; --t-soft: light-dark(#f3e8ff, #2a1845); --t-soft-fg: light-dark(#6b21a8, #c4b5fd); --t-soft-border: light-dark(#a78bfa, #8b5cf6); }
|
|
159
|
+
[data-color="rose"], .tone-rose { --t-solid: light-dark(#e11d48, #f43f5e); --t-on-solid: #ffffff; --t-soft: light-dark(#ffe4e6, #3d1522); --t-soft-fg: light-dark(#9f1239, #fda4af); --t-soft-border: light-dark(#fb7185, #f43f5e); }
|
|
160
|
+
[data-color="orange"], .tone-orange { --t-solid: light-dark(#ea580c, #f97316); --t-on-solid: #ffffff; --t-soft: light-dark(#ffedd5, #3d1f0d); --t-soft-fg: light-dark(#9a3412, #fdba74); --t-soft-border: light-dark(#fb923c, #f97316); }
|
|
161
|
+
[data-color="teal"], .tone-teal { --t-solid: light-dark(#0d9488, #14b8a6); --t-on-solid: #ffffff; --t-soft: light-dark(#ccfbf1, #11302d); --t-soft-fg: light-dark(#115e59, #5eead4); --t-soft-border: light-dark(#2dd4bf, #14b8a6); }
|
|
162
|
+
[data-color="cyan"], .tone-cyan { --t-solid: light-dark(#0891b2, #06b6d4); --t-on-solid: #ffffff; --t-soft: light-dark(#cffafe, #102e3a); --t-soft-fg: light-dark(#155e75, #67e8f9); --t-soft-border: light-dark(#22d3ee, #06b6d4); }
|
|
163
|
+
|
|
164
|
+
/* 12-tone foreground helpers */
|
|
165
|
+
.tone-text-gray { color: var(--lk-muted); }
|
|
166
|
+
.tone-text-primary { color: var(--lk-chart); }
|
|
167
|
+
.tone-text-info { color: light-dark(#1d4ed8, #60a5fa); }
|
|
168
|
+
.tone-text-success { color: light-dark(#117247, #34d399); }
|
|
169
|
+
.tone-text-warning { color: light-dark(#b45309, #fbbf24); }
|
|
170
|
+
.tone-text-danger { color: var(--lk-danger); }
|
|
171
|
+
.tone-text-indigo { color: light-dark(#4338ca, #a5b4fc); }
|
|
172
|
+
.tone-text-purple { color: light-dark(#6d28d9, #c4b5fd); }
|
|
173
|
+
.tone-text-rose { color: light-dark(#be123c, #fda4af); }
|
|
174
|
+
.tone-text-orange { color: light-dark(#c2410c, #fdba74); }
|
|
175
|
+
.tone-text-teal { color: light-dark(#0f766e, #5eead4); }
|
|
176
|
+
.tone-text-cyan { color: light-dark(#0e7490, #67e8f9); }
|
|
177
|
+
|
|
178
|
+
/* Badges */
|
|
179
|
+
.badge { background: var(--t-soft, var(--lk-accent)); color: var(--t-soft-fg, var(--lk-on-accent)); border-radius: var(--lk-badge-radius); font-weight: 500; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t-soft-border, currentColor) 45%, transparent); }
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* buttons */
|
|
184
|
+
@layer components {
|
|
185
|
+
.larakit {
|
|
186
|
+
.row-btn { @apply inline-flex items-center gap-1.5 py-1 text-sm font-semibold; border-radius: calc(var(--lk-btn-radius) * 0.5); }
|
|
187
|
+
.row-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
|
|
188
|
+
.icon-btn { @apply p-1; color: var(--lk-muted); border-radius: var(--lk-btn-radius); transition: color 120ms; }
|
|
189
|
+
.icon-btn:hover { color: var(--lk-text); }
|
|
190
|
+
|
|
191
|
+
/* Rich button system: sizes (xs/sm/md/lg) + variants (default/solid/soft/outline/ghost/link) x 12 colors */
|
|
192
|
+
.btn { @apply border font-medium disabled:opacity-40; padding: 0.5rem 0.75rem; font-size: 0.875rem; line-height: 1.25rem; gap: 0.5rem; background: var(--lk-surface); color: var(--lk-text); border-radius: var(--lk-btn-radius); box-shadow: 0 1px 1px rgb(0 0 0 / 0.04); transition: background-color 140ms, border-color 140ms, color 140ms, box-shadow 140ms, filter 140ms; }
|
|
193
|
+
.btn:hover:not(:disabled) { background: color-mix(in srgb, var(--lk-border) 38%, var(--lk-surface)); color: var(--lk-text); }
|
|
194
|
+
.btn[data-size="xs"] { padding: 0.25rem 0.5rem; font-size: 0.75rem; line-height: 1rem; gap: 0.25rem; }
|
|
195
|
+
.btn[data-size="sm"] { padding: 0.375rem 0.625rem; font-size: 0.75rem; line-height: 1.125rem; gap: 0.375rem; }
|
|
196
|
+
.btn[data-size="md"] { padding: 0.5rem 0.75rem; font-size: 0.875rem; line-height: 1.25rem; gap: 0.5rem; }
|
|
197
|
+
.btn[data-size="lg"] { padding: 0.625rem 1rem; font-size: 0.9375rem; line-height: 1.375rem; gap: 0.5rem; }
|
|
198
|
+
|
|
199
|
+
.btn[data-variant="solid"], .primary { background: var(--t-solid, var(--lk-primary)); border-color: var(--t-solid, var(--lk-primary)); color: var(--t-on-solid, var(--lk-on-primary)); }
|
|
200
|
+
.btn[data-variant="solid"]:hover:not(:disabled), .btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--t-solid, var(--lk-primary)) 88%, var(--t-on-solid, var(--lk-on-primary))); border-color: color-mix(in srgb, var(--t-solid, var(--lk-primary)) 88%, var(--t-on-solid, var(--lk-on-primary))); color: var(--t-on-solid, var(--lk-on-primary)); }
|
|
201
|
+
.primary-danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
|
|
202
|
+
.btn.primary-danger:hover:not(:disabled) { background: #991b1b; border-color: #991b1b; color: #fff; }
|
|
203
|
+
|
|
204
|
+
.btn[data-variant="soft"] { background: var(--t-soft, var(--lk-surface-2)); border-color: color-mix(in srgb, var(--t-soft-border, var(--lk-border)) 55%, transparent); color: var(--t-soft-fg, var(--lk-text)); box-shadow: none; }
|
|
205
|
+
.btn[data-variant="soft"]:hover:not(:disabled) { background: color-mix(in srgb, var(--t-solid, var(--lk-primary)) 18%, var(--t-soft, var(--lk-surface-2))); border-color: var(--t-soft-border, var(--lk-border)); color: var(--t-soft-fg, var(--lk-text)); }
|
|
206
|
+
|
|
207
|
+
.btn[data-variant="outline"] { background: transparent; border-color: var(--t-soft-border, var(--lk-border)); color: var(--t-soft-fg, var(--lk-text)); box-shadow: none; }
|
|
208
|
+
.btn[data-variant="outline"]:hover:not(:disabled) { background: var(--t-soft, color-mix(in srgb, var(--lk-border) 35%, transparent)); border-color: var(--t-solid, var(--lk-primary)); color: var(--t-soft-fg, var(--lk-text)); }
|
|
209
|
+
|
|
210
|
+
.btn[data-variant="ghost"] { background: transparent; border-color: transparent; color: var(--t-soft-fg, var(--lk-text)); box-shadow: none; }
|
|
211
|
+
.btn[data-variant="ghost"]:hover:not(:disabled) { background: var(--t-soft, color-mix(in srgb, var(--lk-border) 38%, transparent)); color: var(--t-soft-fg, var(--lk-text)); }
|
|
212
|
+
|
|
213
|
+
.btn[data-variant="link"] { background: transparent; border-color: transparent; box-shadow: none; padding-inline: 0.25rem; color: var(--t-soft-fg, var(--lk-primary)); }
|
|
214
|
+
.btn[data-variant="link"]:hover:not(:disabled) { background: transparent; text-decoration: underline; text-underline-offset: 3px; color: var(--t-soft-fg, var(--lk-primary)); }
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* forms */
|
|
219
|
+
@layer components {
|
|
220
|
+
.larakit {
|
|
221
|
+
.check { @apply size-4 shrink-0 cursor-pointer align-middle disabled:cursor-not-allowed disabled:opacity-40; accent-color: var(--lk-primary); }
|
|
222
|
+
.choice-groups { display: grid; gap: calc(var(--spacing) * 3); align-items: start; }
|
|
223
|
+
.choice-groups:not(.choice-grid) { grid-template-columns: minmax(0, 1fr); }
|
|
224
|
+
.choice-group { border: 1px solid var(--lk-border); border-radius: var(--lk-card-radius); padding: calc(var(--spacing) * 3) calc(var(--spacing) * 4) calc(var(--spacing) * 4); background: var(--lk-surface); }
|
|
225
|
+
.choice-group-head { display: flex; align-items: center; gap: calc(var(--spacing) * 2); margin: 0 calc(var(--spacing) * -4) calc(var(--spacing) * 3); padding: 0 calc(var(--spacing) * 4) calc(var(--spacing) * 3); border-bottom: 1px solid var(--lk-border); }
|
|
226
|
+
.form-grid { display: grid; gap: calc(var(--spacing) * 4); grid-template-columns: minmax(0, 1fr); align-items: start; }
|
|
227
|
+
.choice-grid { display: grid; gap: calc(var(--spacing) * 2) calc(var(--spacing) * 4); grid-template-columns: minmax(0, 1fr); }
|
|
228
|
+
@media (min-width: 40rem) {
|
|
229
|
+
.form-grid, .choice-grid { grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); }
|
|
230
|
+
.form-grid > * { grid-column: var(--span, auto); }
|
|
231
|
+
.inline-label { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: calc(var(--spacing) * 4); align-items: baseline; }
|
|
232
|
+
.aside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: calc(var(--spacing) * 6); }
|
|
233
|
+
}
|
|
234
|
+
.section > summary { list-style: none; cursor: pointer; }
|
|
235
|
+
.section > summary::-webkit-details-marker { display: none; }
|
|
236
|
+
.section[open] > summary .arrow { rotate: 180deg; }
|
|
237
|
+
.bare { background: transparent; color: inherit; }
|
|
238
|
+
.bare:focus-visible { outline: none; }
|
|
239
|
+
.frame:focus-within { border-color: color-mix(in srgb, var(--lk-primary) 70%, var(--lk-border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lk-ring) 32%, transparent); outline: none; }
|
|
240
|
+
.dropzone { border: 1.5px dashed var(--lk-border); border-radius: var(--lk-input-radius); background: var(--lk-surface); transition: background-color 120ms, border-color 120ms; }
|
|
241
|
+
.dropzone:hover, .dropzone[data-over] { border-color: var(--lk-primary); background: color-mix(in srgb, var(--lk-accent) 30%, var(--lk-surface)); }
|
|
242
|
+
.frame:focus-within:has(button:focus-visible) { outline: none; box-shadow: none; }
|
|
243
|
+
.autosize { field-sizing: content; }
|
|
244
|
+
fieldset[disabled] { opacity: 0.6; }
|
|
245
|
+
fieldset[disabled] * { pointer-events: none; }
|
|
246
|
+
|
|
247
|
+
/* Switches */
|
|
248
|
+
.switch { appearance: none; flex-shrink: 0; width: 2.5rem; height: 1.5rem; border: 1px solid var(--lk-muted); border-radius: 1rem; background: var(--lk-switch-off, var(--lk-surface)); cursor: pointer; position: relative; transition: background 0.15s; }
|
|
249
|
+
.switch::after { content: ""; position: absolute; top: 50%; left: 0.2rem; width: 1rem; height: 1rem; translate: 0 -50%; border-radius: 50%; background: var(--lk-muted); transition: left 0.15s; }
|
|
250
|
+
.switch:checked { background: var(--lk-switch-on); border-color: var(--lk-switch-on); }
|
|
251
|
+
.switch:checked::after { left: 1.2rem; background: var(--lk-switch-knob, #fff); }
|
|
252
|
+
.on-primary { --lk-switch-on: var(--lk-primary); --lk-switch-knob: var(--lk-on-primary); }
|
|
253
|
+
.on-gray { --lk-switch-on: #52525b; } .on-info { --lk-switch-on: #2563eb; } .on-success { --lk-switch-on: #15803d; } .on-warning { --lk-switch-on: #d97706; } .on-danger { --lk-switch-on: #dc2626; }
|
|
254
|
+
.on-indigo { --lk-switch-on: #4f46e5; } .on-purple { --lk-switch-on: #7c3aed; } .on-rose { --lk-switch-on: #e11d48; } .on-orange { --lk-switch-on: #ea580c; } .on-teal { --lk-switch-on: #0d9488; } .on-cyan { --lk-switch-on: #0891b2; }
|
|
255
|
+
.off-primary { --lk-switch-off: color-mix(in srgb, var(--lk-primary) 25%, var(--lk-surface)); } .off-info { --lk-switch-off: light-dark(#dbeafe, #1e3a8a); } .off-success { --lk-switch-off: light-dark(#dcfce7, #14532d); } .off-warning { --lk-switch-off: light-dark(#fef3c7, #78350f); } .off-danger { --lk-switch-off: light-dark(#fee2e2, #7f1d1d); }
|
|
256
|
+
.off-indigo { --lk-switch-off: light-dark(#e0e7ff, #1e1b4b); } .off-purple { --lk-switch-off: light-dark(#f3e8ff, #2e1065); } .off-rose { --lk-switch-off: light-dark(#ffe4e6, #4c0519); } .off-orange { --lk-switch-off: light-dark(#ffedd5, #431407); } .off-teal { --lk-switch-off: light-dark(#ccfbf1, #134e4a); } .off-cyan { --lk-switch-off: light-dark(#cffafe, #083344); }
|
|
257
|
+
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }
|
|
258
|
+
|
|
259
|
+
/* Toggle buttons (solid / soft / outline) */
|
|
260
|
+
.choice { cursor: pointer; }
|
|
261
|
+
.choice:not([data-on]) { color: var(--lk-muted); }
|
|
262
|
+
.choice:not([data-on]):hover { color: var(--lk-text); }
|
|
263
|
+
.choice:has(:focus-visible) { outline: 2px solid var(--lk-ring); outline-offset: 2px; z-index: 2; }
|
|
264
|
+
.choice:has(:disabled) { opacity: 0.4; cursor: not-allowed; }
|
|
265
|
+
.grouped > .choice:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
|
|
266
|
+
.grouped > .choice:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
|
|
267
|
+
.choice[data-on] { position: relative; z-index: 1; font-weight: 600; }
|
|
268
|
+
.choice[data-on][data-variant="soft"] { background: var(--t-soft); color: var(--t-soft-fg); border-color: var(--t-soft-border); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t-soft-border) 50%, transparent); }
|
|
269
|
+
.choice[data-on][data-variant="soft"]:hover { background: color-mix(in srgb, var(--t-solid) 20%, var(--t-soft)); }
|
|
270
|
+
.choice[data-on][data-variant="solid"] { background: var(--t-solid); color: var(--t-on-solid); border-color: var(--t-solid); box-shadow: 0 1px 2px rgb(0 0 0 / 0.14); }
|
|
271
|
+
.choice[data-on][data-variant="solid"]:hover { filter: brightness(1.06); }
|
|
272
|
+
.choice[data-on][data-variant="outline"] { background: color-mix(in srgb, var(--t-soft) 55%, var(--lk-surface)); color: var(--t-soft-fg); border-color: var(--t-solid); box-shadow: inset 0 0 0 1px var(--t-solid); }
|
|
273
|
+
.choice[data-on][data-variant="outline"]:hover { background: var(--t-soft); }
|
|
274
|
+
|
|
275
|
+
/* Inputs */
|
|
276
|
+
.input { @apply w-full border px-3 py-2; background: var(--lk-surface); border-radius: var(--lk-input-radius); transition: border-color 140ms, box-shadow 140ms; }
|
|
277
|
+
select.input { padding-inline-start: 0.75rem; padding-inline-end: 2.25rem; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--lk-muted) 50%), linear-gradient(135deg, var(--lk-muted) 50%, transparent 50%);
|
|
278
|
+
background-position: right 1.15rem center, right 0.85rem center; background-size: 0.32rem 0.32rem; background-repeat: no-repeat; }
|
|
279
|
+
select.input::picker-icon { display: none; }
|
|
280
|
+
:root[dir="rtl"] & select.input { background-position: left 0.85rem center, left 1.15rem center; }
|
|
281
|
+
.input:focus-visible, .input:has(> div > button:focus-visible), .input[data-open] { border-color: color-mix(in srgb, var(--lk-primary) 70%, var(--lk-border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lk-ring) 32%, transparent); outline: none; }
|
|
282
|
+
.input[aria-invalid="true"] { border-color: var(--lk-danger); }
|
|
283
|
+
.popup { position: fixed; inset: auto; margin: 0; padding: 0; flex-direction: column; overflow: hidden; color: var(--lk-text); }
|
|
284
|
+
.popup:popover-open { display: flex; }
|
|
285
|
+
.search { background: transparent; color: inherit; }
|
|
286
|
+
.search:focus-visible { outline: none; }
|
|
287
|
+
.option { border-radius: calc(var(--lk-radius) * 0.6); cursor: pointer; }
|
|
288
|
+
.option[data-active] { background: var(--lk-accent); color: var(--lk-on-accent); }
|
|
289
|
+
.option[aria-selected="true"] { font-weight: 600; }
|
|
290
|
+
.option[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
|
|
291
|
+
.chip-remove { opacity: 0.7; }
|
|
292
|
+
.chip-remove:hover { opacity: 1; }
|
|
293
|
+
.day { border-radius: calc(var(--lk-radius) * 0.6); }
|
|
294
|
+
.day:hover:enabled { background: color-mix(in srgb, var(--lk-border) 40%, transparent); }
|
|
295
|
+
.day[aria-current="date"] { box-shadow: inset 0 0 0 1px var(--lk-primary); font-weight: 600; }
|
|
296
|
+
.day[aria-pressed="true"] { background: var(--lk-primary); color: var(--lk-on-primary); opacity: 1; font-weight: 600; }
|
|
297
|
+
.day:disabled { opacity: 0.3; cursor: not-allowed; }
|
|
298
|
+
.tab { border-color: transparent; color: var(--lk-muted); }
|
|
299
|
+
.tab:hover { color: var(--lk-text); }
|
|
300
|
+
.tab[aria-selected="true"] { border-color: var(--lk-primary); color: var(--lk-text); }
|
|
301
|
+
|
|
302
|
+
/* KeyValue & Repeater */
|
|
303
|
+
.kv-box { border-radius: var(--lk-input-radius); overflow: hidden; }
|
|
304
|
+
.kv-head { background: color-mix(in srgb, var(--lk-border) 22%, var(--lk-surface)); color: var(--lk-muted); font-size: 0.75rem; }
|
|
305
|
+
.repeater-head { background: color-mix(in srgb, var(--lk-border) 18%, var(--lk-surface)); }
|
|
306
|
+
.repeater-head[data-collapsed] { border-bottom-color: transparent; }
|
|
307
|
+
|
|
308
|
+
/* Slider */
|
|
309
|
+
.slider-rail { position: relative; width: 100%; height: 0.375rem; border-radius: 999px; background: color-mix(in srgb, var(--lk-border) 75%, var(--lk-surface-2)); }
|
|
310
|
+
.slider-fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--t-solid, var(--lk-primary)); }
|
|
311
|
+
.slider-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; appearance: none; background: transparent; cursor: pointer; }
|
|
312
|
+
.slider-input:focus-visible { outline: none; }
|
|
313
|
+
.slider-input::-webkit-slider-thumb { appearance: none; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--lk-surface); border: 2px solid var(--t-solid, var(--lk-primary)); box-shadow: 0 1px 3px rgb(0 0 0 / 0.18); cursor: pointer; transition: transform 120ms, box-shadow 120ms; }
|
|
314
|
+
.slider-input::-moz-range-thumb { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--lk-surface); border: 2px solid var(--t-solid, var(--lk-primary)); box-shadow: 0 1px 3px rgb(0 0 0 / 0.18); cursor: pointer; transition: transform 120ms, box-shadow 120ms; }
|
|
315
|
+
.slider-input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--t-solid, var(--lk-ring)) 28%, transparent); }
|
|
316
|
+
.slider-input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--t-solid, var(--lk-ring)) 28%, transparent); }
|
|
317
|
+
.slider-input:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
318
|
+
.slider-dual { pointer-events: none; }
|
|
319
|
+
.slider-dual::-webkit-slider-thumb { pointer-events: auto; }
|
|
320
|
+
.slider-dual::-moz-range-thumb { pointer-events: auto; }
|
|
321
|
+
@media (prefers-reduced-motion: reduce) { .slider-input::-webkit-slider-thumb, .slider-input::-moz-range-thumb { transition: none; } }
|
|
322
|
+
|
|
323
|
+
/* Code editor */
|
|
324
|
+
.code-editor { border-radius: var(--lk-input-radius); }
|
|
325
|
+
.code-editor[aria-invalid="true"] { border-color: var(--lk-danger); }
|
|
326
|
+
.code-editor:focus-within { border-color: color-mix(in srgb, var(--lk-primary) 70%, var(--lk-border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lk-ring) 32%, transparent); }
|
|
327
|
+
.code-header { background: color-mix(in srgb, var(--lk-border) 18%, var(--lk-surface)); }
|
|
328
|
+
.code-body { background: var(--lk-surface); }
|
|
329
|
+
.code-gutter { background: color-mix(in srgb, var(--lk-border) 14%, var(--lk-surface)); min-width: 2.5rem; }
|
|
330
|
+
|
|
331
|
+
/* OTP */
|
|
332
|
+
.otp-box { padding-inline: 0; font-variant-numeric: tabular-nums; }
|
|
333
|
+
|
|
334
|
+
/* Callout */
|
|
335
|
+
.callout { border-radius: var(--lk-card-radius); background: var(--t-soft); border-color: color-mix(in srgb, var(--t-soft-border) 55%, var(--lk-border)); color: var(--t-soft-fg); }
|
|
336
|
+
.callout-icon { color: var(--t-solid); }
|
|
337
|
+
.callout-desc { color: color-mix(in srgb, var(--t-soft-fg) 88%, var(--lk-text)); }
|
|
338
|
+
|
|
339
|
+
/* Wizard */
|
|
340
|
+
.wizard-num { background: color-mix(in srgb, var(--lk-border) 45%, var(--lk-surface-2)); color: var(--lk-text); }
|
|
341
|
+
.wizard-step[data-state="current"] .wizard-num { background: var(--lk-primary); color: var(--lk-on-primary); }
|
|
342
|
+
.wizard-step[data-state="done"] .wizard-num { background: var(--lk-success); color: #fff; }
|
|
343
|
+
.wizard-step[data-state="error"] .wizard-num { background: var(--lk-danger); color: #fff; }
|
|
344
|
+
|
|
345
|
+
@media (forced-colors: active) {
|
|
346
|
+
.switch { appearance: auto; } .switch::after { content: none; }
|
|
347
|
+
.choice[data-on] { outline: 2px solid Highlight; }
|
|
348
|
+
.input:has(> div > button:focus-visible), .input[data-open], .frame:focus-within, .code-editor:focus-within { outline: 2px solid Highlight; outline-offset: 2px; box-shadow: none; }
|
|
349
|
+
.option[data-active] { background: Highlight; color: HighlightText; forced-color-adjust: none; }
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/* table */
|
|
355
|
+
@layer components {
|
|
356
|
+
.larakit {
|
|
357
|
+
.copy { text-align: inherit; border-radius: var(--lk-radius); }
|
|
358
|
+
.copy:hover { text-decoration: underline; text-underline-offset: 3px; }
|
|
359
|
+
.swatch, .picture { border-radius: calc(var(--lk-radius) * 0.6); }
|
|
360
|
+
.picture.rounded-full { border-radius: 50%; }
|
|
361
|
+
.striped tbody tr:nth-child(even) { background: color-mix(in srgb, var(--lk-border) 18%, transparent); }
|
|
362
|
+
tr[data-selected] { background: color-mix(in srgb, var(--lk-accent) 45%, transparent); }
|
|
363
|
+
.striped tbody tr[data-selected] { background: color-mix(in srgb, var(--lk-accent) 45%, transparent); }
|
|
364
|
+
.table-head { background: color-mix(in srgb, var(--lk-bg) 55%, var(--lk-surface)); }
|
|
365
|
+
.table-row { transition: background-color 120ms; }
|
|
366
|
+
.table-row:hover { background: color-mix(in srgb, var(--lk-border) 22%, transparent); }
|
|
367
|
+
.table-row[data-opens] { cursor: pointer; }
|
|
368
|
+
.bulk { background: color-mix(in srgb, var(--lk-accent) 35%, var(--lk-surface)); }
|
|
369
|
+
.pager { border: 1px solid var(--lk-border); border-radius: var(--lk-radius); }
|
|
370
|
+
.pager > * { @apply grid min-h-9 min-w-9 place-items-center px-2 font-medium; border-inline-start: 1px solid var(--lk-border); }
|
|
371
|
+
.pager > :first-child { border-inline-start: 0; border-start-start-radius: var(--lk-radius); border-end-start-radius: var(--lk-radius); }
|
|
372
|
+
.pager > :last-child { border-start-end-radius: var(--lk-radius); border-end-end-radius: var(--lk-radius); }
|
|
373
|
+
.pager > button:hover:enabled { background: color-mix(in srgb, var(--lk-border) 35%, transparent); }
|
|
374
|
+
.pager > button:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
375
|
+
.pager > [aria-current] { background: var(--lk-accent); color: var(--lk-on-accent); }
|
|
376
|
+
.table-tab { border-radius: var(--lk-btn-radius); background: var(--lk-surface); color: var(--lk-muted); border-color: var(--lk-border); transition: background-color 140ms, border-color 140ms, color 140ms; }
|
|
377
|
+
.table-tab:hover { color: var(--lk-text); background: color-mix(in srgb, var(--lk-border) 30%, var(--lk-surface)); }
|
|
378
|
+
.table-tab[aria-selected="true"] { background: var(--t-soft, var(--lk-accent)); color: var(--t-soft-fg, var(--lk-on-accent)); border-color: var(--t-soft-border, color-mix(in srgb, var(--lk-primary) 50%, var(--lk-border))); font-weight: 600; }
|
|
379
|
+
.table-group { background: color-mix(in srgb, var(--lk-bg) 45%, var(--lk-surface)); }
|
|
380
|
+
.table-summary { background: color-mix(in srgb, var(--lk-bg) 55%, var(--lk-surface)); }
|
|
381
|
+
.table-row[data-over] { box-shadow: inset 0 2px 0 0 var(--lk-primary); }
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
/* On a phone each record is a card: a label and a value on each line. Outside the layers, so it wins over utilities. */
|
|
385
|
+
@media (width < 40rem) {
|
|
386
|
+
.larakit table[data-lk="table"] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
387
|
+
.larakit table[data-lk="table"], .larakit table[data-lk="table"] tbody { display: block; }
|
|
388
|
+
.larakit table[data-lk="table"] tbody tr { display: flex; flex-direction: column; gap: 0.375rem; padding: 0.875rem 1rem; }
|
|
389
|
+
.larakit table[data-lk="table"] tbody td { padding: 0; }
|
|
390
|
+
.larakit table[data-lk="table"] td[data-lk="cell"] { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; align-items: baseline; justify-items: end; text-align: right; overflow-wrap: anywhere; }
|
|
391
|
+
.larakit table[data-lk="table"] td[data-lk="cell"] > * { grid-column: 2; }
|
|
392
|
+
.larakit table[data-lk="table"] td[data-lk="cell"]::before { content: attr(data-label); color: var(--lk-muted); grid-column: 1; grid-row: 1 / span 4; justify-self: start; text-align: left; }
|
|
393
|
+
.larakit table[data-lk="table"] td[data-lk="empty"] { display: block; padding: 3.5rem 1rem; }
|
|
394
|
+
.larakit table[data-lk="table"] tfoot { display: block; }
|
|
395
|
+
.larakit table[data-lk="table"] tfoot tr { display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 0.75rem 1rem; }
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* charts */
|
|
399
|
+
@layer components {
|
|
400
|
+
.larakit {
|
|
401
|
+
.track { background: color-mix(in srgb, var(--lk-border) 40%, transparent); border-radius: 9999px; overflow: hidden; }
|
|
402
|
+
.series-1 { --lk-series: var(--lk-chart-2); --lk-dash: 6 4; }
|
|
403
|
+
.series-2 { --lk-series: var(--lk-chart-3); --lk-dash: 2 3; }
|
|
404
|
+
.series-3 { --lk-series: var(--lk-chart-4); --lk-dash: 9 3 2 3; }
|
|
405
|
+
.fill { background: var(--lk-series, var(--lk-chart)); }
|
|
406
|
+
.bar-row:hover .fill { opacity: 0.85; }
|
|
407
|
+
.grid-line, .cross { fill: none; stroke: var(--lk-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
|
|
408
|
+
.grid-line { opacity: 0.55; }
|
|
409
|
+
.cross { stroke: var(--lk-muted); }
|
|
410
|
+
.zero-line { fill: none; stroke: var(--lk-muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
|
|
411
|
+
.column-group:hover .fill, .column-group:focus-visible .fill { opacity: 0.85; }
|
|
412
|
+
.column-group:focus-visible { outline: 2px solid var(--lk-chart); outline-offset: 2px; border-radius: min(var(--lk-radius), 0.25rem); }
|
|
413
|
+
.bar-link:hover .bar-label { text-decoration: underline; }
|
|
414
|
+
.ring-track { fill: none; stroke: color-mix(in srgb, var(--lk-border) 40%, transparent); stroke-width: 14; }
|
|
415
|
+
.slice { fill: none; stroke: var(--lk-series, var(--lk-chart)); stroke-width: 14; transition: opacity 0.15s, stroke-width 0.15s; }
|
|
416
|
+
.slice:hover, .slice:focus-visible { stroke-width: 17; }
|
|
417
|
+
.slice.faded, .pie-slice.faded { opacity: 0.35; }
|
|
418
|
+
.slice-other { stroke: color-mix(in srgb, var(--lk-muted) 55%, transparent); }
|
|
419
|
+
.slice-other-key { background: color-mix(in srgb, var(--lk-muted) 55%, transparent); }
|
|
420
|
+
.pie-slice { fill: var(--lk-series, var(--lk-chart)); stroke: var(--lk-surface); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transition: opacity 0.15s, transform 0.15s; }
|
|
421
|
+
.pie-slice:hover, .pie-slice:focus-visible { transform: scale(1.03); outline: none; }
|
|
422
|
+
.pie-slice.slice-other-fill { fill: color-mix(in srgb, var(--lk-muted) 55%, transparent); }
|
|
423
|
+
.legend-row:hover { background: color-mix(in srgb, var(--lk-border) 22%, transparent); }
|
|
424
|
+
.widget-link { color: var(--lk-chart); }
|
|
425
|
+
.widget-link:hover { text-decoration: underline; }
|
|
426
|
+
.chart-table summary:hover { color: var(--lk-text); }
|
|
427
|
+
.chart-table[open] summary svg { rotate: 180deg; }
|
|
428
|
+
.area { fill: var(--lk-chart); opacity: 0.08; }
|
|
429
|
+
.area-grad-stop { stop-color: var(--lk-series, var(--lk-chart)); }
|
|
430
|
+
.line { fill: none; stroke: var(--lk-series, var(--lk-chart)); stroke-dasharray: var(--lk-dash, none); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
|
|
431
|
+
.dot { position: absolute; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--lk-series, var(--lk-chart)); border: 2px solid var(--lk-surface); pointer-events: none; }
|
|
432
|
+
@media (forced-colors: active) {
|
|
433
|
+
.slice { stroke: CanvasText; }
|
|
434
|
+
.pie-slice { fill: CanvasText; stroke: Canvas; }
|
|
435
|
+
.fill, .dot { background: CanvasText; forced-color-adjust: none; }
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/* rich */
|
|
441
|
+
@layer components {
|
|
442
|
+
.larakit {
|
|
443
|
+
.rich-toolbar { background: color-mix(in srgb, var(--lk-border) 18%, var(--lk-surface)); border-top-left-radius: var(--lk-input-radius); border-top-right-radius: var(--lk-input-radius); }
|
|
444
|
+
.rich-btn { @apply grid size-7 place-items-center; border-radius: calc(var(--lk-btn-radius) * 0.6); color: var(--lk-muted); transition: background-color 120ms, color 120ms; }
|
|
445
|
+
.rich-btn:hover { background: color-mix(in srgb, var(--lk-border) 45%, var(--lk-surface)); color: var(--lk-text); }
|
|
446
|
+
.rich-link-popover { border-radius: var(--lk-radius); }
|
|
447
|
+
.rich-body:empty::before { content: attr(data-placeholder); color: var(--lk-muted); pointer-events: none; }
|
|
448
|
+
.rich-content h2 { font-size: 1.125rem; font-weight: 600; margin: 0.6em 0 0.25em; }
|
|
449
|
+
.rich-content h3 { font-size: 1rem; font-weight: 600; margin: 0.5em 0 0.2em; }
|
|
450
|
+
.rich-content p { margin: 0.35em 0; }
|
|
451
|
+
.rich-content ul { list-style: disc; padding-inline-start: 1.35rem; margin: 0.35em 0; }
|
|
452
|
+
.rich-content ol { list-style: decimal; padding-inline-start: 1.35rem; margin: 0.35em 0; }
|
|
453
|
+
.rich-content blockquote { border-inline-start: 3px solid var(--lk-primary); padding-inline-start: 0.75rem; color: var(--lk-muted); margin: 0.5em 0; }
|
|
454
|
+
.rich-content pre, .rich-content code { font-family: var(--lk-font-mono); font-size: 0.85em; background: color-mix(in srgb, var(--lk-border) 30%, var(--lk-surface)); border-radius: calc(var(--lk-radius) * 0.5); }
|
|
455
|
+
.rich-content pre { padding: 0.5rem 0.75rem; overflow-x: auto; margin: 0.4em 0; }
|
|
456
|
+
.rich-content code { padding: 0.1em 0.3em; }
|
|
457
|
+
.rich-content a { color: var(--lk-primary); text-decoration: underline; }
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
@layer components {
|
|
462
|
+
|
|
463
|
+
@keyframes bone { 50% { opacity: 0.4; } }
|
|
464
|
+
|
|
465
|
+
@keyframes toast { from { opacity: 0; translate: 0 -0.5rem; } }
|
|
466
|
+
}
|
|
467
|
+
|
package/README.md
DELETED