@arbor-css/core 0.0.110 → 0.0.111
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/getStructuredTokensMap.test.js +1 -1
- package/dist/getStructuredTokensMap.test.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/presets/arborPreset/modeSchema/global.d.ts +119 -31
- package/dist/presets/arborPreset/modeSchema/global.d.ts.map +1 -1
- package/dist/presets/arborPreset/modeSchema/global.js +117 -31
- package/dist/presets/arborPreset/modeSchema/global.js.map +1 -1
- package/dist/presets/arborPreset/modeSchema/intents/action.d.ts +3 -3
- package/dist/presets/arborPreset/modeSchema/intents/common.d.ts +1 -1
- package/dist/presets/arborPreset/modeSchema/intents/common.js +1 -1
- package/dist/presets/arborPreset/modeSchema/intents/common.js.map +1 -1
- package/dist/presets/arborPreset/modeSchema/intents/control.d.ts +1 -1
- package/dist/presets/arborPreset/modeSchema/intents/surface.d.ts +3 -3
- package/dist/presets/arborPreset/modeSchema/modeSchema.d.ts +124 -38
- package/dist/presets/arborPreset/modeSchema/modeSchema.d.ts.map +1 -1
- package/dist/presets/arborPreset/modeValues/color/compile.d.ts +3 -7
- package/dist/presets/arborPreset/modeValues/color/compile.d.ts.map +1 -1
- package/dist/presets/arborPreset/modeValues/color/compile.js +3 -3
- package/dist/presets/arborPreset/modeValues/color/compile.js.map +1 -1
- package/dist/presets/arborPreset/modeValues/color/compile.test.js +1 -1
- package/dist/presets/arborPreset/modeValues/color/compile.test.js.map +1 -1
- package/dist/presets/arborPreset/modeValues/intents.d.ts.map +1 -1
- package/dist/presets/arborPreset/modeValues/intents.js +6 -6
- package/dist/presets/arborPreset/modeValues/intents.js.map +1 -1
- package/dist/presets/arborPreset/modeValues/semantics.d.ts.map +1 -1
- package/dist/presets/arborPreset/modeValues/semantics.js +13 -13
- package/dist/presets/arborPreset/modeValues/semantics.js.map +1 -1
- package/dist/presets/arborPreset/modeValues/shadow/index.d.ts +2 -9
- package/dist/presets/arborPreset/modeValues/shadow/index.d.ts.map +1 -1
- package/dist/presets/arborPreset/modeValues/shadow/index.js +4 -4
- package/dist/presets/arborPreset/modeValues/shadow/index.js.map +1 -1
- package/dist/presets/arborPreset/modeValues/spacing/index.d.ts +3 -20
- package/dist/presets/arborPreset/modeValues/spacing/index.d.ts.map +1 -1
- package/dist/presets/arborPreset/modeValues/spacing/index.js +1 -1
- package/dist/presets/arborPreset/modeValues/spacing/index.js.map +1 -1
- package/dist/presets/arborPreset/modeValues/typography/index.d.ts +4 -36
- package/dist/presets/arborPreset/modeValues/typography/index.d.ts.map +1 -1
- package/dist/presets/arborPreset/modeValues/typography/index.js +5 -5
- package/dist/presets/arborPreset/modeValues/typography/index.js.map +1 -1
- package/dist/presets/arborPreset/preset.d.ts +217 -42
- package/dist/presets/arborPreset/preset.d.ts.map +1 -1
- package/dist/presets/arborPreset/preset.js +43 -13
- package/dist/presets/arborPreset/preset.js.map +1 -1
- package/dist/presets/basicPreset/commonFunctions.js +1 -1
- package/dist/presets/basicPreset/commonFunctions.js.map +1 -1
- package/dist/presets/basicPreset/mixins.d.ts.map +1 -1
- package/dist/presets/basicPreset/preset.d.ts.map +1 -1
- package/dist/runtime/components/ColorSwatch.d.ts.map +1 -1
- package/dist/runtime/components/ColorSwatch.js +3 -0
- package/dist/runtime/components/ColorSwatch.js.map +1 -1
- package/dist/runtime/components/FunctionsList.js +1 -1
- package/dist/runtime/components/MixinsList.js +1 -1
- package/dist/runtime/components/ModeGraph.d.ts.map +1 -1
- package/dist/runtime/components/ModeGraph.js +20 -13
- package/dist/runtime/components/ModeGraph.js.map +1 -1
- package/dist/runtime/components/SystemDemo.d.ts +2 -0
- package/dist/runtime/components/SystemDemo.d.ts.map +1 -0
- package/dist/runtime/components/SystemDemo.js +32 -0
- package/dist/runtime/components/SystemDemo.js.map +1 -0
- package/dist/runtime/components/index.d.ts.map +1 -1
- package/dist/runtime/components/index.js +2 -0
- package/dist/runtime/components/index.js.map +1 -1
- package/dist/runtime/tokenGroups.d.ts.map +1 -1
- package/dist/stylesheet/generateStylesheet.test.js +3 -3
- package/dist/stylesheet/generateStylesheet.test.js.map +1 -1
- package/dist/util/buildModeTokenGraph.test.js +2 -2
- package/dist/util/buildModeTokenGraph.test.js.map +1 -1
- package/dist/util/flattenAndApplyTokenValues.d.ts +2 -1
- package/dist/util/flattenAndApplyTokenValues.d.ts.map +1 -1
- package/dist/util/flattenAndApplyTokenValues.js.map +1 -1
- package/dist/util/resolveComputedTokenValue.test.js +6 -6
- package/dist/util/resolveComputedTokenValue.test.js.map +1 -1
- package/package.json +8 -8
- package/dist/util/printTokens.d.ts +0 -5
- package/dist/util/printTokens.d.ts.map +0 -1
- package/dist/util/printTokens.js +0 -6
- package/dist/util/printTokens.js.map +0 -1
|
@@ -1,36 +1,19 @@
|
|
|
1
|
-
import { Css
|
|
2
|
-
import {
|
|
1
|
+
import { Css } from '@arbor-css/css-eval';
|
|
2
|
+
import { ArborModeGlobalTokens } from '../../modeSchema/global.js';
|
|
3
3
|
export declare const defaultSpacingLevels: readonly ["2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl"];
|
|
4
4
|
export type DefaultSpacingLevel = (typeof defaultSpacingLevels)[number];
|
|
5
5
|
export interface SpacingConfig<TSpacingLevel extends string = DefaultSpacingLevel> {
|
|
6
6
|
levels?: Record<TSpacingLevel, string | number>;
|
|
7
7
|
defaultLevel?: TSpacingLevel;
|
|
8
|
-
/**
|
|
9
|
-
* The "base" number of the scale equation - a linear scalar
|
|
10
|
-
* multiplier. Set this to scale by some linear factor if
|
|
11
|
-
* scaleExponent is "1"
|
|
12
|
-
*/
|
|
13
|
-
scaleBase?: CssInterpolation;
|
|
14
|
-
/**
|
|
15
|
-
* The exponent of the scale equation - the rate of exponential growth.
|
|
16
|
-
* `scaleBase` is raised to this exponent before being multiplied by the base spacing size.
|
|
17
|
-
* Set this to "1" to scale linearly by the `scaleBase` factor, or set it to a value greater than "1" to have exponential growth.
|
|
18
|
-
*/
|
|
19
|
-
scaleExponent?: CssInterpolation;
|
|
20
8
|
}
|
|
21
9
|
export type CompiledSpacing<TSpacingLevel extends string = DefaultSpacingLevel> = {
|
|
22
10
|
[K in TSpacingLevel]: string | Css;
|
|
23
11
|
} & {
|
|
24
12
|
$root: string | Css;
|
|
25
13
|
};
|
|
26
|
-
type RequiredTokens = {
|
|
27
|
-
baseSpacingSize: Token;
|
|
28
|
-
baseFontSize: Token;
|
|
29
|
-
};
|
|
30
14
|
/**
|
|
31
15
|
* Given configuration for spacing sizes and the default
|
|
32
16
|
* level name, produces a range of spacing sizes.
|
|
33
17
|
*/
|
|
34
|
-
export declare function compileSpacing<TSpacingLevel extends string = DefaultSpacingLevel>(config: SpacingConfig<TSpacingLevel>, $:
|
|
35
|
-
export {};
|
|
18
|
+
export declare function compileSpacing<TSpacingLevel extends string = DefaultSpacingLevel>(config: SpacingConfig<TSpacingLevel>, $: ArborModeGlobalTokens): CompiledSpacing<TSpacingLevel>;
|
|
36
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/spacing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/spacing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,eAAO,MAAM,oBAAoB,8DASvB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,MAAM,WAAW,aAAa,CAC7B,aAAa,SAAS,MAAM,GAAG,mBAAmB;IAElD,MAAM,CAAC,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAChD,YAAY,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED,MAAM,MAAM,eAAe,CAC1B,aAAa,SAAS,MAAM,GAAG,mBAAmB,IAC/C;KACF,CAAC,IAAI,aAAa,GAAG,MAAM,GAAG,GAAG;CAClC,GAAG;IACH,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAC7B,aAAa,SAAS,MAAM,GAAG,mBAAmB,EAElD,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,EACpC,CAAC,EAAE,qBAAqB,GACtB,eAAe,CAAC,aAAa,CAAC,CAiChC"}
|
|
@@ -30,7 +30,7 @@ export function compileSpacing(config, $) {
|
|
|
30
30
|
const step = i - baseIndex;
|
|
31
31
|
acc[nameCast] =
|
|
32
32
|
levelConfig ??
|
|
33
|
-
css `calc(${$.
|
|
33
|
+
css `calc(${$.spacing.baseSize} * pow(${[$.spacing.scaleBase, 2]}, ${[$.spacing.scaleExponentStep, 1]} * ${step}))`;
|
|
34
34
|
return acc;
|
|
35
35
|
}, {});
|
|
36
36
|
const defaultLevel = config.defaultLevel ?? levelNames[baseIndex];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/spacing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/spacing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAO,MAAM,qBAAqB,CAAC;AAG/C,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,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E,OAAO;QACN,GAAG,MAAM;QACT,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC;KAC3B,CAAC;AACH,CAAC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { Css, CssInterpolation } from '@arbor-css/css-eval';
|
|
2
2
|
import { Token } from '@arbor-css/tokens';
|
|
3
|
+
import { ArborModeGlobalTokens } from '../../modeSchema/global.js';
|
|
3
4
|
export interface TypographyLevel {
|
|
4
5
|
size: string | Css;
|
|
5
6
|
lineHeight: CssInterpolation;
|
|
6
7
|
letterSpacing: string | Css;
|
|
7
8
|
}
|
|
8
|
-
export interface RequiredTokens {
|
|
9
|
-
density: Token;
|
|
10
|
-
whenDark: Token;
|
|
11
|
-
}
|
|
12
9
|
export declare function isTypographyLevel(value: any): value is TypographyLevel;
|
|
13
10
|
export type CompiledTypography<TLevels extends string = DefaultTypographyLevel> = {
|
|
14
11
|
[K in TLevels]: TypographyLevel;
|
|
@@ -20,37 +17,8 @@ export type DefaultTypographyLevel = (typeof defaultTypographyLevels)[number];
|
|
|
20
17
|
export type TypographyConfig<TLevels extends string = DefaultTypographyLevel> = {
|
|
21
18
|
levels?: Record<TLevels, Partial<TypographyLevel>>;
|
|
22
19
|
defaultLevel?: TLevels;
|
|
23
|
-
weightStep?: CssInterpolation;
|
|
24
|
-
lineHeightStep?: CssInterpolation;
|
|
25
|
-
minWeight?: CssInterpolation;
|
|
26
|
-
maxWeight?: CssInterpolation;
|
|
27
|
-
baseWeight?: CssInterpolation;
|
|
28
|
-
minLineHeight?: CssInterpolation;
|
|
29
|
-
maxLineHeight?: CssInterpolation;
|
|
30
|
-
baseLineHeight?: CssInterpolation;
|
|
31
|
-
minSize?: string | Css;
|
|
32
|
-
maxSize?: string | Css;
|
|
33
|
-
/**
|
|
34
|
-
* Size is scaled exponentially; this is the "base" (the
|
|
35
|
-
* number being scaled).
|
|
36
|
-
*/
|
|
37
|
-
sizeBase?: string | Css;
|
|
38
|
-
/**
|
|
39
|
-
* Multiplied with the step index to produce an exponent
|
|
40
|
-
* for scaling sizeBase. The result is multiplied with
|
|
41
|
-
* the default font size.
|
|
42
|
-
*/
|
|
43
|
-
sizeExponentStep?: CssInterpolation;
|
|
44
|
-
letterSpacingStep?: CssInterpolation;
|
|
45
|
-
minLetterSpacing?: string | Css;
|
|
46
|
-
maxLetterSpacing?: string | Css;
|
|
47
|
-
baseLetterSpacing?: string | Css;
|
|
48
|
-
/**
|
|
49
|
-
* Apply an adjustment to font weight in dark mode to compensate for the irradiation illusion.
|
|
50
|
-
* Defaults to 0. Adjusting weight can lead to irregular font size between light and dark mode;
|
|
51
|
-
* prefer adjusting GRAD in variable fonts.
|
|
52
|
-
*/
|
|
53
|
-
darkModeWeightAdjustment?: CssInterpolation;
|
|
54
20
|
};
|
|
55
|
-
export declare function compileTypography<TLevels extends string = DefaultTypographyLevel>(config: TypographyConfig<TLevels>, tokens:
|
|
21
|
+
export declare function compileTypography<TLevels extends string = DefaultTypographyLevel>(config: TypographyConfig<TLevels>, tokens: ArborModeGlobalTokens, systemTokens: {
|
|
22
|
+
whenDark: Token;
|
|
23
|
+
}): CompiledTypography<TLevels>;
|
|
56
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/typography/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,GAAG,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/typography/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,GAAG,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAA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
|
+
export function compileTypography(config, tokens, systemTokens) {
|
|
21
21
|
const levelNames = config.levels ?
|
|
22
22
|
Object.keys(config.levels)
|
|
23
23
|
: defaultTypographyLevels;
|
|
@@ -32,9 +32,9 @@ export function compileTypography(config, tokens) {
|
|
|
32
32
|
const nameCast = name;
|
|
33
33
|
const levelConfig = config.levels?.[nameCast] ?? {};
|
|
34
34
|
acc[nameCast] = {
|
|
35
|
-
size: css `calc(clamp(${
|
|
36
|
-
lineHeight: css `calc(clamp(${
|
|
37
|
-
letterSpacing: css `calc(clamp(${
|
|
35
|
+
size: css `calc(clamp(${tokens.typography.minFontSize ?? '0.75rem'}, 1rem * pow(${tokens.typography.fontSizeScaleBase ?? 1.125}, (${i - baseIndex} * ${tokens.typography.fontSizeScaleExponentStep ?? 1})) / ${[tokens.spacing.density, 1]}, ${tokens.typography.maxFontSize ?? '3rem'}))`,
|
|
36
|
+
lineHeight: css `calc(clamp(${tokens.typography.minLineHeight ?? 0.75}, (${tokens.typography.baseLineHeight ?? 1.5} - ${tokens.typography.lineHeightStep ?? 0.5} * ${i - baseIndex}), ${tokens.typography.maxLineHeight ?? 2}))`,
|
|
37
|
+
letterSpacing: css `calc(clamp(${tokens.typography.minLetterSpacing ?? 0}, (${tokens.typography.baseLetterSpacing ?? 0} + ${tokens.typography.letterSpacingStep ?? 0} * ${i - baseIndex}), ${tokens.typography.maxLetterSpacing ?? 0}))`,
|
|
38
38
|
...levelConfig,
|
|
39
39
|
};
|
|
40
40
|
return acc;
|
|
@@ -49,7 +49,7 @@ export function compileTypography(config, tokens) {
|
|
|
49
49
|
].reduce((acc, weightName, i) => {
|
|
50
50
|
const stepsFromNormal = i - 2; // normal is the 3rd item in the list (index 2)
|
|
51
51
|
acc[weightName] =
|
|
52
|
-
css `calc(clamp(${
|
|
52
|
+
css `calc(clamp(${tokens.typography.minWeight ?? 100}, ${tokens.typography.baseWeight ?? 400} + ${tokens.typography.weightStep ?? 100} * ${stepsFromNormal} - (${systemTokens.whenDark} * ${tokens.typography.darkModeWeightAdjustment ?? 0}), ${tokens.typography.maxWeight ?? 900}))`;
|
|
53
53
|
return acc;
|
|
54
54
|
}, {});
|
|
55
55
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/typography/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAyB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/presets/arborPreset/modeValues/typography/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAyB,MAAM,qBAAqB,CAAC;AAUjE,MAAM,UAAU,iBAAiB,CAAC,KAAU;IAC3C,OAAO,CACN,KAAK;QACL,MAAM,IAAI,KAAK;QACf,YAAY,IAAI,KAAK;QACrB,eAAe,IAAI,KAAK,CACxB,CAAC;AACH,CAAC;AAqBD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACtC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;CACI,CAAC;AASX,MAAM,UAAU,iBAAiB,CAGhC,MAAiC,EACjC,MAA6B,EAC7B,YAAiC;IAEjC,MAAM,UAAU,GACf,MAAM,CAAC,MAAM,CAAC,CAAC;QACd,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAC3B,CAAC,CAAE,uBAAgD,CAAC;IACrD,MAAM,SAAS;IACd,gCAAgC;IAChC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;QAC5D,yDAAyD;QAC1D,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;YAClD,kDAAkD;YACnD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AAC;IAEjC,MAAM,OAAO,GAAG;QACf,MAAM;QACN,OAAO;QACP,QAAQ;QACR,UAAU;QACV,MAAM;QACN,OAAO;KACP,CAAC,MAAM,CACP,CAAC,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE;QACtB,MAAM,eAAe,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,+CAA+C;QAC9E,GAAG,CAAC,UAAgD,CAAC;YACpD,GAAG,CAAA,cAAc,MAAM,CAAC,UAAU,CAAC,SAAS,IAAI,GAAG,KAAK,MAAM,CAAC,UAAU,CAAC,UAAU,IAAI,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,UAAU,IAAI,GAAG,MAAM,eAAe,OAAO,YAAY,CAAC,QAAQ,MAAM,MAAM,CAAC,UAAU,CAAC,wBAAwB,IAAI,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,SAAS,IAAI,GAAG,IAAI,CAAC;QACxR,OAAO,GAAG,CAAC;IACZ,CAAC,EACD,EAA8D,CAC9D,CAAC;IAEF,OAAO;QACN,GAAG,MAAM;QACT,MAAM,EAAE,OAAO;KACf,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CssInterpolation } from '@arbor-css/css-eval';
|
|
1
2
|
import { ArborPrefixConfig } from '@arbor-css/globals';
|
|
2
3
|
import { ModeValues } from '@arbor-css/modes';
|
|
3
4
|
import { ArborModeSchema } from './modeSchema/modeSchema.js';
|
|
@@ -10,13 +11,101 @@ export interface ArborPresetConfig<TRanges extends string, TRangeStepNames exten
|
|
|
10
11
|
color: CompileColorsOptions<TRanges, TRangeStepNames> & {
|
|
11
12
|
mainColor: string;
|
|
12
13
|
defaultScheme?: 'light' | 'dark';
|
|
14
|
+
/**
|
|
15
|
+
* This saturation tuning value affects every color used in
|
|
16
|
+
* your mode. It multiplies with any per-color-range saturation
|
|
17
|
+
* values you set up. Default is 0.5.
|
|
18
|
+
*
|
|
19
|
+
* Any valid CSS number value can be used here.
|
|
20
|
+
*/
|
|
21
|
+
globalSaturation?: CssInterpolation;
|
|
22
|
+
};
|
|
23
|
+
typography?: TypographyConfig & {
|
|
24
|
+
/**
|
|
25
|
+
* Specify a global font size. This is not recommended;
|
|
26
|
+
* the default "1em" respects the end user's font size
|
|
27
|
+
* preference. If customized, consider still using
|
|
28
|
+
* em units.
|
|
29
|
+
*
|
|
30
|
+
* Any valid CSS font-size value can be used here.
|
|
31
|
+
*/
|
|
32
|
+
defaultFontSize?: CssInterpolation;
|
|
33
|
+
fontSizeScaleBase?: CssInterpolation;
|
|
34
|
+
fontSizeScaleExponentStep?: CssInterpolation;
|
|
35
|
+
baseLetterSpacing?: CssInterpolation;
|
|
36
|
+
baseLineHeight?: CssInterpolation;
|
|
37
|
+
weightStep?: CssInterpolation;
|
|
38
|
+
baseWeight?: CssInterpolation;
|
|
39
|
+
darkModeWeightAdjustment?: CssInterpolation;
|
|
40
|
+
letterSpacingStep?: CssInterpolation;
|
|
41
|
+
minLetterSpacing?: CssInterpolation;
|
|
42
|
+
maxLetterSpacing?: CssInterpolation;
|
|
43
|
+
lineHeightStep?: CssInterpolation;
|
|
44
|
+
maxFontSize?: CssInterpolation;
|
|
45
|
+
maxLineHeight?: CssInterpolation;
|
|
46
|
+
maxWeight?: CssInterpolation;
|
|
47
|
+
minFontSize?: CssInterpolation;
|
|
48
|
+
minLineHeight?: CssInterpolation;
|
|
49
|
+
minWeight?: CssInterpolation;
|
|
50
|
+
};
|
|
51
|
+
spacing?: SpacingConfig & {
|
|
52
|
+
/**
|
|
53
|
+
* This density tuning value affects all spacing (and font size) tokens
|
|
54
|
+
* used in your mode. It multiplies with any per-token density
|
|
55
|
+
* adjustments to create the final spacing or size value.
|
|
56
|
+
*
|
|
57
|
+
* Larger density values create *more dense* UIs,
|
|
58
|
+
* meaning smaller spacing and text. The default is 1.
|
|
59
|
+
*
|
|
60
|
+
* Any valid CSS number value can be used here.
|
|
61
|
+
*/
|
|
62
|
+
globalDensity?: CssInterpolation;
|
|
63
|
+
/**
|
|
64
|
+
* This is the root size of your spacing scale, from which
|
|
65
|
+
* other values are derived. Default is "8px"
|
|
66
|
+
*
|
|
67
|
+
* Any valid CSS length value can be used here.
|
|
68
|
+
*/
|
|
69
|
+
baseSize?: CssInterpolation;
|
|
70
|
+
scaleBase?: CssInterpolation;
|
|
71
|
+
scaleExponentStep?: CssInterpolation;
|
|
72
|
+
};
|
|
73
|
+
shadow?: ShadowConfig & {
|
|
74
|
+
/**
|
|
75
|
+
* Controls the spread amount of all shadows used in the mode.
|
|
76
|
+
* A value from 0 to 1 is recommended.
|
|
77
|
+
* Any valid CSS number value can be used here.
|
|
78
|
+
*/
|
|
79
|
+
globalSpread?: CssInterpolation;
|
|
80
|
+
/**
|
|
81
|
+
* Controls the blur amount of all shadows used in the mode.
|
|
82
|
+
* A value from 0 to 1 is recommended.
|
|
83
|
+
* Any valid CSS number value can be used here.
|
|
84
|
+
*/
|
|
85
|
+
globalBlur?: CssInterpolation;
|
|
86
|
+
/**
|
|
87
|
+
* When no shadow color is specified, this is the default.
|
|
88
|
+
* Any valid CSS color value can be used here.
|
|
89
|
+
*/
|
|
90
|
+
defaultColor?: CssInterpolation;
|
|
91
|
+
};
|
|
92
|
+
shape?: {
|
|
93
|
+
/**
|
|
94
|
+
* Influences the thickness of borders. Default is 1.
|
|
95
|
+
* Any valid CSS number value can be used here.
|
|
96
|
+
*/
|
|
97
|
+
lineWidth?: CssInterpolation;
|
|
98
|
+
/**
|
|
99
|
+
* Globally influences the corner radius values of
|
|
100
|
+
* used in the mode. Roundness also has an influence
|
|
101
|
+
* on the padding of intent tokens. Default is 0.5.
|
|
102
|
+
* A value from 0 to 1 is recommended.
|
|
103
|
+
* Any valid CSS number value can be used here.
|
|
104
|
+
*/
|
|
105
|
+
roundness?: CssInterpolation;
|
|
13
106
|
};
|
|
14
|
-
typography?: TypographyConfig;
|
|
15
|
-
spacing?: SpacingConfig;
|
|
16
|
-
shadow?: ShadowConfig;
|
|
17
107
|
easing?: ModeValues<ArborModeSchema['easing']>;
|
|
18
108
|
duration?: ModeValues<ArborModeSchema['duration']>;
|
|
19
|
-
globals?: Partial<ModeValues<ArborModeSchema['global']>>;
|
|
20
109
|
/**
|
|
21
110
|
* Turns off the automatic bundled @mode-light, @mode-dark, and @mode-inverted.
|
|
22
111
|
*/
|
|
@@ -55,41 +144,127 @@ export declare const presetArbor: <TRanges extends string, TRangeStepNames exten
|
|
|
55
144
|
};
|
|
56
145
|
} & {
|
|
57
146
|
global: {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
purpose: "scalar";
|
|
64
|
-
description: "Applies global saturation adjustments to all colors";
|
|
65
|
-
};
|
|
66
|
-
roundness: {
|
|
67
|
-
purpose: "scalar";
|
|
68
|
-
description: "Controls the roundness of corners. Larger roundness values also may affect padding.";
|
|
69
|
-
};
|
|
70
|
-
shadowSpread: {
|
|
71
|
-
purpose: "scalar";
|
|
72
|
-
description: "Controls the spread size of all shadows.";
|
|
73
|
-
};
|
|
74
|
-
shadowBlur: {
|
|
75
|
-
purpose: "scalar";
|
|
76
|
-
description: "Controls the blur scaling of all shadows.";
|
|
147
|
+
color: {
|
|
148
|
+
saturation: {
|
|
149
|
+
purpose: "scalar";
|
|
150
|
+
description: "Applies global saturation adjustments to all colors";
|
|
151
|
+
};
|
|
77
152
|
};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
153
|
+
spacing: {
|
|
154
|
+
density: {
|
|
155
|
+
purpose: "scalar";
|
|
156
|
+
description: "A scaling factor for density. Higher density means smaller, tighter spacing and size";
|
|
157
|
+
};
|
|
158
|
+
baseSize: {
|
|
159
|
+
purpose: "spacing";
|
|
160
|
+
description: "Defines the base spacing unit used to derive spacing and layout tokens.";
|
|
161
|
+
};
|
|
162
|
+
scaleBase: {
|
|
163
|
+
purpose: "scalar";
|
|
164
|
+
description: "The \"base\" number of the scale equation - a linear scalar multiplier. Set this to scale by some linear factor if scaleExponent is \"1\"";
|
|
165
|
+
};
|
|
166
|
+
scaleExponentStep: {
|
|
167
|
+
purpose: "scalar";
|
|
168
|
+
description: "The exponent of the scale equation - the rate of exponential growth. `scaleBase` is raised to this exponent before being multiplied by the base spacing size. Set this to \"1\" to scale linearly by the `scaleBase` factor, or set it to a value greater than \"1\" to have exponential growth.";
|
|
169
|
+
};
|
|
81
170
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
171
|
+
shape: {
|
|
172
|
+
roundness: {
|
|
173
|
+
purpose: "scalar";
|
|
174
|
+
description: "Controls the roundness of corners. Larger roundness values also may affect padding.";
|
|
175
|
+
};
|
|
176
|
+
lineWidth: {
|
|
177
|
+
purpose: "scalar";
|
|
178
|
+
description: "Controls the width of lines used for borders, etc.";
|
|
179
|
+
};
|
|
85
180
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
181
|
+
shadow: {
|
|
182
|
+
spread: {
|
|
183
|
+
purpose: "scalar";
|
|
184
|
+
description: "Controls the spread size of all shadows.";
|
|
185
|
+
};
|
|
186
|
+
blur: {
|
|
187
|
+
purpose: "scalar";
|
|
188
|
+
description: "Controls the blur scaling of all shadows.";
|
|
189
|
+
};
|
|
190
|
+
color: {
|
|
191
|
+
purpose: "color";
|
|
192
|
+
description: "Provides the default shadow color used when a shadow token does not supply its own color.";
|
|
193
|
+
};
|
|
89
194
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
195
|
+
typography: {
|
|
196
|
+
baseFontSize: {
|
|
197
|
+
purpose: "font-size";
|
|
198
|
+
description: "Defines the root font size used to derive typography tokens.";
|
|
199
|
+
};
|
|
200
|
+
weightStep: {
|
|
201
|
+
purpose: "scalar";
|
|
202
|
+
description: "The amount of font weight change between each typography level. This is multiplied by the level index to determine how much to adjust font weight at each level.";
|
|
203
|
+
};
|
|
204
|
+
minWeight: {
|
|
205
|
+
purpose: "scalar";
|
|
206
|
+
description: "The minimum font weight to use in the typography scale.";
|
|
207
|
+
};
|
|
208
|
+
maxWeight: {
|
|
209
|
+
purpose: "scalar";
|
|
210
|
+
description: "The maximum font weight to use in the typography scale.";
|
|
211
|
+
};
|
|
212
|
+
baseWeight: {
|
|
213
|
+
purpose: "scalar";
|
|
214
|
+
description: "The base font weight from which to calculate typography levels. This is typically the \"normal\" font weight (e.g. 400), and level adjustments are applied as positive or negative offsets from this base.";
|
|
215
|
+
};
|
|
216
|
+
lineHeightStep: {
|
|
217
|
+
purpose: "scalar";
|
|
218
|
+
description: "The amount of line height change between each typography level. This is multiplied by the level index to determine how much to adjust line height at each level.";
|
|
219
|
+
};
|
|
220
|
+
minLineHeight: {
|
|
221
|
+
purpose: "scalar";
|
|
222
|
+
description: "The minimum line height to use in the typography scale.";
|
|
223
|
+
};
|
|
224
|
+
maxLineHeight: {
|
|
225
|
+
purpose: "scalar";
|
|
226
|
+
description: "The maximum line height to use in the typography scale.";
|
|
227
|
+
};
|
|
228
|
+
baseLineHeight: {
|
|
229
|
+
purpose: "scalar";
|
|
230
|
+
description: "The base line height from which to calculate typography levels. This is typically the line height used at the default typography level, and level adjustments are applied as positive or negative offsets from this base.";
|
|
231
|
+
};
|
|
232
|
+
minFontSize: {
|
|
233
|
+
purpose: "font-size";
|
|
234
|
+
description: "The minimum font size to use in the typography scale.";
|
|
235
|
+
};
|
|
236
|
+
maxFontSize: {
|
|
237
|
+
purpose: "font-size";
|
|
238
|
+
description: "The maximum font size to use in the typography scale.";
|
|
239
|
+
};
|
|
240
|
+
fontSizeScaleBase: {
|
|
241
|
+
purpose: "scalar";
|
|
242
|
+
description: "The \"base\" number of the font size scale equation - a linear scalar multiplier. Set this to scale by some linear factor if sizeExponent is \"1\"";
|
|
243
|
+
};
|
|
244
|
+
fontSizeScaleExponentStep: {
|
|
245
|
+
purpose: "scalar";
|
|
246
|
+
description: "The exponent of the font size scale equation - the rate of exponential growth. `fontSizeScaleBase` is raised to this exponent before being multiplied by the base font size. Set this to \"1\" to scale linearly by the `fontSizeScaleBase` factor, or set it to a value greater than \"1\" to have exponential growth.";
|
|
247
|
+
};
|
|
248
|
+
letterSpacingStep: {
|
|
249
|
+
purpose: "scalar";
|
|
250
|
+
description: "The amount of letter spacing change between each typography level. This is multiplied by the level index to determine how much to adjust letter spacing at each level.";
|
|
251
|
+
};
|
|
252
|
+
minLetterSpacing: {
|
|
253
|
+
purpose: "spacing";
|
|
254
|
+
description: "The minimum letter spacing to use in the typography scale.";
|
|
255
|
+
};
|
|
256
|
+
maxLetterSpacing: {
|
|
257
|
+
purpose: "spacing";
|
|
258
|
+
description: "The maximum letter spacing to use in the typography scale.";
|
|
259
|
+
};
|
|
260
|
+
baseLetterSpacing: {
|
|
261
|
+
purpose: "spacing";
|
|
262
|
+
description: "The base letter spacing from which to calculate typography levels. This is typically the letter spacing used at the default typography level, and level adjustments are applied as positive or negative offsets from this base.";
|
|
263
|
+
};
|
|
264
|
+
darkModeWeightAdjustment: {
|
|
265
|
+
purpose: "scalar";
|
|
266
|
+
description: "An adjustment applied to font weight when in dark mode to compensate for the irradiation illusion. This is typically a negative value to reduce font weight in dark mode, but it can be positive if your theme has very light text and you want to increase weight in dark mode.";
|
|
267
|
+
};
|
|
93
268
|
};
|
|
94
269
|
};
|
|
95
270
|
primitive: {
|
|
@@ -522,7 +697,7 @@ export declare const presetArbor: <TRanges extends string, TRangeStepNames exten
|
|
|
522
697
|
description: "Foreground color";
|
|
523
698
|
};
|
|
524
699
|
bg: {
|
|
525
|
-
purpose: "
|
|
700
|
+
purpose: "background";
|
|
526
701
|
description: "Background - can be a color or a more complex value like a gradient or image";
|
|
527
702
|
};
|
|
528
703
|
borderColor: {
|
|
@@ -545,7 +720,7 @@ export declare const presetArbor: <TRanges extends string, TRangeStepNames exten
|
|
|
545
720
|
description: "Foreground color";
|
|
546
721
|
};
|
|
547
722
|
bg: {
|
|
548
|
-
purpose: "
|
|
723
|
+
purpose: "background";
|
|
549
724
|
description: "Background - can be a color or a more complex value like a gradient or image";
|
|
550
725
|
};
|
|
551
726
|
borderColor: {
|
|
@@ -568,7 +743,7 @@ export declare const presetArbor: <TRanges extends string, TRangeStepNames exten
|
|
|
568
743
|
description: "Foreground color";
|
|
569
744
|
};
|
|
570
745
|
bg: {
|
|
571
|
-
purpose: "
|
|
746
|
+
purpose: "background";
|
|
572
747
|
description: "Background - can be a color or a more complex value like a gradient or image";
|
|
573
748
|
};
|
|
574
749
|
borderColor: {
|
|
@@ -592,7 +767,7 @@ export declare const presetArbor: <TRanges extends string, TRangeStepNames exten
|
|
|
592
767
|
description: "Foreground color";
|
|
593
768
|
};
|
|
594
769
|
bg: {
|
|
595
|
-
purpose: "
|
|
770
|
+
purpose: "background";
|
|
596
771
|
description: "Background - can be a color or a more complex value like a gradient or image";
|
|
597
772
|
};
|
|
598
773
|
borderColor: {
|
|
@@ -660,7 +835,7 @@ export declare const presetArbor: <TRanges extends string, TRangeStepNames exten
|
|
|
660
835
|
description: "Foreground color";
|
|
661
836
|
};
|
|
662
837
|
bg: {
|
|
663
|
-
purpose: "
|
|
838
|
+
purpose: "background";
|
|
664
839
|
description: "Background - can be a color or a more complex value like a gradient or image";
|
|
665
840
|
};
|
|
666
841
|
borderColor: {
|
|
@@ -683,7 +858,7 @@ export declare const presetArbor: <TRanges extends string, TRangeStepNames exten
|
|
|
683
858
|
description: "Foreground color";
|
|
684
859
|
};
|
|
685
860
|
bg: {
|
|
686
|
-
purpose: "
|
|
861
|
+
purpose: "background";
|
|
687
862
|
description: "Background - can be a color or a more complex value like a gradient or image";
|
|
688
863
|
};
|
|
689
864
|
borderColor: {
|
|
@@ -706,7 +881,7 @@ export declare const presetArbor: <TRanges extends string, TRangeStepNames exten
|
|
|
706
881
|
description: "Foreground color";
|
|
707
882
|
};
|
|
708
883
|
bg: {
|
|
709
|
-
purpose: "
|
|
884
|
+
purpose: "background";
|
|
710
885
|
description: "Background - can be a color or a more complex value like a gradient or image";
|
|
711
886
|
};
|
|
712
887
|
borderColor: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../../src/presets/arborPreset/preset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../../src/presets/arborPreset/preset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9C,OAAO,EACN,eAAe,EAEf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEN,oBAAoB,EACpB,gBAAgB,EAChB,MAAM,6BAA6B,CAAC;AAgBrC,OAAO,EAAkB,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAkB,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAEN,gBAAgB,EAChB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,iBAAiB,CACjC,OAAO,SAAS,MAAM,EACtB,eAAe,SAAS,MAAM,GAAG,gBAAgB;IAEjD,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,KAAK,EAAE,oBAAoB,CAAC,OAAO,EAAE,eAAe,CAAC,GAAG;QACvD,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACjC;;;;;;WAMG;QACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;KACpC,CAAC;IACF,UAAU,CAAC,EAAE,gBAAgB,GAAG;QAC/B;;;;;;;WAOG;QACH,eAAe,CAAC,EAAE,gBAAgB,CAAC;QACnC,iBAAiB,CAAC,EAAE,gBAAgB,CAAC;QACrC,yBAAyB,CAAC,EAAE,gBAAgB,CAAC;QAC7C,iBAAiB,CAAC,EAAE,gBAAgB,CAAC;QACrC,cAAc,CAAC,EAAE,gBAAgB,CAAC;QAClC,UAAU,CAAC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;;;;;;8CAiBQ,CAAA;8BACD,CAAC;;;;;;;;;;;;;;;;8CAiBwB,CAAC;8BAGlD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4WX,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,WAAW,SAAS,MAAM,IAAI,UAAU,CACzE,OAAO,WAAW,CAAC,WAAW,CAAC,CAC/B,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -22,16 +22,46 @@ export const presetArbor = (config) => {
|
|
|
22
22
|
baseMode: ($) => {
|
|
23
23
|
return {
|
|
24
24
|
global: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
color: {
|
|
26
|
+
saturation: config.color?.globalSaturation ?? 0.5,
|
|
27
|
+
},
|
|
28
|
+
shadow: {
|
|
29
|
+
blur: config.shadow?.globalBlur ?? 0.5,
|
|
30
|
+
spread: config.shadow?.globalSpread ?? 0,
|
|
31
|
+
color: config.shadow?.defaultColor ?? 'rgba(0 0 0 / 0.15)',
|
|
32
|
+
},
|
|
33
|
+
shape: {
|
|
34
|
+
lineWidth: config.shape?.lineWidth ?? 1,
|
|
35
|
+
roundness: config.shape?.roundness ?? 0.5,
|
|
36
|
+
},
|
|
37
|
+
spacing: {
|
|
38
|
+
density: config.spacing?.globalDensity ?? 1,
|
|
39
|
+
baseSize: config.spacing?.baseSize ?? '8px',
|
|
40
|
+
scaleBase: config.spacing?.scaleBase ?? 2,
|
|
41
|
+
scaleExponentStep: config.spacing?.scaleExponentStep ?? 1,
|
|
42
|
+
},
|
|
43
|
+
typography: {
|
|
44
|
+
baseFontSize: config.typography?.defaultFontSize ?? '1em',
|
|
45
|
+
fontSizeBase: config.typography?.fontSizeScaleBase ?? 1.125,
|
|
46
|
+
fontSizeExponentStep: config.typography?.fontSizeScaleExponentStep ?? 1,
|
|
47
|
+
baseLetterSpacing: config.typography?.baseLetterSpacing ?? 0,
|
|
48
|
+
baseLineHeight: config.typography?.baseLineHeight ?? 1.5,
|
|
49
|
+
weightStep: config.typography?.weightStep ?? 100,
|
|
50
|
+
baseWeight: config.typography?.baseWeight ?? 400,
|
|
51
|
+
darkModeWeightAdjustment: config.typography?.darkModeWeightAdjustment ?? 0,
|
|
52
|
+
fontSizeScaleBase: config.typography?.fontSizeScaleBase ?? 1.125,
|
|
53
|
+
fontSizeScaleExponentStep: config.typography?.fontSizeScaleExponentStep ?? 1,
|
|
54
|
+
letterSpacingStep: config.typography?.letterSpacingStep ?? 0,
|
|
55
|
+
minLetterSpacing: config.typography?.minLetterSpacing ?? 0,
|
|
56
|
+
maxLetterSpacing: config.typography?.maxLetterSpacing ?? 0,
|
|
57
|
+
lineHeightStep: config.typography?.lineHeightStep ?? 0.5,
|
|
58
|
+
maxFontSize: config.typography?.maxFontSize ?? '10rem',
|
|
59
|
+
maxLineHeight: config.typography?.maxLineHeight ?? 2,
|
|
60
|
+
maxWeight: config.typography?.maxWeight ?? 900,
|
|
61
|
+
minFontSize: config.typography?.minFontSize ?? '0.75rem',
|
|
62
|
+
minLineHeight: config.typography?.minLineHeight ?? 0.75,
|
|
63
|
+
minWeight: config.typography?.minWeight ?? 100,
|
|
64
|
+
},
|
|
35
65
|
},
|
|
36
66
|
/** PRIMITIVES */
|
|
37
67
|
primitive: {
|
|
@@ -42,7 +72,7 @@ export const presetArbor = (config) => {
|
|
|
42
72
|
schemes: config.color.schemes,
|
|
43
73
|
}, $.mode.global),
|
|
44
74
|
spacing: compileSpacing(config.spacing || {}, $.mode.global),
|
|
45
|
-
typography: compileTypography(config.typography || {}, $.mode.global),
|
|
75
|
+
typography: compileTypography(config.typography || {}, $.mode.global, $.mode.global),
|
|
46
76
|
shadow: compileShadows(config.shadow || {}, $.mode.global),
|
|
47
77
|
easing: config.easing ||
|
|
48
78
|
{
|
|
@@ -76,7 +106,7 @@ export const presetArbor = (config) => {
|
|
|
76
106
|
},
|
|
77
107
|
baseModeOptions: ($) => ({
|
|
78
108
|
extraCss: `
|
|
79
|
-
font-size: ${$.mode.global.baseFontSize.var};
|
|
109
|
+
font-size: ${$.mode.global.typography.baseFontSize.var};
|
|
80
110
|
`,
|
|
81
111
|
}),
|
|
82
112
|
config: config.prefixes,
|
|
@@ -88,7 +118,7 @@ export const presetArbor = (config) => {
|
|
|
88
118
|
property: 'border-color',
|
|
89
119
|
extra: () => css `
|
|
90
120
|
border-style: solid;
|
|
91
|
-
border-width: calc(1px * ${$.mode.global.lineWidth});
|
|
121
|
+
border-width: calc(1px * ${$.mode.global.shape.lineWidth});
|
|
92
122
|
`,
|
|
93
123
|
});
|
|
94
124
|
// intent mixins
|