@arbor-css/core 0.0.74 → 0.0.76
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/dist/cli/run.js +16 -2
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/validate.d.ts +1 -1
- package/dist/cli/validate.d.ts.map +1 -1
- package/dist/cli/validate.js +3 -3
- package/dist/cli/validate.js.map +1 -1
- package/dist/cli/validate.test.js +46 -34
- package/dist/cli/validate.test.js.map +1 -1
- package/dist/getStructuredTokensMap.js +2 -2
- package/dist/getStructuredTokensMap.js.map +1 -1
- package/dist/getStructuredTokensMap.test.js +3 -4
- package/dist/getStructuredTokensMap.test.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/presets/arborPreset/baseModeValues.d.ts +16 -0
- package/dist/presets/arborPreset/baseModeValues.d.ts.map +1 -0
- package/dist/presets/arborPreset/baseModeValues.js +231 -0
- package/dist/presets/arborPreset/baseModeValues.js.map +1 -0
- package/dist/presets/arborPreset/index.d.ts +4 -0
- package/dist/presets/arborPreset/index.d.ts.map +1 -0
- package/dist/presets/arborPreset/index.js +4 -0
- package/dist/presets/arborPreset/index.js.map +1 -0
- package/dist/presets/arborPreset/modeSchema.d.ts +448 -0
- package/dist/presets/arborPreset/modeSchema.d.ts.map +1 -0
- package/dist/presets/arborPreset/modeSchema.js +267 -0
- package/dist/presets/arborPreset/modeSchema.js.map +1 -0
- package/dist/presets/arborPreset/preset.d.ts +470 -0
- package/dist/presets/arborPreset/preset.d.ts.map +1 -0
- package/dist/presets/arborPreset/preset.js +51 -0
- package/dist/presets/arborPreset/preset.js.map +1 -0
- package/dist/presets/basicPreset/commonFunctions.d.ts +13 -0
- package/dist/presets/basicPreset/commonFunctions.d.ts.map +1 -0
- package/dist/presets/basicPreset/commonFunctions.js +19 -0
- package/dist/presets/basicPreset/commonFunctions.js.map +1 -0
- package/dist/presets/basicPreset/functions.d.ts +12 -0
- package/dist/presets/basicPreset/functions.d.ts.map +1 -0
- package/dist/presets/basicPreset/functions.js +52 -0
- package/dist/presets/basicPreset/functions.js.map +1 -0
- package/dist/presets/basicPreset/functions.test.d.ts +2 -0
- package/dist/presets/basicPreset/functions.test.d.ts.map +1 -0
- package/dist/presets/basicPreset/functions.test.js +22 -0
- package/dist/presets/basicPreset/functions.test.js.map +1 -0
- package/dist/presets/basicPreset/index.d.ts +2 -0
- package/dist/presets/basicPreset/index.d.ts.map +1 -0
- package/dist/presets/basicPreset/index.js +2 -0
- package/dist/presets/basicPreset/index.js.map +1 -0
- package/dist/presets/basicPreset/mixins.d.ts +1210 -0
- package/dist/presets/basicPreset/mixins.d.ts.map +1 -0
- package/dist/presets/basicPreset/mixins.js +219 -0
- package/dist/presets/basicPreset/mixins.js.map +1 -0
- package/dist/presets/basicPreset/mixins.test.d.ts +2 -0
- package/dist/presets/basicPreset/mixins.test.d.ts.map +1 -0
- package/dist/presets/basicPreset/mixins.test.js +14 -0
- package/dist/presets/basicPreset/mixins.test.js.map +1 -0
- package/dist/presets/basicPreset/preset.d.ts +1218 -0
- package/dist/presets/basicPreset/preset.d.ts.map +1 -0
- package/dist/presets/basicPreset/preset.js +15 -0
- package/dist/presets/basicPreset/preset.js.map +1 -0
- package/dist/runtime/components/BaseElement.d.ts +1 -1
- package/dist/runtime/components/BaseElement.d.ts.map +1 -1
- package/dist/runtime/components/GlobalsEditor.js +6 -4
- package/dist/runtime/components/GlobalsEditor.js.map +1 -1
- package/dist/runtime/components/ModeSelector.js +3 -1
- package/dist/runtime/components/ModeSelector.js.map +1 -1
- package/dist/runtime/components/SchemeSelector.js +3 -1
- package/dist/runtime/components/SchemeSelector.js.map +1 -1
- package/dist/stylesheet/generateStylesheet.d.ts.map +1 -1
- package/dist/stylesheet/generateStylesheet.js +20 -24
- package/dist/stylesheet/generateStylesheet.js.map +1 -1
- package/dist/stylesheet/modeToCss.d.ts +5 -0
- package/dist/stylesheet/modeToCss.d.ts.map +1 -0
- package/dist/stylesheet/modeToCss.js +93 -0
- package/dist/stylesheet/modeToCss.js.map +1 -0
- package/dist/stylesheet/modeToCss.test.d.ts +2 -0
- package/dist/stylesheet/modeToCss.test.d.ts.map +1 -0
- package/dist/stylesheet/modeToCss.test.js +138 -0
- package/dist/stylesheet/modeToCss.test.js.map +1 -0
- package/dist/util/resolveTokenReferences.d.ts.map +1 -1
- package/dist/util/resolveTokenReferences.js +7 -5
- package/dist/util/resolveTokenReferences.js.map +1 -1
- package/dist/util/resolveTokenReferences.test.js +2 -2
- package/dist/util/resolveTokenReferences.test.js.map +1 -1
- package/package.json +24 -13
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
import { ColorRangeConfig, CompiledColors, SchemeDefinition } from '@arbor-css/colors';
|
|
2
|
+
import { GlobalContextConfig } from '@arbor-css/globals';
|
|
3
|
+
import { ShadowConfig } from '@arbor-css/shadows';
|
|
4
|
+
import { SpacingConfig } from '@arbor-css/spacing';
|
|
5
|
+
import { TypographyConfig } from '@arbor-css/typography';
|
|
6
|
+
export interface ArborPresetConfig<TRanges extends Record<string, ColorRangeConfig<any>>, TSchemes extends Record<string, SchemeDefinition>> {
|
|
7
|
+
config?: GlobalContextConfig;
|
|
8
|
+
color: {
|
|
9
|
+
ranges: TRanges;
|
|
10
|
+
schemes?: TSchemes;
|
|
11
|
+
mainColor: keyof TRanges;
|
|
12
|
+
defaultScheme?: keyof CompiledColors<TRanges, TSchemes>;
|
|
13
|
+
};
|
|
14
|
+
typography?: Omit<TypographyConfig, 'context'>;
|
|
15
|
+
spacing?: Omit<SpacingConfig, 'context'>;
|
|
16
|
+
shadow?: Omit<ShadowConfig, 'context'>;
|
|
17
|
+
easing?: Record<string, string>;
|
|
18
|
+
duration?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Adds opinionated primitive tokens and a full-featured mode
|
|
22
|
+
* schema on top of the basic preset's utility mixins and functions.
|
|
23
|
+
*/
|
|
24
|
+
export declare const presetArbor: <TRanges extends Record<string, ColorRangeConfig<any>>, TSchemes extends Record<string, SchemeDefinition>>(config: ArborPresetConfig<TRanges, TSchemes>) => import("@arbor-css/preset").ArborPreset<Record<never, never> & {
|
|
25
|
+
color: {
|
|
26
|
+
main: {
|
|
27
|
+
$root: {
|
|
28
|
+
purpose: "color";
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
paper: {
|
|
32
|
+
purpose: "color";
|
|
33
|
+
description: "A very light shade, good for backgrounds and surfaces";
|
|
34
|
+
};
|
|
35
|
+
wash: {
|
|
36
|
+
purpose: "color";
|
|
37
|
+
description: "A very faint but colorful shade, good for backgrounds and surfaces";
|
|
38
|
+
};
|
|
39
|
+
light: {
|
|
40
|
+
purpose: "color";
|
|
41
|
+
description: "A light shade of the mode's main color, good for emphasized surfaces.";
|
|
42
|
+
};
|
|
43
|
+
mid: {
|
|
44
|
+
purpose: "color";
|
|
45
|
+
description: "The main shade of the mode's main color, good for primary actions and decoration.";
|
|
46
|
+
};
|
|
47
|
+
heavy: {
|
|
48
|
+
purpose: "color";
|
|
49
|
+
description: "A heavy shade of the mode's main color, good for text emphasis and accents.";
|
|
50
|
+
};
|
|
51
|
+
ink: {
|
|
52
|
+
purpose: "color";
|
|
53
|
+
description: "A very dark but still colorful shade of the mode's main color, good for text and high contrast elements.";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
neutral: {
|
|
57
|
+
$root: {
|
|
58
|
+
purpose: "color";
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
paper: {
|
|
62
|
+
purpose: "color";
|
|
63
|
+
description: "A very light neutral shade, good for backgrounds and surfaces";
|
|
64
|
+
};
|
|
65
|
+
wash: {
|
|
66
|
+
purpose: "color";
|
|
67
|
+
description: "A faint neutral shade, good for backgrounds and surfaces";
|
|
68
|
+
};
|
|
69
|
+
light: {
|
|
70
|
+
purpose: "color";
|
|
71
|
+
description: "A light neutral shade, good for emphasized surfaces";
|
|
72
|
+
};
|
|
73
|
+
mid: {
|
|
74
|
+
purpose: "color";
|
|
75
|
+
description: "The main neutral shade, good for primary actions and decoration";
|
|
76
|
+
};
|
|
77
|
+
heavy: {
|
|
78
|
+
purpose: "color";
|
|
79
|
+
description: "A heavy neutral shade, good for low-emphasis text and accents";
|
|
80
|
+
};
|
|
81
|
+
ink: {
|
|
82
|
+
purpose: "color";
|
|
83
|
+
description: "A very dark neutral shade, good for text and high contrast elements";
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
action: {
|
|
88
|
+
padding: {
|
|
89
|
+
$root: {
|
|
90
|
+
purpose: "other";
|
|
91
|
+
description: string;
|
|
92
|
+
};
|
|
93
|
+
inline: {
|
|
94
|
+
purpose: "spacing";
|
|
95
|
+
description: "Inline (horizontal, usually) padding";
|
|
96
|
+
};
|
|
97
|
+
block: {
|
|
98
|
+
purpose: "spacing";
|
|
99
|
+
description: "Block (vertical, usually) padding";
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
roundness: {
|
|
103
|
+
purpose: "scalar";
|
|
104
|
+
description: "This token controls the overall roundness of actions and stacks with the root roundness token";
|
|
105
|
+
};
|
|
106
|
+
radius: {
|
|
107
|
+
purpose: "border-radius";
|
|
108
|
+
description: "This token captures the border-radius of actions, taking into account the overall roundness";
|
|
109
|
+
};
|
|
110
|
+
primary: {
|
|
111
|
+
fg: {
|
|
112
|
+
purpose: "color";
|
|
113
|
+
description: "Intended for use as the foreground color";
|
|
114
|
+
};
|
|
115
|
+
bg: {
|
|
116
|
+
purpose: "color";
|
|
117
|
+
description: "Intended for use as the background color";
|
|
118
|
+
};
|
|
119
|
+
border: {
|
|
120
|
+
purpose: "color";
|
|
121
|
+
description: "Intended for use as the border color, if desired";
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
secondary: {
|
|
125
|
+
fg: {
|
|
126
|
+
purpose: "color";
|
|
127
|
+
description: "Intended for use as the foreground color";
|
|
128
|
+
};
|
|
129
|
+
bg: {
|
|
130
|
+
purpose: "color";
|
|
131
|
+
description: "Intended for use as the background color";
|
|
132
|
+
};
|
|
133
|
+
border: {
|
|
134
|
+
purpose: "color";
|
|
135
|
+
description: "Intended for use as the border color, if desired";
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
ambient: {
|
|
139
|
+
fg: {
|
|
140
|
+
purpose: "color";
|
|
141
|
+
description: "Intended for use as the foreground color";
|
|
142
|
+
};
|
|
143
|
+
bg: {
|
|
144
|
+
purpose: "color";
|
|
145
|
+
description: "Intended for use as the background color";
|
|
146
|
+
};
|
|
147
|
+
border: {
|
|
148
|
+
purpose: "color";
|
|
149
|
+
description: "Intended for use as the border color, if desired";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
control: {
|
|
154
|
+
fg: {
|
|
155
|
+
purpose: "color";
|
|
156
|
+
description: "Intended for use as the foreground color";
|
|
157
|
+
};
|
|
158
|
+
bg: {
|
|
159
|
+
purpose: "color";
|
|
160
|
+
description: "Intended for use as the background color";
|
|
161
|
+
};
|
|
162
|
+
border: {
|
|
163
|
+
purpose: "color";
|
|
164
|
+
description: "Intended for use as the border color, if desired";
|
|
165
|
+
};
|
|
166
|
+
padding: {
|
|
167
|
+
$root: {
|
|
168
|
+
purpose: "other";
|
|
169
|
+
description: string;
|
|
170
|
+
};
|
|
171
|
+
inline: {
|
|
172
|
+
purpose: "spacing";
|
|
173
|
+
description: "Inline (horizontal, usually) padding";
|
|
174
|
+
};
|
|
175
|
+
block: {
|
|
176
|
+
purpose: "spacing";
|
|
177
|
+
description: "Block (vertical, usually) padding";
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
roundness: {
|
|
181
|
+
purpose: "scalar";
|
|
182
|
+
description: "This token controls the overall roundness of controls and stacks with the root roundness token";
|
|
183
|
+
};
|
|
184
|
+
radius: {
|
|
185
|
+
purpose: "border-radius";
|
|
186
|
+
description: "This token captures the border-radius of controls, taking into account the overall roundness";
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
surface: {
|
|
190
|
+
padding: {
|
|
191
|
+
$root: {
|
|
192
|
+
purpose: "other";
|
|
193
|
+
description: string;
|
|
194
|
+
};
|
|
195
|
+
inline: {
|
|
196
|
+
purpose: "spacing";
|
|
197
|
+
description: "Inline (horizontal, usually) padding";
|
|
198
|
+
};
|
|
199
|
+
block: {
|
|
200
|
+
purpose: "spacing";
|
|
201
|
+
description: "Block (vertical, usually) padding";
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
roundness: {
|
|
205
|
+
purpose: "scalar";
|
|
206
|
+
description: "This token controls the overall roundness of surfaces and stacks with the root roundness token";
|
|
207
|
+
};
|
|
208
|
+
radius: {
|
|
209
|
+
purpose: "border-radius";
|
|
210
|
+
description: "This token captures the border-radius of surfaces, taking into account the overall roundness";
|
|
211
|
+
};
|
|
212
|
+
primary: {
|
|
213
|
+
fg: {
|
|
214
|
+
purpose: "color";
|
|
215
|
+
description: "Intended for use as the foreground color";
|
|
216
|
+
};
|
|
217
|
+
bg: {
|
|
218
|
+
purpose: "color";
|
|
219
|
+
description: "Intended for use as the background color";
|
|
220
|
+
};
|
|
221
|
+
border: {
|
|
222
|
+
purpose: "color";
|
|
223
|
+
description: "Intended for use as the border color, if desired";
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
secondary: {
|
|
227
|
+
fg: {
|
|
228
|
+
purpose: "color";
|
|
229
|
+
description: "Intended for use as the foreground color";
|
|
230
|
+
};
|
|
231
|
+
bg: {
|
|
232
|
+
purpose: "color";
|
|
233
|
+
description: "Intended for use as the background color";
|
|
234
|
+
};
|
|
235
|
+
border: {
|
|
236
|
+
purpose: "color";
|
|
237
|
+
description: "Intended for use as the border color, if desired";
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
ambient: {
|
|
241
|
+
fg: {
|
|
242
|
+
purpose: "color";
|
|
243
|
+
description: "Intended for use as the foreground color";
|
|
244
|
+
};
|
|
245
|
+
bg: {
|
|
246
|
+
purpose: "color";
|
|
247
|
+
description: "Intended for use as the background color";
|
|
248
|
+
};
|
|
249
|
+
border: {
|
|
250
|
+
purpose: "color";
|
|
251
|
+
description: "Intended for use as the border color, if desired";
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
text: {
|
|
256
|
+
primary: {
|
|
257
|
+
size: "font-size";
|
|
258
|
+
weight: "font-weight";
|
|
259
|
+
lineHeight: "line-height";
|
|
260
|
+
font: "font-family";
|
|
261
|
+
};
|
|
262
|
+
secondary: {
|
|
263
|
+
size: "font-size";
|
|
264
|
+
weight: "font-weight";
|
|
265
|
+
lineHeight: "line-height";
|
|
266
|
+
font: "font-family";
|
|
267
|
+
};
|
|
268
|
+
ambient: {
|
|
269
|
+
size: "font-size";
|
|
270
|
+
weight: "font-weight";
|
|
271
|
+
lineHeight: "line-height";
|
|
272
|
+
font: "font-family";
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
density: {
|
|
276
|
+
purpose: "scalar";
|
|
277
|
+
description: "A scaling factor for density. Higher density means smaller, tighter spacing and size";
|
|
278
|
+
};
|
|
279
|
+
spacing: {
|
|
280
|
+
$root: {
|
|
281
|
+
purpose: "spacing";
|
|
282
|
+
description: string;
|
|
283
|
+
};
|
|
284
|
+
xs: "spacing";
|
|
285
|
+
sm: "spacing";
|
|
286
|
+
md: "spacing";
|
|
287
|
+
lg: "spacing";
|
|
288
|
+
xl: "spacing";
|
|
289
|
+
};
|
|
290
|
+
lineWidth: {
|
|
291
|
+
$root: {
|
|
292
|
+
purpose: "border-width";
|
|
293
|
+
description: string;
|
|
294
|
+
};
|
|
295
|
+
sm: {
|
|
296
|
+
purpose: "border-width";
|
|
297
|
+
description: "A hairline border width. Always >= 1px. If the global border width is small, this may be the same as \"md\"";
|
|
298
|
+
};
|
|
299
|
+
md: {
|
|
300
|
+
purpose: "border-width";
|
|
301
|
+
description: "A general-purpose border width";
|
|
302
|
+
};
|
|
303
|
+
lg: {
|
|
304
|
+
purpose: "border-width";
|
|
305
|
+
description: "A thicker border, good for emphasis";
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
radius: {
|
|
309
|
+
$root: {
|
|
310
|
+
purpose: "border-radius";
|
|
311
|
+
description: string;
|
|
312
|
+
};
|
|
313
|
+
xs: "border-radius";
|
|
314
|
+
sm: "border-radius";
|
|
315
|
+
md: "border-radius";
|
|
316
|
+
lg: "border-radius";
|
|
317
|
+
xl: "border-radius";
|
|
318
|
+
};
|
|
319
|
+
shadow: {
|
|
320
|
+
$root: {
|
|
321
|
+
purpose: "shadow";
|
|
322
|
+
description: string;
|
|
323
|
+
};
|
|
324
|
+
color: {
|
|
325
|
+
purpose: "color";
|
|
326
|
+
description: "If specified, this token overrides shadow colors from primitives";
|
|
327
|
+
};
|
|
328
|
+
sm: {
|
|
329
|
+
x: {
|
|
330
|
+
purpose: "size";
|
|
331
|
+
description: "Horizontal offset of the shadow";
|
|
332
|
+
};
|
|
333
|
+
y: {
|
|
334
|
+
purpose: "size";
|
|
335
|
+
description: "Vertical offset of the shadow";
|
|
336
|
+
};
|
|
337
|
+
blur: {
|
|
338
|
+
purpose: "size";
|
|
339
|
+
description: "Blur radius of the shadow";
|
|
340
|
+
};
|
|
341
|
+
spread: {
|
|
342
|
+
purpose: "size";
|
|
343
|
+
description: "Spread radius of the shadow";
|
|
344
|
+
};
|
|
345
|
+
color: {
|
|
346
|
+
purpose: "color";
|
|
347
|
+
description: "Color of the shadow";
|
|
348
|
+
};
|
|
349
|
+
$root: {
|
|
350
|
+
purpose: "shadow";
|
|
351
|
+
description: string;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
md: {
|
|
355
|
+
x: {
|
|
356
|
+
purpose: "size";
|
|
357
|
+
description: "Horizontal offset of the shadow";
|
|
358
|
+
};
|
|
359
|
+
y: {
|
|
360
|
+
purpose: "size";
|
|
361
|
+
description: "Vertical offset of the shadow";
|
|
362
|
+
};
|
|
363
|
+
blur: {
|
|
364
|
+
purpose: "size";
|
|
365
|
+
description: "Blur radius of the shadow";
|
|
366
|
+
};
|
|
367
|
+
spread: {
|
|
368
|
+
purpose: "size";
|
|
369
|
+
description: "Spread radius of the shadow";
|
|
370
|
+
};
|
|
371
|
+
color: {
|
|
372
|
+
purpose: "color";
|
|
373
|
+
description: "Color of the shadow";
|
|
374
|
+
};
|
|
375
|
+
$root: {
|
|
376
|
+
purpose: "shadow";
|
|
377
|
+
description: string;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
lg: {
|
|
381
|
+
x: {
|
|
382
|
+
purpose: "size";
|
|
383
|
+
description: "Horizontal offset of the shadow";
|
|
384
|
+
};
|
|
385
|
+
y: {
|
|
386
|
+
purpose: "size";
|
|
387
|
+
description: "Vertical offset of the shadow";
|
|
388
|
+
};
|
|
389
|
+
blur: {
|
|
390
|
+
purpose: "size";
|
|
391
|
+
description: "Blur radius of the shadow";
|
|
392
|
+
};
|
|
393
|
+
spread: {
|
|
394
|
+
purpose: "size";
|
|
395
|
+
description: "Spread radius of the shadow";
|
|
396
|
+
};
|
|
397
|
+
color: {
|
|
398
|
+
purpose: "color";
|
|
399
|
+
description: "Color of the shadow";
|
|
400
|
+
};
|
|
401
|
+
$root: {
|
|
402
|
+
purpose: "shadow";
|
|
403
|
+
description: string;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
xl: {
|
|
407
|
+
x: {
|
|
408
|
+
purpose: "size";
|
|
409
|
+
description: "Horizontal offset of the shadow";
|
|
410
|
+
};
|
|
411
|
+
y: {
|
|
412
|
+
purpose: "size";
|
|
413
|
+
description: "Vertical offset of the shadow";
|
|
414
|
+
};
|
|
415
|
+
blur: {
|
|
416
|
+
purpose: "size";
|
|
417
|
+
description: "Blur radius of the shadow";
|
|
418
|
+
};
|
|
419
|
+
spread: {
|
|
420
|
+
purpose: "size";
|
|
421
|
+
description: "Spread radius of the shadow";
|
|
422
|
+
};
|
|
423
|
+
color: {
|
|
424
|
+
purpose: "color";
|
|
425
|
+
description: "Color of the shadow";
|
|
426
|
+
};
|
|
427
|
+
$root: {
|
|
428
|
+
purpose: "shadow";
|
|
429
|
+
description: string;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
easing: {
|
|
434
|
+
$root: {
|
|
435
|
+
purpose: "easing-function";
|
|
436
|
+
description: string;
|
|
437
|
+
};
|
|
438
|
+
tight: {
|
|
439
|
+
purpose: "easing-function";
|
|
440
|
+
description: "A short, snappy easing, good for tight interactions";
|
|
441
|
+
};
|
|
442
|
+
medium: {
|
|
443
|
+
purpose: "easing-function";
|
|
444
|
+
description: "A medium easing, good for general use";
|
|
445
|
+
};
|
|
446
|
+
loose: {
|
|
447
|
+
purpose: "easing-function";
|
|
448
|
+
description: "A long, relaxed easing, good for slow interactions and animations";
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
duration: {
|
|
452
|
+
$root: {
|
|
453
|
+
purpose: "duration";
|
|
454
|
+
description: string;
|
|
455
|
+
};
|
|
456
|
+
fast: {
|
|
457
|
+
purpose: "duration";
|
|
458
|
+
description: "A short, snappy duration, good for fast interactions and large animations";
|
|
459
|
+
};
|
|
460
|
+
medium: {
|
|
461
|
+
purpose: "duration";
|
|
462
|
+
description: "A medium duration, good for general use, fast enough for interactions";
|
|
463
|
+
};
|
|
464
|
+
slow: {
|
|
465
|
+
purpose: "duration";
|
|
466
|
+
description: "A long, relaxed duration, good for slow interactions and animations";
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
}, CompiledColors<any, any>, import("@arbor-css/typography").CompiledTypography<any>, import("@arbor-css/spacing").CompiledSpacing<any>, import("@arbor-css/shadows").CompiledShadows<any>, Record<string, string>, Record<string, string>, import("@arbor-css/functions").PresetFunctions, import("@arbor-css/functions").PresetMixins>;
|
|
470
|
+
//# sourceMappingURL=preset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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Q,SAAS,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAEjD,QAAQ,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wUAwC5C,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { compileColors, } from '@arbor-css/colors';
|
|
2
|
+
import { definePreset } from '@arbor-css/preset';
|
|
3
|
+
import { compileShadows } from '@arbor-css/shadows';
|
|
4
|
+
import { compileSpacing } from '@arbor-css/spacing';
|
|
5
|
+
import { compileTypography } from '@arbor-css/typography';
|
|
6
|
+
import { presetBasic } from '../basicPreset/preset.js';
|
|
7
|
+
import { createArborModeValues } from './baseModeValues.js';
|
|
8
|
+
import { arborModeSchema } from './modeSchema.js';
|
|
9
|
+
/**
|
|
10
|
+
* Adds opinionated primitive tokens and a full-featured mode
|
|
11
|
+
* schema on top of the basic preset's utility mixins and functions.
|
|
12
|
+
*/
|
|
13
|
+
export const presetArbor = (config) => {
|
|
14
|
+
const preset = definePreset({
|
|
15
|
+
name: 'arbor',
|
|
16
|
+
modeSchema: arborModeSchema,
|
|
17
|
+
baseMode: ($) => createArborModeValues({
|
|
18
|
+
tokens: $,
|
|
19
|
+
mainColor: config.color.mainColor,
|
|
20
|
+
}),
|
|
21
|
+
primitives: (ctx) => ({
|
|
22
|
+
color: compileColors({ ...config.color, context: ctx }),
|
|
23
|
+
typography: compileTypography({
|
|
24
|
+
...config.typography,
|
|
25
|
+
context: ctx,
|
|
26
|
+
}),
|
|
27
|
+
spacing: compileSpacing({
|
|
28
|
+
...config.spacing,
|
|
29
|
+
context: ctx,
|
|
30
|
+
}),
|
|
31
|
+
shadow: compileShadows({
|
|
32
|
+
...config.shadow,
|
|
33
|
+
context: ctx,
|
|
34
|
+
}),
|
|
35
|
+
easing: config.easing || {
|
|
36
|
+
tight: `cubic-bezier(0.4, 0, 0.2, 1)`,
|
|
37
|
+
medium: `cubic-bezier(0.4, 0, 0.2, 1)`,
|
|
38
|
+
loose: `cubic-bezier(0.4, 0, 0.2, 1)`,
|
|
39
|
+
},
|
|
40
|
+
duration: config.duration || {
|
|
41
|
+
fast: `100ms`,
|
|
42
|
+
medium: `250ms`,
|
|
43
|
+
slow: `500ms`,
|
|
44
|
+
},
|
|
45
|
+
}),
|
|
46
|
+
config: config.config,
|
|
47
|
+
extends: [presetBasic],
|
|
48
|
+
});
|
|
49
|
+
return preset;
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=preset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.js","sourceRoot":"","sources":["../../../src/presets/arborPreset/preset.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,GAGb,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAgB,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAiB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAoB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,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MAAM,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CalcInterpolation, Css } from '@arbor-css/calc';
|
|
2
|
+
import { SystemTokens } from '@arbor-css/globals';
|
|
3
|
+
export declare function lightDarkAlteration(css: Css, systemProps: SystemTokens, { light, dark, step, }: {
|
|
4
|
+
light: number;
|
|
5
|
+
dark: number;
|
|
6
|
+
step: CalcInterpolation;
|
|
7
|
+
}): import("@arbor-css/calc").OperationTree;
|
|
8
|
+
export declare function lightenColorAlteration(css: Css, systemProps: SystemTokens, sourceColor: CalcInterpolation, step: CalcInterpolation): import("@arbor-css/calc").OperationTree;
|
|
9
|
+
export declare function darkenColorAlteration(css: Css, systemProps: SystemTokens, sourceColor: CalcInterpolation, step: CalcInterpolation): import("@arbor-css/calc").OperationTree;
|
|
10
|
+
export declare function saturateColorAlteration(css: Css, systemProps: SystemTokens, sourceColor: CalcInterpolation, step: CalcInterpolation): import("@arbor-css/calc").OperationTree;
|
|
11
|
+
export declare function desaturateColorAlteration(css: Css, systemProps: SystemTokens, sourceColor: CalcInterpolation, step: CalcInterpolation): import("@arbor-css/calc").OperationTree;
|
|
12
|
+
export declare function fadeColorAlteration(css: Css, sourceColor: CalcInterpolation, opacity: CalcInterpolation): import("@arbor-css/calc").OperationTree;
|
|
13
|
+
//# sourceMappingURL=commonFunctions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonFunctions.d.ts","sourceRoot":"","sources":["../../../src/presets/basicPreset/commonFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,wBAAgB,mBAAmB,CAClC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,YAAY,EACzB,EACC,KAAK,EACL,IAAI,EACJ,IAAI,GACJ,EAAE;IACF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,iBAAiB,CAAC;CACxB,2CAGD;AAED,wBAAgB,sBAAsB,CACrC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,iBAAiB,EAC9B,IAAI,EAAE,iBAAiB,2CAGvB;AAED,wBAAgB,qBAAqB,CACpC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,iBAAiB,EAC9B,IAAI,EAAE,iBAAiB,2CAGvB;AAED,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,iBAAiB,EAC9B,IAAI,EAAE,iBAAiB,2CAGvB;AAED,wBAAgB,yBAAyB,CACxC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,iBAAiB,EAC9B,IAAI,EAAE,iBAAiB,2CAGvB;AAED,wBAAgB,mBAAmB,CAClC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,iBAAiB,EAC9B,OAAO,EAAE,iBAAiB,2CAG1B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function lightDarkAlteration(css, systemProps, { light, dark, step, }) {
|
|
2
|
+
return css `calc(1 + ${step} * (${[systemProps.meta.scheme.whenLight, 1]} * ${light}) + (${[systemProps.meta.scheme.whenDark, 1]} * ${dark}))`;
|
|
3
|
+
}
|
|
4
|
+
export function lightenColorAlteration(css, systemProps, sourceColor, step) {
|
|
5
|
+
return css `oklch(from ${sourceColor} calc(l * ${lightDarkAlteration(css, systemProps, { light: 0.02, dark: -0.07, step })}) calc(c * ${lightDarkAlteration(css, systemProps, { light: -0.1, dark: -0.03, step })}) h)`;
|
|
6
|
+
}
|
|
7
|
+
export function darkenColorAlteration(css, systemProps, sourceColor, step) {
|
|
8
|
+
return css `oklch(from ${sourceColor} calc(l * ${lightDarkAlteration(css, systemProps, { light: -0.02, dark: 0.12, step })}) calc(c * ${lightDarkAlteration(css, systemProps, { light: 0.01, dark: -0.09, step })}) h)`;
|
|
9
|
+
}
|
|
10
|
+
export function saturateColorAlteration(css, systemProps, sourceColor, step) {
|
|
11
|
+
return css `oklch(from ${sourceColor} l calc(c * ${lightDarkAlteration(css, systemProps, { light: 0.05, dark: 0.05, step })}) h)`;
|
|
12
|
+
}
|
|
13
|
+
export function desaturateColorAlteration(css, systemProps, sourceColor, step) {
|
|
14
|
+
return css `oklch(from ${sourceColor} l calc(c * ${lightDarkAlteration(css, systemProps, { light: -0.05, dark: -0.05, step })}) h)`;
|
|
15
|
+
}
|
|
16
|
+
export function fadeColorAlteration(css, sourceColor, opacity) {
|
|
17
|
+
return css `oklch(from ${sourceColor} l c h / ${opacity})`;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=commonFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonFunctions.js","sourceRoot":"","sources":["../../../src/presets/basicPreset/commonFunctions.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,mBAAmB,CAClC,GAAQ,EACR,WAAyB,EACzB,EACC,KAAK,EACL,IAAI,EACJ,IAAI,GAKJ;IAED,OAAO,GAAG,CAAA,YAAY,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC;AAC/I,CAAC;AAED,MAAM,UAAU,sBAAsB,CACrC,GAAQ,EACR,WAAyB,EACzB,WAA8B,EAC9B,IAAuB;IAEvB,OAAO,GAAG,CAAA,cAAc,WAAW,aAAa,mBAAmB,CAAC,GAAG,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,cAAc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
|
+
import { CreateFunction } from '@arbor-css/functions';
|
|
2
|
+
import { SystemTokens } from '@arbor-css/globals';
|
|
3
|
+
export declare function createPresetFunctions(systemProps: SystemTokens, createFunctionValue: CreateFunction): {
|
|
4
|
+
readonly lightenColor: import("@arbor-css/functions").ArborFunction<any>;
|
|
5
|
+
readonly darkenColor: import("@arbor-css/functions").ArborFunction<any>;
|
|
6
|
+
readonly desaturateColor: import("@arbor-css/functions").ArborFunction<any>;
|
|
7
|
+
readonly saturateColor: import("@arbor-css/functions").ArborFunction<any>;
|
|
8
|
+
readonly fade: import("@arbor-css/functions").ArborFunction<any>;
|
|
9
|
+
readonly ring: import("@arbor-css/functions").ArborFunction<any>;
|
|
10
|
+
};
|
|
11
|
+
export type BuiltinFunctions = ReturnType<typeof createPresetFunctions>;
|
|
12
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../src/presets/basicPreset/functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AASlD,wBAAgB,qBAAqB,CACpC,WAAW,EAAE,YAAY,EACzB,mBAAmB,EAAE,cAAc;;;;;;;EA+DnC;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { darkenColorAlteration, desaturateColorAlteration, fadeColorAlteration, lightenColorAlteration, saturateColorAlteration, } from './commonFunctions.js';
|
|
2
|
+
export function createPresetFunctions(systemProps, createFunctionValue) {
|
|
3
|
+
const lightenColor = createFunctionValue('lighten-color', {
|
|
4
|
+
description: 'Lightens a color by a specified "step" value',
|
|
5
|
+
parameters: ['--color', '--step'],
|
|
6
|
+
definition: (css, color, step) => lightenColorAlteration(css, systemProps, color, step),
|
|
7
|
+
});
|
|
8
|
+
const darkenColor = createFunctionValue('darken-color', {
|
|
9
|
+
description: 'Darkens a color by a specified "step" value',
|
|
10
|
+
parameters: ['--color', '--step'],
|
|
11
|
+
definition: (css, color, step) => darkenColorAlteration(css, systemProps, color, step),
|
|
12
|
+
});
|
|
13
|
+
const desaturateColor = createFunctionValue('desaturate-color', {
|
|
14
|
+
description: 'Desaturates a color by a specified "step" value',
|
|
15
|
+
parameters: ['--color', '--step'],
|
|
16
|
+
definition: (css, color, step) => desaturateColorAlteration(css, systemProps, color, step),
|
|
17
|
+
});
|
|
18
|
+
const saturateColor = createFunctionValue('saturate-color', {
|
|
19
|
+
description: 'Saturates a color by a specified "step" value',
|
|
20
|
+
parameters: ['--color', '--step'],
|
|
21
|
+
definition: (css, color, step) => saturateColorAlteration(css, systemProps, color, step),
|
|
22
|
+
});
|
|
23
|
+
const fade = createFunctionValue('fade', {
|
|
24
|
+
description: 'Applies an alpha channel to a source color using CSS relative color syntax.',
|
|
25
|
+
parameters: ['--color', '--opacity'],
|
|
26
|
+
definition: (css, color, opacity) => fadeColorAlteration(css, color, opacity),
|
|
27
|
+
});
|
|
28
|
+
const ring = createFunctionValue('ring', {
|
|
29
|
+
description: 'Creates a ring shadow. Should be used with the shadow mixin.',
|
|
30
|
+
parameters: [
|
|
31
|
+
'--color',
|
|
32
|
+
{
|
|
33
|
+
name: '--size',
|
|
34
|
+
fallback: '1px',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: '--offset',
|
|
38
|
+
fallback: '0px',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
definition: (css, color, size, offset) => css `0 0 0 ${offset} ${systemProps.meta.scheme.trueLight}, 0 0 0 calc(${size} + ${offset}) ${color}`,
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
lightenColor,
|
|
45
|
+
darkenColor,
|
|
46
|
+
desaturateColor,
|
|
47
|
+
saturateColor,
|
|
48
|
+
fade,
|
|
49
|
+
ring,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/presets/basicPreset/functions.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,GACvB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,UAAU,qBAAqB,CACpC,WAAyB,EACzB,mBAAmC;IAEnC,MAAM,YAAY,GAAG,mBAAmB,CAAC,eAAe,EAAE;QACzD,WAAW,EAAE,8CAA8C;QAC3D,UAAU,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAU;QAC1C,UAAU,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAChC,sBAAsB,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC;KACtD,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,mBAAmB,CAAC,cAAc,EAAE;QACvD,WAAW,EAAE,6CAA6C;QAC1D,UAAU,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAU;QAC1C,UAAU,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAChC,qBAAqB,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC;KACrD,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,mBAAmB,CAAC,kBAAkB,EAAE;QAC/D,WAAW,EAAE,iDAAiD;QAC9D,UAAU,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAU;QAC1C,UAAU,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAChC,yBAAyB,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC;KACzD,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,mBAAmB,CAAC,gBAAgB,E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