Android tokens integration - set1 (#2159)

* aliasHookedIn

* fullSet

* cleanups

* cleanups

* review comments

* cleanup

* reviewComments

* reovingShadowCode

* updateStale

* Change files

* prettierfix

* prettierfix

* CIFailures

Co-authored-by: Ankita Raj <ankraj@microsoft.com>
This commit is contained in:
ankraj12 2022-09-30 13:15:27 +05:30 коммит произвёл GitHub
Родитель d63e528779
Коммит 609f798875
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
55 изменённых файлов: 1467 добавлений и 3227 удалений

3
.idea/.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

6
.idea/vcs.xml Normal file
Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Added theme color tokens support for android",
"packageName": "@fluentui-react-native/android-theme",
"email": "email not defined",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "snapshots udpate",
"packageName": "@fluentui-react-native/apple-theme",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "mergeandfix",
"packageName": "@fluentui-react-native/avatar",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Snapshots update",
"packageName": "@fluentui-react-native/badge",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Snapshots update",
"packageName": "@fluentui-react-native/button",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Used alias tokens from theme-tokens pacakge",
"packageName": "@fluentui-react-native/default-theme",
"email": "email not defined",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "snapshots update",
"packageName": "@fluentui-react-native/experimental-radio-group",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "snapshots update",
"packageName": "@fluentui-react-native/experimental-tabs",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "snapshots update",
"packageName": "@fluentui-react-native/link",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "snapsots update",
"packageName": "@fluentui-react-native/menu",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "snapshots update",
"packageName": "@fluentui-react-native/stack",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "snapshosts update",
"packageName": "@fluentui-react-native/switch",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "snapshots update",
"packageName": "@fluentui-react-native/tabs",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "snapshots update",
"packageName": "@fluentui-react-native/text",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Added implmemtations for android tokens",
"packageName": "@fluentui-react-native/theme-tokens",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Made color type properties optional",
"packageName": "@fluentui-react-native/theme-types",
"email": "email not defined",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Added new api fro android",
"packageName": "@fluentui-react-native/theming-utils",
"email": "email not defined",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "snapshots",
"packageName": "@fluentui-react-native/win32-theme",
"email": "email not defined",
"dependentChangeType": "none"
}

Просмотреть файл

@ -33,7 +33,7 @@ exports[`Avatar rendering renders Avatar 1`] = `
Object {
"alignItems": "center",
"aspectRatio": 1,
"backgroundColor": "#e6e6e6",
"backgroundColor": "#5c5c5c",
"borderColor": "#d1d1d1",
"borderRadius": 9999,
"borderWidth": 0,
@ -47,7 +47,7 @@ exports[`Avatar rendering renders Avatar 1`] = `
align="xMidYMid"
bbHeight={16}
bbWidth={16}
color={-10395295}
color={-8355712}
focusable={false}
height={16}
meetOrSlice={0}
@ -66,7 +66,7 @@ exports[`Avatar rendering renders Avatar 1`] = `
},
]
}
tintColor={-10395295}
tintColor={-8355712}
vbHeight={16}
vbWidth={14}
width={16}

Просмотреть файл

@ -8,8 +8,7 @@ exports[`Badge component tests Badge all props 1`] = `
Object {
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "transparent",
"borderColor": "transparent",
"backgroundColor": undefined,
"borderRadius": 4,
"borderWidth": 1,
"bottom": 0,
@ -43,9 +42,8 @@ exports[`Badge component tests Badge all props 1`] = `
numberOfLines={0}
style={
Object {
"color": "#ffffff",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
"marginEnd": 2,
@ -84,9 +82,8 @@ exports[`Badge component tests Badge tokens 1`] = `
numberOfLines={0}
style={
Object {
"color": "#ffffff",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
}
@ -103,8 +100,7 @@ exports[`Badge component tests Empty Badge 1`] = `
Object {
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0078d4",
"borderColor": "transparent",
"backgroundColor": undefined,
"borderRadius": 9999,
"borderWidth": 1,
"bottom": 0,
@ -130,8 +126,7 @@ exports[`CounterBadge component tests CounterBadge all props 1`] = `
Object {
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "transparent",
"borderColor": "transparent",
"backgroundColor": undefined,
"borderRadius": 4,
"borderWidth": 1,
"bottom": 0,
@ -163,9 +158,9 @@ exports[`CounterBadge component tests CounterBadge all props 1`] = `
numberOfLines={0}
style={
Object {
"color": "#ffffff",
"color": "#323130",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontStyle": undefined,
"fontWeight": "400",
"letterSpacing": undefined,
@ -187,8 +182,7 @@ exports[`CounterBadge component tests CounterBadge shows 99+ 1`] = `
Object {
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0078d4",
"borderColor": "transparent",
"backgroundColor": undefined,
"borderRadius": 9999,
"borderWidth": 1,
"bottom": 0,
@ -206,9 +200,9 @@ exports[`CounterBadge component tests CounterBadge shows 99+ 1`] = `
numberOfLines={0}
style={
Object {
"color": "#ffffff",
"color": "#323130",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontStyle": undefined,
"fontWeight": "400",
"letterSpacing": undefined,
@ -230,8 +224,7 @@ exports[`CounterBadge component tests CounterBadge shows 1000+ 1`] = `
Object {
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0078d4",
"borderColor": "transparent",
"backgroundColor": undefined,
"borderRadius": 9999,
"borderWidth": 1,
"bottom": 0,
@ -249,9 +242,9 @@ exports[`CounterBadge component tests CounterBadge shows 1000+ 1`] = `
numberOfLines={0}
style={
Object {
"color": "#ffffff",
"color": "#323130",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontStyle": undefined,
"fontWeight": "400",
"letterSpacing": undefined,
@ -274,8 +267,7 @@ exports[`CounterBadge component tests CounterBadge shows zero 1`] = `
Object {
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#0078d4",
"borderColor": "transparent",
"backgroundColor": undefined,
"borderRadius": 9999,
"borderWidth": 1,
"bottom": 0,
@ -293,9 +285,9 @@ exports[`CounterBadge component tests CounterBadge shows zero 1`] = `
numberOfLines={0}
style={
Object {
"color": "#ffffff",
"color": "#323130",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontStyle": undefined,
"fontWeight": "400",
"letterSpacing": undefined,
@ -336,9 +328,9 @@ exports[`CounterBadge component tests CounterBadge tokens 1`] = `
numberOfLines={0}
style={
Object {
"color": "#ffffff",
"color": "#323130",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontStyle": undefined,
"fontWeight": "400",
"letterSpacing": undefined,
@ -365,7 +357,7 @@ exports[`PresenceBadge component tests PresenceBadge props 1`] = `
"alignItems": "center",
"alignSelf": "flex-start",
"aspectRatio": 1,
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderColor": "#ffffff",
"borderRadius": 9999,
"borderWidth": 2,

Просмотреть файл

@ -74,7 +74,7 @@ exports[`CompoundButton default 1`] = `
style={
Object {
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
"marginBottom": 0,

Просмотреть файл

@ -48,7 +48,7 @@ exports[`Custom FAB with no shadow(iOS) 1`] = `
Object {
"color": "#ffffff",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
"marginBottom": 0,
@ -166,7 +166,7 @@ exports[`Default FAB (iOS) 1`] = `
Object {
"color": "#ffffff",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
"marginBottom": 0,

Просмотреть файл

@ -429,7 +429,7 @@ exports[`Button component tests Button small 1`] = `
Object {
"color": "#323130",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
"marginBottom": 0,

Просмотреть файл

@ -34,7 +34,7 @@ exports[`Link all props 1`] = `
"borderWidth": 2,
"color": "#0078d4",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
"textAlign": "center",
@ -81,7 +81,7 @@ exports[`Link with child 1`] = `
"borderWidth": 2,
"color": "#0078d4",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
"textAlign": "center",

Просмотреть файл

@ -162,7 +162,7 @@ Array [
<View
style={
Object {
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"display": "flex",
"maxWidth": 300,
"minWidth": 128,
@ -195,7 +195,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -211,7 +211,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -249,7 +249,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -266,7 +266,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#bdbdbd",
"color": "#323130",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -383,7 +383,7 @@ Array [
<View
style={
Object {
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"display": "flex",
"maxWidth": 300,
"minWidth": 128,
@ -416,7 +416,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -432,7 +432,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -549,7 +549,7 @@ Array [
<View
style={
Object {
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"display": "flex",
"maxWidth": 300,
"minWidth": 128,
@ -590,7 +590,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -605,7 +605,7 @@ Array [
align="xMidYMid"
bbHeight={16}
bbWidth={16}
color={-12434878}
color={-10395295}
focusable={false}
height={16}
meetOrSlice={0}
@ -628,7 +628,7 @@ Array [
},
]
}
tintColor={-12434878}
tintColor={-10395295}
vbHeight={16}
vbWidth={16}
width={16}
@ -658,7 +658,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -716,7 +716,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -732,7 +732,6 @@ Array [
align="xMidYMid"
bbHeight={16}
bbWidth={16}
color={-4342339}
focusable={false}
height={16}
meetOrSlice={0}
@ -755,7 +754,6 @@ Array [
},
]
}
tintColor={-4342339}
vbHeight={16}
vbWidth={16}
width={16}
@ -785,7 +783,6 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#bdbdbd",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -902,7 +899,7 @@ Array [
<View
style={
Object {
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"display": "flex",
"maxWidth": 300,
"minWidth": 128,
@ -943,7 +940,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -958,7 +955,7 @@ Array [
align="xMidYMid"
bbHeight={16}
bbWidth={16}
color={-12434878}
color={-10395295}
focusable={false}
height={16}
meetOrSlice={0}
@ -981,7 +978,7 @@ Array [
},
]
}
tintColor={-12434878}
tintColor={-10395295}
vbHeight={16}
vbWidth={16}
width={16}
@ -1011,7 +1008,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -1068,7 +1065,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -1084,7 +1081,7 @@ Array [
align="xMidYMid"
bbHeight={16}
bbWidth={16}
color={-12434878}
color={-10395295}
focusable={false}
height={16}
meetOrSlice={0}
@ -1107,7 +1104,7 @@ Array [
},
]
}
tintColor={-12434878}
tintColor={-10395295}
vbHeight={16}
vbWidth={16}
width={16}
@ -1137,7 +1134,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -1254,7 +1251,7 @@ Array [
<View
style={
Object {
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"display": "flex",
"maxWidth": 300,
"minWidth": 128,
@ -1295,7 +1292,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -1310,7 +1307,7 @@ Array [
align="xMidYMid"
bbHeight={16}
bbWidth={16}
color={-12434878}
color={-10395295}
focusable={false}
height={16}
meetOrSlice={0}
@ -1333,7 +1330,7 @@ Array [
},
]
}
tintColor={-12434878}
tintColor={-10395295}
vbHeight={16}
vbWidth={16}
width={16}
@ -1363,7 +1360,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -1420,7 +1417,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -1436,7 +1433,7 @@ Array [
align="xMidYMid"
bbHeight={16}
bbWidth={16}
color={-12434878}
color={-10395295}
focusable={false}
height={16}
meetOrSlice={0}
@ -1459,7 +1456,7 @@ Array [
},
]
}
tintColor={-12434878}
tintColor={-10395295}
vbHeight={16}
vbWidth={16}
width={16}
@ -1489,7 +1486,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -1606,7 +1603,7 @@ Array [
<View
style={
Object {
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"display": "flex",
"maxWidth": 300,
"minWidth": 128,
@ -1647,7 +1644,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -1662,7 +1659,7 @@ Array [
align="xMidYMid"
bbHeight={16}
bbWidth={16}
color={-12434878}
color={-10395295}
focusable={false}
height={16}
meetOrSlice={0}
@ -1685,7 +1682,7 @@ Array [
},
]
}
tintColor={-12434878}
tintColor={-10395295}
vbHeight={16}
vbWidth={16}
width={16}
@ -1715,7 +1712,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -1760,7 +1757,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -1776,7 +1773,7 @@ Array [
align="xMidYMid"
bbHeight={16}
bbWidth={16}
color={-12434878}
color={-10395295}
focusable={false}
height={16}
meetOrSlice={0}
@ -1799,7 +1796,7 @@ Array [
},
]
}
tintColor={-12434878}
tintColor={-10395295}
vbHeight={16}
vbWidth={16}
width={16}
@ -1829,7 +1826,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -1946,7 +1943,7 @@ Array [
<View
style={
Object {
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"display": "flex",
"maxWidth": 300,
"minWidth": 128,
@ -1979,7 +1976,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -1995,7 +1992,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -2037,7 +2034,7 @@ Array [
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": "#000000",
"borderRadius": 4,
"display": "flex",
"flexDirection": "row",
@ -2053,7 +2050,7 @@ Array [
numberOfLines={0}
style={
Object {
"color": "#424242",
"color": "#616161",
"flexGrow": 1,
"fontFamily": "Segoe UI",
"fontSize": 14,
@ -2068,7 +2065,7 @@ Array [
align="xMidYMid"
bbHeight={16}
bbWidth={16}
color={-12434878}
color={-10395295}
focusable={false}
height={16}
meetOrSlice={0}
@ -2087,7 +2084,7 @@ Array [
},
]
}
tintColor={-12434878}
tintColor={-10395295}
vbHeight={16}
vbWidth={16}
width={16}

Просмотреть файл

@ -15,7 +15,7 @@ exports[`Stack with tokens 1`] = `
Object {
"color": "#323130",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
}
@ -28,7 +28,7 @@ exports[`Stack with tokens 1`] = `
Object {
"color": "#323130",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
"marginTop": 8,
@ -42,7 +42,7 @@ exports[`Stack with tokens 1`] = `
Object {
"color": "#323130",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
"marginTop": 8,

Просмотреть файл

@ -159,7 +159,7 @@ exports[`Tabs FocusZone props 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": "brandStroke1",
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,
@ -333,7 +333,7 @@ exports[`Tabs default props 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": "brandStroke1",
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,
@ -720,7 +720,7 @@ exports[`Tabs disabled 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": "brandStroke1",
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,
@ -838,7 +838,7 @@ exports[`Tabs header text and count 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": "brandStroke1",
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,
@ -1113,7 +1113,7 @@ exports[`Tabs headers only 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": "brandStroke1",
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,
@ -1372,7 +1372,7 @@ exports[`Tabs props 1`] = `
<Text
style={
Object {
"color": "#bdbdbd",
"color": "neutralForegroundDisabled",
"fontFamily": "Segoe UI",
"fontSize": 14,
"fontWeight": "400",
@ -1473,7 +1473,7 @@ exports[`Tabs props 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": "brandStroke1",
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,

Просмотреть файл

@ -54,7 +54,7 @@ exports[`Text component tests Text default 1`] = `
Object {
"color": "#323130",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontStyle": undefined,
"fontWeight": "400",
"letterSpacing": undefined,
@ -77,7 +77,7 @@ exports[`Text component tests Text variants render correctly with style 1`] = `
Object {
"color": "blue",
"fontFamily": "Segoe UI",
"fontSize": 40,
"fontSize": 60,
"fontWeight": "600",
"margin": 0,
"marginBottom": 8,

Просмотреть файл

@ -0,0 +1,27 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`RadioGroup component tests RadioGroup default 1`] = `
<View
accessibilityRole="radiogroup"
accessibilityState={
Object {
"disabled": false,
"required": false,
}
}
accessible={true}
style={
Object {
"alignItems": "flex-start",
"display": "flex",
"flexDirection": "column",
}
}
>
<RCTFocusZone
navigateAtEnd="NavigateWrap"
>
Your component
</RCTFocusZone>
</View>
`;

Просмотреть файл

@ -35,7 +35,7 @@ exports[`Switch Default 1`] = `
Object {
"alignItems": "center",
"alignSelf": "flex-start",
"borderColor": "transparent",
"borderColor": undefined,
"borderRadius": 4,
"borderWidth": 2,
"flexDirection": "row-reverse",
@ -48,9 +48,9 @@ exports[`Switch Default 1`] = `
<Text
style={
Object {
"color": "#424242",
"color": "#616161",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
}
@ -70,7 +70,7 @@ exports[`Switch Default 1`] = `
style={
Object {
"alignItems": "center",
"backgroundColor": "#ffffff",
"backgroundColor": undefined,
"borderColor": "#616161",
"borderRadius": 10,
"borderWidth": 1,
@ -137,7 +137,7 @@ exports[`Switch Disabled 1`] = `
Object {
"alignItems": "center",
"alignSelf": "flex-start",
"borderColor": "transparent",
"borderColor": undefined,
"borderRadius": 4,
"borderWidth": 2,
"flexDirection": "row-reverse",
@ -150,9 +150,9 @@ exports[`Switch Disabled 1`] = `
<Text
style={
Object {
"color": "#424242",
"color": "#616161",
"fontFamily": "Segoe UI",
"fontSize": 12,
"fontSize": 13,
"fontWeight": "400",
"margin": 0,
}
@ -172,7 +172,7 @@ exports[`Switch Disabled 1`] = `
style={
Object {
"alignItems": "center",
"backgroundColor": "#f0f0f0",
"backgroundColor": "#e0e0e0",
"borderColor": "#e0e0e0",
"borderRadius": 10,
"borderWidth": 1,

Просмотреть файл

@ -169,7 +169,7 @@ exports[`Tabs FocusZone props 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": undefined,
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,
@ -354,7 +354,7 @@ exports[`Tabs default props 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": undefined,
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,
@ -746,7 +746,7 @@ exports[`Tabs disabled 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": undefined,
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,
@ -879,7 +879,7 @@ exports[`Tabs header text and count 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": undefined,
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,
@ -1168,7 +1168,7 @@ exports[`Tabs headers only 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": undefined,
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,
@ -1439,7 +1439,6 @@ exports[`Tabs props 1`] = `
numberOfLines={0}
style={
Object {
"color": "#bdbdbd",
"fontFamily": "Segoe UI",
"fontSize": 14,
"fontWeight": "400",
@ -1540,7 +1539,7 @@ exports[`Tabs props 1`] = `
style={
Object {
"alignSelf": "stretch",
"backgroundColor": "#0078d4",
"backgroundColor": undefined,
"borderRadius": 2,
"marginBottom": 2,
"marginHorizontal": 10,

Просмотреть файл

@ -31,8 +31,11 @@
"author": "",
"license": "MIT",
"dependencies": {
"@fluentui-react-native/theme-tokens": "^0.19.1",
"@fluentui-react-native/theme-types": ">=0.19.2 <1.0.0",
"@fluentui-react-native/theme": ">=0.7.3 <1.0.0"
"@fluentui-react-native/theme": ">=0.7.3 <1.0.0",
"@fluentui-react-native/theming-utils": ">=0.15.3 <1.0.0",
"@fluentui-react-native/memo-cache": "^1.1.7"
},
"devDependencies": {
"@fluentui-react-native/eslint-config-rules": "^0.1.1",

Просмотреть файл

@ -147,6 +147,60 @@ Object {
"menuItemBackgroundPressed": "transparent",
"menuItemText": "#E1E1E1",
"menuItemTextHovered": "#212121",
"neutralBackground1": "#ffffff",
"neutralBackground1Hover": undefined,
"neutralBackground1Pressed": "#e0e0e0",
"neutralBackground1Selected": "#ebebeb",
"neutralBackground2": "#ffffff",
"neutralBackground2Hover": undefined,
"neutralBackground2Pressed": "#e0e0e0",
"neutralBackground2Selected": "#ebebeb",
"neutralBackground3": "#ffffff",
"neutralBackground3Hover": undefined,
"neutralBackground3Pressed": "#e0e0e0",
"neutralBackground3Selected": "#ebebeb",
"neutralBackground4": "#fafafa",
"neutralBackground4Hover": undefined,
"neutralBackground4Pressed": "#dbdbdb",
"neutralBackground4Selected": "#e6e6e6",
"neutralBackground5": "#ebebeb",
"neutralBackground5Hover": undefined,
"neutralBackground5Pressed": "#d1d1d1",
"neutralBackground5Selected": "#dbdbdb",
"neutralBackground6": "#d1d1d1",
"neutralBackgroundDisabled": "#e0e0e0",
"neutralBackgroundInverted": "#242424",
"neutralForeground1": "#ffffff",
"neutralForeground1Hover": undefined,
"neutralForeground1Pressed": undefined,
"neutralForeground1Selected": undefined,
"neutralForeground2": "#d6d6d6",
"neutralForeground2BrandHover": undefined,
"neutralForeground2BrandPressed": undefined,
"neutralForeground2BrandSelected": undefined,
"neutralForeground2Hover": undefined,
"neutralForeground2Pressed": undefined,
"neutralForeground2Selected": undefined,
"neutralForeground3": "#adadad",
"neutralForeground3BrandHover": undefined,
"neutralForeground3BrandPressed": undefined,
"neutralForeground3BrandSelected": undefined,
"neutralForeground3Hover": undefined,
"neutralForeground3Pressed": undefined,
"neutralForeground3Selected": undefined,
"neutralForegroundInverted": "#ffffff",
"neutralStencil1": "#e6e6e6",
"neutralStencil2": "#fafafa",
"neutralStroke1": "#525252",
"neutralStroke1Hover": undefined,
"neutralStroke1Pressed": undefined,
"neutralStroke1Selected": undefined,
"neutralStroke2": "#3d3d3d",
"neutralStrokeAccessible": "#9e9e9e",
"neutralStrokeAccessibleHover": undefined,
"neutralStrokeAccessiblePressed": undefined,
"neutralStrokeAccessibleSelected": undefined,
"neutralStrokeDisabled": "#424242",
"personaActivityGlow": "#0086F0",
"personaActivityRing": "#000000",
"primaryButtonBackground": "#0086F0",
@ -648,6 +702,60 @@ Object {
"menuItemBackgroundPressed": "transparent",
"menuItemText": "#E1E1E1",
"menuItemTextHovered": "#212121",
"neutralBackground1": "#ffffff",
"neutralBackground1Hover": undefined,
"neutralBackground1Pressed": "#e0e0e0",
"neutralBackground1Selected": "#ebebeb",
"neutralBackground2": "#ffffff",
"neutralBackground2Hover": undefined,
"neutralBackground2Pressed": "#e0e0e0",
"neutralBackground2Selected": "#ebebeb",
"neutralBackground3": "#ffffff",
"neutralBackground3Hover": undefined,
"neutralBackground3Pressed": "#e0e0e0",
"neutralBackground3Selected": "#ebebeb",
"neutralBackground4": "#fafafa",
"neutralBackground4Hover": undefined,
"neutralBackground4Pressed": "#dbdbdb",
"neutralBackground4Selected": "#e6e6e6",
"neutralBackground5": "#ebebeb",
"neutralBackground5Hover": undefined,
"neutralBackground5Pressed": "#d1d1d1",
"neutralBackground5Selected": "#dbdbdb",
"neutralBackground6": "#d1d1d1",
"neutralBackgroundDisabled": "#e0e0e0",
"neutralBackgroundInverted": "#242424",
"neutralForeground1": "#ffffff",
"neutralForeground1Hover": undefined,
"neutralForeground1Pressed": undefined,
"neutralForeground1Selected": undefined,
"neutralForeground2": "#d6d6d6",
"neutralForeground2BrandHover": undefined,
"neutralForeground2BrandPressed": undefined,
"neutralForeground2BrandSelected": undefined,
"neutralForeground2Hover": undefined,
"neutralForeground2Pressed": undefined,
"neutralForeground2Selected": undefined,
"neutralForeground3": "#adadad",
"neutralForeground3BrandHover": undefined,
"neutralForeground3BrandPressed": undefined,
"neutralForeground3BrandSelected": undefined,
"neutralForeground3Hover": undefined,
"neutralForeground3Pressed": undefined,
"neutralForeground3Selected": undefined,
"neutralForegroundInverted": "#ffffff",
"neutralStencil1": "#e6e6e6",
"neutralStencil2": "#fafafa",
"neutralStroke1": "#525252",
"neutralStroke1Hover": undefined,
"neutralStroke1Pressed": undefined,
"neutralStroke1Selected": undefined,
"neutralStroke2": "#3d3d3d",
"neutralStrokeAccessible": "#9e9e9e",
"neutralStrokeAccessibleHover": undefined,
"neutralStrokeAccessiblePressed": undefined,
"neutralStrokeAccessibleSelected": undefined,
"neutralStrokeDisabled": "#424242",
"personaActivityGlow": "#0086F0",
"personaActivityRing": "#000000",
"primaryButtonBackground": "#0086F0",
@ -1149,6 +1257,60 @@ Object {
"menuItemBackgroundPressed": "transparent",
"menuItemText": "#E1E1E1",
"menuItemTextHovered": "#212121",
"neutralBackground1": "#ffffff",
"neutralBackground1Hover": undefined,
"neutralBackground1Pressed": "#e0e0e0",
"neutralBackground1Selected": "#ebebeb",
"neutralBackground2": "#ffffff",
"neutralBackground2Hover": undefined,
"neutralBackground2Pressed": "#e0e0e0",
"neutralBackground2Selected": "#ebebeb",
"neutralBackground3": "#ffffff",
"neutralBackground3Hover": undefined,
"neutralBackground3Pressed": "#e0e0e0",
"neutralBackground3Selected": "#ebebeb",
"neutralBackground4": "#fafafa",
"neutralBackground4Hover": undefined,
"neutralBackground4Pressed": "#dbdbdb",
"neutralBackground4Selected": "#e6e6e6",
"neutralBackground5": "#ebebeb",
"neutralBackground5Hover": undefined,
"neutralBackground5Pressed": "#d1d1d1",
"neutralBackground5Selected": "#dbdbdb",
"neutralBackground6": "#d1d1d1",
"neutralBackgroundDisabled": "#e0e0e0",
"neutralBackgroundInverted": "#242424",
"neutralForeground1": "#ffffff",
"neutralForeground1Hover": undefined,
"neutralForeground1Pressed": undefined,
"neutralForeground1Selected": undefined,
"neutralForeground2": "#d6d6d6",
"neutralForeground2BrandHover": undefined,
"neutralForeground2BrandPressed": undefined,
"neutralForeground2BrandSelected": undefined,
"neutralForeground2Hover": undefined,
"neutralForeground2Pressed": undefined,
"neutralForeground2Selected": undefined,
"neutralForeground3": "#adadad",
"neutralForeground3BrandHover": undefined,
"neutralForeground3BrandPressed": undefined,
"neutralForeground3BrandSelected": undefined,
"neutralForeground3Hover": undefined,
"neutralForeground3Pressed": undefined,
"neutralForeground3Selected": undefined,
"neutralForegroundInverted": "#ffffff",
"neutralStencil1": "#e6e6e6",
"neutralStencil2": "#fafafa",
"neutralStroke1": "#525252",
"neutralStroke1Hover": undefined,
"neutralStroke1Pressed": undefined,
"neutralStroke1Selected": undefined,
"neutralStroke2": "#3d3d3d",
"neutralStrokeAccessible": "#9e9e9e",
"neutralStrokeAccessibleHover": undefined,
"neutralStrokeAccessiblePressed": undefined,
"neutralStrokeAccessibleSelected": undefined,
"neutralStrokeDisabled": "#424242",
"personaActivityGlow": "#0086F0",
"personaActivityRing": "#000000",
"primaryButtonBackground": "#0086F0",
@ -1650,6 +1812,60 @@ Object {
"menuItemBackgroundPressed": "transparent",
"menuItemText": "#212121",
"menuItemTextHovered": "#212121",
"neutralBackground1": "#000000",
"neutralBackground1Hover": undefined,
"neutralBackground1Pressed": "#2e2e2e",
"neutralBackground1Selected": "#242424",
"neutralBackground2": "#1f1f1f",
"neutralBackground2Hover": undefined,
"neutralBackground2Pressed": "#4d4d4d",
"neutralBackground2Selected": "#424242",
"neutralBackground3": "#ffffff",
"neutralBackground3Hover": undefined,
"neutralBackground3Pressed": "#e0e0e0",
"neutralBackground3Selected": "#ebebeb",
"neutralBackground4": "#333333",
"neutralBackground4Hover": undefined,
"neutralBackground4Pressed": "#616161",
"neutralBackground4Selected": "#575757",
"neutralBackground5": "#3d3d3d",
"neutralBackground5Hover": undefined,
"neutralBackground5Pressed": "#6b6b6b",
"neutralBackground5Selected": "#616161",
"neutralBackground6": "#5c5c5c",
"neutralBackgroundDisabled": "#e0e0e0",
"neutralBackgroundInverted": "#575757",
"neutralForeground1": "#242424",
"neutralForeground1Hover": undefined,
"neutralForeground1Pressed": undefined,
"neutralForeground1Selected": undefined,
"neutralForeground2": "#616161",
"neutralForeground2BrandHover": undefined,
"neutralForeground2BrandPressed": undefined,
"neutralForeground2BrandSelected": undefined,
"neutralForeground2Hover": undefined,
"neutralForeground2Pressed": undefined,
"neutralForeground2Selected": undefined,
"neutralForeground3": "#808080",
"neutralForeground3BrandHover": undefined,
"neutralForeground3BrandPressed": undefined,
"neutralForeground3BrandSelected": undefined,
"neutralForeground3Hover": undefined,
"neutralForeground3Pressed": undefined,
"neutralForeground3Selected": undefined,
"neutralForegroundInverted": "#ffffff",
"neutralStencil1": "#575757",
"neutralStencil2": "#333333",
"neutralStroke1": "#d1d1d1",
"neutralStroke1Hover": undefined,
"neutralStroke1Pressed": undefined,
"neutralStroke1Selected": undefined,
"neutralStroke2": "#e0e0e0",
"neutralStrokeAccessible": "#616161",
"neutralStrokeAccessibleHover": undefined,
"neutralStrokeAccessiblePressed": undefined,
"neutralStrokeAccessibleSelected": undefined,
"neutralStrokeDisabled": "#e0e0e0",
"personaActivityGlow": "#0078D4",
"personaActivityRing": "#FFFFFF",
"primaryButtonBackground": "#0078D4",
@ -2151,6 +2367,60 @@ Object {
"menuItemBackgroundPressed": "transparent",
"menuItemText": "#E1E1E1",
"menuItemTextHovered": "#212121",
"neutralBackground1": "#ffffff",
"neutralBackground1Hover": undefined,
"neutralBackground1Pressed": "#e0e0e0",
"neutralBackground1Selected": "#ebebeb",
"neutralBackground2": "#ffffff",
"neutralBackground2Hover": undefined,
"neutralBackground2Pressed": "#e0e0e0",
"neutralBackground2Selected": "#ebebeb",
"neutralBackground3": "#ffffff",
"neutralBackground3Hover": undefined,
"neutralBackground3Pressed": "#e0e0e0",
"neutralBackground3Selected": "#ebebeb",
"neutralBackground4": "#fafafa",
"neutralBackground4Hover": undefined,
"neutralBackground4Pressed": "#dbdbdb",
"neutralBackground4Selected": "#e6e6e6",
"neutralBackground5": "#ebebeb",
"neutralBackground5Hover": undefined,
"neutralBackground5Pressed": "#d1d1d1",
"neutralBackground5Selected": "#dbdbdb",
"neutralBackground6": "#d1d1d1",
"neutralBackgroundDisabled": "#e0e0e0",
"neutralBackgroundInverted": "#242424",
"neutralForeground1": "#ffffff",
"neutralForeground1Hover": undefined,
"neutralForeground1Pressed": undefined,
"neutralForeground1Selected": undefined,
"neutralForeground2": "#d6d6d6",
"neutralForeground2BrandHover": undefined,
"neutralForeground2BrandPressed": undefined,
"neutralForeground2BrandSelected": undefined,
"neutralForeground2Hover": undefined,
"neutralForeground2Pressed": undefined,
"neutralForeground2Selected": undefined,
"neutralForeground3": "#adadad",
"neutralForeground3BrandHover": undefined,
"neutralForeground3BrandPressed": undefined,
"neutralForeground3BrandSelected": undefined,
"neutralForeground3Hover": undefined,
"neutralForeground3Pressed": undefined,
"neutralForeground3Selected": undefined,
"neutralForegroundInverted": "#ffffff",
"neutralStencil1": "#e6e6e6",
"neutralStencil2": "#fafafa",
"neutralStroke1": "#525252",
"neutralStroke1Hover": undefined,
"neutralStroke1Pressed": undefined,
"neutralStroke1Selected": undefined,
"neutralStroke2": "#3d3d3d",
"neutralStrokeAccessible": "#9e9e9e",
"neutralStrokeAccessibleHover": undefined,
"neutralStrokeAccessiblePressed": undefined,
"neutralStrokeAccessibleSelected": undefined,
"neutralStrokeDisabled": "#424242",
"personaActivityGlow": "#0086F0",
"personaActivityRing": "#000000",
"primaryButtonBackground": "#0086F0",
@ -2652,6 +2922,60 @@ Object {
"menuItemBackgroundPressed": "transparent",
"menuItemText": "#212121",
"menuItemTextHovered": "#212121",
"neutralBackground1": "#000000",
"neutralBackground1Hover": undefined,
"neutralBackground1Pressed": "#2e2e2e",
"neutralBackground1Selected": "#242424",
"neutralBackground2": "#1f1f1f",
"neutralBackground2Hover": undefined,
"neutralBackground2Pressed": "#4d4d4d",
"neutralBackground2Selected": "#424242",
"neutralBackground3": "#ffffff",
"neutralBackground3Hover": undefined,
"neutralBackground3Pressed": "#e0e0e0",
"neutralBackground3Selected": "#ebebeb",
"neutralBackground4": "#333333",
"neutralBackground4Hover": undefined,
"neutralBackground4Pressed": "#616161",
"neutralBackground4Selected": "#575757",
"neutralBackground5": "#3d3d3d",
"neutralBackground5Hover": undefined,
"neutralBackground5Pressed": "#6b6b6b",
"neutralBackground5Selected": "#616161",
"neutralBackground6": "#5c5c5c",
"neutralBackgroundDisabled": "#e0e0e0",
"neutralBackgroundInverted": "#575757",
"neutralForeground1": "#242424",
"neutralForeground1Hover": undefined,
"neutralForeground1Pressed": undefined,
"neutralForeground1Selected": undefined,
"neutralForeground2": "#616161",
"neutralForeground2BrandHover": undefined,
"neutralForeground2BrandPressed": undefined,
"neutralForeground2BrandSelected": undefined,
"neutralForeground2Hover": undefined,
"neutralForeground2Pressed": undefined,
"neutralForeground2Selected": undefined,
"neutralForeground3": "#808080",
"neutralForeground3BrandHover": undefined,
"neutralForeground3BrandPressed": undefined,
"neutralForeground3BrandSelected": undefined,
"neutralForeground3Hover": undefined,
"neutralForeground3Pressed": undefined,
"neutralForeground3Selected": undefined,
"neutralForegroundInverted": "#ffffff",
"neutralStencil1": "#575757",
"neutralStencil2": "#333333",
"neutralStroke1": "#d1d1d1",
"neutralStroke1Hover": undefined,
"neutralStroke1Pressed": undefined,
"neutralStroke1Selected": undefined,
"neutralStroke2": "#e0e0e0",
"neutralStrokeAccessible": "#616161",
"neutralStrokeAccessibleHover": undefined,
"neutralStrokeAccessiblePressed": undefined,
"neutralStrokeAccessibleSelected": undefined,
"neutralStrokeDisabled": "#e0e0e0",
"personaActivityGlow": "#0078D4",
"personaActivityRing": "#FFFFFF",
"primaryButtonBackground": "#0078D4",

Просмотреть файл

@ -34,7 +34,6 @@ export const androidComponents = {
},
};
// mocked out
const androidShadows = {
shadow2: {
ambient: { x: 0, y: 0, blur: 2, color: '#0000001f' },

Просмотреть файл

@ -1,10 +1,5 @@
import { FontSize, FontSizes, FontWeightValue, Typography, Variants } from '@fluentui-react-native/theme-types';
/**
* The primary font used in Fluent Android is Roboto as in [Figma](https://www.figma.com/file/MkkE13z6zALstwLlbczIMXrA/Fluent-Android?node-id=7455%3A94)
* The other fontFamily equivalents are filled from available React Native fonts for Android. Weights are defined from Figma.
*/
export function androidTypography(): Typography {
const androidDict = {
sizes: {

Просмотреть файл

@ -1,11 +1,11 @@
import { ThemeColorDefinition } from '@fluentui-react-native/theme-types';
import { FluentUIAndroidPalette } from './colorsSemantic';
import { createColorAliasTokens } from './createAliasTokens';
/** creates a palette of colors for the android theme, given the FluentUI Android Palette */
/** Creates a palette of colors for the android theme, given the FluentUI Android Palette. */
export function paletteFromAndroidColors(p: FluentUIAndroidPalette): ThemeColorDefinition {
/* PaletteBackgroundColors & PaletteTextColors */
return {
/* PaletteBackgroundColors & PaletteTextColors */
background: p.surfacesPrimary,
bodyStandoutBackground: p.surfacesSecondary,
bodyFrameBackground: p.surfacesTertiary,
@ -204,5 +204,6 @@ export function paletteFromAndroidColors(p: FluentUIAndroidPalette): ThemeColorD
personaActivityRing: p.surfacesPrimary,
personaActivityGlow: p.buttonBackground,
...createColorAliasTokens(p.variant == 'light' ? 'light' : 'dark'),
};
}

Просмотреть файл

@ -0,0 +1,18 @@
import { getAliasTokens, getShadowTokens } from '@fluentui-react-native/theme-tokens';
import { AliasColorTokens, AppearanceOptions, ThemeShadowDefinition } from '@fluentui-react-native/theme-types';
import { memoize } from '@fluentui-react-native/memo-cache';
import { mapPipelineToShadow, mapPipelineToTheme } from '@fluentui-react-native/theming-utils';
function createColorAliasTokensWorker(mode: AppearanceOptions): AliasColorTokens {
const aliasTokens = getAliasTokens(mode);
return mapPipelineToTheme(aliasTokens);
}
export const createColorAliasTokens = memoize(createColorAliasTokensWorker);
function createShadowAliasTokensWorker(mode: AppearanceOptions): ThemeShadowDefinition {
const aliasTokens = getShadowTokens(mode);
return mapPipelineToShadow(aliasTokens);
}
export const createShadowAliasTokens = memoize(createShadowAliasTokensWorker);

Просмотреть файл

@ -15,23 +15,6 @@ Object {
"bodyStandoutBackground": "#faf9f8",
"bodyText": "#323130",
"bodyTextChecked": "#000000",
"brandBackground": "#0078d4",
"brandBackground2": "#eff6fc",
"brandBackgroundDisabled": undefined,
"brandBackgroundHover": "#106ebe",
"brandBackgroundPressed": "#004578",
"brandBackgroundSelected": "#005a9e",
"brandBackgroundStatic": "#0078d4",
"brandForeground1": "#0078d4",
"brandForeground1Disabled": undefined,
"brandForeground1Pressed": undefined,
"brandForeground2": "#106ebe",
"brandForegroundLink": "#106ebe",
"brandForegroundLinkHover": "#005a9e",
"brandForegroundLinkPressed": "#004578",
"brandForegroundLinkSelected": "#106ebe",
"brandStroke1": "#0078d4",
"brandStroke2": "#c7e0f4",
"brandedBackground": "#0078d4",
"brandedBorder": "#005a9e",
"brandedCheckedBackground": "#c8c6c4",
@ -79,15 +62,6 @@ Object {
"checkboxBackgroundDisabled": "#f3f2f1",
"checkboxBorderColor": "#8a8886",
"checkmarkColor": "#ffffff",
"compoundBrandBackground1": "#0078d4",
"compoundBrandBackground1Hover": "#106ebe",
"compoundBrandBackground1Pressed": "#005a9e",
"compoundBrandForeground1": "#0078d4",
"compoundBrandForeground1Hover": "#106ebe",
"compoundBrandForeground1Pressed": "#005a9e",
"compoundBrandStroke1": "#0078d4",
"compoundBrandStroke1Hover": "#106ebe",
"compoundBrandStroke1Pressed": "#005a9e",
"defaultBackground": "#f3f2f1",
"defaultBorder": "#8a8886",
"defaultCheckedBackground": "#c8c6c4",
@ -181,70 +155,59 @@ Object {
"menuItemBackgroundPressed": "#edebe9",
"menuItemText": "#323130",
"menuItemTextHovered": "#201f1e",
"neutralBackground1": "#ffffff",
"neutralBackground1Hover": "#f5f5f5",
"neutralBackground1Pressed": "#e0e0e0",
"neutralBackground1Selected": "#ebebeb",
"neutralBackground2": "#fafafa",
"neutralBackground2Hover": "#f0f0f0",
"neutralBackground2Pressed": "#dbdbdb",
"neutralBackground2Selected": "#e6e6e6",
"neutralBackground3": "#f5f5f5",
"neutralBackground3Hover": "#ebebeb",
"neutralBackground3Pressed": "#d6d6d6",
"neutralBackground3Selected": "#e0e0e0",
"neutralBackground4": "#f0f0f0",
"neutralBackground4Hover": "#fafafa",
"neutralBackground4Pressed": "#f5f5f5",
"neutralBackground4Selected": "#ffffff",
"neutralBackground5": "#ebebeb",
"neutralBackground5Hover": "#f5f5f5",
"neutralBackground5Pressed": "#f0f0f0",
"neutralBackground5Selected": "#fafafa",
"neutralBackground6": "#e6e6e6",
"neutralBackgroundDisabled": "#f0f0f0",
"neutralBackgroundInverted": "#616161",
"neutralBackground1": "#000000",
"neutralBackground1Hover": undefined,
"neutralBackground1Pressed": "#2e2e2e",
"neutralBackground1Selected": "#242424",
"neutralBackground2": "#1f1f1f",
"neutralBackground2Hover": undefined,
"neutralBackground2Pressed": "#4d4d4d",
"neutralBackground2Selected": "#424242",
"neutralBackground3": "#ffffff",
"neutralBackground3Hover": undefined,
"neutralBackground3Pressed": "#e0e0e0",
"neutralBackground3Selected": "#ebebeb",
"neutralBackground4": "#333333",
"neutralBackground4Hover": undefined,
"neutralBackground4Pressed": "#616161",
"neutralBackground4Selected": "#575757",
"neutralBackground5": "#3d3d3d",
"neutralBackground5Hover": undefined,
"neutralBackground5Pressed": "#6b6b6b",
"neutralBackground5Selected": "#616161",
"neutralBackground6": "#5c5c5c",
"neutralBackgroundDisabled": "#e0e0e0",
"neutralBackgroundInverted": "#575757",
"neutralForeground1": "#242424",
"neutralForeground1Hover": "#242424",
"neutralForeground1Pressed": "#242424",
"neutralForeground1Selected": "#242424",
"neutralForeground2": "#424242",
"neutralForeground2BrandHover": "#0078d4",
"neutralForeground2BrandPressed": "#106ebe",
"neutralForeground2BrandSelected": "#0078d4",
"neutralForeground2Hover": "#242424",
"neutralForeground2Pressed": "#242424",
"neutralForeground2Selected": "#242424",
"neutralForeground3": "#616161",
"neutralForeground3BrandHover": "#0078d4",
"neutralForeground3BrandPressed": "#106ebe",
"neutralForeground3BrandSelected": "#0078d4",
"neutralForeground3Hover": "#424242",
"neutralForeground3Pressed": "#424242",
"neutralForeground3Selected": "#424242",
"neutralForeground4": "#707070",
"neutralForegroundDisabled": "#bdbdbd",
"neutralForeground1Hover": undefined,
"neutralForeground1Pressed": undefined,
"neutralForeground1Selected": undefined,
"neutralForeground2": "#616161",
"neutralForeground2BrandHover": undefined,
"neutralForeground2BrandPressed": undefined,
"neutralForeground2BrandSelected": undefined,
"neutralForeground2Hover": undefined,
"neutralForeground2Pressed": undefined,
"neutralForeground2Selected": undefined,
"neutralForeground3": "#808080",
"neutralForeground3BrandHover": undefined,
"neutralForeground3BrandPressed": undefined,
"neutralForeground3BrandSelected": undefined,
"neutralForeground3Hover": undefined,
"neutralForeground3Pressed": undefined,
"neutralForeground3Selected": undefined,
"neutralForegroundInverted": "#ffffff",
"neutralForegroundInvertedLink": "#ffffff",
"neutralForegroundInvertedLinkHover": "#ffffff",
"neutralForegroundInvertedLinkPressed": "#ffffff",
"neutralForegroundInvertedLinkSelected": "#ffffff",
"neutralForegroundOnBrand": "#ffffff",
"neutralForegroundOnBrandHover": "#ffffff",
"neutralForegroundOnBrandPressed": "#ffffff",
"neutralForegroundOnBrandSelected": "#ffffff",
"neutralStencil1": "#e6e6e6",
"neutralStencil2": "#fafafa",
"neutralStencil1": "#575757",
"neutralStencil2": "#333333",
"neutralStroke1": "#d1d1d1",
"neutralStroke1Hover": "#c7c7c7",
"neutralStroke1Pressed": "#b3b3b3",
"neutralStroke1Selected": "#bdbdbd",
"neutralStroke1Hover": undefined,
"neutralStroke1Pressed": undefined,
"neutralStroke1Selected": undefined,
"neutralStroke2": "#e0e0e0",
"neutralStroke3": "#f0f0f0",
"neutralStrokeAccessible": "#616161",
"neutralStrokeAccessibleHover": "#575757",
"neutralStrokeAccessiblePressed": "#4d4d4d",
"neutralStrokeAccessibleSelected": "#0078d4",
"neutralStrokeAccessibleHover": undefined,
"neutralStrokeAccessiblePressed": undefined,
"neutralStrokeAccessibleSelected": undefined,
"neutralStrokeDisabled": "#e0e0e0",
"personaActivityGlow": "#0078d4",
"personaActivityRing": "#ffffff",
@ -258,31 +221,9 @@ Object {
"primaryButtonTextDisabled": "#d2d0ce",
"primaryButtonTextHovered": "#ffffff",
"primaryButtonTextPressed": "#ffffff",
"redBackground1": "#f9f0f2",
"redBackground2": "#d69ca5",
"redBackground3": "#750b1c",
"redBorder1": "#d69ca5",
"redBorder2": "#750b1c",
"redBorderActive": "#750b1c",
"redForeground1": "#690a19",
"redForeground2": "#d69ca5",
"redForeground3": "#750b1c",
"smallInputBorder": "#605e5c",
"strokeFocus1": "#ffffff",
"strokeFocus2": "#000000",
"subText": "#605e5c",
"subtleBackground": "transparent",
"subtleBackgroundHover": "#f5f5f5",
"subtleBackgroundPressed": "#e0e0e0",
"subtleBackgroundSelected": "#ebebeb",
"successBackground": "rgba(95, 210, 85, .2)",
"transparentBackground": "transparent",
"transparentBackgroundHover": "transparent",
"transparentBackgroundPressed": "transparent",
"transparentBackgroundSelected": "transparent",
"transparentStroke": "transparent",
"transparentStrokeDisabled": "transparent",
"transparentStrokeInteractive": "transparent",
"variantBorder": "#edebe9",
"variantBorderHovered": "#a19f9d",
"warningBackground": "rgba(255, 200, 10, .2)",
@ -481,11 +422,11 @@ Object {
},
"sizes": Object {
"body": 14,
"caption": 10,
"header": 20,
"hero": 28,
"heroLarge": 40,
"secondary": 12,
"caption": 12,
"header": 18,
"hero": 24,
"heroLarge": 60,
"secondary": 13,
"subheader": 16,
},
"variants": Object {
@ -630,32 +571,6 @@ Object {
exports[`createMacOSColorAliasTokens test mode: dark, isHighContrast: false 1`] = `
Object {
"brandBackground": "#0086f0",
"brandBackground2": "#092c47",
"brandBackgroundDisabled": "#575757",
"brandBackgroundHover": "#1890f1",
"brandBackgroundPressed": "#1890f1",
"brandBackgroundSelected": "#3aa0f3",
"brandBackgroundStatic": "#0086f0",
"brandForeground1": "#0086f0",
"brandForeground1Disabled": "#c2c2c2",
"brandForeground1Pressed": "#6cb8f6",
"brandForeground2": "#092c47",
"brandForegroundLink": "#043862",
"brandForegroundLinkHover": "#092c47",
"brandForegroundLinkPressed": "#0078d4",
"brandForegroundLinkSelected": "#092c47",
"brandStroke1": "#0086f0",
"brandStroke2": "#004c87",
"compoundBrandBackground1": "#0086f0",
"compoundBrandBackground1Hover": "#1890f1",
"compoundBrandBackground1Pressed": "#6cb8f6",
"compoundBrandForeground1": "#043862",
"compoundBrandForeground1Hover": "#092c47",
"compoundBrandForeground1Pressed": "#0078d4",
"compoundBrandStroke1": "#0086f0",
"compoundBrandStroke1Hover": "#1890f1",
"compoundBrandStroke1Pressed": "#6cb8f6",
"neutralBackground1": "#000000",
"neutralBackground1Hover": "#3d3d3d",
"neutralBackground1Pressed": "#5c5c5c",
@ -697,17 +612,7 @@ Object {
"neutralForeground3Hover": "#d6d6d6",
"neutralForeground3Pressed": "#d6d6d6",
"neutralForeground3Selected": "#d6d6d6",
"neutralForeground4": "#858585",
"neutralForegroundDisabled": "#b8b8b8",
"neutralForegroundInverted": "#ffffff",
"neutralForegroundInvertedLink": "#292929",
"neutralForegroundInvertedLinkHover": "#292929",
"neutralForegroundInvertedLinkPressed": "#292929",
"neutralForegroundInvertedLinkSelected": "#292929",
"neutralForegroundOnBrand": "#ffffff",
"neutralForegroundOnBrandHover": "#ffffff",
"neutralForegroundOnBrandPressed": "#ffffff",
"neutralForegroundOnBrandSelected": "#ffffff",
"neutralStencil1": "#333333",
"neutralStencil2": "#575757",
"neutralStroke1": "#3d3d3d",
@ -715,65 +620,16 @@ Object {
"neutralStroke1Pressed": "#6b6b6b",
"neutralStroke1Selected": "#707070",
"neutralStroke2": "#575757",
"neutralStroke3": "#666666",
"neutralStrokeAccessible": "#adadad",
"neutralStrokeAccessibleHover": "#bdbdbd",
"neutralStrokeAccessiblePressed": "#b3b3b3",
"neutralStrokeAccessibleSelected": "#0086f0",
"neutralStrokeDisabled": "#525252",
"redBackground1": "#230308",
"redBackground2": "#420610",
"redBackground3": "#750b1c",
"redBorder1": "#750b1c",
"redBorder2": "#962f3f",
"redBorderActive": "#ac4f5e",
"redForeground1": "#ac4f5e",
"redForeground2": "#420610",
"redForeground3": "#750b1c",
"strokeFocus1": "#000000",
"strokeFocus2": "#ffffff",
"subtleBackground": "transparent",
"subtleBackgroundHover": "#3d3d3d",
"subtleBackgroundPressed": "#1f1f1f",
"subtleBackgroundSelected": "#383838",
"transparentBackground": "transparent",
"transparentBackgroundHover": "transparent",
"transparentBackgroundPressed": "transparent",
"transparentBackgroundSelected": "transparent",
"transparentStroke": "transparent",
"transparentStrokeDisabled": "transparent",
"transparentStrokeInteractive": "transparent",
}
`;
exports[`createMacOSColorAliasTokens test mode: dark, isHighContrast: true 1`] = `
Object {
"brandBackground": "#0086f0",
"brandBackground2": "#092c47",
"brandBackgroundDisabled": "#575757",
"brandBackgroundHover": "#1890f1",
"brandBackgroundPressed": "#1890f1",
"brandBackgroundSelected": "#3aa0f3",
"brandBackgroundStatic": "#0086f0",
"brandForeground1": "#0086f0",
"brandForeground1Disabled": "#c2c2c2",
"brandForeground1Pressed": "#6cb8f6",
"brandForeground2": "#092c47",
"brandForegroundLink": "#043862",
"brandForegroundLinkHover": "#092c47",
"brandForegroundLinkPressed": "#0078d4",
"brandForegroundLinkSelected": "#092c47",
"brandStroke1": "#0086f0",
"brandStroke2": "#004c87",
"compoundBrandBackground1": "#0086f0",
"compoundBrandBackground1Hover": "#1890f1",
"compoundBrandBackground1Pressed": "#6cb8f6",
"compoundBrandForeground1": "#043862",
"compoundBrandForeground1Hover": "#092c47",
"compoundBrandForeground1Pressed": "#0078d4",
"compoundBrandStroke1": "#0086f0",
"compoundBrandStroke1Hover": "#1890f1",
"compoundBrandStroke1Pressed": "#6cb8f6",
"neutralBackground1": "#000000",
"neutralBackground1Hover": "#3d3d3d",
"neutralBackground1Pressed": "#5c5c5c",
@ -815,17 +671,7 @@ Object {
"neutralForeground3Hover": "#d6d6d6",
"neutralForeground3Pressed": "#d6d6d6",
"neutralForeground3Selected": "#d6d6d6",
"neutralForeground4": "#d6d6d6",
"neutralForegroundDisabled": "#b8b8b8",
"neutralForegroundInverted": "#ffffff",
"neutralForegroundInvertedLink": "#292929",
"neutralForegroundInvertedLinkHover": "#292929",
"neutralForegroundInvertedLinkPressed": "#292929",
"neutralForegroundInvertedLinkSelected": "#292929",
"neutralForegroundOnBrand": "#ffffff",
"neutralForegroundOnBrandHover": "#ffffff",
"neutralForegroundOnBrandPressed": "#ffffff",
"neutralForegroundOnBrandSelected": "#ffffff",
"neutralStencil1": "#333333",
"neutralStencil2": "#575757",
"neutralStroke1": "#adadad",
@ -833,65 +679,16 @@ Object {
"neutralStroke1Pressed": "#6b6b6b",
"neutralStroke1Selected": "#707070",
"neutralStroke2": "#a8a8a8",
"neutralStroke3": "#adadad",
"neutralStrokeAccessible": "#d6d6d6",
"neutralStrokeAccessibleHover": "#bdbdbd",
"neutralStrokeAccessiblePressed": "#b3b3b3",
"neutralStrokeAccessibleSelected": "#0086f0",
"neutralStrokeDisabled": "#525252",
"redBackground1": "#230308",
"redBackground2": "#420610",
"redBackground3": "#750b1c",
"redBorder1": "#750b1c",
"redBorder2": "#962f3f",
"redBorderActive": "#ac4f5e",
"redForeground1": "#ac4f5e",
"redForeground2": "#420610",
"redForeground3": "#750b1c",
"strokeFocus1": "#000000",
"strokeFocus2": "#ffffff",
"subtleBackground": "transparent",
"subtleBackgroundHover": "#3d3d3d",
"subtleBackgroundPressed": "#1f1f1f",
"subtleBackgroundSelected": "#383838",
"transparentBackground": "transparent",
"transparentBackgroundHover": "transparent",
"transparentBackgroundPressed": "transparent",
"transparentBackgroundSelected": "transparent",
"transparentStroke": "#3aa0f3",
"transparentStrokeDisabled": "#d6d6d6",
"transparentStrokeInteractive": "#a8a8a8",
}
`;
exports[`createMacOSColorAliasTokens test mode: light, isHighContrast: false 1`] = `
Object {
"brandBackground": "#0078d4",
"brandBackground2": "#eff6fc",
"brandBackgroundDisabled": "#d1d1d1",
"brandBackgroundHover": "#106ebe",
"brandBackgroundPressed": "#106ebe",
"brandBackgroundSelected": "#005a9e",
"brandBackgroundStatic": "#0078d4",
"brandForeground1": "#0078d4",
"brandForeground1Disabled": "#757575",
"brandForeground1Pressed": "#004578",
"brandForeground2": "#106ebe",
"brandForegroundLink": "#0078d4",
"brandForegroundLinkHover": "#106ebe",
"brandForegroundLinkPressed": "#004578",
"brandForegroundLinkSelected": "#005a9e",
"brandStroke1": "#0078d4",
"brandStroke2": "#c7e0f4",
"compoundBrandBackground1": "#0078d4",
"compoundBrandBackground1Hover": "#106ebe",
"compoundBrandBackground1Pressed": "#004578",
"compoundBrandForeground1": "#0078d4",
"compoundBrandForeground1Hover": "#106ebe",
"compoundBrandForeground1Pressed": "#004578",
"compoundBrandStroke1": "#0078d4",
"compoundBrandStroke1Hover": "#106ebe",
"compoundBrandStroke1Pressed": "#004578",
"neutralBackground1": "#ffffff",
"neutralBackground1Hover": "#f5f5f5",
"neutralBackground1Pressed": "#ebebeb",
@ -933,17 +730,7 @@ Object {
"neutralForeground3Hover": "#424242",
"neutralForeground3Pressed": "#424242",
"neutralForeground3Selected": "#424242",
"neutralForeground4": "#808080",
"neutralForegroundDisabled": "#757575",
"neutralForegroundInverted": "#ffffff",
"neutralForegroundInvertedLink": "#ffffff",
"neutralForegroundInvertedLinkHover": "#ffffff",
"neutralForegroundInvertedLinkPressed": "#ffffff",
"neutralForegroundInvertedLinkSelected": "#ffffff",
"neutralForegroundOnBrand": "#ffffff",
"neutralForegroundOnBrandHover": "#ffffff",
"neutralForegroundOnBrandPressed": "#ffffff",
"neutralForegroundOnBrandSelected": "#ffffff",
"neutralStencil1": "#e6e6e6",
"neutralStencil2": "#fafafa",
"neutralStroke1": "#f0f0f0",
@ -951,65 +738,16 @@ Object {
"neutralStroke1Pressed": "#b3b3b3",
"neutralStroke1Selected": "#bdbdbd",
"neutralStroke2": "#d6d6d6",
"neutralStroke3": "#f0f0f0",
"neutralStrokeAccessible": "#616161",
"neutralStrokeAccessibleHover": "#575757",
"neutralStrokeAccessiblePressed": "#4d4d4d",
"neutralStrokeAccessibleSelected": "#0078d4",
"neutralStrokeDisabled": "#e0e0e0",
"redBackground1": "#f9f0f2",
"redBackground2": "#d69ca5",
"redBackground3": "#750b1c",
"redBorder1": "#d69ca5",
"redBorder2": "#750b1c",
"redBorderActive": "#750b1c",
"redForeground1": "#690a19",
"redForeground2": "#d69ca5",
"redForeground3": "#750b1c",
"strokeFocus1": "#ffffff",
"strokeFocus2": "#000000",
"subtleBackground": "transparent",
"subtleBackgroundHover": "#f5f5f5",
"subtleBackgroundPressed": "#e0e0e0",
"subtleBackgroundSelected": "#ebebeb",
"transparentBackground": "transparent",
"transparentBackgroundHover": "transparent",
"transparentBackgroundPressed": "transparent",
"transparentBackgroundSelected": "transparent",
"transparentStroke": "transparent",
"transparentStrokeDisabled": "transparent",
"transparentStrokeInteractive": "transparent",
}
`;
exports[`createMacOSColorAliasTokens test mode: light, isHighContrast: true 1`] = `
Object {
"brandBackground": "#0078d4",
"brandBackground2": "#eff6fc",
"brandBackgroundDisabled": "#d1d1d1",
"brandBackgroundHover": "#106ebe",
"brandBackgroundPressed": "#106ebe",
"brandBackgroundSelected": "#005a9e",
"brandBackgroundStatic": "#0078d4",
"brandForeground1": "#0078d4",
"brandForeground1Disabled": "#757575",
"brandForeground1Pressed": "#004578",
"brandForeground2": "#106ebe",
"brandForegroundLink": "#0078d4",
"brandForegroundLinkHover": "#106ebe",
"brandForegroundLinkPressed": "#004578",
"brandForegroundLinkSelected": "#005a9e",
"brandStroke1": "#0078d4",
"brandStroke2": "#c7e0f4",
"compoundBrandBackground1": "#0078d4",
"compoundBrandBackground1Hover": "#106ebe",
"compoundBrandBackground1Pressed": "#004578",
"compoundBrandForeground1": "#0078d4",
"compoundBrandForeground1Hover": "#106ebe",
"compoundBrandForeground1Pressed": "#004578",
"compoundBrandStroke1": "#0078d4",
"compoundBrandStroke1Hover": "#106ebe",
"compoundBrandStroke1Pressed": "#004578",
"neutralBackground1": "#ffffff",
"neutralBackground1Hover": "#f5f5f5",
"neutralBackground1Pressed": "#ebebeb",
@ -1051,17 +789,7 @@ Object {
"neutralForeground3Hover": "#424242",
"neutralForeground3Pressed": "#424242",
"neutralForeground3Selected": "#424242",
"neutralForeground4": "#424242",
"neutralForegroundDisabled": "#757575",
"neutralForegroundInverted": "#ffffff",
"neutralForegroundInvertedLink": "#ffffff",
"neutralForegroundInvertedLinkHover": "#ffffff",
"neutralForegroundInvertedLinkPressed": "#ffffff",
"neutralForegroundInvertedLinkSelected": "#ffffff",
"neutralForegroundOnBrand": "#ffffff",
"neutralForegroundOnBrandHover": "#ffffff",
"neutralForegroundOnBrandPressed": "#ffffff",
"neutralForegroundOnBrandSelected": "#ffffff",
"neutralStencil1": "#e6e6e6",
"neutralStencil2": "#fafafa",
"neutralStroke1": "#616161",
@ -1069,34 +797,11 @@ Object {
"neutralStroke1Pressed": "#b3b3b3",
"neutralStroke1Selected": "#bdbdbd",
"neutralStroke2": "#000000",
"neutralStroke3": "#616161",
"neutralStrokeAccessible": "#242424",
"neutralStrokeAccessibleHover": "#575757",
"neutralStrokeAccessiblePressed": "#4d4d4d",
"neutralStrokeAccessibleSelected": "#0078d4",
"neutralStrokeDisabled": "#e0e0e0",
"redBackground1": "#f9f0f2",
"redBackground2": "#d69ca5",
"redBackground3": "#750b1c",
"redBorder1": "#d69ca5",
"redBorder2": "#750b1c",
"redBorderActive": "#750b1c",
"redForeground1": "#690a19",
"redForeground2": "#d69ca5",
"redForeground3": "#750b1c",
"strokeFocus1": "#ffffff",
"strokeFocus2": "#000000",
"subtleBackground": "transparent",
"subtleBackgroundHover": "#f5f5f5",
"subtleBackgroundPressed": "#e0e0e0",
"subtleBackgroundSelected": "#ebebeb",
"transparentBackground": "transparent",
"transparentBackgroundHover": "transparent",
"transparentBackgroundPressed": "transparent",
"transparentBackgroundSelected": "transparent",
"transparentStroke": "#000000",
"transparentStrokeDisabled": "#bdbdbd",
"transparentStrokeInteractive": "#666666",
}
`;

Просмотреть файл

@ -31,8 +31,6 @@
"author": "",
"license": "MIT",
"dependencies": {
"@fluentui-react-native/design-tokens-win32": "^0.13.0",
"@fluentui-react-native/design-tokens-windows": "^0.13.0",
"@fluentui-react-native/memo-cache": "^1.1.7",
"@fluentui-react-native/theme-tokens": "^0.19.1",
"@fluentui-react-native/theme-types": ">=0.19.2 <1.0.0",

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,4 +1,4 @@
import { getAliasTokens, getShadowTokens } from './getTokens';
import { getAliasTokens, getShadowTokens } from '@fluentui-react-native/theme-tokens';
import { AliasColorTokens, AppearanceOptions, ThemeShadowDefinition } from '@fluentui-react-native/theme-types';
import { memoize } from '@fluentui-react-native/memo-cache';
import { mapPipelineToShadow, mapPipelineToTheme } from '@fluentui-react-native/theming-utils';

Просмотреть файл

@ -31,9 +31,11 @@
"author": "",
"license": "MIT",
"dependencies": {
"@fluentui-react-native/design-tokens-android": "^0.13.0",
"@fluentui-react-native/design-tokens-android": "^0.17.0",
"@fluentui-react-native/design-tokens-win32": "^0.13.0",
"@fluentui-react-native/design-tokens-windows": "^0.13.0"
"@fluentui-react-native/design-tokens-windows": "^0.13.0",
"@fluentui-react-native/theme-types": ">=0.18.0 <1.0.0",
"assert-never": "^1.2.1"
},
"devDependencies": {
"@fluentui-react-native/eslint-config-rules": "^0.1.1",

Просмотреть файл

@ -0,0 +1,15 @@
import lightShadowTokens from '@fluentui-react-native/design-tokens-windows/light/tokens-shadow.json';
import darkShadowTokens from '@fluentui-react-native/design-tokens-windows/dark/tokens-shadow.json';
import hcShadowTokens from '@fluentui-react-native/design-tokens-win32/hc/tokens-shadow.json';
import { AppearanceOptions } from '@fluentui-react-native/theme-types';
export function getShadowTokens(mode: AppearanceOptions) {
if (mode === 'light') {
return lightShadowTokens.shadow;
} else if (mode === 'dark') {
return darkShadowTokens.shadow;
}
// HC mode.
return hcShadowTokens.shadow;
}

Просмотреть файл

@ -0,0 +1,12 @@
import lightAliasTokens from '@fluentui-react-native/design-tokens-android/light/tokens-aliases.json';
import darkAliasTokens from '@fluentui-react-native/design-tokens-android/dark/tokens-aliases.json';
import { AppearanceOptions } from '@fluentui-react-native/theme-types';
export function getAliasTokens(mode: AppearanceOptions) {
if (mode === 'light') {
return lightAliasTokens;
} else if (mode === 'dark') {
return darkAliasTokens;
}
return lightAliasTokens;
}

Просмотреть файл

@ -1,9 +1,6 @@
import lightAliasTokens from '@fluentui-react-native/design-tokens-windows/light/tokens-aliases.json';
import darkAliasTokens from '@fluentui-react-native/design-tokens-windows/dark/tokens-aliases.json';
import { hcAliasTokens } from './highContrast/tokens-alias';
import lightShadowTokens from '@fluentui-react-native/design-tokens-windows/light/tokens-shadow.json';
import darkShadowTokens from '@fluentui-react-native/design-tokens-windows/dark/tokens-shadow.json';
import hcShadowTokens from '@fluentui-react-native/design-tokens-win32/hc/tokens-shadow.json';
import { AppearanceOptions } from '@fluentui-react-native/theme-types';
import { assertNever } from 'assert-never';
@ -20,17 +17,3 @@ export function getAliasTokens(mode: AppearanceOptions) {
return lightAliasTokens;
}
export function getShadowTokens(mode: AppearanceOptions) {
if (mode === 'light') {
return lightShadowTokens.shadow;
} else if (mode === 'dark') {
return darkShadowTokens.shadow;
} else if (mode === 'highContrast') {
return hcShadowTokens.shadow;
} else {
assertNever(mode);
}
return lightAliasTokens;
}

Просмотреть файл

@ -1 +1,3 @@
export { default as globalTokens } from './tokens-global';
export { getAliasTokens } from './getTokens';
export { getShadowTokens } from './getShadowTokens';

Просмотреть файл

@ -469,30 +469,32 @@ export interface AliasColorTokens {
neutralForeground3BrandHover: ColorValue;
neutralForeground3BrandPressed: ColorValue;
neutralForeground3BrandSelected: ColorValue;
neutralForeground4: ColorValue;
neutralForegroundDisabled: ColorValue;
brandForegroundLink: ColorValue;
brandForegroundLinkHover: ColorValue;
brandForegroundLinkPressed: ColorValue;
brandForegroundLinkSelected: ColorValue;
compoundBrandForeground1: ColorValue;
compoundBrandForeground1Hover: ColorValue;
compoundBrandForeground1Pressed: ColorValue;
brandForeground1: ColorValue;
brandForeground1Disabled: ColorValue;
brandForeground1Pressed: ColorValue;
brandForeground2: ColorValue;
neutralForeground4?: ColorValue;
neutralForegroundDisabled?: ColorValue;
brandForegroundLink?: ColorValue;
brandForegroundLinkHover?: ColorValue;
brandForegroundLinkPressed?: ColorValue;
brandForegroundLinkSelected?: ColorValue;
compoundBrandForeground1?: ColorValue;
compoundBrandForeground1Hover?: ColorValue;
compoundBrandForeground1Pressed?: ColorValue;
neutralForegroundInverted: ColorValue;
neutralForegroundOnBrand: ColorValue;
neutralForegroundOnBrandHover: ColorValue;
neutralForegroundOnBrandPressed: ColorValue;
neutralForegroundOnBrandSelected: ColorValue;
neutralForegroundInvertedLink: ColorValue;
neutralForegroundInvertedLinkHover: ColorValue;
neutralForegroundInvertedLinkPressed: ColorValue;
neutralForegroundInvertedLinkSelected: ColorValue;
brandForeground1?: ColorValue;
brandForeground1Disabled?: ColorValue;
brandForeground1Pressed?: ColorValue;
brandForeground2?: ColorValue;
neutralForegroundOnBrand?: ColorValue;
neutralForegroundOnBrandHover?: ColorValue;
neutralForegroundOnBrandPressed?: ColorValue;
neutralForegroundOnBrandSelected?: ColorValue;
neutralForegroundInvertedLink?: ColorValue;
neutralForegroundInvertedLinkHover?: ColorValue;
neutralForegroundInvertedLinkPressed?: ColorValue;
neutralForegroundInvertedLinkSelected?: ColorValue;
neutralBackground1: ColorValue;
neutralBackground1Hover: ColorValue;
@ -517,33 +519,21 @@ export interface AliasColorTokens {
neutralBackground6: ColorValue;
neutralBackgroundInverted: ColorValue;
subtleBackground: ColorValue;
subtleBackgroundHover: ColorValue;
subtleBackgroundPressed: ColorValue;
subtleBackgroundSelected: ColorValue;
subtleBackground?: ColorValue;
subtleBackgroundHover?: ColorValue;
subtleBackgroundPressed?: ColorValue;
subtleBackgroundSelected?: ColorValue;
transparentBackground: ColorValue;
transparentBackgroundHover: ColorValue;
transparentBackgroundPressed: ColorValue;
transparentBackgroundSelected: ColorValue;
transparentBackground?: ColorValue;
transparentBackgroundHover?: ColorValue;
transparentBackgroundPressed?: ColorValue;
transparentBackgroundSelected?: ColorValue;
neutralBackgroundDisabled: ColorValue;
neutralStencil1: ColorValue;
neutralStencil2: ColorValue;
brandBackground: ColorValue;
brandBackgroundHover: ColorValue;
brandBackgroundPressed: ColorValue;
brandBackgroundDisabled: ColorValue;
brandBackgroundSelected: ColorValue;
compoundBrandBackground1: ColorValue;
compoundBrandBackground1Hover: ColorValue;
compoundBrandBackground1Pressed: ColorValue;
brandBackgroundStatic: ColorValue;
brandBackground2: ColorValue;
neutralStrokeAccessible: ColorValue;
neutralStrokeAccessibleHover: ColorValue;
neutralStrokeAccessiblePressed: ColorValue;
@ -553,30 +543,41 @@ export interface AliasColorTokens {
neutralStroke1Pressed: ColorValue;
neutralStroke1Selected: ColorValue;
neutralStroke2: ColorValue;
neutralStroke3: ColorValue;
brandStroke1: ColorValue;
brandStroke2: ColorValue;
compoundBrandStroke1: ColorValue;
compoundBrandStroke1Hover: ColorValue;
compoundBrandStroke1Pressed: ColorValue;
neutralStroke3?: ColorValue;
neutralStrokeDisabled: ColorValue;
transparentStroke: ColorValue;
transparentStrokeInteractive: ColorValue;
transparentStrokeDisabled: ColorValue;
strokeFocus1?: ColorValue;
strokeFocus2?: ColorValue;
strokeFocus1: ColorValue;
strokeFocus2: ColorValue;
brandBackground?: ColorValue;
brandBackgroundHover?: ColorValue;
brandBackgroundPressed?: ColorValue;
brandBackgroundDisabled?: ColorValue;
brandBackgroundSelected?: ColorValue;
compoundBrandBackground1?: ColorValue;
compoundBrandBackground1Hover?: ColorValue;
compoundBrandBackground1Pressed?: ColorValue;
brandBackgroundStatic?: ColorValue;
brandBackground2?: ColorValue;
brandStroke1?: ColorValue;
brandStroke2?: ColorValue;
redBackground1: ColorValue;
redBackground2: ColorValue;
redBackground3: ColorValue;
redForeground1: ColorValue;
redForeground2: ColorValue;
redForeground3: ColorValue;
redBorderActive: ColorValue;
redBorder1: ColorValue;
redBorder2: ColorValue;
compoundBrandStroke1?: ColorValue;
compoundBrandStroke1Hover?: ColorValue;
compoundBrandStroke1Pressed?: ColorValue;
transparentStroke?: ColorValue;
transparentStrokeInteractive?: ColorValue;
transparentStrokeDisabled?: ColorValue;
redBackground1?: ColorValue;
redBackground2?: ColorValue;
redBackground3?: ColorValue;
redForeground1?: ColorValue;
redForeground2?: ColorValue;
redForeground3?: ColorValue;
redBorderActive?: ColorValue;
redBorder1?: ColorValue;
redBorder2?: ColorValue;
}
/**

Просмотреть файл

@ -731,32 +731,6 @@ Object {
exports[`mapPipelineToTheme test darkAliasTokens 1`] = `
Object {
"brandBackground": "#106ebe",
"brandBackground2": "#004578",
"brandBackgroundDisabled": undefined,
"brandBackgroundHover": "#0078d4",
"brandBackgroundPressed": "#004578",
"brandBackgroundSelected": "#005a9e",
"brandBackgroundStatic": "#0078d4",
"brandForeground1": "#3aa0f3",
"brandForeground1Disabled": undefined,
"brandForeground1Pressed": undefined,
"brandForeground2": "#6cb8f6",
"brandForegroundLink": "#2899f5",
"brandForegroundLinkHover": "#6cb8f6",
"brandForegroundLinkPressed": "#3aa0f3",
"brandForegroundLinkSelected": "#2899f5",
"brandStroke1": "#2899f5",
"brandStroke2": "#004c87",
"compoundBrandBackground1": "#2899f5",
"compoundBrandBackground1Hover": "#3aa0f3",
"compoundBrandBackground1Pressed": "#0078d4",
"compoundBrandForeground1": "#2899f5",
"compoundBrandForeground1Hover": "#3aa0f3",
"compoundBrandForeground1Pressed": "#0078d4",
"compoundBrandStroke1": "#2899f5",
"compoundBrandStroke1Hover": "#3aa0f3",
"compoundBrandStroke1Pressed": "#0078d4",
"neutralBackground1": "#292929",
"neutralBackground1Hover": "#3d3d3d",
"neutralBackground1Pressed": "#1f1f1f",
@ -798,17 +772,7 @@ Object {
"neutralForeground3Hover": "#d6d6d6",
"neutralForeground3Pressed": "#d6d6d6",
"neutralForeground3Selected": "#d6d6d6",
"neutralForeground4": "#999999",
"neutralForegroundDisabled": "#5c5c5c",
"neutralForegroundInverted": "#242424",
"neutralForegroundInvertedLink": "#ffffff",
"neutralForegroundInvertedLinkHover": "#ffffff",
"neutralForegroundInvertedLinkPressed": "#ffffff",
"neutralForegroundInvertedLinkSelected": "#ffffff",
"neutralForegroundOnBrand": "#ffffff",
"neutralForegroundOnBrandHover": "#ffffff",
"neutralForegroundOnBrandPressed": "#ffffff",
"neutralForegroundOnBrandSelected": "#ffffff",
"neutralStencil1": "#333333",
"neutralStencil2": "#575757",
"neutralStroke1": "#666666",
@ -816,65 +780,16 @@ Object {
"neutralStroke1Pressed": "#6b6b6b",
"neutralStroke1Selected": "#707070",
"neutralStroke2": "#525252",
"neutralStroke3": "#3d3d3d",
"neutralStrokeAccessible": "#adadad",
"neutralStrokeAccessibleHover": "#bdbdbd",
"neutralStrokeAccessiblePressed": "#b3b3b3",
"neutralStrokeAccessibleSelected": "#3aa0f3",
"neutralStrokeDisabled": "#424242",
"redBackground1": "#230308",
"redBackground2": "#420610",
"redBackground3": "#750b1c",
"redBorder1": "#750b1c",
"redBorder2": "#962f3f",
"redBorderActive": "#ac4f5e",
"redForeground1": "#ac4f5e",
"redForeground2": "#420610",
"redForeground3": "#750b1c",
"strokeFocus1": "#000000",
"strokeFocus2": "#ffffff",
"subtleBackground": "transparent",
"subtleBackgroundHover": "#383838",
"subtleBackgroundPressed": "#2e2e2e",
"subtleBackgroundSelected": "#333333",
"transparentBackground": "transparent",
"transparentBackgroundHover": "transparent",
"transparentBackgroundPressed": "transparent",
"transparentBackgroundSelected": "transparent",
"transparentStroke": "transparent",
"transparentStrokeDisabled": "transparent",
"transparentStrokeInteractive": "transparent",
}
`;
exports[`mapPipelineToTheme test lightAliasTokens 1`] = `
Object {
"brandBackground": "#0078d4",
"brandBackground2": "#eff6fc",
"brandBackgroundDisabled": undefined,
"brandBackgroundHover": "#106ebe",
"brandBackgroundPressed": "#004578",
"brandBackgroundSelected": "#005a9e",
"brandBackgroundStatic": "#0078d4",
"brandForeground1": "#0078d4",
"brandForeground1Disabled": undefined,
"brandForeground1Pressed": undefined,
"brandForeground2": "#106ebe",
"brandForegroundLink": "#106ebe",
"brandForegroundLinkHover": "#005a9e",
"brandForegroundLinkPressed": "#004578",
"brandForegroundLinkSelected": "#106ebe",
"brandStroke1": "#0078d4",
"brandStroke2": "#c7e0f4",
"compoundBrandBackground1": "#0078d4",
"compoundBrandBackground1Hover": "#106ebe",
"compoundBrandBackground1Pressed": "#005a9e",
"compoundBrandForeground1": "#0078d4",
"compoundBrandForeground1Hover": "#106ebe",
"compoundBrandForeground1Pressed": "#005a9e",
"compoundBrandStroke1": "#0078d4",
"compoundBrandStroke1Hover": "#106ebe",
"compoundBrandStroke1Pressed": "#005a9e",
"neutralBackground1": "#ffffff",
"neutralBackground1Hover": "#f5f5f5",
"neutralBackground1Pressed": "#e0e0e0",
@ -916,17 +831,7 @@ Object {
"neutralForeground3Hover": "#424242",
"neutralForeground3Pressed": "#424242",
"neutralForeground3Selected": "#424242",
"neutralForeground4": "#707070",
"neutralForegroundDisabled": "#bdbdbd",
"neutralForegroundInverted": "#ffffff",
"neutralForegroundInvertedLink": "#ffffff",
"neutralForegroundInvertedLinkHover": "#ffffff",
"neutralForegroundInvertedLinkPressed": "#ffffff",
"neutralForegroundInvertedLinkSelected": "#ffffff",
"neutralForegroundOnBrand": "#ffffff",
"neutralForegroundOnBrandHover": "#ffffff",
"neutralForegroundOnBrandPressed": "#ffffff",
"neutralForegroundOnBrandSelected": "#ffffff",
"neutralStencil1": "#e6e6e6",
"neutralStencil2": "#fafafa",
"neutralStroke1": "#d1d1d1",
@ -934,33 +839,10 @@ Object {
"neutralStroke1Pressed": "#b3b3b3",
"neutralStroke1Selected": "#bdbdbd",
"neutralStroke2": "#e0e0e0",
"neutralStroke3": "#f0f0f0",
"neutralStrokeAccessible": "#616161",
"neutralStrokeAccessibleHover": "#575757",
"neutralStrokeAccessiblePressed": "#4d4d4d",
"neutralStrokeAccessibleSelected": "#0078d4",
"neutralStrokeDisabled": "#e0e0e0",
"redBackground1": "#f9f0f2",
"redBackground2": "#d69ca5",
"redBackground3": "#750b1c",
"redBorder1": "#d69ca5",
"redBorder2": "#750b1c",
"redBorderActive": "#750b1c",
"redForeground1": "#690a19",
"redForeground2": "#d69ca5",
"redForeground3": "#750b1c",
"strokeFocus1": "#ffffff",
"strokeFocus2": "#000000",
"subtleBackground": "transparent",
"subtleBackgroundHover": "#f5f5f5",
"subtleBackgroundPressed": "#e0e0e0",
"subtleBackgroundSelected": "#ebebeb",
"transparentBackground": "transparent",
"transparentBackgroundHover": "transparent",
"transparentBackgroundPressed": "transparent",
"transparentBackgroundSelected": "transparent",
"transparentStroke": "transparent",
"transparentStrokeDisabled": "transparent",
"transparentStrokeInteractive": "transparent",
}
`;

Просмотреть файл

@ -0,0 +1,94 @@
import { AliasColorTokens, Variants } from '@fluentui-react-native/theme-types';
// API that translates tokens coming for android to Theme color values.
// This is implemented in a per-plaform fashion, for each endpoint that maps to similar token sets in design - i.e. map to similar
// pipeline output.
export function mapPipelineToTheme(pipelineOutput: any): AliasColorTokens {
return {
neutralForeground1: pipelineOutput.neutralForeground1.fillColorRest,
neutralForeground1Hover: pipelineOutput.neutralForeground1.fillColorHover,
neutralForeground1Pressed: pipelineOutput.neutralForeground1.fillColorPressed,
neutralForeground1Selected: pipelineOutput.neutralForeground1.fillColorSelected,
neutralForeground2: pipelineOutput.neutralForeground2.fillColorRest,
neutralForeground2Hover: pipelineOutput.neutralForeground2.fillColorHover,
neutralForeground2Pressed: pipelineOutput.neutralForeground2.fillColorPressed,
neutralForeground2Selected: pipelineOutput.neutralForeground2.fillColorSelected,
neutralForeground2BrandHover: pipelineOutput.neutralForeground2.fillColorBrandHover,
neutralForeground2BrandPressed: pipelineOutput.neutralForeground2.fillColorBrandPressed,
neutralForeground2BrandSelected: pipelineOutput.neutralForeground2.fillColorBrandSelected,
neutralForeground3: pipelineOutput.neutralForeground3.fillColorRest,
neutralForeground3Hover: pipelineOutput.neutralForeground3.fillColorHover,
neutralForeground3Pressed: pipelineOutput.neutralForeground3.fillColorPressed,
neutralForeground3Selected: pipelineOutput.neutralForeground3.fillColorSelected,
neutralForeground3BrandHover: pipelineOutput.neutralForeground3.fillColorBrandHover,
neutralForeground3BrandPressed: pipelineOutput.neutralForeground3.fillColorBrandPressed,
neutralForeground3BrandSelected: pipelineOutput.neutralForeground3.fillColorBrandSelected,
neutralForegroundInverted: pipelineOutput.neutralForegroundInverted.fillColorRest,
neutralBackground1: pipelineOutput.neutralBackground1.fillColorRest,
neutralBackground1Hover: pipelineOutput.neutralBackground1.fillColorHover,
neutralBackground1Pressed: pipelineOutput.neutralBackground1.fillColorPressed,
neutralBackground1Selected: pipelineOutput.neutralBackground1.fillColorSelected,
neutralBackground2: pipelineOutput.neutralBackground2.fillColorRest,
neutralBackground2Hover: pipelineOutput.neutralBackground2.fillColorHover,
neutralBackground2Pressed: pipelineOutput.neutralBackground2.fillColorPressed,
neutralBackground2Selected: pipelineOutput.neutralBackground2.fillColorSelected,
neutralBackground3: pipelineOutput.neutralBackground3.fillColorRest,
neutralBackground3Hover: pipelineOutput.neutralBackground3.fillColorHover,
neutralBackground3Pressed: pipelineOutput.neutralBackground3.fillColorPressed,
neutralBackground3Selected: pipelineOutput.neutralBackground3.fillColorSelected,
neutralBackground4: pipelineOutput.neutralBackground4.fillColorRest,
neutralBackground4Hover: pipelineOutput.neutralBackground4.fillColorHover,
neutralBackground4Pressed: pipelineOutput.neutralBackground4.fillColorPressed,
neutralBackground4Selected: pipelineOutput.neutralBackground4.fillColorSelected,
neutralBackground5: pipelineOutput.neutralBackground5.fillColorRest,
neutralBackground5Hover: pipelineOutput.neutralBackground5.fillColorHover,
neutralBackground5Pressed: pipelineOutput.neutralBackground5.fillColorPressed,
neutralBackground5Selected: pipelineOutput.neutralBackground5.fillColorSelected,
neutralBackground6: pipelineOutput.neutralBackground6.fillColorRest,
neutralBackgroundInverted: pipelineOutput.neutralBackgroundInverted.fillColorRest,
neutralBackgroundDisabled: pipelineOutput.neutralBackgroundDisabled.fillColorRest,
neutralStencil1: pipelineOutput.neutralStencil1.fillColorRest,
neutralStencil2: pipelineOutput.neutralStencil2.fillColorRest,
neutralStrokeAccessible: pipelineOutput.neutralStrokeAccessible.strokeColorRest,
neutralStrokeAccessibleHover: pipelineOutput.neutralStrokeAccessible.strokeColorHover,
neutralStrokeAccessiblePressed: pipelineOutput.neutralStrokeAccessible.strokeColorPressed,
neutralStrokeAccessibleSelected: pipelineOutput.neutralStrokeAccessible.strokeColorSelected,
neutralStroke1: pipelineOutput.neutralStroke1.strokeColorRest,
neutralStroke1Hover: pipelineOutput.neutralStroke1.strokeColorHover,
neutralStroke1Pressed: pipelineOutput.neutralStroke1.strokeColorPressed,
neutralStroke1Selected: pipelineOutput.neutralStroke1.strokeColorSelected,
neutralStroke2: pipelineOutput.neutralStroke2.strokeColorRest,
neutralStrokeDisabled: pipelineOutput.neutralStrokeDisabled.strokeColorRest,
};
}
export function mapFontPipelineToTheme(pipelineOutput: any): Partial<Variants> {
return {
caption1: createVariantValue(pipelineOutput.caption1),
body1: createVariantValue(pipelineOutput.body1),
body1Strong: createVariantValue(pipelineOutput.body1Strong),
body2: createVariantValue(pipelineOutput.body2),
body2Strong: createVariantValue(pipelineOutput.body2Strong),
subtitle1: createVariantValue(pipelineOutput.subtitle1),
subtitle1Strong: createVariantValue(pipelineOutput.subtitle1Strong),
subtitle2: createVariantValue(pipelineOutput.subtitle2),
subtitle2Strong: createVariantValue(pipelineOutput.subtitle2Strong),
title1: createVariantValue(pipelineOutput.title1),
title1Strong: createVariantValue(pipelineOutput.title1Strong),
largeTitle: createVariantValue(pipelineOutput.largeTitle),
display: createVariantValue(pipelineOutput.display),
};
}
function createVariantValue(variant: any) {
return { face: 'primary', size: variant.fontSize, weight: variant.fontWeight };
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1437,10 +1437,10 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
"@fluentui-react-native/design-tokens-android@^0.13.0":
version "0.13.0"
resolved "https://registry.yarnpkg.com/@fluentui-react-native/design-tokens-android/-/design-tokens-android-0.13.0.tgz#f473d1f3eefdf720715c627b7816a2b41ba35627"
integrity sha512-bkWBgViYMpJ712+wd82+RIvHcU1ox5TGxV4O46FnJLI9LW7sd+HVP70yW7fd1Kuhkx/MTmI9K3YEG/Aw4JnyOA==
"@fluentui-react-native/design-tokens-android@^0.17.0":
version "0.17.0"
resolved "https://registry.yarnpkg.com/@fluentui-react-native/design-tokens-android/-/design-tokens-android-0.17.0.tgz#55ed03b2639907f26103c5e9eb5eec46086a310e"
integrity sha512-PPwXUuuKJ7eM5AEp16ceLM/CHfUi0Ltq9gDU5TZ9X6P0vW/B1IkLk6eFgtoiFdSmbQT+EoO5s3v2EUwhJ0z1ew==
"@fluentui-react-native/design-tokens-ios@^0.19.0":
version "0.19.0"