@ndla/preset-panda 0.0.1

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.
@@ -0,0 +1,247 @@
1
+ /**
2
+ * Copyright (c) 2024-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { defineTextStyles, defineTokens } from "@pandacss/dev";
10
+ export const fontWeights = defineTokens.fontWeights({
11
+ light: {
12
+ value: 300
13
+ },
14
+ normal: {
15
+ value: 400
16
+ },
17
+ semibold: {
18
+ value: 600
19
+ },
20
+ bold: {
21
+ value: 700
22
+ }
23
+ });
24
+ export const fonts = defineTokens.fonts({
25
+ sans: {
26
+ value: ["Satoshi", "Helvetica", "Arial", "STKaiti", "'华文楷体'", "KaiTi", "SimKai", "'楷体'", "KaiU", "DFKai-SB", "'標楷體'", "SongTi", "'宋体'", "sans-serif"]
27
+ },
28
+ serif: {
29
+ value: ["'Source Serif Pro'", "Times", "STKaiti", "'华文楷体'", "KaiTi", "SimKai", "'楷体'", "KaiU", "DFKai-SB", "'標楷體'", "SongTi", "'宋体'", "serif"]
30
+ },
31
+ code: {
32
+ value: ["'Source Code ProVariable'", "Monaco"]
33
+ }
34
+ });
35
+ export const fontSizes = defineTokens.fontSizes({
36
+ // 12px
37
+ xxsmall: {
38
+ value: "0.75rem"
39
+ },
40
+ // 14px
41
+ xsmall: {
42
+ value: "0.875rem"
43
+ },
44
+ // 16px
45
+ small: {
46
+ value: "1rem"
47
+ },
48
+ // 18px
49
+ medium: {
50
+ value: "1.125rem"
51
+ },
52
+ // 22px
53
+ large: {
54
+ value: "1.375rem"
55
+ },
56
+ // 26px
57
+ xlarge: {
58
+ value: "1.625rem"
59
+ },
60
+ // 30px
61
+ xxlarge: {
62
+ value: "1.875rem"
63
+ },
64
+ // 38px
65
+ "3xlarge": {
66
+ value: "2.375rem"
67
+ },
68
+ // 48px
69
+ "4xlarge": {
70
+ value: "3rem"
71
+ }
72
+ });
73
+ export const lineHeights = defineTokens.lineHeights({
74
+ xxsmall: {
75
+ value: "0.75rem"
76
+ },
77
+ xsmall: {
78
+ value: "1.375rem"
79
+ },
80
+ small: {
81
+ value: "1.5rem"
82
+ },
83
+ medium: {
84
+ value: "1.75rem"
85
+ },
86
+ large: {
87
+ value: "1.875rem"
88
+ },
89
+ xlarge: {
90
+ value: "2.25rem"
91
+ },
92
+ xxlarge: {
93
+ value: "2.375rem"
94
+ },
95
+ "3xlarge": {
96
+ value: "3rem"
97
+ },
98
+ "4xlarge": {
99
+ value: "3.75rem"
100
+ }
101
+ });
102
+ const sizes = (size, lineHeight) => {
103
+ return {
104
+ fontSize: size,
105
+ lineHeight,
106
+ _chinese: {
107
+ fontSize: "calc(token(fontSizes.".concat(size, ") * 1.11)"),
108
+ lineHeight: "calc(token(lineHeights.".concat(lineHeight, ") * 1.11)")
109
+ }
110
+ };
111
+ };
112
+ export const textStyles = defineTextStyles({
113
+ heading: {
114
+ large: {
115
+ value: {
116
+ fontFamily: "sans",
117
+ fontWeight: "bold",
118
+ ...sizes("4xlarge", "4xlarge")
119
+ }
120
+ },
121
+ medium: {
122
+ value: {
123
+ fontFamily: "sans",
124
+ fontWeight: "bold",
125
+ ...sizes("3xlarge", "3xlarge")
126
+ }
127
+ },
128
+ small: {
129
+ value: {
130
+ fontFamily: "sans",
131
+ fontWeight: "bold",
132
+ ...sizes("xxlarge", "xxlarge")
133
+ }
134
+ }
135
+ },
136
+ title: {
137
+ large: {
138
+ value: {
139
+ fontFamily: "sans",
140
+ fontWeight: "bold",
141
+ ...sizes("xlarge", "xlarge")
142
+ }
143
+ },
144
+ medium: {
145
+ value: {
146
+ fontFamily: "sans",
147
+ fontWeight: "bold",
148
+ ...sizes("large", "large")
149
+ }
150
+ },
151
+ small: {
152
+ value: {
153
+ fontFamily: "sans",
154
+ fontWeight: "bold",
155
+ ...sizes("medium", "small")
156
+ }
157
+ }
158
+ },
159
+ body: {
160
+ article: {
161
+ value: {
162
+ fontFamily: "serif",
163
+ fontWeight: "normal",
164
+ ...sizes("medium", "medium")
165
+ }
166
+ },
167
+ articleLink: {
168
+ value: {
169
+ fontFamily: "serif",
170
+ fontWeight: "normal",
171
+ ...sizes("medium", "medium")
172
+ }
173
+ },
174
+ link: {
175
+ value: {
176
+ fontFamily: "sans",
177
+ fontWeight: "normal",
178
+ ...sizes("medium", "medium")
179
+ }
180
+ },
181
+ xlarge: {
182
+ value: {
183
+ fontFamily: "sans",
184
+ fontWeight: "normal",
185
+ ...sizes("medium", "large")
186
+ }
187
+ },
188
+ large: {
189
+ value: {
190
+ fontFamily: "sans",
191
+ fontWeight: "normal",
192
+ ...sizes("medium", "medium")
193
+ }
194
+ },
195
+ medium: {
196
+ value: {
197
+ fontFamily: "sans",
198
+ fontWeight: "normal",
199
+ ...sizes("small", "small")
200
+ }
201
+ },
202
+ small: {
203
+ value: {
204
+ fontFamily: "sans",
205
+ fontWeight: "normal",
206
+ ...sizes("xsmall", "xsmall")
207
+ }
208
+ }
209
+ },
210
+ label: {
211
+ large: {
212
+ value: {
213
+ fontFamily: "sans",
214
+ fontWeight: "normal",
215
+ ...sizes("medium", "medium")
216
+ },
217
+ strong: {
218
+ value: {
219
+ fontFamily: "sans",
220
+ fontWeight: "bold",
221
+ ...sizes("medium", "medium")
222
+ }
223
+ }
224
+ },
225
+ medium: {
226
+ value: {
227
+ fontFamily: "sans",
228
+ fontWeight: "normal",
229
+ ...sizes("small", "small")
230
+ }
231
+ },
232
+ small: {
233
+ value: {
234
+ fontFamily: "sans",
235
+ fontWeight: "normal",
236
+ ...sizes("xsmall", "xsmall")
237
+ }
238
+ },
239
+ xsmall: {
240
+ value: {
241
+ fontFamily: "sans",
242
+ fontWeight: "normal",
243
+ ...sizes("xxsmall", "xxsmall")
244
+ }
245
+ }
246
+ }
247
+ });
package/es/zIndex.js ADDED
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Copyright (c) 2024-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { defineTokens } from "@pandacss/dev";
10
+ export const zIndex = defineTokens.zIndex({
11
+ hide: {
12
+ value: -1
13
+ },
14
+ base: {
15
+ value: 0
16
+ },
17
+ docked: {
18
+ value: 10
19
+ },
20
+ dropdown: {
21
+ value: 1000
22
+ },
23
+ sticky: {
24
+ value: 1100
25
+ },
26
+ banner: {
27
+ value: 1200
28
+ },
29
+ overlay: {
30
+ value: 1300
31
+ },
32
+ modal: {
33
+ value: 1400
34
+ },
35
+ popover: {
36
+ value: 1500
37
+ },
38
+ skipLink: {
39
+ value: 1600
40
+ },
41
+ toast: {
42
+ value: 1700
43
+ },
44
+ tooltip: {
45
+ value: 1800
46
+ }
47
+ });
@@ -0,0 +1,225 @@
1
+ /**
2
+ * Copyright (c) 2024-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export declare const animations: {
9
+ spin: {
10
+ value: string;
11
+ };
12
+ "collapse-in": {
13
+ value: string;
14
+ };
15
+ "collapse-out": {
16
+ value: string;
17
+ };
18
+ "fade-shift-in": {
19
+ value: string;
20
+ };
21
+ "fade-shift-out": {
22
+ value: string;
23
+ };
24
+ "backdrop-in": {
25
+ value: string;
26
+ };
27
+ "backdrop-out": {
28
+ value: string;
29
+ };
30
+ "dialog-in": {
31
+ value: string;
32
+ };
33
+ "dialog-out": {
34
+ value: string;
35
+ };
36
+ "drawer-in-left": {
37
+ value: string;
38
+ };
39
+ "drawer-out-left": {
40
+ value: string;
41
+ };
42
+ "drawer-in-right": {
43
+ value: string;
44
+ };
45
+ "drawer-out-right": {
46
+ value: string;
47
+ };
48
+ "drawer-in-bottom": {
49
+ value: string;
50
+ };
51
+ "drawer-out-bottom": {
52
+ value: string;
53
+ };
54
+ "drawer-in-top": {
55
+ value: string;
56
+ };
57
+ "drawer-out-top": {
58
+ value: string;
59
+ };
60
+ "skeleton-pulse": {
61
+ value: string;
62
+ };
63
+ };
64
+ export declare const easings: {
65
+ default: {
66
+ value: string;
67
+ };
68
+ "emphasized-in": {
69
+ value: string;
70
+ };
71
+ "emphasized-out": {
72
+ value: string;
73
+ };
74
+ pulse: {
75
+ value: string;
76
+ };
77
+ };
78
+ export declare const durations: {
79
+ superFast: {
80
+ value: string;
81
+ };
82
+ fast: {
83
+ value: string;
84
+ };
85
+ normal: {
86
+ value: string;
87
+ };
88
+ slow: {
89
+ value: string;
90
+ };
91
+ infinite: {
92
+ value: string;
93
+ };
94
+ };
95
+ export declare const keyframes: {
96
+ spin: {
97
+ from: {
98
+ transform: string;
99
+ };
100
+ to: {
101
+ transform: string;
102
+ };
103
+ };
104
+ "fade-shift-in": {
105
+ "0%": {
106
+ opacity: string;
107
+ transform: string;
108
+ };
109
+ "100%": {
110
+ opacity: string;
111
+ transform: string;
112
+ };
113
+ };
114
+ "fade-shift-out": {
115
+ "0%": {
116
+ opacity: string;
117
+ transform: string;
118
+ };
119
+ "100%": {
120
+ opacity: string;
121
+ transform: string;
122
+ };
123
+ };
124
+ "collapse-in": {
125
+ "0%": {
126
+ height: string;
127
+ };
128
+ "100%": {
129
+ height: string;
130
+ };
131
+ };
132
+ "collapse-out": {
133
+ "0%": {
134
+ height: string;
135
+ };
136
+ "100%": {
137
+ height: string;
138
+ };
139
+ };
140
+ "fade-in": {
141
+ from: {
142
+ opacity: string;
143
+ };
144
+ to: {
145
+ opacity: string;
146
+ };
147
+ };
148
+ "fade-out": {
149
+ from: {
150
+ opacity: string;
151
+ };
152
+ to: {
153
+ opacity: string;
154
+ };
155
+ };
156
+ "slide-in-left": {
157
+ "0%": {
158
+ transform: string;
159
+ };
160
+ "100%": {
161
+ transform: string;
162
+ };
163
+ };
164
+ "slide-out-left": {
165
+ "0%": {
166
+ transform: string;
167
+ };
168
+ "100%": {
169
+ transform: string;
170
+ };
171
+ };
172
+ "slide-in-right": {
173
+ "0%": {
174
+ transform: string;
175
+ };
176
+ "100%": {
177
+ transform: string;
178
+ };
179
+ };
180
+ "slide-out-right": {
181
+ "0%": {
182
+ transform: string;
183
+ };
184
+ "100%": {
185
+ transform: string;
186
+ };
187
+ };
188
+ "slide-in-top": {
189
+ "0%": {
190
+ transform: string;
191
+ };
192
+ "100%": {
193
+ transform: string;
194
+ };
195
+ };
196
+ "slide-out-top": {
197
+ "0%": {
198
+ transform: string;
199
+ };
200
+ "100%": {
201
+ transform: string;
202
+ };
203
+ };
204
+ "slide-in-bottom": {
205
+ "0%": {
206
+ transform: string;
207
+ };
208
+ "100%": {
209
+ transform: string;
210
+ };
211
+ };
212
+ "slide-out-bottom": {
213
+ "0%": {
214
+ transform: string;
215
+ };
216
+ "100%": {
217
+ transform: string;
218
+ };
219
+ };
220
+ "skeleton-pulse": {
221
+ "50%": {
222
+ opacity: string;
223
+ };
224
+ };
225
+ };