@uni-design-system/uni-core 8.3.1 → 9.0.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/CHANGELOG.md +226 -0
- package/dist/cjs/index.cjs +128 -206
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +129 -202
- package/dist/esm/index.js.map +1 -1
- package/dist/types/concepts/color/color.helper.d.ts +1 -7
- package/dist/types/concepts/color/color.helper.d.ts.map +1 -1
- package/dist/types/concepts/color/color.model.d.ts +0 -6
- package/dist/types/concepts/color/color.model.d.ts.map +1 -1
- package/dist/types/concepts/color/color.utils.d.ts +0 -7
- package/dist/types/concepts/color/color.utils.d.ts.map +1 -1
- package/dist/types/concepts/color/index.d.ts +0 -1
- package/dist/types/concepts/color/index.d.ts.map +1 -1
- package/dist/types/concepts/generation/theme-file.emitter.d.ts.map +1 -1
- package/dist/types/concepts/size/size.types.d.ts +15 -1
- package/dist/types/concepts/size/size.types.d.ts.map +1 -1
- package/dist/types/concepts/theme/spacing.spec.d.ts +2 -0
- package/dist/types/concepts/theme/spacing.spec.d.ts.map +1 -0
- package/dist/types/concepts/theme/theme.model.d.ts +35 -2
- package/dist/types/concepts/theme/theme.model.d.ts.map +1 -1
- package/dist/types/concepts/theme/themes/base.theme.d.ts +15 -2
- package/dist/types/concepts/theme/themes/base.theme.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/concepts/color/color.records.d.ts +0 -15
- package/dist/types/concepts/color/color.records.d.ts.map +0 -1
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { HSL, HSLA, RGB
|
|
1
|
+
import { HSL, HSLA, RGB } from './color.model';
|
|
2
2
|
export declare function HSLAToString({ hue, saturation, lightness, alpha }: HSLA): string;
|
|
3
3
|
export declare function RGBToString({ red, green, blue }: RGB): string;
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Random HSL generation produces non-deterministic, perceptually
|
|
6
|
-
* uneven colors. Use the OKLCH engine (`generateThemes` in
|
|
7
|
-
* `concepts/generation`) or `generatePalette` instead.
|
|
8
|
-
*/
|
|
9
|
-
export declare function uniColor({ role, category, alpha }: UniColor): string;
|
|
10
4
|
export declare const RGBToHSL: ({ red, green, blue }: RGB) => HSL;
|
|
11
5
|
export declare const rgbToHex: ({ red, green, blue }: RGB) => string;
|
|
12
6
|
export declare const hexToRgb: (hex: string) => RGB;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.helper.d.ts","sourceRoot":"","sources":["../../../../src/concepts/color/color.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"color.helper.d.ts","sourceRoot":"","sources":["../../../../src/concepts/color/color.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAE/C,wBAAgB,YAAY,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,KAAS,EAAE,EAAE,IAAI,GAAG,MAAM,CAEpF;AAED,wBAAgB,WAAW,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,GAAG,MAAM,CAE7D;AAED,eAAO,MAAM,QAAQ,GAAI,sBAAsB,GAAG,KAAG,GAkBpD,CAAC;AASF,eAAO,MAAM,QAAQ,GAAI,sBAAsB,GAAG,KAAG,MACW,CAAC;AAEjE,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,GAKtC,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,gCAA4C,GAAG,KAAG,GAwB1E,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,KAAG,MAAiC,CAAC;AAEtE,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,GAA8B,CAAC;AAEtE,uEAAuE;AACvE,eAAO,MAAM,iBAAiB,GAAI,sBAAsB,GAAG,KAAG,MAM7D,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,aAAa,GAAI,GAAG,GAAG,GAAG,MAAM,EAAE,GAAG,GAAG,GAAG,MAAM,KAAG,MAKhE,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { ColorCategory, ColorRole, ColorScheme, ColorStyles } from './color.types';
|
|
2
|
-
export interface UniColor {
|
|
3
|
-
scheme: ColorScheme;
|
|
4
|
-
role: ColorRole;
|
|
5
|
-
category: ColorCategory;
|
|
6
|
-
alpha?: number;
|
|
7
|
-
}
|
|
8
2
|
export interface Color {
|
|
9
3
|
scheme?: ColorScheme;
|
|
10
4
|
role?: ColorRole;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.model.d.ts","sourceRoot":"","sources":["../../../../src/concepts/color/color.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEnF,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"color.model.d.ts","sourceRoot":"","sources":["../../../../src/concepts/color/color.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEnF,MAAM,WAAW,KAAK;IAEpB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,aAAa,CAAC;IAEzB,KAAK,CAAC,EAAE,WAAW,CAAC;IAGpB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAGpC,eAAe,CAAC,EAAE,KAAK,CAAC;IACxB,kBAAkB,CAAC,EAAE,KAAK,CAAC;IAG3B,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,GAAG;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,IAAK,SAAQ,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,IAAK,SAAQ,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { Range } from './color.model';
|
|
2
1
|
import { ColorScheme } from './color.types';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Randomized generation is superseded by the deterministic OKLCH
|
|
5
|
-
* engine in `concepts/generation` — same input, same theme. Seeded "surprise
|
|
6
|
-
* me" behavior belongs in the consumer (playground), not the engine.
|
|
7
|
-
*/
|
|
8
|
-
export declare const randomRangeValue: ({ low, high }: Range) => number;
|
|
9
2
|
export declare const cycle: (angle: number) => number;
|
|
10
3
|
export declare const getAnalogousHues: (hue: number) => number[];
|
|
11
4
|
export declare const getComplimentaryHue: (hue: number) => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.utils.d.ts","sourceRoot":"","sources":["../../../../src/concepts/color/color.utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"color.utils.d.ts","sourceRoot":"","sources":["../../../../src/concepts/color/color.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,KAAG,MAIrC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,KAAG,MAAM,EAAwC,CAAC;AAC9F,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,KAAG,MAA0B,CAAC;AAC7E,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MAAM,EAA0C,CAAC;AAC9F,eAAO,MAAM,yBAAyB,GAAI,KAAK,MAAM,KAAG,MAAM,EAG7D,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,EAAE,QAAQ,WAAW,KAAG,UAqB7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/concepts/color/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/concepts/color/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-file.emitter.d.ts","sourceRoot":"","sources":["../../../../src/concepts/generation/theme-file.emitter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1E,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,cAAc,CAAC;IACvB,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"theme-file.emitter.d.ts","sourceRoot":"","sources":["../../../../src/concepts/generation/theme-file.emitter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1E,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,cAAc,CAAC;IACvB,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;CACvB;AAyDD;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,cAAc,KAAG,gBA8IrD,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The named size scale. Closed on purpose — it also types *component* sizes
|
|
3
|
+
* (`uni-tag`, `uni-icon-button`, `BaseComponent`), where an arbitrary name has
|
|
4
|
+
* nothing to resolve against.
|
|
5
|
+
*/
|
|
1
6
|
export type Size = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
2
|
-
|
|
7
|
+
/**
|
|
8
|
+
* A spacing token: the named scale, plus any extra key a theme defines in its
|
|
9
|
+
* `spacing` map. The `(string & {})` arm keeps autocomplete on the seven names
|
|
10
|
+
* while letting an app name the steps its design actually uses — real layouts
|
|
11
|
+
* are not built exclusively on a doubling scale.
|
|
12
|
+
*
|
|
13
|
+
* The cost is that an unknown token no longer fails to compile; `ThemeService`
|
|
14
|
+
* warns in dev when one misses the theme.
|
|
15
|
+
*/
|
|
16
|
+
export type NullableSize = Size | 'none' | (string & {});
|
|
3
17
|
export type OptionalSize = NullableSize | undefined;
|
|
4
18
|
export type AbsoluteSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' | 'xxx-large';
|
|
5
19
|
//# sourceMappingURL=size.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.types.d.ts","sourceRoot":"","sources":["../../../../src/concepts/size/size.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"size.types.d.ts","sourceRoot":"","sources":["../../../../src/concepts/size/size.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAEpE;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,SAAS,CAAC;AAEpD,MAAM,MAAM,YAAY,GACpB,UAAU,GACV,SAAS,GACT,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,UAAU,GACV,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.spec.d.ts","sourceRoot":"","sources":["../../../../src/concepts/theme/spacing.spec.ts"],"names":[],"mappings":""}
|
|
@@ -2,12 +2,23 @@ import { TextRole, TextStyle, TypeFaceDefinition } from '../typography';
|
|
|
2
2
|
import { ColorToken } from '../color';
|
|
3
3
|
import { ComponentThemes } from '../component';
|
|
4
4
|
import { Variant } from './theme.types';
|
|
5
|
-
import {
|
|
5
|
+
import { Size } from '../size';
|
|
6
6
|
import { Elevation } from '../elevation';
|
|
7
7
|
export type Colors = Partial<Record<ColorToken, string>>;
|
|
8
8
|
export type ColorKey = keyof Colors;
|
|
9
9
|
export type OptionalColor = ColorKey | undefined;
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* A theme's spacing scale. The named steps stay optional and discoverable;
|
|
12
|
+
* the index signature lets a theme add its own (`tight: '6px'`), which
|
|
13
|
+
* `NullableSize` accepts wherever a spacing token is taken. Spelled out rather
|
|
14
|
+
* than `Partial<Record<NullableSize, …>>`, which would collapse to a plain
|
|
15
|
+
* string record and lose autocomplete on the named steps.
|
|
16
|
+
*/
|
|
17
|
+
export type Spacing = {
|
|
18
|
+
[K in Size | 'none']?: string | number;
|
|
19
|
+
} & {
|
|
20
|
+
[key: string]: string | number | undefined;
|
|
21
|
+
};
|
|
11
22
|
export type Orientation = 'horizontal' | 'vertical';
|
|
12
23
|
export type LinearSpacing = Record<Orientation, Spacing>;
|
|
13
24
|
/**
|
|
@@ -33,6 +44,26 @@ export type Thickness = 'thin' | 'thick' | 'standard';
|
|
|
33
44
|
export type Thicknesses = Partial<Record<Thickness | string, string | number>>;
|
|
34
45
|
export type Icons = Record<string, string>;
|
|
35
46
|
export type Icon = keyof Icons;
|
|
47
|
+
/**
|
|
48
|
+
* A named motion primitive. Duration and easing are one token rather than two
|
|
49
|
+
* scales because they are one design decision: slowing a panel without
|
|
50
|
+
* softening its curve reads as sluggish rather than calm.
|
|
51
|
+
*/
|
|
52
|
+
export interface MotionToken {
|
|
53
|
+
/** Milliseconds. */
|
|
54
|
+
duration: number;
|
|
55
|
+
/** Any CSS `<easing-function>` — `linear`, `ease-out`, `cubic-bezier(…)`. */
|
|
56
|
+
easing: string;
|
|
57
|
+
/**
|
|
58
|
+
* Entry scale for panels that grow into place, e.g. `0.8`. Omitted by
|
|
59
|
+
* motions that only fade, and ignored by components that only fade.
|
|
60
|
+
*/
|
|
61
|
+
scale?: number;
|
|
62
|
+
}
|
|
63
|
+
export type MotionName = 'popup' | 'panel' | 'reveal' | 'notification' | 'control';
|
|
64
|
+
/** Open like Borders/Shadows: extra named primitives allowed. */
|
|
65
|
+
export type Motions = Partial<Record<MotionName | string, MotionToken>>;
|
|
66
|
+
export type Motion = keyof Motions;
|
|
36
67
|
export interface UniTheme {
|
|
37
68
|
id: string;
|
|
38
69
|
name: string;
|
|
@@ -46,6 +77,8 @@ export interface UniTheme {
|
|
|
46
77
|
spacing: Spacing;
|
|
47
78
|
thicknesses: Thicknesses;
|
|
48
79
|
icons: Icons;
|
|
80
|
+
/** Shared timing for overlays and reveals; components point at a name. */
|
|
81
|
+
motion: Motions;
|
|
49
82
|
/** Per-component theming: fixed base + state-aware variants + sizes + options. */
|
|
50
83
|
components: ComponentThemes;
|
|
51
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.model.d.ts","sourceRoot":"","sources":["../../../../src/concepts/theme/theme.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"theme.model.d.ts","sourceRoot":"","sources":["../../../../src/concepts/theme/theme.model.ts"],"names":[],"mappings":"AAAA,OAAO,EA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MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,GAAG,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AACxE,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;AAEnC,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IAEb,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,UAAU,EAAE,UAAU,CAAC;IAGvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,0EAA0E;IAC1E,MAAM,EAAE,OAAO,CAAC;IAEhB,kFAAkF;IAClF,UAAU,EAAE,eAAe,CAAC;CAC7B;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC9C,MAAM,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { ComponentThemes } from '../../component';
|
|
|
2
2
|
import { PaletteConfig } from '../../color';
|
|
3
3
|
import { GenerateColorsConfig } from '../../generation/palette.factory';
|
|
4
4
|
import { TextRole, TextStyle } from '../../typography';
|
|
5
|
-
import { Borders, Colors, Icons, Radii, Shadows, Thicknesses, UniTheme } from '../theme.model';
|
|
5
|
+
import { Borders, Colors, Icons, Motions, Radii, Shadows, Spacing, Thicknesses, UniTheme } from '../theme.model';
|
|
6
6
|
export interface ThemeConfig {
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
@@ -17,6 +17,12 @@ export interface ThemeConfig {
|
|
|
17
17
|
radii?: Radii;
|
|
18
18
|
/** Override the elevation shadows, e.g. brand-tinted generated stacks. */
|
|
19
19
|
shadows?: Shadows;
|
|
20
|
+
/**
|
|
21
|
+
* Named motion primitives, merged over {@link BaseMotion}. Retime every
|
|
22
|
+
* overlay at once by restating a token — components point at these by name
|
|
23
|
+
* rather than carrying their own durations.
|
|
24
|
+
*/
|
|
25
|
+
motion?: Motions;
|
|
20
26
|
/**
|
|
21
27
|
* Sparse typography overrides, deep-merged over the base type scale:
|
|
22
28
|
* restate only the roles — or the individual {@link TextStyle} fields
|
|
@@ -36,6 +42,13 @@ export interface ThemeConfig {
|
|
|
36
42
|
* `focusRing` thickness sets the shared focus ring's outline offset.
|
|
37
43
|
*/
|
|
38
44
|
thicknesses?: Thicknesses;
|
|
45
|
+
/**
|
|
46
|
+
* Spacing steps, merged over the base scale (the named steps stay unless
|
|
47
|
+
* restated). Extra tokens may use any name — `{ tight: '6px' }` is then a
|
|
48
|
+
* valid `padding` / `gap` value everywhere — so an app's real rhythm does
|
|
49
|
+
* not have to be forced onto a doubling scale.
|
|
50
|
+
*/
|
|
51
|
+
spacing?: Spacing;
|
|
39
52
|
/**
|
|
40
53
|
* Sparse per-component overrides, deep-merged over the derived component
|
|
41
54
|
* themes: only the sections you provide (fixed/variants/sizes/options keys)
|
|
@@ -43,7 +56,7 @@ export interface ThemeConfig {
|
|
|
43
56
|
*/
|
|
44
57
|
components?: ComponentThemes;
|
|
45
58
|
}
|
|
46
|
-
export declare const createTheme: ({ id, name, colors, icons, radii, shadows, typography, borders, thicknesses, components, }: ThemeConfig) => UniTheme;
|
|
59
|
+
export declare const createTheme: ({ id, name, colors, icons, radii, shadows, motion, typography, borders, thicknesses, spacing, components, }: ThemeConfig) => UniTheme;
|
|
47
60
|
/**
|
|
48
61
|
* Re-attach the built-in icon set to a theme that traveled without it.
|
|
49
62
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.theme.d.ts","sourceRoot":"","sources":["../../../../../src/concepts/theme/themes/base.theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACv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IG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAcD,eAAO,MAAM,WAAW,GAAI,6GAazB,WAAW,KAAG,QAaf,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,QAAQ,KAAG,QAG7C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,QAAQ,KAAG,QAK/C,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,oBAAoB,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,KAC1F,QAUF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAInF,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAmE,CAAC;AAE9F,eAAO,MAAM,SAAS,EAAE,QAItB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Range } from './color.model';
|
|
2
|
-
import { ColorCategory, ColorRole, UtilityColorRole } from './color.types';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated HSL saturation ranges are superseded by the perceptual OKLCH
|
|
5
|
-
* chroma model inside `concepts/generation` (see `generateThemes`). Kept for
|
|
6
|
-
* legacy callers of `uniColor`; removal follows the changeset major process.
|
|
7
|
-
*/
|
|
8
|
-
export declare const CategorySaturation: Record<ColorCategory, Range>;
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated HSL lightness ranges are superseded by the perceptual OKLCH
|
|
11
|
-
* tone slots inside `concepts/generation` (see `generateThemes`).
|
|
12
|
-
*/
|
|
13
|
-
export declare const CategoryLightness: Record<ColorCategory, Range>;
|
|
14
|
-
export declare const RoleHues: Record<ColorRole | UtilityColorRole, Range>;
|
|
15
|
-
//# sourceMappingURL=color.records.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color.records.d.ts","sourceRoot":"","sources":["../../../../src/concepts/color/color.records.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,aAAa,EAAE,KAAK,CAO3D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,aAAa,EAAE,KAAK,CAO1D,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,SAAS,GAAG,gBAAgB,EAAE,KAAK,CAUhE,CAAC"}
|