@asteby/metacore-theme 0.3.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/LICENSE +201 -0
- package/README.md +70 -0
- package/dist/fonts.d.ts +22 -0
- package/dist/fonts.d.ts.map +1 -0
- package/dist/fonts.js +21 -0
- package/dist/fonts.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/preset.d.ts +187 -0
- package/dist/preset.d.ts.map +1 -0
- package/dist/preset.js +107 -0
- package/dist/preset.js.map +1 -0
- package/dist/provider.d.ts +18 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +89 -0
- package/dist/provider.js.map +1 -0
- package/package.json +59 -0
- package/styles/index.css +123 -0
- package/styles/tokens.css +171 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Asteby, Inc.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# @asteby/metacore-theme
|
|
2
|
+
|
|
3
|
+
Metacore design tokens and Tailwind 4 preset.
|
|
4
|
+
|
|
5
|
+
Ships the canonical Metacore visual language:
|
|
6
|
+
|
|
7
|
+
- `oklch` color palette (light + dark)
|
|
8
|
+
- Radius, shadow, tracking and spacing scales
|
|
9
|
+
- Font families (`Inter`, `Lora`, `IBM Plex Mono`)
|
|
10
|
+
- `@theme inline` block mapping tokens to Tailwind v4 utilities
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pnpm add @asteby/metacore-theme
|
|
16
|
+
# peer
|
|
17
|
+
pnpm add -D tailwindcss@^4
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage with Tailwind 4
|
|
21
|
+
|
|
22
|
+
Tailwind 4 is CSS-first. Import the full entry from your app's root stylesheet:
|
|
23
|
+
|
|
24
|
+
```css
|
|
25
|
+
/* src/styles/app.css */
|
|
26
|
+
@import '@asteby/metacore-theme/index.css';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This gives you:
|
|
30
|
+
|
|
31
|
+
- `@import 'tailwindcss'`
|
|
32
|
+
- `@import 'tw-animate-css'`
|
|
33
|
+
- All Metacore tokens (`:root` + `.dark`)
|
|
34
|
+
- `@theme inline` exposing `bg-primary`, `text-muted-foreground`, etc.
|
|
35
|
+
- Base layer utilities (`.container`, `.no-scrollbar`, `.faded-bottom`)
|
|
36
|
+
- Accordion / collapsible animations
|
|
37
|
+
|
|
38
|
+
If you already have your own Tailwind entry and only want the tokens:
|
|
39
|
+
|
|
40
|
+
```css
|
|
41
|
+
@import 'tailwindcss';
|
|
42
|
+
@import '@asteby/metacore-theme/tokens.css';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Usage from JS/TS
|
|
46
|
+
|
|
47
|
+
For programmatic access (Storybook, charts, PDF):
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import { themeConfig, colorTokens, fonts } from '@asteby/metacore-theme'
|
|
51
|
+
|
|
52
|
+
themeConfig.colors.light.primary // 'oklch(0.55 0.20 131)'
|
|
53
|
+
fonts // readonly ['inter', 'manrope', 'system']
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Subpath exports:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import { fonts } from '@asteby/metacore-theme/fonts'
|
|
60
|
+
import { themeConfig } from '@asteby/metacore-theme/preset'
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Dark mode
|
|
64
|
+
|
|
65
|
+
Apply the `.dark` class to `<html>` or any ancestor. A `@custom-variant dark` is
|
|
66
|
+
registered so Tailwind utilities like `dark:bg-card` work out of the box.
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
Apache-2.0
|
package/dist/fonts.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of available font names (visit the url `/settings/appearance`).
|
|
3
|
+
* This array is used to generate dynamic font classes (e.g., `font-inter`, `font-manrope`).
|
|
4
|
+
*
|
|
5
|
+
* How to Add a New Font (Tailwind v4+):
|
|
6
|
+
* 1. Add the font name here.
|
|
7
|
+
* 2. Update the `<link>` tag in 'index.html' to include the new font from Google Fonts (or any other source).
|
|
8
|
+
* 3. Add the new font family to 'index.css' using the `@theme inline` and `font-family` CSS variable.
|
|
9
|
+
*
|
|
10
|
+
* Example:
|
|
11
|
+
* fonts.ts -> Add 'roboto' to this array.
|
|
12
|
+
* index.html -> Add Google Fonts link for Roboto.
|
|
13
|
+
* index.css -> Add the new font in the CSS, e.g.:
|
|
14
|
+
* @theme inline {
|
|
15
|
+
* // ... other font families
|
|
16
|
+
* --font-roboto: 'Roboto', var(--font-sans);
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export declare const fonts: readonly ["inter", "manrope", "system"];
|
|
20
|
+
export type FontFamily = (typeof fonts)[number];
|
|
21
|
+
export declare const fontFamilies: readonly ["inter", "manrope", "system"];
|
|
22
|
+
//# sourceMappingURL=fonts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../src/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,KAAK,yCAA0C,CAAA;AAE5D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/C,eAAO,MAAM,YAAY,yCAAQ,CAAA"}
|
package/dist/fonts.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of available font names (visit the url `/settings/appearance`).
|
|
3
|
+
* This array is used to generate dynamic font classes (e.g., `font-inter`, `font-manrope`).
|
|
4
|
+
*
|
|
5
|
+
* How to Add a New Font (Tailwind v4+):
|
|
6
|
+
* 1. Add the font name here.
|
|
7
|
+
* 2. Update the `<link>` tag in 'index.html' to include the new font from Google Fonts (or any other source).
|
|
8
|
+
* 3. Add the new font family to 'index.css' using the `@theme inline` and `font-family` CSS variable.
|
|
9
|
+
*
|
|
10
|
+
* Example:
|
|
11
|
+
* fonts.ts -> Add 'roboto' to this array.
|
|
12
|
+
* index.html -> Add Google Fonts link for Roboto.
|
|
13
|
+
* index.css -> Add the new font in the CSS, e.g.:
|
|
14
|
+
* @theme inline {
|
|
15
|
+
* // ... other font families
|
|
16
|
+
* --font-roboto: 'Roboto', var(--font-sans);
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export const fonts = ['inter', 'manrope', 'system'];
|
|
20
|
+
export const fontFamilies = fonts;
|
|
21
|
+
//# sourceMappingURL=fonts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../src/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAA;AAI5D,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { fonts, fontFamilies } from './fonts.js';
|
|
2
|
+
export type { FontFamily } from './fonts.js';
|
|
3
|
+
export { colorTokens, chartTokens, radiusTokens, shadowTokens, fontTokens, trackingTokens, themeConfig, } from './preset.js';
|
|
4
|
+
export type { ThemeConfig } from './preset.js';
|
|
5
|
+
export { ThemeProvider, useTheme } from './provider.js';
|
|
6
|
+
export type { ThemeProviderProps, ThemeProviderState } from './provider.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAChD,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,cAAc,EACd,WAAW,GACZ,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACvD,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAGhD,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,cAAc,EACd,WAAW,GACZ,MAAM,aAAa,CAAA;AAGpB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/preset.d.ts
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metacore theme preset.
|
|
3
|
+
*
|
|
4
|
+
* The canonical source for Tailwind 4 design tokens lives in CSS
|
|
5
|
+
* (`@asteby/metacore-theme/tokens.css` and `/index.css`). Tailwind 4 does
|
|
6
|
+
* not use JS presets the way v3 did — consumers should import the CSS
|
|
7
|
+
* entry directly via `@import '@asteby/metacore-theme/index.css'` or
|
|
8
|
+
* `@import '@asteby/metacore-theme/tokens.css'`.
|
|
9
|
+
*
|
|
10
|
+
* This module exposes the same tokens as plain JS objects for cases where
|
|
11
|
+
* a JS/TS consumer needs programmatic access (e.g., Storybook theming,
|
|
12
|
+
* charting libraries, PDF generators).
|
|
13
|
+
*/
|
|
14
|
+
export declare const colorTokens: {
|
|
15
|
+
readonly light: {
|
|
16
|
+
readonly background: "oklch(0.9940 0 0)";
|
|
17
|
+
readonly foreground: "oklch(0 0 0)";
|
|
18
|
+
readonly card: "oklch(0.9940 0 0)";
|
|
19
|
+
readonly cardForeground: "oklch(0 0 0)";
|
|
20
|
+
readonly popover: "oklch(0.9911 0 0)";
|
|
21
|
+
readonly popoverForeground: "oklch(0 0 0)";
|
|
22
|
+
readonly primary: "oklch(0.55 0.20 131)";
|
|
23
|
+
readonly primaryForeground: "oklch(1.0000 0 0)";
|
|
24
|
+
readonly secondary: "oklch(0.9540 0.0063 131)";
|
|
25
|
+
readonly secondaryForeground: "oklch(0.1344 0 0)";
|
|
26
|
+
readonly muted: "oklch(0.9702 0 0)";
|
|
27
|
+
readonly mutedForeground: "oklch(0.4386 0 0)";
|
|
28
|
+
readonly accent: "oklch(0.94 0.03 131)";
|
|
29
|
+
readonly accentForeground: "oklch(0.5445 0.1903 131)";
|
|
30
|
+
readonly destructive: "oklch(0.6290 0.1902 23.0704)";
|
|
31
|
+
readonly destructiveForeground: "oklch(1.0000 0 0)";
|
|
32
|
+
readonly border: "oklch(0.9300 0.0094 131)";
|
|
33
|
+
readonly input: "oklch(0.9401 0 0)";
|
|
34
|
+
readonly ring: "oklch(0 0 0)";
|
|
35
|
+
};
|
|
36
|
+
readonly dark: {
|
|
37
|
+
readonly background: "oklch(0.22 0.01 131)";
|
|
38
|
+
readonly foreground: "oklch(0.9551 0 0)";
|
|
39
|
+
readonly card: "oklch(0.24 0.01 131)";
|
|
40
|
+
readonly cardForeground: "oklch(0.9551 0 0)";
|
|
41
|
+
readonly popover: "oklch(0.24 0.01 131)";
|
|
42
|
+
readonly popoverForeground: "oklch(0.9551 0 0)";
|
|
43
|
+
readonly primary: "oklch(0.65 0.20 131)";
|
|
44
|
+
readonly primaryForeground: "oklch(1.0000 0 0)";
|
|
45
|
+
readonly secondary: "oklch(0.29 0.02 131)";
|
|
46
|
+
readonly secondaryForeground: "oklch(0.9551 0 0)";
|
|
47
|
+
readonly muted: "oklch(0.29 0.02 131)";
|
|
48
|
+
readonly mutedForeground: "oklch(0.7058 0 0)";
|
|
49
|
+
readonly accent: "oklch(0.28 0.05 131)";
|
|
50
|
+
readonly accentForeground: "oklch(0.80 0.10 131)";
|
|
51
|
+
readonly destructive: "oklch(0.7106 0.1661 22.2162)";
|
|
52
|
+
readonly destructiveForeground: "oklch(1.0000 0 0)";
|
|
53
|
+
readonly border: "oklch(0.33 0.02 131)";
|
|
54
|
+
readonly input: "oklch(0.33 0.02 131)";
|
|
55
|
+
readonly ring: "oklch(0.65 0.20 131)";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const chartTokens: {
|
|
59
|
+
readonly light: {
|
|
60
|
+
readonly chart1: "oklch(0.7459 0.1483 156.4499)";
|
|
61
|
+
readonly chart2: "oklch(0.55 0.20 131)";
|
|
62
|
+
readonly chart3: "oklch(0.7336 0.1758 50.5517)";
|
|
63
|
+
readonly chart4: "oklch(0.5828 0.1809 131)";
|
|
64
|
+
readonly chart5: "oklch(0.5590 0 0)";
|
|
65
|
+
};
|
|
66
|
+
readonly dark: {
|
|
67
|
+
readonly chart1: "oklch(0.8003 0.1821 151.7110)";
|
|
68
|
+
readonly chart2: "oklch(0.65 0.20 131)";
|
|
69
|
+
readonly chart3: "oklch(0.8077 0.1035 19.5706)";
|
|
70
|
+
readonly chart4: "oklch(0.6691 0.1569 131)";
|
|
71
|
+
readonly chart5: "oklch(0.7058 0 0)";
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export declare const radiusTokens: {
|
|
75
|
+
readonly base: "1.4rem";
|
|
76
|
+
readonly sm: "calc(1.4rem - 4px)";
|
|
77
|
+
readonly md: "calc(1.4rem - 2px)";
|
|
78
|
+
readonly lg: "1.4rem";
|
|
79
|
+
readonly xl: "calc(1.4rem + 4px)";
|
|
80
|
+
};
|
|
81
|
+
export declare const shadowTokens: {
|
|
82
|
+
readonly '2xs': "0px 2px 3px 0px hsl(0 0% 0% / 0.08)";
|
|
83
|
+
readonly xs: "0px 2px 3px 0px hsl(0 0% 0% / 0.08)";
|
|
84
|
+
readonly sm: "0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16)";
|
|
85
|
+
readonly base: "0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16)";
|
|
86
|
+
readonly md: "0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 2px 4px -1px hsl(0 0% 0% / 0.16)";
|
|
87
|
+
readonly lg: "0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 4px 6px -1px hsl(0 0% 0% / 0.16)";
|
|
88
|
+
readonly xl: "0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 8px 10px -1px hsl(0 0% 0% / 0.16)";
|
|
89
|
+
readonly '2xl': "0px 2px 3px 0px hsl(0 0% 0% / 0.40)";
|
|
90
|
+
};
|
|
91
|
+
export declare const fontTokens: {
|
|
92
|
+
readonly sans: "Inter, sans-serif";
|
|
93
|
+
readonly serif: "Lora, serif";
|
|
94
|
+
readonly mono: "IBM Plex Mono, monospace";
|
|
95
|
+
};
|
|
96
|
+
export declare const trackingTokens: {
|
|
97
|
+
readonly normal: "-0.025em";
|
|
98
|
+
};
|
|
99
|
+
export declare const themeConfig: {
|
|
100
|
+
readonly colors: {
|
|
101
|
+
readonly light: {
|
|
102
|
+
readonly background: "oklch(0.9940 0 0)";
|
|
103
|
+
readonly foreground: "oklch(0 0 0)";
|
|
104
|
+
readonly card: "oklch(0.9940 0 0)";
|
|
105
|
+
readonly cardForeground: "oklch(0 0 0)";
|
|
106
|
+
readonly popover: "oklch(0.9911 0 0)";
|
|
107
|
+
readonly popoverForeground: "oklch(0 0 0)";
|
|
108
|
+
readonly primary: "oklch(0.55 0.20 131)";
|
|
109
|
+
readonly primaryForeground: "oklch(1.0000 0 0)";
|
|
110
|
+
readonly secondary: "oklch(0.9540 0.0063 131)";
|
|
111
|
+
readonly secondaryForeground: "oklch(0.1344 0 0)";
|
|
112
|
+
readonly muted: "oklch(0.9702 0 0)";
|
|
113
|
+
readonly mutedForeground: "oklch(0.4386 0 0)";
|
|
114
|
+
readonly accent: "oklch(0.94 0.03 131)";
|
|
115
|
+
readonly accentForeground: "oklch(0.5445 0.1903 131)";
|
|
116
|
+
readonly destructive: "oklch(0.6290 0.1902 23.0704)";
|
|
117
|
+
readonly destructiveForeground: "oklch(1.0000 0 0)";
|
|
118
|
+
readonly border: "oklch(0.9300 0.0094 131)";
|
|
119
|
+
readonly input: "oklch(0.9401 0 0)";
|
|
120
|
+
readonly ring: "oklch(0 0 0)";
|
|
121
|
+
};
|
|
122
|
+
readonly dark: {
|
|
123
|
+
readonly background: "oklch(0.22 0.01 131)";
|
|
124
|
+
readonly foreground: "oklch(0.9551 0 0)";
|
|
125
|
+
readonly card: "oklch(0.24 0.01 131)";
|
|
126
|
+
readonly cardForeground: "oklch(0.9551 0 0)";
|
|
127
|
+
readonly popover: "oklch(0.24 0.01 131)";
|
|
128
|
+
readonly popoverForeground: "oklch(0.9551 0 0)";
|
|
129
|
+
readonly primary: "oklch(0.65 0.20 131)";
|
|
130
|
+
readonly primaryForeground: "oklch(1.0000 0 0)";
|
|
131
|
+
readonly secondary: "oklch(0.29 0.02 131)";
|
|
132
|
+
readonly secondaryForeground: "oklch(0.9551 0 0)";
|
|
133
|
+
readonly muted: "oklch(0.29 0.02 131)";
|
|
134
|
+
readonly mutedForeground: "oklch(0.7058 0 0)";
|
|
135
|
+
readonly accent: "oklch(0.28 0.05 131)";
|
|
136
|
+
readonly accentForeground: "oklch(0.80 0.10 131)";
|
|
137
|
+
readonly destructive: "oklch(0.7106 0.1661 22.2162)";
|
|
138
|
+
readonly destructiveForeground: "oklch(1.0000 0 0)";
|
|
139
|
+
readonly border: "oklch(0.33 0.02 131)";
|
|
140
|
+
readonly input: "oklch(0.33 0.02 131)";
|
|
141
|
+
readonly ring: "oklch(0.65 0.20 131)";
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
readonly charts: {
|
|
145
|
+
readonly light: {
|
|
146
|
+
readonly chart1: "oklch(0.7459 0.1483 156.4499)";
|
|
147
|
+
readonly chart2: "oklch(0.55 0.20 131)";
|
|
148
|
+
readonly chart3: "oklch(0.7336 0.1758 50.5517)";
|
|
149
|
+
readonly chart4: "oklch(0.5828 0.1809 131)";
|
|
150
|
+
readonly chart5: "oklch(0.5590 0 0)";
|
|
151
|
+
};
|
|
152
|
+
readonly dark: {
|
|
153
|
+
readonly chart1: "oklch(0.8003 0.1821 151.7110)";
|
|
154
|
+
readonly chart2: "oklch(0.65 0.20 131)";
|
|
155
|
+
readonly chart3: "oklch(0.8077 0.1035 19.5706)";
|
|
156
|
+
readonly chart4: "oklch(0.6691 0.1569 131)";
|
|
157
|
+
readonly chart5: "oklch(0.7058 0 0)";
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
readonly radius: {
|
|
161
|
+
readonly base: "1.4rem";
|
|
162
|
+
readonly sm: "calc(1.4rem - 4px)";
|
|
163
|
+
readonly md: "calc(1.4rem - 2px)";
|
|
164
|
+
readonly lg: "1.4rem";
|
|
165
|
+
readonly xl: "calc(1.4rem + 4px)";
|
|
166
|
+
};
|
|
167
|
+
readonly shadows: {
|
|
168
|
+
readonly '2xs': "0px 2px 3px 0px hsl(0 0% 0% / 0.08)";
|
|
169
|
+
readonly xs: "0px 2px 3px 0px hsl(0 0% 0% / 0.08)";
|
|
170
|
+
readonly sm: "0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16)";
|
|
171
|
+
readonly base: "0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16)";
|
|
172
|
+
readonly md: "0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 2px 4px -1px hsl(0 0% 0% / 0.16)";
|
|
173
|
+
readonly lg: "0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 4px 6px -1px hsl(0 0% 0% / 0.16)";
|
|
174
|
+
readonly xl: "0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 8px 10px -1px hsl(0 0% 0% / 0.16)";
|
|
175
|
+
readonly '2xl': "0px 2px 3px 0px hsl(0 0% 0% / 0.40)";
|
|
176
|
+
};
|
|
177
|
+
readonly fonts: {
|
|
178
|
+
readonly sans: "Inter, sans-serif";
|
|
179
|
+
readonly serif: "Lora, serif";
|
|
180
|
+
readonly mono: "IBM Plex Mono, monospace";
|
|
181
|
+
};
|
|
182
|
+
readonly tracking: {
|
|
183
|
+
readonly normal: "-0.025em";
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
export type ThemeConfig = typeof themeConfig;
|
|
187
|
+
//# sourceMappingURL=preset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../src/preset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Cd,CAAA;AAEV,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;CAed,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;CAMf,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;CASf,CAAA;AAEV,eAAO,MAAM,UAAU;;;;CAIb,CAAA;AAEV,eAAO,MAAM,cAAc;;CAEjB,CAAA;AAEV,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOd,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAA"}
|
package/dist/preset.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metacore theme preset.
|
|
3
|
+
*
|
|
4
|
+
* The canonical source for Tailwind 4 design tokens lives in CSS
|
|
5
|
+
* (`@asteby/metacore-theme/tokens.css` and `/index.css`). Tailwind 4 does
|
|
6
|
+
* not use JS presets the way v3 did — consumers should import the CSS
|
|
7
|
+
* entry directly via `@import '@asteby/metacore-theme/index.css'` or
|
|
8
|
+
* `@import '@asteby/metacore-theme/tokens.css'`.
|
|
9
|
+
*
|
|
10
|
+
* This module exposes the same tokens as plain JS objects for cases where
|
|
11
|
+
* a JS/TS consumer needs programmatic access (e.g., Storybook theming,
|
|
12
|
+
* charting libraries, PDF generators).
|
|
13
|
+
*/
|
|
14
|
+
export const colorTokens = {
|
|
15
|
+
light: {
|
|
16
|
+
background: 'oklch(0.9940 0 0)',
|
|
17
|
+
foreground: 'oklch(0 0 0)',
|
|
18
|
+
card: 'oklch(0.9940 0 0)',
|
|
19
|
+
cardForeground: 'oklch(0 0 0)',
|
|
20
|
+
popover: 'oklch(0.9911 0 0)',
|
|
21
|
+
popoverForeground: 'oklch(0 0 0)',
|
|
22
|
+
primary: 'oklch(0.55 0.20 131)',
|
|
23
|
+
primaryForeground: 'oklch(1.0000 0 0)',
|
|
24
|
+
secondary: 'oklch(0.9540 0.0063 131)',
|
|
25
|
+
secondaryForeground: 'oklch(0.1344 0 0)',
|
|
26
|
+
muted: 'oklch(0.9702 0 0)',
|
|
27
|
+
mutedForeground: 'oklch(0.4386 0 0)',
|
|
28
|
+
accent: 'oklch(0.94 0.03 131)',
|
|
29
|
+
accentForeground: 'oklch(0.5445 0.1903 131)',
|
|
30
|
+
destructive: 'oklch(0.6290 0.1902 23.0704)',
|
|
31
|
+
destructiveForeground: 'oklch(1.0000 0 0)',
|
|
32
|
+
border: 'oklch(0.9300 0.0094 131)',
|
|
33
|
+
input: 'oklch(0.9401 0 0)',
|
|
34
|
+
ring: 'oklch(0 0 0)',
|
|
35
|
+
},
|
|
36
|
+
dark: {
|
|
37
|
+
background: 'oklch(0.22 0.01 131)',
|
|
38
|
+
foreground: 'oklch(0.9551 0 0)',
|
|
39
|
+
card: 'oklch(0.24 0.01 131)',
|
|
40
|
+
cardForeground: 'oklch(0.9551 0 0)',
|
|
41
|
+
popover: 'oklch(0.24 0.01 131)',
|
|
42
|
+
popoverForeground: 'oklch(0.9551 0 0)',
|
|
43
|
+
primary: 'oklch(0.65 0.20 131)',
|
|
44
|
+
primaryForeground: 'oklch(1.0000 0 0)',
|
|
45
|
+
secondary: 'oklch(0.29 0.02 131)',
|
|
46
|
+
secondaryForeground: 'oklch(0.9551 0 0)',
|
|
47
|
+
muted: 'oklch(0.29 0.02 131)',
|
|
48
|
+
mutedForeground: 'oklch(0.7058 0 0)',
|
|
49
|
+
accent: 'oklch(0.28 0.05 131)',
|
|
50
|
+
accentForeground: 'oklch(0.80 0.10 131)',
|
|
51
|
+
destructive: 'oklch(0.7106 0.1661 22.2162)',
|
|
52
|
+
destructiveForeground: 'oklch(1.0000 0 0)',
|
|
53
|
+
border: 'oklch(0.33 0.02 131)',
|
|
54
|
+
input: 'oklch(0.33 0.02 131)',
|
|
55
|
+
ring: 'oklch(0.65 0.20 131)',
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
export const chartTokens = {
|
|
59
|
+
light: {
|
|
60
|
+
chart1: 'oklch(0.7459 0.1483 156.4499)',
|
|
61
|
+
chart2: 'oklch(0.55 0.20 131)',
|
|
62
|
+
chart3: 'oklch(0.7336 0.1758 50.5517)',
|
|
63
|
+
chart4: 'oklch(0.5828 0.1809 131)',
|
|
64
|
+
chart5: 'oklch(0.5590 0 0)',
|
|
65
|
+
},
|
|
66
|
+
dark: {
|
|
67
|
+
chart1: 'oklch(0.8003 0.1821 151.7110)',
|
|
68
|
+
chart2: 'oklch(0.65 0.20 131)',
|
|
69
|
+
chart3: 'oklch(0.8077 0.1035 19.5706)',
|
|
70
|
+
chart4: 'oklch(0.6691 0.1569 131)',
|
|
71
|
+
chart5: 'oklch(0.7058 0 0)',
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
export const radiusTokens = {
|
|
75
|
+
base: '1.4rem',
|
|
76
|
+
sm: 'calc(1.4rem - 4px)',
|
|
77
|
+
md: 'calc(1.4rem - 2px)',
|
|
78
|
+
lg: '1.4rem',
|
|
79
|
+
xl: 'calc(1.4rem + 4px)',
|
|
80
|
+
};
|
|
81
|
+
export const shadowTokens = {
|
|
82
|
+
'2xs': '0px 2px 3px 0px hsl(0 0% 0% / 0.08)',
|
|
83
|
+
xs: '0px 2px 3px 0px hsl(0 0% 0% / 0.08)',
|
|
84
|
+
sm: '0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16)',
|
|
85
|
+
base: '0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16)',
|
|
86
|
+
md: '0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 2px 4px -1px hsl(0 0% 0% / 0.16)',
|
|
87
|
+
lg: '0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 4px 6px -1px hsl(0 0% 0% / 0.16)',
|
|
88
|
+
xl: '0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 8px 10px -1px hsl(0 0% 0% / 0.16)',
|
|
89
|
+
'2xl': '0px 2px 3px 0px hsl(0 0% 0% / 0.40)',
|
|
90
|
+
};
|
|
91
|
+
export const fontTokens = {
|
|
92
|
+
sans: 'Inter, sans-serif',
|
|
93
|
+
serif: 'Lora, serif',
|
|
94
|
+
mono: 'IBM Plex Mono, monospace',
|
|
95
|
+
};
|
|
96
|
+
export const trackingTokens = {
|
|
97
|
+
normal: '-0.025em',
|
|
98
|
+
};
|
|
99
|
+
export const themeConfig = {
|
|
100
|
+
colors: colorTokens,
|
|
101
|
+
charts: chartTokens,
|
|
102
|
+
radius: radiusTokens,
|
|
103
|
+
shadows: shadowTokens,
|
|
104
|
+
fonts: fontTokens,
|
|
105
|
+
tracking: trackingTokens,
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=preset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.js","sourceRoot":"","sources":["../src/preset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE;QACL,UAAU,EAAE,mBAAmB;QAC/B,UAAU,EAAE,cAAc;QAC1B,IAAI,EAAE,mBAAmB;QACzB,cAAc,EAAE,cAAc;QAC9B,OAAO,EAAE,mBAAmB;QAC5B,iBAAiB,EAAE,cAAc;QACjC,OAAO,EAAE,sBAAsB;QAC/B,iBAAiB,EAAE,mBAAmB;QACtC,SAAS,EAAE,0BAA0B;QACrC,mBAAmB,EAAE,mBAAmB;QACxC,KAAK,EAAE,mBAAmB;QAC1B,eAAe,EAAE,mBAAmB;QACpC,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EAAE,0BAA0B;QAC5C,WAAW,EAAE,8BAA8B;QAC3C,qBAAqB,EAAE,mBAAmB;QAC1C,MAAM,EAAE,0BAA0B;QAClC,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,cAAc;KACrB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,sBAAsB;QAClC,UAAU,EAAE,mBAAmB;QAC/B,IAAI,EAAE,sBAAsB;QAC5B,cAAc,EAAE,mBAAmB;QACnC,OAAO,EAAE,sBAAsB;QAC/B,iBAAiB,EAAE,mBAAmB;QACtC,OAAO,EAAE,sBAAsB;QAC/B,iBAAiB,EAAE,mBAAmB;QACtC,SAAS,EAAE,sBAAsB;QACjC,mBAAmB,EAAE,mBAAmB;QACxC,KAAK,EAAE,sBAAsB;QAC7B,eAAe,EAAE,mBAAmB;QACpC,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EAAE,sBAAsB;QACxC,WAAW,EAAE,8BAA8B;QAC3C,qBAAqB,EAAE,mBAAmB;QAC1C,MAAM,EAAE,sBAAsB;QAC9B,KAAK,EAAE,sBAAsB;QAC7B,IAAI,EAAE,sBAAsB;KAC7B;CACO,CAAA;AAEV,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE;QACL,MAAM,EAAE,+BAA+B;QACvC,MAAM,EAAE,sBAAsB;QAC9B,MAAM,EAAE,8BAA8B;QACtC,MAAM,EAAE,0BAA0B;QAClC,MAAM,EAAE,mBAAmB;KAC5B;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,+BAA+B;QACvC,MAAM,EAAE,sBAAsB;QAC9B,MAAM,EAAE,8BAA8B;QACtC,MAAM,EAAE,0BAA0B;QAClC,MAAM,EAAE,mBAAmB;KAC5B;CACO,CAAA;AAEV,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,QAAQ;IACd,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,oBAAoB;CAChB,CAAA;AAEV,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,qCAAqC;IAC5C,EAAE,EAAE,qCAAqC;IACzC,EAAE,EAAE,2EAA2E;IAC/E,IAAI,EAAE,2EAA2E;IACjF,EAAE,EAAE,2EAA2E;IAC/E,EAAE,EAAE,2EAA2E;IAC/E,EAAE,EAAE,4EAA4E;IAChF,KAAK,EAAE,qCAAqC;CACpC,CAAA;AAEV,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,aAAa;IACpB,IAAI,EAAE,0BAA0B;CACxB,CAAA;AAEV,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,UAAU;CACV,CAAA;AAEV,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,UAAU;IACjB,QAAQ,EAAE,cAAc;CAChB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type Theme = 'dark' | 'light' | 'system';
|
|
2
|
+
type ResolvedTheme = Exclude<Theme, 'system'>;
|
|
3
|
+
export type ThemeProviderProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
defaultTheme?: Theme;
|
|
6
|
+
storageKey?: string;
|
|
7
|
+
};
|
|
8
|
+
export type ThemeProviderState = {
|
|
9
|
+
defaultTheme: Theme;
|
|
10
|
+
resolvedTheme: ResolvedTheme;
|
|
11
|
+
theme: Theme;
|
|
12
|
+
setTheme: (theme: Theme) => void;
|
|
13
|
+
resetTheme: () => void;
|
|
14
|
+
};
|
|
15
|
+
export declare function ThemeProvider({ children, defaultTheme, storageKey, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function useTheme(): ThemeProviderState;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AACxC,KAAK,aAAa,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AAM7C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,KAAK,CAAA;IACnB,aAAa,EAAE,aAAa,CAAA;IAC5B,KAAK,EAAE,KAAK,CAAA;IACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AAgCD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAA4B,EAC5B,UAAgC,GACjC,EAAE,kBAAkB,2CAuDpB;AAGD,wBAAgB,QAAQ,IAAI,kBAAkB,CAI7C"}
|
package/dist/provider.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
const DEFAULT_THEME = 'system';
|
|
4
|
+
const DEFAULT_STORAGE_KEY = 'metacore-ui-theme';
|
|
5
|
+
const THEME_COOKIE_MAX_AGE = 60 * 60 * 24 * 365;
|
|
6
|
+
const initialState = {
|
|
7
|
+
defaultTheme: DEFAULT_THEME,
|
|
8
|
+
resolvedTheme: 'light',
|
|
9
|
+
theme: DEFAULT_THEME,
|
|
10
|
+
setTheme: () => null,
|
|
11
|
+
resetTheme: () => null,
|
|
12
|
+
};
|
|
13
|
+
const ThemeContext = createContext(initialState);
|
|
14
|
+
function readCookie(name) {
|
|
15
|
+
if (typeof document === 'undefined')
|
|
16
|
+
return undefined;
|
|
17
|
+
const match = document.cookie
|
|
18
|
+
.split('; ')
|
|
19
|
+
.find((row) => row.startsWith(`${encodeURIComponent(name)}=`));
|
|
20
|
+
if (!match)
|
|
21
|
+
return undefined;
|
|
22
|
+
const value = match.split('=')[1];
|
|
23
|
+
return value ? decodeURIComponent(value) : undefined;
|
|
24
|
+
}
|
|
25
|
+
function writeCookie(name, value, maxAge) {
|
|
26
|
+
if (typeof document === 'undefined')
|
|
27
|
+
return;
|
|
28
|
+
document.cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)}; path=/; max-age=${maxAge}; SameSite=Lax`;
|
|
29
|
+
}
|
|
30
|
+
function clearCookie(name) {
|
|
31
|
+
if (typeof document === 'undefined')
|
|
32
|
+
return;
|
|
33
|
+
document.cookie = `${encodeURIComponent(name)}=; path=/; max-age=0; SameSite=Lax`;
|
|
34
|
+
}
|
|
35
|
+
export function ThemeProvider({ children, defaultTheme = DEFAULT_THEME, storageKey = DEFAULT_STORAGE_KEY, }) {
|
|
36
|
+
const [theme, _setTheme] = useState(() => readCookie(storageKey) || defaultTheme);
|
|
37
|
+
const resolvedTheme = useMemo(() => {
|
|
38
|
+
if (theme === 'system') {
|
|
39
|
+
if (typeof window === 'undefined')
|
|
40
|
+
return 'light';
|
|
41
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
42
|
+
? 'dark'
|
|
43
|
+
: 'light';
|
|
44
|
+
}
|
|
45
|
+
return theme;
|
|
46
|
+
}, [theme]);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (typeof window === 'undefined')
|
|
49
|
+
return;
|
|
50
|
+
const root = window.document.documentElement;
|
|
51
|
+
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
52
|
+
const applyTheme = (current) => {
|
|
53
|
+
root.classList.remove('light', 'dark');
|
|
54
|
+
root.classList.add(current);
|
|
55
|
+
};
|
|
56
|
+
const handleChange = () => {
|
|
57
|
+
if (theme === 'system') {
|
|
58
|
+
applyTheme(mediaQuery.matches ? 'dark' : 'light');
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
applyTheme(resolvedTheme);
|
|
62
|
+
mediaQuery.addEventListener('change', handleChange);
|
|
63
|
+
return () => mediaQuery.removeEventListener('change', handleChange);
|
|
64
|
+
}, [theme, resolvedTheme]);
|
|
65
|
+
const setTheme = (next) => {
|
|
66
|
+
writeCookie(storageKey, next, THEME_COOKIE_MAX_AGE);
|
|
67
|
+
_setTheme(next);
|
|
68
|
+
};
|
|
69
|
+
const resetTheme = () => {
|
|
70
|
+
clearCookie(storageKey);
|
|
71
|
+
_setTheme(defaultTheme);
|
|
72
|
+
};
|
|
73
|
+
const value = {
|
|
74
|
+
defaultTheme,
|
|
75
|
+
resolvedTheme,
|
|
76
|
+
theme,
|
|
77
|
+
setTheme,
|
|
78
|
+
resetTheme,
|
|
79
|
+
};
|
|
80
|
+
return _jsx(ThemeContext.Provider, { value: value, children: children });
|
|
81
|
+
}
|
|
82
|
+
// eslint-disable-next-line react-refresh/only-export-components
|
|
83
|
+
export function useTheme() {
|
|
84
|
+
const ctx = useContext(ThemeContext);
|
|
85
|
+
if (!ctx)
|
|
86
|
+
throw new Error('useTheme must be used within a ThemeProvider');
|
|
87
|
+
return ctx;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@asteby/metacore-theme",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Metacore design tokens + Tailwind 4 preset (oklch, shadows, fonts, dark mode)",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/asteby/metacore-sdk",
|
|
9
|
+
"directory": "packages/theme"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"styles",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./tokens.css": "./styles/tokens.css",
|
|
25
|
+
"./index.css": "./styles/index.css",
|
|
26
|
+
"./fonts": {
|
|
27
|
+
"types": "./dist/fonts.d.ts",
|
|
28
|
+
"import": "./dist/fonts.js"
|
|
29
|
+
},
|
|
30
|
+
"./preset": {
|
|
31
|
+
"types": "./dist/preset.d.ts",
|
|
32
|
+
"import": "./dist/preset.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"tailwindcss": ">=4",
|
|
37
|
+
"react": ">=18",
|
|
38
|
+
"react-dom": ">=18"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"tw-animate-css": "^1.4.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/react": "^19.0.0",
|
|
45
|
+
"@types/react-dom": "^19.0.0",
|
|
46
|
+
"react": "^19.2.4",
|
|
47
|
+
"react-dom": "^19.2.4",
|
|
48
|
+
"typescript": "^5.6.0"
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsc -p tsconfig.json",
|
|
55
|
+
"dev": "tsc -w -p tsconfig.json",
|
|
56
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
57
|
+
"clean": "rm -rf dist"
|
|
58
|
+
}
|
|
59
|
+
}
|
package/styles/index.css
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
@import 'tw-animate-css';
|
|
3
|
+
@import './tokens.css';
|
|
4
|
+
|
|
5
|
+
@custom-variant dark (&:is(.dark *));
|
|
6
|
+
|
|
7
|
+
@layer base {
|
|
8
|
+
* {
|
|
9
|
+
@apply border-border outline-ring/50;
|
|
10
|
+
scrollbar-width: thin;
|
|
11
|
+
scrollbar-color: var(--border) transparent;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
html {
|
|
15
|
+
@apply overflow-x-hidden;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
body {
|
|
19
|
+
@apply bg-background text-foreground has-[div[data-variant='inset']]:bg-sidebar min-h-svh w-full;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Override Radix scroll locking for sticky headers */
|
|
23
|
+
body[data-scroll-locked] {
|
|
24
|
+
overflow: unset !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Cursor pointer for buttons */
|
|
28
|
+
button:not(:disabled),
|
|
29
|
+
[role='button']:not(:disabled) {
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Prevent focus zoom on mobile devices */
|
|
34
|
+
@media screen and (max-width: 767px) {
|
|
35
|
+
|
|
36
|
+
input,
|
|
37
|
+
select,
|
|
38
|
+
textarea {
|
|
39
|
+
font-size: 16px !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@utility container {
|
|
45
|
+
margin-inline: auto;
|
|
46
|
+
padding-inline: 2rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@utility no-scrollbar {
|
|
50
|
+
|
|
51
|
+
/* Hide scrollbar for Chrome, Safari and Opera */
|
|
52
|
+
&::-webkit-scrollbar {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Hide scrollbar for IE, Edge and Firefox */
|
|
57
|
+
-ms-overflow-style: none;
|
|
58
|
+
/* IE and Edge */
|
|
59
|
+
scrollbar-width: none;
|
|
60
|
+
/* Firefox */
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@utility faded-bottom {
|
|
64
|
+
@apply after:pointer-events-none after:absolute after:start-0 after:bottom-0 after:hidden after:h-32 after:w-full after:rounded-b-2xl after:bg-[linear-gradient(180deg,_transparent_10%,_var(--background)_70%)] md:after:block;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* styles.css */
|
|
68
|
+
.CollapsibleContent {
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.CollapsibleContent[data-state='open'] {
|
|
73
|
+
animation: slideDown 300ms ease-out;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.CollapsibleContent[data-state='closed'] {
|
|
77
|
+
animation: slideUp 300ms ease-out;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@keyframes slideDown {
|
|
81
|
+
from {
|
|
82
|
+
height: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
to {
|
|
86
|
+
height: var(--radix-collapsible-content-height);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@keyframes slideUp {
|
|
91
|
+
from {
|
|
92
|
+
height: var(--radix-collapsible-content-height);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
to {
|
|
96
|
+
height: 0;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@theme {
|
|
101
|
+
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
102
|
+
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
103
|
+
|
|
104
|
+
@keyframes accordion-down {
|
|
105
|
+
from {
|
|
106
|
+
height: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
to {
|
|
110
|
+
height: var(--radix-accordion-content-height);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@keyframes accordion-up {
|
|
115
|
+
from {
|
|
116
|
+
height: var(--radix-accordion-content-height);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
to {
|
|
120
|
+
height: 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--background: oklch(0.9940 0 0);
|
|
3
|
+
--foreground: oklch(0 0 0);
|
|
4
|
+
--card: oklch(0.9940 0 0);
|
|
5
|
+
--card-foreground: oklch(0 0 0);
|
|
6
|
+
--popover: oklch(0.9911 0 0);
|
|
7
|
+
--popover-foreground: oklch(0 0 0);
|
|
8
|
+
--primary: oklch(0.55 0.14 175);
|
|
9
|
+
--primary-foreground: oklch(1.0000 0 0);
|
|
10
|
+
--secondary: oklch(0.9540 0.0063 175);
|
|
11
|
+
--secondary-foreground: oklch(0.1344 0 0);
|
|
12
|
+
--muted: oklch(0.9702 0 0);
|
|
13
|
+
--muted-foreground: oklch(0.4386 0 0);
|
|
14
|
+
--accent: oklch(0.94 0.03 175);
|
|
15
|
+
--accent-foreground: oklch(0.5445 0.12 175);
|
|
16
|
+
--destructive: oklch(0.6290 0.1902 23.0704);
|
|
17
|
+
--destructive-foreground: oklch(1.0000 0 0);
|
|
18
|
+
--border: oklch(0.9300 0.0094 175);
|
|
19
|
+
--input: oklch(0.9401 0 0);
|
|
20
|
+
--ring: oklch(0 0 0);
|
|
21
|
+
--chart-1: oklch(0.7459 0.1483 156.4499);
|
|
22
|
+
--chart-2: oklch(0.55 0.14 175);
|
|
23
|
+
--chart-3: oklch(0.7336 0.1758 50.5517);
|
|
24
|
+
--chart-4: oklch(0.5828 0.12 175);
|
|
25
|
+
--chart-5: oklch(0.5590 0 0);
|
|
26
|
+
--sidebar: oklch(0.9777 0.0051 175);
|
|
27
|
+
--sidebar-foreground: oklch(0 0 0);
|
|
28
|
+
--sidebar-primary: oklch(0 0 0);
|
|
29
|
+
--sidebar-primary-foreground: oklch(1.0000 0 0);
|
|
30
|
+
--sidebar-accent: oklch(0.9401 0 0);
|
|
31
|
+
--sidebar-accent-foreground: oklch(0 0 0);
|
|
32
|
+
--sidebar-border: oklch(0.9401 0 0);
|
|
33
|
+
--sidebar-ring: oklch(0 0 0);
|
|
34
|
+
--font-sans: Inter, sans-serif;
|
|
35
|
+
--font-serif: Lora, serif;
|
|
36
|
+
--font-mono: IBM Plex Mono, monospace;
|
|
37
|
+
--radius: 1.4rem;
|
|
38
|
+
--shadow-x: 0px;
|
|
39
|
+
--shadow-y: 2px;
|
|
40
|
+
--shadow-blur: 3px;
|
|
41
|
+
--shadow-spread: 0px;
|
|
42
|
+
--shadow-opacity: 0.16;
|
|
43
|
+
--shadow-color: hsl(0 0% 0%);
|
|
44
|
+
--shadow-2xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);
|
|
45
|
+
--shadow-xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);
|
|
46
|
+
--shadow-sm: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);
|
|
47
|
+
--shadow: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);
|
|
48
|
+
--shadow-md: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 2px 4px -1px hsl(0 0% 0% / 0.16);
|
|
49
|
+
--shadow-lg: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 4px 6px -1px hsl(0 0% 0% / 0.16);
|
|
50
|
+
--shadow-xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 8px 10px -1px hsl(0 0% 0% / 0.16);
|
|
51
|
+
--shadow-2xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.40);
|
|
52
|
+
--tracking-normal: -0.025em;
|
|
53
|
+
--spacing: 0.27rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.dark {
|
|
57
|
+
--background: oklch(0.22 0.01 131);
|
|
58
|
+
--foreground: oklch(0.9551 0 0);
|
|
59
|
+
--card: oklch(0.24 0.01 131);
|
|
60
|
+
--card-foreground: oklch(0.9551 0 0);
|
|
61
|
+
--popover: oklch(0.24 0.01 131);
|
|
62
|
+
--popover-foreground: oklch(0.9551 0 0);
|
|
63
|
+
--primary: oklch(0.65 0.14 175);
|
|
64
|
+
--primary-foreground: oklch(1.0000 0 0);
|
|
65
|
+
--secondary: oklch(0.29 0.02 175);
|
|
66
|
+
--secondary-foreground: oklch(0.9551 0 0);
|
|
67
|
+
--muted: oklch(0.29 0.02 175);
|
|
68
|
+
--muted-foreground: oklch(0.7058 0 0);
|
|
69
|
+
--accent: oklch(0.28 0.05 175);
|
|
70
|
+
--accent-foreground: oklch(0.80 0.10 175);
|
|
71
|
+
--destructive: oklch(0.7106 0.1661 22.2162);
|
|
72
|
+
--destructive-foreground: oklch(1.0000 0 0);
|
|
73
|
+
--border: oklch(0.33 0.02 175);
|
|
74
|
+
--input: oklch(0.33 0.02 175);
|
|
75
|
+
--ring: oklch(0.65 0.14 175);
|
|
76
|
+
--chart-1: oklch(0.8003 0.1821 151.7110);
|
|
77
|
+
--chart-2: oklch(0.65 0.14 175);
|
|
78
|
+
--chart-3: oklch(0.8077 0.1035 19.5706);
|
|
79
|
+
--chart-4: oklch(0.6691 0.10 175);
|
|
80
|
+
--chart-5: oklch(0.7058 0 0);
|
|
81
|
+
--sidebar: oklch(0.20 0.01 131);
|
|
82
|
+
--sidebar-foreground: oklch(0.9551 0 0);
|
|
83
|
+
--sidebar-primary: oklch(0.65 0.14 175);
|
|
84
|
+
--sidebar-primary-foreground: oklch(1.0000 0 0);
|
|
85
|
+
--sidebar-accent: oklch(0.29 0.02 175);
|
|
86
|
+
--sidebar-accent-foreground: oklch(0.65 0.14 175);
|
|
87
|
+
--sidebar-border: oklch(0.33 0.02 175);
|
|
88
|
+
--sidebar-ring: oklch(0.65 0.14 175);
|
|
89
|
+
|
|
90
|
+
--radius: 1.4rem;
|
|
91
|
+
--shadow-x: 0px;
|
|
92
|
+
--shadow-y: 2px;
|
|
93
|
+
--shadow-blur: 3px;
|
|
94
|
+
--shadow-spread: 0px;
|
|
95
|
+
--shadow-opacity: 0.16;
|
|
96
|
+
--shadow-color: hsl(0 0% 0%);
|
|
97
|
+
--shadow-2xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);
|
|
98
|
+
--shadow-xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);
|
|
99
|
+
--shadow-sm: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);
|
|
100
|
+
--shadow: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);
|
|
101
|
+
--shadow-md: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 2px 4px -1px hsl(0 0% 0% / 0.16);
|
|
102
|
+
--shadow-lg: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 4px 6px -1px hsl(0 0% 0% / 0.16);
|
|
103
|
+
--shadow-xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 8px 10px -1px hsl(0 0% 0% / 0.16);
|
|
104
|
+
--shadow-2xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.40);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@theme inline {
|
|
108
|
+
--color-background: var(--background);
|
|
109
|
+
--color-foreground: var(--foreground);
|
|
110
|
+
--color-card: var(--card);
|
|
111
|
+
--color-card-foreground: var(--card-foreground);
|
|
112
|
+
--color-popover: var(--popover);
|
|
113
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
114
|
+
--color-primary: var(--primary);
|
|
115
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
116
|
+
--color-secondary: var(--secondary);
|
|
117
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
118
|
+
--color-muted: var(--muted);
|
|
119
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
120
|
+
--color-accent: var(--accent);
|
|
121
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
122
|
+
--color-destructive: var(--destructive);
|
|
123
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
124
|
+
--color-border: var(--border);
|
|
125
|
+
--color-input: var(--input);
|
|
126
|
+
--color-ring: var(--ring);
|
|
127
|
+
--color-chart-1: var(--chart-1);
|
|
128
|
+
--color-chart-2: var(--chart-2);
|
|
129
|
+
--color-chart-3: var(--chart-3);
|
|
130
|
+
--color-chart-4: var(--chart-4);
|
|
131
|
+
--color-chart-5: var(--chart-5);
|
|
132
|
+
--color-sidebar: var(--sidebar);
|
|
133
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
134
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
135
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
136
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
137
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
138
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
139
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
140
|
+
|
|
141
|
+
--font-sans: var(--font-sans);
|
|
142
|
+
--font-mono: var(--font-mono);
|
|
143
|
+
--font-serif: var(--font-serif);
|
|
144
|
+
|
|
145
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
146
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
147
|
+
--radius-lg: var(--radius);
|
|
148
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
149
|
+
|
|
150
|
+
--shadow-2xs: var(--shadow-2xs);
|
|
151
|
+
--shadow-xs: var(--shadow-xs);
|
|
152
|
+
--shadow-sm: var(--shadow-sm);
|
|
153
|
+
--shadow: var(--shadow);
|
|
154
|
+
--shadow-md: var(--shadow-md);
|
|
155
|
+
--shadow-lg: var(--shadow-lg);
|
|
156
|
+
--shadow-xl: var(--shadow-xl);
|
|
157
|
+
--shadow-2xl: var(--shadow-2xl);
|
|
158
|
+
|
|
159
|
+
--tracking-tighter: calc(var(--tracking-normal) - 0.05em);
|
|
160
|
+
--tracking-tight: calc(var(--tracking-normal) - 0.025em);
|
|
161
|
+
--tracking-normal: var(--tracking-normal);
|
|
162
|
+
--tracking-wide: calc(var(--tracking-normal) + 0.025em);
|
|
163
|
+
--tracking-wider: calc(var(--tracking-normal) + 0.05em);
|
|
164
|
+
--tracking-widest: calc(var(--tracking-normal) + 0.1em);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
body {
|
|
168
|
+
letter-spacing: var(--tracking-normal);
|
|
169
|
+
-webkit-font-smoothing: antialiased;
|
|
170
|
+
-moz-osx-font-smoothing: grayscale;
|
|
171
|
+
}
|