@lark-apaas/coding-template-vite-react 0.1.6 → 0.1.8
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 +16 -9
- package/template/_gitignore +56 -16
- package/template/package-lock.json +8 -6
- package/template/package.json +1 -1
- package/template/src/app.tsx +1 -1
- package/template/src/components/Layout.tsx +7 -0
- package/template/src/index.css +2 -129
- package/template/src/pages/ExamplePage/ExamplePage.tsx +37 -0
- package/template/src/tailwind-theme.css +257 -0
- package/template/src/components/layout.tsx +0 -9
package/package.json
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/coding-template-vite-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Vite + React client template for miaoda coding",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"prepublishOnly": "pnpm validate-manifest"
|
|
11
|
-
},
|
|
6
|
+
"files": [
|
|
7
|
+
"template",
|
|
8
|
+
"hooks"
|
|
9
|
+
],
|
|
12
10
|
"publishConfig": {
|
|
13
11
|
"access": "public",
|
|
14
12
|
"registry": "https://registry.npmjs.org/"
|
|
15
13
|
},
|
|
16
|
-
"keywords": [
|
|
14
|
+
"keywords": [
|
|
15
|
+
"miaoda",
|
|
16
|
+
"coding-template",
|
|
17
|
+
"vite",
|
|
18
|
+
"react"
|
|
19
|
+
],
|
|
17
20
|
"license": "MIT",
|
|
18
21
|
"miaodaTemplate": {
|
|
19
22
|
"schemaVersion": 1,
|
|
@@ -23,5 +26,9 @@
|
|
|
23
26
|
"afterRender": "hooks/after-render.mjs",
|
|
24
27
|
"afterInstall": "hooks/after-install.mjs"
|
|
25
28
|
}
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"validate-manifest": "node ../../../scripts/validate-template.mjs .",
|
|
32
|
+
"smoke": "node ../../../scripts/smoke-template.mjs ."
|
|
26
33
|
}
|
|
27
|
-
}
|
|
34
|
+
}
|
package/template/_gitignore
CHANGED
|
@@ -1,24 +1,64 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
*/node_modules/
|
|
4
|
+
|
|
5
|
+
# Production builds
|
|
6
|
+
dist/
|
|
7
|
+
*/dist/
|
|
8
|
+
build/
|
|
9
|
+
*/build/
|
|
10
|
+
|
|
11
|
+
# Environment files
|
|
12
|
+
.env.local
|
|
13
|
+
|
|
1
14
|
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
15
|
npm-debug.log*
|
|
5
16
|
yarn-debug.log*
|
|
6
17
|
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
18
|
lerna-debug.log*
|
|
19
|
+
/logs/
|
|
20
|
+
|
|
21
|
+
# Runtime data
|
|
22
|
+
pids
|
|
23
|
+
*.pid
|
|
24
|
+
*.seed
|
|
25
|
+
*.pid.lock
|
|
26
|
+
|
|
27
|
+
# Coverage directory used by tools like istanbul
|
|
28
|
+
coverage/
|
|
29
|
+
*.lcov
|
|
9
30
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*.
|
|
31
|
+
# IDE files
|
|
32
|
+
.vscode/
|
|
33
|
+
.idea/
|
|
34
|
+
*.swp
|
|
35
|
+
*.swo
|
|
36
|
+
*~
|
|
14
37
|
|
|
15
|
-
#
|
|
16
|
-
.vscode/*
|
|
17
|
-
!.vscode/extensions.json
|
|
18
|
-
.idea
|
|
38
|
+
# OS generated files
|
|
19
39
|
.DS_Store
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
40
|
+
.DS_Store?
|
|
41
|
+
._*
|
|
42
|
+
.Spotlight-V100
|
|
43
|
+
.Trashes
|
|
44
|
+
ehthumbs.db
|
|
45
|
+
Thumbs.db
|
|
46
|
+
|
|
47
|
+
# Temporary folders
|
|
48
|
+
tmp/
|
|
49
|
+
temp/
|
|
50
|
+
.playwright-cli/
|
|
51
|
+
|
|
52
|
+
# Lock files (keep package-lock.json for consistent installs)
|
|
53
|
+
yarn.lock
|
|
54
|
+
pnpm-lock.yaml
|
|
55
|
+
|
|
56
|
+
# Cache files
|
|
57
|
+
.eslintcache
|
|
58
|
+
*.tsbuildinfo
|
|
59
|
+
|
|
60
|
+
# swc wasm
|
|
61
|
+
.swc
|
|
62
|
+
|
|
63
|
+
# Agent files
|
|
64
|
+
.agent/
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@formkit/auto-animate": "^0.9.0",
|
|
12
12
|
"@gsap/react": "^2.1.2",
|
|
13
13
|
"@hookform/resolvers": "^5.2.2",
|
|
14
|
-
"@lark-apaas/client-toolkit-lite": "1.1.7-alpha.
|
|
14
|
+
"@lark-apaas/client-toolkit-lite": "1.1.7-alpha.25",
|
|
15
15
|
"@radix-ui/react-accordion": "^1.2.11",
|
|
16
16
|
"@radix-ui/react-alert-dialog": "^1.1.14",
|
|
17
17
|
"@radix-ui/react-aspect-ratio": "^1.1.7",
|
|
@@ -964,9 +964,9 @@
|
|
|
964
964
|
}
|
|
965
965
|
},
|
|
966
966
|
"node_modules/@lark-apaas/client-toolkit-lite": {
|
|
967
|
-
"version": "1.1.7-alpha.
|
|
968
|
-
"resolved": "https://
|
|
969
|
-
"integrity": "sha512-
|
|
967
|
+
"version": "1.1.7-alpha.25",
|
|
968
|
+
"resolved": "https://registry.npmmirror.com/@lark-apaas/client-toolkit-lite/-/client-toolkit-lite-1.1.7-alpha.25.tgz",
|
|
969
|
+
"integrity": "sha512-NvvgVvDdAfzCmHTlqey6rzjY3fGIySZrvmB7kuvGpcVLLJS2F0rZGARY0ehHFt4n9/8um6eOgQwSaT4jz40i4A==",
|
|
970
970
|
"license": "MIT",
|
|
971
971
|
"dependencies": {
|
|
972
972
|
"@lark-apaas/client-capability": "0.1.7-alpha.2",
|
|
@@ -8341,7 +8341,7 @@
|
|
|
8341
8341
|
"version": "2.7.0",
|
|
8342
8342
|
"resolved": "https://bnpm.byted.org/jiti/-/jiti-2.7.0.tgz",
|
|
8343
8343
|
"integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",
|
|
8344
|
-
"
|
|
8344
|
+
"dev": true,
|
|
8345
8345
|
"license": "MIT",
|
|
8346
8346
|
"bin": {
|
|
8347
8347
|
"jiti": "lib/jiti-cli.mjs"
|
|
@@ -12636,8 +12636,10 @@
|
|
|
12636
12636
|
"version": "2.9.0",
|
|
12637
12637
|
"resolved": "https://bnpm.byted.org/yaml/-/yaml-2.9.0.tgz",
|
|
12638
12638
|
"integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==",
|
|
12639
|
-
"
|
|
12639
|
+
"dev": true,
|
|
12640
12640
|
"license": "ISC",
|
|
12641
|
+
"optional": true,
|
|
12642
|
+
"peer": true,
|
|
12641
12643
|
"bin": {
|
|
12642
12644
|
"yaml": "bin.mjs"
|
|
12643
12645
|
},
|
package/template/package.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@radix-ui/react-toggle": "^1.1.9",
|
|
38
38
|
"@radix-ui/react-toggle-group": "^1.1.10",
|
|
39
39
|
"@radix-ui/react-tooltip": "^1.1.18",
|
|
40
|
-
"@lark-apaas/client-toolkit-lite": "1.1.7-alpha.
|
|
40
|
+
"@lark-apaas/client-toolkit-lite": "1.1.7-alpha.25",
|
|
41
41
|
"@formkit/auto-animate": "^0.9.0",
|
|
42
42
|
"@gsap/react": "^2.1.2",
|
|
43
43
|
"framer-motion": "^12.38.0",
|
package/template/src/app.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Routes, Route } from "react-router-dom";
|
|
2
2
|
import { Welcome } from "@lark-apaas/client-toolkit-lite";
|
|
3
|
-
import { Layout } from "@/components/
|
|
3
|
+
import { Layout } from "@/components/Layout";
|
|
4
4
|
import NotFoundPage from "@/pages/NotFoundPage/NotFoundPage";
|
|
5
5
|
|
|
6
6
|
export default function App() {
|
package/template/src/index.css
CHANGED
|
@@ -1,131 +1,4 @@
|
|
|
1
1
|
@import "tailwindcss";
|
|
2
|
+
@import "@lark-apaas/client-toolkit-lite/styles.css";
|
|
2
3
|
@import "tw-animate-css";
|
|
3
|
-
|
|
4
|
-
:root {
|
|
5
|
-
--button-outline: rgba(0,0,0, .10);
|
|
6
|
-
--badge-outline: rgba(0,0,0, .05);
|
|
7
|
-
--opaque-button-border-intensity: -8;
|
|
8
|
-
--elevate-1: rgba(0,0,0, .03);
|
|
9
|
-
--elevate-2: rgba(0,0,0, .08);
|
|
10
|
-
|
|
11
|
-
--background: hsl(0 0% 100%);
|
|
12
|
-
--foreground: hsl(220 14% 14%);
|
|
13
|
-
--card: hsl(0 0% 100%);
|
|
14
|
-
--card-foreground: hsl(220 14% 14%);
|
|
15
|
-
--popover: hsl(0 0% 100%);
|
|
16
|
-
--popover-foreground: hsl(220 14% 14%);
|
|
17
|
-
--primary: hsl(221 83% 53%);
|
|
18
|
-
--primary-foreground: hsl(220 14% 98%);
|
|
19
|
-
--secondary: hsl(220 14% 96%);
|
|
20
|
-
--secondary-foreground: hsl(220 14% 14%);
|
|
21
|
-
--muted: hsl(220 14% 96%);
|
|
22
|
-
--muted-foreground: hsl(218 7% 59%);
|
|
23
|
-
--accent: hsl(220 14% 96%);
|
|
24
|
-
--accent-foreground: hsl(220 14% 14%);
|
|
25
|
-
--info: hsl(221 83% 53%);
|
|
26
|
-
--info-foreground: hsl(230 100% 98%);
|
|
27
|
-
--destructive: hsl(2 84% 62%);
|
|
28
|
-
--destructive-foreground: hsl(0 0% 100%);
|
|
29
|
-
--success: hsl(130 54% 42%);
|
|
30
|
-
--success-foreground: hsl(115 77% 97%);
|
|
31
|
-
--warning: hsl(26 90% 49%);
|
|
32
|
-
--warning-foreground: hsl(33 100% 96%);
|
|
33
|
-
--border: hsl(220 14% 89%);
|
|
34
|
-
--input: hsl(220 14% 89%);
|
|
35
|
-
--ring: hsl(221 83% 53%);
|
|
36
|
-
--chart-1: hsl(222 82% 56%);
|
|
37
|
-
--chart-2: hsl(174 77% 46%);
|
|
38
|
-
--chart-3: hsl(46 100% 52%);
|
|
39
|
-
--chart-4: hsl(27 92% 49%);
|
|
40
|
-
--chart-5: hsl(292 54% 76%);
|
|
41
|
-
--sidebar: hsl(220 14% 96%);
|
|
42
|
-
--sidebar-foreground: hsl(220 14% 14%);
|
|
43
|
-
--sidebar-primary: hsl(221 83% 53%);
|
|
44
|
-
--sidebar-primary-foreground: hsl(220 14% 98%);
|
|
45
|
-
--sidebar-accent: hsl(222 100% 94%);
|
|
46
|
-
--sidebar-accent-foreground: hsl(221 83% 53%);
|
|
47
|
-
--sidebar-border: hsl(220 14% 89%);
|
|
48
|
-
--sidebar-ring: hsl(221 83% 53%);
|
|
49
|
-
|
|
50
|
-
--primary-border: hsl(from hsl(221 83% 53%) h s calc(l + var(--opaque-button-border-intensity)));
|
|
51
|
-
--secondary-border: hsl(from hsl(220 14% 96%) h s calc(l + var(--opaque-button-border-intensity)));
|
|
52
|
-
--destructive-border: hsl(from hsl(2 84% 62%) h s calc(l + var(--opaque-button-border-intensity)));
|
|
53
|
-
--accent-border: hsl(from hsl(220 14% 96%) h s calc(l + var(--opaque-button-border-intensity)));
|
|
54
|
-
--muted-border: hsl(from hsl(220 14% 96%) h s calc(l + var(--opaque-button-border-intensity)));
|
|
55
|
-
|
|
56
|
-
--font-sans:
|
|
57
|
-
-apple-system, BlinkMacSystemFont, 'Helvetica Neue', Tahoma, 'PingFang SC',
|
|
58
|
-
'Microsoft Yahei', Arial, 'Hiragino Sans GB', sans-serif,
|
|
59
|
-
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
60
|
-
--font-mono: Source Code Pro, monospace;
|
|
61
|
-
--radius: 0.5rem;
|
|
62
|
-
--spacing: 0.25rem;
|
|
63
|
-
|
|
64
|
-
--shadow-2xs: 0px 2px 12px 0px hsl(0 0% 0% / 0.01);
|
|
65
|
-
--shadow-xs: 0px 2px 12px 0px hsl(0 0% 0% / 0.01);
|
|
66
|
-
--shadow-sm: 0px 2px 12px 0px hsl(0 0% 0% / 0.02), 0px 1px 2px -1px hsl(0 0% 0% / 0.02);
|
|
67
|
-
--shadow: 0px 2px 12px 0px hsl(0 0% 0% / 0.02), 0px 1px 2px -1px hsl(0 0% 0% / 0.02);
|
|
68
|
-
--shadow-md: 0px 2px 12px 0px hsl(0 0% 0% / 0.02), 0px 2px 4px -1px hsl(0 0% 0% / 0.02);
|
|
69
|
-
--shadow-lg: 0px 2px 12px 0px hsl(0 0% 0% / 0.02), 0px 4px 6px -1px hsl(0 0% 0% / 0.02);
|
|
70
|
-
--shadow-xl: 0px 2px 12px 0px hsl(0 0% 0% / 0.02), 0px 8px 10px -1px hsl(0 0% 0% / 0.02);
|
|
71
|
-
--shadow-2xl: 0px 2px 12px 0px hsl(0 0% 0% / 0.05);
|
|
72
|
-
--tracking-normal: 0em;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@theme inline {
|
|
76
|
-
--color-background: var(--background);
|
|
77
|
-
--color-foreground: var(--foreground);
|
|
78
|
-
--color-card: var(--card);
|
|
79
|
-
--color-card-foreground: var(--card-foreground);
|
|
80
|
-
--color-popover: var(--popover);
|
|
81
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
82
|
-
--color-primary: var(--primary);
|
|
83
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
84
|
-
--color-secondary: var(--secondary);
|
|
85
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
86
|
-
--color-muted: var(--muted);
|
|
87
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
88
|
-
--color-accent: var(--accent);
|
|
89
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
90
|
-
--color-info: var(--info);
|
|
91
|
-
--color-info-foreground: var(--info-foreground);
|
|
92
|
-
--color-destructive: var(--destructive);
|
|
93
|
-
--color-destructive-foreground: var(--destructive-foreground);
|
|
94
|
-
--color-success: var(--success);
|
|
95
|
-
--color-success-foreground: var(--success-foreground);
|
|
96
|
-
--color-warning: var(--warning);
|
|
97
|
-
--color-warning-foreground: var(--warning-foreground);
|
|
98
|
-
--color-border: var(--border);
|
|
99
|
-
--color-input: var(--input);
|
|
100
|
-
--color-ring: var(--ring);
|
|
101
|
-
--color-chart-1: var(--chart-1);
|
|
102
|
-
--color-chart-2: var(--chart-2);
|
|
103
|
-
--color-chart-3: var(--chart-3);
|
|
104
|
-
--color-chart-4: var(--chart-4);
|
|
105
|
-
--color-chart-5: var(--chart-5);
|
|
106
|
-
--color-sidebar: var(--sidebar);
|
|
107
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
108
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
109
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
110
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
111
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
112
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
113
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
114
|
-
|
|
115
|
-
--font-sans: var(--font-sans);
|
|
116
|
-
--font-mono: var(--font-mono);
|
|
117
|
-
|
|
118
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
119
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
120
|
-
--radius-lg: var(--radius);
|
|
121
|
-
--radius-xl: calc(var(--radius) + 4px);
|
|
122
|
-
|
|
123
|
-
--shadow-2xs: var(--shadow-2xs);
|
|
124
|
-
--shadow-xs: var(--shadow-xs);
|
|
125
|
-
--shadow-sm: var(--shadow-sm);
|
|
126
|
-
--shadow: var(--shadow);
|
|
127
|
-
--shadow-md: var(--shadow-md);
|
|
128
|
-
--shadow-lg: var(--shadow-lg);
|
|
129
|
-
--shadow-xl: var(--shadow-xl);
|
|
130
|
-
--shadow-2xl: var(--shadow-2xl);
|
|
131
|
-
}
|
|
4
|
+
@import "./tailwind-theme.css";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// import { useState } from 'react';
|
|
2
|
+
// import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
|
3
|
+
// import { Button } from '@/components/ui/button';
|
|
4
|
+
// import { RefreshCw, TrendingUp, PieChart, Clock } from 'lucide-react';
|
|
5
|
+
// import { Link } from 'react-router-dom';
|
|
6
|
+
// import { useRecordData } from '@/hooks/use-example';
|
|
7
|
+
|
|
8
|
+
// export default function ExamplePage() {
|
|
9
|
+
// const { record, loading, error, refetch } = useRecordData();
|
|
10
|
+
// const [dimension, setDimension] = useState<'month' | 'quarter' | 'year'>('month');
|
|
11
|
+
|
|
12
|
+
// if (loading) {
|
|
13
|
+
// return (
|
|
14
|
+
// <div className="flex items-center justify-center h-64">
|
|
15
|
+
// <div className="text-muted-foreground">加载中...</div>
|
|
16
|
+
// </div>
|
|
17
|
+
// );
|
|
18
|
+
// }
|
|
19
|
+
|
|
20
|
+
// if (error) {
|
|
21
|
+
// return (
|
|
22
|
+
// <div className="flex flex-col items-center justify-center h-64 space-y-4">
|
|
23
|
+
// <div className="text-destructive">{error}</div>
|
|
24
|
+
// <Button onClick={refetch} variant="outline" size="sm">
|
|
25
|
+
// <RefreshCw className="h-4 w-4 mr-2" />
|
|
26
|
+
// 重试
|
|
27
|
+
// </Button>
|
|
28
|
+
// </div>
|
|
29
|
+
// );
|
|
30
|
+
// }
|
|
31
|
+
|
|
32
|
+
// return (
|
|
33
|
+
// <div className="space-y-6">
|
|
34
|
+
// {/* 页面内容 */}
|
|
35
|
+
// </div>
|
|
36
|
+
// );
|
|
37
|
+
// }
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--button-outline: rgba(0,0,0, .10);
|
|
3
|
+
--badge-outline: rgba(0,0,0, .05);
|
|
4
|
+
|
|
5
|
+
/* Automatic computation of border around primary / danger buttons */
|
|
6
|
+
--opaque-button-border-intensity: -8; /* In terms of percentages */
|
|
7
|
+
|
|
8
|
+
/* Backgrounds applied on top of other backgrounds when hovered/active */
|
|
9
|
+
--elevate-1: rgba(0,0,0, .03);
|
|
10
|
+
--elevate-2: rgba(0,0,0, .08);
|
|
11
|
+
|
|
12
|
+
--background: hsl(0 0% 100%);
|
|
13
|
+
--foreground: hsl(220 14% 14%);
|
|
14
|
+
--card: hsl(0 0% 100%);
|
|
15
|
+
--card-foreground: hsl(220 14% 14%);
|
|
16
|
+
--popover: hsl(0 0% 100%);
|
|
17
|
+
--popover-foreground: hsl(220 14% 14%);
|
|
18
|
+
--primary: hsl(221 83% 53%);
|
|
19
|
+
--primary-foreground: hsl(220 14% 98%);
|
|
20
|
+
--secondary: hsl(220 14% 96%);
|
|
21
|
+
--secondary-foreground: hsl(220 14% 14%);
|
|
22
|
+
--muted: hsl(220 14% 96%);
|
|
23
|
+
--muted-foreground: hsl(218 7% 59%);
|
|
24
|
+
--accent: hsl(220 14% 96%);
|
|
25
|
+
--accent-foreground: hsl(220 14% 14%);
|
|
26
|
+
--info: hsl(221 83% 53%);
|
|
27
|
+
--info-foreground: hsl(230 100% 98%);
|
|
28
|
+
--destructive: hsl(2 84% 62%);
|
|
29
|
+
--destructive-foreground: hsl(0 0% 100%);
|
|
30
|
+
--success: hsl(130 54% 42%);
|
|
31
|
+
--success-foreground: hsl(115 77% 97%);
|
|
32
|
+
--warning: hsl(26 90% 49%);
|
|
33
|
+
--warning-foreground: hsl(33 100% 96%);
|
|
34
|
+
--border: hsl(220 14% 89%);
|
|
35
|
+
--input: hsl(220 14% 89%);
|
|
36
|
+
--ring: hsl(221 83% 53%);
|
|
37
|
+
--chart-1: hsl(222 82% 56%);
|
|
38
|
+
--chart-2: hsl(174 77% 46%);
|
|
39
|
+
--chart-3: hsl(46 100% 52%);
|
|
40
|
+
--chart-4: hsl(27 92% 49%);
|
|
41
|
+
--chart-5: hsl(292 54% 76%);
|
|
42
|
+
--sidebar: hsl(220 14% 96%);
|
|
43
|
+
--sidebar-foreground: hsl(220 14% 14%);
|
|
44
|
+
--sidebar-primary: hsl(221 83% 53%);
|
|
45
|
+
--sidebar-primary-foreground: hsl(220 14% 98%);
|
|
46
|
+
--sidebar-accent: hsl(222 100% 94%);
|
|
47
|
+
--sidebar-accent-foreground: hsl(221 83% 53%);
|
|
48
|
+
--sidebar-border: hsl(220 14% 89%);
|
|
49
|
+
--sidebar-ring: hsl(221 83% 53%);
|
|
50
|
+
|
|
51
|
+
/* Computed borders using hsl relative color syntax */
|
|
52
|
+
--primary-border: hsl(from hsl(221 83% 53%) h s calc(l + var(--opaque-button-border-intensity)));
|
|
53
|
+
--secondary-border: hsl(from hsl(220 14% 96%) h s calc(l + var(--opaque-button-border-intensity)));
|
|
54
|
+
--destructive-border: hsl(from hsl(2 84% 62%) h s calc(l + var(--opaque-button-border-intensity)));
|
|
55
|
+
--accent-border: hsl(from hsl(220 14% 96%) h s calc(l + var(--opaque-button-border-intensity)));
|
|
56
|
+
--muted-border: hsl(from hsl(220 14% 96%) h s calc(l + var(--opaque-button-border-intensity)));
|
|
57
|
+
--font-sans:
|
|
58
|
+
'LarkHackSafariFont', 'LarkEmojiFont', 'LarkChineseQuote', '-apple-system',
|
|
59
|
+
'BlinkMacSystemFont', 'Helvetica Neue', 'Tahoma', 'PingFang SC',
|
|
60
|
+
'Microsoft Yahei', 'Arial', 'Hiragino Sans GB', 'sans-serif',
|
|
61
|
+
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
62
|
+
--font-serif:
|
|
63
|
+
'Geist', 'Geist Fallback', ui-serif, Georgia, Cambria, 'Times New Roman',
|
|
64
|
+
Times, serif;
|
|
65
|
+
--font-mono: Source Code Pro, monospace;
|
|
66
|
+
--radius: 0.5rem;
|
|
67
|
+
--shadow-x: 0px;
|
|
68
|
+
--shadow-y: 2px;
|
|
69
|
+
--shadow-blur: 12px;
|
|
70
|
+
--shadow-spread: 0px;
|
|
71
|
+
--shadow-opacity: 0.02;
|
|
72
|
+
--shadow-color: #000000;
|
|
73
|
+
--shadow-2xs: 0px 2px 12px 0px hsl(0 0% 0% / 0.01);
|
|
74
|
+
--shadow-xs: 0px 2px 12px 0px hsl(0 0% 0% / 0.01);
|
|
75
|
+
--shadow-sm:
|
|
76
|
+
0px 2px 12px 0px hsl(0 0% 0% / 0.02), 0px 1px 2px -1px hsl(0 0% 0% / 0.02);
|
|
77
|
+
--shadow:
|
|
78
|
+
0px 2px 12px 0px hsl(0 0% 0% / 0.02), 0px 1px 2px -1px hsl(0 0% 0% / 0.02);
|
|
79
|
+
--shadow-md:
|
|
80
|
+
0px 2px 12px 0px hsl(0 0% 0% / 0.02), 0px 2px 4px -1px hsl(0 0% 0% / 0.02);
|
|
81
|
+
--shadow-lg:
|
|
82
|
+
0px 2px 12px 0px hsl(0 0% 0% / 0.02), 0px 4px 6px -1px hsl(0 0% 0% / 0.02);
|
|
83
|
+
--shadow-xl:
|
|
84
|
+
0px 2px 12px 0px hsl(0 0% 0% / 0.02), 0px 8px 10px -1px hsl(0 0% 0% / 0.02);
|
|
85
|
+
--shadow-2xl: 0px 2px 12px 0px hsl(0 0% 0% / 0.05);
|
|
86
|
+
--tracking-normal: 0em;
|
|
87
|
+
--spacing: 0.25rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@theme inline {
|
|
91
|
+
--color-background: var(--background);
|
|
92
|
+
--color-foreground: var(--foreground);
|
|
93
|
+
--color-card: var(--card);
|
|
94
|
+
--color-card-foreground: var(--card-foreground);
|
|
95
|
+
--color-popover: var(--popover);
|
|
96
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
97
|
+
--color-primary: var(--primary);
|
|
98
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
99
|
+
--color-secondary: var(--secondary);
|
|
100
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
101
|
+
--color-muted: var(--muted);
|
|
102
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
103
|
+
--color-accent: var(--accent);
|
|
104
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
105
|
+
--color-info: var(--info);
|
|
106
|
+
--color-info-foreground: var(--info-foreground);
|
|
107
|
+
--color-destructive: var(--destructive);
|
|
108
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
109
|
+
--color-success: var(--success);
|
|
110
|
+
--color-success-foreground: var(--success-foreground);
|
|
111
|
+
--color-warning: var(--warning);
|
|
112
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
113
|
+
--color-border: var(--border);
|
|
114
|
+
--color-input: var(--input);
|
|
115
|
+
--color-ring: var(--ring);
|
|
116
|
+
--color-chart-1: var(--chart-1);
|
|
117
|
+
--color-chart-2: var(--chart-2);
|
|
118
|
+
--color-chart-3: var(--chart-3);
|
|
119
|
+
--color-chart-4: var(--chart-4);
|
|
120
|
+
--color-chart-5: var(--chart-5);
|
|
121
|
+
--color-sidebar: var(--sidebar);
|
|
122
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
123
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
124
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
125
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
126
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
127
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
128
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
129
|
+
|
|
130
|
+
--font-sans: var(--font-sans);
|
|
131
|
+
--font-mono: var(--font-mono);
|
|
132
|
+
--font-serif: var(--font-serif);
|
|
133
|
+
|
|
134
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
135
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
136
|
+
--radius-lg: var(--radius);
|
|
137
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
138
|
+
|
|
139
|
+
--shadow-2xs: var(--shadow-2xs);
|
|
140
|
+
--shadow-xs: var(--shadow-xs);
|
|
141
|
+
--shadow-sm: var(--shadow-sm);
|
|
142
|
+
--shadow: var(--shadow);
|
|
143
|
+
--shadow-md: var(--shadow-md);
|
|
144
|
+
--shadow-lg: var(--shadow-lg);
|
|
145
|
+
--shadow-xl: var(--shadow-xl);
|
|
146
|
+
--shadow-2xl: var(--shadow-2xl);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Using the elevate system.
|
|
151
|
+
* Automatic contrast adjustment.
|
|
152
|
+
*
|
|
153
|
+
* <element className="hover-elevate" />
|
|
154
|
+
* <element className="active-elevate-2" />
|
|
155
|
+
*
|
|
156
|
+
* // Using the tailwind utility when a data attribute is "on"
|
|
157
|
+
* <element className="toggle-elevate data-[state=on]:toggle-elevated" />
|
|
158
|
+
* // Or manually controlling the toggle state
|
|
159
|
+
* <element className="toggle-elevate toggle-elevated" />
|
|
160
|
+
*
|
|
161
|
+
* Elevation systems have to handle many states.
|
|
162
|
+
* - not-hovered, vs. hovered vs. active (three mutually exclusive states)
|
|
163
|
+
* - toggled or not
|
|
164
|
+
* - focused or not (this is not handled with these utilities)
|
|
165
|
+
*
|
|
166
|
+
* Even without handling focused or not, this is six possible combinations that
|
|
167
|
+
* need to be distinguished from eachother visually.
|
|
168
|
+
*/
|
|
169
|
+
@layer utilities {
|
|
170
|
+
/* Hide ugly search cancel button in Chrome until we can style it properly */
|
|
171
|
+
input[type="search"]::-webkit-search-cancel-button {
|
|
172
|
+
@apply hidden;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Placeholder styling for contentEditable div */
|
|
176
|
+
[contenteditable][data-placeholder]:empty::before {
|
|
177
|
+
content: attr(data-placeholder);
|
|
178
|
+
color: var(--muted-foreground);
|
|
179
|
+
pointer-events: none;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* .no-default-hover-elevate/no-default-active-elevate is an escape hatch so consumers of
|
|
183
|
+
* buttons/badges can remove the automatic brightness adjustment on interactions
|
|
184
|
+
* and program their own. */
|
|
185
|
+
.no-default-hover-elevate {}
|
|
186
|
+
.no-default-active-elevate {}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Toggleable backgrounds go behind the content. Hoverable/active goes on top.
|
|
191
|
+
* This way they can stack/compound. Both will overlap the parent's borders!
|
|
192
|
+
* So borders will be automatically adjusted both on toggle, and hover/active,
|
|
193
|
+
* and they will be compounded.
|
|
194
|
+
*/
|
|
195
|
+
.toggle-elevate::before,
|
|
196
|
+
.toggle-elevate-2::before {
|
|
197
|
+
content: "";
|
|
198
|
+
pointer-events: none;
|
|
199
|
+
position: absolute;
|
|
200
|
+
inset: 0px;
|
|
201
|
+
/*border-radius: inherit; match rounded corners */
|
|
202
|
+
border-radius: inherit;
|
|
203
|
+
z-index: -1;
|
|
204
|
+
/* sits behind content but above backdrop */
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.toggle-elevate.toggle-elevated::before {
|
|
208
|
+
background-color: var(--elevate-2);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* If there's a 1px border, adjust the inset so that it covers that parent's border */
|
|
212
|
+
.border.toggle-elevate::before {
|
|
213
|
+
inset: -1px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Does not work on elements with overflow:hidden! */
|
|
217
|
+
.hover-elevate:not(.no-default-hover-elevate),
|
|
218
|
+
.active-elevate:not(.no-default-active-elevate),
|
|
219
|
+
.hover-elevate-2:not(.no-default-hover-elevate),
|
|
220
|
+
.active-elevate-2:not(.no-default-active-elevate) {
|
|
221
|
+
position: relative;
|
|
222
|
+
z-index: 0;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.hover-elevate:not(.no-default-hover-elevate)::after,
|
|
226
|
+
.active-elevate:not(.no-default-active-elevate)::after,
|
|
227
|
+
.hover-elevate-2:not(.no-default-hover-elevate)::after,
|
|
228
|
+
.active-elevate-2:not(.no-default-active-elevate)::after {
|
|
229
|
+
content: "";
|
|
230
|
+
pointer-events: none;
|
|
231
|
+
position: absolute;
|
|
232
|
+
inset: 0px;
|
|
233
|
+
/*border-radius: inherit; match rounded corners */
|
|
234
|
+
border-radius: inherit;
|
|
235
|
+
z-index: 999;
|
|
236
|
+
/* sits in front of content */
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.hover-elevate:hover:not(.no-default-hover-elevate)::after,
|
|
240
|
+
.active-elevate:active:not(.no-default-active-elevate)::after {
|
|
241
|
+
background-color: var(--elevate-1);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.hover-elevate-2:hover:not(.no-default-hover-elevate)::after,
|
|
245
|
+
.active-elevate-2:active:not(.no-default-active-elevate)::after {
|
|
246
|
+
background-color: var(--elevate-2);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* If there's a 1px border, adjust the inset so that it covers that parent's border */
|
|
250
|
+
.border.hover-elevate:not(.no-hover-interaction-elevate)::after,
|
|
251
|
+
.border.active-elevate:not(.no-active-interaction-elevate)::after,
|
|
252
|
+
.border.hover-elevate-2:not(.no-hover-interaction-elevate)::after,
|
|
253
|
+
.border.active-elevate-2:not(.no-active-interaction-elevate)::after,
|
|
254
|
+
.border.hover-elevate:not(.no-hover-interaction-elevate)::after {
|
|
255
|
+
inset: -1px;
|
|
256
|
+
}
|
|
257
|
+
}
|