@fluentui-react-native/theme-types 0.14.3 → 0.17.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.json +45 -1
- package/CHANGELOG.md +23 -2
- package/lib/Shadow.types.d.ts +49 -0
- package/lib/Shadow.types.d.ts.map +1 -0
- package/lib/Shadow.types.js +2 -0
- package/lib/Shadow.types.js.map +1 -0
- package/lib/Theme.types.d.ts +5 -2
- package/lib/Theme.types.d.ts.map +1 -1
- package/lib/Typography.types.d.ts +17 -0
- package/lib/Typography.types.d.ts.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Shadow.types.d.ts +49 -0
- package/lib-commonjs/Shadow.types.d.ts.map +1 -0
- package/lib-commonjs/Shadow.types.js +3 -0
- package/lib-commonjs/Shadow.types.js.map +1 -0
- package/lib-commonjs/Theme.types.d.ts +5 -2
- package/lib-commonjs/Theme.types.d.ts.map +1 -1
- package/lib-commonjs/Typography.types.d.ts +17 -0
- package/lib-commonjs/Typography.types.d.ts.map +1 -1
- package/lib-commonjs/index.d.ts +1 -0
- package/lib-commonjs/index.d.ts.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Shadow.types.ts +51 -0
- package/src/Theme.types.ts +5 -2
- package/src/Typography.types.ts +19 -0
- package/src/index.ts +1 -0
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,51 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/theme-types",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 25 May 2022 18:41:24 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/theme-types_v0.17.0",
|
|
7
|
+
"version": "0.17.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "email not defined",
|
|
12
|
+
"package": "@fluentui-react-native/theme-types",
|
|
13
|
+
"commit": "18480e3fdf2038a34147995f413a45d14f012a73",
|
|
14
|
+
"comment": "Add text implementation v2"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"patch": [
|
|
18
|
+
{
|
|
19
|
+
"author": "krsiler@microsoft.com",
|
|
20
|
+
"package": "@fluentui-react-native/theme-types",
|
|
21
|
+
"commit": "7d1c5dba49eb5da6c18681b8c9295c7fa0d0353b",
|
|
22
|
+
"comment": "Version bump for packages to attempt to fix NPM publish pipeline"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"author": "krsiler@microsoft.com",
|
|
26
|
+
"package": "@fluentui-react-native/theme-types",
|
|
27
|
+
"commit": "f4e881a5caef5a8258094f2a2ba674c62321886d",
|
|
28
|
+
"comment": "beachball sync"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"date": "Sat, 21 May 2022 01:47:57 GMT",
|
|
35
|
+
"tag": "@fluentui-react-native/theme-types_v0.15.0",
|
|
36
|
+
"version": "0.15.0",
|
|
37
|
+
"comments": {
|
|
38
|
+
"minor": [
|
|
39
|
+
{
|
|
40
|
+
"author": "ruaraki@microsoft.com",
|
|
41
|
+
"package": "@fluentui-react-native/theme-types",
|
|
42
|
+
"commit": "3fdd5fccdcd5e76c90bac7ad2fa436917b1c84e0",
|
|
43
|
+
"comment": "Add shadows to the theme"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"date": "Thu, 28 Apr 2022 19:09:51 GMT",
|
|
6
50
|
"tag": "@fluentui-react-native/theme-types_v0.14.3",
|
|
7
51
|
"version": "0.14.3",
|
|
8
52
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/theme-types
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 25 May 2022 18:41:24 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.17.0
|
|
8
|
+
|
|
9
|
+
Wed, 25 May 2022 18:41:24 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Add text implementation v2 (email not defined)
|
|
14
|
+
|
|
15
|
+
### Patches
|
|
16
|
+
|
|
17
|
+
- Version bump for packages to attempt to fix NPM publish pipeline (krsiler@microsoft.com)
|
|
18
|
+
- beachball sync (krsiler@microsoft.com)
|
|
19
|
+
|
|
20
|
+
## 0.15.0
|
|
21
|
+
|
|
22
|
+
Sat, 21 May 2022 01:47:57 GMT
|
|
23
|
+
|
|
24
|
+
### Minor changes
|
|
25
|
+
|
|
26
|
+
- Add shadows to the theme (ruaraki@microsoft.com)
|
|
27
|
+
|
|
7
28
|
## 0.14.3
|
|
8
29
|
|
|
9
|
-
Thu, 28 Apr 2022 19:
|
|
30
|
+
Thu, 28 Apr 2022 19:09:51 GMT
|
|
10
31
|
|
|
11
32
|
### Patches
|
|
12
33
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ColorValue } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Base structure of a shadow style, which has x and y offset, blur amount, and color specified
|
|
4
|
+
*/
|
|
5
|
+
export interface ShadowValue {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
blur: number;
|
|
9
|
+
color: ColorValue;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* In FluentUI a shadow is specified as having two parts - an ambient shadow and a key shadow.
|
|
13
|
+
* The ambient shadow is shading around the entire control
|
|
14
|
+
* The key shadow is the offset shadow which gives the control a sense of elevation or distance from the page
|
|
15
|
+
*/
|
|
16
|
+
export interface ShadowToken {
|
|
17
|
+
ambient: ShadowValue;
|
|
18
|
+
key: ShadowValue;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Shadows alias tokens as defined by FluentUI v2 design system
|
|
22
|
+
*/
|
|
23
|
+
export interface BaseShadowAliasTokens {
|
|
24
|
+
shadow2: ShadowToken;
|
|
25
|
+
shadow4: ShadowToken;
|
|
26
|
+
shadow8: ShadowToken;
|
|
27
|
+
shadow16: ShadowToken;
|
|
28
|
+
shadow28: ShadowToken;
|
|
29
|
+
shadow64: ShadowToken;
|
|
30
|
+
shadow2brand: ShadowToken;
|
|
31
|
+
shadow4brand: ShadowToken;
|
|
32
|
+
shadow8brand: ShadowToken;
|
|
33
|
+
shadow16brand: ShadowToken;
|
|
34
|
+
shadow28brand: ShadowToken;
|
|
35
|
+
shadow64brand: ShadowToken;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Shadows on the theme object. This allows for flexibility on entries but retains base alias tokens
|
|
39
|
+
*/
|
|
40
|
+
export declare type ThemeShadowDefinition = BaseShadowAliasTokens & {
|
|
41
|
+
[key: string]: ShadowToken;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* A partially specified shadow definition.
|
|
45
|
+
*/
|
|
46
|
+
export declare type PartialShadowDefinition = {
|
|
47
|
+
[P in keyof ThemeShadowDefinition]?: Partial<ThemeShadowDefinition[P]>;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=Shadow.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shadow.types.d.ts","sourceRoot":"","sources":["../src/Shadow.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,WAAW,CAAC;IACrB,GAAG,EAAE,WAAW,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,EAAE,WAAW,CAAC;IAC1B,YAAY,EAAE,WAAW,CAAC;IAC1B,YAAY,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,WAAW,CAAC;IAC3B,aAAa,EAAE,WAAW,CAAC;IAC3B,aAAa,EAAE,WAAW,CAAC;CAC5B;AAED;;GAEG;AACH,oBAAY,qBAAqB,GAAG,qBAAqB,GAAG;IAC1D,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,uBAAuB,GAAG;KAAG,CAAC,IAAI,MAAM,qBAAqB,CAAC,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shadow.types.js","sourceRoot":"","sources":["../src/Shadow.types.ts"],"names":[],"mappings":""}
|
package/lib/Theme.types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ThemeColorDefinition } from './Color.types';
|
|
|
2
2
|
import { OfficePalette } from './palette.types';
|
|
3
3
|
import { Typography, PartialTypography } from './Typography.types';
|
|
4
4
|
import { ColorValue } from 'react-native';
|
|
5
|
+
import { PartialShadowDefinition, ThemeShadowDefinition } from './Shadow.types';
|
|
5
6
|
declare type TwoLevelPartial<T> = {
|
|
6
7
|
[K in keyof T]?: Partial<T[K]>;
|
|
7
8
|
};
|
|
@@ -22,6 +23,7 @@ export interface Theme {
|
|
|
22
23
|
components: {
|
|
23
24
|
[key: string]: object;
|
|
24
25
|
};
|
|
26
|
+
shadows: ThemeShadowDefinition;
|
|
25
27
|
spacing: Spacing;
|
|
26
28
|
host: {
|
|
27
29
|
appearance: AppearanceOptions | 'dynamic';
|
|
@@ -32,10 +34,11 @@ export interface Theme {
|
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
|
-
* Generally a partial theme is comprised of partial versions of the objects within the theme, with the exception of typography
|
|
37
|
+
* Generally a partial theme is comprised of partial versions of the objects within the theme, with the exception of shadow and typography
|
|
36
38
|
* which has additional levels of hierarchy
|
|
37
39
|
*/
|
|
38
|
-
export declare type PartialTheme = Omit<TwoLevelPartial<Theme>, 'typography' | 'host'> & {
|
|
40
|
+
export declare type PartialTheme = Omit<TwoLevelPartial<Theme>, 'shadows' | 'typography' | 'host'> & {
|
|
41
|
+
shadows?: PartialShadowDefinition;
|
|
39
42
|
typography?: PartialTypography;
|
|
40
43
|
host?: TwoLevelPartial<Theme['host']>;
|
|
41
44
|
};
|
package/lib/Theme.types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.types.d.ts","sourceRoot":"","sources":["../src/Theme.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Theme.types.d.ts","sourceRoot":"","sources":["../src/Theme.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,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,cAAc,CAAC;AAElE,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAE3C;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -82,6 +82,10 @@ export interface FontWeights {
|
|
|
82
82
|
* A font weight, used when defining a visual element in a theme.
|
|
83
83
|
*/
|
|
84
84
|
export declare type FontWeight = keyof FontWeights | FontWeightValue;
|
|
85
|
+
/**
|
|
86
|
+
* A font line height value, specified in CSS pixels (px).
|
|
87
|
+
*/
|
|
88
|
+
export declare type FontLightHeight = number;
|
|
85
89
|
/**
|
|
86
90
|
* A font variant value.
|
|
87
91
|
*/
|
|
@@ -107,6 +111,19 @@ export interface Variants {
|
|
|
107
111
|
heroSemibold: VariantValue;
|
|
108
112
|
heroLargeStandard: VariantValue;
|
|
109
113
|
heroLargeSemibold: VariantValue;
|
|
114
|
+
caption1?: VariantValue;
|
|
115
|
+
body1?: VariantValue;
|
|
116
|
+
body1Strong?: VariantValue;
|
|
117
|
+
body2?: VariantValue;
|
|
118
|
+
body2Strong?: VariantValue;
|
|
119
|
+
subtitle1?: VariantValue;
|
|
120
|
+
subtitle1Strong?: VariantValue;
|
|
121
|
+
subtitle2?: VariantValue;
|
|
122
|
+
subtitle2Strong?: VariantValue;
|
|
123
|
+
title1?: VariantValue;
|
|
124
|
+
title1Strong?: VariantValue;
|
|
125
|
+
largeTitle?: VariantValue;
|
|
126
|
+
display?: VariantValue;
|
|
110
127
|
}
|
|
111
128
|
/**
|
|
112
129
|
* A font variant, used when defining a visual element in a theme.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.types.d.ts","sourceRoot":"","sources":["../src/Typography.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oBAAY,eAAe,GAAG,MAAM,CAAC;AAEr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YAAY,CAAC;IAC/B,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED;;GAEG;AACH,oBAAY,OAAO,GAAG,MAAM,QAAQ,GAAG,YAAY,CAAC;AAEpD;;;;;GAKG;AAEH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,oBAAY,UAAU,GAAG,WAAW,CAAC;AAErC;;GAEG;AACH,oBAAY,iBAAiB,GAAG;KAAG,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { AliasColorTokens, Color, ControlColorTokens, FabricWebPalette, Palette, PaletteBackgroundColors, PaletteTextColors, PartialPalette, ThemeColorDefinition, } from './Color.types';
|
|
2
|
+
export type { ShadowValue, ShadowToken, BaseShadowAliasTokens, ThemeShadowDefinition, PartialShadowDefinition } from './Shadow.types';
|
|
2
3
|
export type { AppearanceOptions, PartialTheme, Spacing, Theme, ThemeOptions } from './Theme.types';
|
|
3
4
|
export type { FontFamilies, FontFamily, FontFamilyValue, FontSize, FontSizeValuePoints, FontSizes, FontWeight, FontWeightValue, FontWeights, PartialTypography, TextStyling, Typography, Variant, VariantValue, Variants, } from './Typography.types';
|
|
4
5
|
export { ThemeContext, useTheme } from './context';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,KAAK,EACL,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACnG,YAAY,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,QAAQ,EACR,mBAAmB,EACnB,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,OAAO,EACP,YAAY,EACZ,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,KAAK,EACL,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACtI,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACnG,YAAY,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,QAAQ,EACR,mBAAmB,EACnB,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,OAAO,EACP,YAAY,EACZ,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ColorValue } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Base structure of a shadow style, which has x and y offset, blur amount, and color specified
|
|
4
|
+
*/
|
|
5
|
+
export interface ShadowValue {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
blur: number;
|
|
9
|
+
color: ColorValue;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* In FluentUI a shadow is specified as having two parts - an ambient shadow and a key shadow.
|
|
13
|
+
* The ambient shadow is shading around the entire control
|
|
14
|
+
* The key shadow is the offset shadow which gives the control a sense of elevation or distance from the page
|
|
15
|
+
*/
|
|
16
|
+
export interface ShadowToken {
|
|
17
|
+
ambient: ShadowValue;
|
|
18
|
+
key: ShadowValue;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Shadows alias tokens as defined by FluentUI v2 design system
|
|
22
|
+
*/
|
|
23
|
+
export interface BaseShadowAliasTokens {
|
|
24
|
+
shadow2: ShadowToken;
|
|
25
|
+
shadow4: ShadowToken;
|
|
26
|
+
shadow8: ShadowToken;
|
|
27
|
+
shadow16: ShadowToken;
|
|
28
|
+
shadow28: ShadowToken;
|
|
29
|
+
shadow64: ShadowToken;
|
|
30
|
+
shadow2brand: ShadowToken;
|
|
31
|
+
shadow4brand: ShadowToken;
|
|
32
|
+
shadow8brand: ShadowToken;
|
|
33
|
+
shadow16brand: ShadowToken;
|
|
34
|
+
shadow28brand: ShadowToken;
|
|
35
|
+
shadow64brand: ShadowToken;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Shadows on the theme object. This allows for flexibility on entries but retains base alias tokens
|
|
39
|
+
*/
|
|
40
|
+
export declare type ThemeShadowDefinition = BaseShadowAliasTokens & {
|
|
41
|
+
[key: string]: ShadowToken;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* A partially specified shadow definition.
|
|
45
|
+
*/
|
|
46
|
+
export declare type PartialShadowDefinition = {
|
|
47
|
+
[P in keyof ThemeShadowDefinition]?: Partial<ThemeShadowDefinition[P]>;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=Shadow.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shadow.types.d.ts","sourceRoot":"","sources":["../src/Shadow.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,WAAW,CAAC;IACrB,GAAG,EAAE,WAAW,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,EAAE,WAAW,CAAC;IAC1B,YAAY,EAAE,WAAW,CAAC;IAC1B,YAAY,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,WAAW,CAAC;IAC3B,aAAa,EAAE,WAAW,CAAC;IAC3B,aAAa,EAAE,WAAW,CAAC;CAC5B;AAED;;GAEG;AACH,oBAAY,qBAAqB,GAAG,qBAAqB,GAAG;IAC1D,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,uBAAuB,GAAG;KAAG,CAAC,IAAI,MAAM,qBAAqB,CAAC,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shadow.types.js","sourceRoot":"","sources":["../src/Shadow.types.ts"],"names":[],"mappings":""}
|
|
@@ -2,6 +2,7 @@ import { ThemeColorDefinition } from './Color.types';
|
|
|
2
2
|
import { OfficePalette } from './palette.types';
|
|
3
3
|
import { Typography, PartialTypography } from './Typography.types';
|
|
4
4
|
import { ColorValue } from 'react-native';
|
|
5
|
+
import { PartialShadowDefinition, ThemeShadowDefinition } from './Shadow.types';
|
|
5
6
|
declare type TwoLevelPartial<T> = {
|
|
6
7
|
[K in keyof T]?: Partial<T[K]>;
|
|
7
8
|
};
|
|
@@ -22,6 +23,7 @@ export interface Theme {
|
|
|
22
23
|
components: {
|
|
23
24
|
[key: string]: object;
|
|
24
25
|
};
|
|
26
|
+
shadows: ThemeShadowDefinition;
|
|
25
27
|
spacing: Spacing;
|
|
26
28
|
host: {
|
|
27
29
|
appearance: AppearanceOptions | 'dynamic';
|
|
@@ -32,10 +34,11 @@ export interface Theme {
|
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
|
-
* Generally a partial theme is comprised of partial versions of the objects within the theme, with the exception of typography
|
|
37
|
+
* Generally a partial theme is comprised of partial versions of the objects within the theme, with the exception of shadow and typography
|
|
36
38
|
* which has additional levels of hierarchy
|
|
37
39
|
*/
|
|
38
|
-
export declare type PartialTheme = Omit<TwoLevelPartial<Theme>, 'typography' | 'host'> & {
|
|
40
|
+
export declare type PartialTheme = Omit<TwoLevelPartial<Theme>, 'shadows' | 'typography' | 'host'> & {
|
|
41
|
+
shadows?: PartialShadowDefinition;
|
|
39
42
|
typography?: PartialTypography;
|
|
40
43
|
host?: TwoLevelPartial<Theme['host']>;
|
|
41
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.types.d.ts","sourceRoot":"","sources":["../src/Theme.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Theme.types.d.ts","sourceRoot":"","sources":["../src/Theme.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEhF,aAAK,eAAe,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAE7D,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,oBAAoB,CAAC;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE;QAGJ,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAAC;QAG1C,OAAO,CAAC,EAAE,aAAa,CAAC;QACxB,MAAM,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;SAAE,CAAC;KACxC,CAAC;CACH;AAED;;;GAGG;AACH,oBAAY,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC,GAAG;IAC3F,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,IAAI,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CACvC,CAAC;AAEF,oBAAY,iBAAiB,GAAG,OAAO,GAAG,MAAM,GAAG,cAAc,CAAC;AAElE,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAE3C;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -82,6 +82,10 @@ export interface FontWeights {
|
|
|
82
82
|
* A font weight, used when defining a visual element in a theme.
|
|
83
83
|
*/
|
|
84
84
|
export declare type FontWeight = keyof FontWeights | FontWeightValue;
|
|
85
|
+
/**
|
|
86
|
+
* A font line height value, specified in CSS pixels (px).
|
|
87
|
+
*/
|
|
88
|
+
export declare type FontLightHeight = number;
|
|
85
89
|
/**
|
|
86
90
|
* A font variant value.
|
|
87
91
|
*/
|
|
@@ -107,6 +111,19 @@ export interface Variants {
|
|
|
107
111
|
heroSemibold: VariantValue;
|
|
108
112
|
heroLargeStandard: VariantValue;
|
|
109
113
|
heroLargeSemibold: VariantValue;
|
|
114
|
+
caption1?: VariantValue;
|
|
115
|
+
body1?: VariantValue;
|
|
116
|
+
body1Strong?: VariantValue;
|
|
117
|
+
body2?: VariantValue;
|
|
118
|
+
body2Strong?: VariantValue;
|
|
119
|
+
subtitle1?: VariantValue;
|
|
120
|
+
subtitle1Strong?: VariantValue;
|
|
121
|
+
subtitle2?: VariantValue;
|
|
122
|
+
subtitle2Strong?: VariantValue;
|
|
123
|
+
title1?: VariantValue;
|
|
124
|
+
title1Strong?: VariantValue;
|
|
125
|
+
largeTitle?: VariantValue;
|
|
126
|
+
display?: VariantValue;
|
|
110
127
|
}
|
|
111
128
|
/**
|
|
112
129
|
* A font variant, used when defining a visual element in a theme.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.types.d.ts","sourceRoot":"","sources":["../src/Typography.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oBAAY,eAAe,GAAG,MAAM,CAAC;AAErC;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,eAAe,CAAC;IACzB,SAAS,EAAE,eAAe,CAAC;IAC3B,OAAO,EAAE,eAAe,CAAC;IACzB,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,EAAE,eAAe,CAAC;IAC3B,KAAK,EAAE,eAAe,CAAC;CACxB;AAED;;GAEG;AACH,oBAAY,UAAU,GAAG,MAAM,YAAY,GAAG,eAAe,CAAC;AAE9D;;GAEG;AACH,oBAAY,mBAAmB,GAAG,MAAM,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,OA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AS,CAAC;IACjB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,oBAAY,UAAU,GAAG,WAAW,CAAC;AAErC;;GAEG;AACH,oBAAY,iBAAiB,GAAG;KAAG,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC"}
|
package/lib-commonjs/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { AliasColorTokens, Color, ControlColorTokens, FabricWebPalette, Palette, PaletteBackgroundColors, PaletteTextColors, PartialPalette, ThemeColorDefinition, } from './Color.types';
|
|
2
|
+
export type { ShadowValue, ShadowToken, BaseShadowAliasTokens, ThemeShadowDefinition, PartialShadowDefinition } from './Shadow.types';
|
|
2
3
|
export type { AppearanceOptions, PartialTheme, Spacing, Theme, ThemeOptions } from './Theme.types';
|
|
3
4
|
export type { FontFamilies, FontFamily, FontFamilyValue, FontSize, FontSizeValuePoints, FontSizes, FontWeight, FontWeightValue, FontWeights, PartialTypography, TextStyling, Typography, Variant, VariantValue, Variants, } from './Typography.types';
|
|
4
5
|
export { ThemeContext, useTheme } from './context';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,KAAK,EACL,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACnG,YAAY,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,QAAQ,EACR,mBAAmB,EACnB,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,OAAO,EACP,YAAY,EACZ,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,KAAK,EACL,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACtI,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACnG,YAAY,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,QAAQ,EACR,mBAAmB,EACnB,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,OAAO,EACP,YAAY,EACZ,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AA8BA,qCAAmD;AAA1C,uGAAA,YAAY,OAAA;AAAE,mGAAA,QAAQ,OAAA"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ColorValue } from 'react-native';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Base structure of a shadow style, which has x and y offset, blur amount, and color specified
|
|
5
|
+
*/
|
|
6
|
+
export interface ShadowValue {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
blur: number;
|
|
10
|
+
color: ColorValue;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* In FluentUI a shadow is specified as having two parts - an ambient shadow and a key shadow.
|
|
15
|
+
* The ambient shadow is shading around the entire control
|
|
16
|
+
* The key shadow is the offset shadow which gives the control a sense of elevation or distance from the page
|
|
17
|
+
*/
|
|
18
|
+
export interface ShadowToken {
|
|
19
|
+
ambient: ShadowValue;
|
|
20
|
+
key: ShadowValue;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Shadows alias tokens as defined by FluentUI v2 design system
|
|
25
|
+
*/
|
|
26
|
+
export interface BaseShadowAliasTokens {
|
|
27
|
+
shadow2: ShadowToken;
|
|
28
|
+
shadow4: ShadowToken;
|
|
29
|
+
shadow8: ShadowToken;
|
|
30
|
+
shadow16: ShadowToken;
|
|
31
|
+
shadow28: ShadowToken;
|
|
32
|
+
shadow64: ShadowToken;
|
|
33
|
+
shadow2brand: ShadowToken;
|
|
34
|
+
shadow4brand: ShadowToken;
|
|
35
|
+
shadow8brand: ShadowToken;
|
|
36
|
+
shadow16brand: ShadowToken;
|
|
37
|
+
shadow28brand: ShadowToken;
|
|
38
|
+
shadow64brand: ShadowToken;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Shadows on the theme object. This allows for flexibility on entries but retains base alias tokens
|
|
43
|
+
*/
|
|
44
|
+
export type ThemeShadowDefinition = BaseShadowAliasTokens & {
|
|
45
|
+
[key: string]: ShadowToken;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* A partially specified shadow definition.
|
|
50
|
+
*/
|
|
51
|
+
export type PartialShadowDefinition = { [P in keyof ThemeShadowDefinition]?: Partial<ThemeShadowDefinition[P]> };
|
package/src/Theme.types.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ThemeColorDefinition } from './Color.types';
|
|
|
2
2
|
import { OfficePalette } from './palette.types';
|
|
3
3
|
import { Typography, PartialTypography } from './Typography.types';
|
|
4
4
|
import { ColorValue } from 'react-native';
|
|
5
|
+
import { PartialShadowDefinition, ThemeShadowDefinition } from './Shadow.types';
|
|
5
6
|
|
|
6
7
|
type TwoLevelPartial<T> = { [K in keyof T]?: Partial<T[K]> };
|
|
7
8
|
|
|
@@ -23,6 +24,7 @@ export interface Theme {
|
|
|
23
24
|
components: {
|
|
24
25
|
[key: string]: object; // eslint-disable-line @typescript-eslint/ban-types
|
|
25
26
|
};
|
|
27
|
+
shadows: ThemeShadowDefinition;
|
|
26
28
|
spacing: Spacing;
|
|
27
29
|
host: {
|
|
28
30
|
// appearance of the theme, this corresponds to the react-native Appearance library values, though can be overwritten
|
|
@@ -36,10 +38,11 @@ export interface Theme {
|
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
/**
|
|
39
|
-
* Generally a partial theme is comprised of partial versions of the objects within the theme, with the exception of typography
|
|
41
|
+
* Generally a partial theme is comprised of partial versions of the objects within the theme, with the exception of shadow and typography
|
|
40
42
|
* which has additional levels of hierarchy
|
|
41
43
|
*/
|
|
42
|
-
export type PartialTheme = Omit<TwoLevelPartial<Theme>, 'typography' | 'host'> & {
|
|
44
|
+
export type PartialTheme = Omit<TwoLevelPartial<Theme>, 'shadows' | 'typography' | 'host'> & {
|
|
45
|
+
shadows?: PartialShadowDefinition;
|
|
43
46
|
typography?: PartialTypography;
|
|
44
47
|
host?: TwoLevelPartial<Theme['host']>;
|
|
45
48
|
};
|
package/src/Typography.types.ts
CHANGED
|
@@ -91,6 +91,11 @@ export interface FontWeights {
|
|
|
91
91
|
*/
|
|
92
92
|
export type FontWeight = keyof FontWeights | FontWeightValue;
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* A font line height value, specified in CSS pixels (px).
|
|
96
|
+
*/
|
|
97
|
+
export type FontLightHeight = number;
|
|
98
|
+
|
|
94
99
|
/**
|
|
95
100
|
* A font variant value.
|
|
96
101
|
*/
|
|
@@ -117,6 +122,20 @@ export interface Variants {
|
|
|
117
122
|
heroSemibold: VariantValue;
|
|
118
123
|
heroLargeStandard: VariantValue;
|
|
119
124
|
heroLargeSemibold: VariantValue;
|
|
125
|
+
//v2 variants
|
|
126
|
+
caption1?: VariantValue;
|
|
127
|
+
body1?: VariantValue;
|
|
128
|
+
body1Strong?: VariantValue;
|
|
129
|
+
body2?: VariantValue;
|
|
130
|
+
body2Strong?: VariantValue;
|
|
131
|
+
subtitle1?: VariantValue;
|
|
132
|
+
subtitle1Strong?: VariantValue;
|
|
133
|
+
subtitle2?: VariantValue;
|
|
134
|
+
subtitle2Strong?: VariantValue;
|
|
135
|
+
title1?: VariantValue;
|
|
136
|
+
title1Strong?: VariantValue;
|
|
137
|
+
largeTitle?: VariantValue;
|
|
138
|
+
display?: VariantValue;
|
|
120
139
|
}
|
|
121
140
|
|
|
122
141
|
/**
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export type {
|
|
|
9
9
|
PartialPalette,
|
|
10
10
|
ThemeColorDefinition,
|
|
11
11
|
} from './Color.types';
|
|
12
|
+
export type { ShadowValue, ShadowToken, BaseShadowAliasTokens, ThemeShadowDefinition, PartialShadowDefinition } from './Shadow.types';
|
|
12
13
|
export type { AppearanceOptions, PartialTheme, Spacing, Theme, ThemeOptions } from './Theme.types';
|
|
13
14
|
export type {
|
|
14
15
|
FontFamilies,
|